Mercurial > kallithea
changeset 6251:d3930bd0c14a
templates: cleanup index page and make repo group table a 'DataTable' as well
The repo group table could be data based like the repo table instead of
wrapping an existing table - that is not done here and could be done later.
The unused reference to _dt_elements.html is removed.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Thu, 22 Sep 2016 21:06:44 +0200 |
parents | 9f4d95780f59 |
children | e33b17db388d |
files | kallithea/templates/index_base.html |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/index_base.html Mon Sep 19 20:36:01 2016 +0200 +++ b/kallithea/templates/index_base.html Thu Sep 22 21:06:44 2016 +0200 @@ -39,9 +39,9 @@ <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> + <th class="left">${_('Repository Group Name')}</th> + <th class="left">${_('Description')}</th> + ##<th class="left">${_('Number of Repositories')}</th> </tr> </thead> @@ -64,21 +64,22 @@ % endfor </table> </div> - <div style="height: 20px"></div> + <hr/> % endif - <%cnt=0%> - <%namespace name="dt" file="/data_table/_dt_elements.html"/> + <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: "${_('Name')}", data: "name", orderData: 1, render: { + {title: "${_('Repository Name')}", data: "name", orderData: 1, render: { filter: function(data) { return $(data).find(".dt_repo_name").text(); }