##// END OF EJS Templates
issue-trackers: fixed missing save to get back to inherited settings.
dan -
r4208:9302298e stable
parent child Browse files
Show More
@@ -1,109 +1,113 b''
1 1 <%namespace name="its" file="/base/issue_tracker_settings.mako"/>
2 2
3 3 <div id="repo_issue_tracker" class="${'inherited' if c.settings_model.inherit_global_settings else ''}">
4 4 ${h.secure_form(h.route_path('edit_repo_issuetracker_update', repo_name=c.repo_name), id="inherit-form", request=request)}
5 5 <div class="panel panel-default panel-body">
6 6 <div class="fields">
7 7 <div class="field">
8 8 <div class="label label-checkbox">
9 9 <label for="inherit_default_permissions">${_('Inherit from global settings')}:</label>
10 10 </div>
11 11 <div class="checkboxes">
12 12 ${h.checkbox('inherit_global_issuetracker', value='inherited', checked=c.settings_model.inherit_global_settings)}
13 13 <span class="help-block">
14 14 ${h.literal(_('Select to inherit global patterns for issue tracker.'))}
15 15 </span>
16 16 </div>
17 17 </div>
18 18 </div>
19 19 </div>
20 20
21 21 <div id="inherit_overlay">
22 22 <div class="panel panel-default">
23 23 <div class="panel-heading">
24 24 <h3 class="panel-title">${_('Inherited Issue Tracker Patterns')}</h3>
25 25 </div>
26
26 27 <div class="panel-body">
27 <table class="rctable issuetracker readonly">
28 <tr>
29 <th>${_('Description')}</th>
30 <th>${_('Pattern')}</th>
31 <th>${_('Url')}</th>
32 <th>${_('Prefix')}</th>
33 <th ></th>
34 </tr>
35 %for uid, entry in c.global_patterns.items():
36 <tr id="${uid}">
37 <td class="td-description issuetracker_desc">
38 <span class="entry">
39 ${entry.desc}
40 </span>
41 </td>
42 <td class="td-regex issuetracker_pat">
43 <span class="entry">
44 ${entry.pat}
45 </span>
46 </td>
47 <td class="td-url issuetracker_url">
48 <span class="entry">
49 ${entry.url}
50 </span>
51 </td>
52 <td class="td-prefix issuetracker_pref">
53 <span class="entry">
54 ${entry.pref}
55 </span>
56 </td>
57 <td class="td-action">
58 </td>
59 </tr>
60 %endfor
28 <table class="rctable issuetracker readonly">
29 <tr>
30 <th>${_('Description')}</th>
31 <th>${_('Pattern')}</th>
32 <th>${_('Url')}</th>
33 <th>${_('Prefix')}</th>
34 <th></th>
35 </tr>
61 36
62 </table>
37 % for uid, entry in c.global_patterns.items():
38 <tr id="${uid}">
39 <td class="td-description issuetracker_desc">
40 <span class="entry">
41 ${entry.desc}
42 </span>
43 </td>
44 <td class="td-regex issuetracker_pat">
45 <span class="entry">
46 ${entry.pat}
47 </span>
48 </td>
49 <td class="td-url issuetracker_url">
50 <span class="entry">
51 ${entry.url}
52 </span>
53 </td>
54 <td class="td-prefix issuetracker_pref">
55 <span class="entry">
56 ${entry.pref}
57 </span>
58 </td>
59 <td class="td-action">
60 </td>
61 </tr>
62 % endfor
63
64 </table>
65 <div class="buttons">
66 <button type="submit" class="btn btn-primary save-inheritance" id="save">${_('Save')}</button>
67 </div>
63 68 </div>
64 69 </div>
65 70 </div>
66 71
67 72 <div id="custom_overlay">
68 73 <div class="panel panel-default">
69 74 <div class="panel-heading">
70 75 <h3 class="panel-title">${_('Issue Tracker / Wiki Patterns')}</h3>
71 76 </div>
72 77 <div class="panel-body">
73 78 ${its.issue_tracker_settings_table(
74 79 patterns=c.repo_patterns.items(),
75 80 form_url=h.route_path('edit_repo_issuetracker', repo_name=c.rhodecode_db_repo.repo_name),
76 81 delete_url=h.route_path('edit_repo_issuetracker_delete', repo_name=c.rhodecode_db_repo.repo_name)
77 82 )}
78 83 <div class="buttons">
79 84 <button type="submit" class="btn btn-primary save-inheritance" id="save">${_('Save')}</button>
80 <button type="reset" class="btn reset-inheritance">${_('Reset')}</button>
81 85 </div>
82 86 </div>
83 87 </div>
84 88 </div>
85 89
86 90
87 91 ${h.end_form()}
88 92
89 93 <div class="panel panel-default">
90 94 <div class="panel-heading">
91 95 <h3 class="panel-title">${_('Test Patterns')}</h3>
92 96 </div>
93 97 <div class="panel-body">
94 98 ${its.issue_tracker_new_row()}
95 99 ${its.issue_tracker_settings_test(test_url=h.route_path('edit_repo_issuetracker_test', repo_name=c.rhodecode_db_repo.repo_name))}
96 100 </div>
97 101 </div>
98 102
99 103 </div>
100 104
101 105 <script>
102 106 $('#inherit_global_issuetracker').on('change', function(e){
103 107 $('#repo_issue_tracker').toggleClass('inherited',this.checked);
104 108 });
105 109
106 110 $('.reset-inheritance').on('click', function(e){
107 111 $('#inherit_global_issuetracker').prop('checked', false).change();
108 112 });
109 113 </script>
General Comments 0
You need to be logged in to leave comments. Login now