##// END OF EJS Templates
repositories: allow updating repository settings for users without store-in-root permissions...
repositories: allow updating repository settings for users without store-in-root permissions in case repository name didn't change. - when an user owns repository in root location, and isn't allow to create repositories in root before we failed to allow this user to update such repository settings due to this validation. We'll now check if name didn't change and in this case allow to update since this doesn't store any new data in root location.

File last commit:

r4185:d325c1c9 stable
r4415:fc1f6c1b default
Show More
index_base.mako
231 lines | 7.5 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>
dan
main-page: fixed jumping of text in grid loading....
r4185
templating: use .mako as extensions for template files.
r1282 <!-- end box / title -->
dashboard: main page grids async load....
r4148 <div id="no_grid_data" class="table" style="display: none">
dan
main-page: fixed jumping of text in grid loading....
r4185 <h2>
ui: hide empty no repos or no repo groups display. It often happens that starting...
r2447 ${_('No repositories or repositories groups exists here.')}
</h2>
</div>
dashboard: main page grids async load....
r4148
dan
main-page: fixed jumping of text in grid loading....
r4185 <div id="grid_data_loading" class="table" style="display: none">
<i class="icon-spin animate-spin"></i>
${_('loading...')}
</div>
dashboard: main page grids async load....
r4148 <div class="table">
dan
main-page: fixed jumping of text in grid loading....
r4185 <div id="groups_list_wrap" style="min-height: 200px;display: none">
dashboard: main page grids async load....
r4148 <table id="group_list_table" class="display" style="width: 100%;"></table>
</div>
</div>
<div class="table">
dan
main-page: fixed jumping of text in grid loading....
r4185 <div id="repos_list_wrap" style="min-height: 200px;display: none">
dashboard: main page grids async load....
r4148 <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>
dan
main-page: fixed jumping of text in grid loading....
r4185
templating: use .mako as extensions for template files.
r1282 <script>
dashboard: main page grids async load....
r4148 $(document).ready(function () {
dan
main-page: fixed jumping of text in grid loading....
r4185 var noRepoData = null;
var noGroupData = null;
var $gridDataLoading = $('#grid_data_loading');
templating: use .mako as extensions for template files.
r1282
dan
main-page: fixed jumping of text in grid loading....
r4185 // global show loading of hidden grids
$(document).on('preInit.dt', function (e, settings) {
$gridDataLoading.show();
});
## repo group list
dashboard: main page grids async load....
r4148 var $groupListTable = $('#group_list_table');
dan
main-page: fixed jumping of text in grid loading....
r4185 $groupListTable.on('xhr.dt', function (e, settings, json, xhr) {
$gridDataLoading.hide();
});
dashboard: main page grids async load....
r4148 $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) {
dan
main-page: fixed jumping of text in grid loading....
r4185
dashboard: main page grids async load....
r4148 // hide grid if it's empty
if (settings.fnRecordsDisplay() === 0) {
dan
main-page: fixed jumping of text in grid loading....
r4185 noGroupData = true;
dashboard: main page grids async load....
r4148 // both hidden, show no-data
dan
main-page: fixed jumping of text in grid loading....
r4185 if (noRepoData === true) {
dashboard: main page grids async load....
r4148 $('#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
dan
main-page: fixed jumping of text in grid loading....
r4185 ## repo list
dashboard: main page grids async load....
r4148 var $repoListTable = $('#repo_list_table');
dan
main-page: fixed jumping of text in grid loading....
r4185 $repoListTable.on('xhr.dt', function (e, settings, json, xhr) {
$gridDataLoading.hide();
});
dashboard: main page grids async load....
r4148 $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) {
dan
main-page: fixed jumping of text in grid loading....
r4185
dashboard: main page grids async load....
r4148 // hide grid if it's empty
if (settings.fnRecordsDisplay() == 0) {
dan
main-page: fixed jumping of text in grid loading....
r4185 noRepoData = true;
dashboard: main page grids async load....
r4148 // both hidden, show no-data
dan
main-page: fixed jumping of text in grid loading....
r4185 if (noGroupData === true) {
dashboard: main page grids async load....
r4148 $('#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
});
templating: use .mako as extensions for template files.
r1282 </script>
</%def>