Mercurial > kallithea
view kallithea/templates/admin/repo_groups/repo_groups.html @ 6905:ff5c4b26461a
templates: back out the DataTables paging disabling from c5bff92d5084
Lessons learned:
* It was not sufficiently tested with gravatars.
* It was not sufficiently tested on Chrome - Firefox seems to handle some big
pages better.
* It is unclear how big amounts of data we want to optimize for, but this
regressed too much for some cases.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 02 Oct 2017 23:44:49 +0200 |
parents | c5bff92d5084 |
children | 2d8f2a419edb |
line wrap: on
line source
## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%block name="title"> ${_('Repository Groups Administration')} </%block> <%def name="breadcrumbs_links()"> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="repo_group_count">0</span> ${_('Repository Groups')} </%def> <%block name="header_menu"> ${self.menu('admin')} </%block> <%def name="main()"> <div class="panel panel-primary"> <div class="panel-heading clearfix"> <div class="pull-left"> ${self.breadcrumbs()} </div> <div class="pull-right"> %if h.HasPermissionAny('hg.admin')(): <a href="${h.url('new_repos_group')}" class="btn btn-success btn-xs"><i class="icon-plus"></i> ${_('Add Repository Group')}</a> %endif </div> </div> <div class="panel-body"> <table class="table" id="datatable_list_wrap" width="100%"></table> </div> </div> <script> var data = ${h.js(c.data)}; var myDataTable = $("#datatable_list_wrap").DataTable({ data: data.records, columns: [ {data: "raw_name", visible: false, searchable: false}, {data: "group_name", orderData: 0, title: ${h.jshtml(_('Name'))}}, {data: "desc", title: ${h.jshtml(_('Description'))}, searchable: false}, {data: "repos", title: ${h.jshtml(_('Number of Top-level Repositories'))}, searchable: false}, {data: "owner", title: ${h.jshtml(_('Owner'))}, searchable: false}, {data: "action", title: ${h.jshtml(_('Action'))}, sortable: false, searchable: false} ], drawCallback: updateRowCountCallback($("#repo_group_count")), dom: '<"dataTables_left"f><"dataTables_right"ip>t', pageLength: 100 }); </script> </%def>