# HG changeset patch # User Mads Kiilerich # Date 2016-11-10 16:10:41 # Node ID 2f008f0153c737d33234e6c67053edfc5b5c14cf # Parent 93a337bf46fe48d73b47aed6a752902abd1524c8 style: put all datatable widgets on one line above the table This makes tables look less messy - especially on the repogroups page where there are 2 datatables. We put all the info above the template so it is visible and stays in the same place, no matter how many entries are shown or if filtering change the number. TODO: We should probably get a wrapper around datatable instead of repeating this so many times ... diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -4560,15 +4560,32 @@ body table.dataTable thead .sorting_desc content: "\23f7"; } - -.dataTables_wrapper .dataTables_length { - float: right !important; -} - -.dataTables_wrapper .dataTables_filter { +.dataTables_wrapper .dataTables_left { float: left !important; } +.dataTables_wrapper .dataTables_right { + float: right; +} + +.dataTables_wrapper .dataTables_right > div { + padding-left: 30px; +} + +.dataTables_wrapper .dataTables_info { + clear: none; + padding-top: 1em; +} + +.dataTables_wrapper .dataTables_paginate { + padding-top: 0; +} + +.dataTables_wrapper .dataTables_paginate > a.paginate_button { + padding-top: 1em; + border: 0 !important; +} + .text-muted { color: #777777; } diff --git a/kallithea/templates/admin/my_account/my_account_repos.html b/kallithea/templates/admin/my_account/my_account_repos.html --- a/kallithea/templates/admin/my_account/my_account_repos.html +++ b/kallithea/templates/admin/my_account/my_account_repos.html @@ -16,6 +16,7 @@ {data: "action", title: "${_('Action')}", sortable: false, searchable: false} ], order: [[2, "asc"]], + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/admin/my_account/my_account_watched.html b/kallithea/templates/admin/my_account/my_account_watched.html --- a/kallithea/templates/admin/my_account/my_account_watched.html +++ b/kallithea/templates/admin/my_account/my_account_watched.html @@ -15,6 +15,7 @@ {data: "last_changeset", "orderData": 3, title: "${_('Tip')}", searchable: false}, ], order: [[2, "asc"]], + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/admin/repo_groups/repo_groups.html b/kallithea/templates/admin/repo_groups/repo_groups.html --- a/kallithea/templates/admin/repo_groups/repo_groups.html +++ b/kallithea/templates/admin/repo_groups/repo_groups.html @@ -45,6 +45,7 @@ {data: "action", title: "${_('Action')}", sortable: false, searchable: false} ], drawCallback: updateRowCountCallback($("#repo_group_count")), + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/admin/repos/repos.html b/kallithea/templates/admin/repos/repos.html --- a/kallithea/templates/admin/repos/repos.html +++ b/kallithea/templates/admin/repos/repos.html @@ -44,6 +44,7 @@ {data: "action", title: "${_('Action')}", sortable: false, searchable: false} ], drawCallback: updateRowCountCallback($("#repo_count")), + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/admin/user_groups/user_groups.html b/kallithea/templates/admin/user_groups/user_groups.html --- a/kallithea/templates/admin/user_groups/user_groups.html +++ b/kallithea/templates/admin/user_groups/user_groups.html @@ -45,6 +45,7 @@ {data: "action", title: "${_('Action')}", searchable: false, sortable: false} ], order: [[1, "asc"]], + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/admin/users/users.html b/kallithea/templates/admin/users/users.html --- a/kallithea/templates/admin/users/users.html +++ b/kallithea/templates/admin/users/users.html @@ -48,6 +48,7 @@ ], order: [[1, "asc"]], drawCallback: updateRowCountCallback($("#user_count")), + dom: '<"dataTables_left"f><"dataTables_right"ilp>t', pageLength: 100 }); diff --git a/kallithea/templates/index_base.html b/kallithea/templates/index_base.html --- a/kallithea/templates/index_base.html +++ b/kallithea/templates/index_base.html @@ -43,8 +43,8 @@ %endif + %if c.groups:
- % if c.groups:
@@ -74,15 +74,18 @@ % endfor
-
- % endif - +
+ %endif +