source: tagsplugin/trunk/tractags/templates/admin_tag_change.html

Last change on this file was 18137, checked in by Cinc-th, 2 years ago

TagsPlugin: change admin template to Jinja2. Some translations are gone unfortunately.

Refs #13993

File size: 3.7 KB
Line 
1{#
2    Copyright (C) 2011-2013 Steffen Hoffmann <hoff.st@web.de>
3    Copyright (C) 2021 Cinc
4
5    This software is licensed as described in the file COPYING, which
6    you should have received as part of this distribution.
7#}
8# extends 'admin.html'
9<!DOCTYPE html>
10<html>
11  <head>
12    <title>
13      # block admintitle
14      ${_("Tags")}
15      # endblock
16    </title>
17    # block head
18    ${ super() }
19    # endblock
20  </head>
21  <body>
22  # block adminpanel
23  <div>
24    <h2>${_("Manage Tags")}</h2>
25     <form id="filter" method="get" action="">
26       <fieldset id="filters">
27         <legend>${_("Filters")}</legend>
28         <table summary="Tag filters">
29           <th scope="row">${_("Realms")}</th>
30           <td class="filter">
31             # for realm in tag_realms:
32             <label class="control">
33               <input type="checkbox" name="${realm.name}"
34                      checked="${realm.checked or None}"/> ${realm.name}
35             </label>
36             # endfor
37           </td>
38           <td>
39             <div class="inlinebuttons">
40               <input type="submit" name="update" value="${_('Update')}" />
41             </div>
42           </td>
43         </table>
44       </fieldset>
45     </form>
46
47    <form id="tagchange" class="mod" method="post" action="">
48      ${jmacros.form_token_input()}
49      <fieldset>
50        <legend>${_("Replace")}</legend>
51        <p>
52          # trans
53          Select an existing tag to replace with another one;
54          two or more to consolidate into one. The <em>required</em> new tag
55          may actually be an existing tag or a new one. A change comment will
56          be added if supported by the tag storage for the resource's realm.
57          # endtrans
58        </p>
59        <div class="field">
60          <label>${_("Current Tag:")}<br />
61            <select name="tag_name" size="7" multiple="true" >
62              # for tag in tags:
63              <option value="${tag}" class="textwidget"
64                      ${{"selected": tag == selected}|htmlattr}>
65                ${tag}
66              </option>
67              # endfor
68            </select>
69          </label>
70        </div>
71        <div class="field">
72          <label>${_("New Tag:")}<br />
73            <input type="text" name="tag_new_name" /><br />${_("or")}
74            <input type="checkbox" name="allow_delete" value="True" />
75            ${_("allow tag deletion")}
76          </label>
77        </div>
78        <div class="field">
79          <label>${_("Comment (optional):")}<br />
80            <textarea name="comment" class="trac-resizable"
81                      cols="50" rows="3"></textarea>
82          </label>
83          <p class="help" i18n:msg="">
84            # trans
85            <b>Beware:</b> Attempting to replace one or more tags will
86            always add the new tag, but <b>removal could fail</b>
87            for some tags, because tags might be immutable depending
88            on internals of the tag provider they've been derived from.
89            # endtrans
90          </p>
91          <p class="hint" i18n:msg="">
92            # trans
93            You'll need to investigate further on how to change/remove these
94            remaining tags closer to the tagged resource, i.e. in your
95            <code>trac.ini</code> see <code>ticket_fields</code> option
96            that lists fields to expose as tags for tag realm:ticket.
97            # endtrans
98          </p>
99        </div>
100      </fieldset>
101      <div class="buttons">
102        <!--! Preserve previous realm filter selection -->
103        # for realm in checked_realms:
104        <input type="hidden" name="${realm}" value="1" />
105        # endfor
106        <input type="submit" value="${_('Change')}" />
107      </div>
108    </form>
109  </div>
110  # endblock adminpanel
111  </body>
112</html>
Note: See TracBrowser for help on using the repository browser.