##// END OF EJS Templates
gunicorn: updated config template with better compatability with configparser
gunicorn: updated config template with better compatability with configparser

File last commit:

r4150:554d4203 default
r4167:a57c25da default
Show More
index_base.mako
223 lines | 7.4 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%inherit file="/base/base.mako"/>
dan
search: new UI for search, and repo group context search...
r3442
<%def name="menu_bar_subnav()">
% if c.repo_group:
${self.repo_group_menu(active='home')}
% endif
</%def>
templating: use .mako as extensions for template files.
r1282 <%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
</div>
<!-- end box / title -->
dashboard: main page grids async load....
r4148 <div id="no_grid_data" class="table" style="display: none">
ui: hide empty no repos or no repo groups display. It often happens that starting...
r2447 <h2 class="no-object-border">
${_('No repositories or repositories groups exists here.')}
</h2>
</div>
dashboard: main page grids async load....
r4148
<div class="table">
<div id="groups_list_wrap" style="min-height: 200px;">
<table id="group_list_table" class="display" style="width: 100%;"></table>
</div>
</div>
<div class="table">
<div id="repos_list_wrap" style="min-height: 200px;">
<table id="repo_list_table" class="display" style="width: 100%;"></table>
</div>
</div>
ui: hide empty no repos or no repo groups display. It often happens that starting...
r2447
templating: use .mako as extensions for template files.
r1282 </div>
<script>
dashboard: main page grids async load....
r4148 $(document).ready(function () {
templating: use .mako as extensions for template files.
r1282
ui: hide empty no repos or no repo groups display. It often happens that starting...
r2447 // repo group list
dashboard: main page grids async load....
r4148 var $groupListTable = $('#group_list_table');
$groupListTable.DataTable({
processing: true,
serverSide: true,
ajax: {
"url": "${h.route_path('main_page_repo_groups_data')}",
"data": function (d) {
% if c.repo_group:
d.repo_group_id = ${c.repo_group.group_id}
% endif
}
},
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
order: [[0, "asc"]],
columns: [
{
data: {
"_": "name",
grids: columns and sorting fixes
r4150 "sort": "name"
dashboard: main page grids async load....
r4148 }, title: "${_('Name')}", className: "truncate-wrap td-grid-name"
},
grids: columns and sorting fixes
r4150 {
data: 'menu', "bSortable": false, className: "quick_repo_menu"
},
dashboard: main page grids async load....
r4148 {
data: {
"_": "desc",
"sort": "desc"
}, title: "${_('Description')}", className: "td-description"
},
{
data: {
"_": "last_change",
grids: columns and sorting fixes
r4150 "sort": "last_change",
dashboard: main page grids async load....
r4148 "type": Number
}, title: "${_('Last Change')}", className: "td-time"
},
{
data: {
"_": "last_changeset",
"sort": "last_changeset_raw",
"type": Number
grids: columns and sorting fixes
r4150 }, title: "", className: "td-hash", orderable: false
dashboard: main page grids async load....
r4148 },
{
data: {
"_": "owner",
"sort": "owner"
}, title: "${_('Owner')}", className: "td-user"
}
],
language: {
paginate: DEFAULT_GRID_PAGINATION,
sProcessing: _gettext('loading...'),
emptyTable: _gettext("No repository groups present.")
},
"drawCallback": function (settings, json) {
// hide grid if it's empty
if (settings.fnRecordsDisplay() === 0) {
$('#groups_list_wrap').hide();
// both hidden, show no-data
if ($('#repos_list_wrap').is(':hidden')) {
$('#no_grid_data').show();
}
} else {
$('#groups_list_wrap').show();
}
timeagoActivate();
tooltipActivate();
quick_repo_menu();
// hide pagination for single page
if (settings._iDisplayLength >= settings.fnRecordsDisplay()) {
$(settings.nTableWrapper).find('.dataTables_paginate').hide();
}
},
templating: use .mako as extensions for template files.
r1282 });
dashboard: main page grids async load....
r4148
$groupListTable.on('xhr.dt', function (e, settings, json, xhr) {
$groupListTable.css('opacity', 1);
});
$groupListTable.on('preXhr.dt', function (e, settings, data) {
$groupListTable.css('opacity', 0.3);
});
templating: use .mako as extensions for template files.
r1282
dashboard: main page grids async load....
r4148 ## // repo list
var $repoListTable = $('#repo_list_table');
$repoListTable.DataTable({
processing: true,
serverSide: true,
ajax: {
"url": "${h.route_path('main_page_repos_data')}",
"data": function (d) {
% if c.repo_group:
d.repo_group_id = ${c.repo_group.group_id}
% endif
}
},
order: [[0, "asc"]],
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
columns: [
{
data: {
"_": "name",
grids: columns and sorting fixes
r4150 "sort": "name"
dashboard: main page grids async load....
r4148 }, title: "${_('Name')}", className: "truncate-wrap td-grid-name"
},
{
data: 'menu', "bSortable": false, className: "quick_repo_menu"
},
{
data: {
"_": "desc",
"sort": "desc"
}, title: "${_('Description')}", className: "td-description"
},
{
data: {
"_": "last_change",
grids: columns and sorting fixes
r4150 "sort": "last_change",
dashboard: main page grids async load....
r4148 "type": Number
grids: columns and sorting fixes
r4150 }, title: "${_('Last Change')}", className: "td-time"
dashboard: main page grids async load....
r4148 },
{
data: {
"_": "last_changeset",
"sort": "last_changeset_raw",
"type": Number
grids: columns and sorting fixes
r4150 }, title: "${_('Commit')}", className: "td-hash", orderable: false
dashboard: main page grids async load....
r4148 },
{
data: {
"_": "owner",
"sort": "owner"
}, title: "${_('Owner')}", className: "td-user"
}
],
language: {
paginate: DEFAULT_GRID_PAGINATION,
sProcessing: _gettext('loading...'),
emptyTable: _gettext("No repositories present.")
},
"drawCallback": function (settings, json) {
// hide grid if it's empty
if (settings.fnRecordsDisplay() == 0) {
$('#repos_list_wrap').hide()
// both hidden, show no-data
if ($('#groups_list_wrap').is(':hidden')) {
$('#no_grid_data').show()
}
} else {
$('#repos_list_wrap').show()
}
timeagoActivate();
tooltipActivate();
quick_repo_menu();
// hide pagination for single page
if (settings._iDisplayLength >= settings.fnRecordsDisplay()) {
$(settings.nTableWrapper).find('.dataTables_paginate').hide();
}
},
templating: use .mako as extensions for template files.
r1282 });
dashboard: main page grids async load....
r4148
$repoListTable.on('xhr.dt', function (e, settings, json, xhr) {
$repoListTable.css('opacity', 1);
});
ui: hide empty no repos or no repo groups display. It often happens that starting...
r2447
dashboard: main page grids async load....
r4148 $repoListTable.on('preXhr.dt', function (e, settings, data) {
$repoListTable.css('opacity', 0.3);
});
});
templating: use .mako as extensions for template files.
r1282 </script>
</%def>