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