Skip to content

Commit

Permalink
feedback from kevin (#7294)
Browse files Browse the repository at this point in the history
* feedback from kevin

* hackathon list page
  • Loading branch information
thelostone-mc authored Aug 27, 2020
1 parent 482d80a commit 60ea890
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 60 deletions.
3 changes: 0 additions & 3 deletions app/app/fixtures/grants.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"required_gas_price": "0",
"admin_profile": 17,
"image_css": "",
"clr_matching": "0.00",
"activeSubscriptions": "[]",
"hidden": false,
"team_members": [33]
Expand Down Expand Up @@ -63,7 +62,6 @@
"required_gas_price": "0",
"admin_profile": 33,
"image_css": "",
"clr_matching": "0.00",
"activeSubscriptions": "[]",
"hidden": false,
"team_members": [33]
Expand Down Expand Up @@ -98,7 +96,6 @@
"required_gas_price": "0",
"admin_profile": 33,
"image_css": "",
"clr_matching": "0.00",
"activeSubscriptions": "[]",
"hidden": false,
"team_members": [33]
Expand Down
14 changes: 8 additions & 6 deletions app/dashboard/templates/dashboard/hackathon/hackathons.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ <h5 class="font-subheader font-weight-semibold">
<div class="mt-3 font-smaller-2 hackathon-summary">
<p>{{ event.summary }}</p>
</div>
<div class="mt-3 font-smaller-2">
<span class="pr-1">Sponsored by</span>
{% for sponsor in event.sponsor_profiles %}
<a href="{{ sponsor.absolute_url }}" target="_blank"><img class="rounded-circle" style="width:21px;" src="{{ sponsor.avatar_url }}" /></a>
{% endfor %}
</div>
{% if event.sponsor_profiles %}
<div class="mt-3 font-smaller-2">
<span class="pr-1">Sponsored by</span>
{% for sponsor in event.sponsor_profiles %}
<a href="{{ sponsor.absolute_url }}" target="_blank"><img class="rounded-circle" style="width:21px;" src="{{ sponsor.avatar_url }}" /></a>
{% endfor %}
</div>
{% endif %}
<div class="mt-3 hackathon-actions">
{% if event.end_date|timesince_fromisoformat <= "1 min" %}
<a href="{% url 'hackathon_onboard' event.slug %}" class="btn btn-gc-blue font-caption font-weight-semibold px-3 mb-2">
Expand Down
2 changes: 1 addition & 1 deletion app/grants/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class GrantAdmin(GeneralAdmin):
'token_address', 'contract_address', 'contract_version', 'network', 'required_gas_price', 'logo_svg_asset',
'logo_asset', 'created_on', 'modified_on', 'team_member_list',
'subscriptions_links', 'contributions_links', 'logo', 'logo_svg', 'image_css',
'link', 'clr_matching', 'clr_prediction_curve', 'hidden', 'grant_type', 'next_clr_calc_date', 'last_clr_calc_date',
'link', 'clr_prediction_curve', 'hidden', 'grant_type', 'next_clr_calc_date', 'last_clr_calc_date',
'metadata', 'categories', 'twitter_handle_1', 'twitter_handle_2', 'view_count', 'is_clr_eligible', 'in_active_clrs'
]
readonly_fields = [
Expand Down
17 changes: 17 additions & 0 deletions app/grants/migrations/0073_remove_grant_clr_matching.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 2.2.4 on 2020-08-27 11:17

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('grants', '0072_grant_in_active_clrs'),
]

operations = [
migrations.RemoveField(
model_name='grant',
name='clr_matching',
),
]
6 changes: 0 additions & 6 deletions app/grants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ class Meta:
help_text=_('The team members contributing to this Grant.'),
)
image_css = models.CharField(default='', blank=True, max_length=255, help_text=_('additional CSS to attach to the grant-banner img.'))
clr_matching = models.DecimalField(
default=0,
decimal_places=2,
max_digits=20,
help_text=_('The TOTAL CLR matching amount across all rounds'),
)
amount_received_with_phantom_funds = models.DecimalField(
default=0,
decimal_places=2,
Expand Down
10 changes: 0 additions & 10 deletions app/grants/templates/grants/card/clr_estimate_prev.html

This file was deleted.

2 changes: 1 addition & 1 deletion app/grants/templates/grants/card/clr_match.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n static humanize grants_extra %}

<div class="clr">
<h2 class="label font-caption font-weight-semibold mb-1 p-1 text-center">
<h2 class="label font-caption font-weight-semibold mb-1 p-1">
{{round_num}} MATCH ROUND
</h2>

Expand Down
4 changes: 2 additions & 2 deletions app/grants/templates/grants/card/front.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ <h2 class="font-title font-weight-bold amount pt-1 mb-2">
</p>
{% else %}
<h2 class="font-title font-weight-bold amount pt-1 mb-2">
{{ grant.monthly_amount_subscribed|floatformat:0|intcomma }} DAI
{{ grant.amount_received|floatformat:0|intcomma }} DAI
</h2>
<p class="amount mb-2 font-caption font-weight-semibold">MONTHLY RECURRING</p>
<p class="amount mb-2 font-caption font-weight-semibold">All Time Funding</p>
{% endif %}
</div>
</div>
Expand Down
28 changes: 11 additions & 17 deletions app/grants/templates/grants/detail/funding.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,22 @@
<div id="funding-card" class="card my-0 mx-0 mt-md-5 mr-md-5 shadow-sm">
<div class="card-body">
<div class="row progress-container {% if clr_active %} mb-2 {% endif %} {% if not is_team_member %} mt-4 {% endif %}">
<div class="col-6 text-center text-xl-left offset-xl-0 col-xl-6 mb-xl-0 ">
{% if grant.is_clr_eligible and round_num %}
{% if grant.is_clr_eligible and round_num %}
<div class="col-6 text-center text-xl-left offset-xl-0 col-xl-6 mb-xl-0 ">
{% include 'grants/card/clr_match.html' %}
{% else %}
<p class="sub-title font-weight-semibold font-caption mb-1 pt-1">MONTHLY RECURRING</p>
<p class="font-title mb-0 font-weight-bold">
{{ grant.monthly_amount_subscribed|floatformat:0|intcomma }} DAI
</p>
{% endif %}
</div>
</div>
{% endif %}

<div class="col-6 text-center text-xl-left offset-xl-0 col-xl-6">
<p class="sub-title mb-1 font-weight-semibold font-caption mb-1 pt-1">
ROUND {{ clr_round }}
ALL TIME FUNDING
</p>
<h2 class="font-title font-weight-bold amount pt-1 mb-0">
{{grant.amount_received|floatformat:0|intcomma}} DAI
</h2>
<p class="mb-2 font-caption">
{{grant.contributor_count}} CONTRIBUTORS
</p>
<p class="font-subtitle mb-0">
<span class="font-weight-bold">
{{grant.amount_received_in_round|floatformat:0|intcomma}} DAI
</span>
<br>
{{grant.positive_round_contributor_count}} contributors
</p>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def grants_by_grant_type(request, grant_type):
grant.clr_round_num = clr_round.round_num
else:
grant.is_clr_active = False
grant.clr_round_num = 'LAST' if grant.clr_matching > 0 else None
grant.clr_round_num = 'LAST'


# populate active round info
Expand Down Expand Up @@ -649,7 +649,7 @@ def grant_details(request, grant_id, grant_slug):
clr_round_num = clr_round.round_num
else:
is_clr_active = False
clr_round_num = 'LAST' if grant.clr_matching > 0 else None
clr_round_num = 'LAST'

is_clr_active = True if clr_round else False
title = grant.title + " | Grants"
Expand Down
12 changes: 0 additions & 12 deletions scripts/debug/update_grant_clr_amounts.py

This file was deleted.

0 comments on commit 60ea890

Please sign in to comment.