Show More
@@ -94,7 +94,7 b' class _ToolTip(object):' | |||
|
94 | 94 | var tts = YAHOO.util.Dom.getElementsByClassName('tooltip'); |
|
95 | 95 | |
|
96 | 96 | for (var i = 0; i < tts.length; i++) { |
|
97 | //if element doesn not have and id autgenerate one for tooltip | |
|
97 | //if element doesn't not have and id autgenerate one for tooltip | |
|
98 | 98 | |
|
99 | 99 | if (!tts[i].id){ |
|
100 | 100 | tts[i].id='tt'+i*100; |
@@ -112,7 +112,7 b' class _ToolTip(object):' | |||
|
112 | 112 | showdelay:20, |
|
113 | 113 | }); |
|
114 | 114 | |
|
115 | //Mouse Over event disabled for new repositories since they dont | |
|
115 | //Mouse Over event disabled for new repositories since they don't | |
|
116 | 116 | //have last commit message |
|
117 | 117 | myToolTips.contextMouseOverEvent.subscribe( |
|
118 | 118 | function(type, args) { |
@@ -347,9 +347,11 b' def _age(curdate):' | |||
|
347 | 347 | for scale in agescales: |
|
348 | 348 | if scale[1] <= age_seconds: |
|
349 | 349 | if pos == 6:pos = 5 |
|
350 | return time_ago_in_words(curdate, agescales[pos][0]) | |
|
350 | return time_ago_in_words(curdate, agescales[pos][0]) + ' ' + _('ago') | |
|
351 | 351 | pos += 1 |
|
352 | 352 | |
|
353 | return _('just now') | |
|
354 | ||
|
353 | 355 | age = lambda x:_age(x) |
|
354 | 356 | capitalize = lambda x: x.capitalize() |
|
355 | 357 | email = util.email |
@@ -164,8 +164,8 b' class RepoModel(object):' | |||
|
164 | 164 | def delete(self, repo): |
|
165 | 165 | try: |
|
166 | 166 | self.sa.delete(repo) |
|
167 | self.__delete_repo(repo) | |
|
167 | 168 | self.sa.commit() |
|
168 | self.__delete_repo(repo.repo_name) | |
|
169 | 169 | except: |
|
170 | 170 | log.error(traceback.format_exc()) |
|
171 | 171 | self.sa.rollback() |
@@ -200,11 +200,13 b' class RepoModel(object):' | |||
|
200 | 200 | new_path) |
|
201 | 201 | shutil.move(old_path, new_path) |
|
202 | 202 | |
|
203 |
def __delete_repo(self, |
|
|
204 | rm_path = os.path.join(g.base_path, name) | |
|
203 | def __delete_repo(self, repo): | |
|
204 | rm_path = os.path.join(g.base_path, repo.repo_name) | |
|
205 | 205 | log.info("Removing %s", rm_path) |
|
206 |
#disable hg |
|
|
207 | shutil.move(os.path.join(rm_path, '.hg'), os.path.join(rm_path, 'rm__.hg')) | |
|
206 | #disable hg/git | |
|
207 | alias = repo.repo_type | |
|
208 | shutil.move(os.path.join(rm_path, '.%s' % alias), | |
|
209 | os.path.join(rm_path, 'rm__.%s' % alias)) | |
|
208 | 210 | #disable repo |
|
209 | 211 | shutil.move(rm_path, os.path.join(g.base_path, 'rm__%s__%s' \ |
|
210 | % (datetime.today(), name))) | |
|
212 | % (datetime.today(), repo.repo_name))) |
@@ -259,7 +259,6 b' background-position:0 -40px;' | |||
|
259 | 259 | #header #header-inner #logo h1 { |
|
260 | 260 | color:#FFF; |
|
261 | 261 | font-size:14px; |
|
262 | text-transform:uppercase; | |
|
263 | 262 | margin:13px 0 0 13px; |
|
264 | 263 | padding:0; |
|
265 | 264 | } |
@@ -419,7 +418,7 b' padding:12px 9px 7px 24px;' | |||
|
419 | 418 | } |
|
420 | 419 | |
|
421 | 420 | #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover { |
|
422 |
background:url("../images/icons/ |
|
|
421 | background:url("../images/icons/database_edit.png") no-repeat scroll 4px 9px #FFF; | |
|
423 | 422 | width:167px; |
|
424 | 423 | margin:0; |
|
425 | 424 | padding:12px 9px 7px 24px; |
@@ -1393,7 +1392,6 b' background-color:#003367;' | |||
|
1393 | 1392 | color:#FFF; |
|
1394 | 1393 | display:block; |
|
1395 | 1394 | min-width:20px; |
|
1396 | max-width:400px; | |
|
1397 | 1395 | text-decoration:none; |
|
1398 | 1396 | height:12px; |
|
1399 | 1397 | margin-bottom:4px; |
@@ -65,7 +65,7 b'' | |||
|
65 | 65 | </td> |
|
66 | 66 | <td> |
|
67 | 67 | %if node.is_file(): |
|
68 |
${node.last_changeset.date} - ${h.age(node.last_changeset.date)} |
|
|
68 | ${node.last_changeset.date} - ${h.age(node.last_changeset.date)} | |
|
69 | 69 | %endif |
|
70 | 70 | </td> |
|
71 | 71 | <td> |
@@ -54,9 +54,9 b'' | |||
|
54 | 54 | </thead> |
|
55 | 55 | <tbody> |
|
56 | 56 | %for cnt,repo in enumerate(c.repos_list): |
|
57 | %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'): | |
|
58 | 57 | <tr class="parity${cnt%2}"> |
|
59 | 58 | <td> |
|
59 | <div style="white-space: nowrap"> | |
|
60 | 60 | ## TYPE OF REPO |
|
61 | 61 | %if repo['repo'].dbrepo.repo_type =='hg': |
|
62 | 62 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/> |
@@ -82,6 +82,7 b'' | |||
|
82 | 82 | title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}" |
|
83 | 83 | src="/images/icons/arrow_divide.png"/></a> |
|
84 | 84 | %endif |
|
85 | </div> | |
|
85 | 86 | </td> |
|
86 | 87 | ##DESCRIPTION |
|
87 | 88 | <td><span class="tooltip" tooltip_title="${repo['description']}"> |
@@ -89,7 +90,8 b'' | |||
|
89 | 90 | </td> |
|
90 | 91 | ##LAST CHANGE |
|
91 | 92 | <td> |
|
92 |
<span |
|
|
93 | <span class="tooltip" tooltip_title="${h.age(repo['last_change'])}"> | |
|
94 | ${repo['last_change']}</span> | |
|
93 | 95 | </td> |
|
94 | 96 | <td> |
|
95 | 97 | %if repo['rev']>=0: |
@@ -109,7 +111,6 b'' | |||
|
109 | 111 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
|
110 | 112 | </td> |
|
111 | 113 | </tr> |
|
112 | %endif | |
|
113 | 114 | %endfor |
|
114 | 115 | </tbody> |
|
115 | 116 | </table> |
@@ -136,10 +137,10 b'' | |||
|
136 | 137 | F.filterTimeout = null; |
|
137 | 138 | |
|
138 | 139 | var obsolete = []; |
|
139 | var nodes = S.query('div.table tr td a.repo_name'); | |
|
140 | var nodes = S.query('div.table tr td div a.repo_name'); | |
|
140 | 141 | var req = D.get('q_filter').value; |
|
141 | 142 | for (n in nodes){ |
|
142 | D.setStyle(nodes[n].parentNode.parentNode,'display','') | |
|
143 | D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','') | |
|
143 | 144 | } |
|
144 | 145 | if (req){ |
|
145 | 146 | for (n in nodes){ |
@@ -149,7 +150,7 b'' | |||
|
149 | 150 | } |
|
150 | 151 | if(obsolete){ |
|
151 | 152 | for (n in obsolete){ |
|
152 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); | |
|
153 | D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none'); | |
|
153 | 154 | } |
|
154 | 155 | } |
|
155 | 156 | } |
General Comments 0
You need to be logged in to leave comments.
Login now