Skip to content

Commit

Permalink
fix projects activity, logo, and urls (#7286)
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu authored Aug 26, 2020
1 parent 9689038 commit c8678da
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/dashboard/templates/bounty/details2.html
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ <h5 class="bounty-heading">Projects</h5>
{% endif %}

<div class="text-center mt-2">
<a href="{{project.work_url}}" target="_blank" class="font-weight-bold card-subtitle">{{project.name}}</a>
<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>
<div class="mb-2">
<b class="text-muted font-smaller-2">Team Members</b>
<div class="mt-1">
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/bounty/new_bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ <h1 class="text-center">Fund Issue</h1>
</div>
</div>
<div>
<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>
<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>
<small v-show="chainId === '666'" class="form__input-help--dynamic text-highlight-gc-blue bg-lightpurple p-1" id="fiat_text">
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.
</small>
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/dashboard/hackathon/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h1>{{hackathon.name}} Projects</h1>
</div>
<div class="card-body">
<h5 class="card-title text-uppercase">{{ project.name }}</h5>
<a href="{% url 'get_hackathons' %}"target="_blank" class="font-weight-bold card-subtitle">Project Home</a>
<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>
<div class="my-2">
<b class="text-muted">Project Summary</b>
<p>
Expand Down
13 changes: 7 additions & 6 deletions app/dashboard/templates/project/detail/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
<div class="row hackathon-project mt-3 mb-5">
<div class="col-12 px-0">
<div class="col-12 col-lg-10 pb-2 d-flex" style="padding-top: 20px !important;">
<img width="111" height="111" :src="project.logo_url" style="{{project.image_css}}">
<div class="ml-3">
<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>
<div class="d-flex align-items-baseline">
<i class="fab fa-github mr-2"></i> <a class="font-body" :href="project.work_url">[[project.work_url]]</a>
</div>
<img v-if="project.logo_url" width="111" height="111" :src="project.logo_url">
<img v-else width="111" height="111" :src="project.prize.avatar">
<div class="ml-3">
<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>
<div class="d-flex align-items-baseline">
<i class="fab fa-github mr-2"></i> <a class="font-body" :href="project.work_url">[[project.work_url]]</a>
</div>
</div>
</div>
<div class="col-12 col-lg-7">
<div class="mt-4">
Expand Down
5 changes: 4 additions & 1 deletion app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4304,6 +4304,9 @@ def hackathon_project_page(request, hackathon, project_id, project_name, tab='')
if tab == 'activity':
active = 1

if not hackathon:
hackathon = project.hackathon

hackathon_obj = HackathonEventSerializer(project.hackathon).data,
what = f'project:{project_id}'
params = {
Expand All @@ -4321,7 +4324,7 @@ def hackathon_project_page(request, hackathon, project_id, project_name, tab='')
'winner': project.winner,
'looking_members': project.looking_members,
'work_url': project.work_url,
'logo_url': project.logo.url if project.logo else staticfiles_storage.url(f'v2/images/projects/logos/${project.id}.png'),
'logo_url': project.logo.url if project.logo else '',
'prize': {
'id': project.bounty.id,
'title': project.bounty.title,
Expand Down
34 changes: 19 additions & 15 deletions app/retail/templates/shared/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,27 @@
</div>
<div class="col-10 col-sm-8 pl-2 px-sm-0 activity_detail">
<div>
{% 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 %}
{% 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 %}
<b>{% firstof row.profile.data.name or row.profile.handle %}</b>
<span class="grey">
<a class="grey" href="/profile/{{ row.profile.handle }}" data-usercard="{{ row.profile.handle }}">@{{ row.profile.handle }}</a>
{% if row.metadata.looking_team_members %}
<span class="font-body"> is
<i class="fas fa-users gc-text-blue"></i>
<span>Looking for Team Members</span>
</span>
{% elif row.metadata.looking_project %}
<span class="font-body"> is
<i class="far font-body fa-lightbulb gc-text-blue"></i>
<span>Looking for a Project</span>
</span>
<br>
{% endif %}
{% if row.hackathonevent %}
<a class="grey" href="/profile/{{ row.profile.handle }}" data-usercard="{{ row.profile.handle }}">@{{ row.profile.handle }}</a>
{% if row.metadata.looking_team_members %}
<span class="font-body"> is
<i class="fas fa-users gc-text-blue"></i>
<span>Looking for Team Members</span>
</span>
{% elif row.metadata.looking_project %}
<span class="font-body"> is
<i class="far font-body fa-lightbulb gc-text-blue"></i>
<span>Looking for a Project</span>
</span>
<br>
{% endif %}
{% if row.project %}
<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>
{% endif %}

{% if row.hackathonevent %}
<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>
<a href="/townsquare/?tab=hackathon:{{ row.hackathonevent.id }}" data-toggle="tooltip" title="Filter {{ row.hackathonevent.name }} Posts">
<i class="fas fa-filter"></i>
Expand Down

0 comments on commit c8678da

Please sign in to comment.