##// END OF EJS Templates
redirect to summary page after repo was created
marcink -
r2660:98532710 beta
parent child Browse files
Show More
@@ -148,7 +148,8 b' class ReposController(BaseController):'
148 form_result = RepoForm(repo_groups=c.repo_groups_choices,
148 form_result = RepoForm(repo_groups=c.repo_groups_choices,
149 landing_revs=c.landing_revs_choices)()\
149 landing_revs=c.landing_revs_choices)()\
150 .to_python(dict(request.POST))
150 .to_python(dict(request.POST))
151 RepoModel().create(form_result, self.rhodecode_user.user_id)
151 new_repo = RepoModel().create(form_result,
152 self.rhodecode_user.user_id)
152 if form_result['clone_uri']:
153 if form_result['clone_uri']:
153 h.flash(_('created repository %s from %s') \
154 h.flash(_('created repository %s from %s') \
154 % (form_result['repo_name'], form_result['clone_uri']),
155 % (form_result['repo_name'], form_result['clone_uri']),
@@ -188,9 +189,8 b' class ReposController(BaseController):'
188 msg = _('error occurred during creation of repository %s') \
189 msg = _('error occurred during creation of repository %s') \
189 % form_result.get('repo_name')
190 % form_result.get('repo_name')
190 h.flash(msg, category='error')
191 h.flash(msg, category='error')
191 if request.POST.get('user_created'):
192 #redirect to our new repo !
192 return redirect(url('home'))
193 return redirect(url('summary_home', repo_name=new_repo.repo_name))
193 return redirect(url('repos'))
194
194
195 @HasPermissionAllDecorator('hg.admin')
195 @HasPermissionAllDecorator('hg.admin')
196 def new(self, format='html'):
196 def new(self, format='html'):
General Comments 0
You need to be logged in to leave comments. Login now