##// END OF EJS Templates
Added quickfilter into my account....
marcink -
r647:5e209dcd beta
parent child Browse files
Show More
@@ -82,7 +82,9 b''
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">
@@ -92,13 +94,20 b''
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')}"
@@ -107,7 +116,7 b''
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')}
@@ -127,4 +136,48 b''
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>
@@ -57,6 +57,7 b''
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':
@@ -65,11 +66,14 b''
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:
@@ -79,11 +83,13 b''
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:
General Comments 0
You need to be logged in to leave comments. Login now