blob: 2ef36f3ff9da22d8e1514dfe7458c39935e7e092 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001[define category_css]css/ph_detail.css[end]
2[include "../framework/header.ezt" "showtabs"]
3
4[if-any read_only][include "../framework/read-only-rejection.ezt"]
5[else]
6
7[if-any perms.EditProject]
8 <h4>Default templates</h4>
9 <div class="section" style="padding-top:0">
10 <form action="adminTemplates.do" id="adminTemplates" method="POST">
11 <input type="hidden" name="token" value="[form_token]">
12
13 <div style="margin: 2em 0 1em 0">
14 Default template for project members:
15 <select name="default_template_for_developers" id="default_template_for_developers">
16 [for config.templates]
17 <option value="[config.templates.name]" [is config.templates.template_id config.default_template_for_developers]selected[end]>[config.templates.name]</option>
18 [end]
19 </select>
20 <br><br>
21
22 Default template for non-members:
23 <select name="default_template_for_users" id="default_template_for_users">
24 [for config.templates]
25 [define offer_template_in_users_menu]No[end]
26 [is config.templates.template_id config.default_template_for_users][define offer_template_in_users_menu]Yes[end][end]
27 [if-any config.templates.members_only][else][define offer_template_in_users_menu]Yes[end][end]
28 [is offer_template_in_users_menu "Yes"]
29 <option value="[config.templates.name]" [is config.templates.template_id config.default_template_for_users]selected[end]>[config.templates.name]</option>
30 [end]
31 [end]
32 </select>
33 </div>
34
35 <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit" style="margin-left:0">
36 </form>
37 </div>
38[end]
39
40<h4>Issue templates</h4>
41<div class="section">
42 <table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
43 <tbody>
44 <tr>
45 <th>Name</th>
46 </tr>
47 [if-any config.templates][else]
48 <tr>
49 <td colspan="40">
50 <div style="padding: 3em; text-align: center">
51 This project has not defined any issue templates.
52 </div>
53 </td>
54 </tr>
55 [end]
56 [for config.templates]
57 [if-any config.templates.can_view perms.EditProject]
58 [define detail_url]/p/[projectname]/templates/detail?template=[format "url"][config.templates.name][end][end]
59 <tr data-url="detail_url">
60 <td style="white-space:nowrap" class="id">
61 <a href="[detail_url]">[config.templates.name]</a></td>
62 </td>
63 </tr>
64 [end]
65 [end]
66 </tbody>
67 </table>
68
69 [if-any perms.EditProject]
70 <p><a href="/p/[projectname]/templates/create" class="buttonify primary">Add template</a></p>
71 [end]
72</div>
73
74[end][# end if not read_only]
75
76[include "../framework/footer.ezt"]