]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/packages/editrequest_view.html
Add EditRequest approval and rejection
[cheatdb.git] / app / templates / packages / editrequest_view.html
1 {% extends "base.html" %}
2
3 {% block title %}
4         {{ request.title }} - {{ package.title }}
5 {% endblock %}
6
7 {% block content %}
8         <h1>{{ request.title }} by {{ request.author.display_name }}</h1>
9         <p>
10                 Package: <a href="{{ package.getDetailsURL() }}">{{ package.title }}</a>
11         </p>
12         <p>
13                 {% if request.desc %}
14                         {{ request.desc }}
15                 {% else %}
16                         <i>No description given</i>
17                 {% endif %}
18         </p>
19         {% if request.status == 1 %}
20                 <div class="box box_grey alert alert-success">
21                         This edit request was merged.
22                 </div>
23         {% elif request.status == 2 %}
24                 <div class="box  box_grey alert alert-error">
25                         This edit request was rejected.
26                 </div>
27         {% elif package.checkPerm(current_user, "APPROVE_CHANGES") %}
28                 <div class="box box_grey">
29                         To resolve this request, either
30                         <a href="{{ request.getApproveURL() }}">Approve and Apply</a> or
31                         <a href="{{ request.getRejectURL() }}">Reject</a> it.
32                 </div>
33         {% endif %}
34
35         <table>
36                 <tr>
37                         <th>Property</th>
38                         <th>Old</th>
39                         <th>New</th>
40                 </tr>
41
42                 {% for change in request.changes %}
43                         <tr>
44                                 <td>{{ change.key.value }}</td>
45                                 <td>{{ change.oldValue }}</td>
46                                 <td>{{ change.newValue }}</td>
47                         </tr>
48                 {% endfor %}
49 {% endblock %}