|
21 | 21 | Submitted by <a |
22 | 22 | href="https://profiles.csh.rit.edu/user/{{ quote.submitter }}">{{ get_display_name(quote.submitter) }}</a> |
23 | 23 | 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">×</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">×</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 %} |
24 | 76 | </div> |
25 | 77 | </div> |
26 | 78 | {% endfor %} |
|
0 commit comments