diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py
--- a/rhodecode/config/routing.py
+++ b/rhodecode/config/routing.py
@@ -62,6 +62,8 @@ def make_map(config):
rmap.connect('home', '/', controller='home', action='index')
rmap.connect('repo_switcher', '/repos', controller='home',
action='repo_switcher')
+ rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*}',
+ controller='home',action='branch_tag_switcher')
rmap.connect('bugtracker',
"http://bitbucket.org/marcinkuzminski/rhodecode/issues",
_static=True)
diff --git a/rhodecode/controllers/home.py b/rhodecode/controllers/home.py
--- a/rhodecode/controllers/home.py
+++ b/rhodecode/controllers/home.py
@@ -58,3 +58,12 @@ class HomeController(BaseController):
return render('/repo_switcher_list.html')
else:
return HTTPBadRequest()
+
+ def branch_tag_switcher(self, repo_name):
+ c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name)
+ c.rhodecode_repo = c.rhodecode_db_repo.scm_instance
+ return render('/switch_to_list.html')
+ if request.is_xhr:
+ return render('/switch_to_list.html')
+ else:
+ return HTTPBadRequest()
diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html
--- a/rhodecode/templates/base/base.html
+++ b/rhodecode/templates/base/base.html
@@ -149,60 +149,6 @@
${_('loading...')}
-
@@ -231,38 +177,15 @@
-
+
${_('Switch to')}
-
- -
- ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
-
- %if c.rhodecode_repo.branches.values():
- %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
- - ${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}
- %endfor
- %else:
- - ${h.link_to(_('There are no branches yet'),'#')}
- %endif
-
-
- -
- ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
-
- %if c.rhodecode_repo.tags.values():
- %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
- - ${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}
- %endfor
- %else:
- - ${h.link_to(_('There are no tags yet'),'#')}
- %endif
-
-
-
+
@@ -329,8 +252,73 @@
${c.repository_forks}
-
+
%else:
##ROOT MENU
@@ -373,5 +361,5 @@
%endif
- %endif
+ %endif
%def>
diff --git a/rhodecode/templates/switch_to_list.html b/rhodecode/templates/switch_to_list.html
new file mode 100644
--- /dev/null
+++ b/rhodecode/templates/switch_to_list.html
@@ -0,0 +1,25 @@
+## -*- coding: utf-8 -*-
+
+ ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
+
+ %if c.rhodecode_repo.branches.values():
+ %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
+ - ${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}
+ %endfor
+ %else:
+ - ${h.link_to(_('There are no branches yet'),'#')}
+ %endif
+
+
+
+ ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
+
+ %if c.rhodecode_repo.tags.values():
+ %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
+ - ${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}
+ %endfor
+ %else:
+ - ${h.link_to(_('There are no tags yet'),'#')}
+ %endif
+
+
\ No newline at end of file