Mercurial > kallithea
diff rhodecode/controllers/files.py @ 2177:ee07357d9265 beta
unified annotation view with file source view
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 01 Apr 2012 01:05:15 +0300 |
parents | 8ecfed1d8f8b |
children | 31ebf7010566 |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Thu Mar 29 21:21:29 2012 +0200 +++ b/rhodecode/controllers/files.py Sun Apr 01 01:05:15 2012 +0300 @@ -112,7 +112,7 @@ @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', 'repository.admin') - def index(self, repo_name, revision, f_path): + def index(self, repo_name, revision, f_path, annotate=False): # redirect to given revision from form if given post_revision = request.POST.get('at_rev', None) if post_revision: @@ -123,7 +123,7 @@ c.changeset = self.__get_cs_or_redirect(revision, repo_name) c.branch = request.GET.get('branch', None) c.f_path = f_path - + c.annotate = annotate cur_rev = c.changeset.revision # prev link @@ -219,16 +219,6 @@ response.content_type = mimetype return file_node.content - @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', - 'repository.admin') - def annotate(self, repo_name, revision, f_path): - c.cs = self.__get_cs_or_redirect(revision, repo_name) - c.file = self.__get_filenode_or_redirect(repo_name, c.cs, f_path) - - c.file_history = self._get_node_history(c.cs, f_path) - c.f_path = f_path - return render('files/files_annotate.html') - @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') def edit(self, repo_name, revision, f_path): r_post = request.POST