Show More
@@ -82,7 +82,9 b'' | |||
|
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"> |
@@ -92,13 +94,20 b'' | |||
|
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')}" |
@@ -107,7 +116,7 b'' | |||
|
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')} |
@@ -127,4 +136,48 b'' | |||
|
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 |
@@ -57,6 +57,7 b'' | |||
|
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': |
@@ -65,11 +66,14 b'' | |||
|
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 | 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: |
@@ -79,11 +83,13 b'' | |||
|
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: |
General Comments 0
You need to be logged in to leave comments.
Login now