Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu committed Sep 9, 2020
2 parents 4ecca77 + 32a40c3 commit 55c416b
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/hackathon-onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $('#edit-btn').on('click', function() {
return quill;
};

loadDynamicScript(activateQuill, 'https://cdn.quilljs.com/1.3.6/quill.js', 'quill-js');
loadDynamicScript(activateQuill, 'https://cdn.jsdelivr.net/npm/quill@1.3.6/dist/quill.js', 'quill-js');

});

Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/pages/tribe-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $('#edit-btn').on('click', function() {
style.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(style);
}
loadDynamicScript(activateQuill, 'https://cdn.quilljs.com/1.3.6/quill.js', 'quill-js');
loadDynamicScript(activateQuill, 'https://cdn.jsdelivr.net/npm/quill@1.3.6/dist/quill.js', 'quill-js');

});

Expand Down Expand Up @@ -156,7 +156,7 @@ if ($('#edit-tribe_priority').length) {
style.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(style);

loadDynamicScript(activateQuill, 'https://cdn.quilljs.com/1.3.6/quill.js', 'quill-js');
loadDynamicScript(activateQuill, 'https://cdn.jsdelivr.net/npm/quill@1.3.6/dist/quill.js', 'quill-js');
}

tokens(document.web3network).forEach(function(ele) {
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/profiles/tribes-vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ <h4 class="px-2 pt-3 font-body font-weight-semibold text-muted">{% trans "Top id
<slot></slot>
</select>
</script>
<script defer src='https://cdn.quilljs.com/1.3.6/quill.js'></script>
<script defer src='https://cdn.jsdelivr.net/npm/quill@1.3.6/dist/quill.js'></script>
<script defer src='https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-quill-editor.js'></script>
<script defer src='https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js'></script>
{{currentProfile|json_script:"current-profile"}}
Expand Down
15 changes: 14 additions & 1 deletion app/grants/templates/grants/newmatch.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<html lang="en">
<head>
{% include 'shared/head.html' with slim=1 %}
{% include 'shared/cards.html' %}
{% include 'shared/cards_pic.html' %}
<link rel="stylesheet" href="{% static "v2/css/grants/new.css" %}">
<link rel="stylesheet" href="{% static "v2/css/bounty.css" %}">
<script src="//cdn.quilljs.com/1.3.6/quill.min.js"></script>
Expand Down Expand Up @@ -120,6 +120,19 @@ <h5 class="mt-4">Logos</h5>
<h5 class="mt-4">Misc</h5>
<hr>

{% if github_handle %}
<div class="form__group-horizontal pb-1">
<label>
From: <a href="/{{github_handle}}">@{{github_handle}}</a>
</label>
<br>
<input type="checkbox" name="anonymous" id='input-anonymous'>
<label class="font-body" for="input-anonymous">{% trans "I would prefer to stay anonymous" %}</label>

</div>
{% endif %}


<div class="form__group-horizontal pb-1">
<label class="font-body" for="input-comment">{% trans "Comment" %}</label>
<textarea placeholder="Hi Gitcoin team, I found you from XYZ, and am reaching out from Project ABC. Looking forward to working together on information-age public goods!" id=input-comment class="form__input form__input-lg " name="comment">{{data.comment}}</textarea>
Expand Down
9 changes: 7 additions & 2 deletions app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
last_round_end = timezone.datetime(2020, 4, 7, 12, 0)
# TODO, also update grants.clr:CLR_START_DATE, PREV_CLR_START_DATE, PREV_CLR_END_DATE
next_round_start = timezone.datetime(2020, 6, 15, 12, 0)
next_round_start = timezone.datetime(2020, 9, 15, 9, 0)
next_round_start = timezone.datetime(2020, 9, 16, 15, 0) #tz=utc, not mst
after_that_next_round_begin = timezone.datetime(2020, 9, 14, 12, 0)
round_end = timezone.datetime(2020, 7, 3, 16, 0) #tz=utc, not mst
round_types = ['media', 'tech', 'change']
Expand Down Expand Up @@ -1294,7 +1294,7 @@ def new_matching_partner(request):
'title': 'Pledge your support.',
'card_desc': f'Thank you for your interest in supporting public goods.on Gitcoin. Complete the form below to get started.',
'data': request.POST.dict(),
'grant_types': basic_grant_categories(None),
'grant_types': basic_grant_types() + basic_grant_categories(None),
}

if not request.user.is_authenticated:
Expand Down Expand Up @@ -1340,6 +1340,11 @@ def invoice(request, contribution_pk):

return TemplateResponse(request, 'grants/invoice.html', params)

def basic_grant_types():
result = GrantType.objects.all()
return [ (ele.name, ele.label) for ele in result ]


def basic_grant_categories(name):
result = []
grant_type = GrantType.objects.filter(name=name).first()
Expand Down
14 changes: 10 additions & 4 deletions app/retail/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,10 +1202,10 @@ def render_new_bounty_roundup(to_email):
from marketing.models import RoundupEmail
args = RoundupEmail.objects.order_by('created_on').last()
hide_dynamic = args.hide_dynamic
new_kudos_size_px = '300'

subject = args.subject
new_kudos_pks = args.kudos_ids.split(',')
new_kudos_size_px = 150
new_kudos_ids = args.kudos_ids[0:-1].split(',')
if settings.DEBUG and False:
# for debugging email styles
email_style = 2
Expand Down Expand Up @@ -1239,12 +1239,18 @@ def render_new_bounty_roundup(to_email):
}


from kudos.models import KudosTransfer
from kudos.models import KudosTransfer, Token
if highlight_kudos_ids:
kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
else:
kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

if new_kudos_ids:
new_kudos = Token.objects.filter(id__in=new_kudos_ids)
else:
new_kudos = None
print(new_kudos, new_kudos_ids)

for key, __ in leaderboard.items():
leaderboard[key]['items'] = LeaderboardRank.objects.active() \
.filter(leaderboard=key, product='all').order_by('rank')[0:num_leadboard_items]
Expand Down Expand Up @@ -1280,7 +1286,7 @@ def render_new_bounty_roundup(to_email):
'email_style': email_style,
'hide_dynamic': hide_dynamic,
'hide_bottom_logo': True,
'new_kudos_pks': new_kudos_pks,
'new_kudos': new_kudos,
'new_kudos_size_px': new_kudos_size_px,
'videos': args.videos,
'news': args.news,
Expand Down
9 changes: 5 additions & 4 deletions app/retail/templates/emails/bounty_roundup.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% endcomment %}
{% load i18n static humanize avatar_tags kudos_extras %}
{% block content %}
<style type="text/css"> #outlook a{padding: 0;}.ReadMsgBody{width: 100%;}.ExternalClass{width: 100%;}.ExternalClass *{line-height: 100%;}body{margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;}table, td{border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;}img{border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic;}p{display: block; margin: 13px 0;}</style> <style type="text/css"> @media only screen and (max-width:480px){@-ms-viewport{width: 320px;}@viewport{width: 320px;}}</style> <style type="text/css"> @import url(https://fonts.googleapis.com/css?family=System%20font); </style> <style type="text/css"> .hidden{display: none !important; width: 0 !important; height: 0 !important; max-height: 0 !important;}@media all and (max-width: 480px){.mj-column-per-19{width: 100% !important;}.mj-column-per-32{width: 100% !important;}.mj-column-per-100{width: 100% !important;}.desktop-labels{display: none !important; width: 0 !important; height: 0 !important; max-height: 0 !important;}.opinionScale>table>tbody>tr>td{padding: 0px 25px !important;}.titleText div{font-size: 19px !important;}.description{padding: 0px !important;}.descriptionText{font-size: 14px !important;}.opinionScaleStep{padding: 5px 0px !important;}.opinionScaleStep a{line-height: 50px !important;}.opinionScaleStep table tbody tr td tbody tr td{font-size: 16px !important; border-right: 1px solid #94AE89 !important; border-radius: 2px !important;}.mobile-label{display: block !important; width: auto !important; height: auto !important; max-height: none !important; padding: 10px 0px 5px 0px !important;}}</style> <style type="text/css"> @media only screen and (min-width:480px){.mj-column-per-100{width: 100% !important;}.mj-column-per-19{width: 19.2% !important;}.mj-column-per-32{width: 32% !important;}}</style>
<style type="text/css"> #outlook a{padding: 0;}.ReadMsgBody{width: 100%;}.ExternalClass{width: 100%;}.ExternalClass *{line-height: 100%;}body{margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;}table, td{border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;}img{border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic;}p{display: block; margin: 13px 0;}</style> <style type="text/css"> .hidden{display: none !important; width: 0 !important; height: 0 !important; max-height: 0 !important;}@media all and (max-width: 480px){.mj-column-per-19{width: 100% !important;}.mj-column-per-32{width: 100% !important;}.mj-column-per-100{width: 100% !important;}.desktop-labels{display: none !important; width: 0 !important; height: 0 !important; max-height: 0 !important;}.opinionScale>table>tbody>tr>td{padding: 0px 25px !important;}.titleText div{font-size: 19px !important;}.description{padding: 0px !important;}.descriptionText{font-size: 14px !important;}.opinionScaleStep{padding: 5px 0px !important;}.opinionScaleStep a{line-height: 50px !important;}.opinionScaleStep table tbody tr td tbody tr td{font-size: 16px !important; border-right: 1px solid #94AE89 !important; border-radius: 2px !important;}.mobile-label{display: block !important; width: auto !important; height: auto !important; max-height: none !important; padding: 10px 0px 5px 0px !important;}}</style> <style type="text/css"> @media only screen and (min-width:480px){.mj-column-per-100{width: 100% !important;}.mj-column-per-19{width: 19.2% !important;}.mj-column-per-32{width: 32% !important;}}</style>
<style>
.intro li{
margin-top: 15px;
Expand Down Expand Up @@ -233,9 +233,10 @@ <h2 style="font-weight:500; text-transform:capitalize; font-size:1.6rem; text-al

<div style="text-align: center">
<p>Congrats, you made it to the end of this issue! Grab your Kudos below.</p>
{% for pk in new_kudos_pks %}
<a href='https://gitcoin.co/kudos/{pk}/'>
<img src="https://p21.p4.n0.cdn.getcloudapp.com/items/o0u8XzlJ/image8.png?v=9411bc4cc4df4253753f1c4776b51b0e" width="300px" alt="Issue #1 Kudos" style="border-style:none; vertical-align:middle" valign="middle">
<!-- {{new_kudos}} -->
{% for kudos in new_kudos %}
<a href='https://gitcoin.co/kudos/{{kudos.pk}}/'>
<img style="max-width: 100%; border-style:none; vertical-align:middle" valign="middle" src="{{ kudos.img_url }}" width="300px" alt="{{kudos.name}}">
</a>
{% endfor %}
</p>
Expand Down

0 comments on commit 55c416b

Please sign in to comment.