comparison rhodecode/controllers/home.py @ 1609:aaabec656ceb beta

fixed xhr check for tags-branches view
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 29 Oct 2011 01:40:14 +0200
parents 0069657aaf42
children 2c0d35e336b5
comparison
equal deleted inserted replaced
1608:0069657aaf42 1609:aaabec656ceb
22 # 22 #
23 # You should have received a copy of the GNU General Public License 23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>. 24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 25
26 import logging 26 import logging
27 from operator import itemgetter
28 27
29 from pylons import tmpl_context as c, request 28 from pylons import tmpl_context as c, request
30 from paste.httpexceptions import HTTPBadRequest 29 from paste.httpexceptions import HTTPBadRequest
31 30
32 from rhodecode.lib.auth import LoginRequired 31 from rhodecode.lib.auth import LoginRequired
58 return render('/repo_switcher_list.html') 57 return render('/repo_switcher_list.html')
59 else: 58 else:
60 return HTTPBadRequest() 59 return HTTPBadRequest()
61 60
62 def branch_tag_switcher(self, repo_name): 61 def branch_tag_switcher(self, repo_name):
63 c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name)
64 c.rhodecode_repo = c.rhodecode_db_repo.scm_instance
65 return render('/switch_to_list.html')
66 if request.is_xhr: 62 if request.is_xhr:
63 c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name)
64 c.rhodecode_repo = c.rhodecode_db_repo.scm_instance
67 return render('/switch_to_list.html') 65 return render('/switch_to_list.html')
68 else: 66 else:
69 return HTTPBadRequest() 67 return HTTPBadRequest()
68