source: pullrequestsplugin/trunk/pullrequests/templates/pullrequests.html

Last change on this file was 17486, checked in by lucid, 4 years ago

PullRequestsPlugin: Fix selected options.
Jinja does not remove attributes with value None anymore.
(see #13594)

File size: 2.6 KB
Line 
1# extends 'admin.html'
2<!DOCTYPE html>
3  <head>
4    <title>
5      # block admintitle
6      Pull Requests
7      ${ super() }
8      # endblock admintitle
9    </title>
10  </head>
11
12  <body>
13    # block adminpanel
14    # if view == 'list' and paginator.has_more_pages:
15    <h2>Pull Requests (${paginator.displayed_items()})</h2>
16    # else:
17    <h2>Pull Requests</h2>
18    # endif
19
20    # if view == 'detail':
21    <form class="mod" id="pullrequests_modify" method="post" action="">
22      ${jmacros.form_token_input()}
23      <fieldset>
24        <legend>Modify Pull Request:</legend>
25        <div class="field">
26          <label>Status:
27              <select name="status">
28                  # for status in statuses:
29                  #     if pr.status == status:
30                  <option value="${status}" selected>${status}</option>
31                  #     else:
32                  <option value="${status}">${status}</option>
33                  #     endif
34                  # endfor
35              </select>
36            </label>
37        </div>
38        <div class="buttons">
39          <input type="submit" name="save" class="trac-disable-on-submit" value="${_('Save')}"/>
40          <input type="submit" name="cancel" value="${_('Cancel')}" />
41        </div>
42      </fieldset>
43    </form>
44    # else:
45    <form id="prefs" method="get" action="">
46      <fieldset>
47        <div class="field">
48          <label>Max items per page:
49            <input type="text" name="max" size="10" value="${max_per_page}" />
50          </label>
51        </div>
52        <div class="buttons">
53          <input type="submit" name="update" class="trac-disable-on-submit" value="${_('Update')}"/>
54        </div>
55      </fieldset>
56    </form>
57
58    # if paginator.show_index:
59    # include 'page_index.html'
60    # endif
61
62    <table class="listing">
63      <thead>
64        <tr>
65          <th>PR</th><th>Status</th><th>Ticket</th><th>Changes</th><th>Author</th><th>Reviewers</th><th>Opened</th><th>Modified</th>
66        </tr>
67      </thead>
68      <tbody>
69        # for pr in prs:
70        <tr class="${loop.cycle('odd', 'even')}">
71          <td>${pr.id}</td>
72          <td><a href="${panel_href(pr.id)}">${pr.status}</a></td>
73         
74          <td><a href="${href('ticket', pr.ticket) + '#comment:%s' % pr.comment}">#${pr.ticket}</a></td>
75          <td>${format_wikilink(pr)}</td>
76          <td>${pr.author}</td>
77          <td>${pr.reviewers}</td>
78          <td>${format_datetime_utc(pr.opened)}</td>
79          <td>${format_datetime_utc(pr.modified)}</td>
80        </tr>
81        # endfor
82      </tbody>
83    </table>
84
85    # if paginator.show_index:
86    # include 'page_index.html'
87    # endif
88
89    # endif
90
91    # endblock adminpanel
92  </body>
93</html>
Note: See TracBrowser for help on using the repository browser.