Files
@ c4379e4dc820
Branch filter:
Location: kallithea/kallithea/templates/index_base.html
c4379e4dc820
5.6 KiB
text/html
templates: fix missing / superfluous close tags
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | <%page args="parent,group_name=''" />
<div class="panel panel-primary">
<!-- box / title -->
<div class="panel-heading clearfix">
<div class="breadcrumbs">
%if c.group is not None:
%for group in c.group.parents:
${h.link_to(group.name, url('repos_group_home', group_name=group.group_name))}
»
%endfor
${c.group.group_name}
%endif
</div>
%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-default btn-xs"><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-default btn-xs"><i class="icon-plus"></i> ${_('Add Repository Group')}</a>
%endif
%else:
<a href="${h.url('new_repo')}" class="btn btn-default btn-xs"><i class="icon-plus"></i> ${_('Add Repository')}</a>
%if h.HasPermissionAny('hg.admin')():
<a href="${h.url('new_repos_group')}" class="btn btn-default btn-xs"><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-default btn-xs"><i class="icon-pencil"></i> ${_('Edit Repository Group')}</a>
%endif
</li>
</ul>
%endif
</div>
<!-- end box / title -->
%if c.groups:
<div class="table">
<div id='groups_list_wrap'>
<table id="groups_list">
<thead>
<tr>
<th class="left">${_('Repository Group')}</th>
<th class="left">${_('Description')}</th>
##<th class="left">${_('Number of Repositories')}</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>
%endif
<div class="table">
<table id="repos_list_wrap"></table>
</div>
</div>
<script>
$('#groups_list').DataTable({
dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
pageLength: 100
});
var data = ${c.data|n},
$dataTable = $("#repos_list_wrap").DataTable({
data: data.records,
columns: [
{data: "raw_name", visible: false, searchable: false},
{title: "${_('Repository')}", 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"]],
dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
pageLength: 100
});
</script>
|