##// END OF EJS Templates
removed obsolete class from quick menu
marcink -
r1424:ac0c4e60 beta
parent child Browse files
Show More
@@ -1,228 +1,228
1 <%page args="parent" />
1 <%page args="parent" />
2 <%def name="get_sort(name)">
2 <%def name="get_sort(name)">
3 <%name_slug = name.lower().replace(' ','_') %>
3 <%name_slug = name.lower().replace(' ','_') %>
4
4
5 %if name_slug == c.sort_slug:
5 %if name_slug == c.sort_slug:
6 %if c.sort_by.startswith('-'):
6 %if c.sort_by.startswith('-'):
7 <a href="?sort=${name_slug}">${name}&uarr;</a>
7 <a href="?sort=${name_slug}">${name}&uarr;</a>
8 %else:
8 %else:
9 <a href="?sort=-${name_slug}">${name}&darr;</a>
9 <a href="?sort=-${name_slug}">${name}&darr;</a>
10 %endif:
10 %endif:
11 %else:
11 %else:
12 <a href="?sort=${name_slug}">${name}</a>
12 <a href="?sort=${name_slug}">${name}</a>
13 %endif
13 %endif
14 </%def>
14 </%def>
15
15
16 <div class="box">
16 <div class="box">
17 <!-- box / title -->
17 <!-- box / title -->
18 <div class="title">
18 <div class="title">
19 <h5><input class="top-right-rounded-corner top-left-rounded-corner
19 <h5><input class="top-right-rounded-corner top-left-rounded-corner
20 bottom-left-rounded-corner bottom-right-rounded-corner"
20 bottom-left-rounded-corner bottom-right-rounded-corner"
21 id="q_filter" size="15" type="text" name="filter"
21 id="q_filter" size="15" type="text" name="filter"
22 value="${_('quick filter...')}"/>
22 value="${_('quick filter...')}"/>
23 ${parent.breadcrumbs()} <span id="repo_count"></span> ${_('repositories')}
23 ${parent.breadcrumbs()} <span id="repo_count"></span> ${_('repositories')}
24 </h5>
24 </h5>
25 %if c.rhodecode_user.username != 'default':
25 %if c.rhodecode_user.username != 'default':
26 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
26 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
27 <ul class="links">
27 <ul class="links">
28 <li>
28 <li>
29 <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
29 <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
30 </li>
30 </li>
31 </ul>
31 </ul>
32 %endif
32 %endif
33 %endif
33 %endif
34 </div>
34 </div>
35 <!-- end box / title -->
35 <!-- end box / title -->
36 <div class="table">
36 <div class="table">
37 % if c.groups:
37 % if c.groups:
38 <table>
38 <table>
39
39
40 <thead>
40 <thead>
41 <tr>
41 <tr>
42 <th class="left"><a href="#">${_('Group name')}</a></th>
42 <th class="left"><a href="#">${_('Group name')}</a></th>
43 <th class="left"><a href="#">${_('Description')}</a></th>
43 <th class="left"><a href="#">${_('Description')}</a></th>
44 <th class="left"><a href="#">${_('Number of repositories')}</a></th>
44 <th class="left"><a href="#">${_('Number of repositories')}</a></th>
45 </tr>
45 </tr>
46 </thead>
46 </thead>
47
47
48 ## REPO GROUPS
48 ## REPO GROUPS
49
49
50 % for gr in c.groups:
50 % for gr in c.groups:
51 <tr>
51 <tr>
52 <td>
52 <td>
53 <div style="white-space: nowrap">
53 <div style="white-space: nowrap">
54 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
54 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
55 ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))}
55 ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))}
56 </div>
56 </div>
57 </td>
57 </td>
58 <td>${gr.group_description}</td>
58 <td>${gr.group_description}</td>
59 <td><b>${gr.repositories.count()}</b></td>
59 <td><b>${gr.repositories.count()}</b></td>
60 </tr>
60 </tr>
61 % endfor
61 % endfor
62
62
63 </table>
63 </table>
64 <div style="height: 20px"></div>
64 <div style="height: 20px"></div>
65 % endif
65 % endif
66 <table>
66 <table>
67 <thead>
67 <thead>
68 <tr>
68 <tr>
69 <th class="left"></th>
69 <th class="left"></th>
70 <th class="left">${get_sort(_('Name'))}</th>
70 <th class="left">${get_sort(_('Name'))}</th>
71 <th class="left">${get_sort(_('Description'))}</th>
71 <th class="left">${get_sort(_('Description'))}</th>
72 <th class="left">${get_sort(_('Last change'))}</th>
72 <th class="left">${get_sort(_('Last change'))}</th>
73 <th class="left">${get_sort(_('Tip'))}</th>
73 <th class="left">${get_sort(_('Tip'))}</th>
74 <th class="left">${get_sort(_('Owner'))}</th>
74 <th class="left">${get_sort(_('Owner'))}</th>
75 <th class="left">${_('RSS')}</th>
75 <th class="left">${_('RSS')}</th>
76 <th class="left">${_('Atom')}</th>
76 <th class="left">${_('Atom')}</th>
77 </tr>
77 </tr>
78 </thead>
78 </thead>
79 <tbody>
79 <tbody>
80 %for cnt,repo in enumerate(c.repos_list):
80 %for cnt,repo in enumerate(c.repos_list):
81 <tr class="parity${cnt%2}">
81 <tr class="parity${cnt%2}">
82 <td class="quick_repo_menu inactive">
82 <td class="quick_repo_menu">
83 <ul class="menu_items hidden">
83 <ul class="menu_items hidden">
84 <li>
84 <li>
85 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}">
85 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}">
86 <span class="icon">
86 <span class="icon">
87 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
87 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
88 </span>
88 </span>
89 <span>${_('Summary')}</span>
89 <span>${_('Summary')}</span>
90 </a>
90 </a>
91 </li>
91 </li>
92 <li>
92 <li>
93 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}">
93 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}">
94 <span class="icon">
94 <span class="icon">
95 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
95 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
96 </span>
96 </span>
97 <span>${_('Changelog')}</span>
97 <span>${_('Changelog')}</span>
98 </a>
98 </a>
99 </li>
99 </li>
100 <li>
100 <li>
101 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}">
101 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}">
102 <span class="icon">
102 <span class="icon">
103 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
103 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
104 </span>
104 </span>
105 <span>${_('Files')}</span>
105 <span>${_('Files')}</span>
106 </a>
106 </a>
107 </li>
107 </li>
108 </ul>
108 </ul>
109 </td>
109 </td>
110 <td>
110 <td>
111 ## TYPE OF REPO
111 ## TYPE OF REPO
112 <div style="white-space: nowrap">
112 <div style="white-space: nowrap">
113 %if repo['dbrepo']['repo_type'] =='hg':
113 %if repo['dbrepo']['repo_type'] =='hg':
114 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
114 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
115 %elif repo['dbrepo']['repo_type'] =='git':
115 %elif repo['dbrepo']['repo_type'] =='git':
116 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
116 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
117 %endif
117 %endif
118
118
119 ##PRIVATE/PUBLIC
119 ##PRIVATE/PUBLIC
120 %if repo['dbrepo']['private']:
120 %if repo['dbrepo']['private']:
121 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
121 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
122 %else:
122 %else:
123 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
123 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
124 %endif
124 %endif
125
125
126 ##NAME
126 ##NAME
127 ${h.link_to(repo['name'],
127 ${h.link_to(repo['name'],
128 h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
128 h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
129 %if repo['dbrepo_fork']:
129 %if repo['dbrepo_fork']:
130 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
130 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
131 <img class="icon" alt="${_('fork')}"
131 <img class="icon" alt="${_('fork')}"
132 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
132 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
133 src="${h.url('/images/icons/arrow_divide.png')}"/></a>
133 src="${h.url('/images/icons/arrow_divide.png')}"/></a>
134 %endif
134 %endif
135 </div>
135 </div>
136 </td>
136 </td>
137 ##DESCRIPTION
137 ##DESCRIPTION
138 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
138 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
139 ${h.truncate(repo['description'],60)}</span>
139 ${h.truncate(repo['description'],60)}</span>
140 </td>
140 </td>
141 ##LAST CHANGE
141 ##LAST CHANGE
142 <td>
142 <td>
143 <span class="tooltip" title="${repo['last_change']}">
143 <span class="tooltip" title="${repo['last_change']}">
144 ${h.age(repo['last_change'])}</span>
144 ${h.age(repo['last_change'])}</span>
145 </td>
145 </td>
146 <td>
146 <td>
147 %if repo['rev']>=0:
147 %if repo['rev']>=0:
148 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
148 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
149 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
149 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
150 class_="tooltip",
150 class_="tooltip",
151 title=h.tooltip(repo['last_msg']))}
151 title=h.tooltip(repo['last_msg']))}
152 %else:
152 %else:
153 ${_('No changesets yet')}
153 ${_('No changesets yet')}
154 %endif
154 %endif
155 </td>
155 </td>
156 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
156 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
157 <td>
157 <td>
158 %if c.rhodecode_user.username != 'default':
158 %if c.rhodecode_user.username != 'default':
159 <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>
159 <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>
160 %else:
160 %else:
161 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
161 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
162 %endif:
162 %endif:
163 </td>
163 </td>
164 <td>
164 <td>
165 %if c.rhodecode_user.username != 'default':
165 %if c.rhodecode_user.username != 'default':
166 <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>
166 <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>
167 %else:
167 %else:
168 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
168 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
169 %endif:
169 %endif:
170 </td>
170 </td>
171 </tr>
171 </tr>
172 %endfor
172 %endfor
173
173
174 </tbody>
174 </tbody>
175 </table>
175 </table>
176 </div>
176 </div>
177 </div>
177 </div>
178
178
179
179
180 <script type="text/javascript">
180 <script type="text/javascript">
181 var D = YAHOO.util.Dom;
181 var D = YAHOO.util.Dom;
182 var E = YAHOO.util.Event;
182 var E = YAHOO.util.Event;
183 var S = YAHOO.util.Selector;
183 var S = YAHOO.util.Selector;
184
184
185 var q_filter = D.get('q_filter');
185 var q_filter = D.get('q_filter');
186 var F = YAHOO.namespace('q_filter');
186 var F = YAHOO.namespace('q_filter');
187
187
188 E.on(q_filter,'click',function(){
188 E.on(q_filter,'click',function(){
189 q_filter.value = '';
189 q_filter.value = '';
190 });
190 });
191
191
192 F.filterTimeout = null;
192 F.filterTimeout = null;
193
193
194 //set initial count for repos
194 //set initial count for repos
195 var nodes = S.query('div.table tr td div a.repo_name');
195 var nodes = S.query('div.table tr td div a.repo_name');
196 YUD.get('repo_count').innerHTML = nodes.length;
196 YUD.get('repo_count').innerHTML = nodes.length;
197 F.updateFilter = function() {
197 F.updateFilter = function() {
198 // Reset timeout
198 // Reset timeout
199 F.filterTimeout = null;
199 F.filterTimeout = null;
200
200
201 var obsolete = [];
201 var obsolete = [];
202 nodes = S.query('div.table tr td div a.repo_name');
202 nodes = S.query('div.table tr td div a.repo_name');
203 var req = q_filter.value.toLowerCase();
203 var req = q_filter.value.toLowerCase();
204 for (n in nodes){
204 for (n in nodes){
205 D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','')
205 D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','')
206 }
206 }
207 if (req){
207 if (req){
208 for (n in nodes){
208 for (n in nodes){
209 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
209 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
210 obsolete.push(nodes[n]);
210 obsolete.push(nodes[n]);
211 }
211 }
212 }
212 }
213 if(obsolete){
213 if(obsolete){
214 for (n in obsolete){
214 for (n in obsolete){
215 D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none');
215 D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none');
216 }
216 }
217 }
217 }
218 }
218 }
219 // set new count into dashboard
219 // set new count into dashboard
220 YUD.get('repo_count').innerHTML = nodes.length - obsolete.length;
220 YUD.get('repo_count').innerHTML = nodes.length - obsolete.length;
221 }
221 }
222
222
223 E.on(q_filter,'keyup',function(e){
223 E.on(q_filter,'keyup',function(e){
224 clearTimeout(F.filterTimeout);
224 clearTimeout(F.filterTimeout);
225 setTimeout(F.updateFilter,600);
225 setTimeout(F.updateFilter,600);
226 });
226 });
227
227
228 </script>
228 </script>
General Comments 0
You need to be logged in to leave comments. Login now