##// END OF EJS Templates
use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich -
r3603:eacd33e0 beta
parent child Browse files
Show More
@@ -1,378 +1,378 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 ##
2 ##
3 ## See also repo_settings.html
3 ## See also repo_settings.html
4 ##
4 ##
5 <%inherit file="/base/base.html"/>
5 <%inherit file="/base/base.html"/>
6
6
7 <%def name="title()">
7 <%def name="title()">
8 ${_('Edit repository')} ${c.repo_info.repo_name} &middot; ${c.rhodecode_name}
8 ${_('Edit repository')} ${c.repo_info.repo_name} &middot; ${c.rhodecode_name}
9 </%def>
9 </%def>
10
10
11 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
12 ${_('Settings')}
12 ${_('Settings')}
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('options')}
16 ${self.menu('admin')}
17 </%def>
17 </%def>
18
18
19 <%def name="main()">
19 <%def name="main()">
20 ${self.context_bar('options')}
20 ${self.context_bar('options')}
21 <div class="box box-left">
21 <div class="box box-left">
22 <!-- box / title -->
22 <!-- box / title -->
23 <div class="title">
23 <div class="title">
24 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
25 </div>
25 </div>
26 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
26 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
27 <div class="form">
27 <div class="form">
28 <!-- fields -->
28 <!-- fields -->
29 <div class="fields">
29 <div class="fields">
30 <div class="field">
30 <div class="field">
31 <div class="label">
31 <div class="label">
32 <label for="repo_name">${_('Name')}:</label>
32 <label for="repo_name">${_('Name')}:</label>
33 </div>
33 </div>
34 <div class="input">
34 <div class="input">
35 ${h.text('repo_name',class_="medium")}
35 ${h.text('repo_name',class_="medium")}
36 </div>
36 </div>
37 </div>
37 </div>
38 <div class="field">
38 <div class="field">
39 <div class="label">
39 <div class="label">
40 <label for="clone_uri">${_('Clone uri')}:</label>
40 <label for="clone_uri">${_('Clone uri')}:</label>
41 </div>
41 </div>
42 <div class="input">
42 <div class="input">
43 ${h.text('clone_uri',class_="medium")}
43 ${h.text('clone_uri',class_="medium")}
44 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
44 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
45 </div>
45 </div>
46 </div>
46 </div>
47 <div class="field">
47 <div class="field">
48 <div class="label">
48 <div class="label">
49 <label for="repo_group">${_('Repository group')}:</label>
49 <label for="repo_group">${_('Repository group')}:</label>
50 </div>
50 </div>
51 <div class="input">
51 <div class="input">
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
53 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
53 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
54 </div>
54 </div>
55 </div>
55 </div>
56 <div class="field">
56 <div class="field">
57 <div class="label">
57 <div class="label">
58 <label for="repo_type">${_('Type')}:</label>
58 <label for="repo_type">${_('Type')}:</label>
59 </div>
59 </div>
60 <div class="input">
60 <div class="input">
61 ${h.select('repo_type','hg',c.backends,class_="medium")}
61 ${h.select('repo_type','hg',c.backends,class_="medium")}
62 </div>
62 </div>
63 </div>
63 </div>
64 <div class="field">
64 <div class="field">
65 <div class="label">
65 <div class="label">
66 <label for="repo_landing_rev">${_('Landing revision')}:</label>
66 <label for="repo_landing_rev">${_('Landing revision')}:</label>
67 </div>
67 </div>
68 <div class="input">
68 <div class="input">
69 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
69 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
70 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
70 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
71 </div>
71 </div>
72 </div>
72 </div>
73 <div class="field">
73 <div class="field">
74 <div class="label label-textarea">
74 <div class="label label-textarea">
75 <label for="repo_description">${_('Description')}:</label>
75 <label for="repo_description">${_('Description')}:</label>
76 </div>
76 </div>
77 <div class="textarea text-area editor">
77 <div class="textarea text-area editor">
78 ${h.textarea('repo_description')}
78 ${h.textarea('repo_description')}
79 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
79 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
80 </div>
80 </div>
81 </div>
81 </div>
82
82
83 <div class="field">
83 <div class="field">
84 <div class="label label-checkbox">
84 <div class="label label-checkbox">
85 <label for="repo_private">${_('Private repository')}:</label>
85 <label for="repo_private">${_('Private repository')}:</label>
86 </div>
86 </div>
87 <div class="checkboxes">
87 <div class="checkboxes">
88 ${h.checkbox('repo_private',value="True")}
88 ${h.checkbox('repo_private',value="True")}
89 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
89 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
90 </div>
90 </div>
91 </div>
91 </div>
92 <div class="field">
92 <div class="field">
93 <div class="label label-checkbox">
93 <div class="label label-checkbox">
94 <label for="repo_enable_statistics">${_('Enable statistics')}:</label>
94 <label for="repo_enable_statistics">${_('Enable statistics')}:</label>
95 </div>
95 </div>
96 <div class="checkboxes">
96 <div class="checkboxes">
97 ${h.checkbox('repo_enable_statistics',value="True")}
97 ${h.checkbox('repo_enable_statistics',value="True")}
98 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
98 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
99 </div>
99 </div>
100 </div>
100 </div>
101 <div class="field">
101 <div class="field">
102 <div class="label label-checkbox">
102 <div class="label label-checkbox">
103 <label for="repo_enable_downloads">${_('Enable downloads')}:</label>
103 <label for="repo_enable_downloads">${_('Enable downloads')}:</label>
104 </div>
104 </div>
105 <div class="checkboxes">
105 <div class="checkboxes">
106 ${h.checkbox('repo_enable_downloads',value="True")}
106 ${h.checkbox('repo_enable_downloads',value="True")}
107 <span class="help-block">${_('Enable download menu on summary page.')}</span>
107 <span class="help-block">${_('Enable download menu on summary page.')}</span>
108 </div>
108 </div>
109 </div>
109 </div>
110 <div class="field">
110 <div class="field">
111 <div class="label label-checkbox">
111 <div class="label label-checkbox">
112 <label for="repo_enable_locking">${_('Enable locking')}:</label>
112 <label for="repo_enable_locking">${_('Enable locking')}:</label>
113 </div>
113 </div>
114 <div class="checkboxes">
114 <div class="checkboxes">
115 ${h.checkbox('repo_enable_locking',value="True")}
115 ${h.checkbox('repo_enable_locking',value="True")}
116 <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
116 <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
117 </div>
117 </div>
118 </div>
118 </div>
119 <div class="field">
119 <div class="field">
120 <div class="label">
120 <div class="label">
121 <label for="user">${_('Owner')}:</label>
121 <label for="user">${_('Owner')}:</label>
122 </div>
122 </div>
123 <div class="input input-medium ac">
123 <div class="input input-medium ac">
124 <div class="perm_ac">
124 <div class="perm_ac">
125 ${h.text('user',class_='yui-ac-input')}
125 ${h.text('user',class_='yui-ac-input')}
126 <span class="help-block">${_('Change owner of this repository.')}</span>
126 <span class="help-block">${_('Change owner of this repository.')}</span>
127 <div id="owner_container"></div>
127 <div id="owner_container"></div>
128 </div>
128 </div>
129 </div>
129 </div>
130 </div>
130 </div>
131 %if c.visual.repository_fields:
131 %if c.visual.repository_fields:
132 ## EXTRA FIELDS
132 ## EXTRA FIELDS
133 %for field in c.repo_fields:
133 %for field in c.repo_fields:
134 <div class="field">
134 <div class="field">
135 <div class="label">
135 <div class="label">
136 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
136 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
137 </div>
137 </div>
138 <div class="input input-medium">
138 <div class="input input-medium">
139 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
139 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
140 %if field.field_desc:
140 %if field.field_desc:
141 <span class="help-block">${field.field_desc}</span>
141 <span class="help-block">${field.field_desc}</span>
142 %endif
142 %endif
143 </div>
143 </div>
144 </div>
144 </div>
145 %endfor
145 %endfor
146 %endif
146 %endif
147 <div class="field">
147 <div class="field">
148 <div class="label">
148 <div class="label">
149 <label for="input">${_('Permissions')}:</label>
149 <label for="input">${_('Permissions')}:</label>
150 </div>
150 </div>
151 <div class="input">
151 <div class="input">
152 <%include file="repo_edit_perms.html"/>
152 <%include file="repo_edit_perms.html"/>
153 </div>
153 </div>
154 </div>
154 </div>
155
155
156 <div class="buttons">
156 <div class="buttons">
157 ${h.submit('save',_('Save'),class_="ui-btn large")}
157 ${h.submit('save',_('Save'),class_="ui-btn large")}
158 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
158 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
159 </div>
159 </div>
160 </div>
160 </div>
161 </div>
161 </div>
162 ${h.end_form()}
162 ${h.end_form()}
163 </div>
163 </div>
164
164
165 <div class="box box-right">
165 <div class="box box-right">
166 <div class="title">
166 <div class="title">
167 <h5>${_('Advanced settings')}</h5>
167 <h5>${_('Advanced settings')}</h5>
168 </div>
168 </div>
169
169
170 <h3>${_('Statistics')}</h3>
170 <h3>${_('Statistics')}</h3>
171 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
171 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
172 <div class="form">
172 <div class="form">
173 <div class="fields">
173 <div class="fields">
174 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
174 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
175 <div class="field" style="border:none;color:#888">
175 <div class="field" style="border:none;color:#888">
176 <ul>
176 <ul>
177 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
177 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
178 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
178 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
179 </ul>
179 </ul>
180 </div>
180 </div>
181 </div>
181 </div>
182 </div>
182 </div>
183 ${h.end_form()}
183 ${h.end_form()}
184
184
185 %if c.repo_info.clone_uri:
185 %if c.repo_info.clone_uri:
186 <h3>${_('Remote')}</h3>
186 <h3>${_('Remote')}</h3>
187 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
187 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
188 <div class="form">
188 <div class="form">
189 <div class="fields">
189 <div class="fields">
190 ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
190 ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
191 <div class="field" style="border:none">
191 <div class="field" style="border:none">
192 <ul>
192 <ul>
193 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
193 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
194 </ul>
194 </ul>
195 </div>
195 </div>
196 </div>
196 </div>
197 </div>
197 </div>
198 ${h.end_form()}
198 ${h.end_form()}
199 %endif
199 %endif
200
200
201 <h3>${_('Cache')}</h3>
201 <h3>${_('Cache')}</h3>
202 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
202 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
203 <div class="form">
203 <div class="form">
204 <div class="fields">
204 <div class="fields">
205 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
205 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
206 <div class="field" style="border:none;color:#888">
206 <div class="field" style="border:none;color:#888">
207 <ul>
207 <ul>
208 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
208 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
209 </li>
209 </li>
210 </ul>
210 </ul>
211 </div>
211 </div>
212 <div class="field" style="border:none;">
212 <div class="field" style="border:none;">
213 ${_('List of cached values')}
213 ${_('List of cached values')}
214 <table>
214 <table>
215 <tr>
215 <tr>
216 <th>${_('Prefix')}</th>
216 <th>${_('Prefix')}</th>
217 <th>${_('Key')}</th>
217 <th>${_('Key')}</th>
218 <th>${_('Active')}</th>
218 <th>${_('Active')}</th>
219 </tr>
219 </tr>
220 %for cache in c.repo_info.cache_keys:
220 %for cache in c.repo_info.cache_keys:
221 <tr>
221 <tr>
222 <td>${cache.prefix or '-'}</td>
222 <td>${cache.prefix or '-'}</td>
223 <td>${cache.cache_key}</td>
223 <td>${cache.cache_key}</td>
224 <td>${h.bool2icon(cache.cache_active)}</td>
224 <td>${h.bool2icon(cache.cache_active)}</td>
225 </tr>
225 </tr>
226 %endfor
226 %endfor
227 </table>
227 </table>
228 </div>
228 </div>
229 </div>
229 </div>
230 </div>
230 </div>
231 ${h.end_form()}
231 ${h.end_form()}
232
232
233 <h3>${_('Public journal')}</h3>
233 <h3>${_('Public journal')}</h3>
234 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
234 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
235 <div class="form">
235 <div class="form">
236 ${h.hidden('auth_token',str(h.get_token()))}
236 ${h.hidden('auth_token',str(h.get_token()))}
237 <div class="field">
237 <div class="field">
238 %if c.in_public_journal:
238 %if c.in_public_journal:
239 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
239 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
240 %else:
240 %else:
241 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
241 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
242 %endif
242 %endif
243 </div>
243 </div>
244 <div class="field" style="border:none;color:#888">
244 <div class="field" style="border:none;color:#888">
245 <ul>
245 <ul>
246 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
246 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
247 </li>
247 </li>
248 </ul>
248 </ul>
249 </div>
249 </div>
250 </div>
250 </div>
251 ${h.end_form()}
251 ${h.end_form()}
252
252
253 <h3>${_('Locking')}</h3>
253 <h3>${_('Locking')}</h3>
254 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
254 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
255 <div class="form">
255 <div class="form">
256 <div class="fields">
256 <div class="fields">
257 %if c.repo_info.locked[0]:
257 %if c.repo_info.locked[0]:
258 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
258 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
259 ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
259 ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
260 %else:
260 %else:
261 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
261 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
262 ${_('Repository is not locked')}
262 ${_('Repository is not locked')}
263 %endif
263 %endif
264 </div>
264 </div>
265 <div class="field" style="border:none;color:#888">
265 <div class="field" style="border:none;color:#888">
266 <ul>
266 <ul>
267 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
267 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
268 </li>
268 </li>
269 </ul>
269 </ul>
270 </div>
270 </div>
271 </div>
271 </div>
272 ${h.end_form()}
272 ${h.end_form()}
273
273
274 <h3>${_('Set as fork of')}</h3>
274 <h3>${_('Set as fork of')}</h3>
275 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
275 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
276 <div class="form">
276 <div class="form">
277 <div class="fields">
277 <div class="fields">
278 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
278 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
279 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
279 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
280 </div>
280 </div>
281 <div class="field" style="border:none;color:#888">
281 <div class="field" style="border:none;color:#888">
282 <ul>
282 <ul>
283 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
283 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
284 </ul>
284 </ul>
285 </div>
285 </div>
286 </div>
286 </div>
287 ${h.end_form()}
287 ${h.end_form()}
288
288
289 <h3>${_('Delete')}</h3>
289 <h3>${_('Delete')}</h3>
290 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
290 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
291 <div class="form">
291 <div class="form">
292 <div class="fields">
292 <div class="fields">
293 <div class="field" style="border:none;color:#888">
293 <div class="field" style="border:none;color:#888">
294 ## <div class="label">
294 ## <div class="label">
295 ## <label for="">${_('Remove repository')}:</label>
295 ## <label for="">${_('Remove repository')}:</label>
296 ## </div>
296 ## </div>
297 <div class="checkboxes">
297 <div class="checkboxes">
298 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
298 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
299 %if c.repo_info.forks.count():
299 %if c.repo_info.forks.count():
300 - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
300 - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
301 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
301 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
302 <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
302 <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
303 %endif
303 %endif
304 <ul>
304 <ul>
305 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
305 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
306 </ul>
306 </ul>
307 </div>
307 </div>
308 </div>
308 </div>
309 </div>
309 </div>
310 </div>
310 </div>
311 ${h.end_form()}
311 ${h.end_form()}
312 </div>
312 </div>
313
313
314 ##TODO: this should be controlled by the VISUAL setting
314 ##TODO: this should be controlled by the VISUAL setting
315 %if c.visual.repository_fields:
315 %if c.visual.repository_fields:
316 <div class="box box-left" style="clear:left">
316 <div class="box box-left" style="clear:left">
317 <!-- box / title -->
317 <!-- box / title -->
318 <div class="title">
318 <div class="title">
319 <h5>${_('Extra fields')}</h5>
319 <h5>${_('Extra fields')}</h5>
320 </div>
320 </div>
321
321
322 <div class="emails_wrap">
322 <div class="emails_wrap">
323 <table class="noborder">
323 <table class="noborder">
324 %for field in c.repo_fields:
324 %for field in c.repo_fields:
325 <tr>
325 <tr>
326 <td>${field.field_label} (${field.field_key})</td>
326 <td>${field.field_label} (${field.field_key})</td>
327 <td>${field.field_type}</td>
327 <td>${field.field_type}</td>
328 <td>
328 <td>
329 ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')}
329 ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')}
330 ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id,
330 ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id,
331 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")}
331 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")}
332 ${h.end_form()}
332 ${h.end_form()}
333 </td>
333 </td>
334 </tr>
334 </tr>
335 %endfor
335 %endfor
336 </table>
336 </table>
337 </div>
337 </div>
338
338
339 ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')}
339 ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')}
340 <div class="form">
340 <div class="form">
341 <!-- fields -->
341 <!-- fields -->
342 <div class="fields">
342 <div class="fields">
343 <div class="field">
343 <div class="field">
344 <div class="label">
344 <div class="label">
345 <label for="new_field_key">${_('New field key')}:</label>
345 <label for="new_field_key">${_('New field key')}:</label>
346 </div>
346 </div>
347 <div class="input">
347 <div class="input">
348 ${h.text('new_field_key', class_='small')}
348 ${h.text('new_field_key', class_='small')}
349 </div>
349 </div>
350 </div>
350 </div>
351 <div class="field">
351 <div class="field">
352 <div class="label">
352 <div class="label">
353 <label for="new_field_label">${_('New field label')}:</label>
353 <label for="new_field_label">${_('New field label')}:</label>
354 </div>
354 </div>
355 <div class="input">
355 <div class="input">
356 ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))}
356 ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))}
357 </div>
357 </div>
358 </div>
358 </div>
359
359
360 <div class="field">
360 <div class="field">
361 <div class="label">
361 <div class="label">
362 <label for="new_field_desc">${_('New field description')}:</label>
362 <label for="new_field_desc">${_('New field description')}:</label>
363 </div>
363 </div>
364 <div class="input">
364 <div class="input">
365 ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))}
365 ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))}
366 </div>
366 </div>
367 </div>
367 </div>
368
368
369 <div class="buttons">
369 <div class="buttons">
370 ${h.submit('save',_('Add'),class_="ui-btn large")}
370 ${h.submit('save',_('Add'),class_="ui-btn large")}
371 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
371 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
372 </div>
372 </div>
373 </div>
373 </div>
374 </div>
374 </div>
375 ${h.end_form()}
375 ${h.end_form()}
376 </div>
376 </div>
377 %endif
377 %endif
378 </%def>
378 </%def>
@@ -1,22 +1,23 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Repository group')} &middot; ${c.rhodecode_name}
4 ${_('Repository group')} &middot; ${c.rhodecode_name}
5 </%def>
5 </%def>
6
6
7 <%def name="breadcrumbs()">
7 <%def name="breadcrumbs()">
8 <span class="groups_breadcrumbs">
8 <span class="groups_breadcrumbs">
9 ${h.link_to(_(u'Home'),h.url('/'))}
9 ${h.link_to(_(u'Home'),h.url('/'))}
10 %if c.group.parent_group:
10 %if c.group.parent_group:
11 &raquo; ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))}
11 &raquo; ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))}
12 %endif
12 %endif
13 &raquo; "${c.group.name}" ${_('with')}
13 &raquo; "${c.group.name}" ${_('with')}
14 </span>
14 </span>
15 </%def>
15 </%def>
16
16
17 <%def name="page_nav()">
17 <%def name="page_nav()">
18 ${self.menu('home')}
18 ${self.menu('repositories')}
19 </%def>
19 </%def>
20
20 <%def name="main()">
21 <%def name="main()">
21 <%include file="/index_base.html" args="parent=self,short_repo_names=True"/>
22 <%include file="/index_base.html" args="parent=self,short_repo_names=True"/>
22 </%def>
23 </%def>
@@ -1,64 +1,65 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Add repos group')} &middot; ${c.rhodecode_name}
5 ${_('Add repos group')} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 &raquo;
10 &raquo;
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 &raquo;
12 &raquo;
12 ${_('add new repos group')}
13 ${_('add new repos group')}
13 </%def>
14 </%def>
14
15
15 <%def name="page_nav()">
16 <%def name="page_nav()">
16 ${self.menu('admin')}
17 ${self.menu('admin')}
17 </%def>
18 </%def>
18
19
19 <%def name="main()">
20 <%def name="main()">
20 <div class="box">
21 <div class="box">
21 <!-- box / title -->
22 <!-- box / title -->
22 <div class="title">
23 <div class="title">
23 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
24 </div>
25 </div>
25 <!-- end box / title -->
26 <!-- end box / title -->
26 ${h.form(url('repos_groups'))}
27 ${h.form(url('repos_groups'))}
27 <div class="form">
28 <div class="form">
28 <!-- fields -->
29 <!-- fields -->
29 <div class="fields">
30 <div class="fields">
30 <div class="field">
31 <div class="field">
31 <div class="label">
32 <div class="label">
32 <label for="group_name">${_('Group name')}:</label>
33 <label for="group_name">${_('Group name')}:</label>
33 </div>
34 </div>
34 <div class="input">
35 <div class="input">
35 ${h.text('group_name',class_='medium')}
36 ${h.text('group_name',class_='medium')}
36 </div>
37 </div>
37 </div>
38 </div>
38
39
39 <div class="field">
40 <div class="field">
40 <div class="label label-textarea">
41 <div class="label label-textarea">
41 <label for="group_description">${_('Description')}:</label>
42 <label for="group_description">${_('Description')}:</label>
42 </div>
43 </div>
43 <div class="textarea text-area editor">
44 <div class="textarea text-area editor">
44 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
45 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
45 </div>
46 </div>
46 </div>
47 </div>
47
48
48 <div class="field">
49 <div class="field">
49 <div class="label">
50 <div class="label">
50 <label for="group_parent_id">${_('Group parent')}:</label>
51 <label for="group_parent_id">${_('Group parent')}:</label>
51 </div>
52 </div>
52 <div class="input">
53 <div class="input">
53 ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
54 ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
54 </div>
55 </div>
55 </div>
56 </div>
56
57
57 <div class="buttons">
58 <div class="buttons">
58 ${h.submit('save',_('save'),class_="ui-btn large")}
59 ${h.submit('save',_('save'),class_="ui-btn large")}
59 </div>
60 </div>
60 </div>
61 </div>
61 </div>
62 </div>
62 ${h.end_form()}
63 ${h.end_form()}
63 </div>
64 </div>
64 </%def>
65 </%def>
@@ -1,86 +1,87 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Edit repos group')} ${c.repos_group.name} &middot; ${c.rhodecode_name}
5 ${_('Edit repos group')} ${c.repos_group.name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 &raquo;
10 &raquo;
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 &raquo;
12 &raquo;
12 ${_('edit repos group')} "${c.repos_group.name}"
13 ${_('edit repos group')} "${c.repos_group.name}"
13 </%def>
14 </%def>
14
15
15 <%def name="page_nav()">
16 <%def name="page_nav()">
16 ${self.menu('admin')}
17 ${self.menu('admin')}
17 </%def>
18 </%def>
18
19
19 <%def name="main()">
20 <%def name="main()">
20 <div class="box">
21 <div class="box">
21 <!-- box / title -->
22 <!-- box / title -->
22 <div class="title">
23 <div class="title">
23 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
24 <ul class="links">
25 <ul class="links">
25 <li>
26 <li>
26 <span>${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span>
27 <span>${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span>
27 </li>
28 </li>
28 </ul>
29 </ul>
29 </div>
30 </div>
30 <!-- end box / title -->
31 <!-- end box / title -->
31 ${h.form(url('repos_group',group_name=c.repos_group.group_name),method='put')}
32 ${h.form(url('repos_group',group_name=c.repos_group.group_name),method='put')}
32 <div class="form">
33 <div class="form">
33 <!-- fields -->
34 <!-- fields -->
34 <div class="fields">
35 <div class="fields">
35 <div class="field">
36 <div class="field">
36 <div class="label">
37 <div class="label">
37 <label for="group_name">${_('Group name')}:</label>
38 <label for="group_name">${_('Group name')}:</label>
38 </div>
39 </div>
39 <div class="input">
40 <div class="input">
40 ${h.text('group_name',class_='medium')}
41 ${h.text('group_name',class_='medium')}
41 </div>
42 </div>
42 </div>
43 </div>
43
44
44 <div class="field">
45 <div class="field">
45 <div class="label label-textarea">
46 <div class="label label-textarea">
46 <label for="group_description">${_('Description')}:</label>
47 <label for="group_description">${_('Description')}:</label>
47 </div>
48 </div>
48 <div class="textarea text-area editor">
49 <div class="textarea text-area editor">
49 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
50 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
50 </div>
51 </div>
51 </div>
52 </div>
52
53
53 <div class="field">
54 <div class="field">
54 <div class="label">
55 <div class="label">
55 <label for="group_parent_id">${_('Group parent')}:</label>
56 <label for="group_parent_id">${_('Group parent')}:</label>
56 </div>
57 </div>
57 <div class="input">
58 <div class="input">
58 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
59 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
59 </div>
60 </div>
60 </div>
61 </div>
61 <div class="field">
62 <div class="field">
62 <div class="label">
63 <div class="label">
63 <label for="input">${_('Permissions')}:</label>
64 <label for="input">${_('Permissions')}:</label>
64 </div>
65 </div>
65 <div class="input">
66 <div class="input">
66 <%include file="repos_group_edit_perms.html"/>
67 <%include file="repos_group_edit_perms.html"/>
67 </div>
68 </div>
68 </div>
69 </div>
69 <div class="field">
70 <div class="field">
70 <div class="label label-checkbox">
71 <div class="label label-checkbox">
71 <label for="enable_locking">${_('Enable locking')}:</label>
72 <label for="enable_locking">${_('Enable locking')}:</label>
72 </div>
73 </div>
73 <div class="checkboxes">
74 <div class="checkboxes">
74 ${h.checkbox('enable_locking',value="True")}
75 ${h.checkbox('enable_locking',value="True")}
75 <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span>
76 <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span>
76 </div>
77 </div>
77 </div>
78 </div>
78 <div class="buttons">
79 <div class="buttons">
79 ${h.submit('save',_('Save'),class_="ui-btn large")}
80 ${h.submit('save',_('Save'),class_="ui-btn large")}
80 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
81 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
81 </div>
82 </div>
82 </div>
83 </div>
83 </div>
84 </div>
84 ${h.end_form()}
85 ${h.end_form()}
85 </div>
86 </div>
86 </%def>
87 </%def>
@@ -1,78 +1,80 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repository groups administration')} &middot; ${c.rhodecode_name}
5 ${_('Repository groups administration')} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 ${h.link_to(_('Admin'),h.url('admin_home'))}
11 &raquo;
11 &raquo;
12 ${_('repository groups')}
12 ${_('repository groups')}
13 </%def>
13 </%def>
14
14 <%def name="page_nav()">
15 <%def name="page_nav()">
15 ${self.menu('admin')}
16 ${self.menu('admin')}
16 </%def>
17 </%def>
18
17 <%def name="main()">
19 <%def name="main()">
18 <div class="box">
20 <div class="box">
19 <!-- box / title -->
21 <!-- box / title -->
20 <div class="title">
22 <div class="title">
21 ${self.breadcrumbs()}
23 ${self.breadcrumbs()}
22 <ul class="links">
24 <ul class="links">
23 <li>
25 <li>
24 %if h.HasPermissionAny('hg.admin')():
26 %if h.HasPermissionAny('hg.admin')():
25 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span>
27 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span>
26 %endif
28 %endif
27 </li>
29 </li>
28 </ul>
30 </ul>
29 </div>
31 </div>
30 <!-- end box / title -->
32 <!-- end box / title -->
31 <div class="table">
33 <div class="table">
32 % if c.groups:
34 % if c.groups:
33 <table class="table_disp">
35 <table class="table_disp">
34
36
35 <thead>
37 <thead>
36 <tr>
38 <tr>
37 <th class="left"><a href="#">${_('Group name')}</a></th>
39 <th class="left"><a href="#">${_('Group name')}</a></th>
38 <th class="left"><a href="#">${_('Description')}</a></th>
40 <th class="left"><a href="#">${_('Description')}</a></th>
39 <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th>
41 <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th>
40 <th class="left" colspan="2">${_('action')}</th>
42 <th class="left" colspan="2">${_('action')}</th>
41 </tr>
43 </tr>
42 </thead>
44 </thead>
43
45
44 ## REPO GROUPS
46 ## REPO GROUPS
45
47
46 % for gr in c.groups:
48 % for gr in c.groups:
47 <% gr_cn = gr.repositories.count() %>
49 <% gr_cn = gr.repositories.count() %>
48 <tr>
50 <tr>
49 <td>
51 <td>
50 <div style="white-space: nowrap">
52 <div style="white-space: nowrap">
51 <img class="icon" alt="${_('Repository group')}" src="${h.url('/images/icons/database_link.png')}"/>
53 <img class="icon" alt="${_('Repository group')}" src="${h.url('/images/icons/database_link.png')}"/>
52 ${h.link_to(h.literal(' &raquo; '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))), url('repos_group_home',group_name=gr.group_name))}
54 ${h.link_to(h.literal(' &raquo; '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))), url('repos_group_home',group_name=gr.group_name))}
53 </div>
55 </div>
54 </td>
56 </td>
55 <td>${gr.group_description}</td>
57 <td>${gr.group_description}</td>
56 <td><b>${gr_cn}</b></td>
58 <td><b>${gr_cn}</b></td>
57 <td>
59 <td>
58 <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}">
60 <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}">
59 ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")}
61 ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")}
60 </a>
62 </a>
61 </td>
63 </td>
62 <td>
64 <td>
63 ${h.form(url('repos_group', group_name=gr.group_name),method='delete')}
65 ${h.form(url('repos_group', group_name=gr.group_name),method='delete')}
64 ${h.submit('remove_%s' % gr.name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_cn) % (gr.name,gr_cn)+"');")}
66 ${h.submit('remove_%s' % gr.name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_cn) % (gr.name,gr_cn)+"');")}
65 ${h.end_form()}
67 ${h.end_form()}
66 </td>
68 </td>
67 </tr>
69 </tr>
68 % endfor
70 % endfor
69
71
70 </table>
72 </table>
71 % else:
73 % else:
72 ${_('There are no repository groups yet')}
74 ${_('There are no repository groups yet')}
73 % endif
75 % endif
74
76
75 </div>
77 </div>
76 </div>
78 </div>
77
79
78 </%def>
80 </%def>
@@ -1,355 +1,355 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="root.html"/>
2 <%inherit file="root.html"/>
3
3
4 <!-- HEADER -->
4 <!-- HEADER -->
5 <div id="header-dd"></div>
5 <div id="header-dd"></div>
6 <div id="header">
6 <div id="header">
7 <div id="header-inner" class="title">
7 <div id="header-inner" class="title">
8 <div id="logo">
8 <div id="logo">
9 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
9 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
10 </div>
10 </div>
11 <!-- MENU -->
11 <!-- MENU -->
12 ${self.page_nav()}
12 ${self.page_nav()}
13 <!-- END MENU -->
13 <!-- END MENU -->
14 ${self.body()}
14 ${self.body()}
15 </div>
15 </div>
16 </div>
16 </div>
17 <!-- END HEADER -->
17 <!-- END HEADER -->
18
18
19 <!-- CONTENT -->
19 <!-- CONTENT -->
20 <div id="content">
20 <div id="content">
21 <div class="flash_msg">
21 <div class="flash_msg">
22 <% messages = h.flash.pop_messages() %>
22 <% messages = h.flash.pop_messages() %>
23 % if messages:
23 % if messages:
24 <ul id="flash-messages">
24 <ul id="flash-messages">
25 % for message in messages:
25 % for message in messages:
26 <li class="${message.category}_msg">${message}</li>
26 <li class="${message.category}_msg">${message}</li>
27 % endfor
27 % endfor
28 </ul>
28 </ul>
29 % endif
29 % endif
30 </div>
30 </div>
31 <div id="main">
31 <div id="main">
32 ${next.main()}
32 ${next.main()}
33 </div>
33 </div>
34 </div>
34 </div>
35 <!-- END CONTENT -->
35 <!-- END CONTENT -->
36
36
37 <!-- FOOTER -->
37 <!-- FOOTER -->
38 <div id="footer">
38 <div id="footer">
39 <div id="footer-inner" class="title">
39 <div id="footer-inner" class="title">
40 <div>
40 <div>
41 <p class="footer-link">
41 <p class="footer-link">
42 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
42 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
43 </p>
43 </p>
44 <p class="footer-link-right">
44 <p class="footer-link-right">
45 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
45 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
46 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
46 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
47 </p>
47 </p>
48 </div>
48 </div>
49 </div>
49 </div>
50 </div>
50 </div>
51 <!-- END FOOTER -->
51 <!-- END FOOTER -->
52
52
53 ### MAKO DEFS ###
53 ### MAKO DEFS ###
54 <%def name="page_nav()">
54 <%def name="page_nav()">
55 ${self.menu()}
55 ${self.menu()}
56 </%def>
56 </%def>
57
57
58 <%def name="breadcrumbs()">
58 <%def name="breadcrumbs()">
59 <div class="breadcrumbs">
59 <div class="breadcrumbs">
60 ${self.breadcrumbs_links()}
60 ${self.breadcrumbs_links()}
61 </div>
61 </div>
62 </%def>
62 </%def>
63
63
64 <%def name="context_bar(current=None)">
64 <%def name="context_bar(current=None)">
65 %if c.repo_name:
65 %if c.repo_name:
66 ${repo_context_bar(current)}
66 ${repo_context_bar(current)}
67 %endif
67 %endif
68 </%def>
68 </%def>
69
69
70 <%def name="admin_menu()">
70 <%def name="admin_menu()">
71 <ul class="admin_menu">
71 <ul class="admin_menu">
72 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal ')}</li>
72 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal ')}</li>
73 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
73 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
74 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
74 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
75 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
75 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
76 <li>${h.link_to(_('user groups'),h.url('users_groups'),class_='groups')}</li>
76 <li>${h.link_to(_('user groups'),h.url('users_groups'),class_='groups')}</li>
77 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
77 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
78 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
78 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
79 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
79 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
80 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
80 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
81 </ul>
81 </ul>
82 </%def>
82 </%def>
83
83
84 <%def name="admin_menu_simple()">
84 <%def name="admin_menu_simple()">
85 <ul>
85 <ul>
86 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
86 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
87 </ul>
87 </ul>
88 </%def>
88 </%def>
89
89
90 <%def name="repo_context_bar(current=None)">
90 <%def name="repo_context_bar(current=None)">
91 <%
91 <%
92 def follow_class():
92 def follow_class():
93 if c.repository_following:
93 if c.repository_following:
94 return h.literal('following')
94 return h.literal('following')
95 else:
95 else:
96 return h.literal('follow')
96 return h.literal('follow')
97 %>
97 %>
98 <%
98 <%
99 def is_current(selected):
99 def is_current(selected):
100 if selected == current:
100 if selected == current:
101 return h.literal('class="current"')
101 return h.literal('class="current"')
102 %>
102 %>
103
103
104 <!--- CONTEXT BAR -->
104 <!--- CONTEXT BAR -->
105 <div id="context-bar" class="box">
105 <div id="context-bar" class="box">
106 <div id="context-top">
106 <div id="context-top">
107 <div id="breadcrumbs">
107 <div id="breadcrumbs">
108 ${h.link_to(_(u'Repositories'),h.url('home'))}
108 ${h.link_to(_(u'Repositories'),h.url('home'))}
109 &raquo;
109 &raquo;
110 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
110 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
111 </div>
111 </div>
112 ## TODO: this check feels wrong, it would be better to have a check for permissions
112 ## TODO: this check feels wrong, it would be better to have a check for permissions
113 ## also it feels like a job for the controller
113 ## also it feels like a job for the controller
114 %if c.rhodecode_user.username != 'default':
114 %if c.rhodecode_user.username != 'default':
115 <ul id="context-actions" class="horizontal-list">
115 <ul id="context-actions" class="horizontal-list">
116 <li>
116 <li>
117 <button class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
117 <button class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
118 <!--span class="icon show-follow follow"></span>
118 <!--span class="icon show-follow follow"></span>
119 <span class="icon show-following following"></span-->
119 <span class="icon show-following following"></span-->
120 <span class="show-follow">${_('Follow')}</span>
120 <span class="show-follow">${_('Follow')}</span>
121 <span class="show-following">${_('Unfollow')}</span>
121 <span class="show-following">${_('Unfollow')}</span>
122 </button>
122 </button>
123 </li>
123 </li>
124 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
124 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
125 %if h.is_hg(c.rhodecode_repo):
125 %if h.is_hg(c.rhodecode_repo):
126 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
126 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
127 %endif
127 %endif
128 </ul>
128 </ul>
129 %endif
129 %endif
130 </div>
130 </div>
131 <div id="context-state">
131 <div id="context-state">
132 <ul id="context-pages" class="horizontal-list">
132 <ul id="context-pages" class="horizontal-list">
133 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
133 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
134 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
134 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
135 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
135 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
136 <li ${is_current('switch-to')}>
136 <li ${is_current('switch-to')}>
137 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
137 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
138 <ul id="switch_to_list_2" class="switch_to submenu">
138 <ul id="switch_to_list_2" class="switch_to submenu">
139 <li><a href="#">${_('loading...')}</a></li>
139 <li><a href="#">${_('loading...')}</a></li>
140 </ul>
140 </ul>
141 </li>
141 </li>
142 <li ${is_current('options')}>
142 <li ${is_current('options')}>
143 <a href="#" class="dropdown options"></span>${_('Options')}</a>
143 <a href="#" class="dropdown options"></span>${_('Options')}</a>
144 <ul>
144 <ul>
145 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
145 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
146 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
146 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
147 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
147 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
148 %else:
148 %else:
149 <li>${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
149 <li>${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
150 %endif
150 %endif
151 %endif
151 %endif
152 %if c.rhodecode_db_repo.fork:
152 %if c.rhodecode_db_repo.fork:
153 <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default'),class_='compare_request')}</li>
153 <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default'),class_='compare_request')}</li>
154 %endif
154 %endif
155 <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
155 <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
156 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
156 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
157
157
158 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
158 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
159 %if c.rhodecode_db_repo.locked[0]:
159 %if c.rhodecode_db_repo.locked[0]:
160 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
160 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
161 %else:
161 %else:
162 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
162 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
163 %endif
163 %endif
164 %endif
164 %endif
165 </ul>
165 </ul>
166 </li>
166 </li>
167 <li ${is_current('showpullrequest')}>
167 <li ${is_current('showpullrequest')}>
168 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
168 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
169 %if c.repository_pull_requests:
169 %if c.repository_pull_requests:
170 <span>${c.repository_pull_requests}</span>
170 <span>${c.repository_pull_requests}</span>
171 %endif
171 %endif
172 </a>
172 </a>
173 </li>
173 </li>
174 </ul>
174 </ul>
175 </div>
175 </div>
176 </div>
176 </div>
177 <script type="text/javascript">
177 <script type="text/javascript">
178 YUE.on('branch_tag_switcher_2','mouseover',function(){
178 YUE.on('branch_tag_switcher_2','mouseover',function(){
179 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
179 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
180 if(!loaded){
180 if(!loaded){
181 YUD.addClass('branch_tag_switcher_2','loaded');
181 YUD.addClass('branch_tag_switcher_2','loaded');
182 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
182 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
183 function(o){},
183 function(o){},
184 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
184 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
185 ,null);
185 ,null);
186 }
186 }
187 return false;
187 return false;
188 });
188 });
189 </script>
189 </script>
190 <!--- END CONTEXT BAR -->
190 <!--- END CONTEXT BAR -->
191 </%def>
191 </%def>
192
192
193 <%def name="usermenu()">
193 <%def name="usermenu()">
194 ## USER MENU
194 ## USER MENU
195 <li>
195 <li>
196 <a class="menu_link childs" id="quick_login_link">
196 <a class="menu_link childs" id="quick_login_link">
197 <span class="icon">
197 <span class="icon">
198 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
198 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
199 </span>
199 </span>
200 %if c.rhodecode_user.username != 'default':
200 %if c.rhodecode_user.username != 'default':
201 <span class="menu_link_user">${c.rhodecode_user.username}</span>
201 <span class="menu_link_user">${c.rhodecode_user.username}</span>
202 %if c.unread_notifications != 0:
202 %if c.unread_notifications != 0:
203 <span class="menu_link_notifications">${c.unread_notifications}</span>
203 <span class="menu_link_notifications">${c.unread_notifications}</span>
204 %endif
204 %endif
205 %else:
205 %else:
206 <span>${_('Not logged in')}</span>
206 <span>${_('Not logged in')}</span>
207 %endif
207 %endif
208 </a>
208 </a>
209
209
210 <div class="user-menu">
210 <div class="user-menu">
211 <div id="quick_login">
211 <div id="quick_login">
212 %if c.rhodecode_user.username == 'default':
212 %if c.rhodecode_user.username == 'default':
213 <h4>${_('Login to your account')}</h4>
213 <h4>${_('Login to your account')}</h4>
214 ${h.form(h.url('login_home',came_from=h.url.current()))}
214 ${h.form(h.url('login_home',came_from=h.url.current()))}
215 <div class="form">
215 <div class="form">
216 <div class="fields">
216 <div class="fields">
217 <div class="field">
217 <div class="field">
218 <div class="label">
218 <div class="label">
219 <label for="username">${_('Username')}:</label>
219 <label for="username">${_('Username')}:</label>
220 </div>
220 </div>
221 <div class="input">
221 <div class="input">
222 ${h.text('username',class_='focus')}
222 ${h.text('username',class_='focus')}
223 </div>
223 </div>
224
224
225 </div>
225 </div>
226 <div class="field">
226 <div class="field">
227 <div class="label">
227 <div class="label">
228 <label for="password">${_('Password')}:</label>
228 <label for="password">${_('Password')}:</label>
229 </div>
229 </div>
230 <div class="input">
230 <div class="input">
231 ${h.password('password',class_='focus')}
231 ${h.password('password',class_='focus')}
232 </div>
232 </div>
233
233
234 </div>
234 </div>
235 <div class="buttons">
235 <div class="buttons">
236 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
236 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
237 <div class="register">
237 <div class="register">
238 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
238 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
239 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
239 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
240 %endif
240 %endif
241 </div>
241 </div>
242 <div class="submit">
242 <div class="submit">
243 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
243 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
244 </div>
244 </div>
245 </div>
245 </div>
246 </div>
246 </div>
247 </div>
247 </div>
248 ${h.end_form()}
248 ${h.end_form()}
249 %else:
249 %else:
250 <div class="links_left">
250 <div class="links_left">
251 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
251 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
252 <div class="email">${c.rhodecode_user.email}</div>
252 <div class="email">${c.rhodecode_user.email}</div>
253 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
253 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
254 ##<div class="notifications"><a href="${h.url('notifications')}">${_('Notifications')}</a></div>
254 ##<div class="notifications"><a href="${h.url('notifications')}">${_('Notifications')}</a></div>
255 <div class="unread"><a href="${h.url('notifications')}">${_('Unread notifications')}: ${c.unread_notifications}</a></div>
255 <div class="unread"><a href="${h.url('notifications')}">${_('Unread notifications')}: ${c.unread_notifications}</a></div>
256 </div>
256 </div>
257 <div class="links_right">
257 <div class="links_right">
258 <ol class="links">
258 <ol class="links">
259 ##<li>${h.link_to(_(u'Home'),h.url('home'))}</li>
259 ##<li>${h.link_to(_(u'Home'),h.url('home'))}</li>
260 <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li>
260 <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li>
261 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
261 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
262 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
262 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
263 </ol>
263 </ol>
264 </div>
264 </div>
265 %endif
265 %endif
266 </div>
266 </div>
267 </div>
267 </div>
268
268
269 </li>
269 </li>
270 </%def>
270 </%def>
271
271
272 <%def name="menu(current=None)">
272 <%def name="menu(current=None)">
273 <%
273 <%
274 def is_current(selected):
274 def is_current(selected):
275 if selected == current:
275 if selected == current:
276 return h.literal('class="current"')
276 return h.literal('class="current"')
277 %>
277 %>
278 <ul id="quick" class="horizontal-list">
278 <ul id="quick" class="horizontal-list">
279 <!-- repo switcher -->
279 <!-- repo switcher -->
280 <li ${is_current('home')}>
280 <li ${is_current('repositories')}>
281 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
281 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
282 ${_('Repositories')}
282 ${_('Repositories')}
283 </a>
283 </a>
284 <ul id="repo_switcher_list" class="repo_switcher">
284 <ul id="repo_switcher_list" class="repo_switcher">
285 <li>
285 <li>
286 <a href="#">${_('loading...')}</a>
286 <a href="#">${_('loading...')}</a>
287 </li>
287 </li>
288 </ul>
288 </ul>
289 </li>
289 </li>
290 ##ROOT MENU
290 ##ROOT MENU
291 %if c.rhodecode_user.username != 'default':
291 %if c.rhodecode_user.username != 'default':
292 <li ${is_current('journal')}>
292 <li ${is_current('journal')}>
293 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
293 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
294 ${_('Journal')}
294 ${_('Journal')}
295 </a>
295 </a>
296 </li>
296 </li>
297 %else:
297 %else:
298 <li ${is_current('journal')}>
298 <li ${is_current('journal')}>
299 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
299 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
300 ${_('Public journal')}
300 ${_('Public journal')}
301 </a>
301 </a>
302 </li>
302 </li>
303 %endif
303 %endif
304 <li ${is_current('search')}>
304 <li ${is_current('search')}>
305 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
305 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
306 ${_('Search')}
306 ${_('Search')}
307 </a>
307 </a>
308 </li>
308 </li>
309 % if h.HasPermissionAll('hg.admin')('access admin main page'):
309 % if h.HasPermissionAll('hg.admin')('access admin main page'):
310 <li ${is_current('admin')}>
310 <li ${is_current('admin')}>
311 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
311 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
312 ${_('Admin')}
312 ${_('Admin')}
313 </a>
313 </a>
314 ${admin_menu()}
314 ${admin_menu()}
315 </li>
315 </li>
316 % elif c.rhodecode_user.groups_admin:
316 % elif c.rhodecode_user.groups_admin:
317 <li ${is_current('admin')}>
317 <li ${is_current('admin')}>
318 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
318 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
319 ${_('Admin')}
319 ${_('Admin')}
320 </a>
320 </a>
321 ${admin_menu_simple()}
321 ${admin_menu_simple()}
322 </li>
322 </li>
323 % endif
323 % endif
324 ${usermenu()}
324 ${usermenu()}
325 <script type="text/javascript">
325 <script type="text/javascript">
326 YUE.on('repo_switcher','mouseover',function(){
326 YUE.on('repo_switcher','mouseover',function(){
327 var target = 'q_filter_rs';
327 var target = 'q_filter_rs';
328 var qfilter_activate = function(){
328 var qfilter_activate = function(){
329 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
329 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
330 var func = function(node){
330 var func = function(node){
331 return node.parentNode;
331 return node.parentNode;
332 }
332 }
333 q_filter(target,nodes,func);
333 q_filter(target,nodes,func);
334 }
334 }
335
335
336 var loaded = YUD.hasClass('repo_switcher','loaded');
336 var loaded = YUD.hasClass('repo_switcher','loaded');
337 if(!loaded){
337 if(!loaded){
338 YUD.addClass('repo_switcher','loaded');
338 YUD.addClass('repo_switcher','loaded');
339 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
339 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
340 function(o){qfilter_activate();YUD.get(target).focus()},
340 function(o){qfilter_activate();YUD.get(target).focus()},
341 function(o){YUD.removeClass('repo_switcher','loaded');}
341 function(o){YUD.removeClass('repo_switcher','loaded');}
342 ,null);
342 ,null);
343 }else{
343 }else{
344 YUD.get(target).focus();
344 YUD.get(target).focus();
345 }
345 }
346 return false;
346 return false;
347 });
347 });
348
348
349 YUE.on('header-dd', 'click',function(e){
349 YUE.on('header-dd', 'click',function(e){
350 YUD.addClass('header-inner', 'hover');
350 YUD.addClass('header-inner', 'hover');
351 YUD.addClass('content', 'hover');
351 YUD.addClass('content', 'hover');
352 });
352 });
353
353
354 </script>
354 </script>
355 </%def>
355 </%def>
@@ -1,76 +1,76 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Bookmarks') % c.repo_name} &middot; ${c.rhodecode_name}
5 ${_('%s Bookmarks') % c.repo_name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
10 ${_('Bookmarks')}
10 ${_('Bookmarks')}
11 </%def>
11 </%def>
12
12
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 ${self.menu('bookmarks')}
14 ${self.menu('repositories')}
15 </%def>
15 </%def>
16
16
17 <%def name="main()">
17 <%def name="main()">
18 ${self.context_bar('switch-to')}
18 ${self.context_bar('switch-to')}
19 <div class="box">
19 <div class="box">
20 <!-- box / title -->
20 <!-- box / title -->
21 <div class="title">
21 <div class="title">
22 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
23 </div>
23 </div>
24 <!-- end box / title -->
24 <!-- end box / title -->
25 <div class="table">
25 <div class="table">
26 <%include file='bookmarks_data.html'/>
26 <%include file='bookmarks_data.html'/>
27 </div>
27 </div>
28 </div>
28 </div>
29
29
30 <script type="text/javascript">
30 <script type="text/javascript">
31
31
32 // main table sorting
32 // main table sorting
33 var myColumnDefs = [
33 var myColumnDefs = [
34 {key:"name",label:"${_('Name')}",sortable:true},
34 {key:"name",label:"${_('Name')}",sortable:true},
35 {key:"date",label:"${_('Date')}",sortable:true,
35 {key:"date",label:"${_('Date')}",sortable:true,
36 sortOptions: { sortFunction: dateSort }},
36 sortOptions: { sortFunction: dateSort }},
37 {key:"author",label:"${_('Author')}",sortable:true},
37 {key:"author",label:"${_('Author')}",sortable:true},
38 {key:"revision",label:"${_('Revision')}",sortable:true,
38 {key:"revision",label:"${_('Revision')}",sortable:true,
39 sortOptions: { sortFunction: revisionSort }},
39 sortOptions: { sortFunction: revisionSort }},
40 ];
40 ];
41
41
42 var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data"));
42 var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data"));
43
43
44 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
44 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
45
45
46 myDataSource.responseSchema = {
46 myDataSource.responseSchema = {
47 fields: [
47 fields: [
48 {key:"name"},
48 {key:"name"},
49 {key:"date"},
49 {key:"date"},
50 {key:"author"},
50 {key:"author"},
51 {key:"revision"},
51 {key:"revision"},
52 ]
52 ]
53 };
53 };
54
54
55 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
55 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
56 {
56 {
57 sortedBy:{key:"name",dir:"asc"},
57 sortedBy:{key:"name",dir:"asc"},
58 MSG_SORTASC:"${_('Click to sort ascending')}",
58 MSG_SORTASC:"${_('Click to sort ascending')}",
59 MSG_SORTDESC:"${_('Click to sort descending')}",
59 MSG_SORTDESC:"${_('Click to sort descending')}",
60 MSG_EMPTY:"${_('No records found.')}",
60 MSG_EMPTY:"${_('No records found.')}",
61 MSG_ERROR:"${_('Data error.')}",
61 MSG_ERROR:"${_('Data error.')}",
62 MSG_LOADING:"${_('Loading...')}",
62 MSG_LOADING:"${_('Loading...')}",
63 }
63 }
64 );
64 );
65 myDataTable.subscribe('postRenderEvent',function(oArgs) {
65 myDataTable.subscribe('postRenderEvent',function(oArgs) {
66 tooltip_activate();
66 tooltip_activate();
67 var func = function(node){
67 var func = function(node){
68 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
68 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
69 }
69 }
70 q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func);
70 q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func);
71 });
71 });
72
72
73 </script>
73 </script>
74
74
75
75
76 </%def>
76 </%def>
@@ -1,90 +1,90 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Branches') % c.repo_name} &middot; ${c.rhodecode_name}
5 ${_('%s Branches') % c.repo_name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
10 ${_('Branches')}
10 ${_('Branches')}
11 </%def>
11 </%def>
12
12
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 ${self.menu('branches')}
14 ${self.menu('repositories')}
15 </%def>
15 </%def>
16
16
17 <%def name="main()">
17 <%def name="main()">
18 ${self.context_bar('switch-to')}
18 ${self.context_bar('switch-to')}
19 <div class="box">
19 <div class="box">
20 <!-- box / title -->
20 <!-- box / title -->
21 <div class="title">
21 <div class="title">
22 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
23 </div>
23 </div>
24 <!-- end box / title -->
24 <!-- end box / title -->
25 %if c.repo_branches:
25 %if c.repo_branches:
26 <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div>
26 <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div>
27 %endif
27 %endif
28 <div class="table">
28 <div class="table">
29 <%include file='branches_data.html'/>
29 <%include file='branches_data.html'/>
30 </div>
30 </div>
31 </div>
31 </div>
32 <script type="text/javascript">
32 <script type="text/javascript">
33 YUE.on('compare_branches','click',function(e){
33 YUE.on('compare_branches','click',function(e){
34 YUE.preventDefault(e);
34 YUE.preventDefault(e);
35 var org = YUQ('input[name=compare_org]:checked')[0];
35 var org = YUQ('input[name=compare_org]:checked')[0];
36 var other = YUQ('input[name=compare_other]:checked')[0];
36 var other = YUQ('input[name=compare_other]:checked')[0];
37
37
38 if(org && other){
38 if(org && other){
39 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}";
39 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}";
40 var u = compare_url.replace('__ORG__',org.value)
40 var u = compare_url.replace('__ORG__',org.value)
41 .replace('__OTHER__',other.value);
41 .replace('__OTHER__',other.value);
42 window.location=u;
42 window.location=u;
43 }
43 }
44 });
44 });
45 // main table sorting
45 // main table sorting
46 var myColumnDefs = [
46 var myColumnDefs = [
47 {key:"name",label:"${_('Name')}",sortable:true},
47 {key:"name",label:"${_('Name')}",sortable:true},
48 {key:"date",label:"${_('Date')}",sortable:true,
48 {key:"date",label:"${_('Date')}",sortable:true,
49 sortOptions: { sortFunction: dateSort }},
49 sortOptions: { sortFunction: dateSort }},
50 {key:"author",label:"${_('Author')}",sortable:true},
50 {key:"author",label:"${_('Author')}",sortable:true},
51 {key:"revision",label:"${_('Revision')}",sortable:true,
51 {key:"revision",label:"${_('Revision')}",sortable:true,
52 sortOptions: { sortFunction: revisionSort }},
52 sortOptions: { sortFunction: revisionSort }},
53 {key:"compare",label:"${_('Compare')}",sortable:false,},
53 {key:"compare",label:"${_('Compare')}",sortable:false,},
54 ];
54 ];
55
55
56 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
56 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
57
57
58 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
58 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
59
59
60 myDataSource.responseSchema = {
60 myDataSource.responseSchema = {
61 fields: [
61 fields: [
62 {key:"name"},
62 {key:"name"},
63 {key:"date"},
63 {key:"date"},
64 {key:"author"},
64 {key:"author"},
65 {key:"revision"},
65 {key:"revision"},
66 {key:"compare"},
66 {key:"compare"},
67 ]
67 ]
68 };
68 };
69
69
70 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
70 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
71 {
71 {
72 sortedBy:{key:"name",dir:"asc"},
72 sortedBy:{key:"name",dir:"asc"},
73 MSG_SORTASC:"${_('Click to sort ascending')}",
73 MSG_SORTASC:"${_('Click to sort ascending')}",
74 MSG_SORTDESC:"${_('Click to sort descending')}",
74 MSG_SORTDESC:"${_('Click to sort descending')}",
75 MSG_EMPTY:"${_('No records found.')}",
75 MSG_EMPTY:"${_('No records found.')}",
76 MSG_ERROR:"${_('Data error.')}",
76 MSG_ERROR:"${_('Data error.')}",
77 MSG_LOADING:"${_('Loading...')}",
77 MSG_LOADING:"${_('Loading...')}",
78 }
78 }
79 );
79 );
80 myDataTable.subscribe('postRenderEvent',function(oArgs) {
80 myDataTable.subscribe('postRenderEvent',function(oArgs) {
81 tooltip_activate();
81 tooltip_activate();
82 var func = function(node){
82 var func = function(node){
83 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
83 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
84 }
84 }
85 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func);
85 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func);
86 });
86 });
87
87
88 </script>
88 </script>
89
89
90 </%def>
90 </%def>
@@ -1,262 +1,262 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="title()">
5 <%def name="title()">
6 ${_('%s Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
6 ${_('%s Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
7 </%def>
7 </%def>
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
10 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
11 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
11 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
12 </%def>
12 </%def>
13
13
14 <%def name="page_nav()">
14 <%def name="page_nav()">
15 ${self.menu('changelog')}
15 ${self.menu('repositories')}
16 </%def>
16 </%def>
17
17
18 <%def name="main()">
18 <%def name="main()">
19 ${self.context_bar('changelog')}
19 ${self.context_bar('changelog')}
20 <div class="box">
20 <div class="box">
21 <!-- box / title -->
21 <!-- box / title -->
22 <div class="title">
22 <div class="title">
23 ${self.breadcrumbs()}
23 ${self.breadcrumbs()}
24 </div>
24 </div>
25 <div class="table">
25 <div class="table">
26 % if c.pagination:
26 % if c.pagination:
27 <div id="graph">
27 <div id="graph">
28 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
28 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
29 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
29 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
30 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
30 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
31
31
32 %if c.rhodecode_db_repo.fork:
32 %if c.rhodecode_db_repo.fork:
33 <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
33 <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
34 %endif
34 %endif
35 %if h.is_hg(c.rhodecode_repo):
35 %if h.is_hg(c.rhodecode_repo):
36 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
36 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
37 %endif
37 %endif
38 </div>
38 </div>
39 <div class="container_header">
39 <div class="container_header">
40 ${h.form(h.url.current(),method='get')}
40 ${h.form(h.url.current(),method='get')}
41 <div style="float:left">
41 <div style="float:left">
42 ${h.submit('set',_('Show'),class_="ui-btn")}
42 ${h.submit('set',_('Show'),class_="ui-btn")}
43 ${h.text('size',size=1,value=c.size)}
43 ${h.text('size',size=1,value=c.size)}
44 ${_('revisions')}
44 ${_('revisions')}
45 </div>
45 </div>
46 ${h.end_form()}
46 ${h.end_form()}
47 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
47 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
48 </div>
48 </div>
49 <div id="graph_nodes">
49 <div id="graph_nodes">
50 <canvas id="graph_canvas"></canvas>
50 <canvas id="graph_canvas"></canvas>
51 </div>
51 </div>
52 <div id="graph_content">
52 <div id="graph_content">
53
53
54 <table id="changesets">
54 <table id="changesets">
55 <tbody>
55 <tbody>
56 %for cnt,cs in enumerate(c.pagination):
56 %for cnt,cs in enumerate(c.pagination):
57 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
57 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
58 <td class="checkbox">
58 <td class="checkbox">
59 ${h.checkbox(cs.raw_id,class_="changeset_range")}
59 ${h.checkbox(cs.raw_id,class_="changeset_range")}
60 </td>
60 </td>
61 <td class="author">
61 <td class="author">
62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
64 </td>
64 </td>
65 <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
65 <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">
66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">
67 <span class="changeset_hash">${h.show_id(cs)}</span>
67 <span class="changeset_hash">${h.show_id(cs)}</span>
68 </a>
68 </a>
69 </td>
69 </td>
70 <td class="date">
70 <td class="date">
71 <div class="date">${h.age(cs.date,True)}</div>
71 <div class="date">${h.age(cs.date,True)}</div>
72 </td>
72 </td>
73 <td class="mid">
73 <td class="mid">
74 <div class="log-container">
74 <div class="log-container">
75 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
75 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
76 <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
76 <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
77 <div class="extra-container">
77 <div class="extra-container">
78 %if c.comments.get(cs.raw_id,[]):
78 %if c.comments.get(cs.raw_id,[]):
79 <div class="comments-container">
79 <div class="comments-container">
80 <div class="comments-cnt" title="${('comments')}">
80 <div class="comments-cnt" title="${('comments')}">
81 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
81 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
82 ${len(c.comments[cs.raw_id])}
82 ${len(c.comments[cs.raw_id])}
83 </a>
83 </a>
84 </div>
84 </div>
85 </div>
85 </div>
86 %endif
86 %endif
87 %if h.is_hg(c.rhodecode_repo):
87 %if h.is_hg(c.rhodecode_repo):
88 %for book in cs.bookmarks:
88 %for book in cs.bookmarks:
89 <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
89 <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
90 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
90 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
91 </div>
91 </div>
92 %endfor
92 %endfor
93 %endif
93 %endif
94 %for tag in cs.tags:
94 %for tag in cs.tags:
95 <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
95 <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
96 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
96 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
97 </div>
97 </div>
98 %endfor
98 %endfor
99 %if (not c.branch_name) and cs.branch:
99 %if (not c.branch_name) and cs.branch:
100 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
100 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
101 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
101 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
102 </div>
102 </div>
103 %endif
103 %endif
104 </div>
104 </div>
105 </div>
105 </div>
106 </td>
106 </td>
107 </tr>
107 </tr>
108 %endfor
108 %endfor
109 </tbody>
109 </tbody>
110 </table>
110 </table>
111
111
112 <div class="pagination-wh pagination-left">
112 <div class="pagination-wh pagination-left">
113 ${c.pagination.pager('$link_previous ~2~ $link_next')}
113 ${c.pagination.pager('$link_previous ~2~ $link_next')}
114 </div>
114 </div>
115 </div>
115 </div>
116 </div>
116 </div>
117
117
118 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
118 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
119 <script type="text/javascript">
119 <script type="text/javascript">
120 YAHOO.util.Event.onDOMReady(function(){
120 YAHOO.util.Event.onDOMReady(function(){
121
121
122 //Monitor range checkboxes and build a link to changesets
122 //Monitor range checkboxes and build a link to changesets
123 //ranges
123 //ranges
124 var checkboxes = YUD.getElementsByClassName('changeset_range');
124 var checkboxes = YUD.getElementsByClassName('changeset_range');
125 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
125 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
126 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
126 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
127
127
128 var checkbox_checker = function(e){
128 var checkbox_checker = function(e){
129 var checked_checkboxes = [];
129 var checked_checkboxes = [];
130 for (pos in checkboxes){
130 for (pos in checkboxes){
131 if(checkboxes[pos].checked){
131 if(checkboxes[pos].checked){
132 checked_checkboxes.push(checkboxes[pos]);
132 checked_checkboxes.push(checkboxes[pos]);
133 }
133 }
134 }
134 }
135 if(YUD.get('open_new_pr')){
135 if(YUD.get('open_new_pr')){
136 if(checked_checkboxes.length>1){
136 if(checked_checkboxes.length>1){
137 YUD.setStyle('open_new_pr','display','none');
137 YUD.setStyle('open_new_pr','display','none');
138 } else {
138 } else {
139 YUD.setStyle('open_new_pr','display','');
139 YUD.setStyle('open_new_pr','display','');
140 if(checked_checkboxes.length>0){
140 if(checked_checkboxes.length>0){
141 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
141 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
142 }else{
142 }else{
143 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
143 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
144 }
144 }
145 }
145 }
146 }
146 }
147
147
148 if(checked_checkboxes.length>0){
148 if(checked_checkboxes.length>0){
149 var rev_end = checked_checkboxes[0].name;
149 var rev_end = checked_checkboxes[0].name;
150 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
150 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
151 var url = url_tmpl.replace('__REVRANGE__',
151 var url = url_tmpl.replace('__REVRANGE__',
152 rev_start+'...'+rev_end);
152 rev_start+'...'+rev_end);
153
153
154 var link = (rev_start == rev_end)
154 var link = (rev_start == rev_end)
155 ? _TM['Show selected changeset __S']
155 ? _TM['Show selected changeset __S']
156 : _TM['Show selected changesets __S -> __E'];
156 : _TM['Show selected changesets __S -> __E'];
157
157
158 link = link.replace('__S',rev_start.substr(0,6));
158 link = link.replace('__S',rev_start.substr(0,6));
159 link = link.replace('__E',rev_end.substr(0,6));
159 link = link.replace('__E',rev_end.substr(0,6));
160 YUD.get('rev_range_container').href = url;
160 YUD.get('rev_range_container').href = url;
161 YUD.get('rev_range_container').innerHTML = link;
161 YUD.get('rev_range_container').innerHTML = link;
162 YUD.setStyle('rev_range_container','display','');
162 YUD.setStyle('rev_range_container','display','');
163 YUD.setStyle('rev_range_clear','display','');
163 YUD.setStyle('rev_range_clear','display','');
164
164
165 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
165 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
166 YUD.setStyle('compare_fork','display','none');
166 YUD.setStyle('compare_fork','display','none');
167 }else{
167 }else{
168 YUD.setStyle('rev_range_container','display','none');
168 YUD.setStyle('rev_range_container','display','none');
169 YUD.setStyle('rev_range_clear','display','none');
169 YUD.setStyle('rev_range_clear','display','none');
170 if (checkboxes){
170 if (checkboxes){
171 YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name);
171 YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name);
172 }
172 }
173 YUD.setStyle('compare_fork','display','');
173 YUD.setStyle('compare_fork','display','');
174 }
174 }
175 };
175 };
176 YUE.onDOMReady(checkbox_checker);
176 YUE.onDOMReady(checkbox_checker);
177 YUE.on(checkboxes,'click', checkbox_checker);
177 YUE.on(checkboxes,'click', checkbox_checker);
178
178
179 YUE.on('rev_range_clear','click',function(e){
179 YUE.on('rev_range_clear','click',function(e){
180 for (var i=0; i<checkboxes.length; i++){
180 for (var i=0; i<checkboxes.length; i++){
181 var cb = checkboxes[i];
181 var cb = checkboxes[i];
182 cb.checked = false;
182 cb.checked = false;
183 }
183 }
184 checkbox_checker();
184 checkbox_checker();
185 YUE.preventDefault(e);
185 YUE.preventDefault(e);
186 });
186 });
187
187
188 var msgs = YUQ('.message');
188 var msgs = YUQ('.message');
189 // get first element height
189 // get first element height
190 var el = YUQ('#graph_content .container')[0];
190 var el = YUQ('#graph_content .container')[0];
191 var row_h = el.clientHeight;
191 var row_h = el.clientHeight;
192 for(var i=0;i<msgs.length;i++){
192 for(var i=0;i<msgs.length;i++){
193 var m = msgs[i];
193 var m = msgs[i];
194
194
195 var h = m.clientHeight;
195 var h = m.clientHeight;
196 var pad = YUD.getStyle(m,'padding');
196 var pad = YUD.getStyle(m,'padding');
197 if(h > row_h){
197 if(h > row_h){
198 var offset = row_h - (h+12);
198 var offset = row_h - (h+12);
199 YUD.setStyle(m.nextElementSibling,'display','block');
199 YUD.setStyle(m.nextElementSibling,'display','block');
200 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
200 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
201 };
201 };
202 }
202 }
203 YUE.on(YUQ('.expand'),'click',function(e){
203 YUE.on(YUQ('.expand'),'click',function(e){
204 var elem = e.currentTarget.parentNode.parentNode;
204 var elem = e.currentTarget.parentNode.parentNode;
205 YUD.setStyle(e.currentTarget,'display','none');
205 YUD.setStyle(e.currentTarget,'display','none');
206 YUD.setStyle(elem,'height','auto');
206 YUD.setStyle(elem,'height','auto');
207
207
208 //redraw the graph, line_count and jsdata are global vars
208 //redraw the graph, line_count and jsdata are global vars
209 set_canvas(100);
209 set_canvas(100);
210
210
211 var r = new BranchRenderer();
211 var r = new BranchRenderer();
212 r.render(jsdata,100,line_count);
212 r.render(jsdata,100,line_count);
213
213
214 });
214 });
215
215
216 // change branch filter
216 // change branch filter
217 YUE.on(YUD.get('branch_filter'),'change',function(e){
217 YUE.on(YUD.get('branch_filter'),'change',function(e){
218 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
218 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
219 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
219 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
220 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
220 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
221 var url = url.replace('__BRANCH__',selected_branch);
221 var url = url.replace('__BRANCH__',selected_branch);
222 if(selected_branch != ''){
222 if(selected_branch != ''){
223 window.location = url;
223 window.location = url;
224 }else{
224 }else{
225 window.location = url_main;
225 window.location = url_main;
226 }
226 }
227
227
228 });
228 });
229
229
230 function set_canvas(width) {
230 function set_canvas(width) {
231 var c = document.getElementById('graph_nodes');
231 var c = document.getElementById('graph_nodes');
232 var t = document.getElementById('graph_content');
232 var t = document.getElementById('graph_content');
233 canvas = document.getElementById('graph_canvas');
233 canvas = document.getElementById('graph_canvas');
234 var div_h = t.clientHeight;
234 var div_h = t.clientHeight;
235 canvas.setAttribute('height',div_h);
235 canvas.setAttribute('height',div_h);
236 canvas.setAttribute('width',width);
236 canvas.setAttribute('width',width);
237 };
237 };
238 var heads = 1;
238 var heads = 1;
239 var line_count = 0;
239 var line_count = 0;
240 var jsdata = ${c.jsdata|n};
240 var jsdata = ${c.jsdata|n};
241
241
242 for (var i=0;i<jsdata.length;i++) {
242 for (var i=0;i<jsdata.length;i++) {
243 var in_l = jsdata[i][2];
243 var in_l = jsdata[i][2];
244 for (var j in in_l) {
244 for (var j in in_l) {
245 var m = in_l[j][1];
245 var m = in_l[j][1];
246 if (m > line_count)
246 if (m > line_count)
247 line_count = m;
247 line_count = m;
248 }
248 }
249 }
249 }
250 set_canvas(100);
250 set_canvas(100);
251
251
252 var r = new BranchRenderer();
252 var r = new BranchRenderer();
253 r.render(jsdata,100,line_count);
253 r.render(jsdata,100,line_count);
254
254
255 });
255 });
256 </script>
256 </script>
257 %else:
257 %else:
258 ${_('There are no changes yet')}
258 ${_('There are no changes yet')}
259 %endif
259 %endif
260 </div>
260 </div>
261 </div>
261 </div>
262 </%def>
262 </%def>
@@ -1,199 +1,199 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="title()">
5 <%def name="title()">
6 ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} &middot; ${c.rhodecode_name}
6 ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} &middot; ${c.rhodecode_name}
7 </%def>
7 </%def>
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
10 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
11 </%def>
11 </%def>
12
12
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 ${self.menu('changelog')}
14 ${self.menu('repositories')}
15 </%def>
15 </%def>
16
16
17 <%def name="main()">
17 <%def name="main()">
18 ${self.context_bar('changelog')}
18 ${self.context_bar('changelog')}
19 <div class="box">
19 <div class="box">
20 <!-- box / title -->
20 <!-- box / title -->
21 <div class="title">
21 <div class="title">
22 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
23 </div>
23 </div>
24 <script>
24 <script>
25 var _USERS_AC_DATA = ${c.users_array|n};
25 var _USERS_AC_DATA = ${c.users_array|n};
26 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
26 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
27 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
27 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
28 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
28 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
29 </script>
29 </script>
30 <div class="table">
30 <div class="table">
31 <div class="diffblock">
31 <div class="diffblock">
32 <div class="parents">
32 <div class="parents">
33 %if c.changeset.parents:
33 %if c.changeset.parents:
34 %for n, p_cs in enumerate(reversed(c.changeset.parents)):
34 %for n, p_cs in enumerate(reversed(c.changeset.parents)):
35 <span class="changeset_hash">&laquo; ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span>
35 <span class="changeset_hash">&laquo; ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span>
36 <br>
36 <br>
37 %endfor
37 %endfor
38 %else:
38 %else:
39 <span>${_('No parents')}</span>
39 <span>${_('No parents')}</span>
40 %endif
40 %endif
41 </div>
41 </div>
42 <div class="children">
42 <div class="children">
43 %if c.changeset.children:
43 %if c.changeset.children:
44 %for n, p_cs in enumerate(reversed(c.changeset.children)):
44 %for n, p_cs in enumerate(reversed(c.changeset.children)):
45 <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} &raquo;</span>
45 <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} &raquo;</span>
46 <br>
46 <br>
47 %endfor
47 %endfor
48 %else:
48 %else:
49 <span>${_('No children')}</span>
49 <span>${_('No children')}</span>
50 %endif
50 %endif
51 </div>
51 </div>
52 <div class="code-header banner">
52 <div class="code-header banner">
53
53
54 <div class="hash">
54 <div class="hash">
55 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
55 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
56 </div>
56 </div>
57 <div class="date">
57 <div class="date">
58 ${h.fmt_date(c.changeset.date)}
58 ${h.fmt_date(c.changeset.date)}
59 </div>
59 </div>
60 <div class="changeset-status-container">
60 <div class="changeset-status-container">
61 %if c.statuses:
61 %if c.statuses:
62 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div>
62 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div>
63 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div>
63 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div>
64 %endif
64 %endif
65 </div>
65 </div>
66 <div class="diff-actions">
66 <div class="diff-actions">
67 <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
67 <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
68 <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a>
68 <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a>
69 <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
69 <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
70 ${c.ignorews_url(request.GET)}
70 ${c.ignorews_url(request.GET)}
71 ${c.context_url(request.GET)}
71 ${c.context_url(request.GET)}
72 </div>
72 </div>
73 <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
73 <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
74 </div>
74 </div>
75 </div>
75 </div>
76 <div id="changeset_content">
76 <div id="changeset_content">
77 <div class="container">
77 <div class="container">
78 <div class="left">
78 <div class="left">
79 <div class="author">
79 <div class="author">
80 <div class="gravatar">
80 <div class="gravatar">
81 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
81 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
82 </div>
82 </div>
83 <span>${h.person(c.changeset.author)}</span><br/>
83 <span>${h.person(c.changeset.author)}</span><br/>
84 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
84 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
85 </div>
85 </div>
86 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
86 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
87 </div>
87 </div>
88 <div class="right">
88 <div class="right">
89 <div class="changes">
89 <div class="changes">
90 % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff:
90 % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff:
91 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
91 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
92 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
92 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
93 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
93 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
94 % else:
94 % else:
95 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
95 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
96 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
96 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
97 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
97 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
98 % endif
98 % endif
99 </div>
99 </div>
100
100
101 <span class="logtags">
101 <span class="logtags">
102 %if len(c.changeset.parents)>1:
102 %if len(c.changeset.parents)>1:
103 <span class="merge">${_('merge')}</span>
103 <span class="merge">${_('merge')}</span>
104 %endif
104 %endif
105 %if c.changeset.branch:
105 %if c.changeset.branch:
106 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
106 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
107 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
107 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
108 </span>
108 </span>
109 %endif
109 %endif
110 %for tag in c.changeset.tags:
110 %for tag in c.changeset.tags:
111 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
111 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
112 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
112 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
113 %endfor
113 %endfor
114 </span>
114 </span>
115 </div>
115 </div>
116 </div>
116 </div>
117 <span>
117 <span>
118 % if c.limited_diff:
118 % if c.limited_diff:
119 ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}:
119 ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}:
120 % else:
120 % else:
121 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}:
121 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}:
122 %endif
122 %endif
123 </span>
123 </span>
124 <div class="cs_files">
124 <div class="cs_files">
125 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems():
125 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems():
126 <div class="cs_${change}">
126 <div class="cs_${change}">
127 <div class="node">
127 <div class="node">
128 <a href="#${FID}">${h.safe_unicode(path)}</a>
128 <a href="#${FID}">${h.safe_unicode(path)}</a>
129 </div>
129 </div>
130 <div class="changes">${h.fancy_file_stats(stats)}</div>
130 <div class="changes">${h.fancy_file_stats(stats)}</div>
131 </div>
131 </div>
132 %endfor
132 %endfor
133 % if c.limited_diff:
133 % if c.limited_diff:
134 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
134 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
135 % endif
135 % endif
136 </div>
136 </div>
137 </div>
137 </div>
138
138
139 </div>
139 </div>
140
140
141 ## diff block
141 ## diff block
142 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
142 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
143 ${diff_block.diff_block(c.changes[c.changeset.raw_id])}
143 ${diff_block.diff_block(c.changes[c.changeset.raw_id])}
144
144
145 % if c.limited_diff:
145 % if c.limited_diff:
146 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
146 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
147 % endif
147 % endif
148
148
149 ## template for inline comment form
149 ## template for inline comment form
150 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
150 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
151 ${comment.comment_inline_form()}
151 ${comment.comment_inline_form()}
152
152
153 ## render comments and inlines
153 ## render comments and inlines
154 ${comment.generate_comments()}
154 ${comment.generate_comments()}
155
155
156 ## main comment form and it status
156 ## main comment form and it status
157 ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id),
157 ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id),
158 h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))}
158 h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))}
159
159
160 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
160 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
161 <script type="text/javascript">
161 <script type="text/javascript">
162 YUE.onDOMReady(function(){
162 YUE.onDOMReady(function(){
163 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
163 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
164 var show = 'none';
164 var show = 'none';
165 var target = e.currentTarget;
165 var target = e.currentTarget;
166 if(target == null){
166 if(target == null){
167 target = this;
167 target = this;
168 }
168 }
169 if(target.checked){
169 if(target.checked){
170 var show = ''
170 var show = ''
171 }
171 }
172 var boxid = YUD.getAttribute(target,'id_for');
172 var boxid = YUD.getAttribute(target,'id_for');
173 var comments = YUQ('#{0} .inline-comments'.format(boxid));
173 var comments = YUQ('#{0} .inline-comments'.format(boxid));
174 for(c in comments){
174 for(c in comments){
175 YUD.setStyle(comments[c],'display',show);
175 YUD.setStyle(comments[c],'display',show);
176 }
176 }
177 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
177 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
178 for(c in btns){
178 for(c in btns){
179 YUD.setStyle(btns[c],'display',show);
179 YUD.setStyle(btns[c],'display',show);
180 }
180 }
181 })
181 })
182
182
183 YUE.on(YUQ('.line'),'click',function(e){
183 YUE.on(YUQ('.line'),'click',function(e){
184 var tr = e.currentTarget;
184 var tr = e.currentTarget;
185 if(tr == null){
185 if(tr == null){
186 tr = this;
186 tr = this;
187 }
187 }
188 injectInlineForm(tr);
188 injectInlineForm(tr);
189 });
189 });
190
190
191 // inject comments into they proper positions
191 // inject comments into they proper positions
192 var file_comments = YUQ('.inline-comment-placeholder');
192 var file_comments = YUQ('.inline-comment-placeholder');
193 renderInlineComments(file_comments);
193 renderInlineComments(file_comments);
194 })
194 })
195
195
196 </script>
196 </script>
197
197
198 </div>
198 </div>
199 </%def>
199 </%def>
@@ -1,120 +1,120 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
9 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('changelog')}
13 ${self.menu('repositories')}
14 </%def>
14 </%def>
15
15
16 <%def name="main()">
16 <%def name="main()">
17 ${self.context_bar('changelog')}
17 ${self.context_bar('changelog')}
18 <div class="box">
18 <div class="box">
19 <!-- box / title -->
19 <!-- box / title -->
20 <div class="title">
20 <div class="title">
21 ${self.breadcrumbs()}
21 ${self.breadcrumbs()}
22 </div>
22 </div>
23 <div class="table">
23 <div class="table">
24 <div id="body" class="diffblock">
24 <div id="body" class="diffblock">
25 <div class="code-header">
25 <div class="code-header">
26 <div>
26 <div>
27 ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)),
27 ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)),
28 h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id)
28 h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id)
29 )}
29 )}
30 </div>
30 </div>
31 </div>
31 </div>
32 </div>
32 </div>
33 <div id="changeset_compare_view_content">
33 <div id="changeset_compare_view_content">
34 <div class="container">
34 <div class="container">
35 <table class="compare_view_commits noborder">
35 <table class="compare_view_commits noborder">
36 %for cnt,cs in enumerate(c.cs_ranges):
36 %for cnt,cs in enumerate(c.cs_ranges):
37 <tr>
37 <tr>
38 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
38 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
39 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
39 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
40 <td><div class="author">${h.person(cs.author)}</div></td>
40 <td><div class="author">${h.person(cs.author)}</div></td>
41 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
41 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
42 <td>
42 <td>
43 %if c.statuses:
43 %if c.statuses:
44 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
44 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
45 %endif
45 %endif
46 </td>
46 </td>
47 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
47 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
48 </tr>
48 </tr>
49 %endfor
49 %endfor
50 </table>
50 </table>
51 </div>
51 </div>
52 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
52 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
53 <div class="cs_files">
53 <div class="cs_files">
54 %for cs in c.cs_ranges:
54 %for cs in c.cs_ranges:
55 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
55 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
56 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
56 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
57 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
57 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
58 %endfor
58 %endfor
59 %endfor
59 %endfor
60 </div>
60 </div>
61 </div>
61 </div>
62
62
63 </div>
63 </div>
64 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
64 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
65 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
65 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
66 %for cs in c.cs_ranges:
66 %for cs in c.cs_ranges:
67 ##${comment.comment_inline_form(cs)}
67 ##${comment.comment_inline_form(cs)}
68 ## diff block
68 ## diff block
69 <div class="h3">
69 <div class="h3">
70 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
70 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
71 <div class="gravatar">
71 <div class="gravatar">
72 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
72 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
73 </div>
73 </div>
74 <div class="right">
74 <div class="right">
75 <span class="logtags">
75 <span class="logtags">
76 %if len(cs.parents)>1:
76 %if len(cs.parents)>1:
77 <span class="merge">${_('merge')}</span>
77 <span class="merge">${_('merge')}</span>
78 %endif
78 %endif
79 %if cs.branch:
79 %if cs.branch:
80 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
80 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
81 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
81 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
82 </span>
82 </span>
83 %endif
83 %endif
84 %if h.is_hg(c.rhodecode_repo):
84 %if h.is_hg(c.rhodecode_repo):
85 %for book in cs.bookmarks:
85 %for book in cs.bookmarks:
86 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
86 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
87 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
87 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
88 </span>
88 </span>
89 %endfor
89 %endfor
90 %endif
90 %endif
91 %for tag in cs.tags:
91 %for tag in cs.tags:
92 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
92 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
93 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
93 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
94 %endfor
94 %endfor
95 </span>
95 </span>
96 </div>
96 </div>
97 </div>
97 </div>
98 ${diff_block.diff_block(c.changes[cs.raw_id])}
98 ${diff_block.diff_block(c.changes[cs.raw_id])}
99 ##${comment.comments(cs)}
99 ##${comment.comments(cs)}
100
100
101 %endfor
101 %endfor
102 <script type="text/javascript">
102 <script type="text/javascript">
103
103
104 YUE.onDOMReady(function(){
104 YUE.onDOMReady(function(){
105
105
106 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
106 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
107 var act = e.currentTarget.nextElementSibling;
107 var act = e.currentTarget.nextElementSibling;
108
108
109 if(YUD.hasClass(act,'active')){
109 if(YUD.hasClass(act,'active')){
110 YUD.removeClass(act,'active');
110 YUD.removeClass(act,'active');
111 YUD.setStyle(act,'display','none');
111 YUD.setStyle(act,'display','none');
112 }else{
112 }else{
113 YUD.addClass(act,'active');
113 YUD.addClass(act,'active');
114 YUD.setStyle(act,'display','');
114 YUD.setStyle(act,'display','');
115 }
115 }
116 });
116 });
117 })
117 })
118 </script>
118 </script>
119 </div>
119 </div>
120 </%def>
120 </%def>
@@ -1,89 +1,89 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} &middot; ${c.rhodecode_name}
5 ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${_('Compare revisions')}
9 ${_('Compare revisions')}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('changelog')}
13 ${self.menu('repositories')}
14 </%def>
14 </%def>
15
15
16 <%def name="main()">
16 <%def name="main()">
17 ${self.context_bar('changelog')}
17 ${self.context_bar('changelog')}
18 <div class="box">
18 <div class="box">
19 <!-- box / title -->
19 <!-- box / title -->
20 <div class="title">
20 <div class="title">
21 ${self.breadcrumbs()}
21 ${self.breadcrumbs()}
22 </div>
22 </div>
23 <div class="table">
23 <div class="table">
24 <div id="body" class="diffblock">
24 <div id="body" class="diffblock">
25 <div class="code-header">
25 <div class="code-header">
26 <div>
26 <div>
27 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a>
27 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a>
28 </div>
28 </div>
29 </div>
29 </div>
30 </div>
30 </div>
31 <div id="changeset_compare_view_content">
31 <div id="changeset_compare_view_content">
32 ##CS
32 ##CS
33 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
33 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
34 <%include file="compare_cs.html" />
34 <%include file="compare_cs.html" />
35
35
36 ## FILES
36 ## FILES
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
38
38
39 % if c.limited_diff:
39 % if c.limited_diff:
40 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
40 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
41 % else:
41 % else:
42 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
42 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
43 %endif
43 %endif
44
44
45 </div>
45 </div>
46 <div class="cs_files">
46 <div class="cs_files">
47 %if not c.files:
47 %if not c.files:
48 <span class="empty_data">${_('No files')}</span>
48 <span class="empty_data">${_('No files')}</span>
49 %endif
49 %endif
50 %for fid, change, f, stat in c.files:
50 %for fid, change, f, stat in c.files:
51 <div class="cs_${change}">
51 <div class="cs_${change}">
52 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
52 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
53 <div class="changes">${h.fancy_file_stats(stat)}</div>
53 <div class="changes">${h.fancy_file_stats(stat)}</div>
54 </div>
54 </div>
55 %endfor
55 %endfor
56 </div>
56 </div>
57 % if c.limited_diff:
57 % if c.limited_diff:
58 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
58 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
59 % endif
59 % endif
60 </div>
60 </div>
61 </div>
61 </div>
62
62
63 ## diff block
63 ## diff block
64 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
64 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
65 %for fid, change, f, stat in c.files:
65 %for fid, change, f, stat in c.files:
66 ${diff_block.diff_block_simple([c.changes[fid]])}
66 ${diff_block.diff_block_simple([c.changes[fid]])}
67 %endfor
67 %endfor
68 % if c.limited_diff:
68 % if c.limited_diff:
69 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
69 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
70 % endif
70 % endif
71 <script type="text/javascript">
71 <script type="text/javascript">
72
72
73 YUE.onDOMReady(function(){
73 YUE.onDOMReady(function(){
74
74
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
76 var act = e.currentTarget.nextElementSibling;
76 var act = e.currentTarget.nextElementSibling;
77
77
78 if(YUD.hasClass(act,'active')){
78 if(YUD.hasClass(act,'active')){
79 YUD.removeClass(act,'active');
79 YUD.removeClass(act,'active');
80 YUD.setStyle(act,'display','none');
80 YUD.setStyle(act,'display','none');
81 }else{
81 }else{
82 YUD.addClass(act,'active');
82 YUD.addClass(act,'active');
83 YUD.setStyle(act,'display','');
83 YUD.setStyle(act,'display','');
84 }
84 }
85 });
85 });
86 })
86 })
87 </script>
87 </script>
88 </div>
88 </div>
89 </%def>
89 </%def>
@@ -1,46 +1,46 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${_('%s File Diff') % c.repo_name} &middot; ${c.rhodecode_name}
4 ${_('%s File Diff') % c.repo_name} &middot; ${c.rhodecode_name}
5 </%def>
5 </%def>
6
6
7 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
8 ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
8 ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
9 </%def>
9 </%def>
10
10
11 <%def name="page_nav()">
11 <%def name="page_nav()">
12 ${self.menu('files')}
12 ${self.menu('repositories')}
13 </%def>
13 </%def>
14
14
15 <%def name="main()">
15 <%def name="main()">
16 ${self.context_bar('files')}
16 ${self.context_bar('files')}
17 <div class="box">
17 <div class="box">
18 <!-- box / title -->
18 <!-- box / title -->
19 <div class="title">
19 <div class="title">
20 ${self.breadcrumbs()}
20 ${self.breadcrumbs()}
21 </div>
21 </div>
22 <div>
22 <div>
23 ## diff block
23 ## diff block
24 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
24 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
25 ${diff_block.diff_block(c.changes)}
25 ${diff_block.diff_block(c.changes)}
26 </div>
26 </div>
27 </div>
27 </div>
28
28
29 <script>
29 <script>
30 YUE.onDOMReady(function(){
30 YUE.onDOMReady(function(){
31
31
32 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
32 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
33 var act = e.currentTarget.nextElementSibling;
33 var act = e.currentTarget.nextElementSibling;
34
34
35 if(YUD.hasClass(act,'active')){
35 if(YUD.hasClass(act,'active')){
36 YUD.removeClass(act,'active');
36 YUD.removeClass(act,'active');
37 YUD.setStyle(act,'display','none');
37 YUD.setStyle(act,'display','none');
38 }else{
38 }else{
39 YUD.addClass(act,'active');
39 YUD.addClass(act,'active');
40 YUD.setStyle(act,'display','');
40 YUD.setStyle(act,'display','');
41 }
41 }
42 });
42 });
43
43
44 })
44 })
45 </script>
45 </script>
46 </%def>
46 </%def>
@@ -1,163 +1,163 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title(*args)">
3 <%def name="title(*args)">
4 ${_('%s Files') % c.repo_name}
4 ${_('%s Files') % c.repo_name}
5 %if hasattr(c,'file'):
5 %if hasattr(c,'file'):
6 &middot; ${c.file.path or '\\'}
6 &middot; ${c.file.path or '\\'}
7 %endif
7 %endif
8 &middot; ${c.rhodecode_name}
8 &middot; ${c.rhodecode_name}
9 </%def>
9 </%def>
10
10
11 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
12 ${_('Files')}
12 ${_('Files')}
13 %if c.file:
13 %if c.file:
14 @ ${h.show_id(c.changeset)}
14 @ ${h.show_id(c.changeset)}
15 %endif
15 %endif
16 </%def>
16 </%def>
17
17
18 <%def name="page_nav()">
18 <%def name="page_nav()">
19 ${self.menu('files')}
19 ${self.menu('repositories')}
20 </%def>
20 </%def>
21
21
22 <%def name="main()">
22 <%def name="main()">
23 ${self.context_bar('files')}
23 ${self.context_bar('files')}
24 <div class="box">
24 <div class="box">
25 <!-- box / title -->
25 <!-- box / title -->
26 <div class="title">
26 <div class="title">
27 ${self.breadcrumbs()}
27 ${self.breadcrumbs()}
28 <ul class="links">
28 <ul class="links">
29 <li>
29 <li>
30 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
30 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
31 </li>
31 </li>
32 </ul>
32 </ul>
33 </div>
33 </div>
34 <div class="table">
34 <div class="table">
35 <div id="files_data">
35 <div id="files_data">
36 <%include file='files_ypjax.html'/>
36 <%include file='files_ypjax.html'/>
37 </div>
37 </div>
38 </div>
38 </div>
39 </div>
39 </div>
40
40
41 <script type="text/javascript">
41 <script type="text/javascript">
42 var CACHE = {};
42 var CACHE = {};
43 var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s
43 var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s
44 //used to construct links from the search list
44 //used to construct links from the search list
45 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
45 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
46 //send the nodelist request to this url
46 //send the nodelist request to this url
47 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
47 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
48 // send the node history requst to this url
48 // send the node history requst to this url
49 var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
49 var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
50
50
51 var ypjax_links = function(){
51 var ypjax_links = function(){
52 YUE.on(YUQ('.ypjax-link'), 'click',function(e){
52 YUE.on(YUQ('.ypjax-link'), 'click',function(e){
53
53
54 //don't do ypjax on middle click
54 //don't do ypjax on middle click
55 if(e.which == 2 || !History.enabled){
55 if(e.which == 2 || !History.enabled){
56 return true;
56 return true;
57 }
57 }
58
58
59 var el = e.currentTarget;
59 var el = e.currentTarget;
60 var url = el.href;
60 var url = el.href;
61
61
62 var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
62 var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
63 _base_url = _base_url.replace('//','/')
63 _base_url = _base_url.replace('//','/')
64
64
65 //extract rev and the f_path from url.
65 //extract rev and the f_path from url.
66 parts = url.split(_base_url)
66 parts = url.split(_base_url)
67 if(parts.length != 2){
67 if(parts.length != 2){
68 return false;
68 return false;
69 }
69 }
70
70
71 var parts2 = parts[1].split('/');
71 var parts2 = parts[1].split('/');
72 var rev = parts2.shift(); // pop the first element which is the revision
72 var rev = parts2.shift(); // pop the first element which is the revision
73 var f_path = parts2.join('/');
73 var f_path = parts2.join('/');
74
74
75 //page title make this consistent with title() mako function on top
75 //page title make this consistent with title() mako function on top
76 var title = "${_('%s Files') % c.repo_name}" + " &middot; " + (f_path || '\\') + " &middot; " + "${c.rhodecode_name}";
76 var title = "${_('%s Files') % c.repo_name}" + " &middot; " + (f_path || '\\') + " &middot; " + "${c.rhodecode_name}";
77
77
78 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
78 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
79 var _url_base = url_base.replace('__REV__',rev);
79 var _url_base = url_base.replace('__REV__',rev);
80
80
81 // Change our States and save some data for handling events
81 // Change our States and save some data for handling events
82 var data = {url:url,title:title, url_base:_url_base,
82 var data = {url:url,title:title, url_base:_url_base,
83 node_list_url:_node_list_url, rev:rev, f_path:f_path};
83 node_list_url:_node_list_url, rev:rev, f_path:f_path};
84 History.pushState(data, title, url);
84 History.pushState(data, title, url);
85
85
86 //now we're sure that we can do ypjax things
86 //now we're sure that we can do ypjax things
87 YUE.preventDefault(e);
87 YUE.preventDefault(e);
88 return false;
88 return false;
89 });
89 });
90 }
90 }
91
91
92 var callbacks = function(State){
92 var callbacks = function(State){
93 ypjax_links();
93 ypjax_links();
94 tooltip_activate();
94 tooltip_activate();
95 fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
95 fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
96
96
97 if(YUD.get('hlcode')){
97 if(YUD.get('hlcode')){
98 YUE.on('hlcode', 'mouseup', getSelectionLink);
98 YUE.on('hlcode', 'mouseup', getSelectionLink);
99 }
99 }
100 //console.log(State);
100 //console.log(State);
101 if(YUD.get('load_node_history')){
101 if(YUD.get('load_node_history')){
102 //remove all listeners due to problems of history state
102 //remove all listeners due to problems of history state
103 YUE.removeListener('load_node_history', 'click');
103 YUE.removeListener('load_node_history', 'click');
104 YUE.on('load_node_history', 'click', function(e){
104 YUE.on('load_node_history', 'click', function(e){
105 var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path);
105 var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path);
106 ypjax(_url, 'node_history', function(o){
106 ypjax(_url, 'node_history', function(o){
107 tooltip_activate();
107 tooltip_activate();
108 })
108 })
109 });
109 });
110 }
110 }
111 // Inform Google Analytics of the change
111 // Inform Google Analytics of the change
112 if ( typeof window.pageTracker !== 'undefined' ) {
112 if ( typeof window.pageTracker !== 'undefined' ) {
113 window.pageTracker._trackPageview(State.url);
113 window.pageTracker._trackPageview(State.url);
114 }
114 }
115 }
115 }
116
116
117 YUE.onDOMReady(function(){
117 YUE.onDOMReady(function(){
118 ypjax_links();
118 ypjax_links();
119 var container = 'files_data';
119 var container = 'files_data';
120 //Bind to StateChange Event
120 //Bind to StateChange Event
121 History.Adapter.bind(window,'statechange',function(){
121 History.Adapter.bind(window,'statechange',function(){
122 var State = History.getState();
122 var State = History.getState();
123 cache_key = State.url;
123 cache_key = State.url;
124 //check if we have this request in cache maybe ?
124 //check if we have this request in cache maybe ?
125 var _cache_obj = CACHE[cache_key];
125 var _cache_obj = CACHE[cache_key];
126 var _cur_time = new Date().getTime();
126 var _cur_time = new Date().getTime();
127 // get from cache if it's there and not yet expired !
127 // get from cache if it's there and not yet expired !
128 if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
128 if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
129 YUD.get(container).innerHTML=_cache_obj[1];
129 YUD.get(container).innerHTML=_cache_obj[1];
130 YUD.setStyle(container,'opacity','1.0');
130 YUD.setStyle(container,'opacity','1.0');
131
131
132 //callbacks after ypjax call
132 //callbacks after ypjax call
133 callbacks(State);
133 callbacks(State);
134 }
134 }
135 else{
135 else{
136 ypjax(State.url,container,function(o){
136 ypjax(State.url,container,function(o){
137 //callbacks after ypjax call
137 //callbacks after ypjax call
138 callbacks(State);
138 callbacks(State);
139 if (o !== undefined){
139 if (o !== undefined){
140 //store our request in cache
140 //store our request in cache
141 var _expire_on = new Date().getTime()+CACHE_EXPIRE;
141 var _expire_on = new Date().getTime()+CACHE_EXPIRE;
142 CACHE[cache_key] = [_expire_on, o.responseText];
142 CACHE[cache_key] = [_expire_on, o.responseText];
143 }
143 }
144 });
144 });
145 }
145 }
146 });
146 });
147
147
148 // init the search filter
148 // init the search filter
149 var _State = {
149 var _State = {
150 url: "${h.url.current()}",
150 url: "${h.url.current()}",
151 data: {
151 data: {
152 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
152 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
153 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
153 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
154 rev:"${c.changeset.raw_id}",
154 rev:"${c.changeset.raw_id}",
155 f_path: "${h.safe_unicode(c.file.path)}"
155 f_path: "${h.safe_unicode(c.file.path)}"
156 }
156 }
157 }
157 }
158 fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
158 fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
159 });
159 });
160
160
161 </script>
161 </script>
162
162
163 </%def>
163 </%def>
@@ -1,29 +1,29 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Followers') % c.repo_name} &middot; ${c.rhodecode_name}
5 ${_('%s Followers') % c.repo_name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${_('Followers')}
9 ${_('Followers')}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('followers')}
13 ${self.menu('repositories')}
14 </%def>
14 </%def>
15 <%def name="main()">
15 <%def name="main()">
16 ${self.context_bar('followers')}
16 ${self.context_bar('followers')}
17 <div class="box">
17 <div class="box">
18 <!-- box / title -->
18 <!-- box / title -->
19 <div class="title">
19 <div class="title">
20 ${self.breadcrumbs()}
20 ${self.breadcrumbs()}
21 </div>
21 </div>
22 <!-- end box / title -->
22 <!-- end box / title -->
23 <div class="table">
23 <div class="table">
24 <div id="followers">
24 <div id="followers">
25 ${c.followers_data}
25 ${c.followers_data}
26 </div>
26 </div>
27 </div>
27 </div>
28 </div>
28 </div>
29 </%def>
29 </%def>
@@ -1,8 +1,17 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/base.html"/>
2 <%inherit file="base/base.html"/>
3 <%def name="title()">${_('Dashboard')} &middot; ${c.rhodecode_name}</%def>
3
4 <%def name="breadcrumbs()"></%def>
4 <%def name="title()">
5 <%def name="page_nav()">${self.menu('home')}</%def>
5 ${_('Dashboard')} &middot; ${c.rhodecode_name}
6 </%def>
7
8 <%def name="breadcrumbs()">
9 </%def>
10
11 <%def name="page_nav()">
12 ${self.menu('repositories')}
13 </%def>
14
6 <%def name="main()">
15 <%def name="main()">
7 <%include file="index_base.html" args="parent=self"/>
16 <%include file="index_base.html" args="parent=self"/>
8 </%def>
17 </%def>
@@ -1,87 +1,87 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 %if c.repo_name:
5 %if c.repo_name:
6 ${_('Search repository')} ${c.repo_name} &middot; ${c.rhodecode_name}
6 ${_('Search repository')} ${c.repo_name} &middot; ${c.rhodecode_name}
7 %else:
7 %else:
8 ${_('Search in all repositories')}
8 ${_('Search in all repositories')}
9 %endif
9 %endif
10 </%def>
10 </%def>
11
11
12 <%def name="breadcrumbs_links()">
12 <%def name="breadcrumbs_links()">
13 %if c.repo_name:
13 %if c.repo_name:
14 ${_('Search')}
14 ${_('Search')}
15 %else:
15 %else:
16 ${_('Search in all repositories')}
16 ${_('Search in all repositories')}
17 %endif
17 %endif
18 %if c.cur_query:
18 %if c.cur_query:
19 &raquo;
19 &raquo;
20 ${c.cur_query}
20 ${c.cur_query}
21 %endif
21 %endif
22 </%def>
22 </%def>
23
23
24 <%def name="page_nav()">
24 <%def name="page_nav()">
25 %if c.repo_name:
25 %if c.repo_name:
26 ${self.menu('options')}
26 ${self.menu('repositories')}
27 %else:
27 %else:
28 ${self.menu('search')}
28 ${self.menu('search')}
29 %endif
29 %endif
30 </%def>
30 </%def>
31 <%def name="main()">
31 <%def name="main()">
32 ${self.context_bar('options')}
32 ${self.context_bar('options')}
33 <div class="box">
33 <div class="box">
34 <!-- box / title -->
34 <!-- box / title -->
35 <div class="title">
35 <div class="title">
36 ${self.breadcrumbs()}
36 ${self.breadcrumbs()}
37 </div>
37 </div>
38 <!-- end box / title -->
38 <!-- end box / title -->
39 %if c.repo_name:
39 %if c.repo_name:
40 ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')}
40 ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')}
41 %else:
41 %else:
42 ${h.form(h.url('search'),method='get')}
42 ${h.form(h.url('search'),method='get')}
43 %endif
43 %endif
44 <div class="form">
44 <div class="form">
45 <div class="fields">
45 <div class="fields">
46 <div class="field field-first field-noborder">
46 <div class="field field-first field-noborder">
47 <div class="label">
47 <div class="label">
48 <label for="q">${_('Search term')}</label>
48 <label for="q">${_('Search term')}</label>
49 </div>
49 </div>
50 <div class="input">${h.text('q',c.cur_query,class_="small")}
50 <div class="input">${h.text('q',c.cur_query,class_="small")}
51 <div class="button highlight">
51 <div class="button highlight">
52 <input type="submit" value="${_('Search')}" class="ui-button"/>
52 <input type="submit" value="${_('Search')}" class="ui-button"/>
53 </div>
53 </div>
54 </div>
54 </div>
55 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div>
55 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div>
56 </div>
56 </div>
57
57
58 <div class="field">
58 <div class="field">
59 <div class="label">
59 <div class="label">
60 <label for="type">${_('Search in')}</label>
60 <label for="type">${_('Search in')}</label>
61 </div>
61 </div>
62 <div class="select">
62 <div class="select">
63 ${h.select('type',c.cur_type,[('content',_('File contents')),
63 ${h.select('type',c.cur_type,[('content',_('File contents')),
64 ('commit',_('Commit messages')),
64 ('commit',_('Commit messages')),
65 ('path',_('File names')),
65 ('path',_('File names')),
66 ##('repository',_('Repository names')),
66 ##('repository',_('Repository names')),
67 ])}
67 ])}
68 </div>
68 </div>
69 </div>
69 </div>
70
70
71 </div>
71 </div>
72 </div>
72 </div>
73 ${h.end_form()}
73 ${h.end_form()}
74 <div class="search">
74 <div class="search">
75 %if c.cur_type == 'content':
75 %if c.cur_type == 'content':
76 <%include file='search_content.html'/>
76 <%include file='search_content.html'/>
77 %elif c.cur_type == 'path':
77 %elif c.cur_type == 'path':
78 <%include file='search_path.html'/>
78 <%include file='search_path.html'/>
79 %elif c.cur_type == 'commit':
79 %elif c.cur_type == 'commit':
80 <%include file='search_commit.html'/>
80 <%include file='search_commit.html'/>
81 %elif c.cur_type == 'repository':
81 %elif c.cur_type == 'repository':
82 <%include file='search_repository.html'/>
82 <%include file='search_repository.html'/>
83 %endif
83 %endif
84 </div>
84 </div>
85 </div>
85 </div>
86
86
87 </%def>
87 </%def>
@@ -1,138 +1,138 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 ##
2 ##
3 ## See also repo_edit.html
3 ## See also repo_edit.html
4 ##
4 ##
5 <%inherit file="/base/base.html"/>
5 <%inherit file="/base/base.html"/>
6
6
7 <%def name="title()">
7 <%def name="title()">
8 ${_('%s Settings') % c.repo_name} &middot; ${c.rhodecode_name}
8 ${_('%s Settings') % c.repo_name} &middot; ${c.rhodecode_name}
9 </%def>
9 </%def>
10
10
11 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
12 ${_('Settings')}
12 ${_('Settings')}
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('settings')}
16 ${self.menu('repositories')}
17 </%def>
17 </%def>
18
18
19 <%def name="main()">
19 <%def name="main()">
20 ${self.context_bar('options')}
20 ${self.context_bar('options')}
21 <div class="box">
21 <div class="box">
22 <!-- box / title -->
22 <!-- box / title -->
23 <div class="title">
23 <div class="title">
24 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
25 </div>
25 </div>
26 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
26 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
27 <div class="form">
27 <div class="form">
28 <!-- fields -->
28 <!-- fields -->
29 <div class="fields">
29 <div class="fields">
30 <div class="field">
30 <div class="field">
31 <div class="label">
31 <div class="label">
32 <label for="repo_name">${_('Name')}:</label>
32 <label for="repo_name">${_('Name')}:</label>
33 </div>
33 </div>
34 <div class="input">
34 <div class="input">
35 ${h.text('repo_name',class_="medium")}
35 ${h.text('repo_name',class_="medium")}
36 </div>
36 </div>
37 </div>
37 </div>
38 <div class="field">
38 <div class="field">
39 <div class="label">
39 <div class="label">
40 <label for="clone_uri">${_('Clone uri')}:</label>
40 <label for="clone_uri">${_('Clone uri')}:</label>
41 </div>
41 </div>
42 <div class="input">
42 <div class="input">
43 ${h.text('clone_uri',class_="medium")}
43 ${h.text('clone_uri',class_="medium")}
44 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
44 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
45 </div>
45 </div>
46 </div>
46 </div>
47 <div class="field">
47 <div class="field">
48 <div class="label">
48 <div class="label">
49 <label for="repo_group">${_('Repository group')}:</label>
49 <label for="repo_group">${_('Repository group')}:</label>
50 </div>
50 </div>
51 <div class="input">
51 <div class="input">
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
53 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
53 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
54 </div>
54 </div>
55 </div>
55 </div>
56 <div class="field">
56 <div class="field">
57 <div class="label">
57 <div class="label">
58 <label for="landing_rev">${_('Landing revision')}:</label>
58 <label for="landing_rev">${_('Landing revision')}:</label>
59 </div>
59 </div>
60 <div class="input">
60 <div class="input">
61 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
61 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
62 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
62 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
63 </div>
63 </div>
64 </div>
64 </div>
65 <div class="field">
65 <div class="field">
66 <div class="label label-textarea">
66 <div class="label label-textarea">
67 <label for="repo_description">${_('Description')}:</label>
67 <label for="repo_description">${_('Description')}:</label>
68 </div>
68 </div>
69 <div class="textarea text-area editor">
69 <div class="textarea text-area editor">
70 ${h.textarea('repo_description')}
70 ${h.textarea('repo_description')}
71 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
71 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
72 </div>
72 </div>
73 </div>
73 </div>
74
74
75 <div class="field">
75 <div class="field">
76 <div class="label label-checkbox">
76 <div class="label label-checkbox">
77 <label for="repo_private">${_('Private repository')}:</label>
77 <label for="repo_private">${_('Private repository')}:</label>
78 </div>
78 </div>
79 <div class="checkboxes">
79 <div class="checkboxes">
80 ${h.checkbox('repo_private',value="True")}
80 ${h.checkbox('repo_private',value="True")}
81 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
81 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
82 </div>
82 </div>
83 </div>
83 </div>
84 %if c.visual.repository_fields:
84 %if c.visual.repository_fields:
85 ## EXTRA FIELDS
85 ## EXTRA FIELDS
86 %for field in c.repo_fields:
86 %for field in c.repo_fields:
87 <div class="field">
87 <div class="field">
88 <div class="label">
88 <div class="label">
89 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
89 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
90 </div>
90 </div>
91 <div class="input input-medium">
91 <div class="input input-medium">
92 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
92 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
93 %if field.field_desc:
93 %if field.field_desc:
94 <span class="help-block">${field.field_desc}</span>
94 <span class="help-block">${field.field_desc}</span>
95 %endif
95 %endif
96 </div>
96 </div>
97 </div>
97 </div>
98 %endfor
98 %endfor
99 %endif
99 %endif
100 <div class="field">
100 <div class="field">
101 <div class="label">
101 <div class="label">
102 <label for="input">${_('Permissions')}:</label>
102 <label for="input">${_('Permissions')}:</label>
103 </div>
103 </div>
104 <div class="input">
104 <div class="input">
105 <%include file="../admin/repos/repo_edit_perms.html"/>
105 <%include file="../admin/repos/repo_edit_perms.html"/>
106 </div>
106 </div>
107 </div>
107 </div>
108
108
109 <div class="buttons">
109 <div class="buttons">
110 ${h.submit('save',_('Save'),class_="ui-btn large")}
110 ${h.submit('save',_('Save'),class_="ui-btn large")}
111 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
111 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
112 </div>
112 </div>
113
113
114 </div>
114 </div>
115 </div>
115 </div>
116 ${h.end_form()}
116 ${h.end_form()}
117
117
118 <h3>${_('Delete')}</h3>
118 <h3>${_('Delete')}</h3>
119 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
119 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
120 <div class="form">
120 <div class="form">
121 <div class="fields">
121 <div class="fields">
122 <div class="field" style="border:none;color:#888">
122 <div class="field" style="border:none;color:#888">
123 <div class="label">
123 <div class="label">
124 <label for="">${_('Remove repository')}:</label>
124 <label for="">${_('Remove repository')}:</label>
125 </div>
125 </div>
126 <div class="checkboxes">
126 <div class="checkboxes">
127 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
127 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
128 <ul>
128 <ul>
129 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
129 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
130 </ul>
130 </ul>
131 </div>
131 </div>
132 </div>
132 </div>
133 </div>
133 </div>
134 </div>
134 </div>
135 ${h.end_form()}
135 ${h.end_form()}
136
136
137 </div>
137 </div>
138 </%def>
138 </%def>
@@ -1,36 +1,37 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Lightweight Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
5 ${_('%s Lightweight Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 %if c.file_history:
10 %if c.file_history:
11 ${h.link_to(_('Lightweight Changelog'),h.url('shortlog_home',repo_name=c.repo_name))}
11 ${h.link_to(_('Lightweight Changelog'),h.url('shortlog_home',repo_name=c.repo_name))}
12 &raquo;
12 &raquo;
13 ${c.file_history}
13 ${c.file_history}
14 %else:
14 %else:
15 ${_('Lightweight Changelog')}
15 ${_('Lightweight Changelog')}
16 %endif
16 %endif
17 </%def>
17 </%def>
18
18
19 <%def name="page_nav()">
19 <%def name="page_nav()">
20 ${self.menu('shortlog')}
20 ${self.menu('repositories')}
21 </%def>
21 </%def>
22
22 <%def name="main()">
23 <%def name="main()">
23 ${self.context_bar('options')}
24 ${self.context_bar('options')}
24 <div class="box">
25 <div class="box">
25 <!-- box / title -->
26 <!-- box / title -->
26 <div class="title">
27 <div class="title">
27 ${self.breadcrumbs()}
28 ${self.breadcrumbs()}
28 </div>
29 </div>
29 <!-- end box / title -->
30 <!-- end box / title -->
30 <div class="table">
31 <div class="table">
31 <div id="shortlog_data">
32 <div id="shortlog_data">
32 ${c.shortlog_data}
33 ${c.shortlog_data}
33 </div>
34 </div>
34 </div>
35 </div>
35 </div>
36 </div>
36 </%def>
37 </%def>
@@ -1,739 +1,739 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${_('%s Summary') % c.repo_name} &middot; ${c.rhodecode_name}
4 ${_('%s Summary') % c.repo_name} &middot; ${c.rhodecode_name}
5 </%def>
5 </%def>
6
6
7 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
8 ${_('Summary')}
8 ${_('Summary')}
9 </%def>
9 </%def>
10
10
11 <%def name="page_nav()">
11 <%def name="page_nav()">
12 ${self.menu('summary')}
12 ${self.menu('repositories')}
13 </%def>
13 </%def>
14
14
15 <%def name="head_extra()">
15 <%def name="head_extra()">
16 <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" />
16 <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" />
17 <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" />
17 <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" />
18 </%def>
18 </%def>
19
19
20 <%def name="main()">
20 <%def name="main()">
21 ${self.context_bar('summary')}
21 ${self.context_bar('summary')}
22 <%
22 <%
23 summary = lambda n:{False:'summary-short'}.get(n)
23 summary = lambda n:{False:'summary-short'}.get(n)
24 %>
24 %>
25 %if c.show_stats:
25 %if c.show_stats:
26 <div class="box box-left">
26 <div class="box box-left">
27 %else:
27 %else:
28 <div class="box">
28 <div class="box">
29 %endif
29 %endif
30 <!-- box / title -->
30 <!-- box / title -->
31 <div class="title">
31 <div class="title">
32 ${self.breadcrumbs()}
32 ${self.breadcrumbs()}
33 </div>
33 </div>
34 <!-- end box / title -->
34 <!-- end box / title -->
35 <div class="form">
35 <div class="form">
36 <div id="summary" class="fields">
36 <div id="summary" class="fields">
37
37
38 <div class="field">
38 <div class="field">
39 <div class="label-summary">
39 <div class="label-summary">
40 <label>${_('Name')}:</label>
40 <label>${_('Name')}:</label>
41 </div>
41 </div>
42 <div class="input ${summary(c.show_stats)}">
42 <div class="input ${summary(c.show_stats)}">
43
43
44 ## locking icon
44 ## locking icon
45 %if c.rhodecode_db_repo.enable_locking:
45 %if c.rhodecode_db_repo.enable_locking:
46 %if c.rhodecode_db_repo.locked[0]:
46 %if c.rhodecode_db_repo.locked[0]:
47 <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>
47 <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>
48 %else:
48 %else:
49 <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
49 <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
50 %endif
50 %endif
51 %endif
51 %endif
52 ##REPO TYPE
52 ##REPO TYPE
53 %if h.is_hg(c.dbrepo):
53 %if h.is_hg(c.dbrepo):
54 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
54 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
55 %endif
55 %endif
56 %if h.is_git(c.dbrepo):
56 %if h.is_git(c.dbrepo):
57 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
57 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
58 %endif
58 %endif
59
59
60 ##PUBLIC/PRIVATE
60 ##PUBLIC/PRIVATE
61 %if c.dbrepo.private:
61 %if c.dbrepo.private:
62 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
62 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
63 %else:
63 %else:
64 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
64 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
65 %endif
65 %endif
66
66
67 ##REPO NAME
67 ##REPO NAME
68 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
68 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
69
69
70 ##FORK
70 ##FORK
71 %if c.dbrepo.fork:
71 %if c.dbrepo.fork:
72 <div style="margin-top:5px;clear:both">
72 <div style="margin-top:5px;clear:both">
73 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
73 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
74 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
74 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
75 </a>
75 </a>
76 </div>
76 </div>
77 %endif
77 %endif
78 ##REMOTE
78 ##REMOTE
79 %if c.dbrepo.clone_uri:
79 %if c.dbrepo.clone_uri:
80 <div style="margin-top:5px;clear:both">
80 <div style="margin-top:5px;clear:both">
81 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/>
81 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/>
82 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
82 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
83 </a>
83 </a>
84 </div>
84 </div>
85 %endif
85 %endif
86 </div>
86 </div>
87 </div>
87 </div>
88
88
89 <div class="field">
89 <div class="field">
90 <div class="label-summary">
90 <div class="label-summary">
91 <label>${_('Description')}:</label>
91 <label>${_('Description')}:</label>
92 </div>
92 </div>
93 %if c.visual.stylify_metatags:
93 %if c.visual.stylify_metatags:
94 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div>
94 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div>
95 %else:
95 %else:
96 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
96 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
97 %endif
97 %endif
98 </div>
98 </div>
99
99
100 <div class="field">
100 <div class="field">
101 <div class="label-summary">
101 <div class="label-summary">
102 <label>${_('Contact')}:</label>
102 <label>${_('Contact')}:</label>
103 </div>
103 </div>
104 <div class="input ${summary(c.show_stats)}">
104 <div class="input ${summary(c.show_stats)}">
105 <div class="gravatar">
105 <div class="gravatar">
106 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
106 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
107 </div>
107 </div>
108 ${_('Username')}: ${c.dbrepo.user.username}<br/>
108 ${_('Username')}: ${c.dbrepo.user.username}<br/>
109 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
109 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
110 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
110 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
111 </div>
111 </div>
112 </div>
112 </div>
113
113
114 <div class="field">
114 <div class="field">
115 <div class="label-summary">
115 <div class="label-summary">
116 <label>${_('Clone url')}:</label>
116 <label>${_('Clone url')}:</label>
117 </div>
117 </div>
118 <div class="input ${summary(c.show_stats)}">
118 <div class="input ${summary(c.show_stats)}">
119 <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
119 <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
120 <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
120 <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
121 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
121 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
122 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
122 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
123 </div>
123 </div>
124 </div>
124 </div>
125
125
126 <div class="field">
126 <div class="field">
127 <div class="label-summary">
127 <div class="label-summary">
128 <label>${_('Trending files')}:</label>
128 <label>${_('Trending files')}:</label>
129 </div>
129 </div>
130 <div class="input ${summary(c.show_stats)}">
130 <div class="input ${summary(c.show_stats)}">
131 %if c.show_stats:
131 %if c.show_stats:
132 <div id="lang_stats"></div>
132 <div id="lang_stats"></div>
133 %else:
133 %else:
134 ${_('Statistics are disabled for this repository')}
134 ${_('Statistics are disabled for this repository')}
135 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
135 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
136 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
136 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
137 %endif
137 %endif
138 %endif
138 %endif
139 </div>
139 </div>
140 </div>
140 </div>
141
141
142 <div class="field">
142 <div class="field">
143 <div class="label-summary">
143 <div class="label-summary">
144 <label>${_('Download')}:</label>
144 <label>${_('Download')}:</label>
145 </div>
145 </div>
146 <div class="input ${summary(c.show_stats)}">
146 <div class="input ${summary(c.show_stats)}">
147 %if len(c.rhodecode_repo.revisions) == 0:
147 %if len(c.rhodecode_repo.revisions) == 0:
148 ${_('There are no downloads yet')}
148 ${_('There are no downloads yet')}
149 %elif c.enable_downloads is False:
149 %elif c.enable_downloads is False:
150 ${_('Downloads are disabled for this repository')}
150 ${_('Downloads are disabled for this repository')}
151 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
151 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
152 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
152 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
153 %endif
153 %endif
154 %else:
154 %else:
155 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
155 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
156 <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span>
156 <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span>
157 <span style="vertical-align: bottom">
157 <span style="vertical-align: bottom">
158 <input id="archive_subrepos" type="checkbox" name="subrepos" />
158 <input id="archive_subrepos" type="checkbox" name="subrepos" />
159 <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label>
159 <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label>
160 </span>
160 </span>
161 %endif
161 %endif
162 </div>
162 </div>
163 </div>
163 </div>
164 </div>
164 </div>
165 <div id="summary-menu-stats">
165 <div id="summary-menu-stats">
166 <ul>
166 <ul>
167 <li>
167 <li>
168 <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
168 <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
169 ${_('Followers')}
169 ${_('Followers')}
170 <span style="float:right" id="current_followers_count">${c.repository_followers}</span>
170 <span style="float:right" id="current_followers_count">${c.repository_followers}</span>
171 </a>
171 </a>
172 </li>
172 </li>
173 <li>
173 <li>
174 <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
174 <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
175 ${_('Forks')}
175 ${_('Forks')}
176 <span style="float:right">${c.repository_forks}</span>
176 <span style="float:right">${c.repository_forks}</span>
177 </a>
177 </a>
178 </li>
178 </li>
179
179
180 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
180 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
181 <li>
181 <li>
182 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
182 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
183 ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}
183 ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}
184 %else:
184 %else:
185 ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}
185 ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}
186 %endif
186 %endif
187 </li>
187 </li>
188 %endif
188 %endif
189
189
190 <li>
190 <li>
191 %if c.rhodecode_user.username != 'default':
191 %if c.rhodecode_user.username != 'default':
192 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')}
192 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')}
193 %else:
193 %else:
194 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')}
194 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')}
195 %endif
195 %endif
196 </li>
196 </li>
197
197
198 %if c.rhodecode_user.username != 'default':
198 %if c.rhodecode_user.username != 'default':
199 <li class="repo_size">
199 <li class="repo_size">
200 <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">${_('Repository Size')}</a>
200 <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">${_('Repository Size')}</a>
201 <span id="repo_size_2"></span>
201 <span id="repo_size_2"></span>
202 </li>
202 </li>
203 %endif
203 %endif
204 </ul>
204 </ul>
205 </div>
205 </div>
206 </div>
206 </div>
207 </div>
207 </div>
208
208
209 %if c.show_stats:
209 %if c.show_stats:
210 <div class="box box-right" style="min-height:455px">
210 <div class="box box-right" style="min-height:455px">
211 <!-- box / title -->
211 <!-- box / title -->
212 <div class="title">
212 <div class="title">
213 <h5>${_('Commit activity by day / author')}</h5>
213 <h5>${_('Commit activity by day / author')}</h5>
214 </div>
214 </div>
215
215
216 <div class="graph">
216 <div class="graph">
217 <div style="padding:0 10px 10px 17px;">
217 <div style="padding:0 10px 10px 17px;">
218 %if c.no_data:
218 %if c.no_data:
219 ${c.no_data_msg}
219 ${c.no_data_msg}
220 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
220 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
221 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
221 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
222 %endif
222 %endif
223 %else:
223 %else:
224 ${_('Stats gathered: ')} ${c.stats_percentage}%
224 ${_('Stats gathered: ')} ${c.stats_percentage}%
225 %endif
225 %endif
226 </div>
226 </div>
227 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
227 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
228 <div style="clear: both;height: 10px"></div>
228 <div style="clear: both;height: 10px"></div>
229 <div id="overview" style="width:450px;height:100px;float:left"></div>
229 <div id="overview" style="width:450px;height:100px;float:left"></div>
230
230
231 <div id="legend_data" style="clear:both;margin-top:10px;">
231 <div id="legend_data" style="clear:both;margin-top:10px;">
232 <div id="legend_container"></div>
232 <div id="legend_container"></div>
233 <div id="legend_choices">
233 <div id="legend_choices">
234 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
234 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
235 </div>
235 </div>
236 </div>
236 </div>
237 </div>
237 </div>
238 </div>
238 </div>
239 %endif
239 %endif
240
240
241 <div class="box">
241 <div class="box">
242 <div class="title">
242 <div class="title">
243 <div class="breadcrumbs">
243 <div class="breadcrumbs">
244 %if c.repo_changesets:
244 %if c.repo_changesets:
245 ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))}
245 ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))}
246 %else:
246 %else:
247 ${_('Quick start')}
247 ${_('Quick start')}
248 %endif
248 %endif
249 </div>
249 </div>
250 </div>
250 </div>
251 <div class="table">
251 <div class="table">
252 <div id="shortlog_data">
252 <div id="shortlog_data">
253 <%include file='../shortlog/shortlog_data.html'/>
253 <%include file='../shortlog/shortlog_data.html'/>
254 </div>
254 </div>
255 </div>
255 </div>
256 </div>
256 </div>
257
257
258 %if c.readme_data:
258 %if c.readme_data:
259 <div id="readme" class="anchor">
259 <div id="readme" class="anchor">
260 <div class="box" style="background-color: #FAFAFA">
260 <div class="box" style="background-color: #FAFAFA">
261 <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}">
261 <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}">
262 <div class="breadcrumbs">
262 <div class="breadcrumbs">
263 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
263 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
264 <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">&para;</a>
264 <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">&para;</a>
265 </div>
265 </div>
266 </div>
266 </div>
267 <div class="readme">
267 <div class="readme">
268 <div class="readme_box">
268 <div class="readme_box">
269 ${c.readme_data|n}
269 ${c.readme_data|n}
270 </div>
270 </div>
271 </div>
271 </div>
272 </div>
272 </div>
273 </div>
273 </div>
274 %endif
274 %endif
275
275
276 <script type="text/javascript">
276 <script type="text/javascript">
277 var clone_url = 'clone_url';
277 var clone_url = 'clone_url';
278 YUE.on(clone_url,'click',function(e){
278 YUE.on(clone_url,'click',function(e){
279 if(YUD.hasClass(clone_url,'selected')){
279 if(YUD.hasClass(clone_url,'selected')){
280 return
280 return
281 }
281 }
282 else{
282 else{
283 YUD.addClass(clone_url,'selected');
283 YUD.addClass(clone_url,'selected');
284 YUD.get(clone_url).select();
284 YUD.get(clone_url).select();
285 }
285 }
286 })
286 })
287
287
288 YUE.on('clone_by_name','click',function(e){
288 YUE.on('clone_by_name','click',function(e){
289 // show url by name and hide name button
289 // show url by name and hide name button
290 YUD.setStyle('clone_url','display','');
290 YUD.setStyle('clone_url','display','');
291 YUD.setStyle('clone_by_name','display','none');
291 YUD.setStyle('clone_by_name','display','none');
292
292
293 // hide url by id and show name button
293 // hide url by id and show name button
294 YUD.setStyle('clone_by_id','display','');
294 YUD.setStyle('clone_by_id','display','');
295 YUD.setStyle('clone_url_id','display','none');
295 YUD.setStyle('clone_url_id','display','none');
296
296
297 })
297 })
298 YUE.on('clone_by_id','click',function(e){
298 YUE.on('clone_by_id','click',function(e){
299
299
300 // show url by id and hide id button
300 // show url by id and hide id button
301 YUD.setStyle('clone_by_id','display','none');
301 YUD.setStyle('clone_by_id','display','none');
302 YUD.setStyle('clone_url_id','display','');
302 YUD.setStyle('clone_url_id','display','');
303
303
304 // hide url by name and show id button
304 // hide url by name and show id button
305 YUD.setStyle('clone_by_name','display','');
305 YUD.setStyle('clone_by_name','display','');
306 YUD.setStyle('clone_url','display','none');
306 YUD.setStyle('clone_url','display','none');
307 })
307 })
308
308
309
309
310 var tmpl_links = {};
310 var tmpl_links = {};
311 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
311 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
312 tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}';
312 tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}';
313 %endfor
313 %endfor
314
314
315 YUE.on(['download_options','archive_subrepos'],'change',function(e){
315 YUE.on(['download_options','archive_subrepos'],'change',function(e){
316 var sm = YUD.get('download_options');
316 var sm = YUD.get('download_options');
317 var new_cs = sm.options[sm.selectedIndex];
317 var new_cs = sm.options[sm.selectedIndex];
318
318
319 for(k in tmpl_links){
319 for(k in tmpl_links){
320 var s = YUD.get(k+'_link');
320 var s = YUD.get(k+'_link');
321 if(s){
321 if(s){
322 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
322 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
323 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
323 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
324 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
324 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
325
325
326 var url = tmpl_links[k].replace('__CS__',new_cs.value);
326 var url = tmpl_links[k].replace('__CS__',new_cs.value);
327 var subrepos = YUD.get('archive_subrepos').checked;
327 var subrepos = YUD.get('archive_subrepos').checked;
328 url = url.replace('__SUB__',subrepos);
328 url = url.replace('__SUB__',subrepos);
329 url = url.replace('__NAME__',title_tmpl);
329 url = url.replace('__NAME__',title_tmpl);
330 s.innerHTML = url
330 s.innerHTML = url
331 }
331 }
332 }
332 }
333 });
333 });
334 </script>
334 </script>
335 %if c.show_stats:
335 %if c.show_stats:
336 <script type="text/javascript">
336 <script type="text/javascript">
337 var data = ${c.trending_languages|n};
337 var data = ${c.trending_languages|n};
338 var total = 0;
338 var total = 0;
339 var no_data = true;
339 var no_data = true;
340 var tbl = document.createElement('table');
340 var tbl = document.createElement('table');
341 tbl.setAttribute('class','trending_language_tbl');
341 tbl.setAttribute('class','trending_language_tbl');
342 var cnt = 0;
342 var cnt = 0;
343 for (var i=0;i<data.length;i++){
343 for (var i=0;i<data.length;i++){
344 total+= data[i][1].count;
344 total+= data[i][1].count;
345 }
345 }
346 for (var i=0;i<data.length;i++){
346 for (var i=0;i<data.length;i++){
347 cnt += 1;
347 cnt += 1;
348 no_data = false;
348 no_data = false;
349
349
350 var hide = cnt>2;
350 var hide = cnt>2;
351 var tr = document.createElement('tr');
351 var tr = document.createElement('tr');
352 if (hide){
352 if (hide){
353 tr.setAttribute('style','display:none');
353 tr.setAttribute('style','display:none');
354 tr.setAttribute('class','stats_hidden');
354 tr.setAttribute('class','stats_hidden');
355 }
355 }
356 var k = data[i][0];
356 var k = data[i][0];
357 var obj = data[i][1];
357 var obj = data[i][1];
358 var percentage = Math.round((obj.count/total*100),2);
358 var percentage = Math.round((obj.count/total*100),2);
359
359
360 var td1 = document.createElement('td');
360 var td1 = document.createElement('td');
361 td1.width = 150;
361 td1.width = 150;
362 var trending_language_label = document.createElement('div');
362 var trending_language_label = document.createElement('div');
363 trending_language_label.innerHTML = obj.desc+" ("+k+")";
363 trending_language_label.innerHTML = obj.desc+" ("+k+")";
364 td1.appendChild(trending_language_label);
364 td1.appendChild(trending_language_label);
365
365
366 var td2 = document.createElement('td');
366 var td2 = document.createElement('td');
367 td2.setAttribute('style','padding-right:14px !important');
367 td2.setAttribute('style','padding-right:14px !important');
368 var trending_language = document.createElement('div');
368 var trending_language = document.createElement('div');
369 var nr_files = obj.count+" ${_('files')}";
369 var nr_files = obj.count+" ${_('files')}";
370
370
371 trending_language.title = k+" "+nr_files;
371 trending_language.title = k+" "+nr_files;
372
372
373 if (percentage>22){
373 if (percentage>22){
374 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
374 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
375 }
375 }
376 else{
376 else{
377 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
377 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
378 }
378 }
379
379
380 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
380 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
381 trending_language.style.width=percentage+"%";
381 trending_language.style.width=percentage+"%";
382 td2.appendChild(trending_language);
382 td2.appendChild(trending_language);
383
383
384 tr.appendChild(td1);
384 tr.appendChild(td1);
385 tr.appendChild(td2);
385 tr.appendChild(td2);
386 tbl.appendChild(tr);
386 tbl.appendChild(tr);
387 if(cnt == 3){
387 if(cnt == 3){
388 var show_more = document.createElement('tr');
388 var show_more = document.createElement('tr');
389 var td = document.createElement('td');
389 var td = document.createElement('td');
390 lnk = document.createElement('a');
390 lnk = document.createElement('a');
391
391
392 lnk.href='#';
392 lnk.href='#';
393 lnk.innerHTML = "${_('show more')}";
393 lnk.innerHTML = "${_('show more')}";
394 lnk.id='code_stats_show_more';
394 lnk.id='code_stats_show_more';
395 td.appendChild(lnk);
395 td.appendChild(lnk);
396
396
397 show_more.appendChild(td);
397 show_more.appendChild(td);
398 show_more.appendChild(document.createElement('td'));
398 show_more.appendChild(document.createElement('td'));
399 tbl.appendChild(show_more);
399 tbl.appendChild(show_more);
400 }
400 }
401
401
402 }
402 }
403
403
404 YUD.get('lang_stats').appendChild(tbl);
404 YUD.get('lang_stats').appendChild(tbl);
405 YUE.on('code_stats_show_more','click',function(){
405 YUE.on('code_stats_show_more','click',function(){
406 l = YUD.getElementsByClassName('stats_hidden')
406 l = YUD.getElementsByClassName('stats_hidden')
407 for (e in l){
407 for (e in l){
408 YUD.setStyle(l[e],'display','');
408 YUD.setStyle(l[e],'display','');
409 };
409 };
410 YUD.setStyle(YUD.get('code_stats_show_more'),
410 YUD.setStyle(YUD.get('code_stats_show_more'),
411 'display','none');
411 'display','none');
412 });
412 });
413 </script>
413 </script>
414 <script type="text/javascript">
414 <script type="text/javascript">
415 /**
415 /**
416 * Plots summary graph
416 * Plots summary graph
417 *
417 *
418 * @class SummaryPlot
418 * @class SummaryPlot
419 * @param {from} initial from for detailed graph
419 * @param {from} initial from for detailed graph
420 * @param {to} initial to for detailed graph
420 * @param {to} initial to for detailed graph
421 * @param {dataset}
421 * @param {dataset}
422 * @param {overview_dataset}
422 * @param {overview_dataset}
423 */
423 */
424 function SummaryPlot(from,to,dataset,overview_dataset) {
424 function SummaryPlot(from,to,dataset,overview_dataset) {
425 var initial_ranges = {
425 var initial_ranges = {
426 "xaxis":{
426 "xaxis":{
427 "from":from,
427 "from":from,
428 "to":to,
428 "to":to,
429 },
429 },
430 };
430 };
431 var dataset = dataset;
431 var dataset = dataset;
432 var overview_dataset = [overview_dataset];
432 var overview_dataset = [overview_dataset];
433 var choiceContainer = YUD.get("legend_choices");
433 var choiceContainer = YUD.get("legend_choices");
434 var choiceContainerTable = YUD.get("legend_choices_tables");
434 var choiceContainerTable = YUD.get("legend_choices_tables");
435 var plotContainer = YUD.get('commit_history');
435 var plotContainer = YUD.get('commit_history');
436 var overviewContainer = YUD.get('overview');
436 var overviewContainer = YUD.get('overview');
437
437
438 var plot_options = {
438 var plot_options = {
439 bars: {show:true,align:'center',lineWidth:4},
439 bars: {show:true,align:'center',lineWidth:4},
440 legend: {show:true, container:"legend_container"},
440 legend: {show:true, container:"legend_container"},
441 points: {show:true,radius:0,fill:false},
441 points: {show:true,radius:0,fill:false},
442 yaxis: {tickDecimals:0,},
442 yaxis: {tickDecimals:0,},
443 xaxis: {
443 xaxis: {
444 mode: "time",
444 mode: "time",
445 timeformat: "%d/%m",
445 timeformat: "%d/%m",
446 min:from,
446 min:from,
447 max:to,
447 max:to,
448 },
448 },
449 grid: {
449 grid: {
450 hoverable: true,
450 hoverable: true,
451 clickable: true,
451 clickable: true,
452 autoHighlight:true,
452 autoHighlight:true,
453 color: "#999"
453 color: "#999"
454 },
454 },
455 //selection: {mode: "x"}
455 //selection: {mode: "x"}
456 };
456 };
457 var overview_options = {
457 var overview_options = {
458 legend:{show:false},
458 legend:{show:false},
459 bars: {show:true,barWidth: 2,},
459 bars: {show:true,barWidth: 2,},
460 shadowSize: 0,
460 shadowSize: 0,
461 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
461 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
462 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
462 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
463 grid: {color: "#999",},
463 grid: {color: "#999",},
464 selection: {mode: "x"}
464 selection: {mode: "x"}
465 };
465 };
466
466
467 /**
467 /**
468 *get dummy data needed in few places
468 *get dummy data needed in few places
469 */
469 */
470 function getDummyData(label){
470 function getDummyData(label){
471 return {"label":label,
471 return {"label":label,
472 "data":[{"time":0,
472 "data":[{"time":0,
473 "commits":0,
473 "commits":0,
474 "added":0,
474 "added":0,
475 "changed":0,
475 "changed":0,
476 "removed":0,
476 "removed":0,
477 }],
477 }],
478 "schema":["commits"],
478 "schema":["commits"],
479 "color":'#ffffff',
479 "color":'#ffffff',
480 }
480 }
481 }
481 }
482
482
483 /**
483 /**
484 * generate checkboxes accordindly to data
484 * generate checkboxes accordindly to data
485 * @param keys
485 * @param keys
486 * @returns
486 * @returns
487 */
487 */
488 function generateCheckboxes(data) {
488 function generateCheckboxes(data) {
489 //append checkboxes
489 //append checkboxes
490 var i = 0;
490 var i = 0;
491 choiceContainerTable.innerHTML = '';
491 choiceContainerTable.innerHTML = '';
492 for(var pos in data) {
492 for(var pos in data) {
493
493
494 data[pos].color = i;
494 data[pos].color = i;
495 i++;
495 i++;
496 if(data[pos].label != ''){
496 if(data[pos].label != ''){
497 choiceContainerTable.innerHTML +=
497 choiceContainerTable.innerHTML +=
498 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
498 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
499 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
499 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
500 }
500 }
501 }
501 }
502 }
502 }
503
503
504 /**
504 /**
505 * ToolTip show
505 * ToolTip show
506 */
506 */
507 function showTooltip(x, y, contents) {
507 function showTooltip(x, y, contents) {
508 var div=document.getElementById('tooltip');
508 var div=document.getElementById('tooltip');
509 if(!div) {
509 if(!div) {
510 div = document.createElement('div');
510 div = document.createElement('div');
511 div.id="tooltip";
511 div.id="tooltip";
512 div.style.position="absolute";
512 div.style.position="absolute";
513 div.style.border='1px solid #fdd';
513 div.style.border='1px solid #fdd';
514 div.style.padding='2px';
514 div.style.padding='2px';
515 div.style.backgroundColor='#fee';
515 div.style.backgroundColor='#fee';
516 document.body.appendChild(div);
516 document.body.appendChild(div);
517 }
517 }
518 YUD.setStyle(div, 'opacity', 0);
518 YUD.setStyle(div, 'opacity', 0);
519 div.innerHTML = contents;
519 div.innerHTML = contents;
520 div.style.top=(y + 5) + "px";
520 div.style.top=(y + 5) + "px";
521 div.style.left=(x + 5) + "px";
521 div.style.left=(x + 5) + "px";
522
522
523 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
523 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
524 anim.animate();
524 anim.animate();
525 }
525 }
526
526
527 /**
527 /**
528 * This function will detect if selected period has some changesets
528 * This function will detect if selected period has some changesets
529 for this user if it does this data is then pushed for displaying
529 for this user if it does this data is then pushed for displaying
530 Additionally it will only display users that are selected by the checkbox
530 Additionally it will only display users that are selected by the checkbox
531 */
531 */
532 function getDataAccordingToRanges(ranges) {
532 function getDataAccordingToRanges(ranges) {
533
533
534 var data = [];
534 var data = [];
535 var new_dataset = {};
535 var new_dataset = {};
536 var keys = [];
536 var keys = [];
537 var max_commits = 0;
537 var max_commits = 0;
538 for(var key in dataset){
538 for(var key in dataset){
539
539
540 for(var ds in dataset[key].data){
540 for(var ds in dataset[key].data){
541 commit_data = dataset[key].data[ds];
541 commit_data = dataset[key].data[ds];
542 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
542 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
543
543
544 if(new_dataset[key] === undefined){
544 if(new_dataset[key] === undefined){
545 new_dataset[key] = {data:[],schema:["commits"],label:key};
545 new_dataset[key] = {data:[],schema:["commits"],label:key};
546 }
546 }
547 new_dataset[key].data.push(commit_data);
547 new_dataset[key].data.push(commit_data);
548 }
548 }
549 }
549 }
550 if (new_dataset[key] !== undefined){
550 if (new_dataset[key] !== undefined){
551 data.push(new_dataset[key]);
551 data.push(new_dataset[key]);
552 }
552 }
553 }
553 }
554
554
555 if (data.length > 0){
555 if (data.length > 0){
556 return data;
556 return data;
557 }
557 }
558 else{
558 else{
559 //just return dummy data for graph to plot itself
559 //just return dummy data for graph to plot itself
560 return [getDummyData('')];
560 return [getDummyData('')];
561 }
561 }
562 }
562 }
563
563
564 /**
564 /**
565 * redraw using new checkbox data
565 * redraw using new checkbox data
566 */
566 */
567 function plotchoiced(e,args){
567 function plotchoiced(e,args){
568 var cur_data = args[0];
568 var cur_data = args[0];
569 var cur_ranges = args[1];
569 var cur_ranges = args[1];
570
570
571 var new_data = [];
571 var new_data = [];
572 var inputs = choiceContainer.getElementsByTagName("input");
572 var inputs = choiceContainer.getElementsByTagName("input");
573
573
574 //show only checked labels
574 //show only checked labels
575 for(var i=0; i<inputs.length; i++) {
575 for(var i=0; i<inputs.length; i++) {
576 var checkbox_key = inputs[i].name;
576 var checkbox_key = inputs[i].name;
577
577
578 if(inputs[i].checked){
578 if(inputs[i].checked){
579 for(var d in cur_data){
579 for(var d in cur_data){
580 if(cur_data[d].label == checkbox_key){
580 if(cur_data[d].label == checkbox_key){
581 new_data.push(cur_data[d]);
581 new_data.push(cur_data[d]);
582 }
582 }
583 }
583 }
584 }
584 }
585 else{
585 else{
586 //push dummy data to not hide the label
586 //push dummy data to not hide the label
587 new_data.push(getDummyData(checkbox_key));
587 new_data.push(getDummyData(checkbox_key));
588 }
588 }
589 }
589 }
590
590
591 var new_options = YAHOO.lang.merge(plot_options, {
591 var new_options = YAHOO.lang.merge(plot_options, {
592 xaxis: {
592 xaxis: {
593 min: cur_ranges.xaxis.from,
593 min: cur_ranges.xaxis.from,
594 max: cur_ranges.xaxis.to,
594 max: cur_ranges.xaxis.to,
595 mode:"time",
595 mode:"time",
596 timeformat: "%d/%m",
596 timeformat: "%d/%m",
597 },
597 },
598 });
598 });
599 if (!new_data){
599 if (!new_data){
600 new_data = [[0,1]];
600 new_data = [[0,1]];
601 }
601 }
602 // do the zooming
602 // do the zooming
603 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
603 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
604
604
605 plot.subscribe("plotselected", plotselected);
605 plot.subscribe("plotselected", plotselected);
606
606
607 //resubscribe plothover
607 //resubscribe plothover
608 plot.subscribe("plothover", plothover);
608 plot.subscribe("plothover", plothover);
609
609
610 // don't fire event on the overview to prevent eternal loop
610 // don't fire event on the overview to prevent eternal loop
611 overview.setSelection(cur_ranges, true);
611 overview.setSelection(cur_ranges, true);
612
612
613 }
613 }
614
614
615 /**
615 /**
616 * plot only selected items from overview
616 * plot only selected items from overview
617 * @param ranges
617 * @param ranges
618 * @returns
618 * @returns
619 */
619 */
620 function plotselected(ranges,cur_data) {
620 function plotselected(ranges,cur_data) {
621 //updates the data for new plot
621 //updates the data for new plot
622 var data = getDataAccordingToRanges(ranges);
622 var data = getDataAccordingToRanges(ranges);
623 generateCheckboxes(data);
623 generateCheckboxes(data);
624
624
625 var new_options = YAHOO.lang.merge(plot_options, {
625 var new_options = YAHOO.lang.merge(plot_options, {
626 xaxis: {
626 xaxis: {
627 min: ranges.xaxis.from,
627 min: ranges.xaxis.from,
628 max: ranges.xaxis.to,
628 max: ranges.xaxis.to,
629 mode:"time",
629 mode:"time",
630 timeformat: "%d/%m",
630 timeformat: "%d/%m",
631 },
631 },
632 });
632 });
633 // do the zooming
633 // do the zooming
634 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
634 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
635
635
636 plot.subscribe("plotselected", plotselected);
636 plot.subscribe("plotselected", plotselected);
637
637
638 //resubscribe plothover
638 //resubscribe plothover
639 plot.subscribe("plothover", plothover);
639 plot.subscribe("plothover", plothover);
640
640
641 // don't fire event on the overview to prevent eternal loop
641 // don't fire event on the overview to prevent eternal loop
642 overview.setSelection(ranges, true);
642 overview.setSelection(ranges, true);
643
643
644 //resubscribe choiced
644 //resubscribe choiced
645 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
645 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
646 }
646 }
647
647
648 var previousPoint = null;
648 var previousPoint = null;
649
649
650 function plothover(o) {
650 function plothover(o) {
651 var pos = o.pos;
651 var pos = o.pos;
652 var item = o.item;
652 var item = o.item;
653
653
654 //YUD.get("x").innerHTML = pos.x.toFixed(2);
654 //YUD.get("x").innerHTML = pos.x.toFixed(2);
655 //YUD.get("y").innerHTML = pos.y.toFixed(2);
655 //YUD.get("y").innerHTML = pos.y.toFixed(2);
656 if (item) {
656 if (item) {
657 if (previousPoint != item.datapoint) {
657 if (previousPoint != item.datapoint) {
658 previousPoint = item.datapoint;
658 previousPoint = item.datapoint;
659
659
660 var tooltip = YUD.get("tooltip");
660 var tooltip = YUD.get("tooltip");
661 if(tooltip) {
661 if(tooltip) {
662 tooltip.parentNode.removeChild(tooltip);
662 tooltip.parentNode.removeChild(tooltip);
663 }
663 }
664 var x = item.datapoint.x.toFixed(2);
664 var x = item.datapoint.x.toFixed(2);
665 var y = item.datapoint.y.toFixed(2);
665 var y = item.datapoint.y.toFixed(2);
666
666
667 if (!item.series.label){
667 if (!item.series.label){
668 item.series.label = 'commits';
668 item.series.label = 'commits';
669 }
669 }
670 var d = new Date(x*1000);
670 var d = new Date(x*1000);
671 var fd = d.toDateString()
671 var fd = d.toDateString()
672 var nr_commits = parseInt(y);
672 var nr_commits = parseInt(y);
673
673
674 var cur_data = dataset[item.series.label].data[item.dataIndex];
674 var cur_data = dataset[item.series.label].data[item.dataIndex];
675 var added = cur_data.added;
675 var added = cur_data.added;
676 var changed = cur_data.changed;
676 var changed = cur_data.changed;
677 var removed = cur_data.removed;
677 var removed = cur_data.removed;
678
678
679 var nr_commits_suffix = " ${_('commits')} ";
679 var nr_commits_suffix = " ${_('commits')} ";
680 var added_suffix = " ${_('files added')} ";
680 var added_suffix = " ${_('files added')} ";
681 var changed_suffix = " ${_('files changed')} ";
681 var changed_suffix = " ${_('files changed')} ";
682 var removed_suffix = " ${_('files removed')} ";
682 var removed_suffix = " ${_('files removed')} ";
683
683
684
684
685 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
685 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
686 if(added==1){added_suffix=" ${_('file added')} ";}
686 if(added==1){added_suffix=" ${_('file added')} ";}
687 if(changed==1){changed_suffix=" ${_('file changed')} ";}
687 if(changed==1){changed_suffix=" ${_('file changed')} ";}
688 if(removed==1){removed_suffix=" ${_('file removed')} ";}
688 if(removed==1){removed_suffix=" ${_('file removed')} ";}
689
689
690 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
690 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
691 +'<br/>'+
691 +'<br/>'+
692 nr_commits + nr_commits_suffix+'<br/>'+
692 nr_commits + nr_commits_suffix+'<br/>'+
693 added + added_suffix +'<br/>'+
693 added + added_suffix +'<br/>'+
694 changed + changed_suffix + '<br/>'+
694 changed + changed_suffix + '<br/>'+
695 removed + removed_suffix + '<br/>');
695 removed + removed_suffix + '<br/>');
696 }
696 }
697 }
697 }
698 else {
698 else {
699 var tooltip = YUD.get("tooltip");
699 var tooltip = YUD.get("tooltip");
700
700
701 if(tooltip) {
701 if(tooltip) {
702 tooltip.parentNode.removeChild(tooltip);
702 tooltip.parentNode.removeChild(tooltip);
703 }
703 }
704 previousPoint = null;
704 previousPoint = null;
705 }
705 }
706 }
706 }
707
707
708 /**
708 /**
709 * MAIN EXECUTION
709 * MAIN EXECUTION
710 */
710 */
711
711
712 var data = getDataAccordingToRanges(initial_ranges);
712 var data = getDataAccordingToRanges(initial_ranges);
713 generateCheckboxes(data);
713 generateCheckboxes(data);
714
714
715 //main plot
715 //main plot
716 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
716 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
717
717
718 //overview
718 //overview
719 var overview = YAHOO.widget.Flot(overviewContainer,
719 var overview = YAHOO.widget.Flot(overviewContainer,
720 overview_dataset, overview_options);
720 overview_dataset, overview_options);
721
721
722 //show initial selection on overview
722 //show initial selection on overview
723 overview.setSelection(initial_ranges);
723 overview.setSelection(initial_ranges);
724
724
725 plot.subscribe("plotselected", plotselected);
725 plot.subscribe("plotselected", plotselected);
726 plot.subscribe("plothover", plothover)
726 plot.subscribe("plothover", plothover)
727
727
728 overview.subscribe("plotselected", function (ranges) {
728 overview.subscribe("plotselected", function (ranges) {
729 plot.setSelection(ranges);
729 plot.setSelection(ranges);
730 });
730 });
731
731
732 // user choices on overview
732 // user choices on overview
733 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
733 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
734 }
734 }
735 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
735 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
736 </script>
736 </script>
737 %endif
737 %endif
738
738
739 </%def>
739 </%def>
@@ -1,90 +1,90 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Tags') % c.repo_name} &middot; ${c.rhodecode_name}
5 ${_('%s Tags') % c.repo_name} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
10 ${_('Tags')}
10 ${_('Tags')}
11 </%def>
11 </%def>
12
12
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 ${self.menu('tags')}
14 ${self.menu('repositories')}
15 </%def>
15 </%def>
16
16
17 <%def name="main()">
17 <%def name="main()">
18 ${self.context_bar('switch-to')}
18 ${self.context_bar('switch-to')}
19 <div class="box">
19 <div class="box">
20 <!-- box / title -->
20 <!-- box / title -->
21 <div class="title">
21 <div class="title">
22 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
23 </div>
23 </div>
24 <!-- end box / title -->
24 <!-- end box / title -->
25 %if c.repo_tags:
25 %if c.repo_tags:
26 <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div>
26 <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div>
27 %endif
27 %endif
28 <div class="table">
28 <div class="table">
29 <%include file='tags_data.html'/>
29 <%include file='tags_data.html'/>
30 </div>
30 </div>
31 </div>
31 </div>
32 <script type="text/javascript">
32 <script type="text/javascript">
33 YUE.on('compare_tags','click',function(e){
33 YUE.on('compare_tags','click',function(e){
34 YUE.preventDefault(e);
34 YUE.preventDefault(e);
35 var org = YUQ('input[name=compare_org]:checked')[0];
35 var org = YUQ('input[name=compare_org]:checked')[0];
36 var other = YUQ('input[name=compare_other]:checked')[0];
36 var other = YUQ('input[name=compare_other]:checked')[0];
37
37
38 if(org && other){
38 if(org && other){
39 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}";
39 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}";
40 var u = compare_url.replace('__ORG__',org.value)
40 var u = compare_url.replace('__ORG__',org.value)
41 .replace('__OTHER__',other.value);
41 .replace('__OTHER__',other.value);
42 window.location=u;
42 window.location=u;
43 }
43 }
44 });
44 });
45
45
46 // main table sorting
46 // main table sorting
47 var myColumnDefs = [
47 var myColumnDefs = [
48 {key:"name",label:"${_('Name')}",sortable:true},
48 {key:"name",label:"${_('Name')}",sortable:true},
49 {key:"date",label:"${_('Date')}",sortable:true,
49 {key:"date",label:"${_('Date')}",sortable:true,
50 sortOptions: { sortFunction: dateSort }},
50 sortOptions: { sortFunction: dateSort }},
51 {key:"author",label:"${_('Author')}",sortable:true},
51 {key:"author",label:"${_('Author')}",sortable:true},
52 {key:"revision",label:"${_('Revision')}",sortable:true,
52 {key:"revision",label:"${_('Revision')}",sortable:true,
53 sortOptions: { sortFunction: revisionSort }},
53 sortOptions: { sortFunction: revisionSort }},
54 {key:"compare",label:"${_('Compare')}",sortable:false,},
54 {key:"compare",label:"${_('Compare')}",sortable:false,},
55 ];
55 ];
56
56
57 var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data"));
57 var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data"));
58
58
59 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
59 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
60
60
61 myDataSource.responseSchema = {
61 myDataSource.responseSchema = {
62 fields: [
62 fields: [
63 {key:"name"},
63 {key:"name"},
64 {key:"date"},
64 {key:"date"},
65 {key:"author"},
65 {key:"author"},
66 {key:"revision"},
66 {key:"revision"},
67 {key:"compare"},
67 {key:"compare"},
68 ]
68 ]
69 };
69 };
70
70
71 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
71 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
72 {
72 {
73 sortedBy:{key:"name",dir:"asc"},
73 sortedBy:{key:"name",dir:"asc"},
74 MSG_SORTASC:"${_('Click to sort ascending')}",
74 MSG_SORTASC:"${_('Click to sort ascending')}",
75 MSG_SORTDESC:"${_('Click to sort descending')}",
75 MSG_SORTDESC:"${_('Click to sort descending')}",
76 MSG_EMPTY:"${_('No records found.')}",
76 MSG_EMPTY:"${_('No records found.')}",
77 MSG_ERROR:"${_('Data error.')}",
77 MSG_ERROR:"${_('Data error.')}",
78 MSG_LOADING:"${_('Loading...')}",
78 MSG_LOADING:"${_('Loading...')}",
79 }
79 }
80 );
80 );
81 myDataTable.subscribe('postRenderEvent',function(oArgs) {
81 myDataTable.subscribe('postRenderEvent',function(oArgs) {
82 tooltip_activate();
82 tooltip_activate();
83 var func = function(node){
83 var func = function(node){
84 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
84 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
85 }
85 }
86 q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func);
86 q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func);
87 });
87 });
88
88
89 </script>
89 </script>
90 </%def>
90 </%def>
General Comments 0
You need to be logged in to leave comments. Login now