diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -94,7 +94,7 @@ class _ToolTip(object): var tts = YAHOO.util.Dom.getElementsByClassName('tooltip'); for (var i = 0; i < tts.length; i++) { - //if element doesn not have and id autgenerate one for tooltip + //if element doesn't not have and id autgenerate one for tooltip if (!tts[i].id){ tts[i].id='tt'+i*100; @@ -112,7 +112,7 @@ class _ToolTip(object): showdelay:20, }); - //Mouse Over event disabled for new repositories since they dont + //Mouse Over event disabled for new repositories since they don't //have last commit message myToolTips.contextMouseOverEvent.subscribe( function(type, args) { @@ -347,9 +347,11 @@ def _age(curdate): for scale in agescales: if scale[1] <= age_seconds: if pos == 6:pos = 5 - return time_ago_in_words(curdate, agescales[pos][0]) + return time_ago_in_words(curdate, agescales[pos][0]) + ' ' + _('ago') pos += 1 + return _('just now') + age = lambda x:_age(x) capitalize = lambda x: x.capitalize() email = util.email diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -164,8 +164,8 @@ class RepoModel(object): def delete(self, repo): try: self.sa.delete(repo) + self.__delete_repo(repo) self.sa.commit() - self.__delete_repo(repo.repo_name) except: log.error(traceback.format_exc()) self.sa.rollback() @@ -200,11 +200,13 @@ class RepoModel(object): new_path) shutil.move(old_path, new_path) - def __delete_repo(self, name): - rm_path = os.path.join(g.base_path, name) + def __delete_repo(self, repo): + rm_path = os.path.join(g.base_path, repo.repo_name) log.info("Removing %s", rm_path) - #disable hg - shutil.move(os.path.join(rm_path, '.hg'), os.path.join(rm_path, 'rm__.hg')) + #disable hg/git + alias = repo.repo_type + shutil.move(os.path.join(rm_path, '.%s' % alias), + os.path.join(rm_path, 'rm__.%s' % alias)) #disable repo shutil.move(rm_path, os.path.join(g.base_path, 'rm__%s__%s' \ - % (datetime.today(), name))) + % (datetime.today(), repo.repo_name))) diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -259,7 +259,6 @@ background-position:0 -40px; #header #header-inner #logo h1 { color:#FFF; font-size:14px; -text-transform:uppercase; margin:13px 0 0 13px; padding:0; } @@ -419,7 +418,7 @@ padding:12px 9px 7px 24px; } #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover { -background:url("../images/icons/folder_edit.png") no-repeat scroll 4px 9px #FFF; +background:url("../images/icons/database_edit.png") no-repeat scroll 4px 9px #FFF; width:167px; margin:0; padding:12px 9px 7px 24px; @@ -1393,7 +1392,6 @@ background-color:#003367; color:#FFF; display:block; min-width:20px; -max-width:400px; text-decoration:none; height:12px; margin-bottom:4px; diff --git a/rhodecode/templates/files/files_browser.html b/rhodecode/templates/files/files_browser.html --- a/rhodecode/templates/files/files_browser.html +++ b/rhodecode/templates/files/files_browser.html @@ -65,7 +65,7 @@ %if node.is_file(): - ${node.last_changeset.date} - ${h.age(node.last_changeset.date)} ${_('ago')} + ${node.last_changeset.date} - ${h.age(node.last_changeset.date)} %endif diff --git a/rhodecode/templates/index.html b/rhodecode/templates/index.html --- a/rhodecode/templates/index.html +++ b/rhodecode/templates/index.html @@ -54,9 +54,9 @@ %for cnt,repo in enumerate(c.repos_list): - %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'): +
## TYPE OF REPO %if repo['repo'].dbrepo.repo_type =='hg': ${_('Mercurial repository')} @@ -82,6 +82,7 @@ title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}" src="/images/icons/arrow_divide.png"/> %endif +
##DESCRIPTION @@ -89,7 +90,8 @@ ##LAST CHANGE - ${repo['last_change']} - ${h.age(repo['last_change'])} + + ${repo['last_change']} %if repo['rev']>=0: @@ -109,7 +111,6 @@ - %endif %endfor @@ -136,10 +137,10 @@ F.filterTimeout = null; var obsolete = []; - var nodes = S.query('div.table tr td a.repo_name'); + var nodes = S.query('div.table tr td div a.repo_name'); var req = D.get('q_filter').value; for (n in nodes){ - D.setStyle(nodes[n].parentNode.parentNode,'display','') + D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','') } if (req){ for (n in nodes){ @@ -149,7 +150,7 @@ } if(obsolete){ for (n in obsolete){ - D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); + D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none'); } } }