8000 fix: links are direct to assett · python/pythondotorg@356af6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 356af6a

Browse files
committed
fix: links are direct to assett
Closes: #2577
1 parent 102fee6 commit 356af6a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

templates/users/sponsorship_detail.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,17 @@ <h3>Provided Assets</h3>
114114
<p><small>Assets from the PSF related to your sponsorship.</small></p>
115115
<br/>
116116
<ul>
117-
{% for asset in provided_assets %}
118-
<li><b>{{ asset.label }}</b>: <a href="{{ asset.user_view_url }}">View asset</a>.</li>
119-
{% endfor %}
117+
{% for asset in provided_assets %}
118+
<li><b>{{ asset.label }}</b>:
119+
{% if asset.polymorphic_ctype.name == "Provided File" %}
120+
<a href="{{ asset.value.url }}">View asset</a>
121+
{% elif asset.polymorphic_ctype.name == "Provided Text" %}
122+
<pre>{{ asset.value|urlize }}</pre>
123+
{% else %}
124+
<a href="{{ asset.value }}">View asset</a>
125+
{% endif %}
126+
</li>
127+
{% endfor %}
120128
</ul>
121129
<br/>
122130
<small>Or you can also <a href="{% url 'users:view_provided_sponsorship_assets' sponsorship.pk %}">click here</a> to view all the assets under the same page.</small>

0 commit comments

Comments
 (0)
0