Skip to content

Commit c8678da

Browse files
authored
fix projects activity, logo, and urls (#7286)
1 parent 9689038 commit c8678da

6 files changed

Lines changed: 33 additions & 25 deletions

File tree

app/dashboard/templates/bounty/details2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ <h5 class="bounty-heading">Projects</h5>
980980
{% endif %}
981981

982982
<div class="text-center mt-2">
983-
<a href="{{project.work_url}}" target="_blank" class="font-weight-bold card-subtitle">{{project.name}}</a>
983+
<a href="{% url 'hackathon_project_page' hackathon=project.hackathon.slug project_id=project.id project_name=project.name|slugify %}" target="_blank" class="font-weight-bold card-subtitle">{{project.name}}</a>
984984
<div class="mb-2">
985985
<b class="text-muted font-smaller-2">Team Members</b>
986986
<div class="mt-1">

app/dashboard/templates/bounty/new_bounty.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ <h1 class="text-center">Fund Issue</h1>
394394
</div>
395395
</div>
396396
<div>
397-
<small v-show="form.amountusd" class="form__input-help--dynamic text-highlight-gc-blue bg-lightpurple p-1" id="usd_amount_text">[[form.hours]] hrs at $[[form.amountusd]]/hr leads to <b> [[ successRate]]% success rate</b>. Read our <a href="https://gitcoin.co/blog/tutorial-how-to-price-work-on-gitcoin/" target="_blank" class="underline" rel="noopener noreferrer">pricing guide</a>.</small>
397+
<small v-show="form.amountusd" class="form__input-help--dynamic text-highlight-gc-blue bg-lightpurple p-1" id="usd_amount_text">[[form.hours]] hrs at $[[form.amountusd / form.hours | decimals(2)]]/hr leads to <b> [[ successRate]]% success rate</b>. Read our <a href="https://gitcoin.co/blog/tutorial-how-to-price-work-on-gitcoin/" target="_blank" class="underline" rel="noopener noreferrer">pricing guide</a>.</small>
398398
<small v-show="chainId === '666'" class="form__input-help--dynamic text-highlight-gc-blue bg-lightpurple p-1" id="fiat_text">
399399
USD payment is powered by <span class="font-weight-bold">PayPal</span>. Please note that there might be a small fee for payment to contributors in outside of the US.
400400
</small>

app/dashboard/templates/dashboard/hackathon/projects.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ <h1>{{hackathon.name}} Projects</h1>
169169
</div>
170170
<div class="card-body">
171171
<h5 class="card-title text-uppercase">{{ project.name }}</h5>
172-
<a href="{% url 'get_hackathons' %}"target="_blank" class="font-weight-bold card-subtitle">Project Home</a>
172+
<a href="{% url 'hackathon_project_page' hackathon=project.hackathon.slug project_id=project.id project_name=project.name|slugify %}" class="font-weight-bold card-subtitle">Project Home</a>
173173
<div class="my-2">
174174
<b class="text-muted">Project Summary</b>
175175
<p>

app/dashboard/templates/project/detail/info.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
<div class="row hackathon-project mt-3 mb-5">
2525
<div class="col-12 px-0">
2626
<div class="col-12 col-lg-10 pb-2 d-flex" style="padding-top: 20px !important;">
27-
<img width="111" height="111" :src="project.logo_url" style="{{project.image_css}}">
28-
<div class="ml-3">
29-
<a class="text-decoration-none text-black project-title" :href="project.url"><h1 class="font-title-xl mt-md-4 mb-2 font-weight-bold">[[ project.name ]]</h1></a>
30-
<div class="d-flex align-items-baseline">
31-
<i class="fab fa-github mr-2"></i> <a class="font-body" :href="project.work_url">[[project.work_url]]</a>
32-
</div>
27+
<img v-if="project.logo_url" width="111" height="111" :src="project.logo_url">
28+
<img v-else width="111" height="111" :src="project.prize.avatar">
29+
<div class="ml-3">
30+
<a class="text-decoration-none text-black project-title" :href="project.url"><h1 class="font-title-xl mt-md-4 mb-2 font-weight-bold">[[ project.name ]]</h1></a>
31+
<div class="d-flex align-items-baseline">
32+
<i class="fab fa-github mr-2"></i> <a class="font-body" :href="project.work_url">[[project.work_url]]</a>
3333
</div>
34+
</div>
3435
</div>
3536
<div class="col-12 col-lg-7">
3637
<div class="mt-4">

app/dashboard/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4304,6 +4304,9 @@ def hackathon_project_page(request, hackathon, project_id, project_name, tab='')
43044304
if tab == 'activity':
43054305
active = 1
43064306

4307+
if not hackathon:
4308+
hackathon = project.hackathon
4309+
43074310
hackathon_obj = HackathonEventSerializer(project.hackathon).data,
43084311
what = f'project:{project_id}'
43094312
params = {
@@ -4321,7 +4324,7 @@ def hackathon_project_page(request, hackathon, project_id, project_name, tab='')
43214324
'winner': project.winner,
43224325
'looking_members': project.looking_members,
43234326
'work_url': project.work_url,
4324-
'logo_url': project.logo.url if project.logo else staticfiles_storage.url(f'v2/images/projects/logos/${project.id}.png'),
4327+
'logo_url': project.logo.url if project.logo else '',
43254328
'prize': {
43264329
'id': project.bounty.id,
43274330
'title': project.bounty.title,

app/retail/templates/shared/activity.html

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,27 @@
5858
</div>
5959
<div class="col-10 col-sm-8 pl-2 px-sm-0 activity_detail">
6060
<div>
61-
{% include 'profiles/presence_indicator.html' with last_chat_status=row.profile.last_chat_status chat_id=row.profile.chat_id handle=row.profile.handle additionalclasses="mini" show_even_if_offline=1 %}
61+
{% include 'profiles/presence_indicator.html' with last_chat_status=row.profile.last_chat_status chat_id=row.profile.chat_id handle=row.profile.handle additionalclasses="mini" show_even_if_offline=1 %}
6262
<b>{% firstof row.profile.data.name or row.profile.handle %}</b>
6363
<span class="grey">
64-
<a class="grey" href="/profile/{{ row.profile.handle }}" data-usercard="{{ row.profile.handle }}">@{{ row.profile.handle }}</a>
65-
{% if row.metadata.looking_team_members %}
66-
<span class="font-body"> is
67-
<i class="fas fa-users gc-text-blue"></i>
68-
<span>Looking for Team Members</span>
69-
</span>
70-
{% elif row.metadata.looking_project %}
71-
<span class="font-body"> is
72-
<i class="far font-body fa-lightbulb gc-text-blue"></i>
73-
<span>Looking for a Project</span>
74-
</span>
75-
<br>
76-
{% endif %}
77-
{% if row.hackathonevent %}
64+
<a class="grey" href="/profile/{{ row.profile.handle }}" data-usercard="{{ row.profile.handle }}">@{{ row.profile.handle }}</a>
65+
{% if row.metadata.looking_team_members %}
66+
<span class="font-body"> is
67+
<i class="fas fa-users gc-text-blue"></i>
68+
<span>Looking for Team Members</span>
69+
</span>
70+
{% elif row.metadata.looking_project %}
71+
<span class="font-body"> is
72+
<i class="far font-body fa-lightbulb gc-text-blue"></i>
73+
<span>Looking for a Project</span>
74+
</span>
75+
<br>
76+
{% endif %}
77+
{% if row.project %}
78+
<a href="{% url 'hackathon_project_page' hackathon=row.project.hackathon.slug project_id=row.project.id project_name=row.project.name|slugify %}" class="tag" data-toggle="tooltip" title="Go to {{ row.project.name }}">via {{ row.project.name }}</a>
79+
{% endif %}
80+
81+
{% if row.hackathonevent %}
7882
<a href="{% url 'hackathon' row.hackathonevent.slug %}townsquare/?tab=hackathon:{{row.hackathonevent.id}}" class="tag" data-toggle="tooltip" title="Go to {{ row.hackathonevent.name }} Townsquare">via {{ row.hackathonevent.name }}</a>
7983
<a href="/townsquare/?tab=hackathon:{{ row.hackathonevent.id }}" data-toggle="tooltip" title="Filter {{ row.hackathonevent.name }} Posts">
8084
<i class="fas fa-filter"></i>

0 commit comments

Comments
 (0)