# HG changeset patch # User Marcin Kuzminski # Date 2019-07-24 09:35:20 # Node ID 796d3ee3ae14e1ae211298012fb61385805c08ad # Parent 816873d44feb53b7e15e597ee1b470be4c70ba9d gists: updated template names and synced edit with create template. diff --git a/rhodecode/apps/gist/views.py b/rhodecode/apps/gist/views.py --- a/rhodecode/apps/gist/views.py +++ b/rhodecode/apps/gist/views.py @@ -72,7 +72,7 @@ class GistView(BaseAppView): @LoginRequired() @view_config( route_name='gists_show', request_method='GET', - renderer='rhodecode:templates/admin/gists/index.mako') + renderer='rhodecode:templates/admin/gists/gist_index.mako') def gist_show_all(self): c = self.load_default_context() @@ -136,7 +136,7 @@ class GistView(BaseAppView): @NotAnonymous() @view_config( route_name='gists_new', request_method='GET', - renderer='rhodecode:templates/admin/gists/new.mako') + renderer='rhodecode:templates/admin/gists/gist_new.mako') def gist_new(self): c = self.load_default_context() return self._get_template_context(c) @@ -146,7 +146,7 @@ class GistView(BaseAppView): @CSRFRequired() @view_config( route_name='gists_create', request_method='POST', - renderer='rhodecode:templates/admin/gists/new.mako') + renderer='rhodecode:templates/admin/gists/gist_new.mako') def gist_create(self): _ = self.request.translate c = self.load_default_context() @@ -196,7 +196,7 @@ class GistView(BaseAppView): errors['filename'] = errors['nodes.0.filename'] del errors['nodes.0.filename'] - data = render('rhodecode:templates/admin/gists/new.mako', + data = render('rhodecode:templates/admin/gists/gist_new.mako', self._get_template_context(c), self.request) html = formencode.htmlfill.render( data, @@ -260,10 +260,10 @@ class GistView(BaseAppView): @LoginRequired() @view_config( route_name='gist_show', request_method='GET', - renderer='rhodecode:templates/admin/gists/show.mako') + renderer='rhodecode:templates/admin/gists/gist_show.mako') @view_config( route_name='gist_show_rev', request_method='GET', - renderer='rhodecode:templates/admin/gists/show.mako') + renderer='rhodecode:templates/admin/gists/gist_show.mako') @view_config( route_name='gist_show_formatted', request_method='GET', renderer=None) @@ -304,7 +304,7 @@ class GistView(BaseAppView): @NotAnonymous() @view_config( route_name='gist_edit', request_method='GET', - renderer='rhodecode:templates/admin/gists/edit.mako') + renderer='rhodecode:templates/admin/gists/gist_edit.mako') def gist_edit(self): _ = self.request.translate gist_id = self.request.matchdict['gist_id'] @@ -338,7 +338,7 @@ class GistView(BaseAppView): @CSRFRequired() @view_config( route_name='gist_update', request_method='POST', - renderer='rhodecode:templates/admin/gists/edit.mako') + renderer='rhodecode:templates/admin/gists/gist_edit.mako') def gist_update(self): _ = self.request.translate gist_id = self.request.matchdict['gist_id'] diff --git a/rhodecode/templates/admin/gists/edit.mako b/rhodecode/templates/admin/gists/gist_edit.mako rename from rhodecode/templates/admin/gists/edit.mako rename to rhodecode/templates/admin/gists/gist_edit.mako --- a/rhodecode/templates/admin/gists/edit.mako +++ b/rhodecode/templates/admin/gists/gist_edit.mako @@ -8,9 +8,7 @@ %endif -<%def name="breadcrumbs_links()"> - ${_('Edit Gist')} · ${c.gist.gist_access_id} - +<%def name="breadcrumbs_links()"> <%def name="menu_bar_nav()"> ${self.menu_items(active='gists')} @@ -20,17 +18,14 @@
- ${self.breadcrumbs()} +
-
${h.secure_form(h.route_path('gist_update', gist_id=c.gist.gist_access_id), id='eform', request=request)}
-
${self.gravatar(h.email_or_none(c.rhodecode_user.full_contact), 30)} @@ -40,6 +35,9 @@ ${h.dropdownmenu('gist_acl_level', c.gist.acl_level, c.acl_options)} + +
diff --git a/rhodecode/templates/admin/gists/index.mako b/rhodecode/templates/admin/gists/gist_index.mako rename from rhodecode/templates/admin/gists/index.mako rename to rhodecode/templates/admin/gists/gist_index.mako diff --git a/rhodecode/templates/admin/gists/new.mako b/rhodecode/templates/admin/gists/gist_new.mako rename from rhodecode/templates/admin/gists/new.mako rename to rhodecode/templates/admin/gists/gist_new.mako --- a/rhodecode/templates/admin/gists/new.mako +++ b/rhodecode/templates/admin/gists/gist_new.mako @@ -37,7 +37,7 @@ ${h.dropdownmenu('gist_acl_level', '', c.acl_options)} - +
diff --git a/rhodecode/templates/admin/gists/show.mako b/rhodecode/templates/admin/gists/gist_show.mako rename from rhodecode/templates/admin/gists/show.mako rename to rhodecode/templates/admin/gists/gist_show.mako