diff --git a/rhodecode/templates/admin/repos_groups/repos_groups.html b/rhodecode/templates/admin/repos_groups/repos_groups.html --- a/rhodecode/templates/admin/repos_groups/repos_groups.html +++ b/rhodecode/templates/admin/repos_groups/repos_groups.html @@ -1,155 +1,21 @@ ## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> - <%def name="title()"> ${_('Repository group')} - ${c.rhodecode_name} - -<%def name="breadcrumbs_links()"> - ${_('Repository Groups')} +<%def name="breadcrumbs()"> + ${_('Groups')} %if c.group.parent_group: - » ${h.link_to(c.group.parent_group.group_name,h.url('repos_group',id=c.group.parent_group.group_id))} + » ${h.link_to(c.group.parent_group.group_name, + h.url('repos_group',id=c.group.parent_group.group_id))} %endif - - » "${c.group.group_name}" ${_('with %s repositories' % c.repo_cnt)} + » "${c.group.group_name}" ${_('with')} + <%def name="page_nav()"> ${self.menu('admin')} <%def name="main()"> - <%def name="get_sort(name)"> - <%name_slug = name.lower().replace(' ','_') %> - - %if name_slug == c.sort_slug: - %if c.sort_by.startswith('-'): - ${name}↑ - %else: - ${name}↓ - %endif: - %else: - ${name} - %endif - -
- -
- ${self.breadcrumbs()} -
- -
- % if c.groups: - - - - - - - - - - - ## REPO GROUPS - - % for gr in c.groups: - - - - - - % endfor - -
${_('Group name')}${_('Description')}${_('Number of repositories')}
-
- ${_('Repositories group')} - ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))} -
-
${gr.group_description}${gr.repositories.count()}
-
- % endif - - - - - - - - - - - - - - %for cnt,repo in enumerate(c.repos_list): - - - ##DESCRIPTION - - ##LAST CHANGE - - - - - - - %endfor - -
${get_sort(_('Name'))}${get_sort(_('Description'))}${get_sort(_('Last change'))}${get_sort(_('Tip'))}${get_sort(_('Owner'))}${_('RSS')}${_('Atom')}
-
- ## TYPE OF REPO - %if repo['dbrepo']['repo_type'] =='hg': - ${_('Mercurial repository')} - %elif repo['dbrepo']['repo_type'] =='git': - ${_('Git repository')} - %else: - - %endif - - ##PRIVATE/PUBLIC - %if repo['dbrepo']['private']: - ${_('private repository')} - %else: - ${_('public repository')} - %endif - - ##NAME - ${h.link_to(repo['name'], - h.url('summary_home',repo_name=repo['name']),class_="repo_name")} - %if repo['dbrepo_fork']: - - ${_('fork')} - %endif -
-
- ${h.truncate(repo['description'],60)} - - - ${h.age(repo['last_change'])} - - %if repo['rev']>=0: - ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), - h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), - class_="tooltip", - title=h.tooltip(repo['last_msg']))} - %else: - ${_('No changesets yet')} - %endif - ${h.person(repo['contact'])} - %if c.rhodecode_user.username != 'default': - - %else: - - %endif: - - %if c.rhodecode_user.username != 'default': - - %else: - - %endif: -
-
-
- + <%include file="/index_base.html" args="parent=self"/> diff --git a/rhodecode/templates/index.html b/rhodecode/templates/index.html --- a/rhodecode/templates/index.html +++ b/rhodecode/templates/index.html @@ -10,206 +10,5 @@ ${self.menu('home')} <%def name="main()"> - <%def name="get_sort(name)"> - <%name_slug = name.lower().replace(' ','_') %> - - %if name_slug == c.sort_slug: - %if c.sort_by.startswith('-'): - ${name}↑ - %else: - ${name}↓ - %endif: - %else: - ${name} - %endif - - -
- -
-
- - ${_('Dashboard')} - ${_('repositories')} -
- %if c.rhodecode_user.username != 'default': - %if h.HasPermissionAny('hg.admin','hg.create.repository')(): - - %endif - %endif -
- -
- % if c.groups: - - - - - - - - - - - ## REPO GROUPS - - % for gr in c.groups: - - - - - - % endfor - -
${_('Group name')}${_('Description')}${_('Number of repositories')}
-
- ${_('Repositories group')} - ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))} -
-
${gr.group_description}${gr.repositories.count()}
-
- % endif - - - - - - - - - - - - - - %for cnt,repo in enumerate(c.repos_list): - - - ##DESCRIPTION - - ##LAST CHANGE - - - - - - - %endfor - - -
${get_sort(_('Name'))}${get_sort(_('Description'))}${get_sort(_('Last change'))}${get_sort(_('Tip'))}${get_sort(_('Owner'))}${_('RSS')}${_('Atom')}
-
- ## TYPE OF REPO - %if repo['dbrepo']['repo_type'] =='hg': - ${_('Mercurial repository')} - %elif repo['dbrepo']['repo_type'] =='git': - ${_('Git repository')} - %else: - - %endif - - ##PRIVATE/PUBLIC - %if repo['dbrepo']['private']: - ${_('private repository')} - %else: - ${_('public repository')} - %endif - - ##NAME - ${h.link_to(repo['name'], - h.url('summary_home',repo_name=repo['name']),class_="repo_name")} - %if repo['dbrepo_fork']: - - ${_('fork')} - %endif -
-
- ${h.truncate(repo['description'],60)} - - - ${h.age(repo['last_change'])} - - %if repo['rev']>=0: - ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), - h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), - class_="tooltip", - title=h.tooltip(repo['last_msg']))} - %else: - ${_('No changesets yet')} - %endif - ${h.person(repo['contact'])} - %if c.rhodecode_user.username != 'default': - - %else: - - %endif: - - %if c.rhodecode_user.username != 'default': - - %else: - - %endif: -
-
-
- - - - + <%include file="index_base.html" args="parent=self"/> diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.html new file mode 100644 --- /dev/null +++ b/rhodecode/templates/index_base.html @@ -0,0 +1,201 @@ +<%page args="parent" /> + <%def name="get_sort(name)"> + <%name_slug = name.lower().replace(' ','_') %> + + %if name_slug == c.sort_slug: + %if c.sort_by.startswith('-'): + ${name}↑ + %else: + ${name}↓ + %endif: + %else: + ${name} + %endif + + +
+ +
+
+ ${parent.breadcrumbs()} ${_('repositories')} +
+ %if c.rhodecode_user.username != 'default': + %if h.HasPermissionAny('hg.admin','hg.create.repository')(): + + %endif + %endif +
+ +
+ % if c.groups: + + + + + + + + + + + ## REPO GROUPS + + % for gr in c.groups: + + + + + + % endfor + +
${_('Group name')}${_('Description')}${_('Number of repositories')}
+
+ ${_('Repositories group')} + ${h.link_to(gr.group_name,url('repos_group',id=gr.group_id))} +
+
${gr.group_description}${gr.repositories.count()}
+
+ % endif + + + + + + + + + + + + + + %for cnt,repo in enumerate(c.repos_list): + + + ##DESCRIPTION + + ##LAST CHANGE + + + + + + + %endfor + + +
${get_sort(_('Name'))}${get_sort(_('Description'))}${get_sort(_('Last change'))}${get_sort(_('Tip'))}${get_sort(_('Owner'))}${_('RSS')}${_('Atom')}
+
+ ## TYPE OF REPO + %if repo['dbrepo']['repo_type'] =='hg': + ${_('Mercurial repository')} + %elif repo['dbrepo']['repo_type'] =='git': + ${_('Git repository')} + %else: + + %endif + + ##PRIVATE/PUBLIC + %if repo['dbrepo']['private']: + ${_('private repository')} + %else: + ${_('public repository')} + %endif + + ##NAME + ${h.link_to(repo['name'], + h.url('summary_home',repo_name=repo['name']),class_="repo_name")} + %if repo['dbrepo_fork']: + + ${_('fork')} + %endif +
+
+ ${h.truncate(repo['description'],60)} + + + ${h.age(repo['last_change'])} + + %if repo['rev']>=0: + ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), + h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), + class_="tooltip", + title=h.tooltip(repo['last_msg']))} + %else: + ${_('No changesets yet')} + %endif + ${h.person(repo['contact'])} + %if c.rhodecode_user.username != 'default': + + %else: + + %endif: + + %if c.rhodecode_user.username != 'default': + + %else: + + %endif: +
+
+
+ + +