Skip to content

Commit

Permalink
Merge branch 'stable' of github.com:gitcoinco/web into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Sep 23, 2020
2 parents 708165e + 1255f43 commit abb79cd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/app/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def preprocess(request):
'is_staff': request.user.is_staff if user_is_authenticated else False,
'is_moderator': profile.is_moderator if profile else False,
'is_alpha_tester': profile.is_alpha_tester if profile else False,
'user_groups': list(profile.user_groups) if profile else False,
'persona_is_funder': profile.persona_is_funder if profile else False,
'persona_is_hunter': profile.persona_is_hunter if profile else False,
'pref_do_not_track': profile.pref_do_not_track if profile else False,
Expand Down
4 changes: 4 additions & 0 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3412,6 +3412,10 @@ def is_alpha_tester(self):
return True
return self.user.groups.filter(name='Alpha_Testers').cache().exists() if self.user else False

@property
def user_groups(self):
return self.user.groups.all().cache().values_list('name', flat=True) if self.user else False

@property
def is_staff(self):
"""Determine whether or not the user is a staff member.
Expand Down
8 changes: 5 additions & 3 deletions app/dashboard/templates/bounty/new_bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ <h1 class="text-center">Fund Issue</h1>
</label>
{% endif %}

<label class="btn btn-radio chain-btn d-flex align-items-center mr-2 mb-2 font-weight-bold py-2 px-4" :class="{'active': chainId === 58}">
<input type="radio" name="bounty_chain" id="58_chain" value="58" v-model="chainId"><img class="mr-2" src="{% static 'v2/images/chains/polkadot.svg' %}" alt="" width="16"> Polkadot
</label>
{% if 'polkadot_testers' in user_groups or is_staff %}
<label class="btn btn-radio chain-btn d-flex align-items-center mr-2 mb-2 font-weight-bold py-2 px-4" :class="{'active': chainId === 58}">
<input type="radio" name="bounty_chain" id="58_chain" value="58" v-model="chainId"><img class="mr-2" src="{% static 'v2/images/chains/polkadot.svg' %}" alt="" width="16"> Polkadot
</label>
{% endif %}

<label class="btn btn-radio chain-btn d-flex align-items-center mr-2 mb-2 font-weight-bold py-2 px-4" :class="{'active': chainId === '61'}">
<input type="radio" name="bounty_chain" id="61_chain" value="61" v-model="chainId"><img class="mr-2" src="{% static 'v2/images/chains/ethereum-classic.svg' %}" alt="" width="16"> ETC
Expand Down
3 changes: 2 additions & 1 deletion app/dashboard/templates/dashboard/hackathon/new_bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ <h1 class="text-center">Fund Prize</h1>
<label class="btn btn-radio chain-btn d-flex align-items-center mr-2 mb-2 font-weight-bold py-2 px-4" :class="{'active': chainId === '666'}">
<input type="radio" name="bounty_chain" id="666_chain" value="666" v-model="chainId"><img class="mr-2" src="{% static 'v2/images/chains/paypal.svg' %}" alt="" width="16"> PayPal
</label>

{% endif %}
{% if 'polkadot_testers' in user_groups or is_staff %}
<label class="btn btn-radio chain-btn d-flex align-items-center mr-2 mb-2 font-weight-bold py-2 px-4" :class="{'active': chainId === 58}">
<input type="radio" name="bounty_chain" id="58_chain" value="58" v-model="chainId"><img class="mr-2" src="{% static 'v2/images/chains/polkadot.svg' %}" alt="" width="16"> Polkadot
</label>
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/dashboard/users-elastic.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ <h5 class="text-center card-user_name">
{% include 'shared/analytics.html' %}
{% include 'shared/footer_scripts.html' with slim="1" %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.5.1/vuex.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/innersearch.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/vue-innersearch.min.js"></script>
<script>
$('body').bootstrapTooltip({
selector: '[data-toggle="tooltip"]'
Expand Down

0 comments on commit abb79cd

Please sign in to comment.