Show More
@@ -1,211 +1,211 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Account')} |
|
9 | ${_('My Account')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box box-left"> |
|
18 | <div class="box box-left"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 | <!-- end box / title --> |
|
23 | <!-- end box / title --> | |
24 | <div> |
|
24 | <div> | |
25 | ${h.form(url('admin_settings_my_account_update'),method='put')} |
|
25 | ${h.form(url('admin_settings_my_account_update'),method='put')} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 |
|
27 | |||
28 | <div class="field"> |
|
28 | <div class="field"> | |
29 | <div class="gravatar_box"> |
|
29 | <div class="gravatar_box"> | |
30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
31 | <p> |
|
31 | <p> | |
32 | <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/> |
|
32 | <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/> | |
33 | ${_('Using')} ${c.user.email} |
|
33 | ${_('Using')} ${c.user.email} | |
34 | </p> |
|
34 | </p> | |
35 | </div> |
|
35 | </div> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="field"> |
|
37 | <div class="field"> | |
38 | <div class="label"> |
|
38 | <div class="label"> | |
39 | <label>${_('API key')}</label> ${c.user.api_key} |
|
39 | <label>${_('API key')}</label> ${c.user.api_key} | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="fields"> |
|
42 | <div class="fields"> | |
43 | <div class="field"> |
|
43 | <div class="field"> | |
44 | <div class="label"> |
|
44 | <div class="label"> | |
45 | <label for="username">${_('Username')}:</label> |
|
45 | <label for="username">${_('Username')}:</label> | |
46 | </div> |
|
46 | </div> | |
47 | <div class="input"> |
|
47 | <div class="input"> | |
48 | ${h.text('username',class_="medium")} |
|
48 | ${h.text('username',class_="medium")} | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 |
|
51 | |||
52 | <div class="field"> |
|
52 | <div class="field"> | |
53 | <div class="label"> |
|
53 | <div class="label"> | |
54 | <label for="new_password">${_('New password')}:</label> |
|
54 | <label for="new_password">${_('New password')}:</label> | |
55 | </div> |
|
55 | </div> | |
56 | <div class="input"> |
|
56 | <div class="input"> | |
57 | ${h.password('new_password',class_="medium",autocomplete="off")} |
|
57 | ${h.password('new_password',class_="medium",autocomplete="off")} | |
58 | </div> |
|
58 | </div> | |
59 | </div> |
|
59 | </div> | |
60 |
|
60 | |||
61 | <div class="field"> |
|
61 | <div class="field"> | |
62 | <div class="label"> |
|
62 | <div class="label"> | |
63 | <label for="name">${_('First Name')}:</label> |
|
63 | <label for="name">${_('First Name')}:</label> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="input"> |
|
65 | <div class="input"> | |
66 | ${h.text('name',class_="medium")} |
|
66 | ${h.text('name',class_="medium")} | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 |
|
69 | |||
70 | <div class="field"> |
|
70 | <div class="field"> | |
71 | <div class="label"> |
|
71 | <div class="label"> | |
72 | <label for="lastname">${_('Last Name')}:</label> |
|
72 | <label for="lastname">${_('Last Name')}:</label> | |
73 | </div> |
|
73 | </div> | |
74 | <div class="input"> |
|
74 | <div class="input"> | |
75 | ${h.text('lastname',class_="medium")} |
|
75 | ${h.text('lastname',class_="medium")} | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 |
|
78 | |||
79 | <div class="field"> |
|
79 | <div class="field"> | |
80 | <div class="label"> |
|
80 | <div class="label"> | |
81 | <label for="email">${_('Email')}:</label> |
|
81 | <label for="email">${_('Email')}:</label> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="input"> |
|
83 | <div class="input"> | |
84 | ${h.text('email',class_="medium")} |
|
84 | ${h.text('email',class_="medium")} | |
85 | </div> |
|
85 | </div> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | <div class="buttons"> |
|
88 | <div class="buttons"> | |
89 | ${h.submit('save','Save',class_="ui-button")} |
|
89 | ${h.submit('save','Save',class_="ui-button")} | |
90 | ${h.reset('reset','Reset',class_="ui-button")} |
|
90 | ${h.reset('reset','Reset',class_="ui-button")} | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 | ${h.end_form()} |
|
94 | ${h.end_form()} | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 |
|
97 | |||
98 | <div class="box box-right"> |
|
98 | <div class="box box-right"> | |
99 | <!-- box / title --> |
|
99 | <!-- box / title --> | |
100 | <div class="title"> |
|
100 | <div class="title"> | |
101 | <h5>${_('My repositories')} |
|
101 | <h5>${_('My repositories')} | |
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...')}"/> |
|
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 | </h5> |
|
103 | </h5> | |
104 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
104 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
105 | <ul class="links"> |
|
105 | <ul class="links"> | |
106 | <li> |
|
106 | <li> | |
107 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
107 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> | |
108 | </li> |
|
108 | </li> | |
109 | </ul> |
|
109 | </ul> | |
110 | %endif |
|
110 | %endif | |
111 | </div> |
|
111 | </div> | |
112 | <!-- end box / title --> |
|
112 | <!-- end box / title --> | |
113 | <div class="table"> |
|
113 | <div class="table"> | |
114 | <table> |
|
114 | <table> | |
115 | <thead> |
|
115 | <thead> | |
116 | <tr> |
|
116 | <tr> | |
117 | <th class="left">${_('Name')}</th> |
|
117 | <th class="left">${_('Name')}</th> | |
118 | <th class="left">${_('revision')}</th> |
|
118 | <th class="left">${_('revision')}</th> | |
119 | <th colspan="2" class="left">${_('action')}</th> |
|
119 | <th colspan="2" class="left">${_('action')}</th> | |
120 | </thead> |
|
120 | </thead> | |
121 | <tbody> |
|
121 | <tbody> | |
122 | %if c.user_repos: |
|
122 | %if c.user_repos: | |
123 | %for repo in c.user_repos: |
|
123 | %for repo in c.user_repos: | |
124 | <tr> |
|
124 | <tr> | |
125 | <td> |
|
125 | <td> | |
126 | %if repo['dbrepo']['repo_type'] =='hg': |
|
126 | %if repo['dbrepo']['repo_type'] =='hg': | |
127 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> |
|
127 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> | |
128 | %elif repo['dbrepo']['repo_type'] =='git': |
|
128 | %elif repo['dbrepo']['repo_type'] =='git': | |
129 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> |
|
129 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> | |
130 | %else: |
|
130 | %else: | |
131 |
|
131 | |||
132 | %endif |
|
132 | %endif | |
133 | %if repo['dbrepo']['private']: |
|
133 | %if repo['dbrepo']['private']: | |
134 | <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/> |
|
134 | <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/> | |
135 | %else: |
|
135 | %else: | |
136 | <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/> |
|
136 | <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/> | |
137 | %endif |
|
137 | %endif | |
138 |
|
138 | |||
139 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
139 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} | |
140 | %if repo['dbrepo_fork']: |
|
140 | %if repo['dbrepo_fork']: | |
141 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
|
141 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> | |
142 | <img class="icon" alt="${_('public')}" |
|
142 | <img class="icon" alt="${_('public')}" | |
143 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
|
143 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" | |
144 |
src="${h.url( |
|
144 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> | |
145 | %endif |
|
145 | %endif | |
146 | </td> |
|
146 | </td> | |
147 |
<td><span class="tooltip" title="${repo[' |
|
147 | <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td> | |
148 |
<td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url( |
|
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 | <td> |
|
149 | <td> | |
150 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
150 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
151 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
151 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} | |
152 | ${h.end_form()} |
|
152 | ${h.end_form()} | |
153 | </td> |
|
153 | </td> | |
154 | </tr> |
|
154 | </tr> | |
155 | %endfor |
|
155 | %endfor | |
156 | %else: |
|
156 | %else: | |
157 | ${_('No repositories yet')} |
|
157 | ${_('No repositories yet')} | |
158 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
158 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
159 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} |
|
159 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} | |
160 | %endif |
|
160 | %endif | |
161 | %endif |
|
161 | %endif | |
162 | </tbody> |
|
162 | </tbody> | |
163 | </table> |
|
163 | </table> | |
164 | </div> |
|
164 | </div> | |
165 |
|
165 | |||
166 | </div> |
|
166 | </div> | |
167 | <script type="text/javascript"> |
|
167 | <script type="text/javascript"> | |
168 | var D = YAHOO.util.Dom; |
|
168 | var D = YAHOO.util.Dom; | |
169 | var E = YAHOO.util.Event; |
|
169 | var E = YAHOO.util.Event; | |
170 | var S = YAHOO.util.Selector; |
|
170 | var S = YAHOO.util.Selector; | |
171 |
|
171 | |||
172 | var q_filter = D.get('q_filter'); |
|
172 | var q_filter = D.get('q_filter'); | |
173 | var F = YAHOO.namespace('q_filter'); |
|
173 | var F = YAHOO.namespace('q_filter'); | |
174 |
|
174 | |||
175 | E.on(q_filter,'click',function(){ |
|
175 | E.on(q_filter,'click',function(){ | |
176 | q_filter.value = ''; |
|
176 | q_filter.value = ''; | |
177 | }); |
|
177 | }); | |
178 |
|
178 | |||
179 | F.filterTimeout = null; |
|
179 | F.filterTimeout = null; | |
180 |
|
180 | |||
181 | F.updateFilter = function() { |
|
181 | F.updateFilter = function() { | |
182 | // Reset timeout |
|
182 | // Reset timeout | |
183 | F.filterTimeout = null; |
|
183 | F.filterTimeout = null; | |
184 |
|
184 | |||
185 | var obsolete = []; |
|
185 | var obsolete = []; | |
186 | var nodes = S.query('div.table tr td a.repo_name'); |
|
186 | var nodes = S.query('div.table tr td a.repo_name'); | |
187 | var req = q_filter.value.toLowerCase(); |
|
187 | var req = q_filter.value.toLowerCase(); | |
188 | for (n in nodes){ |
|
188 | for (n in nodes){ | |
189 | D.setStyle(nodes[n].parentNode.parentNode,'display','') |
|
189 | D.setStyle(nodes[n].parentNode.parentNode,'display','') | |
190 | } |
|
190 | } | |
191 | if (req){ |
|
191 | if (req){ | |
192 | for (n in nodes){ |
|
192 | for (n in nodes){ | |
193 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
193 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { | |
194 | obsolete.push(nodes[n]); |
|
194 | obsolete.push(nodes[n]); | |
195 | } |
|
195 | } | |
196 | } |
|
196 | } | |
197 | if(obsolete){ |
|
197 | if(obsolete){ | |
198 | for (n in obsolete){ |
|
198 | for (n in obsolete){ | |
199 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); |
|
199 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); | |
200 | } |
|
200 | } | |
201 | } |
|
201 | } | |
202 | } |
|
202 | } | |
203 | } |
|
203 | } | |
204 |
|
204 | |||
205 | E.on(q_filter,'keyup',function(e){ |
|
205 | E.on(q_filter,'keyup',function(e){ | |
206 | clearTimeout(F.filterTimeout); |
|
206 | clearTimeout(F.filterTimeout); | |
207 | F.filterTimeout = setTimeout(F.updateFilter,600); |
|
207 | F.filterTimeout = setTimeout(F.updateFilter,600); | |
208 | }); |
|
208 | }); | |
209 |
|
209 | |||
210 | </script> |
|
210 | </script> | |
211 | </%def> No newline at end of file |
|
211 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now