Fix my publications UI see BT#17508

pull/3354/head
Julio Montoya 5 years ago
parent 7a2629e9dd
commit a098c38dd9
  1. 27
      main/template/default/layout/main.js.tpl
  2. 18
      main/template/default/work/publications.tpl
  3. 3
      main/work/publications.php
  4. 22
      main/work/work.lib.php

@ -63,18 +63,30 @@ $(function() {
globalModal.find('.modal-header').hide();
}
var contentUrl = this.href;
var loadModalContent = $.get(contentUrl);
var self = $(this);
var blockDiv = $(this).attr('data-block-closing');
if (blockDiv != '') {
/*globalModal.on('hidden.bs.modal', function () {
$('#' + blockDiv + ' :input').attr('disabled', 'true');
});*/
globalModal.attr('data-backdrop', 'static');
globalModal.attr('data-keyboard', 'false');
}
var contentUrl = this.href;
var self = $(this);
if (contentUrl == 'javascript:void(0);') {
var
modalSize = self.data('size'),
modalWidth = self.data('width'),
modalTitle = self.data('title');
modalContent = self.data('content');
globalModal.find('.modal-title').text(modalTitle);
globalModal.find('.modal-body').html(modalContent);
globalModal.modal('show');
return true;
}
if (contentUrl) {
var loadModalContent = $.get(contentUrl);
$.when(loadModalContent).done(function (modalContent) {
var modalDialog = globalModal.find('.modal-dialog'),
@ -100,6 +112,7 @@ $(function() {
globalModal.find('.modal-body').html(modalContent);
globalModal.modal('show');
});
}
});
// Expands an image modal

@ -1,13 +1,17 @@
{% extends 'layout/layout_1_col.tpl'|get_template %}
{% import 'default/macro/macro.tpl' as display %}
{% block content %}
{{ introduction_message }}
<a
href="javascript:void(0);"
class="ajax"
data-title="{{ intro_title | escape}}"
data-content="{{ intro_content | escape }}"
>
<h4>{{ intro_title }}</h4>
</a>
<h3>{{ 'PendingStudentPublications' | get_lang }}</h3>
{{ display.collapse('PendingStudentPublications', 'PendingStudentPublications' | get_lang, table, false, true) }}
{{ table }}
<h3>{{ 'StudentPublicationsSent' | get_lang }}</h3>
{{ table_with_results }}
{{ display.collapse('StudentPublicationsSent', 'StudentPublicationsSent' | get_lang, table_with_results, false, false) }}
{% endblock %}

@ -13,7 +13,8 @@ $htmlHeadXtra[] = api_get_jqgrid_js();
$tpl = new Template(get_lang('StudentPublications'));
$tpl->assign('introduction_message', Display::return_message(get_lang('StudentPublicationsIntro')));
$tpl->assign('intro_title', get_lang('MyStudentPublicationsTitle'));
$tpl->assign('intro_content', Display::return_message(get_lang('MyStudentPublicationsExplanation')));
$tpl->assign('table', showStudentAllWorkGrid(0));
$tpl->assign('table_with_results', showStudentAllWorkGrid(1));

@ -551,14 +551,26 @@ function showStudentAllWorkGrid($withResults = 1)
}
$columnModel = [
['name' => 'type', 'index' => 'type', 'width' => '30', 'align' => 'center', 'sortable' => 'false'],
['name' => 'title', 'index' => 'title', 'width' => '250', 'align' => 'left'],
['name' => 'expires_on', 'index' => 'expires_on', 'width' => '80', 'align' => 'center', 'sortable' => 'false'],
['name' => 'type', 'index' => 'type', 'width' => '50', 'align' => 'center', 'sortable' => 'false'],
['name' => 'title', 'index' => 'title', 'width' => '600', 'align' => 'left'],
['name' => 'expires_on', 'index' => 'expires_on', 'width' => '125', 'align' => 'center', 'sortable' => 'false'],
];
if ($withResults) {
$columnModel[] = ['name' => 'feedback', 'index' => 'feedback', 'width' => '80', 'align' => 'center', 'sortable' => 'false'];
$columnModel[] = ['name' => 'last_upload', 'index' => 'feedback', 'width' => '125', 'align' => 'center', 'sortable' => 'false'];
$columnModel[] = [
'name' => 'feedback',
'index' => 'feedback',
'width' => '150',
'align' => 'center',
'sortable' => 'false',
];
$columnModel[] = [
'name' => 'last_upload',
'index' => 'last_upload',
'width' => '150',
'align' => 'center',
'sortable' => 'false',
];
}
$params = [

Loading…
Cancel
Save