Show More
@@ -1,64 +1,65 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | elems = [ |
|
5 | (_('Repository Group ID'), c.repo_group.group_id, '', ''), | |
|
5 | 6 | (_('Owner'), lambda:base.gravatar_with_user(c.repo_group.user.email), '', ''), |
|
6 | 7 | (_('Created on'), h.format_date(c.repo_group.created_on), '', ''), |
|
7 | 8 | (_('Is Personal Group'), c.repo_group.personal or False, '', ''), |
|
8 | 9 | |
|
9 | 10 | (_('Total repositories'), c.repo_group.repositories_recursive_count, '', ''), |
|
10 | 11 | (_('Top level repositories'), c.repo_group.repositories.count(), '', c.repo_group.repositories.all()), |
|
11 | 12 | |
|
12 | 13 | (_('Children groups'), c.repo_group.children.count(), '', c.repo_group.children.all()), |
|
13 | 14 | ] |
|
14 | 15 | %> |
|
15 | 16 | |
|
16 | 17 | <div class="panel panel-default"> |
|
17 | 18 | <div class="panel-heading"> |
|
18 | 19 | <h3 class="panel-title">${_('Repository Group: %s') % c.repo_group.group_name}</h3> |
|
19 | 20 | </div> |
|
20 | 21 | <div class="panel-body"> |
|
21 | 22 | ${base.dt_info_panel(elems)} |
|
22 | 23 | </div> |
|
23 | 24 | |
|
24 | 25 | </div> |
|
25 | 26 | |
|
26 | 27 | <div class="panel panel-danger"> |
|
27 | 28 | <div class="panel-heading"> |
|
28 | 29 | <h3 class="panel-title">${_('Delete repository group')}</h3> |
|
29 | 30 | </div> |
|
30 | 31 | <div class="panel-body"> |
|
31 | 32 | ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=c.repo_group.group_name), request=request)} |
|
32 | 33 | <table class="display"> |
|
33 | 34 | |
|
34 | 35 | <tr> |
|
35 | 36 | <td> |
|
36 | 37 | ${_ungettext('This repository group includes %s children repository group.', 'This repository group includes %s children repository groups.', c.repo_group.children.count()) % c.repo_group.children.count()} |
|
37 | 38 | </td> |
|
38 | 39 | <td> |
|
39 | 40 | </td> |
|
40 | 41 | <td> |
|
41 | 42 | </td> |
|
42 | 43 | </tr> |
|
43 | 44 | <tr> |
|
44 | 45 | <td> |
|
45 | 46 | ${_ungettext('This repository group includes %s repository.', 'This repository group includes %s repositories.', c.repo_group.repositories_recursive_count) % c.repo_group.repositories_recursive_count} |
|
46 | 47 | </td> |
|
47 | 48 | <td> |
|
48 | 49 | </td> |
|
49 | 50 | <td> |
|
50 | 51 | </td> |
|
51 | 52 | </tr> |
|
52 | 53 | |
|
53 | 54 | </table> |
|
54 | 55 | <div style="margin: 0 0 20px 0" class="fake-space"></div> |
|
55 | 56 | |
|
56 | 57 | <button class="btn btn-small btn-danger" type="submit" |
|
57 | 58 | onclick="return confirm('${_('Confirm to delete this group: %s') % (c.repo_group.group_name)}');"> |
|
58 | 59 | ${_('Delete this repository group')} |
|
59 | 60 | </button> |
|
60 | 61 | ${h.end_form()} |
|
61 | 62 | </div> |
|
62 | 63 | </div> |
|
63 | 64 | |
|
64 | 65 |
@@ -1,254 +1,255 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | elems = [ |
|
5 | (_('Repository ID'), c.rhodecode_db_repo.repo_id, '', ''), | |
|
5 | 6 | (_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''), |
|
6 | 7 | (_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''), |
|
7 | 8 | (_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''), |
|
8 | 9 | (_('Cached Commit id'), lambda: h.link_to(c.rhodecode_db_repo.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.changeset_cache.get('raw_id'))), '', ''), |
|
9 | 10 | (_('Attached scoped tokens'), len(c.rhodecode_db_repo.scoped_tokens), '', [x.user for x in c.rhodecode_db_repo.scoped_tokens]), |
|
10 | 11 | (_('Pull requests source'), len(c.rhodecode_db_repo.pull_requests_source), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.source_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_source]), |
|
11 | 12 | (_('Pull requests target'), len(c.rhodecode_db_repo.pull_requests_target), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.target_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_target]), |
|
12 | 13 | ] |
|
13 | 14 | %> |
|
14 | 15 | |
|
15 | 16 | <div class="panel panel-default"> |
|
16 | 17 | <div class="panel-heading" id="advanced-info" > |
|
17 | 18 | <h3 class="panel-title">${_('Repository: %s') % c.rhodecode_db_repo.repo_name} <a class="permalink" href="#advanced-info"> ΒΆ</a></h3> |
|
18 | 19 | </div> |
|
19 | 20 | <div class="panel-body"> |
|
20 | 21 | ${base.dt_info_panel(elems)} |
|
21 | 22 | </div> |
|
22 | 23 | </div> |
|
23 | 24 | |
|
24 | 25 | |
|
25 | 26 | <div class="panel panel-default"> |
|
26 | 27 | <div class="panel-heading" id="advanced-fork"> |
|
27 | 28 | <h3 class="panel-title">${_('Fork Reference')} <a class="permalink" href="#advanced-fork"> ΒΆ</a></h3> |
|
28 | 29 | </div> |
|
29 | 30 | <div class="panel-body"> |
|
30 | 31 | ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), request=request)} |
|
31 | 32 | |
|
32 | 33 | % if c.rhodecode_db_repo.fork: |
|
33 | 34 | <div class="panel-body-title-text">${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.rhodecode_db_repo.fork.repo_name, h.route_path('repo_summary', repo_name=c.rhodecode_db_repo.fork.repo_name))})} |
|
34 | 35 | | <button class="btn btn-link btn-danger" type="submit">Remove fork reference</button></div> |
|
35 | 36 | % endif |
|
36 | 37 | |
|
37 | 38 | <div class="field"> |
|
38 | 39 | ${h.hidden('id_fork_of')} |
|
39 | 40 | ${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)} |
|
40 | 41 | </div> |
|
41 | 42 | <div class="field"> |
|
42 | 43 | <span class="help-block">${_('Manually set this repository as a fork of another from the list')}</span> |
|
43 | 44 | </div> |
|
44 | 45 | ${h.end_form()} |
|
45 | 46 | </div> |
|
46 | 47 | </div> |
|
47 | 48 | |
|
48 | 49 | |
|
49 | 50 | <div class="panel panel-default"> |
|
50 | 51 | <div class="panel-heading" id="advanced-journal"> |
|
51 | 52 | <h3 class="panel-title">${_('Public Journal Visibility')} <a class="permalink" href="#advanced-journal"> ΒΆ</a></h3> |
|
52 | 53 | </div> |
|
53 | 54 | <div class="panel-body"> |
|
54 | 55 | ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), request=request)} |
|
55 | 56 | <div class="field"> |
|
56 | 57 | %if c.in_public_journal: |
|
57 | 58 | <button class="btn btn-small" type="submit"> |
|
58 | 59 | ${_('Remove from Public Journal')} |
|
59 | 60 | </button> |
|
60 | 61 | %else: |
|
61 | 62 | <button class="btn btn-small" type="submit"> |
|
62 | 63 | ${_('Add to Public Journal')} |
|
63 | 64 | </button> |
|
64 | 65 | %endif |
|
65 | 66 | </div> |
|
66 | 67 | <div class="field" > |
|
67 | 68 | <span class="help-block">${_('All actions made on this repository will be visible to everyone following the public journal.')}</span> |
|
68 | 69 | </div> |
|
69 | 70 | ${h.end_form()} |
|
70 | 71 | </div> |
|
71 | 72 | </div> |
|
72 | 73 | |
|
73 | 74 | |
|
74 | 75 | <div class="panel panel-default"> |
|
75 | 76 | <div class="panel-heading" id="advanced-locking"> |
|
76 | 77 | <h3 class="panel-title">${_('Locking state')} <a class="permalink" href="#advanced-locking"> ΒΆ</a></h3> |
|
77 | 78 | </div> |
|
78 | 79 | <div class="panel-body"> |
|
79 | 80 | ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), request=request)} |
|
80 | 81 | |
|
81 | 82 | %if c.rhodecode_db_repo.locked[0]: |
|
82 | 83 | <div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]), |
|
83 | 84 | h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}</div> |
|
84 | 85 | %else: |
|
85 | 86 | <div class="panel-body-title-text">${_('This Repository is not currently locked.')}</div> |
|
86 | 87 | %endif |
|
87 | 88 | |
|
88 | 89 | <div class="field" > |
|
89 | 90 | %if c.rhodecode_db_repo.locked[0]: |
|
90 | 91 | ${h.hidden('set_unlock', '1')} |
|
91 | 92 | <button class="btn btn-small" type="submit" |
|
92 | 93 | onclick="return confirm('${_('Confirm to unlock repository.')}');"> |
|
93 | 94 | <i class="icon-unlock"></i> |
|
94 | 95 | ${_('Unlock repository')} |
|
95 | 96 | </button> |
|
96 | 97 | %else: |
|
97 | 98 | ${h.hidden('set_lock', '1')} |
|
98 | 99 | <button class="btn btn-small" type="submit" |
|
99 | 100 | onclick="return confirm('${_('Confirm to lock repository.')}');"> |
|
100 | 101 | <i class="icon-lock"></i> |
|
101 | 102 | ${_('Lock repository')} |
|
102 | 103 | </button> |
|
103 | 104 | %endif |
|
104 | 105 | </div> |
|
105 | 106 | <div class="field" > |
|
106 | 107 | <span class="help-block"> |
|
107 | 108 | ${_('Force repository locking. This only works when anonymous access is disabled. Pulling from the repository locks the repository to that user until the same user pushes to that repository again.')} |
|
108 | 109 | </span> |
|
109 | 110 | </div> |
|
110 | 111 | ${h.end_form()} |
|
111 | 112 | </div> |
|
112 | 113 | </div> |
|
113 | 114 | |
|
114 | 115 | |
|
115 | 116 | <div class="panel panel-warning"> |
|
116 | 117 | <div class="panel-heading" id="advanced-archive"> |
|
117 | 118 | <h3 class="panel-title">${_('Archive repository')} <a class="permalink" href="#advanced-archive"> ΒΆ</a></h3> |
|
118 | 119 | </div> |
|
119 | 120 | <div class="panel-body"> |
|
120 | 121 | ${h.secure_form(h.route_path('edit_repo_advanced_archive', repo_name=c.repo_name), request=request)} |
|
121 | 122 | |
|
122 | 123 | <div style="margin: 0 0 20px 0" class="fake-space"></div> |
|
123 | 124 | |
|
124 | 125 | <div class="field"> |
|
125 | 126 | <button class="btn btn-small btn-danger" type="submit" |
|
126 | 127 | onclick="return confirm('${_('Confirm to archive this repository: %s') % c.repo_name}');"> |
|
127 | 128 | <i class="icon-remove-sign"></i> |
|
128 | 129 | ${_('Archive this repository')} |
|
129 | 130 | </button> |
|
130 | 131 | </div> |
|
131 | 132 | <div class="field"> |
|
132 | 133 | <span class="help-block"> |
|
133 | 134 | ${_('Archiving the repository will make it entirely read-only. The repository cannot be committed to.' |
|
134 | 135 | 'It is hidden from the search results and dashboard. ')} |
|
135 | 136 | </span> |
|
136 | 137 | </div> |
|
137 | 138 | |
|
138 | 139 | ${h.end_form()} |
|
139 | 140 | </div> |
|
140 | 141 | </div> |
|
141 | 142 | |
|
142 | 143 | |
|
143 | 144 | <div class="panel panel-danger"> |
|
144 | 145 | <div class="panel-heading" id="advanced-delete"> |
|
145 | 146 | <h3 class="panel-title">${_('Delete repository')} <a class="permalink" href="#advanced-delete"> ΒΆ</a></h3> |
|
146 | 147 | </div> |
|
147 | 148 | <div class="panel-body"> |
|
148 | 149 | ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=c.repo_name), request=request)} |
|
149 | 150 | <table class="display"> |
|
150 | 151 | <tr> |
|
151 | 152 | <td> |
|
152 | 153 | ${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.rhodecode_db_repo.forks.count()) % c.rhodecode_db_repo.forks.count()} |
|
153 | 154 | </td> |
|
154 | 155 | <td> |
|
155 | 156 | %if c.rhodecode_db_repo.forks.count(): |
|
156 | 157 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
157 | 158 | %endif |
|
158 | 159 | </td> |
|
159 | 160 | <td> |
|
160 | 161 | %if c.rhodecode_db_repo.forks.count(): |
|
161 | 162 | <input type="radio" name="forks" value="delete_forks"/> <label for="forks">${_('Delete forks')}</label> |
|
162 | 163 | %endif |
|
163 | 164 | </td> |
|
164 | 165 | </tr> |
|
165 | 166 | <% attached_prs = len(c.rhodecode_db_repo.pull_requests_source + c.rhodecode_db_repo.pull_requests_target) %> |
|
166 | 167 | % if c.rhodecode_db_repo.pull_requests_source or c.rhodecode_db_repo.pull_requests_target: |
|
167 | 168 | <tr> |
|
168 | 169 | <td> |
|
169 | 170 | ${_ungettext('This repository has %s attached pull request.', 'This repository has %s attached pull requests.', attached_prs) % attached_prs} |
|
170 | 171 | <br/> |
|
171 | 172 | ${_('Consider to archive this repository instead.')} |
|
172 | 173 | </td> |
|
173 | 174 | <td></td> |
|
174 | 175 | <td></td> |
|
175 | 176 | </tr> |
|
176 | 177 | % endif |
|
177 | 178 | </table> |
|
178 | 179 | <div style="margin: 0 0 20px 0" class="fake-space"></div> |
|
179 | 180 | |
|
180 | 181 | <div class="field"> |
|
181 | 182 | <button class="btn btn-small btn-danger" type="submit" |
|
182 | 183 | onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');"> |
|
183 | 184 | <i class="icon-remove-sign"></i> |
|
184 | 185 | ${_('Delete this repository')} |
|
185 | 186 | </button> |
|
186 | 187 | </div> |
|
187 | 188 | <div class="field"> |
|
188 | 189 | <span class="help-block"> |
|
189 | 190 | ${_('This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command available in rhodecode-tools.')} |
|
190 | 191 | </span> |
|
191 | 192 | </div> |
|
192 | 193 | |
|
193 | 194 | ${h.end_form()} |
|
194 | 195 | </div> |
|
195 | 196 | </div> |
|
196 | 197 | |
|
197 | 198 | |
|
198 | 199 | <script> |
|
199 | 200 | |
|
200 | 201 | var currentRepoId = ${c.rhodecode_db_repo.repo_id}; |
|
201 | 202 | |
|
202 | 203 | var repoTypeFilter = function(data) { |
|
203 | 204 | var results = []; |
|
204 | 205 | |
|
205 | 206 | if (!data.results[0]) { |
|
206 | 207 | return data |
|
207 | 208 | } |
|
208 | 209 | |
|
209 | 210 | $.each(data.results[0].children, function() { |
|
210 | 211 | // filter out the SAME repo, it cannot be used as fork of itself |
|
211 | 212 | if (this.repo_id != currentRepoId) { |
|
212 | 213 | this.id = this.repo_id; |
|
213 | 214 | results.push(this) |
|
214 | 215 | } |
|
215 | 216 | }); |
|
216 | 217 | data.results[0].children = results; |
|
217 | 218 | return data; |
|
218 | 219 | }; |
|
219 | 220 | |
|
220 | 221 | $("#id_fork_of").select2({ |
|
221 | 222 | cachedDataSource: {}, |
|
222 | 223 | minimumInputLength: 2, |
|
223 | 224 | placeholder: "${_('Change repository') if c.rhodecode_db_repo.fork else _('Pick repository')}", |
|
224 | 225 | dropdownAutoWidth: true, |
|
225 | 226 | containerCssClass: "drop-menu", |
|
226 | 227 | dropdownCssClass: "drop-menu-dropdown", |
|
227 | 228 | formatResult: formatRepoResult, |
|
228 | 229 | query: $.debounce(250, function(query){ |
|
229 | 230 | self = this; |
|
230 | 231 | var cacheKey = query.term; |
|
231 | 232 | var cachedData = self.cachedDataSource[cacheKey]; |
|
232 | 233 | |
|
233 | 234 | if (cachedData) { |
|
234 | 235 | query.callback({results: cachedData.results}); |
|
235 | 236 | } else { |
|
236 | 237 | $.ajax({ |
|
237 | 238 | url: pyroutes.url('repo_list_data'), |
|
238 | 239 | data: {'query': query.term, repo_type: '${c.rhodecode_db_repo.repo_type}'}, |
|
239 | 240 | dataType: 'json', |
|
240 | 241 | type: 'GET', |
|
241 | 242 | success: function(data) { |
|
242 | 243 | data = repoTypeFilter(data); |
|
243 | 244 | self.cachedDataSource[cacheKey] = data; |
|
244 | 245 | query.callback({results: data.results}); |
|
245 | 246 | }, |
|
246 | 247 | error: function(data, textStatus, errorThrown) { |
|
247 | 248 | alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText)); |
|
248 | 249 | } |
|
249 | 250 | }) |
|
250 | 251 | } |
|
251 | 252 | }) |
|
252 | 253 | }); |
|
253 | 254 | </script> |
|
254 | 255 |
@@ -1,84 +1,85 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | elems = [ |
|
5 | (_('User Group ID'), c.user_group.users_group_id, '', ''), | |
|
5 | 6 | (_('Owner'), lambda:base.gravatar_with_user(c.user_group.user.email), '', ''), |
|
6 | 7 | (_('Created on'), h.format_date(c.user_group.created_on), '', '',), |
|
7 | 8 | |
|
8 | 9 | (_('Members'), len(c.group_members_obj),'', [x for x in c.group_members_obj]), |
|
9 | 10 | (_('Automatic member sync'), 'Yes' if c.user_group.group_data.get('extern_type') else 'No', '', '',), |
|
10 | 11 | |
|
11 | 12 | (_('Assigned to repositories'), len(c.group_to_repos),'', [x for x in c.group_to_repos]), |
|
12 | 13 | (_('Assigned to repo groups'), len(c.group_to_repo_groups), '', [x for x in c.group_to_repo_groups]), |
|
13 | 14 | |
|
14 | 15 | (_('Assigned to review rules'), len(c.group_to_review_rules), '', [x for x in c.group_to_review_rules]), |
|
15 | 16 | ] |
|
16 | 17 | %> |
|
17 | 18 | |
|
18 | 19 | <div class="panel panel-default"> |
|
19 | 20 | <div class="panel-heading"> |
|
20 | 21 | <h3 class="panel-title">${_('User Group: %s') % c.user_group.users_group_name}</h3> |
|
21 | 22 | </div> |
|
22 | 23 | <div class="panel-body"> |
|
23 | 24 | ${base.dt_info_panel(elems)} |
|
24 | 25 | </div> |
|
25 | 26 | |
|
26 | 27 | </div> |
|
27 | 28 | |
|
28 | 29 | <div class="panel panel-default"> |
|
29 | 30 | <div class="panel-heading"> |
|
30 | 31 | <h3 class="panel-title">${_('Group members sync')}</h3> |
|
31 | 32 | </div> |
|
32 | 33 | <div class="panel-body"> |
|
33 | 34 | <% sync_type = c.user_group.group_data.get('extern_type') %> |
|
34 | 35 | |
|
35 | 36 | % if sync_type: |
|
36 | 37 | <p> |
|
37 | 38 | ${_('This group is set to be automatically synchronised.')}<br/> |
|
38 | 39 | ${_('This group synchronization was set by')}: <strong>${sync_type}</strong> |
|
39 | 40 | </p> |
|
40 | 41 | % else: |
|
41 | 42 | <p> |
|
42 | 43 | ${_('This group is not set to be automatically synchronised')} |
|
43 | 44 | </p> |
|
44 | 45 | % endif |
|
45 | 46 | |
|
46 | 47 | <div> |
|
47 | 48 | ${h.secure_form(h.route_path('edit_user_group_advanced_sync', user_group_id=c.user_group.users_group_id), request=request)} |
|
48 | 49 | <div class="field"> |
|
49 | 50 | <button class="btn btn-default" type="submit"> |
|
50 | 51 | %if sync_type: |
|
51 | 52 | ${_('Disable synchronization')} |
|
52 | 53 | %else: |
|
53 | 54 | ${_('Enable synchronization')} |
|
54 | 55 | %endif |
|
55 | 56 | </button> |
|
56 | 57 | </div> |
|
57 | 58 | <div class="field"> |
|
58 | 59 | <span class="help-block"> |
|
59 | 60 | ${_('Users will be added or removed from this group when they authenticate with RhodeCode system, based on LDAP group membership. ' |
|
60 | 61 | 'This requires `LDAP+User group` authentication plugin to be configured and enabled. (EE only feature)')} |
|
61 | 62 | </span> |
|
62 | 63 | </div> |
|
63 | 64 | ${h.end_form()} |
|
64 | 65 | </div> |
|
65 | 66 | |
|
66 | 67 | </div> |
|
67 | 68 | </div> |
|
68 | 69 | |
|
69 | 70 | |
|
70 | 71 | <div class="panel panel-danger"> |
|
71 | 72 | <div class="panel-heading"> |
|
72 | 73 | <h3 class="panel-title">${_('Delete User Group')}</h3> |
|
73 | 74 | </div> |
|
74 | 75 | <div class="panel-body"> |
|
75 | 76 | ${h.secure_form(h.route_path('user_groups_delete', user_group_id=c.user_group.users_group_id), request=request)} |
|
76 | 77 | ${h.hidden('force', 1)} |
|
77 | 78 | <button class="btn btn-small btn-danger" type="submit" |
|
78 | 79 | onclick="return confirm('${_('Confirm to delete user group `%(ugroup)s` with all permission assignments') % {'ugroup': c.user_group.users_group_name}}');"> |
|
79 | 80 | <i class="icon-remove-sign"></i> |
|
80 | 81 | ${_('Delete This User Group')} |
|
81 | 82 | </button> |
|
82 | 83 | ${h.end_form()} |
|
83 | 84 | </div> |
|
84 | 85 | </div> |
@@ -1,161 +1,162 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | elems = [ |
|
5 | (_('User ID'), c.user.user_id, '', ''), | |
|
5 | 6 | (_('Created on'), h.format_date(c.user.created_on), '', ''), |
|
6 | 7 | (_('Source of Record'), c.user.extern_type, '', ''), |
|
7 | 8 | |
|
8 | 9 | (_('Last login'), c.user.last_login or '-', '', ''), |
|
9 | 10 | (_('Last activity'), c.user.last_activity, '', ''), |
|
10 | 11 | |
|
11 | 12 | (_('Repositories'), len(c.user.repositories), '', [x.repo_name for x in c.user.repositories]), |
|
12 | 13 | (_('Repository groups'), len(c.user.repository_groups), '', [x.group_name for x in c.user.repository_groups]), |
|
13 | 14 | (_('User groups'), len(c.user.user_groups), '', [x.users_group_name for x in c.user.user_groups]), |
|
14 | 15 | |
|
15 | 16 | (_('Reviewer of pull requests'), len(c.user.reviewer_pull_requests), '', ['Pull Request #{}'.format(x.pull_request.pull_request_id) for x in c.user.reviewer_pull_requests]), |
|
16 | 17 | (_('Assigned to review rules'), len(c.user_to_review_rules), '', [x for x in c.user_to_review_rules]), |
|
17 | 18 | |
|
18 | 19 | (_('Member of User groups'), len(c.user.group_member), '', [x.users_group.users_group_name for x in c.user.group_member]), |
|
19 | 20 | (_('Force password change'), c.user.user_data.get('force_password_change', 'False'), '', ''), |
|
20 | 21 | ] |
|
21 | 22 | %> |
|
22 | 23 | |
|
23 | 24 | <div class="panel panel-default"> |
|
24 | 25 | <div class="panel-heading"> |
|
25 | 26 | <h3 class="panel-title">${_('User: %s') % c.user.username}</h3> |
|
26 | 27 | </div> |
|
27 | 28 | <div class="panel-body"> |
|
28 | 29 | ${base.dt_info_panel(elems)} |
|
29 | 30 | </div> |
|
30 | 31 | </div> |
|
31 | 32 | |
|
32 | 33 | <div class="panel panel-default"> |
|
33 | 34 | <div class="panel-heading"> |
|
34 | 35 | <h3 class="panel-title">${_('Force Password Reset')}</h3> |
|
35 | 36 | </div> |
|
36 | 37 | <div class="panel-body"> |
|
37 | 38 | ${h.secure_form(h.route_path('user_force_password_reset', user_id=c.user.user_id), request=request)} |
|
38 | 39 | <div class="field"> |
|
39 | 40 | <button class="btn btn-default" type="submit"> |
|
40 | 41 | <i class="icon-lock"></i> |
|
41 | 42 | %if c.user.user_data.get('force_password_change'): |
|
42 | 43 | ${_('Disable forced password reset')} |
|
43 | 44 | %else: |
|
44 | 45 | ${_('Enable forced password reset')} |
|
45 | 46 | %endif |
|
46 | 47 | </button> |
|
47 | 48 | </div> |
|
48 | 49 | <div class="field"> |
|
49 | 50 | <span class="help-block"> |
|
50 | 51 | ${_("When this is enabled user will have to change they password when they next use RhodeCode system. This will also forbid vcs operations until someone makes a password change in the web interface")} |
|
51 | 52 | </span> |
|
52 | 53 | </div> |
|
53 | 54 | ${h.end_form()} |
|
54 | 55 | </div> |
|
55 | 56 | </div> |
|
56 | 57 | |
|
57 | 58 | <div class="panel panel-default"> |
|
58 | 59 | <div class="panel-heading"> |
|
59 | 60 | <h3 class="panel-title">${_('Personal Repository Group')}</h3> |
|
60 | 61 | </div> |
|
61 | 62 | <div class="panel-body"> |
|
62 | 63 | ${h.secure_form(h.route_path('user_create_personal_repo_group', user_id=c.user.user_id), request=request)} |
|
63 | 64 | |
|
64 | 65 | %if c.personal_repo_group: |
|
65 | 66 | <div class="panel-body-title-text">${_('Users personal repository group')} : ${h.link_to(c.personal_repo_group.group_name, h.route_path('repo_group_home', repo_group_name=c.personal_repo_group.group_name))}</div> |
|
66 | 67 | %else: |
|
67 | 68 | <div class="panel-body-title-text"> |
|
68 | 69 | ${_('This user currently does not have a personal repository group')} |
|
69 | 70 | <br/> |
|
70 | 71 | ${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}} |
|
71 | 72 | </div> |
|
72 | 73 | %endif |
|
73 | 74 | <button class="btn btn-default" type="submit" ${'disabled="disabled"' if c.personal_repo_group else ''}> |
|
74 | 75 | <i class="icon-folder-close"></i> |
|
75 | 76 | ${_('Create personal repository group')} |
|
76 | 77 | </button> |
|
77 | 78 | ${h.end_form()} |
|
78 | 79 | </div> |
|
79 | 80 | </div> |
|
80 | 81 | |
|
81 | 82 | |
|
82 | 83 | <div class="panel panel-danger"> |
|
83 | 84 | <div class="panel-heading"> |
|
84 | 85 | <h3 class="panel-title">${_('Delete User')}</h3> |
|
85 | 86 | </div> |
|
86 | 87 | <div class="panel-body"> |
|
87 | 88 | ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)} |
|
88 | 89 | |
|
89 | 90 | <table class="display"> |
|
90 | 91 | <tr> |
|
91 | 92 | <td> |
|
92 | 93 | ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)} |
|
93 | 94 | </td> |
|
94 | 95 | <td> |
|
95 | 96 | %if len(c.user.repositories) > 0: |
|
96 | 97 | <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked"/> <label for="user_repos_1">${_('Detach repositories')}</label> |
|
97 | 98 | %endif |
|
98 | 99 | </td> |
|
99 | 100 | <td> |
|
100 | 101 | %if len(c.user.repositories) > 0: |
|
101 | 102 | <input type="radio" id="user_repos_2" name="user_repos" value="delete" /> <label for="user_repos_2">${_('Delete repositories')}</label> |
|
102 | 103 | %endif |
|
103 | 104 | </td> |
|
104 | 105 | </tr> |
|
105 | 106 | |
|
106 | 107 | <tr> |
|
107 | 108 | <td> |
|
108 | 109 | ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)} |
|
109 | 110 | </td> |
|
110 | 111 | <td> |
|
111 | 112 | %if len(c.user.repository_groups) > 0: |
|
112 | 113 | <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked"/> <label for="user_repo_groups_1">${_('Detach repository groups')}</label> |
|
113 | 114 | %endif |
|
114 | 115 | </td> |
|
115 | 116 | <td> |
|
116 | 117 | %if len(c.user.repository_groups) > 0: |
|
117 | 118 | <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" /> <label for="user_repo_groups_2">${_('Delete repositories')}</label> |
|
118 | 119 | %endif |
|
119 | 120 | </td> |
|
120 | 121 | </tr> |
|
121 | 122 | |
|
122 | 123 | <tr> |
|
123 | 124 | <td> |
|
124 | 125 | ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)} |
|
125 | 126 | </td> |
|
126 | 127 | <td> |
|
127 | 128 | %if len(c.user.user_groups) > 0: |
|
128 | 129 | <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked"/> <label for="user_user_groups_1">${_('Detach user groups')}</label> |
|
129 | 130 | %endif |
|
130 | 131 | </td> |
|
131 | 132 | <td> |
|
132 | 133 | %if len(c.user.user_groups) > 0: |
|
133 | 134 | <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" /> <label for="user_user_groups_2">${_('Delete repositories')}</label> |
|
134 | 135 | %endif |
|
135 | 136 | </td> |
|
136 | 137 | </tr> |
|
137 | 138 | </table> |
|
138 | 139 | <div style="margin: 0 0 20px 0" class="fake-space"></div> |
|
139 | 140 | |
|
140 | 141 | <div class="field"> |
|
141 | 142 | <button class="btn btn-small btn-danger" type="submit" |
|
142 | 143 | onclick="return confirm('${_('Confirm to delete this user: %s') % c.user.username}');" |
|
143 | 144 | ${"disabled" if not c.can_delete_user else ""}> |
|
144 | 145 | ${_('Delete this user')} |
|
145 | 146 | </button> |
|
146 | 147 | </div> |
|
147 | 148 | % if c.can_delete_user_message: |
|
148 | 149 | <p class="help-block pre-formatting">${c.can_delete_user_message}</p> |
|
149 | 150 | % endif |
|
150 | 151 | |
|
151 | 152 | <div class="field"> |
|
152 | 153 | <span class="help-block"> |
|
153 | 154 | %if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0: |
|
154 | 155 | <p class="help-block">${_("When selecting the detach option, the depending objects owned by this user will be assigned to the `%s` super admin in the system. The delete option will delete the user's repositories!") % (c.first_admin.full_name)}</p> |
|
155 | 156 | %endif |
|
156 | 157 | </span> |
|
157 | 158 | </div> |
|
158 | 159 | |
|
159 | 160 | ${h.end_form()} |
|
160 | 161 | </div> |
|
161 | 162 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now