Show More
@@ -1,211 +1,211 | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('My Account')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('admin')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | |
|
18 | 18 | <div class="box box-left"> |
|
19 | 19 | <!-- box / title --> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | ${self.breadcrumbs()} |
|
22 | 22 | </div> |
|
23 | 23 | <!-- end box / title --> |
|
24 | 24 | <div> |
|
25 | 25 | ${h.form(url('admin_settings_my_account_update'),method='put')} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | |
|
28 | 28 | <div class="field"> |
|
29 | 29 | <div class="gravatar_box"> |
|
30 | 30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
31 | 31 | <p> |
|
32 | 32 | <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/> |
|
33 | 33 | ${_('Using')} ${c.user.email} |
|
34 | 34 | </p> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"> |
|
39 | 39 | <label>${_('API key')}</label> ${c.user.api_key} |
|
40 | 40 | </div> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="fields"> |
|
43 | 43 | <div class="field"> |
|
44 | 44 | <div class="label"> |
|
45 | 45 | <label for="username">${_('Username')}:</label> |
|
46 | 46 | </div> |
|
47 | 47 | <div class="input"> |
|
48 | 48 | ${h.text('username',class_="medium")} |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | |
|
52 | 52 | <div class="field"> |
|
53 | 53 | <div class="label"> |
|
54 | 54 | <label for="new_password">${_('New password')}:</label> |
|
55 | 55 | </div> |
|
56 | 56 | <div class="input"> |
|
57 | 57 | ${h.password('new_password',class_="medium",autocomplete="off")} |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | 60 | |
|
61 | 61 | <div class="field"> |
|
62 | 62 | <div class="label"> |
|
63 | 63 | <label for="name">${_('First Name')}:</label> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="input"> |
|
66 | 66 | ${h.text('name',class_="medium")} |
|
67 | 67 | </div> |
|
68 | 68 | </div> |
|
69 | 69 | |
|
70 | 70 | <div class="field"> |
|
71 | 71 | <div class="label"> |
|
72 | 72 | <label for="lastname">${_('Last Name')}:</label> |
|
73 | 73 | </div> |
|
74 | 74 | <div class="input"> |
|
75 | 75 | ${h.text('lastname',class_="medium")} |
|
76 | 76 | </div> |
|
77 | 77 | </div> |
|
78 | 78 | |
|
79 | 79 | <div class="field"> |
|
80 | 80 | <div class="label"> |
|
81 | 81 | <label for="email">${_('Email')}:</label> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="input"> |
|
84 | 84 | ${h.text('email',class_="medium")} |
|
85 | 85 | </div> |
|
86 | 86 | </div> |
|
87 | 87 | |
|
88 | 88 | <div class="buttons"> |
|
89 | 89 | ${h.submit('save','Save',class_="ui-button")} |
|
90 | 90 | ${h.reset('reset','Reset',class_="ui-button")} |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | ${h.end_form()} |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | |
|
98 | 98 | <div class="box box-right"> |
|
99 | 99 | <!-- box / title --> |
|
100 | 100 | <div class="title"> |
|
101 | 101 | <h5>${_('My repositories')} |
|
102 | 102 | <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
103 | 103 | </h5> |
|
104 | 104 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
105 | 105 | <ul class="links"> |
|
106 | 106 | <li> |
|
107 | 107 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
108 | 108 | </li> |
|
109 | 109 | </ul> |
|
110 | 110 | %endif |
|
111 | 111 | </div> |
|
112 | 112 | <!-- end box / title --> |
|
113 | 113 | <div class="table"> |
|
114 | 114 | <table> |
|
115 | 115 | <thead> |
|
116 | 116 | <tr> |
|
117 | 117 | <th class="left">${_('Name')}</th> |
|
118 | 118 | <th class="left">${_('revision')}</th> |
|
119 | 119 | <th colspan="2" class="left">${_('action')}</th> |
|
120 | 120 | </thead> |
|
121 | 121 | <tbody> |
|
122 | 122 | %if c.user_repos: |
|
123 | 123 | %for repo in c.user_repos: |
|
124 | 124 | <tr> |
|
125 | 125 | <td> |
|
126 | 126 | %if repo['dbrepo']['repo_type'] =='hg': |
|
127 | 127 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> |
|
128 | 128 | %elif repo['dbrepo']['repo_type'] =='git': |
|
129 | 129 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> |
|
130 | 130 | %else: |
|
131 | 131 | |
|
132 | 132 | %endif |
|
133 | 133 | %if repo['dbrepo']['private']: |
|
134 | 134 | <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/> |
|
135 | 135 | %else: |
|
136 | 136 | <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/> |
|
137 | 137 | %endif |
|
138 | 138 | |
|
139 | 139 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
140 | 140 | %if repo['dbrepo_fork']: |
|
141 | 141 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
|
142 | 142 | <img class="icon" alt="${_('public')}" |
|
143 | 143 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
|
144 | 144 | src="${h.url("/images/icons/arrow_divide.png")}"/></a> |
|
145 | 145 | %endif |
|
146 | 146 | </td> |
|
147 | 147 | <td><span class="tooltip" title="${repo['repo'].last_change}">${("r%s:%s") % (h.get_changeset_safe(repo['repo'],'tip').revision,h.short_id(h.get_changeset_safe(repo['repo'],'tip').raw_id))}</span></td> |
|
148 | 148 | <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url("/images/icons/application_form_edit.png")}"/></a></td> |
|
149 | 149 | <td> |
|
150 | 150 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
151 | 151 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
152 | 152 | ${h.end_form()} |
|
153 | 153 | </td> |
|
154 | 154 | </tr> |
|
155 | 155 | %endfor |
|
156 | 156 | %else: |
|
157 | 157 | ${_('No repositories yet')} |
|
158 | 158 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
159 | 159 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} |
|
160 | 160 | %endif |
|
161 | 161 | %endif |
|
162 | 162 | </tbody> |
|
163 | 163 | </table> |
|
164 | 164 | </div> |
|
165 | 165 | |
|
166 | 166 | </div> |
|
167 | 167 | <script type="text/javascript"> |
|
168 | 168 | var D = YAHOO.util.Dom; |
|
169 | 169 | var E = YAHOO.util.Event; |
|
170 | 170 | var S = YAHOO.util.Selector; |
|
171 | 171 | |
|
172 | 172 | var q_filter = D.get('q_filter'); |
|
173 | 173 | var F = YAHOO.namespace('q_filter'); |
|
174 | 174 | |
|
175 | 175 | E.on(q_filter,'click',function(){ |
|
176 | 176 | q_filter.value = ''; |
|
177 | 177 | }); |
|
178 | 178 | |
|
179 | 179 | F.filterTimeout = null; |
|
180 | 180 | |
|
181 | 181 | F.updateFilter = function() { |
|
182 | 182 | // Reset timeout |
|
183 | 183 | F.filterTimeout = null; |
|
184 | 184 | |
|
185 | 185 | var obsolete = []; |
|
186 | 186 | var nodes = S.query('div.table tr td a.repo_name'); |
|
187 | 187 | var req = q_filter.value.toLowerCase(); |
|
188 | 188 | for (n in nodes){ |
|
189 | 189 | D.setStyle(nodes[n].parentNode.parentNode,'display','') |
|
190 | 190 | } |
|
191 | 191 | if (req){ |
|
192 | 192 | for (n in nodes){ |
|
193 | 193 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
194 | 194 | obsolete.push(nodes[n]); |
|
195 | 195 | } |
|
196 | 196 | } |
|
197 | 197 | if(obsolete){ |
|
198 | 198 | for (n in obsolete){ |
|
199 | 199 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); |
|
200 | 200 | } |
|
201 | 201 | } |
|
202 | 202 | } |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | E.on(q_filter,'keyup',function(e){ |
|
206 | 206 | clearTimeout(F.filterTimeout); |
|
207 | setTimeout(F.updateFilter,600); | |
|
207 | F.filterTimeout = setTimeout(F.updateFilter,600); | |
|
208 | 208 | }); |
|
209 | 209 | |
|
210 | 210 | </script> |
|
211 | 211 | </%def> No newline at end of file |
@@ -1,371 +1,371 | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.html"/> |
|
3 | 3 | |
|
4 | 4 | <!-- HEADER --> |
|
5 | 5 | <div id="header"> |
|
6 | 6 | <!-- user --> |
|
7 | 7 | <ul id="logged-user"> |
|
8 | 8 | <li class="first"> |
|
9 | 9 | <div id="quick_login" style="display:none"> |
|
10 | 10 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
11 | 11 | <div class="form"> |
|
12 | 12 | <div class="fields"> |
|
13 | 13 | <div class="field"> |
|
14 | 14 | <div class="label"> |
|
15 | 15 | <label for="username">${_('Username')}:</label> |
|
16 | 16 | </div> |
|
17 | 17 | <div class="input"> |
|
18 | 18 | ${h.text('username',class_='focus',size=40)} |
|
19 | 19 | </div> |
|
20 | 20 | |
|
21 | 21 | </div> |
|
22 | 22 | <div class="field"> |
|
23 | 23 | <div class="label"> |
|
24 | 24 | <label for="password">${_('Password')}:</label> |
|
25 | 25 | </div> |
|
26 | 26 | <div class="input"> |
|
27 | 27 | ${h.password('password',class_='focus',size=40)} |
|
28 | 28 | </div> |
|
29 | 29 | |
|
30 | 30 | </div> |
|
31 | 31 | <div class="buttons"> |
|
32 | 32 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>${h.submit('sign_in','Sign In',class_="ui-button")} |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | ${h.end_form()} |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="gravatar"> |
|
40 | 40 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="account"> |
|
43 | 43 | %if c.rhodecode_user.username == 'default': |
|
44 | 44 | <a href="${h.url('public_journal')}">${_('Public journal')}</a> |
|
45 | 45 | %else: |
|
46 | 46 | ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} |
|
47 | 47 | %endif |
|
48 | 48 | </div> |
|
49 | 49 | </li> |
|
50 | 50 | <li> |
|
51 | 51 | <a href="${h.url('home')}">${_('Home')}</a> |
|
52 | 52 | </li> |
|
53 | 53 | %if c.rhodecode_user.username != 'default': |
|
54 | 54 | <li> |
|
55 | 55 | <a href="${h.url('journal')}">${_('Journal')}</a> |
|
56 | 56 | ##(${c.unread_journal} |
|
57 | 57 | </li> |
|
58 | 58 | %endif |
|
59 | 59 | %if c.rhodecode_user.username == 'default': |
|
60 | 60 | <li class="last highlight">${h.link_to(u'Login',h.url('login_home'),id='quick_login_link')}</li> |
|
61 | 61 | %else: |
|
62 | 62 | <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li> |
|
63 | 63 | %endif |
|
64 | 64 | </ul> |
|
65 | 65 | <!-- end user --> |
|
66 | 66 | <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner"> |
|
67 | 67 | <div id="logo"> |
|
68 | 68 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
69 | 69 | </div> |
|
70 | 70 | <!-- MENU --> |
|
71 | 71 | ${self.page_nav()} |
|
72 | 72 | <!-- END MENU --> |
|
73 | 73 | ${self.body()} |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | <!-- END HEADER --> |
|
77 | 77 | |
|
78 | 78 | <!-- CONTENT --> |
|
79 | 79 | <div id="content"> |
|
80 | 80 | <div class="flash_msg"> |
|
81 | 81 | <% messages = h.flash.pop_messages() %> |
|
82 | 82 | % if messages: |
|
83 | 83 | <ul id="flash-messages"> |
|
84 | 84 | % for message in messages: |
|
85 | 85 | <li class="${message.category}_msg">${message}</li> |
|
86 | 86 | % endfor |
|
87 | 87 | </ul> |
|
88 | 88 | % endif |
|
89 | 89 | </div> |
|
90 | 90 | <div id="main"> |
|
91 | 91 | ${next.main()} |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | <!-- END CONTENT --> |
|
95 | 95 | |
|
96 | 96 | <!-- FOOTER --> |
|
97 | 97 | <div id="footer"> |
|
98 | 98 | <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> |
|
99 | 99 | <div> |
|
100 | 100 | <p class="footer-link"> |
|
101 | 101 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
102 | 102 | </p> |
|
103 | 103 | <p class="footer-link-right"> |
|
104 | 104 | <a href="${h.url('rhodecode_official')}">RhodeCode</a> |
|
105 | 105 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
106 | 106 | </p> |
|
107 | 107 | </div> |
|
108 | 108 | </div> |
|
109 | 109 | </div> |
|
110 | 110 | <!-- END FOOTER --> |
|
111 | 111 | |
|
112 | 112 | ### MAKO DEFS ### |
|
113 | 113 | <%def name="page_nav()"> |
|
114 | 114 | ${self.menu()} |
|
115 | 115 | </%def> |
|
116 | 116 | |
|
117 | 117 | <%def name="breadcrumbs()"> |
|
118 | 118 | <div class="breadcrumbs"> |
|
119 | 119 | ${self.breadcrumbs_links()} |
|
120 | 120 | </div> |
|
121 | 121 | </%def> |
|
122 | 122 | |
|
123 | 123 | |
|
124 | 124 | <%def name="menu(current=None)"> |
|
125 | 125 | <% |
|
126 | 126 | def is_current(selected): |
|
127 | 127 | if selected == current: |
|
128 | 128 | return h.literal('class="current"') |
|
129 | 129 | %> |
|
130 | 130 | %if current not in ['home','admin']: |
|
131 | 131 | ##REGULAR MENU |
|
132 | 132 | <ul id="quick"> |
|
133 | 133 | <!-- repo switcher --> |
|
134 | 134 | <li> |
|
135 | 135 | <a id="repo_switcher" title="${_('Switch repository')}" href="#"> |
|
136 | 136 | <span class="icon"> |
|
137 | 137 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
138 | 138 | </span> |
|
139 | 139 | <span>↓</span> |
|
140 | 140 | </a> |
|
141 | 141 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
142 | 142 | <li> |
|
143 | 143 | <a href="#">${_('loading...')}</a> |
|
144 | 144 | </li> |
|
145 | 145 | </ul> |
|
146 | 146 | <script type="text/javascript"> |
|
147 | 147 | YUE.on('repo_switcher','mouseover',function(){ |
|
148 | 148 | function qfilter(){ |
|
149 | 149 | var S = YAHOO.util.Selector; |
|
150 | 150 | |
|
151 | 151 | var q_filter = YUD.get('q_filter_rs'); |
|
152 | 152 | var F = YAHOO.namespace('q_filter_rs'); |
|
153 | 153 | |
|
154 | 154 | YUE.on(q_filter,'click',function(){ |
|
155 | 155 | q_filter.value = ''; |
|
156 | 156 | }); |
|
157 | 157 | |
|
158 | 158 | F.filterTimeout = null; |
|
159 | 159 | |
|
160 | 160 | F.updateFilter = function() { |
|
161 | 161 | // Reset timeout |
|
162 | 162 | F.filterTimeout = null; |
|
163 | 163 | |
|
164 | 164 | var obsolete = []; |
|
165 | 165 | var nodes = S.query('ul#repo_switcher_list li a.repo_name'); |
|
166 | 166 | var req = YUD.get('q_filter_rs').value; |
|
167 | 167 | for (n in nodes){ |
|
168 | 168 | YUD.setStyle(nodes[n].parentNode,'display','') |
|
169 | 169 | } |
|
170 | 170 | if (req){ |
|
171 | 171 | for (n in nodes){ |
|
172 | 172 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
173 | 173 | obsolete.push(nodes[n]); |
|
174 | 174 | } |
|
175 | 175 | } |
|
176 | 176 | if(obsolete){ |
|
177 | 177 | for (n in obsolete){ |
|
178 | 178 | YUD.setStyle(obsolete[n].parentNode,'display','none'); |
|
179 | 179 | } |
|
180 | 180 | } |
|
181 | 181 | } |
|
182 | 182 | } |
|
183 | 183 | |
|
184 | 184 | YUE.on(q_filter,'keyup',function(e){ |
|
185 | 185 | clearTimeout(F.filterTimeout); |
|
186 | setTimeout(F.updateFilter,600); | |
|
186 | F.filterTimeout = setTimeout(F.updateFilter,600); | |
|
187 | 187 | }); |
|
188 | 188 | } |
|
189 | 189 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
190 | 190 | if(!loaded){ |
|
191 | 191 | YUD.addClass('repo_switcher','loaded'); |
|
192 | 192 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
193 | 193 | function(o){qfilter();}, |
|
194 | 194 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
195 | 195 | ,null); |
|
196 | 196 | } |
|
197 | 197 | return false; |
|
198 | 198 | }); |
|
199 | 199 | </script> |
|
200 | 200 | </li> |
|
201 | 201 | |
|
202 | 202 | <li ${is_current('summary')}> |
|
203 | 203 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
|
204 | 204 | <span class="icon"> |
|
205 | 205 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
|
206 | 206 | </span> |
|
207 | 207 | <span>${_('Summary')}</span> |
|
208 | 208 | </a> |
|
209 | 209 | </li> |
|
210 | 210 | ##<li ${is_current('shortlog')}> |
|
211 | 211 | ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}"> |
|
212 | 212 | ## <span class="icon"> |
|
213 | 213 | ## <img src="${h.url('/images/icons/application_view_list.png')}" alt="${_('Shortlog')}" /> |
|
214 | 214 | ## </span> |
|
215 | 215 | ## <span>${_('Shortlog')}</span> |
|
216 | 216 | ## </a> |
|
217 | 217 | ##</li> |
|
218 | 218 | <li ${is_current('changelog')}> |
|
219 | 219 | <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
220 | 220 | <span class="icon"> |
|
221 | 221 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
222 | 222 | </span> |
|
223 | 223 | <span>${_('Changelog')}</span> |
|
224 | 224 | </a> |
|
225 | 225 | </li> |
|
226 | 226 | |
|
227 | 227 | <li ${is_current('switch_to')}> |
|
228 | 228 | <a title="${_('Switch to')}" href="#"> |
|
229 | 229 | <span class="icon"> |
|
230 | 230 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
|
231 | 231 | </span> |
|
232 | 232 | <span>${_('Switch to')}</span> |
|
233 | 233 | </a> |
|
234 | 234 | <ul> |
|
235 | 235 | <li> |
|
236 | 236 | ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')} |
|
237 | 237 | <ul> |
|
238 | 238 | %if c.rhodecode_repo.branches.values(): |
|
239 | 239 | %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()): |
|
240 | 240 | <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li> |
|
241 | 241 | %endfor |
|
242 | 242 | %else: |
|
243 | 243 | <li>${h.link_to(_('There are no branches yet'),'#')}</li> |
|
244 | 244 | %endif |
|
245 | 245 | </ul> |
|
246 | 246 | </li> |
|
247 | 247 | <li> |
|
248 | 248 | ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')} |
|
249 | 249 | <ul> |
|
250 | 250 | %if c.rhodecode_repo.tags.values(): |
|
251 | 251 | %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()): |
|
252 | 252 | <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li> |
|
253 | 253 | %endfor |
|
254 | 254 | %else: |
|
255 | 255 | <li>${h.link_to(_('There are no tags yet'),'#')}</li> |
|
256 | 256 | %endif |
|
257 | 257 | </ul> |
|
258 | 258 | </li> |
|
259 | 259 | </ul> |
|
260 | 260 | </li> |
|
261 | 261 | <li ${is_current('files')}> |
|
262 | 262 | <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
263 | 263 | <span class="icon"> |
|
264 | 264 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
265 | 265 | </span> |
|
266 | 266 | <span>${_('Files')}</span> |
|
267 | 267 | </a> |
|
268 | 268 | </li> |
|
269 | 269 | |
|
270 | 270 | <li ${is_current('options')}> |
|
271 | 271 | <a title="${_('Options')}" href="#"> |
|
272 | 272 | <span class="icon"> |
|
273 | 273 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
|
274 | 274 | </span> |
|
275 | 275 | <span>${_('Options')}</span> |
|
276 | 276 | </a> |
|
277 | 277 | <ul> |
|
278 | 278 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
279 | 279 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
280 | 280 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
281 | 281 | %else: |
|
282 | 282 | <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
283 | 283 | %endif |
|
284 | 284 | %endif |
|
285 | 285 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
|
286 | 286 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
|
287 | 287 | |
|
288 | 288 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
289 | 289 | <li> |
|
290 | 290 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
291 | 291 | <%def name="admin_menu()"> |
|
292 | 292 | <ul> |
|
293 | 293 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
294 | 294 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
295 | 295 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
296 | 296 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
297 | 297 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
298 | 298 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
299 | 299 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
300 | 300 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
301 | 301 | </ul> |
|
302 | 302 | </%def> |
|
303 | 303 | |
|
304 | 304 | ${admin_menu()} |
|
305 | 305 | </li> |
|
306 | 306 | % endif |
|
307 | 307 | </ul> |
|
308 | 308 | </li> |
|
309 | 309 | |
|
310 | 310 | <li> |
|
311 | 311 | <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
312 | 312 | <span class="icon_short"> |
|
313 | 313 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
|
314 | 314 | </span> |
|
315 | 315 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
316 | 316 | </a> |
|
317 | 317 | </li> |
|
318 | 318 | <li> |
|
319 | 319 | <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
320 | 320 | <span class="icon_short"> |
|
321 | 321 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
|
322 | 322 | </span> |
|
323 | 323 | <span class="short">${c.repository_forks}</span> |
|
324 | 324 | </a> |
|
325 | 325 | </li> |
|
326 | 326 | |
|
327 | 327 | </ul> |
|
328 | 328 | %else: |
|
329 | 329 | ##ROOT MENU |
|
330 | 330 | <ul id="quick"> |
|
331 | 331 | <li> |
|
332 | 332 | <a title="${_('Home')}" href="${h.url('home')}"> |
|
333 | 333 | <span class="icon"> |
|
334 | 334 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> |
|
335 | 335 | </span> |
|
336 | 336 | <span>${_('Home')}</span> |
|
337 | 337 | </a> |
|
338 | 338 | </li> |
|
339 | 339 | % if c.rhodecode_user.username != 'default': |
|
340 | 340 | <li> |
|
341 | 341 | <a title="${_('Journal')}" href="${h.url('journal')}"> |
|
342 | 342 | <span class="icon"> |
|
343 | 343 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
|
344 | 344 | </span> |
|
345 | 345 | <span>${_('Journal')}</span> |
|
346 | 346 | </a> |
|
347 | 347 | </li> |
|
348 | 348 | % endif |
|
349 | 349 | <li> |
|
350 | 350 | <a title="${_('Search')}" href="${h.url('search')}"> |
|
351 | 351 | <span class="icon"> |
|
352 | 352 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
|
353 | 353 | </span> |
|
354 | 354 | <span>${_('Search')}</span> |
|
355 | 355 | </a> |
|
356 | 356 | </li> |
|
357 | 357 | |
|
358 | 358 | %if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
359 | 359 | <li ${is_current('admin')}> |
|
360 | 360 | <a title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
361 | 361 | <span class="icon"> |
|
362 | 362 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
|
363 | 363 | </span> |
|
364 | 364 | <span>${_('Admin')}</span> |
|
365 | 365 | </a> |
|
366 | 366 | ${admin_menu()} |
|
367 | 367 | </li> |
|
368 | 368 | %endif |
|
369 | 369 | </ul> |
|
370 | 370 | %endif |
|
371 | 371 | </%def> No newline at end of file |
@@ -1,246 +1,246 | |||
|
1 | 1 | <%page args="parent" /> |
|
2 | 2 | <%def name="get_sort(name)"> |
|
3 | 3 | <%name_slug = name.lower().replace(' ','_') %> |
|
4 | 4 | |
|
5 | 5 | %if name_slug == c.sort_slug: |
|
6 | 6 | %if c.sort_by.startswith('-'): |
|
7 | 7 | <a href="?sort=${name_slug}">${name}↑</a> |
|
8 | 8 | %else: |
|
9 | 9 | <a href="?sort=-${name_slug}">${name}↓</a> |
|
10 | 10 | %endif: |
|
11 | 11 | %else: |
|
12 | 12 | <a href="?sort=${name_slug}">${name}</a> |
|
13 | 13 | %endif |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <div class="box"> |
|
17 | 17 | <!-- box / title --> |
|
18 | 18 | <div class="title"> |
|
19 | 19 | <h5><input class="top-right-rounded-corner top-left-rounded-corner |
|
20 | 20 | bottom-left-rounded-corner bottom-right-rounded-corner" |
|
21 | 21 | id="q_filter" size="15" type="text" name="filter" |
|
22 | 22 | value="${_('quick filter...')}"/> |
|
23 | 23 | ${parent.breadcrumbs()} <span id="repo_count"></span> ${_('repositories')} |
|
24 | 24 | </h5> |
|
25 | 25 | %if c.rhodecode_user.username != 'default': |
|
26 | 26 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
27 | 27 | <ul class="links"> |
|
28 | 28 | <li> |
|
29 | 29 | <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
30 | 30 | </li> |
|
31 | 31 | </ul> |
|
32 | 32 | %endif |
|
33 | 33 | %endif |
|
34 | 34 | </div> |
|
35 | 35 | <!-- end box / title --> |
|
36 | 36 | <div class="table"> |
|
37 | 37 | % if c.groups: |
|
38 | 38 | <table> |
|
39 | 39 | <thead> |
|
40 | 40 | <tr> |
|
41 | 41 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
42 | 42 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
43 | 43 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> |
|
44 | 44 | </tr> |
|
45 | 45 | </thead> |
|
46 | 46 | |
|
47 | 47 | ## REPO GROUPS |
|
48 | 48 | |
|
49 | 49 | % for gr in c.groups: |
|
50 | 50 | <tr> |
|
51 | 51 | <td> |
|
52 | 52 | <div style="white-space: nowrap"> |
|
53 | 53 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
54 | 54 | ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))} |
|
55 | 55 | </div> |
|
56 | 56 | </td> |
|
57 | 57 | <td>${gr.group_description}</td> |
|
58 | 58 | ##<td><b>${gr.repositories.count()}</b></td> |
|
59 | 59 | </tr> |
|
60 | 60 | % endfor |
|
61 | 61 | |
|
62 | 62 | </table> |
|
63 | 63 | <div style="height: 20px"></div> |
|
64 | 64 | % endif |
|
65 | 65 | <div id="welcome" style="display:none;text-align:center"> |
|
66 | 66 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> |
|
67 | 67 | </div> |
|
68 | 68 | <table id="repos_list"> |
|
69 | 69 | <thead> |
|
70 | 70 | <tr> |
|
71 | 71 | <th class="left"></th> |
|
72 | 72 | <th class="left">${get_sort(_('Name'))}</th> |
|
73 | 73 | <th class="left">${get_sort(_('Description'))}</th> |
|
74 | 74 | <th class="left">${get_sort(_('Last change'))}</th> |
|
75 | 75 | <th class="left">${get_sort(_('Tip'))}</th> |
|
76 | 76 | <th class="left">${get_sort(_('Owner'))}</th> |
|
77 | 77 | <th class="left">${_('RSS')}</th> |
|
78 | 78 | <th class="left">${_('Atom')}</th> |
|
79 | 79 | </tr> |
|
80 | 80 | </thead> |
|
81 | 81 | <tbody> |
|
82 | 82 | %for cnt,repo in enumerate(c.repos_list): |
|
83 | 83 | <tr class="parity${cnt%2}"> |
|
84 | 84 | <td class="quick_repo_menu"> |
|
85 | 85 | <ul class="menu_items hidden"> |
|
86 | 86 | <li> |
|
87 | 87 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}"> |
|
88 | 88 | <span class="icon"> |
|
89 | 89 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
|
90 | 90 | </span> |
|
91 | 91 | <span>${_('Summary')}</span> |
|
92 | 92 | </a> |
|
93 | 93 | </li> |
|
94 | 94 | <li> |
|
95 | 95 | <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}"> |
|
96 | 96 | <span class="icon"> |
|
97 | 97 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
98 | 98 | </span> |
|
99 | 99 | <span>${_('Changelog')}</span> |
|
100 | 100 | </a> |
|
101 | 101 | </li> |
|
102 | 102 | <li> |
|
103 | 103 | <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}"> |
|
104 | 104 | <span class="icon"> |
|
105 | 105 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
106 | 106 | </span> |
|
107 | 107 | <span>${_('Files')}</span> |
|
108 | 108 | </a> |
|
109 | 109 | </li> |
|
110 | 110 | </ul> |
|
111 | 111 | </td> |
|
112 | 112 | <td> |
|
113 | 113 | ## TYPE OF REPO |
|
114 | 114 | <div style="white-space: nowrap"> |
|
115 | 115 | %if repo['dbrepo']['repo_type'] =='hg': |
|
116 | 116 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
117 | 117 | %elif repo['dbrepo']['repo_type'] =='git': |
|
118 | 118 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
119 | 119 | %endif |
|
120 | 120 | |
|
121 | 121 | ##PRIVATE/PUBLIC |
|
122 | 122 | %if repo['dbrepo']['private']: |
|
123 | 123 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
124 | 124 | %else: |
|
125 | 125 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
126 | 126 | %endif |
|
127 | 127 | |
|
128 | 128 | ##NAME |
|
129 | 129 | ${h.link_to(repo['name'], |
|
130 | 130 | h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
131 | 131 | %if repo['dbrepo_fork']: |
|
132 | 132 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
|
133 | 133 | <img class="icon" alt="${_('fork')}" |
|
134 | 134 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
|
135 | 135 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> |
|
136 | 136 | %endif |
|
137 | 137 | </div> |
|
138 | 138 | </td> |
|
139 | 139 | ##DESCRIPTION |
|
140 | 140 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
|
141 | 141 | ${h.truncate(repo['description'],60)}</span> |
|
142 | 142 | </td> |
|
143 | 143 | ##LAST CHANGE |
|
144 | 144 | <td> |
|
145 | 145 | <span class="tooltip" title="${repo['last_change']}"> |
|
146 | 146 | ${h.age(repo['last_change'])}</span> |
|
147 | 147 | </td> |
|
148 | 148 | <td> |
|
149 | 149 | %if repo['rev']>=0: |
|
150 | 150 | ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), |
|
151 | 151 | h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), |
|
152 | 152 | class_="tooltip", |
|
153 | 153 | title=h.tooltip(repo['last_msg']))} |
|
154 | 154 | %else: |
|
155 | 155 | ${_('No changesets yet')} |
|
156 | 156 | %endif |
|
157 | 157 | </td> |
|
158 | 158 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
159 | 159 | <td> |
|
160 | 160 | %if c.rhodecode_user.username != 'default': |
|
161 | 161 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
162 | 162 | %else: |
|
163 | 163 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> |
|
164 | 164 | %endif: |
|
165 | 165 | </td> |
|
166 | 166 | <td> |
|
167 | 167 | %if c.rhodecode_user.username != 'default': |
|
168 | 168 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
169 | 169 | %else: |
|
170 | 170 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
|
171 | 171 | %endif: |
|
172 | 172 | </td> |
|
173 | 173 | </tr> |
|
174 | 174 | %endfor |
|
175 | 175 | |
|
176 | 176 | </tbody> |
|
177 | 177 | </table> |
|
178 | 178 | </div> |
|
179 | 179 | </div> |
|
180 | 180 | |
|
181 | 181 | |
|
182 | 182 | <script type="text/javascript"> |
|
183 | 183 | var D = YAHOO.util.Dom; |
|
184 | 184 | var E = YAHOO.util.Event; |
|
185 | 185 | var S = YAHOO.util.Selector; |
|
186 | 186 | |
|
187 | 187 | var q_filter = D.get('q_filter'); |
|
188 | 188 | var F = YAHOO.namespace('q_filter'); |
|
189 | 189 | |
|
190 | 190 | E.on(q_filter,'click',function(){ |
|
191 | 191 | q_filter.value = ''; |
|
192 | 192 | }); |
|
193 | 193 | |
|
194 | 194 | F.filterTimeout = null; |
|
195 | 195 | |
|
196 | 196 | function set_count(count){ |
|
197 | 197 | |
|
198 | 198 | if(count == 0){ |
|
199 | 199 | YUD.setStyle('repos_list','display','none'); |
|
200 | 200 | YUD.setStyle('welcome','display',''); |
|
201 | 201 | } |
|
202 | 202 | else{ |
|
203 | 203 | YUD.setStyle('repos_list','display',''); |
|
204 | 204 | YUD.setStyle('welcome','display','none'); |
|
205 | 205 | } |
|
206 | 206 | YUD.get('repo_count').innerHTML = count; |
|
207 | 207 | |
|
208 | 208 | } |
|
209 | 209 | |
|
210 | 210 | |
|
211 | 211 | //set initial count for repos |
|
212 | 212 | var nodes = S.query('div.table tr td div a.repo_name'); |
|
213 | 213 | |
|
214 | 214 | set_count(nodes.length) |
|
215 | 215 | F.updateFilter = function() { |
|
216 | 216 | // Reset timeout |
|
217 | 217 | F.filterTimeout = null; |
|
218 | 218 | |
|
219 | 219 | var obsolete = []; |
|
220 | 220 | nodes = S.query('div.table tr td div a.repo_name'); |
|
221 | 221 | var req = q_filter.value.toLowerCase(); |
|
222 | 222 | for (n in nodes){ |
|
223 | 223 | D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','') |
|
224 | 224 | } |
|
225 | 225 | if (req){ |
|
226 | 226 | for (n in nodes){ |
|
227 | 227 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
228 | 228 | obsolete.push(nodes[n]); |
|
229 | 229 | } |
|
230 | 230 | } |
|
231 | 231 | if(obsolete){ |
|
232 | 232 | for (n in obsolete){ |
|
233 | 233 | D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none'); |
|
234 | 234 | } |
|
235 | 235 | } |
|
236 | 236 | } |
|
237 | 237 | // set new count into dashboard |
|
238 | 238 | set_count(nodes.length - obsolete.length) |
|
239 | 239 | } |
|
240 | 240 | |
|
241 | 241 | E.on(q_filter,'keyup',function(e){ |
|
242 | 242 | clearTimeout(F.filterTimeout); |
|
243 | setTimeout(F.updateFilter,600); | |
|
243 | F.filterTimeout = setTimeout(F.updateFilter,600); | |
|
244 | 244 | }); |
|
245 | 245 | |
|
246 | 246 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now