##// 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 <%namespace name="its" file="/base/issue_tracker_settings.mako"/>
1 <%namespace name="its" file="/base/issue_tracker_settings.mako"/>
2
2
3 <div id="repo_issue_tracker" class="${'inherited' if c.settings_model.inherit_global_settings else ''}">
3 <div id="repo_issue_tracker" class="${'inherited' if c.settings_model.inherit_global_settings else ''}">
4 ${h.secure_form(h.route_path('edit_repo_issuetracker_update', repo_name=c.repo_name), id="inherit-form", request=request)}
4 ${h.secure_form(h.route_path('edit_repo_issuetracker_update', repo_name=c.repo_name), id="inherit-form", request=request)}
5 <div class="panel panel-default panel-body">
5 <div class="panel panel-default panel-body">
6 <div class="fields">
6 <div class="fields">
7 <div class="field">
7 <div class="field">
8 <div class="label label-checkbox">
8 <div class="label label-checkbox">
9 <label for="inherit_default_permissions">${_('Inherit from global settings')}:</label>
9 <label for="inherit_default_permissions">${_('Inherit from global settings')}:</label>
10 </div>
10 </div>
11 <div class="checkboxes">
11 <div class="checkboxes">
12 ${h.checkbox('inherit_global_issuetracker', value='inherited', checked=c.settings_model.inherit_global_settings)}
12 ${h.checkbox('inherit_global_issuetracker', value='inherited', checked=c.settings_model.inherit_global_settings)}
13 <span class="help-block">
13 <span class="help-block">
14 ${h.literal(_('Select to inherit global patterns for issue tracker.'))}
14 ${h.literal(_('Select to inherit global patterns for issue tracker.'))}
15 </span>
15 </span>
16 </div>
16 </div>
17 </div>
17 </div>
18 </div>
18 </div>
19 </div>
19 </div>
20
20
21 <div id="inherit_overlay">
21 <div id="inherit_overlay">
22 <div class="panel panel-default">
22 <div class="panel panel-default">
23 <div class="panel-heading">
23 <div class="panel-heading">
24 <h3 class="panel-title">${_('Inherited Issue Tracker Patterns')}</h3>
24 <h3 class="panel-title">${_('Inherited Issue Tracker Patterns')}</h3>
25 </div>
25 </div>
26
26 <div class="panel-body">
27 <div class="panel-body">
27 <table class="rctable issuetracker readonly">
28 <table class="rctable issuetracker readonly">
28 <tr>
29 <tr>
29 <th>${_('Description')}</th>
30 <th>${_('Description')}</th>
30 <th>${_('Pattern')}</th>
31 <th>${_('Pattern')}</th>
31 <th>${_('Url')}</th>
32 <th>${_('Url')}</th>
32 <th>${_('Prefix')}</th>
33 <th>${_('Prefix')}</th>
33 <th ></th>
34 <th></th>
34 </tr>
35 </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
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 </div>
68 </div>
64 </div>
69 </div>
65 </div>
70 </div>
66
71
67 <div id="custom_overlay">
72 <div id="custom_overlay">
68 <div class="panel panel-default">
73 <div class="panel panel-default">
69 <div class="panel-heading">
74 <div class="panel-heading">
70 <h3 class="panel-title">${_('Issue Tracker / Wiki Patterns')}</h3>
75 <h3 class="panel-title">${_('Issue Tracker / Wiki Patterns')}</h3>
71 </div>
76 </div>
72 <div class="panel-body">
77 <div class="panel-body">
73 ${its.issue_tracker_settings_table(
78 ${its.issue_tracker_settings_table(
74 patterns=c.repo_patterns.items(),
79 patterns=c.repo_patterns.items(),
75 form_url=h.route_path('edit_repo_issuetracker', repo_name=c.rhodecode_db_repo.repo_name),
80 form_url=h.route_path('edit_repo_issuetracker', repo_name=c.rhodecode_db_repo.repo_name),
76 delete_url=h.route_path('edit_repo_issuetracker_delete', repo_name=c.rhodecode_db_repo.repo_name)
81 delete_url=h.route_path('edit_repo_issuetracker_delete', repo_name=c.rhodecode_db_repo.repo_name)
77 )}
82 )}
78 <div class="buttons">
83 <div class="buttons">
79 <button type="submit" class="btn btn-primary save-inheritance" id="save">${_('Save')}</button>
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 </div>
85 </div>
82 </div>
86 </div>
83 </div>
87 </div>
84 </div>
88 </div>
85
89
86
90
87 ${h.end_form()}
91 ${h.end_form()}
88
92
89 <div class="panel panel-default">
93 <div class="panel panel-default">
90 <div class="panel-heading">
94 <div class="panel-heading">
91 <h3 class="panel-title">${_('Test Patterns')}</h3>
95 <h3 class="panel-title">${_('Test Patterns')}</h3>
92 </div>
96 </div>
93 <div class="panel-body">
97 <div class="panel-body">
94 ${its.issue_tracker_new_row()}
98 ${its.issue_tracker_new_row()}
95 ${its.issue_tracker_settings_test(test_url=h.route_path('edit_repo_issuetracker_test', repo_name=c.rhodecode_db_repo.repo_name))}
99 ${its.issue_tracker_settings_test(test_url=h.route_path('edit_repo_issuetracker_test', repo_name=c.rhodecode_db_repo.repo_name))}
96 </div>
100 </div>
97 </div>
101 </div>
98
102
99 </div>
103 </div>
100
104
101 <script>
105 <script>
102 $('#inherit_global_issuetracker').on('change', function(e){
106 $('#inherit_global_issuetracker').on('change', function(e){
103 $('#repo_issue_tracker').toggleClass('inherited',this.checked);
107 $('#repo_issue_tracker').toggleClass('inherited',this.checked);
104 });
108 });
105
109
106 $('.reset-inheritance').on('click', function(e){
110 $('.reset-inheritance').on('click', function(e){
107 $('#inherit_global_issuetracker').prop('checked', false).change();
111 $('#inherit_global_issuetracker').prop('checked', false).change();
108 });
112 });
109 </script>
113 </script>
General Comments 0
You need to be logged in to leave comments. Login now