Show More
@@ -1,347 +1,349 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="root.html"/> |
|
2 | <%inherit file="root.html"/> | |
3 |
|
3 | |||
4 | <!-- HEADER --> |
|
4 | <!-- HEADER --> | |
5 | <div id="header"> |
|
5 | <div id="header"> | |
6 | <div id="header-inner" class="title hover"> |
|
6 | <div id="header-inner" class="title hover"> | |
7 | <div id="logo"> |
|
7 | <div id="logo"> | |
8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> | |
9 | </div> |
|
9 | </div> | |
10 | <!-- MENU --> |
|
10 | <!-- MENU --> | |
11 | ${self.page_nav()} |
|
11 | ${self.page_nav()} | |
12 | <!-- END MENU --> |
|
12 | <!-- END MENU --> | |
13 | ${self.body()} |
|
13 | ${self.body()} | |
14 | </div> |
|
14 | </div> | |
15 | </div> |
|
15 | </div> | |
16 | <!-- END HEADER --> |
|
16 | <!-- END HEADER --> | |
17 |
|
17 | |||
18 | <!-- CONTENT --> |
|
18 | <!-- CONTENT --> | |
19 | <div id="content"> |
|
19 | <div id="content"> | |
20 | <div class="flash_msg"> |
|
20 | <div class="flash_msg"> | |
21 | <% messages = h.flash.pop_messages() %> |
|
21 | <% messages = h.flash.pop_messages() %> | |
22 | % if messages: |
|
22 | % if messages: | |
23 | <ul id="flash-messages"> |
|
23 | <ul id="flash-messages"> | |
24 | % for message in messages: |
|
24 | % for message in messages: | |
25 | <li class="${message.category}_msg">${message}</li> |
|
25 | <li class="${message.category}_msg">${message}</li> | |
26 | % endfor |
|
26 | % endfor | |
27 | </ul> |
|
27 | </ul> | |
28 | % endif |
|
28 | % endif | |
29 | </div> |
|
29 | </div> | |
30 | <div id="main"> |
|
30 | <div id="main"> | |
31 | ${next.main()} |
|
31 | ${next.main()} | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | <!-- END CONTENT --> |
|
34 | <!-- END CONTENT --> | |
35 |
|
35 | |||
36 | <!-- FOOTER --> |
|
36 | <!-- FOOTER --> | |
37 | <div id="footer"> |
|
37 | <div id="footer"> | |
38 | <div id="footer-inner" class="title"> |
|
38 | <div id="footer-inner" class="title"> | |
39 | <div> |
|
39 | <div> | |
40 | <p class="footer-link"> |
|
40 | <p class="footer-link"> | |
41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> | |
42 | </p> |
|
42 | </p> | |
43 | <p class="footer-link-right"> |
|
43 | <p class="footer-link-right"> | |
44 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> |
|
44 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> | |
45 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
45 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski | |
46 | </p> |
|
46 | </p> | |
47 | </div> |
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 | <!-- END FOOTER --> |
|
50 | <!-- END FOOTER --> | |
51 |
|
51 | |||
52 | ### MAKO DEFS ### |
|
52 | ### MAKO DEFS ### | |
53 | <%def name="page_nav()"> |
|
53 | <%def name="page_nav()"> | |
54 | ${self.menu()} |
|
54 | ${self.menu()} | |
55 | </%def> |
|
55 | </%def> | |
56 |
|
56 | |||
57 | <%def name="breadcrumbs()"> |
|
57 | <%def name="breadcrumbs()"> | |
58 | <div class="breadcrumbs"> |
|
58 | <div class="breadcrumbs"> | |
59 | ${self.breadcrumbs_links()} |
|
59 | ${self.breadcrumbs_links()} | |
60 | </div> |
|
60 | </div> | |
61 | </%def> |
|
61 | </%def> | |
62 |
|
62 | |||
63 | <%def name="usermenu()"> |
|
63 | <%def name="usermenu()"> | |
64 | <div class="user-menu"> |
|
64 | <div class="user-menu"> | |
65 | <div class="container"> |
|
65 | <div class="container"> | |
66 | <div class="gravatar" id="quick_login_link"> |
|
66 | <div class="gravatar" id="quick_login_link"> | |
67 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> |
|
67 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> | |
68 | </div> |
|
68 | </div> | |
69 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: |
|
69 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: | |
70 | <div class="notifications"> |
|
70 | <div class="notifications"> | |
71 | <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> |
|
71 | <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> | |
72 | </div> |
|
72 | </div> | |
73 | %endif |
|
73 | %endif | |
74 | </div> |
|
74 | </div> | |
75 | <div id="quick_login" style="display:none"> |
|
75 | <div id="quick_login" style="display:none"> | |
76 | %if c.rhodecode_user.username == 'default': |
|
76 | %if c.rhodecode_user.username == 'default': | |
77 | <h4>${_('Login to your account')}</h4> |
|
77 | <h4>${_('Login to your account')}</h4> | |
78 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
78 | ${h.form(h.url('login_home',came_from=h.url.current()))} | |
79 | <div class="form"> |
|
79 | <div class="form"> | |
80 | <div class="fields"> |
|
80 | <div class="fields"> | |
81 | <div class="field"> |
|
81 | <div class="field"> | |
82 | <div class="label"> |
|
82 | <div class="label"> | |
83 | <label for="username">${_('Username')}:</label> |
|
83 | <label for="username">${_('Username')}:</label> | |
84 | </div> |
|
84 | </div> | |
85 | <div class="input"> |
|
85 | <div class="input"> | |
86 | ${h.text('username',class_='focus',size=40)} |
|
86 | ${h.text('username',class_='focus',size=40)} | |
87 | </div> |
|
87 | </div> | |
88 |
|
88 | |||
89 | </div> |
|
89 | </div> | |
90 | <div class="field"> |
|
90 | <div class="field"> | |
91 | <div class="label"> |
|
91 | <div class="label"> | |
92 | <label for="password">${_('Password')}:</label> |
|
92 | <label for="password">${_('Password')}:</label> | |
93 | </div> |
|
93 | </div> | |
94 | <div class="input"> |
|
94 | <div class="input"> | |
95 | ${h.password('password',class_='focus',size=40)} |
|
95 | ${h.password('password',class_='focus',size=40)} | |
96 | </div> |
|
96 | </div> | |
97 |
|
97 | |||
98 | </div> |
|
98 | </div> | |
99 | <div class="buttons"> |
|
99 | <div class="buttons"> | |
100 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
100 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> | |
101 | <div class="register"> |
|
101 | <div class="register"> | |
102 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
102 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | |
103 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
103 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} | |
104 | %endif |
|
104 | %endif | |
105 | </div> |
|
105 | </div> | |
106 | <div class="submit"> |
|
106 | <div class="submit"> | |
107 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
107 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 | ${h.end_form()} |
|
112 | ${h.end_form()} | |
113 | %else: |
|
113 | %else: | |
114 | <div class="links_left"> |
|
114 | <div class="links_left"> | |
115 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
115 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> | |
116 | <div class="email">${c.rhodecode_user.email}</div> |
|
116 | <div class="email">${c.rhodecode_user.email}</div> | |
117 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
117 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> | |
118 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> |
|
118 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="links_right"> |
|
120 | <div class="links_right"> | |
121 | <ol class="links"> |
|
121 | <ol class="links"> | |
122 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> |
|
122 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> | |
123 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> |
|
123 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> | |
124 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
124 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> | |
125 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
125 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> | |
126 | </ol> |
|
126 | </ol> | |
127 | </div> |
|
127 | </div> | |
128 | %endif |
|
128 | %endif | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | </%def> |
|
131 | </%def> | |
132 |
|
132 | |||
133 | <%def name="menu(current=None)"> |
|
133 | <%def name="menu(current=None)"> | |
134 | <% |
|
134 | <% | |
135 | def is_current(selected): |
|
135 | def is_current(selected): | |
136 | if selected == current: |
|
136 | if selected == current: | |
137 | return h.literal('class="current"') |
|
137 | return h.literal('class="current"') | |
138 | %> |
|
138 | %> | |
139 | %if current not in ['home','admin']: |
|
139 | %if current not in ['home','admin']: | |
140 | ##REGULAR MENU |
|
140 | ##REGULAR MENU | |
141 | <ul id="quick"> |
|
141 | <ul id="quick"> | |
142 | <!-- repo switcher --> |
|
142 | <!-- repo switcher --> | |
143 | <li> |
|
143 | <li> | |
144 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> |
|
144 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> | |
145 | <span class="icon"> |
|
145 | <span class="icon"> | |
146 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
146 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> | |
147 | </span> |
|
147 | </span> | |
148 | <span>↓</span> |
|
148 | <span>↓</span> | |
149 | </a> |
|
149 | </a> | |
150 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
150 | <ul id="repo_switcher_list" class="repo_switcher"> | |
151 | <li> |
|
151 | <li> | |
152 | <a href="#">${_('loading...')}</a> |
|
152 | <a href="#">${_('loading...')}</a> | |
153 | </li> |
|
153 | </li> | |
154 | </ul> |
|
154 | </ul> | |
155 | </li> |
|
155 | </li> | |
156 |
|
156 | |||
157 | <li ${is_current('summary')}> |
|
157 | <li ${is_current('summary')}> | |
158 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
|
158 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> | |
159 | <span class="icon"> |
|
159 | <span class="icon"> | |
160 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
|
160 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> | |
161 | </span> |
|
161 | </span> | |
162 | <span>${_('Summary')}</span> |
|
162 | <span>${_('Summary')}</span> | |
163 | </a> |
|
163 | </a> | |
164 | </li> |
|
164 | </li> | |
165 | <li ${is_current('changelog')}> |
|
165 | <li ${is_current('changelog')}> | |
166 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
166 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> | |
167 | <span class="icon"> |
|
167 | <span class="icon"> | |
168 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
168 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> | |
169 | </span> |
|
169 | </span> | |
170 | <span>${_('Changelog')}</span> |
|
170 | <span>${_('Changelog')}</span> | |
171 | </a> |
|
171 | </a> | |
172 | </li> |
|
172 | </li> | |
173 |
|
173 | |||
174 | <li ${is_current('switch_to')}> |
|
174 | <li ${is_current('switch_to')}> | |
175 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> |
|
175 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> | |
176 | <span class="icon"> |
|
176 | <span class="icon"> | |
177 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
|
177 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> | |
178 | </span> |
|
178 | </span> | |
179 | <span>${_('Switch to')}</span> |
|
179 | <span>${_('Switch to')}</span> | |
180 | </a> |
|
180 | </a> | |
181 | <ul id="switch_to_list" class="switch_to"> |
|
181 | <ul id="switch_to_list" class="switch_to"> | |
182 | <li><a href="#">${_('loading...')}</a></li> |
|
182 | <li><a href="#">${_('loading...')}</a></li> | |
183 | </ul> |
|
183 | </ul> | |
184 | </li> |
|
184 | </li> | |
185 | <li ${is_current('files')}> |
|
185 | <li ${is_current('files')}> | |
186 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
186 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> | |
187 | <span class="icon"> |
|
187 | <span class="icon"> | |
188 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
188 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> | |
189 | </span> |
|
189 | </span> | |
190 | <span>${_('Files')}</span> |
|
190 | <span>${_('Files')}</span> | |
191 | </a> |
|
191 | </a> | |
192 | </li> |
|
192 | </li> | |
193 |
|
193 | |||
194 | <li ${is_current('options')}> |
|
194 | <li ${is_current('options')}> | |
195 | <a class="menu_link" title="${_('Options')}" href="#"> |
|
195 | <a class="menu_link" title="${_('Options')}" href="#"> | |
196 | <span class="icon"> |
|
196 | <span class="icon"> | |
197 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
|
197 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> | |
198 | </span> |
|
198 | </span> | |
199 | <span>${_('Options')}</span> |
|
199 | <span>${_('Options')}</span> | |
200 | </a> |
|
200 | </a> | |
201 | <ul> |
|
201 | <ul> | |
202 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
202 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | |
203 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
203 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): | |
204 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
204 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> | |
205 | %else: |
|
205 | %else: | |
206 | <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
206 | <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> | |
207 | %endif |
|
207 | %endif | |
208 | %endif |
|
208 | %endif | |
209 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
|
209 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> | |
210 | <li>${h.link_to(_('Open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li> |
|
210 | %if h.is_hg(c.rhodecode_repo): | |
|
211 | <li>${h.link_to(_('Open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li> | |||
|
212 | %endif | |||
211 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
|
213 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> | |
212 |
|
214 | |||
213 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
215 | % if h.HasPermissionAll('hg.admin')('access admin main page'): | |
214 | <li> |
|
216 | <li> | |
215 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
217 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} | |
216 | <%def name="admin_menu()"> |
|
218 | <%def name="admin_menu()"> | |
217 | <ul> |
|
219 | <ul> | |
218 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
220 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> | |
219 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
221 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> | |
220 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
222 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |
221 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
223 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> | |
222 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
224 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> | |
223 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
225 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> | |
224 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
226 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> | |
225 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
227 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> | |
226 | </ul> |
|
228 | </ul> | |
227 | </%def> |
|
229 | </%def> | |
228 |
|
230 | |||
229 | ${admin_menu()} |
|
231 | ${admin_menu()} | |
230 | </li> |
|
232 | </li> | |
231 | % endif |
|
233 | % endif | |
232 | </ul> |
|
234 | </ul> | |
233 | </li> |
|
235 | </li> | |
234 |
|
236 | |||
235 | <li> |
|
237 | <li> | |
236 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
238 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> | |
237 | <span class="icon_short"> |
|
239 | <span class="icon_short"> | |
238 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
|
240 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> | |
239 | </span> |
|
241 | </span> | |
240 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
242 | <span id="current_followers_count" class="short">${c.repository_followers}</span> | |
241 | </a> |
|
243 | </a> | |
242 | </li> |
|
244 | </li> | |
243 | <li> |
|
245 | <li> | |
244 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
246 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> | |
245 | <span class="icon_short"> |
|
247 | <span class="icon_short"> | |
246 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
|
248 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> | |
247 | </span> |
|
249 | </span> | |
248 | <span class="short">${c.repository_forks}</span> |
|
250 | <span class="short">${c.repository_forks}</span> | |
249 | </a> |
|
251 | </a> | |
250 | </li> |
|
252 | </li> | |
251 | <li> |
|
253 | <li> | |
252 | <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}"> |
|
254 | <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}"> | |
253 | <span class="icon_short"> |
|
255 | <span class="icon_short"> | |
254 | <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" /> |
|
256 | <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" /> | |
255 | </span> |
|
257 | </span> | |
256 | <span class="short">${c.repository_pull_requests}</span> |
|
258 | <span class="short">${c.repository_pull_requests}</span> | |
257 | </a> |
|
259 | </a> | |
258 | </li> |
|
260 | </li> | |
259 | ${usermenu()} |
|
261 | ${usermenu()} | |
260 | </ul> |
|
262 | </ul> | |
261 | <script type="text/javascript"> |
|
263 | <script type="text/javascript"> | |
262 | YUE.on('repo_switcher','mouseover',function(){ |
|
264 | YUE.on('repo_switcher','mouseover',function(){ | |
263 | function qfilter(){ |
|
265 | function qfilter(){ | |
264 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
266 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); | |
265 | var target = 'q_filter_rs'; |
|
267 | var target = 'q_filter_rs'; | |
266 | var func = function(node){ |
|
268 | var func = function(node){ | |
267 | return node.parentNode; |
|
269 | return node.parentNode; | |
268 | } |
|
270 | } | |
269 | q_filter(target,nodes,func); |
|
271 | q_filter(target,nodes,func); | |
270 | } |
|
272 | } | |
271 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
273 | var loaded = YUD.hasClass('repo_switcher','loaded'); | |
272 | if(!loaded){ |
|
274 | if(!loaded){ | |
273 | YUD.addClass('repo_switcher','loaded'); |
|
275 | YUD.addClass('repo_switcher','loaded'); | |
274 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
276 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', | |
275 | function(o){qfilter();}, |
|
277 | function(o){qfilter();}, | |
276 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
278 | function(o){YUD.removeClass('repo_switcher','loaded');} | |
277 | ,null); |
|
279 | ,null); | |
278 | } |
|
280 | } | |
279 | return false; |
|
281 | return false; | |
280 | }); |
|
282 | }); | |
281 |
|
283 | |||
282 | YUE.on('branch_tag_switcher','mouseover',function(){ |
|
284 | YUE.on('branch_tag_switcher','mouseover',function(){ | |
283 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); |
|
285 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); | |
284 | if(!loaded){ |
|
286 | if(!loaded){ | |
285 | YUD.addClass('branch_tag_switcher','loaded'); |
|
287 | YUD.addClass('branch_tag_switcher','loaded'); | |
286 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', |
|
288 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', | |
287 | function(o){}, |
|
289 | function(o){}, | |
288 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} |
|
290 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} | |
289 | ,null); |
|
291 | ,null); | |
290 | } |
|
292 | } | |
291 | return false; |
|
293 | return false; | |
292 | }); |
|
294 | }); | |
293 | </script> |
|
295 | </script> | |
294 | %else: |
|
296 | %else: | |
295 | ##ROOT MENU |
|
297 | ##ROOT MENU | |
296 | <ul id="quick"> |
|
298 | <ul id="quick"> | |
297 | <li> |
|
299 | <li> | |
298 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> |
|
300 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> | |
299 | <span class="icon"> |
|
301 | <span class="icon"> | |
300 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> |
|
302 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> | |
301 | </span> |
|
303 | </span> | |
302 | <span>${_('Home')}</span> |
|
304 | <span>${_('Home')}</span> | |
303 | </a> |
|
305 | </a> | |
304 | </li> |
|
306 | </li> | |
305 | %if c.rhodecode_user.username != 'default': |
|
307 | %if c.rhodecode_user.username != 'default': | |
306 | <li> |
|
308 | <li> | |
307 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> |
|
309 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> | |
308 | <span class="icon"> |
|
310 | <span class="icon"> | |
309 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
|
311 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> | |
310 | </span> |
|
312 | </span> | |
311 | <span>${_('Journal')}</span> |
|
313 | <span>${_('Journal')}</span> | |
312 | </a> |
|
314 | </a> | |
313 | </li> |
|
315 | </li> | |
314 | %else: |
|
316 | %else: | |
315 | <li> |
|
317 | <li> | |
316 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
318 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> | |
317 | <span class="icon"> |
|
319 | <span class="icon"> | |
318 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> |
|
320 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> | |
319 | </span> |
|
321 | </span> | |
320 | <span>${_('Public journal')}</span> |
|
322 | <span>${_('Public journal')}</span> | |
321 | </a> |
|
323 | </a> | |
322 | </li> |
|
324 | </li> | |
323 | %endif |
|
325 | %endif | |
324 | <li> |
|
326 | <li> | |
325 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> |
|
327 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> | |
326 | <span class="icon"> |
|
328 | <span class="icon"> | |
327 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
|
329 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> | |
328 | </span> |
|
330 | </span> | |
329 | <span>${_('Search')}</span> |
|
331 | <span>${_('Search')}</span> | |
330 | </a> |
|
332 | </a> | |
331 | </li> |
|
333 | </li> | |
332 |
|
334 | |||
333 | %if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
335 | %if h.HasPermissionAll('hg.admin')('access admin main page'): | |
334 | <li ${is_current('admin')}> |
|
336 | <li ${is_current('admin')}> | |
335 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
337 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> | |
336 | <span class="icon"> |
|
338 | <span class="icon"> | |
337 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
|
339 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> | |
338 | </span> |
|
340 | </span> | |
339 | <span>${_('Admin')}</span> |
|
341 | <span>${_('Admin')}</span> | |
340 | </a> |
|
342 | </a> | |
341 | ${admin_menu()} |
|
343 | ${admin_menu()} | |
342 | </li> |
|
344 | </li> | |
343 | %endif |
|
345 | %endif | |
344 | ${usermenu()} |
|
346 | ${usermenu()} | |
345 | </ul> |
|
347 | </ul> | |
346 | %endif |
|
348 | %endif | |
347 | </%def> |
|
349 | </%def> |
@@ -1,257 +1,259 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} |
|
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
13 | » |
|
13 | » | |
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> | |
15 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
15 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('changelog')} |
|
19 | ${self.menu('changelog')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <!-- box / title --> |
|
24 | <!-- box / title --> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.breadcrumbs()} |
|
26 | ${self.breadcrumbs()} | |
27 | </div> |
|
27 | </div> | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 | % if c.pagination: |
|
29 | % if c.pagination: | |
30 | <div id="graph"> |
|
30 | <div id="graph"> | |
31 | <div id="graph_nodes"> |
|
31 | <div id="graph_nodes"> | |
32 | <canvas id="graph_canvas"></canvas> |
|
32 | <canvas id="graph_canvas"></canvas> | |
33 | </div> |
|
33 | </div> | |
34 | <div id="graph_content"> |
|
34 | <div id="graph_content"> | |
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> |
|
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> | |
36 | %if c.rhodecode_db_repo.fork: |
|
36 | %if c.rhodecode_db_repo.fork: | |
37 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork')}</a> |
|
37 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork')}</a> | |
38 | %endif |
|
38 | %endif | |
|
39 | %if h.is_hg(c.rhodecode_repo): | |||
39 | <a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> |
|
40 | <a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> | |
|
41 | %endif | |||
40 | </div> |
|
42 | </div> | |
41 | <div class="container_header"> |
|
43 | <div class="container_header"> | |
42 | ${h.form(h.url.current(),method='get')} |
|
44 | ${h.form(h.url.current(),method='get')} | |
43 | <div class="info_box" style="float:left"> |
|
45 | <div class="info_box" style="float:left"> | |
44 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
46 | ${h.submit('set',_('Show'),class_="ui-btn")} | |
45 | ${h.text('size',size=1,value=c.size)} |
|
47 | ${h.text('size',size=1,value=c.size)} | |
46 | ${_('revisions')} |
|
48 | ${_('revisions')} | |
47 | </div> |
|
49 | </div> | |
48 | ${h.end_form()} |
|
50 | ${h.end_form()} | |
49 | <div id="rev_range_container" style="display:none"></div> |
|
51 | <div id="rev_range_container" style="display:none"></div> | |
50 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
52 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
51 | </div> |
|
53 | </div> | |
52 |
|
54 | |||
53 | %for cnt,cs in enumerate(c.pagination): |
|
55 | %for cnt,cs in enumerate(c.pagination): | |
54 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
56 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
55 | <div class="left"> |
|
57 | <div class="left"> | |
56 | <div> |
|
58 | <div> | |
57 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
58 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
60 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> | |
59 | </div> |
|
61 | </div> | |
60 | <div class="author"> |
|
62 | <div class="author"> | |
61 | <div class="gravatar"> |
|
63 | <div class="gravatar"> | |
62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
64 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
63 | </div> |
|
65 | </div> | |
64 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
66 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> | |
65 | </div> |
|
67 | </div> | |
66 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
68 | <div class="date">${h.fmt_date(cs.date)}</div> | |
67 | </div> |
|
69 | </div> | |
68 | <div class="mid"> |
|
70 | <div class="mid"> | |
69 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
71 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
70 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
72 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> | |
71 | </div> |
|
73 | </div> | |
72 | <div class="right"> |
|
74 | <div class="right"> | |
73 | <div class="changes"> |
|
75 | <div class="changes"> | |
74 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
76 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> | |
75 | <div class="comments-container"> |
|
77 | <div class="comments-container"> | |
76 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
78 | %if len(c.comments.get(cs.raw_id,[])) > 0: | |
77 | <div class="comments-cnt" title="${('comments')}"> |
|
79 | <div class="comments-cnt" title="${('comments')}"> | |
78 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
80 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
79 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
81 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> | |
80 | <img src="${h.url('/images/icons/comments.png')}"> |
|
82 | <img src="${h.url('/images/icons/comments.png')}"> | |
81 | </a> |
|
83 | </a> | |
82 | </div> |
|
84 | </div> | |
83 | %endif |
|
85 | %endif | |
84 | </div> |
|
86 | </div> | |
85 | <div class="changeset-status-container"> |
|
87 | <div class="changeset-status-container"> | |
86 | %if c.statuses.get(cs.raw_id): |
|
88 | %if c.statuses.get(cs.raw_id): | |
87 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
89 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |
88 | <div class="changeset-status-ico"> |
|
90 | <div class="changeset-status-ico"> | |
89 | %if c.statuses.get(cs.raw_id)[2]: |
|
91 | %if c.statuses.get(cs.raw_id)[2]: | |
90 | <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
92 | <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |
91 | %else: |
|
93 | %else: | |
92 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
94 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
93 | %endif |
|
95 | %endif | |
94 | </div> |
|
96 | </div> | |
95 | %endif |
|
97 | %endif | |
96 | </div> |
|
98 | </div> | |
97 | </div> |
|
99 | </div> | |
98 | %if cs.parents: |
|
100 | %if cs.parents: | |
99 | %for p_cs in reversed(cs.parents): |
|
101 | %for p_cs in reversed(cs.parents): | |
100 | <div class="parent">${_('Parent')} |
|
102 | <div class="parent">${_('Parent')} | |
101 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
103 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
102 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
104 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
103 | </div> |
|
105 | </div> | |
104 | %endfor |
|
106 | %endfor | |
105 | %else: |
|
107 | %else: | |
106 | <div class="parent">${_('No parents')}</div> |
|
108 | <div class="parent">${_('No parents')}</div> | |
107 | %endif |
|
109 | %endif | |
108 |
|
110 | |||
109 | <span class="logtags"> |
|
111 | <span class="logtags"> | |
110 | %if len(cs.parents)>1: |
|
112 | %if len(cs.parents)>1: | |
111 | <span class="merge">${_('merge')}</span> |
|
113 | <span class="merge">${_('merge')}</span> | |
112 | %endif |
|
114 | %endif | |
113 | %if cs.branch: |
|
115 | %if cs.branch: | |
114 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
116 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
115 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
117 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
116 | </span> |
|
118 | </span> | |
117 | %endif |
|
119 | %endif | |
118 | %if h.is_hg(c.rhodecode_repo): |
|
120 | %if h.is_hg(c.rhodecode_repo): | |
119 | %for book in cs.bookmarks: |
|
121 | %for book in cs.bookmarks: | |
120 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
122 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
121 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
123 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
122 | </span> |
|
124 | </span> | |
123 | %endfor |
|
125 | %endfor | |
124 | %endif |
|
126 | %endif | |
125 | %for tag in cs.tags: |
|
127 | %for tag in cs.tags: | |
126 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
128 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
127 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
129 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
128 | %endfor |
|
130 | %endfor | |
129 | </span> |
|
131 | </span> | |
130 | </div> |
|
132 | </div> | |
131 | </div> |
|
133 | </div> | |
132 |
|
134 | |||
133 | %endfor |
|
135 | %endfor | |
134 | <div class="pagination-wh pagination-left"> |
|
136 | <div class="pagination-wh pagination-left"> | |
135 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
137 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
136 | </div> |
|
138 | </div> | |
137 | </div> |
|
139 | </div> | |
138 | </div> |
|
140 | </div> | |
139 |
|
141 | |||
140 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
142 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
141 | <script type="text/javascript"> |
|
143 | <script type="text/javascript"> | |
142 | YAHOO.util.Event.onDOMReady(function(){ |
|
144 | YAHOO.util.Event.onDOMReady(function(){ | |
143 |
|
145 | |||
144 | //Monitor range checkboxes and build a link to changesets |
|
146 | //Monitor range checkboxes and build a link to changesets | |
145 | //ranges |
|
147 | //ranges | |
146 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
148 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
147 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
149 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
148 | YUE.on(checkboxes,'click',function(e){ |
|
150 | YUE.on(checkboxes,'click',function(e){ | |
149 | var checked_checkboxes = []; |
|
151 | var checked_checkboxes = []; | |
150 | for (pos in checkboxes){ |
|
152 | for (pos in checkboxes){ | |
151 | if(checkboxes[pos].checked){ |
|
153 | if(checkboxes[pos].checked){ | |
152 | checked_checkboxes.push(checkboxes[pos]); |
|
154 | checked_checkboxes.push(checkboxes[pos]); | |
153 | } |
|
155 | } | |
154 | } |
|
156 | } | |
155 | if(checked_checkboxes.length>1){ |
|
157 | if(checked_checkboxes.length>1){ | |
156 | var rev_end = checked_checkboxes[0].name; |
|
158 | var rev_end = checked_checkboxes[0].name; | |
157 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
159 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |
158 |
|
160 | |||
159 | var url = url_tmpl.replace('__REVRANGE__', |
|
161 | var url = url_tmpl.replace('__REVRANGE__', | |
160 | rev_start+'...'+rev_end); |
|
162 | rev_start+'...'+rev_end); | |
161 |
|
163 | |||
162 | var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>" |
|
164 | var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>" | |
163 | link = link.replace('__S',rev_start.substr(0,6)); |
|
165 | link = link.replace('__S',rev_start.substr(0,6)); | |
164 | link = link.replace('__E',rev_end.substr(0,6)); |
|
166 | link = link.replace('__E',rev_end.substr(0,6)); | |
165 | YUD.get('rev_range_container').innerHTML = link; |
|
167 | YUD.get('rev_range_container').innerHTML = link; | |
166 | YUD.setStyle('rev_range_container','display',''); |
|
168 | YUD.setStyle('rev_range_container','display',''); | |
167 | } |
|
169 | } | |
168 | else{ |
|
170 | else{ | |
169 | YUD.setStyle('rev_range_container','display','none'); |
|
171 | YUD.setStyle('rev_range_container','display','none'); | |
170 |
|
172 | |||
171 | } |
|
173 | } | |
172 | }); |
|
174 | }); | |
173 |
|
175 | |||
174 | var msgs = YUQ('.message'); |
|
176 | var msgs = YUQ('.message'); | |
175 | // get first element height |
|
177 | // get first element height | |
176 | var el = YUQ('#graph_content .container')[0]; |
|
178 | var el = YUQ('#graph_content .container')[0]; | |
177 | var row_h = el.clientHeight; |
|
179 | var row_h = el.clientHeight; | |
178 | for(var i=0;i<msgs.length;i++){ |
|
180 | for(var i=0;i<msgs.length;i++){ | |
179 | var m = msgs[i]; |
|
181 | var m = msgs[i]; | |
180 |
|
182 | |||
181 | var h = m.clientHeight; |
|
183 | var h = m.clientHeight; | |
182 | var pad = YUD.getStyle(m,'padding'); |
|
184 | var pad = YUD.getStyle(m,'padding'); | |
183 | if(h > row_h){ |
|
185 | if(h > row_h){ | |
184 | var offset = row_h - (h+12); |
|
186 | var offset = row_h - (h+12); | |
185 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
187 | YUD.setStyle(m.nextElementSibling,'display','block'); | |
186 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
188 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |
187 | }; |
|
189 | }; | |
188 | } |
|
190 | } | |
189 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
191 | YUE.on(YUQ('.expand'),'click',function(e){ | |
190 | var elem = e.currentTarget.parentNode.parentNode; |
|
192 | var elem = e.currentTarget.parentNode.parentNode; | |
191 | YUD.setStyle(e.currentTarget,'display','none'); |
|
193 | YUD.setStyle(e.currentTarget,'display','none'); | |
192 | YUD.setStyle(elem,'height','auto'); |
|
194 | YUD.setStyle(elem,'height','auto'); | |
193 |
|
195 | |||
194 | //redraw the graph, max_w and jsdata are global vars |
|
196 | //redraw the graph, max_w and jsdata are global vars | |
195 | set_canvas(max_w); |
|
197 | set_canvas(max_w); | |
196 |
|
198 | |||
197 | var r = new BranchRenderer(); |
|
199 | var r = new BranchRenderer(); | |
198 | r.render(jsdata,max_w); |
|
200 | r.render(jsdata,max_w); | |
199 |
|
201 | |||
200 | }) |
|
202 | }) | |
201 |
|
203 | |||
202 | // Fetch changeset details |
|
204 | // Fetch changeset details | |
203 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
205 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |
204 | var id = e.currentTarget.id; |
|
206 | var id = e.currentTarget.id; | |
205 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; |
|
207 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |
206 | var url = url.replace('__CS__',id.replace('changed_total_','')); |
|
208 | var url = url.replace('__CS__',id.replace('changed_total_','')); | |
207 | ypjax(url,id,function(){tooltip_activate()}); |
|
209 | ypjax(url,id,function(){tooltip_activate()}); | |
208 | }); |
|
210 | }); | |
209 |
|
211 | |||
210 | // change branch filter |
|
212 | // change branch filter | |
211 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
213 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |
212 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
214 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |
213 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
215 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |
214 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
216 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |
215 | var url = url.replace('__BRANCH__',selected_branch); |
|
217 | var url = url.replace('__BRANCH__',selected_branch); | |
216 | if(selected_branch != ''){ |
|
218 | if(selected_branch != ''){ | |
217 | window.location = url; |
|
219 | window.location = url; | |
218 | }else{ |
|
220 | }else{ | |
219 | window.location = url_main; |
|
221 | window.location = url_main; | |
220 | } |
|
222 | } | |
221 |
|
223 | |||
222 | }); |
|
224 | }); | |
223 |
|
225 | |||
224 | function set_canvas(heads) { |
|
226 | function set_canvas(heads) { | |
225 | var c = document.getElementById('graph_nodes'); |
|
227 | var c = document.getElementById('graph_nodes'); | |
226 | var t = document.getElementById('graph_content'); |
|
228 | var t = document.getElementById('graph_content'); | |
227 | canvas = document.getElementById('graph_canvas'); |
|
229 | canvas = document.getElementById('graph_canvas'); | |
228 | var div_h = t.clientHeight; |
|
230 | var div_h = t.clientHeight; | |
229 | c.style.height=div_h+'px'; |
|
231 | c.style.height=div_h+'px'; | |
230 | canvas.setAttribute('height',div_h); |
|
232 | canvas.setAttribute('height',div_h); | |
231 | c.style.height=max_w+'px'; |
|
233 | c.style.height=max_w+'px'; | |
232 | canvas.setAttribute('width',max_w); |
|
234 | canvas.setAttribute('width',max_w); | |
233 | }; |
|
235 | }; | |
234 | var heads = 1; |
|
236 | var heads = 1; | |
235 | var max_heads = 0; |
|
237 | var max_heads = 0; | |
236 | var jsdata = ${c.jsdata|n}; |
|
238 | var jsdata = ${c.jsdata|n}; | |
237 |
|
239 | |||
238 | for( var i=0;i<jsdata.length;i++){ |
|
240 | for( var i=0;i<jsdata.length;i++){ | |
239 | var m = Math.max.apply(Math, jsdata[i][1]); |
|
241 | var m = Math.max.apply(Math, jsdata[i][1]); | |
240 | if (m>max_heads){ |
|
242 | if (m>max_heads){ | |
241 | max_heads = m; |
|
243 | max_heads = m; | |
242 | } |
|
244 | } | |
243 | } |
|
245 | } | |
244 | var max_w = Math.max(100,max_heads*25); |
|
246 | var max_w = Math.max(100,max_heads*25); | |
245 | set_canvas(max_w); |
|
247 | set_canvas(max_w); | |
246 |
|
248 | |||
247 | var r = new BranchRenderer(); |
|
249 | var r = new BranchRenderer(); | |
248 | r.render(jsdata,max_w); |
|
250 | r.render(jsdata,max_w); | |
249 |
|
251 | |||
250 | }); |
|
252 | }); | |
251 | </script> |
|
253 | </script> | |
252 | %else: |
|
254 | %else: | |
253 | ${_('There are no changes yet')} |
|
255 | ${_('There are no changes yet')} | |
254 | %endif |
|
256 | %endif | |
255 | </div> |
|
257 | </div> | |
256 | </div> |
|
258 | </div> | |
257 | </%def> |
|
259 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now