Changeset - 2df8982bc40c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-08-04 18:55:20
marcin@python-works.com
better instructions for adding online files
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -72,25 +72,25 @@ class FilesController(BaseRepoController
 
        :param rev: revision to fetch
 
        :param repo_name: repo name to redirect after
 
        """
 

	
 
        try:
 
            return c.rhodecode_repo.get_changeset(rev)
 
        except EmptyRepositoryError, e:
 
            if not redirect_after:
 
                return None
 
            url_ = url('files_add_home',
 
                       repo_name=c.repo_name,
 
                       revision=0, f_path='')
 
            add_new = '<a href="%s">[%s]</a>' % (url_, _('add new'))
 
            add_new = '<a href="%s">[%s]</a>' % (url_, _('click here to add new file'))
 
            h.flash(h.literal(_('There are no files yet %s') % add_new),
 
                    category='warning')
 
            redirect(h.url('summary_home', repo_name=repo_name))
 

	
 
        except RepositoryError, e:
 
            h.flash(str(e), category='warning')
 
            redirect(h.url('files_home', repo_name=repo_name, revision='tip'))
 

	
 
    def __get_filenode_or_redirect(self, repo_name, cs, path):
 
        """
 
        Returns file_node, if error occurs or given path is directory,
 
        it'll redirect to top level path
0 comments (0 inline, 0 general)