Show More
@@ -1,130 +1,183 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 class="ui-tabs-panel ui-widget-content ui-corner-bottom"> |
|
25 | 25 | ${h.form(url('admin_settings_my_account_update'),method='put')} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | <div class="fields"> |
|
28 | 28 | <div class="field"> |
|
29 | 29 | <div class="label"> |
|
30 | 30 | <label for="username">${_('Username')}:</label> |
|
31 | 31 | </div> |
|
32 | 32 | <div class="input"> |
|
33 | 33 | ${h.text('username')} |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"> |
|
39 | 39 | <label for="new_password">${_('New password')}:</label> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="input"> |
|
42 | 42 | ${h.password('new_password')} |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 | |
|
46 | 46 | <div class="field"> |
|
47 | 47 | <div class="label"> |
|
48 | 48 | <label for="name">${_('Name')}:</label> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="input"> |
|
51 | 51 | ${h.text('name')} |
|
52 | 52 | </div> |
|
53 | 53 | </div> |
|
54 | 54 | |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="label"> |
|
57 | 57 | <label for="lastname">${_('Lastname')}:</label> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="input"> |
|
60 | 60 | ${h.text('lastname')} |
|
61 | 61 | </div> |
|
62 | 62 | </div> |
|
63 | 63 | |
|
64 | 64 | <div class="field"> |
|
65 | 65 | <div class="label"> |
|
66 | 66 | <label for="email">${_('Email')}:</label> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="input"> |
|
69 | 69 | ${h.text('email')} |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | |
|
73 | 73 | <div class="buttons"> |
|
74 | 74 | ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | </div> |
|
78 | 78 | ${h.end_form()} |
|
79 | 79 | </div> |
|
80 | 80 | </div> |
|
81 | 81 | |
|
82 | 82 | <div class="box box-right"> |
|
83 | 83 | <!-- box / title --> |
|
84 | 84 | <div class="title"> |
|
85 |
<h5>${_('My repositories')} |
|
|
85 | <h5>${_('My repositories')} | |
|
86 | <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...')}"/> | |
|
87 | </h5> | |
|
86 | 88 | </div> |
|
87 | 89 | <!-- end box / title --> |
|
88 | 90 | <div class="table"> |
|
89 | 91 | <table> |
|
90 | 92 | <tbody> |
|
91 | 93 | %if c.user_repos: |
|
92 | 94 | %for repo in c.user_repos: |
|
93 | 95 | <tr> |
|
94 | 96 | <td> |
|
97 | %if repo.dbrepo.repo_type =='hg': | |
|
98 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/> | |
|
99 | %elif repo.dbrepo.repo_type =='git': | |
|
100 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/> | |
|
101 | %else: | |
|
102 | ||
|
103 | %endif | |
|
95 | 104 | %if repo.dbrepo.private: |
|
96 | 105 | <img class="icon" alt="${_('private')}" src="/images/icons/lock.png"/> |
|
97 | 106 | %else: |
|
98 | 107 | <img class="icon" alt="${_('public')}" src="/images/icons/lock_open.png"/> |
|
99 | 108 | %endif |
|
100 | 109 | |
|
101 | ${h.link_to(repo.name, h.url('summary_home',repo_name=repo.name))} | |
|
110 | ${h.link_to(repo.name, h.url('summary_home',repo_name=repo.name),class_="repo_name")} | |
|
102 | 111 | %if repo.dbrepo.fork: |
|
103 | 112 | <a href="${h.url('summary_home',repo_name=repo.dbrepo.fork.repo_name)}"> |
|
104 | 113 | <img class="icon" alt="${_('public')}" |
|
105 | 114 | title="${_('Fork of')} ${repo.dbrepo.fork.repo_name}" |
|
106 | 115 | src="/images/icons/arrow_divide.png"/></a> |
|
107 | 116 | %endif |
|
108 | 117 | </td> |
|
109 | 118 | <td>${_('revision')}: ${h.get_changeset_safe(repo,'tip').revision}</td> |
|
110 | <td>${_('last changed')}: ${h.age(repo.last_change)}</td> | |
|
119 | <td><span class="tooltip" tooltip_title="${repo.last_change}">${_('last changed')}: ${h.age(repo.last_change)}</span></td> | |
|
111 | 120 | <td><img class="icon" alt="${_('private')}" src="/images/icons/application_form_edit.png"/> ${h.link_to(_('edit'),h.url('repo_settings_home',repo_name=repo.name))}</td> |
|
112 | 121 | <td> |
|
113 | 122 | ${h.form(url('repo_settings_delete', repo_name=repo.name),method='delete')} |
|
114 | 123 | ${h.submit('remove_%s' % repo.name,'delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
115 | 124 | ${h.end_form()} |
|
116 | 125 | </td> |
|
117 | 126 | </tr> |
|
118 | 127 | %endfor |
|
119 | 128 | %else: |
|
120 | 129 | ${_('No repositories yet')} |
|
121 | 130 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
122 | 131 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} |
|
123 | 132 | %endif |
|
124 | 133 | %endif |
|
125 | 134 | </tbody> |
|
126 | 135 | </table> |
|
127 | 136 | </div> |
|
128 | 137 | |
|
129 | 138 | </div> |
|
139 | <script type="text/javascript"> | |
|
140 | var D = YAHOO.util.Dom; | |
|
141 | var E = YAHOO.util.Event; | |
|
142 | var S = YAHOO.util.Selector; | |
|
143 | ||
|
144 | var q_filter = D.get('q_filter'); | |
|
145 | var F = YAHOO.namespace('q_filter'); | |
|
146 | ||
|
147 | E.on(q_filter,'click',function(){ | |
|
148 | q_filter.value = ''; | |
|
149 | }); | |
|
150 | ||
|
151 | F.filterTimeout = null; | |
|
152 | ||
|
153 | F.updateFilter = function() { | |
|
154 | // Reset timeout | |
|
155 | F.filterTimeout = null; | |
|
156 | ||
|
157 | var obsolete = []; | |
|
158 | var nodes = S.query('div.table tr td a.repo_name'); | |
|
159 | var req = D.get('q_filter').value; | |
|
160 | for (n in nodes){ | |
|
161 | D.setStyle(nodes[n].parentNode.parentNode,'display','') | |
|
162 | } | |
|
163 | if (req){ | |
|
164 | for (n in nodes){ | |
|
165 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { | |
|
166 | obsolete.push(nodes[n]); | |
|
167 | } | |
|
168 | } | |
|
169 | if(obsolete){ | |
|
170 | for (n in obsolete){ | |
|
171 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); | |
|
172 | } | |
|
173 | } | |
|
174 | } | |
|
175 | } | |
|
176 | ||
|
177 | E.on(q_filter,'keyup',function(e){ | |
|
178 | clearTimeout(F.filterTimeout); | |
|
179 | setTimeout(F.updateFilter,600); | |
|
180 | }); | |
|
181 | ||
|
182 | </script> | |
|
130 | 183 | </%def> No newline at end of file |
@@ -1,159 +1,165 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="base/base.html"/> |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('Dashboard')} - ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | <%def name="breadcrumbs()"> |
|
7 | 7 | ${c.rhodecode_name} |
|
8 | 8 | </%def> |
|
9 | 9 | <%def name="page_nav()"> |
|
10 | 10 | ${self.menu('home')} |
|
11 | 11 | </%def> |
|
12 | 12 | <%def name="main()"> |
|
13 | 13 | <%def name="get_sort(name)"> |
|
14 | 14 | <%name_slug = name.lower().replace(' ','_') %> |
|
15 | 15 | |
|
16 | 16 | %if name_slug == c.sort_slug: |
|
17 | 17 | %if c.sort_by.startswith('-'): |
|
18 | 18 | <a href="?sort=${name_slug}">${name}↑</a> |
|
19 | 19 | %else: |
|
20 | 20 | <a href="?sort=-${name_slug}">${name}↓</a> |
|
21 | 21 | %endif: |
|
22 | 22 | %else: |
|
23 | 23 | <a href="?sort=${name_slug}">${name}</a> |
|
24 | 24 | %endif |
|
25 | 25 | </%def> |
|
26 | 26 | |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <!-- box / title --> |
|
29 | 29 | <div class="title"> |
|
30 | 30 | <h5>${_('Dashboard')} |
|
31 | 31 | <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...')}"/> |
|
32 | 32 | </h5> |
|
33 | 33 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
34 | 34 | <ul class="links"> |
|
35 | 35 | <li> |
|
36 | 36 | <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
37 | 37 | </li> |
|
38 | 38 | </ul> |
|
39 | 39 | %endif |
|
40 | 40 | </div> |
|
41 | 41 | <!-- end box / title --> |
|
42 | 42 | <div class="table"> |
|
43 | 43 | <table> |
|
44 | 44 | <thead> |
|
45 | 45 | <tr> |
|
46 | 46 | <th class="left">${get_sort(_('Name'))}</th> |
|
47 | 47 | <th class="left">${get_sort(_('Description'))}</th> |
|
48 | 48 | <th class="left">${get_sort(_('Last change'))}</th> |
|
49 | 49 | <th class="left">${get_sort(_('Tip'))}</th> |
|
50 | 50 | <th class="left">${get_sort(_('Owner'))}</th> |
|
51 | 51 | <th class="left">${_('RSS')}</th> |
|
52 | 52 | <th class="left">${_('Atom')}</th> |
|
53 | 53 | </tr> |
|
54 | 54 | </thead> |
|
55 | 55 | <tbody> |
|
56 | 56 | %for cnt,repo in enumerate(c.repos_list): |
|
57 | 57 | %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'): |
|
58 | 58 | <tr class="parity${cnt%2}"> |
|
59 | 59 | <td> |
|
60 | ## TYPE OF REPO | |
|
60 | 61 | %if repo['repo'].dbrepo.repo_type =='hg': |
|
61 | 62 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/> |
|
62 | 63 | %elif repo['repo'].dbrepo.repo_type =='git': |
|
63 | 64 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/> |
|
64 | 65 | %else: |
|
65 | 66 | |
|
66 | 67 | %endif |
|
67 | 68 | |
|
69 | ##PRIVATE/PUBLIC | |
|
68 | 70 | %if repo['repo'].dbrepo.private: |
|
69 | 71 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/> |
|
70 | 72 | %else: |
|
71 | 73 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/> |
|
72 |
%endif |
|
|
74 | %endif | |
|
75 | ||
|
76 | ##NAME | |
|
73 | 77 | ${h.link_to(repo['name'], |
|
74 | 78 | h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
75 | 79 | %if repo['repo'].dbrepo.fork: |
|
76 | 80 | <a href="${h.url('summary_home',repo_name=repo['repo'].dbrepo.fork.repo_name)}"> |
|
77 | 81 | <img class="icon" alt="${_('fork')}" |
|
78 | 82 | title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}" |
|
79 | 83 | src="/images/icons/arrow_divide.png"/></a> |
|
80 | 84 | %endif |
|
81 | 85 | </td> |
|
86 | ##DESCRIPTION | |
|
82 | 87 | <td><span class="tooltip" tooltip_title="${repo['description']}"> |
|
83 | 88 | ${h.truncate(repo['description'],60)}</span> |
|
84 | 89 | </td> |
|
85 | <td><span class="tooltip" tooltip_title="${repo['last_change']}"> | |
|
86 | ${h.age(repo['last_change'])} </span> | |
|
90 | ##LAST CHANGE | |
|
91 | <td> | |
|
92 | <span>${repo['last_change']} - ${h.age(repo['last_change'])} </span> | |
|
87 | 93 | </td> |
|
88 | 94 | <td> |
|
89 | 95 | %if repo['rev']>=0: |
|
90 | 96 | ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), |
|
91 | 97 | h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), |
|
92 | 98 | class_="tooltip", |
|
93 | 99 | tooltip_title=h.tooltip(repo['last_msg']))} |
|
94 | 100 | %else: |
|
95 | 101 | ${_('No changesets yet')} |
|
96 | 102 | %endif |
|
97 | 103 | </td> |
|
98 | 104 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
99 | 105 | <td> |
|
100 | 106 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> |
|
101 | 107 | </td> |
|
102 | 108 | <td> |
|
103 | 109 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
|
104 | 110 | </td> |
|
105 | 111 | </tr> |
|
106 | 112 | %endif |
|
107 | 113 | %endfor |
|
108 | 114 | </tbody> |
|
109 | 115 | </table> |
|
110 | 116 | </div> |
|
111 | 117 | </div> |
|
112 | 118 | |
|
113 | 119 | |
|
114 | 120 | <script type="text/javascript"> |
|
115 | 121 | var D = YAHOO.util.Dom; |
|
116 | 122 | var E = YAHOO.util.Event; |
|
117 | 123 | var S = YAHOO.util.Selector; |
|
118 | 124 | |
|
119 | 125 | var q_filter = D.get('q_filter'); |
|
120 | 126 | var F = YAHOO.namespace('q_filter'); |
|
121 | 127 | |
|
122 | 128 | E.on(q_filter,'click',function(){ |
|
123 | 129 | q_filter.value = ''; |
|
124 | 130 | }); |
|
125 | 131 | |
|
126 | 132 | F.filterTimeout = null; |
|
127 | 133 | |
|
128 | 134 | F.updateFilter = function() { |
|
129 | 135 | // Reset timeout |
|
130 | 136 | F.filterTimeout = null; |
|
131 | 137 | |
|
132 | 138 | var obsolete = []; |
|
133 | 139 | var nodes = S.query('div.table tr td a.repo_name'); |
|
134 | 140 | var req = D.get('q_filter').value; |
|
135 | 141 | for (n in nodes){ |
|
136 | 142 | D.setStyle(nodes[n].parentNode.parentNode,'display','') |
|
137 | 143 | } |
|
138 | 144 | if (req){ |
|
139 | 145 | for (n in nodes){ |
|
140 | 146 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
141 | 147 | obsolete.push(nodes[n]); |
|
142 | 148 | } |
|
143 | 149 | } |
|
144 | 150 | if(obsolete){ |
|
145 | 151 | for (n in obsolete){ |
|
146 | 152 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); |
|
147 | 153 | } |
|
148 | 154 | } |
|
149 | 155 | } |
|
150 | 156 | } |
|
151 | 157 | |
|
152 | 158 | E.on(q_filter,'keyup',function(e){ |
|
153 | 159 | clearTimeout(F.filterTimeout); |
|
154 | 160 | setTimeout(F.updateFilter,600); |
|
155 | 161 | }); |
|
156 | 162 | |
|
157 | 163 | </script> |
|
158 | 164 | |
|
159 | 165 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now