Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions app/templates/proof.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,36 @@ <h1>{% if proof.kind == "bounty_payment" %}Accepted bounty payment{% else %}Acce
{% set submission_url = safe_public_url(proof.submission_url) %}
<dd>{% if submission_url %}<a href="{{ submission_url }}">{{ proof.submission_url }}</a>{% else %}{{ proof.submission_url }}{% endif %}</dd>
</dl>
{% if proof.kind == "bounty_payment" %}
<div class="section-head">
<h2>Related activity</h2>
<p>Open accepted-work searches for this proof, recipient, bounty, or submission.</p>
</div>
<div class="meta-grid">
<article>
<span>Recipient activity</span>
<strong>
<a href="/activity?q={{ proof.to_account | urlencode }}">Search {{ proof.to_account }}</a>
</strong>
</article>
<article>
<span>Proof activity</span>
<strong><a href="/activity?q={{ proof_hash | urlencode }}">Search proof hash</a></strong>
</article>
<article>
<span>Bounty activity</span>
<strong>
<a href="/activity?q={{ proof.bounty_id | urlencode }}">Search bounty #{{ proof.bounty_id }}</a>
</strong>
</article>
<article>
<span>Submission activity</span>
<strong>
<a href="/activity?q={{ proof.submission_url | urlencode }}">Search submission</a>
</strong>
</article>
</div>
{% endif %}
<pre>{{ proof | tojson(indent=2) }}</pre>
</section>
{% endblock %}
5 changes: 5 additions & 0 deletions tests/test_bounty_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ def test_ledger_and_proof_pages_make_bounty_payments_scannable(sqlite_url: str)
assert "MergeWork bounty" in proof_page.text
assert f'href="/bounties/{bounty.id}"' in proof_page.text
assert f'href="/ledger/{payment_sequence}"' in proof_page.text
assert "Related activity" in proof_page.text
assert 'href="/activity?q=github%3Acontributor"' in proof_page.text
assert f'href="/activity?q={proof_hash}"' in proof_page.text
assert f'href="/activity?q={bounty.id}"' in proof_page.text
assert 'href="/activity?q=https%3A//github.com/ramimbo/mergework/pull/99"' in proof_page.text

uppercase_proof_page = client.get(f"/proofs/{proof_hash.upper()}")
assert uppercase_proof_page.status_code == 200
Expand Down
Loading