Files
@ c40e567e4b82
Branch filter:
Location: kallithea/kallithea/templates/index_base.html - annotation
c40e567e4b82
5.1 KiB
text/html
style: use Bootstrap compatible data-toggle="tooltip" markup
Based on work by Dominik Ruf and Andrew Shadura.
Based on work by Dominik Ruf and Andrew Shadura.
d1addaf7a91e 80a15e10857a d1addaf7a91e ee3fb2dfbcc0 d208416c84c6 d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e 20830dfe3ed8 d1addaf7a91e 20830dfe3ed8 d1addaf7a91e d1addaf7a91e 20830dfe3ed8 d1addaf7a91e 20830dfe3ed8 d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e 20830dfe3ed8 d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e 69be8ef8ebfe d1addaf7a91e d1addaf7a91e d1addaf7a91e d3930bd0c14a d3930bd0c14a d3930bd0c14a d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e 42fa6e7536d1 42fa6e7536d1 42fa6e7536d1 42fa6e7536d1 42fa6e7536d1 d1addaf7a91e d1addaf7a91e 53f19cdfa40c d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d3930bd0c14a d1addaf7a91e d3930bd0c14a 69be8ef8ebfe d1addaf7a91e d1addaf7a91e d1addaf7a91e d1addaf7a91e d3930bd0c14a d3930bd0c14a b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 d3930bd0c14a b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 b8830c373681 ff33bb5cf1e9 ff33bb5cf1e9 d1addaf7a91e d1addaf7a91e | <%page args="parent,group_name=''" />
<div class="panel panel-primary">
<!-- box / title -->
<div class="panel-heading">
%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 -->
<div class="table">
% if c.groups:
<div id='groups_list_wrap'>
<table id="groups_list">
<thead>
<tr>
<th class="left">${_('Repository Group Name')}</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>
<hr/>
% endif
<table id="repos_list_wrap"></table>
</div>
</div>
<script>
$('#groups_list').DataTable({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 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>
|