Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List like #552

Merged
merged 2 commits into from
Sep 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions website/templates/issue.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,32 @@ <h3 class="page-header">
</div>
</h3>
<strong>Domain:</strong>

<a href="{{object.url}}" target="_new" class="issue-domain">{{object.url}}</a>
<div class="pull-right">
<a href="#loginx" data-toggle="modal">Liked By</a>

<div id="loginx" class="modal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<h3>Liked by:</h3>
{% for usr in likers %}
<div class="list-group-item">
{% if usr.user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{usr.user.socialaccount_set.all.0.get_avatar_url}}" height="50px">
{% else %}
<img src="{% gravatar_url usr.user.email 50 %}">
{% endif %}
<a href="/profile/{{usr.user.username}}">{{usr.user.username}}</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>


<button class="btn btn-primary btn-xs copy-btn" data-clipboard-text="{{object.description}}">
<i class="glyphicon glyphicon-copy"></i> Copy Title
</button>
Expand Down
1 change: 1 addition & 0 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ def get_context_data(self, **kwargs):
context['all_comment'] = self.object.comments.all
context['all_users'] = User.objects.all()
context['likes'] = UserProfile.objects.filter(issue_upvoted=self.object).count()
context['likers'] = UserProfile.objects.filter(issue_upvoted=self.object)
return context


Expand Down