Changeset - 6cdf2cd9d9d8
[Not reviewed]
beta
0 3 0
Mads Kiilerich - 13 years ago 2013-01-30 21:13:47
madski@unity3d.com
Transplanted from: f8a6921b13f6
repo edit: it is a repo thing more than an admin thing - show it that way in ui and url
3 files changed with 13 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/routing.py
Show inline comments
 
@@ -102,7 +102,8 @@ def make_map(config):
 
        m.connect("/repos/{repo_name:.*?}",
 
             action="delete", conditions=dict(method=["DELETE"],
 
                                              function=check_repo))
 
        m.connect("edit_repo", "/repos/{repo_name:.*?}/edit",
 
        # no longer used:
 
        m.connect("edit_repo_admin", "/repos/{repo_name:.*?}/edit",
 
             action="edit", conditions=dict(method=["GET"],
 
                                            function=check_repo))
 
        m.connect("formatted_edit_repo", "/repos/{repo_name:.*?}.{format}/edit",
 
@@ -434,6 +435,11 @@ def make_map(config):
 
                controller='changeset', revision='tip',
 
                conditions=dict(function=check_repo))
 

	
 
    rmap.connect("edit_repo", "/{repo_name:.*?}/edit",
 
                 controller='admin/repos', action="edit",
 
                 conditions=dict(method=["GET"], function=check_repo)
 
                 )
 

	
 
    #still working url for backward compat.
 
    rmap.connect('raw_changeset_home_depraced',
 
                 '/{repo_name:.*?}/raw-changeset/{revision}',
rhodecode/controllers/admin/repos.py
Show inline comments
 
@@ -38,7 +38,7 @@ import rhodecode
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
    HasPermissionAnyDecorator, HasRepoPermissionAllDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.utils import invalidate_cache, action_logger, repo_name_slug
 
from rhodecode.lib.helpers import get_token
 
from rhodecode.model.meta import Session
 
@@ -53,7 +53,7 @@ from sqlalchemy.sql.expression import fu
 
log = logging.getLogger(__name__)
 

	
 

	
 
class ReposController(BaseController):
 
class ReposController(BaseRepoController):
 
    """
 
    REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
rhodecode/templates/admin/repos/repo_edit.html
Show inline comments
 
@@ -6,15 +6,15 @@
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    ${h.link_to(_(u'Home'),h.url('/'))}
 
    &raquo;
 
    ${h.link_to(_('Repositories'),h.url('repos'))}
 
    ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
 
    &raquo;
 
    ${_('edit')} &raquo; ${h.link_to(c.repo_info.just_name,h.url('summary_home',repo_name=c.repo_name))}
 
    ${_('edit')}
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
 
    ${self.menu('options')}
 
</%def>
 

	
 
<%def name="main()">
0 comments (0 inline, 0 general)