Show More
@@ -1,355 +1,349 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.html"/> |
|
3 | 3 | |
|
4 | 4 | <!-- HEADER --> |
|
5 | 5 | <div id="header-dd"></div> |
|
6 | 6 | <div id="header"> |
|
7 | 7 | <div id="header-inner" class="title"> |
|
8 | 8 | <div id="logo"> |
|
9 | 9 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
10 | 10 | </div> |
|
11 | 11 | <!-- MENU --> |
|
12 | 12 | ${self.page_nav()} |
|
13 | 13 | <!-- END MENU --> |
|
14 | 14 | ${self.body()} |
|
15 | 15 | </div> |
|
16 | 16 | </div> |
|
17 | 17 | <!-- END HEADER --> |
|
18 | 18 | |
|
19 | 19 | <!-- CONTENT --> |
|
20 | 20 | <div id="content"> |
|
21 | 21 | <div class="flash_msg"> |
|
22 | 22 | <% messages = h.flash.pop_messages() %> |
|
23 | 23 | % if messages: |
|
24 | 24 | <ul id="flash-messages"> |
|
25 | 25 | % for message in messages: |
|
26 | 26 | <li class="${message.category}_msg">${message}</li> |
|
27 | 27 | % endfor |
|
28 | 28 | </ul> |
|
29 | 29 | % endif |
|
30 | 30 | </div> |
|
31 | 31 | <div id="main"> |
|
32 | 32 | ${next.main()} |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <!-- END CONTENT --> |
|
36 | 36 | |
|
37 | 37 | <!-- FOOTER --> |
|
38 | 38 | <div id="footer"> |
|
39 | 39 | <div id="footer-inner" class="title"> |
|
40 | 40 | <div> |
|
41 | 41 | <p class="footer-link"> |
|
42 | 42 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
43 | 43 | </p> |
|
44 | 44 | <p class="footer-link-right"> |
|
45 | 45 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> |
|
46 | 46 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
47 | 47 | </p> |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | <!-- END FOOTER --> |
|
52 | 52 | |
|
53 | 53 | ### MAKO DEFS ### |
|
54 | <%def name="page_nav()"> | |
|
55 | ${self.menu()} | |
|
56 | </%def> | |
|
57 | ||
|
58 | 54 | <%def name="breadcrumbs()"> |
|
59 | 55 | <div class="breadcrumbs"> |
|
60 | 56 | ${self.breadcrumbs_links()} |
|
61 | 57 | </div> |
|
62 | 58 | </%def> |
|
63 | 59 | |
|
64 |
<%def name="context_bar(current |
|
|
65 | %if c.repo_name: | |
|
60 | <%def name="context_bar(current)"> | |
|
66 | 61 | ${repo_context_bar(current)} |
|
67 | %endif | |
|
68 | 62 | </%def> |
|
69 | 63 | |
|
70 | 64 | <%def name="admin_menu()"> |
|
71 | 65 | <ul class="admin_menu"> |
|
72 | 66 | <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal ')}</li> |
|
73 | 67 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
74 | 68 | <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
75 | 69 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
76 | 70 | <li>${h.link_to(_('user groups'),h.url('users_groups'),class_='groups')}</li> |
|
77 | 71 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
78 | 72 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
79 | 73 | <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li> |
|
80 | 74 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
81 | 75 | </ul> |
|
82 | 76 | </%def> |
|
83 | 77 | |
|
84 | 78 | <%def name="admin_menu_simple()"> |
|
85 | 79 | <ul> |
|
86 | 80 | <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
87 | 81 | </ul> |
|
88 | 82 | </%def> |
|
89 | 83 | |
|
90 | 84 | <%def name="repo_context_bar(current=None)"> |
|
91 | 85 | <% |
|
92 | 86 | def follow_class(): |
|
93 | 87 | if c.repository_following: |
|
94 | 88 | return h.literal('following') |
|
95 | 89 | else: |
|
96 | 90 | return h.literal('follow') |
|
97 | 91 | %> |
|
98 | 92 | <% |
|
99 | 93 | def is_current(selected): |
|
100 | 94 | if selected == current: |
|
101 | 95 | return h.literal('class="current"') |
|
102 | 96 | %> |
|
103 | 97 | |
|
104 | 98 | <!--- CONTEXT BAR --> |
|
105 | 99 | <div id="context-bar" class="box"> |
|
106 | 100 | <div id="context-top"> |
|
107 | 101 | <div id="breadcrumbs"> |
|
108 | 102 | ${h.link_to(_(u'Repositories'),h.url('home'))} |
|
109 | 103 | » |
|
110 | 104 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
111 | 105 | </div> |
|
112 | 106 | ## TODO: this check feels wrong, it would be better to have a check for permissions |
|
113 | 107 | ## also it feels like a job for the controller |
|
114 | 108 | %if c.rhodecode_user.username != 'default': |
|
115 | 109 | <ul id="context-actions" class="horizontal-list"> |
|
116 | 110 | <li> |
|
117 | 111 | <button class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');"> |
|
118 | 112 | <!--span class="icon show-follow follow"></span> |
|
119 | 113 | <span class="icon show-following following"></span--> |
|
120 | 114 | <span class="show-follow">${_('Follow')}</span> |
|
121 | 115 | <span class="show-following">${_('Unfollow')}</span> |
|
122 | 116 | </button> |
|
123 | 117 | </li> |
|
124 | 118 | <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li> |
|
125 | 119 | %if h.is_hg(c.rhodecode_repo): |
|
126 | 120 | <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li> |
|
127 | 121 | %endif |
|
128 | 122 | </ul> |
|
129 | 123 | %endif |
|
130 | 124 | </div> |
|
131 | 125 | <div id="context-state"> |
|
132 | 126 | <ul id="context-pages" class="horizontal-list"> |
|
133 | 127 | <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li> |
|
134 | 128 | <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li> |
|
135 | 129 | <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li> |
|
136 | 130 | <li ${is_current('switch-to')}> |
|
137 | 131 | <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a> |
|
138 | 132 | <ul id="switch_to_list_2" class="switch_to submenu"> |
|
139 | 133 | <li><a href="#">${_('loading...')}</a></li> |
|
140 | 134 | </ul> |
|
141 | 135 | </li> |
|
142 | 136 | <li ${is_current('options')}> |
|
143 | 137 | <a href="#" class="dropdown options"></span>${_('Options')}</a> |
|
144 | 138 | <ul> |
|
145 | 139 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
146 | 140 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
147 | 141 | <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
148 | 142 | %else: |
|
149 | 143 | <li>${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
150 | 144 | %endif |
|
151 | 145 | %endif |
|
152 | 146 | %if c.rhodecode_db_repo.fork: |
|
153 | 147 | <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default'),class_='compare_request')}</li> |
|
154 | 148 | %endif |
|
155 | 149 | <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li> |
|
156 | 150 | <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li> |
|
157 | 151 | |
|
158 | 152 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
159 | 153 | %if c.rhodecode_db_repo.locked[0]: |
|
160 | 154 | <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> |
|
161 | 155 | %else: |
|
162 | 156 | <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> |
|
163 | 157 | %endif |
|
164 | 158 | %endif |
|
165 | 159 | </ul> |
|
166 | 160 | </li> |
|
167 | 161 | <li ${is_current('showpullrequest')}> |
|
168 | 162 | <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')} |
|
169 | 163 | %if c.repository_pull_requests: |
|
170 | 164 | <span>${c.repository_pull_requests}</span> |
|
171 | 165 | %endif |
|
172 | 166 | </a> |
|
173 | 167 | </li> |
|
174 | 168 | </ul> |
|
175 | 169 | </div> |
|
176 | 170 | </div> |
|
177 | 171 | <script type="text/javascript"> |
|
178 | 172 | YUE.on('branch_tag_switcher_2','mouseover',function(){ |
|
179 | 173 | var loaded = YUD.hasClass('branch_tag_switcher_2','loaded'); |
|
180 | 174 | if(!loaded){ |
|
181 | 175 | YUD.addClass('branch_tag_switcher_2','loaded'); |
|
182 | 176 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2', |
|
183 | 177 | function(o){}, |
|
184 | 178 | function(o){YUD.removeClass('branch_tag_switcher_2','loaded');} |
|
185 | 179 | ,null); |
|
186 | 180 | } |
|
187 | 181 | return false; |
|
188 | 182 | }); |
|
189 | 183 | </script> |
|
190 | 184 | <!--- END CONTEXT BAR --> |
|
191 | 185 | </%def> |
|
192 | 186 | |
|
193 | 187 | <%def name="usermenu()"> |
|
194 | 188 | ## USER MENU |
|
195 | 189 | <li> |
|
196 | 190 | <a class="menu_link childs" id="quick_login_link"> |
|
197 | 191 | <span class="icon"> |
|
198 | 192 | <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar"> |
|
199 | 193 | </span> |
|
200 | 194 | %if c.rhodecode_user.username != 'default': |
|
201 | 195 | <span class="menu_link_user">${c.rhodecode_user.username}</span> |
|
202 | 196 | %if c.unread_notifications != 0: |
|
203 | 197 | <span class="menu_link_notifications">${c.unread_notifications}</span> |
|
204 | 198 | %endif |
|
205 | 199 | %else: |
|
206 | 200 | <span>${_('Not logged in')}</span> |
|
207 | 201 | %endif |
|
208 | 202 | </a> |
|
209 | 203 | |
|
210 | 204 | <div class="user-menu"> |
|
211 | 205 | <div id="quick_login"> |
|
212 | 206 | %if c.rhodecode_user.username == 'default': |
|
213 | 207 | <h4>${_('Login to your account')}</h4> |
|
214 | 208 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
215 | 209 | <div class="form"> |
|
216 | 210 | <div class="fields"> |
|
217 | 211 | <div class="field"> |
|
218 | 212 | <div class="label"> |
|
219 | 213 | <label for="username">${_('Username')}:</label> |
|
220 | 214 | </div> |
|
221 | 215 | <div class="input"> |
|
222 | 216 | ${h.text('username',class_='focus')} |
|
223 | 217 | </div> |
|
224 | 218 | |
|
225 | 219 | </div> |
|
226 | 220 | <div class="field"> |
|
227 | 221 | <div class="label"> |
|
228 | 222 | <label for="password">${_('Password')}:</label> |
|
229 | 223 | </div> |
|
230 | 224 | <div class="input"> |
|
231 | 225 | ${h.password('password',class_='focus')} |
|
232 | 226 | </div> |
|
233 | 227 | |
|
234 | 228 | </div> |
|
235 | 229 | <div class="buttons"> |
|
236 | 230 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
237 | 231 | <div class="register"> |
|
238 | 232 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
239 | 233 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
240 | 234 | %endif |
|
241 | 235 | </div> |
|
242 | 236 | <div class="submit"> |
|
243 | 237 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
244 | 238 | </div> |
|
245 | 239 | </div> |
|
246 | 240 | </div> |
|
247 | 241 | </div> |
|
248 | 242 | ${h.end_form()} |
|
249 | 243 | %else: |
|
250 | 244 | <div class="links_left"> |
|
251 | 245 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
252 | 246 | <div class="email">${c.rhodecode_user.email}</div> |
|
253 | 247 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
254 | 248 | ##<div class="notifications"><a href="${h.url('notifications')}">${_('Notifications')}</a></div> |
|
255 | 249 | <div class="unread"><a href="${h.url('notifications')}">${_('Unread notifications')}: ${c.unread_notifications}</a></div> |
|
256 | 250 | </div> |
|
257 | 251 | <div class="links_right"> |
|
258 | 252 | <ol class="links"> |
|
259 | 253 | ##<li>${h.link_to(_(u'Home'),h.url('home'))}</li> |
|
260 | 254 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> |
|
261 | 255 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
262 | 256 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
263 | 257 | </ol> |
|
264 | 258 | </div> |
|
265 | 259 | %endif |
|
266 | 260 | </div> |
|
267 | 261 | </div> |
|
268 | 262 | |
|
269 | 263 | </li> |
|
270 | 264 | </%def> |
|
271 | 265 | |
|
272 | 266 | <%def name="menu(current=None)"> |
|
273 | 267 | <% |
|
274 | 268 | def is_current(selected): |
|
275 | 269 | if selected == current: |
|
276 | 270 | return h.literal('class="current"') |
|
277 | 271 | %> |
|
278 | 272 | <ul id="quick" class="horizontal-list"> |
|
279 | 273 | <!-- repo switcher --> |
|
280 | 274 | <li ${is_current('repositories')}> |
|
281 | 275 | <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}"> |
|
282 | 276 | ${_('Repositories')} |
|
283 | 277 | </a> |
|
284 | 278 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
285 | 279 | <li> |
|
286 | 280 | <a href="#">${_('loading...')}</a> |
|
287 | 281 | </li> |
|
288 | 282 | </ul> |
|
289 | 283 | </li> |
|
290 | 284 | ##ROOT MENU |
|
291 | 285 | %if c.rhodecode_user.username != 'default': |
|
292 | 286 | <li ${is_current('journal')}> |
|
293 | 287 | <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}"> |
|
294 | 288 | ${_('Journal')} |
|
295 | 289 | </a> |
|
296 | 290 | </li> |
|
297 | 291 | %else: |
|
298 | 292 | <li ${is_current('journal')}> |
|
299 | 293 | <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
300 | 294 | ${_('Public journal')} |
|
301 | 295 | </a> |
|
302 | 296 | </li> |
|
303 | 297 | %endif |
|
304 | 298 | <li ${is_current('search')}> |
|
305 | 299 | <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}"> |
|
306 | 300 | ${_('Search')} |
|
307 | 301 | </a> |
|
308 | 302 | </li> |
|
309 | 303 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
310 | 304 | <li ${is_current('admin')}> |
|
311 | 305 | <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
312 | 306 | ${_('Admin')} |
|
313 | 307 | </a> |
|
314 | 308 | ${admin_menu()} |
|
315 | 309 | </li> |
|
316 | 310 | % elif c.rhodecode_user.groups_admin: |
|
317 | 311 | <li ${is_current('admin')}> |
|
318 | 312 | <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
319 | 313 | ${_('Admin')} |
|
320 | 314 | </a> |
|
321 | 315 | ${admin_menu_simple()} |
|
322 | 316 | </li> |
|
323 | 317 | % endif |
|
324 | 318 | ${usermenu()} |
|
325 | 319 | <script type="text/javascript"> |
|
326 | 320 | YUE.on('repo_switcher','mouseover',function(){ |
|
327 | 321 | var target = 'q_filter_rs'; |
|
328 | 322 | var qfilter_activate = function(){ |
|
329 | 323 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
330 | 324 | var func = function(node){ |
|
331 | 325 | return node.parentNode; |
|
332 | 326 | } |
|
333 | 327 | q_filter(target,nodes,func); |
|
334 | 328 | } |
|
335 | 329 | |
|
336 | 330 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
337 | 331 | if(!loaded){ |
|
338 | 332 | YUD.addClass('repo_switcher','loaded'); |
|
339 | 333 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
340 | 334 | function(o){qfilter_activate();YUD.get(target).focus()}, |
|
341 | 335 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
342 | 336 | ,null); |
|
343 | 337 | }else{ |
|
344 | 338 | YUD.get(target).focus(); |
|
345 | 339 | } |
|
346 | 340 | return false; |
|
347 | 341 | }); |
|
348 | 342 | |
|
349 | 343 | YUE.on('header-dd', 'click',function(e){ |
|
350 | 344 | YUD.addClass('header-inner', 'hover'); |
|
351 | 345 | YUD.addClass('content', 'hover'); |
|
352 | 346 | }); |
|
353 | 347 | |
|
354 | 348 | </script> |
|
355 | 349 | </%def> |
@@ -1,26 +1,30 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Forks') % c.repo_name} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('Forks')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | <%def name="page_nav()"> | |
|
13 | ${self.menu('repositories')} | |
|
14 | </%def> | |
|
15 | ||
|
12 | 16 | <%def name="main()"> |
|
13 | 17 | ${self.context_bar('showforks')} |
|
14 | 18 | <div class="box"> |
|
15 | 19 | <!-- box / title --> |
|
16 | 20 | <div class="title"> |
|
17 | 21 | ${self.breadcrumbs()} |
|
18 | 22 | </div> |
|
19 | 23 | <!-- end box / title --> |
|
20 | 24 | <div class="table"> |
|
21 | 25 | <div id="forks"> |
|
22 | 26 | ${c.forks_data} |
|
23 | 27 | </div> |
|
24 | 28 | </div> |
|
25 | 29 | </div> |
|
26 | 30 | </%def> |
@@ -1,205 +1,209 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('New pull request')} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${_('New pull request')} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | <%def name="page_nav()"> | |
|
12 | ${self.menu('repositories')} | |
|
13 | </%def> | |
|
14 | ||
|
11 | 15 | <%def name="main()"> |
|
12 | 16 | ${self.context_bar('showpullrequest')} |
|
13 | 17 | <div class="box"> |
|
14 | 18 | <!-- box / title --> |
|
15 | 19 | <div class="title"> |
|
16 | 20 | ${self.breadcrumbs()} |
|
17 | 21 | </div> |
|
18 | 22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
19 | 23 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
20 | 24 | ##ORG |
|
21 | 25 | <div style="float:left"> |
|
22 | 26 | <div> |
|
23 | 27 | <span style="font-size: 20px"> |
|
24 | 28 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} |
|
25 | 29 | </span> |
|
26 | 30 | <div style="padding:5px 3px 3px 20px;">${c.rhodecode_db_repo.description}</div> |
|
27 | 31 | </div> |
|
28 | 32 | <div style="clear:both;padding-top: 10px"></div> |
|
29 | 33 | </div> |
|
30 | 34 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
31 | 35 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
32 | 36 | </div> |
|
33 | 37 | |
|
34 | 38 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
35 | 39 | <div style="float:left"> |
|
36 | 40 | <div> |
|
37 | 41 | <span style="font-size: 20px"> |
|
38 | 42 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${c.default_other_repo_info['revs']} |
|
39 | 43 | </span> |
|
40 | 44 | <div id="other_repo_desc" style="padding:5px 3px 3px 20px;"></div> |
|
41 | 45 | </div> |
|
42 | 46 | <div style="clear:both;padding-top: 10px"></div> |
|
43 | 47 | </div> |
|
44 | 48 | <div style="clear:both;padding-top: 10px"></div> |
|
45 | 49 | ## overview pulled by ajax |
|
46 | 50 | <div style="float:left" id="pull_request_overview"></div> |
|
47 | 51 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
48 | 52 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
49 | 53 | </div> |
|
50 | 54 | </div> |
|
51 | 55 | <div style="float:left; border-left:1px dashed #eee"> |
|
52 | 56 | <h4>${_('Pull request reviewers')}</h4> |
|
53 | 57 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
54 | 58 | ## members goes here ! |
|
55 | 59 | <div class="group_members_wrap"> |
|
56 | 60 | <ul id="review_members" class="group_members"> |
|
57 | 61 | %for member in [c.default_other_repo_info['user']]: |
|
58 | 62 | <li id="reviewer_${member['user_id']}"> |
|
59 | 63 | <div class="reviewers_member"> |
|
60 | 64 | <div class="gravatar"><img alt="gravatar" src="${member['gravatar_link']}"/> </div> |
|
61 | 65 | <div style="float:left">${member['firstname']} ${member['lastname']} (${_('owner')})</div> |
|
62 | 66 | <input type="hidden" value="${member['user_id']}" name="review_members" /> |
|
63 | 67 | <span class="delete_icon action_button" onclick="removeReviewMember(${member['user_id']})"></span> |
|
64 | 68 | </div> |
|
65 | 69 | </li> |
|
66 | 70 | %endfor |
|
67 | 71 | </ul> |
|
68 | 72 | </div> |
|
69 | 73 | |
|
70 | 74 | <div class='ac'> |
|
71 | 75 | <div class="reviewer_ac"> |
|
72 | 76 | ${h.text('user', class_='yui-ac-input')} |
|
73 | 77 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
74 | 78 | <div id="reviewers_container"></div> |
|
75 | 79 | </div> |
|
76 | 80 | </div> |
|
77 | 81 | </div> |
|
78 | 82 | </div> |
|
79 | 83 | <h3>${_('Create new pull request')}</h3> |
|
80 | 84 | |
|
81 | 85 | <div class="form"> |
|
82 | 86 | <!-- fields --> |
|
83 | 87 | |
|
84 | 88 | <div class="fields"> |
|
85 | 89 | |
|
86 | 90 | <div class="field"> |
|
87 | 91 | <div class="label"> |
|
88 | 92 | <label for="pullrequest_title">${_('Title')}:</label> |
|
89 | 93 | </div> |
|
90 | 94 | <div class="input"> |
|
91 | 95 | ${h.text('pullrequest_title',size=30)} |
|
92 | 96 | </div> |
|
93 | 97 | </div> |
|
94 | 98 | |
|
95 | 99 | <div class="field"> |
|
96 | 100 | <div class="label label-textarea"> |
|
97 | 101 | <label for="pullrequest_desc">${_('Description')}:</label> |
|
98 | 102 | </div> |
|
99 | 103 | <div class="textarea text-area editor"> |
|
100 | 104 | ${h.textarea('pullrequest_desc',size=30)} |
|
101 | 105 | </div> |
|
102 | 106 | </div> |
|
103 | 107 | |
|
104 | 108 | <div class="buttons"> |
|
105 | 109 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
106 | 110 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
107 | 111 | </div> |
|
108 | 112 | </div> |
|
109 | 113 | </div> |
|
110 | 114 | ${h.end_form()} |
|
111 | 115 | |
|
112 | 116 | </div> |
|
113 | 117 | |
|
114 | 118 | <script type="text/javascript"> |
|
115 | 119 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
116 | 120 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
117 | 121 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
118 | 122 | |
|
119 | 123 | var other_repos_info = ${c.other_repos_info|n}; |
|
120 | 124 | |
|
121 | 125 | var otherrepoChanged = function(){ |
|
122 | 126 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
|
123 | 127 | var repo_name = sel_box.options[sel_box.selectedIndex].value; |
|
124 | 128 | |
|
125 | 129 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
|
126 | 130 | // replace options of other_ref with the ones for the current other_repo |
|
127 | 131 | var other_ref_selector = YUD.get('other_ref'); |
|
128 | 132 | var new_select = YUD.createElementFromMarkup(other_repos_info[repo_name]['revs']); |
|
129 | 133 | var new_selectedIndex = new_select.selectedIndex; |
|
130 | 134 | other_ref_selector.innerHTML = ""; // clear old options |
|
131 | 135 | while (new_select.length > 0){ // children will be popped when appened to other_ref_selector |
|
132 | 136 | other_ref_selector.appendChild(new_select.children[0]); |
|
133 | 137 | } |
|
134 | 138 | // browsers lost track of selected when appendChild was used |
|
135 | 139 | other_ref_selector.selectedIndex = new_selectedIndex; |
|
136 | 140 | |
|
137 | 141 | // reset && add the reviewer based on selected repo |
|
138 | 142 | var _data = other_repos_info[repo_name]; |
|
139 | 143 | YUD.get('review_members').innerHTML = ''; |
|
140 | 144 | addReviewMember(_data.user.user_id, _data.user.firstname, |
|
141 | 145 | _data.user.lastname, _data.user.username, |
|
142 | 146 | _data.user.gravatar_link); |
|
143 | 147 | } |
|
144 | 148 | |
|
145 | 149 | var loadPreview = function(){ |
|
146 | 150 | //url template |
|
147 | 151 | var url = "${h.url('compare_url', |
|
148 | 152 | repo_name='__other_repo__', |
|
149 | 153 | org_ref_type='__other_ref_type__', |
|
150 | 154 | org_ref='__other_ref__', |
|
151 | 155 | other_repo='__org_repo__', |
|
152 | 156 | other_ref_type='__org_ref_type__', |
|
153 | 157 | other_ref='__org_ref__', |
|
154 | 158 | as_form=True, |
|
155 | 159 | merge=True, |
|
156 | 160 | )}"; |
|
157 | 161 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; |
|
158 | 162 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); |
|
159 | 163 | |
|
160 | 164 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; |
|
161 | 165 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); |
|
162 | 166 | |
|
163 | 167 | var select_refs = YUQ('#pull_request_form select.refs') |
|
164 | 168 | var rev_data = { |
|
165 | 169 | 'org_repo': org_repo, |
|
166 | 170 | 'org_ref': org_ref[2], |
|
167 | 171 | 'org_ref_type': 'rev', |
|
168 | 172 | 'other_repo': other_repo, |
|
169 | 173 | 'other_ref': other_ref[2], |
|
170 | 174 | 'other_ref_type': 'rev', |
|
171 | 175 | }; // gather the org/other ref and repo here |
|
172 | 176 | |
|
173 | 177 | for (k in rev_data){ |
|
174 | 178 | url = url.replace('__'+k+'__',rev_data[k]); |
|
175 | 179 | } |
|
176 | 180 | |
|
177 | 181 | YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}"; |
|
178 | 182 | ypjax(url,'pull_request_overview'); |
|
179 | 183 | |
|
180 | 184 | YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ... |
|
181 | 185 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
|
182 | 186 | } |
|
183 | 187 | |
|
184 | 188 | ## refresh automatically when something changes (org_repo can't change) |
|
185 | 189 | |
|
186 | 190 | YUE.on('org_ref', 'change', function(e){ |
|
187 | 191 | loadPreview(); |
|
188 | 192 | }); |
|
189 | 193 | |
|
190 | 194 | YUE.on('other_repo', 'change', function(e){ |
|
191 | 195 | otherrepoChanged(); |
|
192 | 196 | loadPreview(); |
|
193 | 197 | }); |
|
194 | 198 | |
|
195 | 199 | YUE.on('other_ref', 'change', function(e){ |
|
196 | 200 | loadPreview(); |
|
197 | 201 | }); |
|
198 | 202 | |
|
199 | 203 | otherrepoChanged(); |
|
200 | 204 | //lazy load overview after 0.5s |
|
201 | 205 | setTimeout(loadPreview, 500); |
|
202 | 206 | |
|
203 | 207 | </script> |
|
204 | 208 | |
|
205 | 209 | </%def> |
@@ -1,244 +1,248 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | <%def name="page_nav()"> | |
|
12 | ${self.menu('repositories')} | |
|
13 | </%def> | |
|
14 | ||
|
11 | 15 | <%def name="main()"> |
|
12 | 16 | ${self.context_bar('showpullrequest')} |
|
13 | 17 | <div class="box"> |
|
14 | 18 | <!-- box / title --> |
|
15 | 19 | <div class="title"> |
|
16 | 20 | ${self.breadcrumbs()} |
|
17 | 21 | </div> |
|
18 | 22 | %if c.pull_request.is_closed(): |
|
19 | 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> |
|
20 | 24 | %endif |
|
21 | 25 | <h3> |
|
22 | 26 | %if c.pull_request.is_closed(): |
|
23 | 27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
24 | 28 | %endif |
|
25 | 29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> |
|
26 | 30 | ${_('Title')}: ${c.pull_request.title}</h3> |
|
27 | 31 | |
|
28 | 32 | <div class="form"> |
|
29 | 33 | <div id="summary" class="fields"> |
|
30 | 34 | <div class="field"> |
|
31 | 35 | <div class="label-summary"> |
|
32 | 36 | <label>${_('Review status')}:</label> |
|
33 | 37 | </div> |
|
34 | 38 | <div class="input"> |
|
35 | 39 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
36 | 40 | %if c.current_changeset_status: |
|
37 | 41 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
38 | 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> |
|
39 | 43 | %endif |
|
40 | 44 | </div> |
|
41 | 45 | </div> |
|
42 | 46 | </div> |
|
43 | 47 | <div class="field"> |
|
44 | 48 | <div class="label-summary"> |
|
45 | 49 | <label>${_('Still not reviewed by')}:</label> |
|
46 | 50 | </div> |
|
47 | 51 | <div class="input"> |
|
48 | 52 | % if len(c.pull_request_pending_reviewers) > 0: |
|
49 | 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> |
|
50 | 54 | %else: |
|
51 | 55 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
52 | 56 | %endif |
|
53 | 57 | </div> |
|
54 | 58 | </div> |
|
55 | 59 | <div class="field"> |
|
56 | 60 | <div class="label-summary"> |
|
57 | 61 | <label>${_('Origin repository')}:</label> |
|
58 | 62 | </div> |
|
59 | 63 | <div class="input"> |
|
60 | 64 | <div> |
|
61 | 65 | ##%if h.is_hg(c.pull_request.org_repo): |
|
62 | 66 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
63 | 67 | ##%elif h.is_git(c.pull_request.org_repo): |
|
64 | 68 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
65 | 69 | ##%endif |
|
66 | 70 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> |
|
67 | 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> |
|
68 | 72 | </div> |
|
69 | 73 | </div> |
|
70 | 74 | </div> |
|
71 | 75 | <div class="field"> |
|
72 | 76 | <div class="label-summary"> |
|
73 | 77 | <label>${_('Summary')}:</label> |
|
74 | 78 | </div> |
|
75 | 79 | <div class="input"> |
|
76 | 80 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> |
|
77 | 81 | </div> |
|
78 | 82 | </div> |
|
79 | 83 | <div class="field"> |
|
80 | 84 | <div class="label-summary"> |
|
81 | 85 | <label>${_('Created on')}:</label> |
|
82 | 86 | </div> |
|
83 | 87 | <div class="input"> |
|
84 | 88 | <div>${h.fmt_date(c.pull_request.created_on)}</div> |
|
85 | 89 | </div> |
|
86 | 90 | </div> |
|
87 | 91 | </div> |
|
88 | 92 | </div> |
|
89 | 93 | |
|
90 | 94 | <div style="overflow: auto;"> |
|
91 | 95 | ##DIFF |
|
92 | 96 | <div class="table" style="float:left;clear:none"> |
|
93 | 97 | <div id="body" class="diffblock"> |
|
94 | 98 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
95 | 99 | </div> |
|
96 | 100 | <div id="changeset_compare_view_content"> |
|
97 | 101 | ##CS |
|
98 | 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> |
|
99 | 103 | <%include file="/compare/compare_cs.html" /> |
|
100 | 104 | |
|
101 | 105 | ## FILES |
|
102 | 106 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
103 | 107 | |
|
104 | 108 | % if c.limited_diff: |
|
105 | 109 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
106 | 110 | % else: |
|
107 | 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)}: |
|
108 | 112 | %endif |
|
109 | 113 | |
|
110 | 114 | </div> |
|
111 | 115 | <div class="cs_files"> |
|
112 | 116 | %if not c.files: |
|
113 | 117 | <span class="empty_data">${_('No files')}</span> |
|
114 | 118 | %endif |
|
115 | 119 | %for fid, change, f, stat in c.files: |
|
116 | 120 | <div class="cs_${change}"> |
|
117 | 121 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
118 | 122 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
119 | 123 | </div> |
|
120 | 124 | %endfor |
|
121 | 125 | </div> |
|
122 | 126 | % if c.limited_diff: |
|
123 | 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> |
|
124 | 128 | % endif |
|
125 | 129 | </div> |
|
126 | 130 | </div> |
|
127 | 131 | ## REVIEWERS |
|
128 | 132 | <div style="float:left; border-left:1px dashed #eee"> |
|
129 | 133 | <h4>${_('Pull request reviewers')}</h4> |
|
130 | 134 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
131 | 135 | ## members goes here ! |
|
132 | 136 | <div class="group_members_wrap" style="min-height:45px"> |
|
133 | 137 | <ul id="review_members" class="group_members"> |
|
134 | 138 | %for member,status in c.pull_request_reviewers: |
|
135 | 139 | <li id="reviewer_${member.user_id}"> |
|
136 | 140 | <div class="reviewers_member"> |
|
137 | 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'))}"> |
|
138 | 142 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
139 | 143 | </div> |
|
140 | 144 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
141 | 145 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
142 | 146 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
143 | 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): |
|
144 | 148 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
145 | 149 | %endif |
|
146 | 150 | </div> |
|
147 | 151 | </li> |
|
148 | 152 | %endfor |
|
149 | 153 | </ul> |
|
150 | 154 | </div> |
|
151 | 155 | %if not c.pull_request.is_closed(): |
|
152 | 156 | <div class='ac'> |
|
153 | 157 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
154 | 158 | <div class="reviewer_ac"> |
|
155 | 159 | ${h.text('user', class_='yui-ac-input')} |
|
156 | 160 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> |
|
157 | 161 | <div id="reviewers_container"></div> |
|
158 | 162 | </div> |
|
159 | 163 | <div style="padding:0px 10px"> |
|
160 | 164 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> |
|
161 | 165 | </div> |
|
162 | 166 | %endif |
|
163 | 167 | </div> |
|
164 | 168 | %endif |
|
165 | 169 | </div> |
|
166 | 170 | </div> |
|
167 | 171 | </div> |
|
168 | 172 | <script> |
|
169 | 173 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
170 | 174 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
171 | 175 | // TODO: switch this to pyroutes |
|
172 | 176 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
173 | 177 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
174 | 178 | |
|
175 | 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']); |
|
176 | 180 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); |
|
177 | 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']); |
|
178 | 182 | |
|
179 | 183 | </script> |
|
180 | 184 | |
|
181 | 185 | ## diff block |
|
182 | 186 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
183 | 187 | %for fid, change, f, stat in c.files: |
|
184 | 188 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
185 | 189 | %endfor |
|
186 | 190 | % if c.limited_diff: |
|
187 | 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> |
|
188 | 192 | % endif |
|
189 | 193 | |
|
190 | 194 | |
|
191 | 195 | ## template for inline comment form |
|
192 | 196 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
193 | 197 | ${comment.comment_inline_form()} |
|
194 | 198 | |
|
195 | 199 | ## render comments and inlines |
|
196 | 200 | ${comment.generate_comments(include_pr=True)} |
|
197 | 201 | |
|
198 | 202 | % if not c.pull_request.is_closed(): |
|
199 | 203 | ## main comment form and it status |
|
200 | 204 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
201 | 205 | pull_request_id=c.pull_request.pull_request_id), |
|
202 | 206 | c.current_changeset_status, |
|
203 | 207 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
204 | 208 | %endif |
|
205 | 209 | |
|
206 | 210 | <script type="text/javascript"> |
|
207 | 211 | YUE.onDOMReady(function(){ |
|
208 | 212 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
209 | 213 | |
|
210 | 214 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
211 | 215 | var show = 'none'; |
|
212 | 216 | var target = e.currentTarget; |
|
213 | 217 | if(target.checked){ |
|
214 | 218 | var show = '' |
|
215 | 219 | } |
|
216 | 220 | var boxid = YUD.getAttribute(target,'id_for'); |
|
217 | 221 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
218 | 222 | for(c in comments){ |
|
219 | 223 | YUD.setStyle(comments[c],'display',show); |
|
220 | 224 | } |
|
221 | 225 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
222 | 226 | for(c in btns){ |
|
223 | 227 | YUD.setStyle(btns[c],'display',show); |
|
224 | 228 | } |
|
225 | 229 | }) |
|
226 | 230 | |
|
227 | 231 | YUE.on(YUQ('.line'),'click',function(e){ |
|
228 | 232 | var tr = e.currentTarget; |
|
229 | 233 | injectInlineForm(tr); |
|
230 | 234 | }); |
|
231 | 235 | |
|
232 | 236 | // inject comments into they proper positions |
|
233 | 237 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
234 | 238 | renderInlineComments(file_comments); |
|
235 | 239 | |
|
236 | 240 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
237 | 241 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
238 | 242 | }) |
|
239 | 243 | }) |
|
240 | 244 | </script> |
|
241 | 245 | |
|
242 | 246 | </div> |
|
243 | 247 | |
|
244 | 248 | </%def> |
@@ -1,38 +1,42 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Pull Requests') % c.repo_name} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${_('Pull requests')} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | <%def name="page_nav()"> | |
|
12 | ${self.menu('repositories')} | |
|
13 | </%def> | |
|
14 | ||
|
11 | 15 | <%def name="main()"> |
|
12 | 16 | ${self.context_bar('showpullrequest')} |
|
13 | 17 | <div class="box"> |
|
14 | 18 | <!-- box / title --> |
|
15 | 19 | <div class="title"> |
|
16 | 20 | ${self.breadcrumbs()} |
|
17 | 21 | </div> |
|
18 | 22 | |
|
19 | 23 | %for pr in c.pull_requests: |
|
20 | 24 | <div> |
|
21 | 25 | <h4 style="border:0px;padding:0px"> |
|
22 | 26 | %if pr.is_closed(): |
|
23 | 27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
24 | 28 | %endif |
|
25 | 29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> |
|
26 | 30 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> |
|
27 | 31 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} |
|
28 | 32 | </a> |
|
29 | 33 | </h4> |
|
30 | 34 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> |
|
31 | 35 | <div style="padding:0px 24px">${pr.description}</div> |
|
32 | 36 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> |
|
33 | 37 | </div> |
|
34 | 38 | %endfor |
|
35 | 39 | |
|
36 | 40 | </div> |
|
37 | 41 | |
|
38 | 42 | </%def> |
@@ -1,87 +1,89 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | %if c.repo_name: |
|
6 | 6 | ${_('Search repository')} ${c.repo_name} · ${c.rhodecode_name} |
|
7 | 7 | %else: |
|
8 | 8 | ${_('Search in all repositories')} |
|
9 | 9 | %endif |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="breadcrumbs_links()"> |
|
13 | 13 | %if c.repo_name: |
|
14 | 14 | ${_('Search')} |
|
15 | 15 | %else: |
|
16 | 16 | ${_('Search in all repositories')} |
|
17 | 17 | %endif |
|
18 | 18 | %if c.cur_query: |
|
19 | 19 | » |
|
20 | 20 | ${c.cur_query} |
|
21 | 21 | %endif |
|
22 | 22 | </%def> |
|
23 | 23 | |
|
24 | 24 | <%def name="page_nav()"> |
|
25 | 25 | %if c.repo_name: |
|
26 | 26 | ${self.menu('repositories')} |
|
27 | 27 | %else: |
|
28 | 28 | ${self.menu('search')} |
|
29 | 29 | %endif |
|
30 | 30 | </%def> |
|
31 | 31 | <%def name="main()"> |
|
32 | %if c.repo_name: | |
|
32 | 33 | ${self.context_bar('options')} |
|
34 | %endif | |
|
33 | 35 | <div class="box"> |
|
34 | 36 | <!-- box / title --> |
|
35 | 37 | <div class="title"> |
|
36 | 38 | ${self.breadcrumbs()} |
|
37 | 39 | </div> |
|
38 | 40 | <!-- end box / title --> |
|
39 | 41 | %if c.repo_name: |
|
40 | 42 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
|
41 | 43 | %else: |
|
42 | 44 | ${h.form(h.url('search'),method='get')} |
|
43 | 45 | %endif |
|
44 | 46 | <div class="form"> |
|
45 | 47 | <div class="fields"> |
|
46 | 48 | <div class="field field-first field-noborder"> |
|
47 | 49 | <div class="label"> |
|
48 | 50 | <label for="q">${_('Search term')}</label> |
|
49 | 51 | </div> |
|
50 | 52 | <div class="input">${h.text('q',c.cur_query,class_="small")} |
|
51 | 53 | <div class="button highlight"> |
|
52 | 54 | <input type="submit" value="${_('Search')}" class="ui-button"/> |
|
53 | 55 | </div> |
|
54 | 56 | </div> |
|
55 | 57 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
|
56 | 58 | </div> |
|
57 | 59 | |
|
58 | 60 | <div class="field"> |
|
59 | 61 | <div class="label"> |
|
60 | 62 | <label for="type">${_('Search in')}</label> |
|
61 | 63 | </div> |
|
62 | 64 | <div class="select"> |
|
63 | 65 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
64 | 66 | ('commit',_('Commit messages')), |
|
65 | 67 | ('path',_('File names')), |
|
66 | 68 | ##('repository',_('Repository names')), |
|
67 | 69 | ])} |
|
68 | 70 | </div> |
|
69 | 71 | </div> |
|
70 | 72 | |
|
71 | 73 | </div> |
|
72 | 74 | </div> |
|
73 | 75 | ${h.end_form()} |
|
74 | 76 | <div class="search"> |
|
75 | 77 | %if c.cur_type == 'content': |
|
76 | 78 | <%include file='search_content.html'/> |
|
77 | 79 | %elif c.cur_type == 'path': |
|
78 | 80 | <%include file='search_path.html'/> |
|
79 | 81 | %elif c.cur_type == 'commit': |
|
80 | 82 | <%include file='search_commit.html'/> |
|
81 | 83 | %elif c.cur_type == 'repository': |
|
82 | 84 | <%include file='search_repository.html'/> |
|
83 | 85 | %endif |
|
84 | 86 | </div> |
|
85 | 87 | </div> |
|
86 | 88 | |
|
87 | 89 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now