Show More
@@ -1,211 +1,211 b'' | |||
|
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 |
src="${h.url( |
|
|
144 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> | |
|
145 | 145 | %endif |
|
146 | 146 | </td> |
|
147 |
<td><span class="tooltip" title="${repo[' |
|
|
148 |
<td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url( |
|
|
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('/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 | 207 | F.filterTimeout = setTimeout(F.updateFilter,600); |
|
208 | 208 | }); |
|
209 | 209 | |
|
210 | 210 | </script> |
|
211 | 211 | </%def> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now