-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💻 Super teacher can delete public tags (#5617)
- teacher1 is now always a super teacher in the dev_database - when a tag was deleted from an adventure, the popularity wasn't decreased - when you would add a tag to an adventure without a name, it would throw a 500 because the adventure wouldn't exist without a name - some cleaning up **How to test** Add some tags in (public) adventures and delete them as a Super Teacher <img width="1438" alt="Screenshot 2024-06-17 at 14 38 03" src="https://github.com/hedyorg/hedy/assets/48122190/c13879c3-92cd-464f-9dc4-1073d912b516">
- Loading branch information
Showing
67 changed files
with
435 additions
and
24 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
Large diffs are not rendered by default.
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
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,36 @@ | ||
{% extends "auth.html" %} | ||
|
||
{% block regular_content %} | ||
<h4 class="text-center">All public tags</h4> | ||
<h6 class="text-center">June 2024: Popularity might not be accurate, because up until now, it wasn't decreased when a tag was deleted.<br><br></h6> | ||
<div class="program w-full "> | ||
<table class="w-full border border-gray-400"> | ||
<thead> | ||
<tr class="bg-blue-300 text-blue-900"> | ||
<td class="px-2 py-2 text-center" id="name_header">Name</td> | ||
<td class="px-2 py-2 text-center" id="popularity_header">Popularity</td> | ||
<td class="px-2 py-2 text-white text-center bg-blue-900" id="">Delete</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for tag in tags %} | ||
<tr class="{% if loop.index is divisibleby 2 %}bg-gray-200{% else %}bg-white{% endif %}"> | ||
<td class="name_cell text-center p-2">{{tag.name}}</td> | ||
<td class="popularity_cell text-center p-2">{{tag.popularity}}</td> | ||
<td class="delete_cell text-center cursor-pointer text-center p-2"> | ||
<i class="fa fa-trash p-2 bg-red-500 mr-4 rounded-full cursor-pointer" id="" | ||
hx-confirm="{{_('delete_tag_prompt')}}" | ||
hx-trigger="click" | ||
hx-delete="/tags/delete/{{tag.name}}" | ||
hx-swap="none" | ||
_="on htmx:afterRequest if detail.xhr.status == 200 then window.location.reload()"></i> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% if next_page_token %} | ||
<button id="next_page_btn" data-page_token="{{next_page_token}}" class="green-btn mt-4">Next page »</button> | ||
{% endif %} | ||
</div> | ||
{% endblock %} |
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 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 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 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 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 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 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 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
Oops, something went wrong.