Mercurial > kallithea
view kallithea/templates/index_base.html @ 6149:a009c058b9af
changelog: remove quick_repo_menu code and style
AFAICS this hasn't worked since the switch to jQuery DataTables in
b8830c373681. And since nobody seems to miss it, I say we remove this.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Mon, 04 Jul 2016 21:54:27 +0200 |
parents | ff33bb5cf1e9 |
children | 69be8ef8ebfe |
line wrap: on
line source
<%page args="parent,group_name=''" /> <div class="box"> <!-- box / title --> <div class="title"> %if c.authuser.username != 'default': <ul class="links"> <li> <% gr_name = c.group.group_name if c.group else None # create repositories with write permission on group is set to true create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')() group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'can write into group index page') group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page') %> %if h.HasPermissionAny('hg.admin','hg.create.repository')() or (group_admin or (group_write and create_on_write)): %if c.group: <a href="${h.url('new_repo',parent_group=c.group.group_id)}" class="btn btn-small"><i class="icon-plus"></i> ${_('Add Repository')}</a> %if h.HasPermissionAny('hg.admin')() or h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name): <a href="${h.url('new_repos_group', parent_group=c.group.group_id)}" class="btn btn-small"><i class="icon-plus"></i> ${_('Add Repository Group')}</a> %endif %else: <a href="${h.url('new_repo')}" class="btn btn-small"><i class="icon-plus"></i> ${_('Add Repository')}</a> %if h.HasPermissionAny('hg.admin')(): <a href="${h.url('new_repos_group')}" class="btn btn-small"><i class="icon-plus"></i> ${_('Add Repository Group')}</a> %endif %endif %endif %if c.group and h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name): <a href="${h.url('edit_repo_group',group_name=c.group.group_name)}" title="${_('You have admin right to this group, and can edit it')}" class="btn btn-small"><i class="icon-pencil"></i> ${_('Edit Repository Group')}</a> %endif </li> </ul> %endif </div> <!-- end box / title --> <div class="table"> % if c.groups: <div id='groups_list_wrap' class="yui-skin-sam"> <table id="groups_list"> <thead> <tr> <th class="left"><a href="#">${_('Group Name')}</a></th> <th class="left"><a href="#">${_('Description')}</a></th> ##<th class="left"><a href="#">${_('Number of Repositories')}</a></th> </tr> </thead> ## REPO GROUPS % for gr in c.groups: <tr> <td> <div class="dt_repo"> <a href="${url('repos_group_home',group_name=gr.group_name)}"> <i class="icon-folder"></i> <span class="dt_repo_name">${gr.name}</span> </a> </div> </td> <td>${h.urlify_text(gr.group_description, stylize=c.visual.stylify_metatags)}</td> ## this is commented out since for multi nested repos can be HEAVY! ## in number of executed queries during traversing uncomment at will ##<td><b>${gr.repositories_recursive_count}</b></td> </tr> % endfor </table> </div> <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div> <div style="height: 20px"></div> % endif <div id="welcome" style="display:none;text-align:center"> <h1><a href="${h.url('home')}">${c.site_name} ${c.kallithea_version}</a></h1> </div> <%cnt=0%> <%namespace name="dt" file="/data_table/_dt_elements.html"/> <table class="yui-skin-sam" id="repos_list_wrap"></table> <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div> </div> </div> <script> var data = ${c.data|n}, $dataTable = $("#repos_list_wrap").DataTable({ data: data.records, columns: [ {data: "raw_name", visible: false, searchable: false}, {title: "${_('Name')}", data: "name", orderData: 1, render: { filter: function(data) { return $(data).find(".dt_repo_name").text(); } }}, {data: "desc", title: "${_('Description')}", searchable: false}, {data: "last_change_iso", visible: false, searchable: false}, {data: "last_change", title: "${_('Last Change')}", orderData: 4, searchable: false}, {data: "last_rev_raw", visible: false, searchable: false}, {data: "last_changeset", title: "${_('Tip')}", orderData: 6, searchable: false}, {data: "owner", title: "${_('Owner')}", searchable: false}, {data: "atom", sortable: false} ], order: [[1, "asc"]], pageLength: 100 }); </script>