Skip to content

Commit

Permalink
Merge pull request #5761 from thelostone-mc/stable
Browse files Browse the repository at this point in the history
chore: fixup activity section + grant description fix
  • Loading branch information
thelostone-mc authored Jan 10, 2020
2 parents 6efd4a8 + 18e67bf commit 3b025fd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 60 deletions.
2 changes: 1 addition & 1 deletion app/grants/templates/grants/detail/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<script src="{% static "v2/js/lib/ipfs-api.js" %}"></script>
<script src="{% static "v2/js/ipfs.js" %}"></script>
<script>
$('[data-toggle="tooltip"]').bootstrapTooltip();
$('[data-toggle="tooltip"]').bootstrapTooltip();
</script>
<script src="{% static "v2/js/user-search.js" %}"></script>
<script src="{% static "v2/js/grants/shared.js" %}"></script>
Expand Down
40 changes: 19 additions & 21 deletions app/grants/templates/grants/detail/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,24 @@ <h4 class="m-auto text-center font-weight-semibold">{% trans "No Activity for th
</div>

<script>
{% with description_tab_url=grant.url|addstr:'?tab=description' %}
let grant_description;

{% if request.get_full_path == description_tab_url or request.get_full_path == grant.url %}
grant_description = new Quill('#editor', {
theme: 'bubble',
readOnly: true,
});

{% if is_team_member and not grant_is_inactive %}
grant_description = new Quill('#editor', {
theme: 'snow',
});
grant_description.enable(false);
{% endif %}
if (document.getElementById("editor")) {
let grant_description;

grant_description = new Quill('#editor', {
theme: 'bubble',
readOnly: true,
});

{% if is_team_member and not grant_is_inactive %}
grant_description = new Quill('#editor', {
theme: 'snow',
});
grant_description.enable(false);
{% endif %}

let desc = JSON.parse(grant_description.getContents().ops[0].insert);
if (desc.ops) {
grant_description.setContents(desc);
}
{% endif %}
{% endwith %}
let desc = JSON.parse(grant_description.getContents().ops[0].insert);
if (desc.ops) {
grant_description.setContents(desc);
}
}
</script>
80 changes: 42 additions & 38 deletions app/retail/templates/shared/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
{% endif %}
</div>
</div>
<div class="col-12 col-md-10 activity-info my-auto {% if row.secondary_avatar_url %} position-relative {% endif %}">
<div class="activity-status font-body mb-1">
<div class="col-12 col-md-10 activity-info my-auto {% if row.secondary_avatar_url %}position-relative{% endif %}">
<div class="activity-status font-body">
<a href="https://gitcoin.co/profile/{{ row.profile.handle }}" target="_blank">
@{{ row.profile.handle }}
</a>
Expand All @@ -45,7 +45,7 @@
{{ row.metadata.to_username }}
</a>
{% elif row.activity_type == 'new_grant' %}
{% trans "created" %}
{% trans "created a new grant" %}
<a href="{{ row.metadata.grant_url }}" target="_blank">
{{ row.metadata.title }}
</a>
Expand Down Expand Up @@ -118,43 +118,47 @@
{% endif %}
{% endif %}
</div>
<div class="font-caption" >
<div class="activity-tags activity-tag-first align-items-center">
{% if row.value_in_token_disp or row.metadata.value_in_eth or row.metadata.value_in_token %}
<div class="tag token">
<p>
{% if row.value_in_token_disp %}
<span class="value_in_token_disp">{{ row.value_in_token_disp }} {{row.token_name}}</span>
{% elif row.metadata.value_in_eth %}
<span class="value_in_eth">{{ row.metadata.value_in_eth }} {{row.token_name}}</span>
{% elif row.metadata.value_in_token %}
<span class="value_in_token">{{row.metadata.value_in_token}} {{row.metadata.token_name}}</span>
{% else %}
{% endif %}
</p>
</div>
{% endif %}
{% if row.value_in_usdt_now %}
<div class="tag usd">
<p>
<span>{{ row.value_in_usdt_now }} USD</span>
</p>
</div>
{% endif %}
{% if row.bounty.network and row.bounty.network != 'mainnet' %}
<div class="tag network_warning">
<p>
<span>{{ activity.bounty.network }}</span>
</p>
</div>
{% endif %}
<span class="mx-2">
{% if not hide_date %}
{{ row.created_human_time }}

{% if row.activity_type in 'new_bounty,increased_bounty,killed_bounty,new_grant_contribution,killed_grant_contribution,new_grant_subscription,new_tip,new_crowdfund' %}
<div class="font-caption mt-1">
<div class="activity-tags activity-tag-first align-items-center">
{% if row.value_in_token_disp or row.metadata.value_in_eth or row.metadata.value_in_token %}
<div class="tag token">
<p>
{% if row.value_in_token_disp %}
<span class="value_in_token_disp">{{ row.value_in_token_disp }} {{row.token_name}}</span>
{% elif row.metadata.value_in_eth %}
<span class="value_in_eth">{{ row.metadata.value_in_eth }} {{row.token_name}}</span>
{% elif row.metadata.value_in_token %}
<span class="value_in_token">{{row.metadata.value_in_token}} {{row.metadata.token_name}}</span>
{% endif %}
</p>
</div>
{% endif %}

{% if row.value_in_usdt_now %}
<div class="tag usd">
<p>
<span>{{ row.value_in_usdt_now }} USD</span>
</p>
</div>
{% endif %}

{% if row.bounty.network and row.bounty.network != 'mainnet' %}
<div class="tag network_warning">
<p>
<span>{{ activity.bounty.network }}</span>
</p>
</div>
{% endif %}
</span>
<span class="mr-2">
{% if not hide_date %}
{{ row.created_human_time }}
{% endif %}
</span>
</div>
</div>
</div>
{% endif %}
</div>
<div class="col-12 col-md-1 text-center my-auto">
{% if row.kudos %}
Expand Down

0 comments on commit 3b025fd

Please sign in to comment.