Show More
@@ -1,382 +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} · ${c.rhodecode_name} |
|
8 | ${_('Edit repository')} ${c.repo_info.repo_name} · ${c.rhodecode_name} | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
13 | » |
|
|||
14 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
|||
15 | » |
|
|||
16 | ${_('Settings')} |
|
12 | ${_('Settings')} | |
17 | </%def> |
|
13 | </%def> | |
18 |
|
14 | |||
19 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
20 | ${self.menu('options')} |
|
16 | ${self.menu('options')} | |
21 | </%def> |
|
17 | </%def> | |
22 |
|
18 | |||
23 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
24 | ${self.context_bar('options')} |
|
20 | ${self.context_bar('options')} | |
25 | <div class="box box-left"> |
|
21 | <div class="box box-left"> | |
26 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
27 | <div class="title"> |
|
23 | <div class="title"> | |
28 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
29 | </div> |
|
25 | </div> | |
30 | ${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')} | |
31 | <div class="form"> |
|
27 | <div class="form"> | |
32 | <!-- fields --> |
|
28 | <!-- fields --> | |
33 | <div class="fields"> |
|
29 | <div class="fields"> | |
34 | <div class="field"> |
|
30 | <div class="field"> | |
35 | <div class="label"> |
|
31 | <div class="label"> | |
36 | <label for="repo_name">${_('Name')}:</label> |
|
32 | <label for="repo_name">${_('Name')}:</label> | |
37 | </div> |
|
33 | </div> | |
38 | <div class="input"> |
|
34 | <div class="input"> | |
39 | ${h.text('repo_name',class_="medium")} |
|
35 | ${h.text('repo_name',class_="medium")} | |
40 | </div> |
|
36 | </div> | |
41 | </div> |
|
37 | </div> | |
42 | <div class="field"> |
|
38 | <div class="field"> | |
43 | <div class="label"> |
|
39 | <div class="label"> | |
44 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
40 | <label for="clone_uri">${_('Clone uri')}:</label> | |
45 | </div> |
|
41 | </div> | |
46 | <div class="input"> |
|
42 | <div class="input"> | |
47 | ${h.text('clone_uri',class_="medium")} |
|
43 | ${h.text('clone_uri',class_="medium")} | |
48 | <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> | |
49 | </div> |
|
45 | </div> | |
50 | </div> |
|
46 | </div> | |
51 | <div class="field"> |
|
47 | <div class="field"> | |
52 | <div class="label"> |
|
48 | <div class="label"> | |
53 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | <label for="repo_group">${_('Repository group')}:</label> | |
54 | </div> |
|
50 | </div> | |
55 | <div class="input"> |
|
51 | <div class="input"> | |
56 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
57 | <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> | |
58 | </div> |
|
54 | </div> | |
59 | </div> |
|
55 | </div> | |
60 | <div class="field"> |
|
56 | <div class="field"> | |
61 | <div class="label"> |
|
57 | <div class="label"> | |
62 | <label for="repo_type">${_('Type')}:</label> |
|
58 | <label for="repo_type">${_('Type')}:</label> | |
63 | </div> |
|
59 | </div> | |
64 | <div class="input"> |
|
60 | <div class="input"> | |
65 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
61 | ${h.select('repo_type','hg',c.backends,class_="medium")} | |
66 | </div> |
|
62 | </div> | |
67 | </div> |
|
63 | </div> | |
68 | <div class="field"> |
|
64 | <div class="field"> | |
69 | <div class="label"> |
|
65 | <div class="label"> | |
70 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> | |
71 | </div> |
|
67 | </div> | |
72 | <div class="input"> |
|
68 | <div class="input"> | |
73 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
74 | <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> | |
75 | </div> |
|
71 | </div> | |
76 | </div> |
|
72 | </div> | |
77 | <div class="field"> |
|
73 | <div class="field"> | |
78 | <div class="label label-textarea"> |
|
74 | <div class="label label-textarea"> | |
79 | <label for="repo_description">${_('Description')}:</label> |
|
75 | <label for="repo_description">${_('Description')}:</label> | |
80 | </div> |
|
76 | </div> | |
81 | <div class="textarea text-area editor"> |
|
77 | <div class="textarea text-area editor"> | |
82 | ${h.textarea('repo_description')} |
|
78 | ${h.textarea('repo_description')} | |
83 | <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> | |
84 | </div> |
|
80 | </div> | |
85 | </div> |
|
81 | </div> | |
86 |
|
82 | |||
87 | <div class="field"> |
|
83 | <div class="field"> | |
88 | <div class="label label-checkbox"> |
|
84 | <div class="label label-checkbox"> | |
89 | <label for="repo_private">${_('Private repository')}:</label> |
|
85 | <label for="repo_private">${_('Private repository')}:</label> | |
90 | </div> |
|
86 | </div> | |
91 | <div class="checkboxes"> |
|
87 | <div class="checkboxes"> | |
92 | ${h.checkbox('repo_private',value="True")} |
|
88 | ${h.checkbox('repo_private',value="True")} | |
93 | <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> | |
94 | </div> |
|
90 | </div> | |
95 | </div> |
|
91 | </div> | |
96 | <div class="field"> |
|
92 | <div class="field"> | |
97 | <div class="label label-checkbox"> |
|
93 | <div class="label label-checkbox"> | |
98 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
99 | </div> |
|
95 | </div> | |
100 | <div class="checkboxes"> |
|
96 | <div class="checkboxes"> | |
101 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
97 | ${h.checkbox('repo_enable_statistics',value="True")} | |
102 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
103 | </div> |
|
99 | </div> | |
104 | </div> |
|
100 | </div> | |
105 | <div class="field"> |
|
101 | <div class="field"> | |
106 | <div class="label label-checkbox"> |
|
102 | <div class="label label-checkbox"> | |
107 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
108 | </div> |
|
104 | </div> | |
109 | <div class="checkboxes"> |
|
105 | <div class="checkboxes"> | |
110 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
106 | ${h.checkbox('repo_enable_downloads',value="True")} | |
111 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
112 | </div> |
|
108 | </div> | |
113 | </div> |
|
109 | </div> | |
114 | <div class="field"> |
|
110 | <div class="field"> | |
115 | <div class="label label-checkbox"> |
|
111 | <div class="label label-checkbox"> | |
116 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> | |
117 | </div> |
|
113 | </div> | |
118 | <div class="checkboxes"> |
|
114 | <div class="checkboxes"> | |
119 | ${h.checkbox('repo_enable_locking',value="True")} |
|
115 | ${h.checkbox('repo_enable_locking',value="True")} | |
120 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
121 | </div> |
|
117 | </div> | |
122 | </div> |
|
118 | </div> | |
123 | <div class="field"> |
|
119 | <div class="field"> | |
124 | <div class="label"> |
|
120 | <div class="label"> | |
125 | <label for="user">${_('Owner')}:</label> |
|
121 | <label for="user">${_('Owner')}:</label> | |
126 | </div> |
|
122 | </div> | |
127 | <div class="input input-medium ac"> |
|
123 | <div class="input input-medium ac"> | |
128 | <div class="perm_ac"> |
|
124 | <div class="perm_ac"> | |
129 | ${h.text('user',class_='yui-ac-input')} |
|
125 | ${h.text('user',class_='yui-ac-input')} | |
130 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
126 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
131 | <div id="owner_container"></div> |
|
127 | <div id="owner_container"></div> | |
132 | </div> |
|
128 | </div> | |
133 | </div> |
|
129 | </div> | |
134 | </div> |
|
130 | </div> | |
135 | %if c.visual.repository_fields: |
|
131 | %if c.visual.repository_fields: | |
136 | ## EXTRA FIELDS |
|
132 | ## EXTRA FIELDS | |
137 | %for field in c.repo_fields: |
|
133 | %for field in c.repo_fields: | |
138 | <div class="field"> |
|
134 | <div class="field"> | |
139 | <div class="label"> |
|
135 | <div class="label"> | |
140 | <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> | |
141 | </div> |
|
137 | </div> | |
142 | <div class="input input-medium"> |
|
138 | <div class="input input-medium"> | |
143 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
139 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
144 | %if field.field_desc: |
|
140 | %if field.field_desc: | |
145 | <span class="help-block">${field.field_desc}</span> |
|
141 | <span class="help-block">${field.field_desc}</span> | |
146 | %endif |
|
142 | %endif | |
147 | </div> |
|
143 | </div> | |
148 | </div> |
|
144 | </div> | |
149 | %endfor |
|
145 | %endfor | |
150 | %endif |
|
146 | %endif | |
151 | <div class="field"> |
|
147 | <div class="field"> | |
152 | <div class="label"> |
|
148 | <div class="label"> | |
153 | <label for="input">${_('Permissions')}:</label> |
|
149 | <label for="input">${_('Permissions')}:</label> | |
154 | </div> |
|
150 | </div> | |
155 | <div class="input"> |
|
151 | <div class="input"> | |
156 | <%include file="repo_edit_perms.html"/> |
|
152 | <%include file="repo_edit_perms.html"/> | |
157 | </div> |
|
153 | </div> | |
158 | </div> |
|
154 | </div> | |
159 |
|
155 | |||
160 | <div class="buttons"> |
|
156 | <div class="buttons"> | |
161 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
157 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
162 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
158 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
163 | </div> |
|
159 | </div> | |
164 | </div> |
|
160 | </div> | |
165 | </div> |
|
161 | </div> | |
166 | ${h.end_form()} |
|
162 | ${h.end_form()} | |
167 | </div> |
|
163 | </div> | |
168 |
|
164 | |||
169 | <div class="box box-right"> |
|
165 | <div class="box box-right"> | |
170 | <div class="title"> |
|
166 | <div class="title"> | |
171 | <h5>${_('Advanced settings')}</h5> |
|
167 | <h5>${_('Advanced settings')}</h5> | |
172 | </div> |
|
168 | </div> | |
173 |
|
169 | |||
174 | <h3>${_('Statistics')}</h3> |
|
170 | <h3>${_('Statistics')}</h3> | |
175 | ${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')} | |
176 | <div class="form"> |
|
172 | <div class="form"> | |
177 | <div class="fields"> |
|
173 | <div class="fields"> | |
178 | ${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')+"');")} | |
179 | <div class="field" style="border:none;color:#888"> |
|
175 | <div class="field" style="border:none;color:#888"> | |
180 | <ul> |
|
176 | <ul> | |
181 | <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> | |
182 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
178 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> | |
183 | </ul> |
|
179 | </ul> | |
184 | </div> |
|
180 | </div> | |
185 | </div> |
|
181 | </div> | |
186 | </div> |
|
182 | </div> | |
187 | ${h.end_form()} |
|
183 | ${h.end_form()} | |
188 |
|
184 | |||
189 | %if c.repo_info.clone_uri: |
|
185 | %if c.repo_info.clone_uri: | |
190 | <h3>${_('Remote')}</h3> |
|
186 | <h3>${_('Remote')}</h3> | |
191 | ${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')} | |
192 | <div class="form"> |
|
188 | <div class="form"> | |
193 | <div class="fields"> |
|
189 | <div class="fields"> | |
194 | ${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')+"');")} | |
195 | <div class="field" style="border:none"> |
|
191 | <div class="field" style="border:none"> | |
196 | <ul> |
|
192 | <ul> | |
197 | <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> | |
198 | </ul> |
|
194 | </ul> | |
199 | </div> |
|
195 | </div> | |
200 | </div> |
|
196 | </div> | |
201 | </div> |
|
197 | </div> | |
202 | ${h.end_form()} |
|
198 | ${h.end_form()} | |
203 | %endif |
|
199 | %endif | |
204 |
|
200 | |||
205 | <h3>${_('Cache')}</h3> |
|
201 | <h3>${_('Cache')}</h3> | |
206 | ${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')} | |
207 | <div class="form"> |
|
203 | <div class="form"> | |
208 | <div class="fields"> |
|
204 | <div class="fields"> | |
209 | ${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')+"');")} | |
210 | <div class="field" style="border:none;color:#888"> |
|
206 | <div class="field" style="border:none;color:#888"> | |
211 | <ul> |
|
207 | <ul> | |
212 | <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')} | |
213 | </li> |
|
209 | </li> | |
214 | </ul> |
|
210 | </ul> | |
215 | </div> |
|
211 | </div> | |
216 | <div class="field" style="border:none;"> |
|
212 | <div class="field" style="border:none;"> | |
217 | ${_('List of cached values')} |
|
213 | ${_('List of cached values')} | |
218 | <table> |
|
214 | <table> | |
219 | <tr> |
|
215 | <tr> | |
220 | <th>${_('Prefix')}</th> |
|
216 | <th>${_('Prefix')}</th> | |
221 | <th>${_('Key')}</th> |
|
217 | <th>${_('Key')}</th> | |
222 | <th>${_('Active')}</th> |
|
218 | <th>${_('Active')}</th> | |
223 | </tr> |
|
219 | </tr> | |
224 | %for cache in c.repo_info.cache_keys: |
|
220 | %for cache in c.repo_info.cache_keys: | |
225 | <tr> |
|
221 | <tr> | |
226 | <td>${cache.prefix or '-'}</td> |
|
222 | <td>${cache.prefix or '-'}</td> | |
227 | <td>${cache.cache_key}</td> |
|
223 | <td>${cache.cache_key}</td> | |
228 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
224 | <td>${h.bool2icon(cache.cache_active)}</td> | |
229 | </tr> |
|
225 | </tr> | |
230 | %endfor |
|
226 | %endfor | |
231 | </table> |
|
227 | </table> | |
232 | </div> |
|
228 | </div> | |
233 | </div> |
|
229 | </div> | |
234 | </div> |
|
230 | </div> | |
235 | ${h.end_form()} |
|
231 | ${h.end_form()} | |
236 |
|
232 | |||
237 | <h3>${_('Public journal')}</h3> |
|
233 | <h3>${_('Public journal')}</h3> | |
238 | ${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')} | |
239 | <div class="form"> |
|
235 | <div class="form"> | |
240 | ${h.hidden('auth_token',str(h.get_token()))} |
|
236 | ${h.hidden('auth_token',str(h.get_token()))} | |
241 | <div class="field"> |
|
237 | <div class="field"> | |
242 | %if c.in_public_journal: |
|
238 | %if c.in_public_journal: | |
243 | ${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")} | |
244 | %else: |
|
240 | %else: | |
245 | ${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")} | |
246 | %endif |
|
242 | %endif | |
247 | </div> |
|
243 | </div> | |
248 | <div class="field" style="border:none;color:#888"> |
|
244 | <div class="field" style="border:none;color:#888"> | |
249 | <ul> |
|
245 | <ul> | |
250 | <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')} | |
251 | </li> |
|
247 | </li> | |
252 | </ul> |
|
248 | </ul> | |
253 | </div> |
|
249 | </div> | |
254 | </div> |
|
250 | </div> | |
255 | ${h.end_form()} |
|
251 | ${h.end_form()} | |
256 |
|
252 | |||
257 | <h3>${_('Locking')}</h3> |
|
253 | <h3>${_('Locking')}</h3> | |
258 | ${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')} | |
259 | <div class="form"> |
|
255 | <div class="form"> | |
260 | <div class="fields"> |
|
256 | <div class="fields"> | |
261 | %if c.repo_info.locked[0]: |
|
257 | %if c.repo_info.locked[0]: | |
262 | ${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')+"');")} | |
263 | ${'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])))} | |
264 | %else: |
|
260 | %else: | |
265 | ${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')+"');")} | |
266 | ${_('Repository is not locked')} |
|
262 | ${_('Repository is not locked')} | |
267 | %endif |
|
263 | %endif | |
268 | </div> |
|
264 | </div> | |
269 | <div class="field" style="border:none;color:#888"> |
|
265 | <div class="field" style="border:none;color:#888"> | |
270 | <ul> |
|
266 | <ul> | |
271 | <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')} | |
272 | </li> |
|
268 | </li> | |
273 | </ul> |
|
269 | </ul> | |
274 | </div> |
|
270 | </div> | |
275 | </div> |
|
271 | </div> | |
276 | ${h.end_form()} |
|
272 | ${h.end_form()} | |
277 |
|
273 | |||
278 | <h3>${_('Set as fork of')}</h3> |
|
274 | <h3>${_('Set as fork of')}</h3> | |
279 | ${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')} | |
280 | <div class="form"> |
|
276 | <div class="form"> | |
281 | <div class="fields"> |
|
277 | <div class="fields"> | |
282 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
278 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} | |
283 | ${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",)} | |
284 | </div> |
|
280 | </div> | |
285 | <div class="field" style="border:none;color:#888"> |
|
281 | <div class="field" style="border:none;color:#888"> | |
286 | <ul> |
|
282 | <ul> | |
287 | <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> | |
288 | </ul> |
|
284 | </ul> | |
289 | </div> |
|
285 | </div> | |
290 | </div> |
|
286 | </div> | |
291 | ${h.end_form()} |
|
287 | ${h.end_form()} | |
292 |
|
288 | |||
293 | <h3>${_('Delete')}</h3> |
|
289 | <h3>${_('Delete')}</h3> | |
294 | ${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')} | |
295 | <div class="form"> |
|
291 | <div class="form"> | |
296 | <div class="fields"> |
|
292 | <div class="fields"> | |
297 | <div class="field" style="border:none;color:#888"> |
|
293 | <div class="field" style="border:none;color:#888"> | |
298 | ## <div class="label"> |
|
294 | ## <div class="label"> | |
299 | ## <label for="">${_('Remove repository')}:</label> |
|
295 | ## <label for="">${_('Remove repository')}:</label> | |
300 | ## </div> |
|
296 | ## </div> | |
301 | <div class="checkboxes"> |
|
297 | <div class="checkboxes"> | |
302 | ${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')+"');")} | |
303 | %if c.repo_info.forks.count(): |
|
299 | %if c.repo_info.forks.count(): | |
304 | - ${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()} | |
305 | <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> | |
306 | <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> | |
307 | %endif |
|
303 | %endif | |
308 | <ul> |
|
304 | <ul> | |
309 | <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> | |
310 | </ul> |
|
306 | </ul> | |
311 | </div> |
|
307 | </div> | |
312 | </div> |
|
308 | </div> | |
313 | </div> |
|
309 | </div> | |
314 | </div> |
|
310 | </div> | |
315 | ${h.end_form()} |
|
311 | ${h.end_form()} | |
316 | </div> |
|
312 | </div> | |
317 |
|
313 | |||
318 | ##TODO: this should be controlled by the VISUAL setting |
|
314 | ##TODO: this should be controlled by the VISUAL setting | |
319 | %if c.visual.repository_fields: |
|
315 | %if c.visual.repository_fields: | |
320 | <div class="box box-left" style="clear:left"> |
|
316 | <div class="box box-left" style="clear:left"> | |
321 | <!-- box / title --> |
|
317 | <!-- box / title --> | |
322 | <div class="title"> |
|
318 | <div class="title"> | |
323 | <h5>${_('Extra fields')}</h5> |
|
319 | <h5>${_('Extra fields')}</h5> | |
324 | </div> |
|
320 | </div> | |
325 |
|
321 | |||
326 | <div class="emails_wrap"> |
|
322 | <div class="emails_wrap"> | |
327 | <table class="noborder"> |
|
323 | <table class="noborder"> | |
328 | %for field in c.repo_fields: |
|
324 | %for field in c.repo_fields: | |
329 | <tr> |
|
325 | <tr> | |
330 | <td>${field.field_label} (${field.field_key})</td> |
|
326 | <td>${field.field_label} (${field.field_key})</td> | |
331 | <td>${field.field_type}</td> |
|
327 | <td>${field.field_type}</td> | |
332 | <td> |
|
328 | <td> | |
333 | ${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')} | |
334 | ${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, | |
335 | 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+"');")} | |
336 | ${h.end_form()} |
|
332 | ${h.end_form()} | |
337 | </td> |
|
333 | </td> | |
338 | </tr> |
|
334 | </tr> | |
339 | %endfor |
|
335 | %endfor | |
340 | </table> |
|
336 | </table> | |
341 | </div> |
|
337 | </div> | |
342 |
|
338 | |||
343 | ${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')} | |
344 | <div class="form"> |
|
340 | <div class="form"> | |
345 | <!-- fields --> |
|
341 | <!-- fields --> | |
346 | <div class="fields"> |
|
342 | <div class="fields"> | |
347 | <div class="field"> |
|
343 | <div class="field"> | |
348 | <div class="label"> |
|
344 | <div class="label"> | |
349 | <label for="new_field_key">${_('New field key')}:</label> |
|
345 | <label for="new_field_key">${_('New field key')}:</label> | |
350 | </div> |
|
346 | </div> | |
351 | <div class="input"> |
|
347 | <div class="input"> | |
352 | ${h.text('new_field_key', class_='small')} |
|
348 | ${h.text('new_field_key', class_='small')} | |
353 | </div> |
|
349 | </div> | |
354 | </div> |
|
350 | </div> | |
355 | <div class="field"> |
|
351 | <div class="field"> | |
356 | <div class="label"> |
|
352 | <div class="label"> | |
357 | <label for="new_field_label">${_('New field label')}:</label> |
|
353 | <label for="new_field_label">${_('New field label')}:</label> | |
358 | </div> |
|
354 | </div> | |
359 | <div class="input"> |
|
355 | <div class="input"> | |
360 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
356 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} | |
361 | </div> |
|
357 | </div> | |
362 | </div> |
|
358 | </div> | |
363 |
|
359 | |||
364 | <div class="field"> |
|
360 | <div class="field"> | |
365 | <div class="label"> |
|
361 | <div class="label"> | |
366 | <label for="new_field_desc">${_('New field description')}:</label> |
|
362 | <label for="new_field_desc">${_('New field description')}:</label> | |
367 | </div> |
|
363 | </div> | |
368 | <div class="input"> |
|
364 | <div class="input"> | |
369 | ${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'))} | |
370 | </div> |
|
366 | </div> | |
371 | </div> |
|
367 | </div> | |
372 |
|
368 | |||
373 | <div class="buttons"> |
|
369 | <div class="buttons"> | |
374 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
370 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
375 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
371 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
376 | </div> |
|
372 | </div> | |
377 | </div> |
|
373 | </div> | |
378 | </div> |
|
374 | </div> | |
379 | ${h.end_form()} |
|
375 | ${h.end_form()} | |
380 | </div> |
|
376 | </div> | |
381 | %endif |
|
377 | %endif | |
382 | </%def> |
|
378 | </%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)} · ${c.rhodecode_name} |
|
6 | ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} · ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 |
${_(' |
|
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('changelog')} | |
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">« ${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">« ${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)} »</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)} »</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,124 +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)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} · ${c.rhodecode_name} |
|
5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
10 | » |
|
|||
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
|||
12 | » |
|
|||
13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> 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)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} | |
14 | </%def> |
|
10 | </%def> | |
15 |
|
11 | |||
16 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
17 | ${self.menu('changelog')} |
|
13 | ${self.menu('changelog')} | |
18 | </%def> |
|
14 | </%def> | |
19 |
|
15 | |||
20 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
21 | ${self.context_bar('changelog')} |
|
17 | ${self.context_bar('changelog')} | |
22 | <div class="box"> |
|
18 | <div class="box"> | |
23 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
24 | <div class="title"> |
|
20 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
26 | </div> |
|
22 | </div> | |
27 | <div class="table"> |
|
23 | <div class="table"> | |
28 | <div id="body" class="diffblock"> |
|
24 | <div id="body" class="diffblock"> | |
29 | <div class="code-header"> |
|
25 | <div class="code-header"> | |
30 | <div> |
|
26 | <div> | |
31 | ${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)), | |
32 | 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) | |
33 | )} |
|
29 | )} | |
34 | </div> |
|
30 | </div> | |
35 | </div> |
|
31 | </div> | |
36 | </div> |
|
32 | </div> | |
37 | <div id="changeset_compare_view_content"> |
|
33 | <div id="changeset_compare_view_content"> | |
38 | <div class="container"> |
|
34 | <div class="container"> | |
39 | <table class="compare_view_commits noborder"> |
|
35 | <table class="compare_view_commits noborder"> | |
40 | %for cnt,cs in enumerate(c.cs_ranges): |
|
36 | %for cnt,cs in enumerate(c.cs_ranges): | |
41 | <tr> |
|
37 | <tr> | |
42 | <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> | |
43 | <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> | |
44 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
40 | <td><div class="author">${h.person(cs.author)}</div></td> | |
45 | <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> | |
46 | <td> |
|
42 | <td> | |
47 | %if c.statuses: |
|
43 | %if c.statuses: | |
48 | <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> | |
49 | %endif |
|
45 | %endif | |
50 | </td> |
|
46 | </td> | |
51 | <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> | |
52 | </tr> |
|
48 | </tr> | |
53 | %endfor |
|
49 | %endfor | |
54 | </table> |
|
50 | </table> | |
55 | </div> |
|
51 | </div> | |
56 | <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> | |
57 | <div class="cs_files"> |
|
53 | <div class="cs_files"> | |
58 | %for cs in c.cs_ranges: |
|
54 | %for cs in c.cs_ranges: | |
59 | <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> | |
60 | %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(): | |
61 | <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> | |
62 | %endfor |
|
58 | %endfor | |
63 | %endfor |
|
59 | %endfor | |
64 | </div> |
|
60 | </div> | |
65 | </div> |
|
61 | </div> | |
66 |
|
62 | |||
67 | </div> |
|
63 | </div> | |
68 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
64 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
69 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
65 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
70 | %for cs in c.cs_ranges: |
|
66 | %for cs in c.cs_ranges: | |
71 | ##${comment.comment_inline_form(cs)} |
|
67 | ##${comment.comment_inline_form(cs)} | |
72 | ## diff block |
|
68 | ## diff block | |
73 | <div class="h3"> |
|
69 | <div class="h3"> | |
74 | <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> | |
75 | <div class="gravatar"> |
|
71 | <div class="gravatar"> | |
76 | <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)}"/> | |
77 | </div> |
|
73 | </div> | |
78 | <div class="right"> |
|
74 | <div class="right"> | |
79 | <span class="logtags"> |
|
75 | <span class="logtags"> | |
80 | %if len(cs.parents)>1: |
|
76 | %if len(cs.parents)>1: | |
81 | <span class="merge">${_('merge')}</span> |
|
77 | <span class="merge">${_('merge')}</span> | |
82 | %endif |
|
78 | %endif | |
83 | %if cs.branch: |
|
79 | %if cs.branch: | |
84 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
80 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
85 | ${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))} | |
86 | </span> |
|
82 | </span> | |
87 | %endif |
|
83 | %endif | |
88 | %if h.is_hg(c.rhodecode_repo): |
|
84 | %if h.is_hg(c.rhodecode_repo): | |
89 | %for book in cs.bookmarks: |
|
85 | %for book in cs.bookmarks: | |
90 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
86 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
91 | ${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))} | |
92 | </span> |
|
88 | </span> | |
93 | %endfor |
|
89 | %endfor | |
94 | %endif |
|
90 | %endif | |
95 | %for tag in cs.tags: |
|
91 | %for tag in cs.tags: | |
96 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
92 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
97 | ${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> | |
98 | %endfor |
|
94 | %endfor | |
99 | </span> |
|
95 | </span> | |
100 | </div> |
|
96 | </div> | |
101 | </div> |
|
97 | </div> | |
102 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
98 | ${diff_block.diff_block(c.changes[cs.raw_id])} | |
103 | ##${comment.comments(cs)} |
|
99 | ##${comment.comments(cs)} | |
104 |
|
100 | |||
105 | %endfor |
|
101 | %endfor | |
106 | <script type="text/javascript"> |
|
102 | <script type="text/javascript"> | |
107 |
|
103 | |||
108 | YUE.onDOMReady(function(){ |
|
104 | YUE.onDOMReady(function(){ | |
109 |
|
105 | |||
110 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
106 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
111 | var act = e.currentTarget.nextElementSibling; |
|
107 | var act = e.currentTarget.nextElementSibling; | |
112 |
|
108 | |||
113 | if(YUD.hasClass(act,'active')){ |
|
109 | if(YUD.hasClass(act,'active')){ | |
114 | YUD.removeClass(act,'active'); |
|
110 | YUD.removeClass(act,'active'); | |
115 | YUD.setStyle(act,'display','none'); |
|
111 | YUD.setStyle(act,'display','none'); | |
116 | }else{ |
|
112 | }else{ | |
117 | YUD.addClass(act,'active'); |
|
113 | YUD.addClass(act,'active'); | |
118 | YUD.setStyle(act,'display',''); |
|
114 | YUD.setStyle(act,'display',''); | |
119 | } |
|
115 | } | |
120 | }); |
|
116 | }); | |
121 | }) |
|
117 | }) | |
122 | </script> |
|
118 | </script> | |
123 | </div> |
|
119 | </div> | |
124 | </%def> |
|
120 | </%def> |
@@ -1,93 +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)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} · ${c.rhodecode_name} |
|
5 | ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${_('Compare revisions')} | |
10 | » |
|
|||
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
|||
12 | » |
|
|||
13 | ${_('compare')} |
|
|||
14 | </%def> |
|
10 | </%def> | |
15 |
|
11 | |||
16 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
17 | ${self.menu('changelog')} |
|
13 | ${self.menu('changelog')} | |
18 | </%def> |
|
14 | </%def> | |
19 |
|
15 | |||
20 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
21 | ${self.context_bar('changelog')} |
|
17 | ${self.context_bar('changelog')} | |
22 | <div class="box"> |
|
18 | <div class="box"> | |
23 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
24 | <div class="title"> |
|
20 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
26 | </div> |
|
22 | </div> | |
27 | <div class="table"> |
|
23 | <div class="table"> | |
28 | <div id="body" class="diffblock"> |
|
24 | <div id="body" class="diffblock"> | |
29 | <div class="code-header"> |
|
25 | <div class="code-header"> | |
30 | <div> |
|
26 | <div> | |
31 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%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)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> | |
32 | </div> |
|
28 | </div> | |
33 | </div> |
|
29 | </div> | |
34 | </div> |
|
30 | </div> | |
35 | <div id="changeset_compare_view_content"> |
|
31 | <div id="changeset_compare_view_content"> | |
36 | ##CS |
|
32 | ##CS | |
37 | <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> | |
38 | <%include file="compare_cs.html" /> |
|
34 | <%include file="compare_cs.html" /> | |
39 |
|
35 | |||
40 | ## FILES |
|
36 | ## FILES | |
41 | <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"> | |
42 |
|
38 | |||
43 | % if c.limited_diff: |
|
39 | % if c.limited_diff: | |
44 | ${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)} | |
45 | % else: |
|
41 | % else: | |
46 | ${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)}: | |
47 | %endif |
|
43 | %endif | |
48 |
|
44 | |||
49 | </div> |
|
45 | </div> | |
50 | <div class="cs_files"> |
|
46 | <div class="cs_files"> | |
51 | %if not c.files: |
|
47 | %if not c.files: | |
52 | <span class="empty_data">${_('No files')}</span> |
|
48 | <span class="empty_data">${_('No files')}</span> | |
53 | %endif |
|
49 | %endif | |
54 | %for fid, change, f, stat in c.files: |
|
50 | %for fid, change, f, stat in c.files: | |
55 | <div class="cs_${change}"> |
|
51 | <div class="cs_${change}"> | |
56 | <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> | |
57 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
53 | <div class="changes">${h.fancy_file_stats(stat)}</div> | |
58 | </div> |
|
54 | </div> | |
59 | %endfor |
|
55 | %endfor | |
60 | </div> |
|
56 | </div> | |
61 | % if c.limited_diff: |
|
57 | % if c.limited_diff: | |
62 | <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> | |
63 | % endif |
|
59 | % endif | |
64 | </div> |
|
60 | </div> | |
65 | </div> |
|
61 | </div> | |
66 |
|
62 | |||
67 | ## diff block |
|
63 | ## diff block | |
68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
64 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
69 | %for fid, change, f, stat in c.files: |
|
65 | %for fid, change, f, stat in c.files: | |
70 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
66 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
71 | %endfor |
|
67 | %endfor | |
72 | % if c.limited_diff: |
|
68 | % if c.limited_diff: | |
73 | <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> | |
74 | % endif |
|
70 | % endif | |
75 | <script type="text/javascript"> |
|
71 | <script type="text/javascript"> | |
76 |
|
72 | |||
77 | YUE.onDOMReady(function(){ |
|
73 | YUE.onDOMReady(function(){ | |
78 |
|
74 | |||
79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
75 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
80 | var act = e.currentTarget.nextElementSibling; |
|
76 | var act = e.currentTarget.nextElementSibling; | |
81 |
|
77 | |||
82 | if(YUD.hasClass(act,'active')){ |
|
78 | if(YUD.hasClass(act,'active')){ | |
83 | YUD.removeClass(act,'active'); |
|
79 | YUD.removeClass(act,'active'); | |
84 | YUD.setStyle(act,'display','none'); |
|
80 | YUD.setStyle(act,'display','none'); | |
85 | }else{ |
|
81 | }else{ | |
86 | YUD.addClass(act,'active'); |
|
82 | YUD.addClass(act,'active'); | |
87 | YUD.setStyle(act,'display',''); |
|
83 | YUD.setStyle(act,'display',''); | |
88 | } |
|
84 | } | |
89 | }); |
|
85 | }); | |
90 | }) |
|
86 | }) | |
91 | </script> |
|
87 | </script> | |
92 | </div> |
|
88 | </div> | |
93 | </%def> |
|
89 | </%def> |
@@ -1,50 +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} · ${c.rhodecode_name} |
|
4 | ${_('%s File Diff') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
9 | » |
|
|||
10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
|||
11 | » |
|
|||
12 | ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} → 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)} → r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)} | |
13 | </%def> |
|
9 | </%def> | |
14 |
|
10 | |||
15 | <%def name="page_nav()"> |
|
11 | <%def name="page_nav()"> | |
16 | ${self.menu('files')} |
|
12 | ${self.menu('files')} | |
17 | </%def> |
|
13 | </%def> | |
18 |
|
14 | |||
19 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
20 | ${self.context_bar('files')} |
|
16 | ${self.context_bar('files')} | |
21 | <div class="box"> |
|
17 | <div class="box"> | |
22 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
23 | <div class="title"> |
|
19 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
25 | </div> |
|
21 | </div> | |
26 | <div> |
|
22 | <div> | |
27 | ## diff block |
|
23 | ## diff block | |
28 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
24 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
29 | ${diff_block.diff_block(c.changes)} |
|
25 | ${diff_block.diff_block(c.changes)} | |
30 | </div> |
|
26 | </div> | |
31 | </div> |
|
27 | </div> | |
32 |
|
28 | |||
33 | <script> |
|
29 | <script> | |
34 | YUE.onDOMReady(function(){ |
|
30 | YUE.onDOMReady(function(){ | |
35 |
|
31 | |||
36 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
32 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
37 | var act = e.currentTarget.nextElementSibling; |
|
33 | var act = e.currentTarget.nextElementSibling; | |
38 |
|
34 | |||
39 | if(YUD.hasClass(act,'active')){ |
|
35 | if(YUD.hasClass(act,'active')){ | |
40 | YUD.removeClass(act,'active'); |
|
36 | YUD.removeClass(act,'active'); | |
41 | YUD.setStyle(act,'display','none'); |
|
37 | YUD.setStyle(act,'display','none'); | |
42 | }else{ |
|
38 | }else{ | |
43 | YUD.addClass(act,'active'); |
|
39 | YUD.addClass(act,'active'); | |
44 | YUD.setStyle(act,'display',''); |
|
40 | YUD.setStyle(act,'display',''); | |
45 | } |
|
41 | } | |
46 | }); |
|
42 | }); | |
47 |
|
43 | |||
48 | }) |
|
44 | }) | |
49 | </script> |
|
45 | </script> | |
50 | </%def> |
|
46 | </%def> |
@@ -1,90 +1,86 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 Files Add') % c.repo_name} · ${c.rhodecode_name} |
|
4 | ${_('%s Files Add') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${_('Add file')} @ ${h.show_id(c.cs)} | |
16 | » |
|
|||
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
|||
18 | » |
|
|||
19 | ${_('add file')} @ ${h.show_id(c.cs)} |
|
|||
20 | </%def> |
|
16 | </%def> | |
21 |
|
17 | |||
22 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
23 | ${self.context_bar('files')} |
|
19 | ${self.context_bar('files')} | |
24 | <div class="box"> |
|
20 | <div class="box"> | |
25 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
26 | <div class="title"> |
|
22 | <div class="title"> | |
27 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
28 | <ul class="links"> |
|
24 | <ul class="links"> | |
29 | <li> |
|
25 | <li> | |
30 | <span style="text-transform: uppercase;"> |
|
26 | <span style="text-transform: uppercase;"> | |
31 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
27 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
32 | </li> |
|
28 | </li> | |
33 | </ul> |
|
29 | </ul> | |
34 | </div> |
|
30 | </div> | |
35 | <div class="table"> |
|
31 | <div class="table"> | |
36 | <div id="files_data"> |
|
32 | <div id="files_data"> | |
37 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} |
|
33 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} | |
38 | <h3>${_('Add new file')}</h3> |
|
34 | <h3>${_('Add new file')}</h3> | |
39 | <div class="form"> |
|
35 | <div class="form"> | |
40 | <div class="fields"> |
|
36 | <div class="fields"> | |
41 | <div id="filename_container" class="field file"> |
|
37 | <div id="filename_container" class="field file"> | |
42 | <div class="label"> |
|
38 | <div class="label"> | |
43 | <label for="filename">${_('File Name')}:</label> |
|
39 | <label for="filename">${_('File Name')}:</label> | |
44 | </div> |
|
40 | </div> | |
45 | <div class="input"> |
|
41 | <div class="input"> | |
46 | <input type="text" value="" size="30" name="filename" id="filename"> |
|
42 | <input type="text" value="" size="30" name="filename" id="filename"> | |
47 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> |
|
43 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> | |
48 | </div> |
|
44 | </div> | |
49 | </div> |
|
45 | </div> | |
50 | <div id="upload_file_container" class="field" style="display:none"> |
|
46 | <div id="upload_file_container" class="field" style="display:none"> | |
51 | <div class="label"> |
|
47 | <div class="label"> | |
52 | <label for="upload_file_container">${_('Upload file')}</label> |
|
48 | <label for="upload_file_container">${_('Upload file')}</label> | |
53 | </div> |
|
49 | </div> | |
54 | <div class="file"> |
|
50 | <div class="file"> | |
55 | <input type="file" size="30" name="upload_file" id="upload_file"> |
|
51 | <input type="file" size="30" name="upload_file" id="upload_file"> | |
56 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> |
|
52 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> | |
57 | </div> |
|
53 | </div> | |
58 | </div> |
|
54 | </div> | |
59 | <div class="field"> |
|
55 | <div class="field"> | |
60 | <div class="label"> |
|
56 | <div class="label"> | |
61 | <label for="location">${_('Location')}</label> |
|
57 | <label for="location">${_('Location')}</label> | |
62 | </div> |
|
58 | </div> | |
63 | <div class="input"> |
|
59 | <div class="input"> | |
64 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> |
|
60 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> | |
65 | ${_('use / to separate directories')} |
|
61 | ${_('use / to separate directories')} | |
66 | </div> |
|
62 | </div> | |
67 | </div> |
|
63 | </div> | |
68 | </div> |
|
64 | </div> | |
69 | </div> |
|
65 | </div> | |
70 | <div id="body" class="codeblock"> |
|
66 | <div id="body" class="codeblock"> | |
71 | <div id="editor_container"> |
|
67 | <div id="editor_container"> | |
72 | <pre id="editor_pre"></pre> |
|
68 | <pre id="editor_pre"></pre> | |
73 | <textarea id="editor" name="content" style="display:none"></textarea> |
|
69 | <textarea id="editor" name="content" style="display:none"></textarea> | |
74 | </div> |
|
70 | </div> | |
75 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
71 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
76 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
72 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> | |
77 | </div> |
|
73 | </div> | |
78 | <div style="text-align: l;padding-top: 5px"> |
|
74 | <div style="text-align: l;padding-top: 5px"> | |
79 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
75 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
80 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
76 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
81 | </div> |
|
77 | </div> | |
82 | ${h.end_form()} |
|
78 | ${h.end_form()} | |
83 | <script type="text/javascript"> |
|
79 | <script type="text/javascript"> | |
84 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; |
|
80 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; | |
85 | initCodeMirror('editor',reset_url); |
|
81 | initCodeMirror('editor',reset_url); | |
86 | </script> |
|
82 | </script> | |
87 | </div> |
|
83 | </div> | |
88 | </div> |
|
84 | </div> | |
89 | </div> |
|
85 | </div> | |
90 | </%def> |
|
86 | </%def> |
@@ -1,76 +1,72 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 Files Edit') % c.repo_name} · ${c.rhodecode_name} |
|
4 | ${_('%s Files Edit') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${_('Edit file')} @ ${h.show_id(c.cs)} | |
16 | » |
|
|||
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
|||
18 | » |
|
|||
19 | ${_('edit file')} @ ${h.show_id(c.cs)} |
|
|||
20 | </%def> |
|
16 | </%def> | |
21 |
|
17 | |||
22 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
23 | ${self.context_bar('files')} |
|
19 | ${self.context_bar('files')} | |
24 | <div class="box"> |
|
20 | <div class="box"> | |
25 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
26 | <div class="title"> |
|
22 | <div class="title"> | |
27 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
28 | <ul class="links"> |
|
24 | <ul class="links"> | |
29 | <li> |
|
25 | <li> | |
30 | <span style="text-transform: uppercase;"> |
|
26 | <span style="text-transform: uppercase;"> | |
31 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
27 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
32 | </li> |
|
28 | </li> | |
33 | </ul> |
|
29 | </ul> | |
34 | </div> |
|
30 | </div> | |
35 | <div class="table"> |
|
31 | <div class="table"> | |
36 | <div id="files_data"> |
|
32 | <div id="files_data"> | |
37 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
33 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
38 | ${h.form(h.url.current(),method='post',id='eform')} |
|
34 | ${h.form(h.url.current(),method='post',id='eform')} | |
39 | <div id="body" class="codeblock"> |
|
35 | <div id="body" class="codeblock"> | |
40 | <div class="code-header"> |
|
36 | <div class="code-header"> | |
41 | <div class="stats"> |
|
37 | <div class="stats"> | |
42 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
38 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
43 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> |
|
39 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> | |
44 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
|
40 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |
45 | <div class="left item last">${c.file.mimetype}</div> |
|
41 | <div class="left item last">${c.file.mimetype}</div> | |
46 | <div class="buttons"> |
|
42 | <div class="buttons"> | |
47 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
43 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
48 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
44 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
49 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
45 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
50 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
46 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
51 | % if not c.file.is_binary: |
|
47 | % if not c.file.is_binary: | |
52 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
48 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
53 | % endif |
|
49 | % endif | |
54 | % endif |
|
50 | % endif | |
55 | </div> |
|
51 | </div> | |
56 | </div> |
|
52 | </div> | |
57 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
|
53 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> | |
58 | </div> |
|
54 | </div> | |
59 | <pre id="editor_pre"></pre> |
|
55 | <pre id="editor_pre"></pre> | |
60 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> |
|
56 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> | |
61 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
57 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
62 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
58 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> | |
63 | </div> |
|
59 | </div> | |
64 | <div style="text-align: left;padding-top: 5px"> |
|
60 | <div style="text-align: left;padding-top: 5px"> | |
65 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
61 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
66 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
62 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
67 | </div> |
|
63 | </div> | |
68 | ${h.end_form()} |
|
64 | ${h.end_form()} | |
69 | <script type="text/javascript"> |
|
65 | <script type="text/javascript"> | |
70 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; |
|
66 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; | |
71 | initCodeMirror('editor',reset_url); |
|
67 | initCodeMirror('editor',reset_url); | |
72 | </script> |
|
68 | </script> | |
73 | </div> |
|
69 | </div> | |
74 | </div> |
|
70 | </div> | |
75 | </div> |
|
71 | </div> | |
76 | </%def> |
|
72 | </%def> |
@@ -1,100 +1,96 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 Fork') % c.repo_name} · ${c.rhodecode_name} |
|
5 | ${_('%s Fork') % c.repo_name} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${_('Fork')} | |
10 | » |
|
|||
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
|||
12 | » |
|
|||
13 | ${_('fork')} |
|
|||
14 | </%def> |
|
10 | </%def> | |
15 |
|
11 | |||
16 | <%def name="main()"> |
|
12 | <%def name="main()"> | |
17 | ${self.context_bar('showforks')} |
|
13 | ${self.context_bar('showforks')} | |
18 | <div class="box"> |
|
14 | <div class="box"> | |
19 | <!-- box / title --> |
|
15 | <!-- box / title --> | |
20 | <div class="title"> |
|
16 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
17 | ${self.breadcrumbs()} | |
22 | </div> |
|
18 | </div> | |
23 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
19 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} | |
24 | <div class="form"> |
|
20 | <div class="form"> | |
25 | <!-- fields --> |
|
21 | <!-- fields --> | |
26 | <div class="fields"> |
|
22 | <div class="fields"> | |
27 | <div class="field"> |
|
23 | <div class="field"> | |
28 | <div class="label"> |
|
24 | <div class="label"> | |
29 | <label for="repo_name">${_('Fork name')}:</label> |
|
25 | <label for="repo_name">${_('Fork name')}:</label> | |
30 | </div> |
|
26 | </div> | |
31 | <div class="input"> |
|
27 | <div class="input"> | |
32 | ${h.text('repo_name',class_="small")} |
|
28 | ${h.text('repo_name',class_="small")} | |
33 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
29 | ${h.hidden('repo_type',c.repo_info.repo_type)} | |
34 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
30 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} | |
35 | </div> |
|
31 | </div> | |
36 | </div> |
|
32 | </div> | |
37 | <div class="field"> |
|
33 | <div class="field"> | |
38 | <div class="label"> |
|
34 | <div class="label"> | |
39 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
35 | <label for="landing_rev">${_('Landing revision')}:</label> | |
40 | </div> |
|
36 | </div> | |
41 | <div class="input"> |
|
37 | <div class="input"> | |
42 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
38 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} | |
43 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
39 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
44 | </div> |
|
40 | </div> | |
45 | </div> |
|
41 | </div> | |
46 | <div class="field"> |
|
42 | <div class="field"> | |
47 | <div class="label"> |
|
43 | <div class="label"> | |
48 | <label for="repo_group">${_('Repository group')}:</label> |
|
44 | <label for="repo_group">${_('Repository group')}:</label> | |
49 | </div> |
|
45 | </div> | |
50 | <div class="input"> |
|
46 | <div class="input"> | |
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
47 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
52 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
48 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> | |
53 | </div> |
|
49 | </div> | |
54 | </div> |
|
50 | </div> | |
55 | <div class="field"> |
|
51 | <div class="field"> | |
56 | <div class="label label-textarea"> |
|
52 | <div class="label label-textarea"> | |
57 | <label for="description">${_('Description')}:</label> |
|
53 | <label for="description">${_('Description')}:</label> | |
58 | </div> |
|
54 | </div> | |
59 | <div class="textarea text-area editor"> |
|
55 | <div class="textarea text-area editor"> | |
60 | ${h.textarea('description',cols=23,rows=5)} |
|
56 | ${h.textarea('description',cols=23,rows=5)} | |
61 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
57 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
62 | </div> |
|
58 | </div> | |
63 | </div> |
|
59 | </div> | |
64 | <div class="field"> |
|
60 | <div class="field"> | |
65 | <div class="label label-checkbox"> |
|
61 | <div class="label label-checkbox"> | |
66 | <label for="private">${_('Private')}:</label> |
|
62 | <label for="private">${_('Private')}:</label> | |
67 | </div> |
|
63 | </div> | |
68 | <div class="checkboxes"> |
|
64 | <div class="checkboxes"> | |
69 | ${h.checkbox('private',value="True")} |
|
65 | ${h.checkbox('private',value="True")} | |
70 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
66 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
71 | </div> |
|
67 | </div> | |
72 | </div> |
|
68 | </div> | |
73 | <div class="field"> |
|
69 | <div class="field"> | |
74 | <div class="label label-checkbox"> |
|
70 | <div class="label label-checkbox"> | |
75 | <label for="private">${_('Copy permissions')}:</label> |
|
71 | <label for="private">${_('Copy permissions')}:</label> | |
76 | </div> |
|
72 | </div> | |
77 | <div class="checkboxes"> |
|
73 | <div class="checkboxes"> | |
78 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
74 | ${h.checkbox('copy_permissions',value="True", checked="checked")} | |
79 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
75 | <span class="help-block">${_('Copy permissions from forked repository')}</span> | |
80 | </div> |
|
76 | </div> | |
81 | </div> |
|
77 | </div> | |
82 | %if c.can_update: |
|
78 | %if c.can_update: | |
83 | <div class="field"> |
|
79 | <div class="field"> | |
84 | <div class="label label-checkbox"> |
|
80 | <div class="label label-checkbox"> | |
85 | <label for="private">${_('Update after clone')}:</label> |
|
81 | <label for="private">${_('Update after clone')}:</label> | |
86 | </div> |
|
82 | </div> | |
87 | <div class="checkboxes"> |
|
83 | <div class="checkboxes"> | |
88 | ${h.checkbox('update_after_clone',value="True")} |
|
84 | ${h.checkbox('update_after_clone',value="True")} | |
89 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
85 | <span class="help-block">${_('Checkout source after making a clone')}</span> | |
90 | </div> |
|
86 | </div> | |
91 | </div> |
|
87 | </div> | |
92 | %endif |
|
88 | %endif | |
93 | <div class="buttons"> |
|
89 | <div class="buttons"> | |
94 | ${h.submit('',_('Fork this repository'),class_="ui-btn large")} |
|
90 | ${h.submit('',_('Fork this repository'),class_="ui-btn large")} | |
95 | </div> |
|
91 | </div> | |
96 | </div> |
|
92 | </div> | |
97 | </div> |
|
93 | </div> | |
98 | ${h.end_form()} |
|
94 | ${h.end_form()} | |
99 | </div> |
|
95 | </div> | |
100 | </%def> |
|
96 | </%def> |
@@ -1,209 +1,205 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${c.repo_name} ${_('New pull request')} |
|
4 | ${c.repo_name} ${_('New pull request')} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${_('New pull request')} | |
9 | » |
|
|||
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
|||
11 | » |
|
|||
12 | ${_('new pull request')} |
|
|||
13 | </%def> |
|
9 | </%def> | |
14 |
|
10 | |||
15 | <%def name="main()"> |
|
11 | <%def name="main()"> | |
16 | ${self.context_bar('showpullrequest')} |
|
12 | ${self.context_bar('showpullrequest')} | |
17 | <div class="box"> |
|
13 | <div class="box"> | |
18 | <!-- box / title --> |
|
14 | <!-- box / title --> | |
19 | <div class="title"> |
|
15 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
16 | ${self.breadcrumbs()} | |
21 | </div> |
|
17 | </div> | |
22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
18 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} | |
23 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
19 | <div style="float:left;padding:0px 30px 30px 30px"> | |
24 | ##ORG |
|
20 | ##ORG | |
25 | <div style="float:left"> |
|
21 | <div style="float:left"> | |
26 | <div> |
|
22 | <div> | |
27 | <span style="font-size: 20px"> |
|
23 | <span style="font-size: 20px"> | |
28 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} |
|
24 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} | |
29 | </span> |
|
25 | </span> | |
30 | <div style="padding:5px 3px 3px 20px;">${c.rhodecode_db_repo.description}</div> |
|
26 | <div style="padding:5px 3px 3px 20px;">${c.rhodecode_db_repo.description}</div> | |
31 | </div> |
|
27 | </div> | |
32 | <div style="clear:both;padding-top: 10px"></div> |
|
28 | <div style="clear:both;padding-top: 10px"></div> | |
33 | </div> |
|
29 | </div> | |
34 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
30 | <div style="float:left;font-size:24px;padding:0px 20px"> | |
35 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
31 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> | |
36 | </div> |
|
32 | </div> | |
37 |
|
33 | |||
38 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
34 | ##OTHER, most Probably the PARENT OF THIS FORK | |
39 | <div style="float:left"> |
|
35 | <div style="float:left"> | |
40 | <div> |
|
36 | <div> | |
41 | <span style="font-size: 20px"> |
|
37 | <span style="font-size: 20px"> | |
42 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${c.default_other_repo_info['revs']} |
|
38 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${c.default_other_repo_info['revs']} | |
43 | </span> |
|
39 | </span> | |
44 | <div id="other_repo_desc" style="padding:5px 3px 3px 20px;"></div> |
|
40 | <div id="other_repo_desc" style="padding:5px 3px 3px 20px;"></div> | |
45 | </div> |
|
41 | </div> | |
46 | <div style="clear:both;padding-top: 10px"></div> |
|
42 | <div style="clear:both;padding-top: 10px"></div> | |
47 | </div> |
|
43 | </div> | |
48 | <div style="clear:both;padding-top: 10px"></div> |
|
44 | <div style="clear:both;padding-top: 10px"></div> | |
49 | ## overview pulled by ajax |
|
45 | ## overview pulled by ajax | |
50 | <div style="float:left" id="pull_request_overview"></div> |
|
46 | <div style="float:left" id="pull_request_overview"></div> | |
51 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
47 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> | |
52 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
48 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> | |
53 | </div> |
|
49 | </div> | |
54 | </div> |
|
50 | </div> | |
55 | <div style="float:left; border-left:1px dashed #eee"> |
|
51 | <div style="float:left; border-left:1px dashed #eee"> | |
56 | <h4>${_('Pull request reviewers')}</h4> |
|
52 | <h4>${_('Pull request reviewers')}</h4> | |
57 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
53 | <div id="reviewers" style="padding:0px 0px 0px 15px"> | |
58 | ## members goes here ! |
|
54 | ## members goes here ! | |
59 | <div class="group_members_wrap"> |
|
55 | <div class="group_members_wrap"> | |
60 | <ul id="review_members" class="group_members"> |
|
56 | <ul id="review_members" class="group_members"> | |
61 | %for member in [c.default_other_repo_info['user']]: |
|
57 | %for member in [c.default_other_repo_info['user']]: | |
62 | <li id="reviewer_${member['user_id']}"> |
|
58 | <li id="reviewer_${member['user_id']}"> | |
63 | <div class="reviewers_member"> |
|
59 | <div class="reviewers_member"> | |
64 | <div class="gravatar"><img alt="gravatar" src="${member['gravatar_link']}"/> </div> |
|
60 | <div class="gravatar"><img alt="gravatar" src="${member['gravatar_link']}"/> </div> | |
65 | <div style="float:left">${member['firstname']} ${member['lastname']} (${_('owner')})</div> |
|
61 | <div style="float:left">${member['firstname']} ${member['lastname']} (${_('owner')})</div> | |
66 | <input type="hidden" value="${member['user_id']}" name="review_members" /> |
|
62 | <input type="hidden" value="${member['user_id']}" name="review_members" /> | |
67 | <span class="delete_icon action_button" onclick="removeReviewMember(${member['user_id']})"></span> |
|
63 | <span class="delete_icon action_button" onclick="removeReviewMember(${member['user_id']})"></span> | |
68 | </div> |
|
64 | </div> | |
69 | </li> |
|
65 | </li> | |
70 | %endfor |
|
66 | %endfor | |
71 | </ul> |
|
67 | </ul> | |
72 | </div> |
|
68 | </div> | |
73 |
|
69 | |||
74 | <div class='ac'> |
|
70 | <div class='ac'> | |
75 | <div class="reviewer_ac"> |
|
71 | <div class="reviewer_ac"> | |
76 | ${h.text('user', class_='yui-ac-input')} |
|
72 | ${h.text('user', class_='yui-ac-input')} | |
77 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
73 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> | |
78 | <div id="reviewers_container"></div> |
|
74 | <div id="reviewers_container"></div> | |
79 | </div> |
|
75 | </div> | |
80 | </div> |
|
76 | </div> | |
81 | </div> |
|
77 | </div> | |
82 | </div> |
|
78 | </div> | |
83 | <h3>${_('Create new pull request')}</h3> |
|
79 | <h3>${_('Create new pull request')}</h3> | |
84 |
|
80 | |||
85 | <div class="form"> |
|
81 | <div class="form"> | |
86 | <!-- fields --> |
|
82 | <!-- fields --> | |
87 |
|
83 | |||
88 | <div class="fields"> |
|
84 | <div class="fields"> | |
89 |
|
85 | |||
90 | <div class="field"> |
|
86 | <div class="field"> | |
91 | <div class="label"> |
|
87 | <div class="label"> | |
92 | <label for="pullrequest_title">${_('Title')}:</label> |
|
88 | <label for="pullrequest_title">${_('Title')}:</label> | |
93 | </div> |
|
89 | </div> | |
94 | <div class="input"> |
|
90 | <div class="input"> | |
95 | ${h.text('pullrequest_title',size=30)} |
|
91 | ${h.text('pullrequest_title',size=30)} | |
96 | </div> |
|
92 | </div> | |
97 | </div> |
|
93 | </div> | |
98 |
|
94 | |||
99 | <div class="field"> |
|
95 | <div class="field"> | |
100 | <div class="label label-textarea"> |
|
96 | <div class="label label-textarea"> | |
101 | <label for="pullrequest_desc">${_('Description')}:</label> |
|
97 | <label for="pullrequest_desc">${_('Description')}:</label> | |
102 | </div> |
|
98 | </div> | |
103 | <div class="textarea text-area editor"> |
|
99 | <div class="textarea text-area editor"> | |
104 | ${h.textarea('pullrequest_desc',size=30)} |
|
100 | ${h.textarea('pullrequest_desc',size=30)} | |
105 | </div> |
|
101 | </div> | |
106 | </div> |
|
102 | </div> | |
107 |
|
103 | |||
108 | <div class="buttons"> |
|
104 | <div class="buttons"> | |
109 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
105 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} | |
110 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
106 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
111 | </div> |
|
107 | </div> | |
112 | </div> |
|
108 | </div> | |
113 | </div> |
|
109 | </div> | |
114 | ${h.end_form()} |
|
110 | ${h.end_form()} | |
115 |
|
111 | |||
116 | </div> |
|
112 | </div> | |
117 |
|
113 | |||
118 | <script type="text/javascript"> |
|
114 | <script type="text/javascript"> | |
119 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
115 | var _USERS_AC_DATA = ${c.users_array|n}; | |
120 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
116 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
121 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
117 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
122 |
|
118 | |||
123 | var other_repos_info = ${c.other_repos_info|n}; |
|
119 | var other_repos_info = ${c.other_repos_info|n}; | |
124 |
|
120 | |||
125 | var otherrepoChanged = function(){ |
|
121 | var otherrepoChanged = function(){ | |
126 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
|
122 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; | |
127 | var repo_name = sel_box.options[sel_box.selectedIndex].value; |
|
123 | var repo_name = sel_box.options[sel_box.selectedIndex].value; | |
128 |
|
124 | |||
129 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
|
125 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; | |
130 | // replace options of other_ref with the ones for the current other_repo |
|
126 | // replace options of other_ref with the ones for the current other_repo | |
131 | var other_ref_selector = YUD.get('other_ref'); |
|
127 | var other_ref_selector = YUD.get('other_ref'); | |
132 | var new_select = YUD.createElementFromMarkup(other_repos_info[repo_name]['revs']); |
|
128 | var new_select = YUD.createElementFromMarkup(other_repos_info[repo_name]['revs']); | |
133 | var new_selectedIndex = new_select.selectedIndex; |
|
129 | var new_selectedIndex = new_select.selectedIndex; | |
134 | other_ref_selector.innerHTML = ""; // clear old options |
|
130 | other_ref_selector.innerHTML = ""; // clear old options | |
135 | while (new_select.length > 0){ // children will be popped when appened to other_ref_selector |
|
131 | while (new_select.length > 0){ // children will be popped when appened to other_ref_selector | |
136 | other_ref_selector.appendChild(new_select.children[0]); |
|
132 | other_ref_selector.appendChild(new_select.children[0]); | |
137 | } |
|
133 | } | |
138 | // browsers lost track of selected when appendChild was used |
|
134 | // browsers lost track of selected when appendChild was used | |
139 | other_ref_selector.selectedIndex = new_selectedIndex; |
|
135 | other_ref_selector.selectedIndex = new_selectedIndex; | |
140 |
|
136 | |||
141 | // reset && add the reviewer based on selected repo |
|
137 | // reset && add the reviewer based on selected repo | |
142 | var _data = other_repos_info[repo_name]; |
|
138 | var _data = other_repos_info[repo_name]; | |
143 | YUD.get('review_members').innerHTML = ''; |
|
139 | YUD.get('review_members').innerHTML = ''; | |
144 | addReviewMember(_data.user.user_id, _data.user.firstname, |
|
140 | addReviewMember(_data.user.user_id, _data.user.firstname, | |
145 | _data.user.lastname, _data.user.username, |
|
141 | _data.user.lastname, _data.user.username, | |
146 | _data.user.gravatar_link); |
|
142 | _data.user.gravatar_link); | |
147 | } |
|
143 | } | |
148 |
|
144 | |||
149 | var loadPreview = function(){ |
|
145 | var loadPreview = function(){ | |
150 | //url template |
|
146 | //url template | |
151 | var url = "${h.url('compare_url', |
|
147 | var url = "${h.url('compare_url', | |
152 | repo_name='__other_repo__', |
|
148 | repo_name='__other_repo__', | |
153 | org_ref_type='__other_ref_type__', |
|
149 | org_ref_type='__other_ref_type__', | |
154 | org_ref='__other_ref__', |
|
150 | org_ref='__other_ref__', | |
155 | other_repo='__org_repo__', |
|
151 | other_repo='__org_repo__', | |
156 | other_ref_type='__org_ref_type__', |
|
152 | other_ref_type='__org_ref_type__', | |
157 | other_ref='__org_ref__', |
|
153 | other_ref='__org_ref__', | |
158 | as_form=True, |
|
154 | as_form=True, | |
159 | merge=True, |
|
155 | merge=True, | |
160 | )}"; |
|
156 | )}"; | |
161 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; |
|
157 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; | |
162 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); |
|
158 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); | |
163 |
|
159 | |||
164 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; |
|
160 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; | |
165 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); |
|
161 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); | |
166 |
|
162 | |||
167 | var select_refs = YUQ('#pull_request_form select.refs') |
|
163 | var select_refs = YUQ('#pull_request_form select.refs') | |
168 | var rev_data = { |
|
164 | var rev_data = { | |
169 | 'org_repo': org_repo, |
|
165 | 'org_repo': org_repo, | |
170 | 'org_ref': org_ref[2], |
|
166 | 'org_ref': org_ref[2], | |
171 | 'org_ref_type': 'rev', |
|
167 | 'org_ref_type': 'rev', | |
172 | 'other_repo': other_repo, |
|
168 | 'other_repo': other_repo, | |
173 | 'other_ref': other_ref[2], |
|
169 | 'other_ref': other_ref[2], | |
174 | 'other_ref_type': 'rev', |
|
170 | 'other_ref_type': 'rev', | |
175 | }; // gather the org/other ref and repo here |
|
171 | }; // gather the org/other ref and repo here | |
176 |
|
172 | |||
177 | for (k in rev_data){ |
|
173 | for (k in rev_data){ | |
178 | url = url.replace('__'+k+'__',rev_data[k]); |
|
174 | url = url.replace('__'+k+'__',rev_data[k]); | |
179 | } |
|
175 | } | |
180 |
|
176 | |||
181 | YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}"; |
|
177 | YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}"; | |
182 | ypjax(url,'pull_request_overview'); |
|
178 | ypjax(url,'pull_request_overview'); | |
183 |
|
179 | |||
184 | YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ... |
|
180 | YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ... | |
185 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
|
181 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); | |
186 | } |
|
182 | } | |
187 |
|
183 | |||
188 | ## refresh automatically when something changes (org_repo can't change) |
|
184 | ## refresh automatically when something changes (org_repo can't change) | |
189 |
|
185 | |||
190 | YUE.on('org_ref', 'change', function(e){ |
|
186 | YUE.on('org_ref', 'change', function(e){ | |
191 | loadPreview(); |
|
187 | loadPreview(); | |
192 | }); |
|
188 | }); | |
193 |
|
189 | |||
194 | YUE.on('other_repo', 'change', function(e){ |
|
190 | YUE.on('other_repo', 'change', function(e){ | |
195 | otherrepoChanged(); |
|
191 | otherrepoChanged(); | |
196 | loadPreview(); |
|
192 | loadPreview(); | |
197 | }); |
|
193 | }); | |
198 |
|
194 | |||
199 | YUE.on('other_ref', 'change', function(e){ |
|
195 | YUE.on('other_ref', 'change', function(e){ | |
200 | loadPreview(); |
|
196 | loadPreview(); | |
201 | }); |
|
197 | }); | |
202 |
|
198 | |||
203 | otherrepoChanged(); |
|
199 | otherrepoChanged(); | |
204 | //lazy load overview after 0.5s |
|
200 | //lazy load overview after 0.5s | |
205 | setTimeout(loadPreview, 500); |
|
201 | setTimeout(loadPreview, 500); | |
206 |
|
202 | |||
207 | </script> |
|
203 | </script> | |
208 |
|
204 | |||
209 | </%def> |
|
205 | </%def> |
@@ -1,248 +1,244 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 Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${c.rhodecode_name} |
|
4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
9 | » |
|
|||
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
|||
11 | » |
|
|||
12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
8 | ${_('Pull request #%s') % c.pull_request.pull_request_id} | |
13 | </%def> |
|
9 | </%def> | |
14 |
|
10 | |||
15 | <%def name="main()"> |
|
11 | <%def name="main()"> | |
16 | ${self.context_bar('showpullrequest')} |
|
12 | ${self.context_bar('showpullrequest')} | |
17 | <div class="box"> |
|
13 | <div class="box"> | |
18 | <!-- box / title --> |
|
14 | <!-- box / title --> | |
19 | <div class="title"> |
|
15 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
16 | ${self.breadcrumbs()} | |
21 | </div> |
|
17 | </div> | |
22 | %if c.pull_request.is_closed(): |
|
18 | %if c.pull_request.is_closed(): | |
23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
19 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> | |
24 | %endif |
|
20 | %endif | |
25 | <h3> |
|
21 | <h3> | |
26 | %if c.pull_request.is_closed(): |
|
22 | %if c.pull_request.is_closed(): | |
27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
23 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> | |
28 | %endif |
|
24 | %endif | |
29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> |
|
25 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> | |
30 | ${_('Title')}: ${c.pull_request.title}</h3> |
|
26 | ${_('Title')}: ${c.pull_request.title}</h3> | |
31 |
|
27 | |||
32 | <div class="form"> |
|
28 | <div class="form"> | |
33 | <div id="summary" class="fields"> |
|
29 | <div id="summary" class="fields"> | |
34 | <div class="field"> |
|
30 | <div class="field"> | |
35 | <div class="label-summary"> |
|
31 | <div class="label-summary"> | |
36 | <label>${_('Review status')}:</label> |
|
32 | <label>${_('Review status')}:</label> | |
37 | </div> |
|
33 | </div> | |
38 | <div class="input"> |
|
34 | <div class="input"> | |
39 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
35 | <div class="changeset-status-container" style="float:none;clear:both"> | |
40 | %if c.current_changeset_status: |
|
36 | %if c.current_changeset_status: | |
41 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
37 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> | |
42 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> |
|
38 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> | |
43 | %endif |
|
39 | %endif | |
44 | </div> |
|
40 | </div> | |
45 | </div> |
|
41 | </div> | |
46 | </div> |
|
42 | </div> | |
47 | <div class="field"> |
|
43 | <div class="field"> | |
48 | <div class="label-summary"> |
|
44 | <div class="label-summary"> | |
49 | <label>${_('Still not reviewed by')}:</label> |
|
45 | <label>${_('Still not reviewed by')}:</label> | |
50 | </div> |
|
46 | </div> | |
51 | <div class="input"> |
|
47 | <div class="input"> | |
52 | % if len(c.pull_request_pending_reviewers) > 0: |
|
48 | % if len(c.pull_request_pending_reviewers) > 0: | |
53 | <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div> |
|
49 | <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div> | |
54 | %else: |
|
50 | %else: | |
55 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
51 | <div>${_('pull request was reviewed by all reviewers')}</div> | |
56 | %endif |
|
52 | %endif | |
57 | </div> |
|
53 | </div> | |
58 | </div> |
|
54 | </div> | |
59 | <div class="field"> |
|
55 | <div class="field"> | |
60 | <div class="label-summary"> |
|
56 | <div class="label-summary"> | |
61 | <label>${_('Origin repository')}:</label> |
|
57 | <label>${_('Origin repository')}:</label> | |
62 | </div> |
|
58 | </div> | |
63 | <div class="input"> |
|
59 | <div class="input"> | |
64 | <div> |
|
60 | <div> | |
65 | ##%if h.is_hg(c.pull_request.org_repo): |
|
61 | ##%if h.is_hg(c.pull_request.org_repo): | |
66 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
62 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
67 | ##%elif h.is_git(c.pull_request.org_repo): |
|
63 | ##%elif h.is_git(c.pull_request.org_repo): | |
68 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
64 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
69 | ##%endif |
|
65 | ##%endif | |
70 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> |
|
66 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> | |
71 | <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span> |
|
67 | <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span> | |
72 | </div> |
|
68 | </div> | |
73 | </div> |
|
69 | </div> | |
74 | </div> |
|
70 | </div> | |
75 | <div class="field"> |
|
71 | <div class="field"> | |
76 | <div class="label-summary"> |
|
72 | <div class="label-summary"> | |
77 | <label>${_('Summary')}:</label> |
|
73 | <label>${_('Summary')}:</label> | |
78 | </div> |
|
74 | </div> | |
79 | <div class="input"> |
|
75 | <div class="input"> | |
80 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> |
|
76 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> | |
81 | </div> |
|
77 | </div> | |
82 | </div> |
|
78 | </div> | |
83 | <div class="field"> |
|
79 | <div class="field"> | |
84 | <div class="label-summary"> |
|
80 | <div class="label-summary"> | |
85 | <label>${_('Created on')}:</label> |
|
81 | <label>${_('Created on')}:</label> | |
86 | </div> |
|
82 | </div> | |
87 | <div class="input"> |
|
83 | <div class="input"> | |
88 | <div>${h.fmt_date(c.pull_request.created_on)}</div> |
|
84 | <div>${h.fmt_date(c.pull_request.created_on)}</div> | |
89 | </div> |
|
85 | </div> | |
90 | </div> |
|
86 | </div> | |
91 | </div> |
|
87 | </div> | |
92 | </div> |
|
88 | </div> | |
93 |
|
89 | |||
94 | <div style="overflow: auto;"> |
|
90 | <div style="overflow: auto;"> | |
95 | ##DIFF |
|
91 | ##DIFF | |
96 | <div class="table" style="float:left;clear:none"> |
|
92 | <div class="table" style="float:left;clear:none"> | |
97 | <div id="body" class="diffblock"> |
|
93 | <div id="body" class="diffblock"> | |
98 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
94 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> | |
99 | </div> |
|
95 | </div> | |
100 | <div id="changeset_compare_view_content"> |
|
96 | <div id="changeset_compare_view_content"> | |
101 | ##CS |
|
97 | ##CS | |
102 | <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> |
|
98 | <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> | |
103 | <%include file="/compare/compare_cs.html" /> |
|
99 | <%include file="/compare/compare_cs.html" /> | |
104 |
|
100 | |||
105 | ## FILES |
|
101 | ## FILES | |
106 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
102 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> | |
107 |
|
103 | |||
108 | % if c.limited_diff: |
|
104 | % if c.limited_diff: | |
109 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
105 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} | |
110 | % else: |
|
106 | % else: | |
111 | ${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)}: |
|
107 | ${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)}: | |
112 | %endif |
|
108 | %endif | |
113 |
|
109 | |||
114 | </div> |
|
110 | </div> | |
115 | <div class="cs_files"> |
|
111 | <div class="cs_files"> | |
116 | %if not c.files: |
|
112 | %if not c.files: | |
117 | <span class="empty_data">${_('No files')}</span> |
|
113 | <span class="empty_data">${_('No files')}</span> | |
118 | %endif |
|
114 | %endif | |
119 | %for fid, change, f, stat in c.files: |
|
115 | %for fid, change, f, stat in c.files: | |
120 | <div class="cs_${change}"> |
|
116 | <div class="cs_${change}"> | |
121 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
117 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> | |
122 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
118 | <div class="changes">${h.fancy_file_stats(stat)}</div> | |
123 | </div> |
|
119 | </div> | |
124 | %endfor |
|
120 | %endfor | |
125 | </div> |
|
121 | </div> | |
126 | % if c.limited_diff: |
|
122 | % if c.limited_diff: | |
127 | <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> |
|
123 | <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> | |
128 | % endif |
|
124 | % endif | |
129 | </div> |
|
125 | </div> | |
130 | </div> |
|
126 | </div> | |
131 | ## REVIEWERS |
|
127 | ## REVIEWERS | |
132 | <div style="float:left; border-left:1px dashed #eee"> |
|
128 | <div style="float:left; border-left:1px dashed #eee"> | |
133 | <h4>${_('Pull request reviewers')}</h4> |
|
129 | <h4>${_('Pull request reviewers')}</h4> | |
134 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
130 | <div id="reviewers" style="padding:0px 0px 5px 10px"> | |
135 | ## members goes here ! |
|
131 | ## members goes here ! | |
136 | <div class="group_members_wrap" style="min-height:45px"> |
|
132 | <div class="group_members_wrap" style="min-height:45px"> | |
137 | <ul id="review_members" class="group_members"> |
|
133 | <ul id="review_members" class="group_members"> | |
138 | %for member,status in c.pull_request_reviewers: |
|
134 | %for member,status in c.pull_request_reviewers: | |
139 | <li id="reviewer_${member.user_id}"> |
|
135 | <li id="reviewer_${member.user_id}"> | |
140 | <div class="reviewers_member"> |
|
136 | <div class="reviewers_member"> | |
141 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
137 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> | |
142 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
138 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> | |
143 | </div> |
|
139 | </div> | |
144 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
140 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> | |
145 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
141 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> | |
146 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
142 | <input type="hidden" value="${member.user_id}" name="review_members" /> | |
147 | %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id): |
|
143 | %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id): | |
148 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
144 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> | |
149 | %endif |
|
145 | %endif | |
150 | </div> |
|
146 | </div> | |
151 | </li> |
|
147 | </li> | |
152 | %endfor |
|
148 | %endfor | |
153 | </ul> |
|
149 | </ul> | |
154 | </div> |
|
150 | </div> | |
155 | %if not c.pull_request.is_closed(): |
|
151 | %if not c.pull_request.is_closed(): | |
156 | <div class='ac'> |
|
152 | <div class='ac'> | |
157 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
153 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: | |
158 | <div class="reviewer_ac"> |
|
154 | <div class="reviewer_ac"> | |
159 | ${h.text('user', class_='yui-ac-input')} |
|
155 | ${h.text('user', class_='yui-ac-input')} | |
160 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> |
|
156 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> | |
161 | <div id="reviewers_container"></div> |
|
157 | <div id="reviewers_container"></div> | |
162 | </div> |
|
158 | </div> | |
163 | <div style="padding:0px 10px"> |
|
159 | <div style="padding:0px 10px"> | |
164 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> |
|
160 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> | |
165 | </div> |
|
161 | </div> | |
166 | %endif |
|
162 | %endif | |
167 | </div> |
|
163 | </div> | |
168 | %endif |
|
164 | %endif | |
169 | </div> |
|
165 | </div> | |
170 | </div> |
|
166 | </div> | |
171 | </div> |
|
167 | </div> | |
172 | <script> |
|
168 | <script> | |
173 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
169 | var _USERS_AC_DATA = ${c.users_array|n}; | |
174 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
170 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
175 | // TODO: switch this to pyroutes |
|
171 | // TODO: switch this to pyroutes | |
176 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
172 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; | |
177 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
173 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
178 |
|
174 | |||
179 | pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
175 | pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); | |
180 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); |
|
176 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); | |
181 | pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
177 | pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); | |
182 |
|
178 | |||
183 | </script> |
|
179 | </script> | |
184 |
|
180 | |||
185 | ## diff block |
|
181 | ## diff block | |
186 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
182 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
187 | %for fid, change, f, stat in c.files: |
|
183 | %for fid, change, f, stat in c.files: | |
188 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
184 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
189 | %endfor |
|
185 | %endfor | |
190 | % if c.limited_diff: |
|
186 | % if c.limited_diff: | |
191 | <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> |
|
187 | <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> | |
192 | % endif |
|
188 | % endif | |
193 |
|
189 | |||
194 |
|
190 | |||
195 | ## template for inline comment form |
|
191 | ## template for inline comment form | |
196 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
192 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
197 | ${comment.comment_inline_form()} |
|
193 | ${comment.comment_inline_form()} | |
198 |
|
194 | |||
199 | ## render comments and inlines |
|
195 | ## render comments and inlines | |
200 | ${comment.generate_comments(include_pr=True)} |
|
196 | ${comment.generate_comments(include_pr=True)} | |
201 |
|
197 | |||
202 | % if not c.pull_request.is_closed(): |
|
198 | % if not c.pull_request.is_closed(): | |
203 | ## main comment form and it status |
|
199 | ## main comment form and it status | |
204 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
200 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, | |
205 | pull_request_id=c.pull_request.pull_request_id), |
|
201 | pull_request_id=c.pull_request.pull_request_id), | |
206 | c.current_changeset_status, |
|
202 | c.current_changeset_status, | |
207 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
203 | close_btn=True, change_status=c.allowed_to_change_status)} | |
208 | %endif |
|
204 | %endif | |
209 |
|
205 | |||
210 | <script type="text/javascript"> |
|
206 | <script type="text/javascript"> | |
211 | YUE.onDOMReady(function(){ |
|
207 | YUE.onDOMReady(function(){ | |
212 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
208 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
213 |
|
209 | |||
214 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
210 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
215 | var show = 'none'; |
|
211 | var show = 'none'; | |
216 | var target = e.currentTarget; |
|
212 | var target = e.currentTarget; | |
217 | if(target.checked){ |
|
213 | if(target.checked){ | |
218 | var show = '' |
|
214 | var show = '' | |
219 | } |
|
215 | } | |
220 | var boxid = YUD.getAttribute(target,'id_for'); |
|
216 | var boxid = YUD.getAttribute(target,'id_for'); | |
221 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
217 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
222 | for(c in comments){ |
|
218 | for(c in comments){ | |
223 | YUD.setStyle(comments[c],'display',show); |
|
219 | YUD.setStyle(comments[c],'display',show); | |
224 | } |
|
220 | } | |
225 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
221 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
226 | for(c in btns){ |
|
222 | for(c in btns){ | |
227 | YUD.setStyle(btns[c],'display',show); |
|
223 | YUD.setStyle(btns[c],'display',show); | |
228 | } |
|
224 | } | |
229 | }) |
|
225 | }) | |
230 |
|
226 | |||
231 | YUE.on(YUQ('.line'),'click',function(e){ |
|
227 | YUE.on(YUQ('.line'),'click',function(e){ | |
232 | var tr = e.currentTarget; |
|
228 | var tr = e.currentTarget; | |
233 | injectInlineForm(tr); |
|
229 | injectInlineForm(tr); | |
234 | }); |
|
230 | }); | |
235 |
|
231 | |||
236 | // inject comments into they proper positions |
|
232 | // inject comments into they proper positions | |
237 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
233 | var file_comments = YUQ('.inline-comment-placeholder'); | |
238 | renderInlineComments(file_comments); |
|
234 | renderInlineComments(file_comments); | |
239 |
|
235 | |||
240 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
236 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ | |
241 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
237 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
242 | }) |
|
238 | }) | |
243 | }) |
|
239 | }) | |
244 | </script> |
|
240 | </script> | |
245 |
|
241 | |||
246 | </div> |
|
242 | </div> | |
247 |
|
243 | |||
248 | </%def> |
|
244 | </%def> |
@@ -1,142 +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} · ${c.rhodecode_name} |
|
8 | ${_('%s Settings') % c.repo_name} · ${c.rhodecode_name} | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
13 | » |
|
|||
14 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
|||
15 | » |
|
|||
16 | ${_('Settings')} |
|
12 | ${_('Settings')} | |
17 | </%def> |
|
13 | </%def> | |
18 |
|
14 | |||
19 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
20 | ${self.menu('settings')} |
|
16 | ${self.menu('settings')} | |
21 | </%def> |
|
17 | </%def> | |
22 |
|
18 | |||
23 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
24 | ${self.context_bar('options')} |
|
20 | ${self.context_bar('options')} | |
25 | <div class="box"> |
|
21 | <div class="box"> | |
26 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
27 | <div class="title"> |
|
23 | <div class="title"> | |
28 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
29 | </div> |
|
25 | </div> | |
30 | ${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')} | |
31 | <div class="form"> |
|
27 | <div class="form"> | |
32 | <!-- fields --> |
|
28 | <!-- fields --> | |
33 | <div class="fields"> |
|
29 | <div class="fields"> | |
34 | <div class="field"> |
|
30 | <div class="field"> | |
35 | <div class="label"> |
|
31 | <div class="label"> | |
36 | <label for="repo_name">${_('Name')}:</label> |
|
32 | <label for="repo_name">${_('Name')}:</label> | |
37 | </div> |
|
33 | </div> | |
38 | <div class="input"> |
|
34 | <div class="input"> | |
39 | ${h.text('repo_name',class_="medium")} |
|
35 | ${h.text('repo_name',class_="medium")} | |
40 | </div> |
|
36 | </div> | |
41 | </div> |
|
37 | </div> | |
42 | <div class="field"> |
|
38 | <div class="field"> | |
43 | <div class="label"> |
|
39 | <div class="label"> | |
44 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
40 | <label for="clone_uri">${_('Clone uri')}:</label> | |
45 | </div> |
|
41 | </div> | |
46 | <div class="input"> |
|
42 | <div class="input"> | |
47 | ${h.text('clone_uri',class_="medium")} |
|
43 | ${h.text('clone_uri',class_="medium")} | |
48 | <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> | |
49 | </div> |
|
45 | </div> | |
50 | </div> |
|
46 | </div> | |
51 | <div class="field"> |
|
47 | <div class="field"> | |
52 | <div class="label"> |
|
48 | <div class="label"> | |
53 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | <label for="repo_group">${_('Repository group')}:</label> | |
54 | </div> |
|
50 | </div> | |
55 | <div class="input"> |
|
51 | <div class="input"> | |
56 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
57 | <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> | |
58 | </div> |
|
54 | </div> | |
59 | </div> |
|
55 | </div> | |
60 | <div class="field"> |
|
56 | <div class="field"> | |
61 | <div class="label"> |
|
57 | <div class="label"> | |
62 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
58 | <label for="landing_rev">${_('Landing revision')}:</label> | |
63 | </div> |
|
59 | </div> | |
64 | <div class="input"> |
|
60 | <div class="input"> | |
65 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
61 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
66 | <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> | |
67 | </div> |
|
63 | </div> | |
68 | </div> |
|
64 | </div> | |
69 | <div class="field"> |
|
65 | <div class="field"> | |
70 | <div class="label label-textarea"> |
|
66 | <div class="label label-textarea"> | |
71 | <label for="repo_description">${_('Description')}:</label> |
|
67 | <label for="repo_description">${_('Description')}:</label> | |
72 | </div> |
|
68 | </div> | |
73 | <div class="textarea text-area editor"> |
|
69 | <div class="textarea text-area editor"> | |
74 | ${h.textarea('repo_description')} |
|
70 | ${h.textarea('repo_description')} | |
75 | <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> | |
76 | </div> |
|
72 | </div> | |
77 | </div> |
|
73 | </div> | |
78 |
|
74 | |||
79 | <div class="field"> |
|
75 | <div class="field"> | |
80 | <div class="label label-checkbox"> |
|
76 | <div class="label label-checkbox"> | |
81 | <label for="repo_private">${_('Private repository')}:</label> |
|
77 | <label for="repo_private">${_('Private repository')}:</label> | |
82 | </div> |
|
78 | </div> | |
83 | <div class="checkboxes"> |
|
79 | <div class="checkboxes"> | |
84 | ${h.checkbox('repo_private',value="True")} |
|
80 | ${h.checkbox('repo_private',value="True")} | |
85 | <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> | |
86 | </div> |
|
82 | </div> | |
87 | </div> |
|
83 | </div> | |
88 | %if c.visual.repository_fields: |
|
84 | %if c.visual.repository_fields: | |
89 | ## EXTRA FIELDS |
|
85 | ## EXTRA FIELDS | |
90 | %for field in c.repo_fields: |
|
86 | %for field in c.repo_fields: | |
91 | <div class="field"> |
|
87 | <div class="field"> | |
92 | <div class="label"> |
|
88 | <div class="label"> | |
93 | <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> | |
94 | </div> |
|
90 | </div> | |
95 | <div class="input input-medium"> |
|
91 | <div class="input input-medium"> | |
96 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
92 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
97 | %if field.field_desc: |
|
93 | %if field.field_desc: | |
98 | <span class="help-block">${field.field_desc}</span> |
|
94 | <span class="help-block">${field.field_desc}</span> | |
99 | %endif |
|
95 | %endif | |
100 | </div> |
|
96 | </div> | |
101 | </div> |
|
97 | </div> | |
102 | %endfor |
|
98 | %endfor | |
103 | %endif |
|
99 | %endif | |
104 | <div class="field"> |
|
100 | <div class="field"> | |
105 | <div class="label"> |
|
101 | <div class="label"> | |
106 | <label for="input">${_('Permissions')}:</label> |
|
102 | <label for="input">${_('Permissions')}:</label> | |
107 | </div> |
|
103 | </div> | |
108 | <div class="input"> |
|
104 | <div class="input"> | |
109 | <%include file="../admin/repos/repo_edit_perms.html"/> |
|
105 | <%include file="../admin/repos/repo_edit_perms.html"/> | |
110 | </div> |
|
106 | </div> | |
111 | </div> |
|
107 | </div> | |
112 |
|
108 | |||
113 | <div class="buttons"> |
|
109 | <div class="buttons"> | |
114 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
110 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
111 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
116 | </div> |
|
112 | </div> | |
117 |
|
113 | |||
118 | </div> |
|
114 | </div> | |
119 | </div> |
|
115 | </div> | |
120 | ${h.end_form()} |
|
116 | ${h.end_form()} | |
121 |
|
117 | |||
122 | <h3>${_('Delete')}</h3> |
|
118 | <h3>${_('Delete')}</h3> | |
123 | ${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')} | |
124 | <div class="form"> |
|
120 | <div class="form"> | |
125 | <div class="fields"> |
|
121 | <div class="fields"> | |
126 | <div class="field" style="border:none;color:#888"> |
|
122 | <div class="field" style="border:none;color:#888"> | |
127 | <div class="label"> |
|
123 | <div class="label"> | |
128 | <label for="">${_('Remove repository')}:</label> |
|
124 | <label for="">${_('Remove repository')}:</label> | |
129 | </div> |
|
125 | </div> | |
130 | <div class="checkboxes"> |
|
126 | <div class="checkboxes"> | |
131 | ${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')+"');")} | |
132 | <ul> |
|
128 | <ul> | |
133 | <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> | |
134 | </ul> |
|
130 | </ul> | |
135 | </div> |
|
131 | </div> | |
136 | </div> |
|
132 | </div> | |
137 | </div> |
|
133 | </div> | |
138 | </div> |
|
134 | </div> | |
139 | ${h.end_form()} |
|
135 | ${h.end_form()} | |
140 |
|
136 | |||
141 | </div> |
|
137 | </div> | |
142 | </%def> |
|
138 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now