Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit 2e8ccd6

Browse files
committed
Fix to Additional Quotes Missing Hide/Report Buttons
1 parent 440c721 commit 2e8ccd6

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

quotefault/templates/bootstrap/additional_quotes.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,58 @@
2121
Submitted by <a
2222
href="https://profiles.csh.rit.edu/user/{{ quote.submitter }}">{{ get_display_name(quote.submitter) }}</a>
2323
on {{ quote.quote_time.strftime('%Y-%m-%d %H:%M:%S') }}
24+
25+
<button type="button" class="btn btn-danger btn-sm float-right" onclick="report({{quote.id}})" id="report_button_{{quote.id}}">Report</button>
26+
<div class="modal" id="report_{{quote.id}}">
27+
<div class="modal-dialog" role="document">
28+
<div class="modal-content">
29+
<div class="modal-header">
30+
<h5 class="modal-title">Report Quote</h5>
31+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
32+
aria-hidden="true">&times;</span>
33+
</button>
34+
</div>
35+
<div class="modal-body">
36+
<p>Are you sure you want to report this quote?</p>
37+
</div>
38+
<div class="modal-footer">
39+
<!-- TODO: Probably should not be using form and buttons and rather be using input. -->
40+
<!-- <a class="btn btn-primary btn-sm" href="/report/{{quote.id}}" id="report::{{quote.id}}" type="button btn-danger">Yes</a> -->
41+
<form method="POST" action="/report/{{quote.id}}" id="report::{{quote.id}}" method="POST">
42+
<button type="submit" class="btn btn-danger">Yes</button>
43+
</form>
44+
<button type="button" class="btn btn-success" onclck="reportClose({{quote.id}})" id="report_close_{{quote.id}}">No
45+
</button>
46+
</div>
47+
</div>
48+
</div>
49+
</div>
50+
{% if metadata['uid'] == quote.submitter or metadata['uid'] == quote.speaker or metadata['is_admin'] %}
51+
<button type="button" class="btn btn-warning btn-sm float-right" onclick="hide({{quote.id}})" id="hide_button_{{quote.id}}">Hide</button>
52+
<div class="modal" id="hide_{{quote.id}}">
53+
<div class="modal-dialog" role="document">
54+
<div class="modal-content">
55+
<div class="modal-header">
56+
<h5 class="modal-title">Hide Quote</h5>
57+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
58+
aria-hidden="true">&times;</span>
59+
</button>
60+
</div>
61+
<div class="modal-body">
62+
<p>Are you sure you want to hide this quote?</p>
63+
</div>
64+
<div class="modal-footer">
65+
<!-- TODO: Probably should not be using form and buttons and rather be using input. -->
66+
<!-- <a class="btn btn-primary btn-sm" href="/report/{{quote.id}}" id="report::{{quote.id}}" type="button btn-danger">Yes</a> -->
67+
<form method="POST" action="/hide/{{quote.id}}" id="hide::{{quote.id}}" method="POST">
68+
<button type="submit" class="btn btn-danger">Yes</button>
69+
</form>
70+
<button type="button" class="btn btn-success" onclick="hideClose({{quote.id}})" id="hide_close_{{quote.id}}">No</button>
71+
</div>
72+
</div>
73+
</div>
74+
</div>
75+
{% endif %}
2476
</div>
2577
</div>
2678
{% endfor %}

0 commit comments

Comments
 (0)