forked from OWASP-BLT/BLT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into issue-OWASP-BLT#1315
- Loading branch information
Showing
8 changed files
with
151 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.7 on 2023-11-17 09:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("website", "0080_alter_issue_team_members"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="issue_downvoted", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="downvoted", to="website.issue" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{% load gravatar %} | ||
|
||
{% if request.user.is_authenticated %} | ||
<a class="btn btn-info btn-xs like_unlike" name="{{ object.pk }}"> | ||
<i class="fa fa-thumbs-up"></i> {{ likes }} | ||
</a> | ||
{% else %} | ||
<button class="btn btn-info btn-xs" disabled> | ||
<i class="fa fa-thumbs-up"></i> {{ likes }} | ||
</button> | ||
{% endif %} | ||
|
||
{% if likers %} | ||
<a href="#likedBy" class="btn btn-xs btn-default liked-by" data-toggle="modal">Liked By</a> | ||
{% endif %} | ||
|
||
<div id="likedBy" 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> | ||
|
||
|
||
{% if request.user.is_authenticated %} | ||
<a class="btn btn-info btn-xs dislike_undislike" name="{{ object.pk }}"> | ||
<i class="fa fa-thumbs-down"></i> {{ dislikes }} | ||
</a> | ||
{% else %} | ||
<button class="btn btn-info btn-xs" disabled> | ||
<i class="fa fa-thumbs-down"></i> {{ dislikes }} | ||
</button> | ||
{% endif %} | ||
|
||
{% if dislikers %} | ||
<a href="#dislikedBy" class="btn btn-xs btn-default disliked-by" data-toggle="modal">Disliked By</a> | ||
{% endif %} | ||
|
||
<div id="dislikedBy" class="modal" role="dialog"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-body"> | ||
<h3>Disliked by:</h3> | ||
{% for usr in dislikers %} | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters