| Línea 14... |
Línea 14... |
| 14 |
$allowDelete = $acl->isAllowed($roleName, 'publications/posts/delete') ? 1 : 0;
|
14 |
$allowDelete = $acl->isAllowed($roleName, 'publications/posts/delete') ? 1 : 0;
|
| Línea 15... |
Línea 15... |
| 15 |
|
15 |
|
| 16 |
$typeURL = \LeadersLinked\Model\Page::TYPE_URL;
|
16 |
$typeURL = \LeadersLinked\Model\Page::TYPE_URL;
|
| Línea 17... |
Línea 17... |
| 17 |
$typePAGE = \LeadersLinked\Model\Page::TYPE_PAGE;
|
17 |
$typePAGE = \LeadersLinked\Model\Page::TYPE_PAGE;
|
| 18 |
|
18 |
|
| Línea 19... |
Línea 19... |
| 19 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
19 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
|
| Línea 20... |
Línea 20... |
| 20 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
20 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
|
| 21 |
|
21 |
|
| 22 |
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
|
22 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
|
| Línea 23... |
Línea 23... |
| 23 |
|
23 |
|
| 24 |
|
24 |
|
| Línea 25... |
Línea 25... |
| 25 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
25 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
|
| 26 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
26 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
|
| 27 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
27 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
|
| 28 |
|
28 |
|
| Línea 29... |
Línea 29... |
| 29 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
|
29 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
|
| 30 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
|
30 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
|
| Línea 31... |
Línea 31... |
| 31 |
|
31 |
|
| 32 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
|
32 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
|
| 33 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
|
33 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
|
| 34 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
|
34 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
|
| 35 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
|
35 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
|
| 36 |
|
36 |
|
| Línea 37... |
Línea 37... |
| 37 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
|
37 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/css/fileinput.min.css'));
|
| 38 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
38 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
| 39 |
|
39 |
|
| Línea 40... |
Línea 40... |
| 40 |
|
40 |
|
| 41 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
|
41 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/assets/vendors/piexif.js'));
|
| Línea 42... |
Línea -... |
| 42 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
|
- |
|
| 43 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
|
- |
|
| Línea 44... |
Línea -... |
| 44 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
|
- |
|
| 45 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
|
- |
|
| 46 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
- |
|
| Línea 47... |
Línea -... |
| 47 |
|
- |
|
| Línea -... |
Línea 42... |
| - |
|
42 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/assets/vendors/sortable.js'));
|
| - |
|
43 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/fileinput.js'));
|
| - |
|
44 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
|
| - |
|
45 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fas/theme.js'));
|
| - |
|
46 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
| - |
|
47 |
|
| 48 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
48 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
|
| 49 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
49 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
|
| 50 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
50 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
|
| Línea 51... |
Línea 51... |
| 51 |
|
51 |
|
| Línea 195... |
Línea 195... |
| 195 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
195 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
| 196 |
},
|
196 |
},
|
| 197 |
},
|
197 |
},
|
| 198 |
'drawCallback': function( settings ) {
|
198 |
'drawCallback': function( settings ) {
|
| 199 |
NProgress.done();
|
199 |
NProgress.done();
|
| 200 |
$('button.btn-delete').confirmation({
|
- |
|
| 201 |
rootSelector: 'button.btn-delete',
|
- |
|
| 202 |
title : 'LABEL_ARE_YOU_SURE',
|
- |
|
| 203 |
singleton : true,
|
- |
|
| 204 |
btnOkLabel: 'LABEL_YES',
|
- |
|
| 205 |
btnCancelLabel: 'LABEL_NO',
|
- |
|
| 206 |
onConfirm: function(value) {
|
- |
|
| 207 |
action = $(this).data('href');
|
- |
|
| 208 |
NProgress.start();
|
- |
|
| 209 |
$.ajax({
|
- |
|
| 210 |
'dataType' : 'json',
|
- |
|
| 211 |
'accept' : 'application/json',
|
- |
|
| - |
|
200 |
|
| 212 |
'method' : 'post',
|
- |
|
| 213 |
'url' : action,
|
- |
|
| 214 |
}).done(function(response) {
|
- |
|
| 215 |
if(response['success']) {
|
- |
|
| 216 |
$.fn.showSuccess(response['data']);
|
- |
|
| 217 |
gridTable.api().ajax.reload(null, false);
|
- |
|
| 218 |
} else {
|
- |
|
| 219 |
$.fn.showError(response['data']);
|
- |
|
| 220 |
}
|
- |
|
| 221 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
- |
|
| 222 |
$.fn.showError(textStatus);
|
- |
|
| 223 |
}).always(function() {
|
- |
|
| 224 |
NProgress.done();
|
- |
|
| 225 |
});
|
- |
|
| 226 |
},
|
- |
|
| 227 |
});
|
- |
|
| 228 |
},
|
201 |
},
|
| 229 |
'aoColumns': [
|
202 |
'aoColumns': [
|
| 230 |
{ 'mDataProp': 'title' },
|
203 |
{ 'mDataProp': 'title' },
|
| 231 |
{ 'mDataProp': 'date' },
|
204 |
{ 'mDataProp': 'date' },
|
| 232 |
{ 'mDataProp': 'active' },
|
205 |
{ 'mDataProp': 'active' },
|
| Línea 237... |
Línea 210... |
| 237 |
'targets': 0,
|
210 |
'targets': 0,
|
| 238 |
'className' : 'text-vertical-middle',
|
211 |
'className' : 'text-vertical-middle',
|
| 239 |
'render' : function ( data, type, row ) {
|
212 |
'render' : function ( data, type, row ) {
|
| 240 |
var s = data ;
|
213 |
var s = data ;
|
| 241 |
if(row['actions']['link_view'] ) {
|
214 |
if(row['actions']['link_view'] ) {
|
| 242 |
s = s + '<br><button class="btn btn-sm btn-default btn-view" data-href="' + row['actions']['link_view']+ '" data-toggle="tooltip" title="LABEL_POST"><i class="fa fa-external-link"></i></button> <br>';
|
215 |
s = s + '<br><button class="btn btn-light btn-view" data-href="' + row['actions']['link_view']+ '" data-toggle="tooltip" title="LABEL_POST"><i class="fa fa-external-link"></i></button> <br>';
|
| 243 |
}
|
216 |
}
|
| 244 |
return s;
|
217 |
return s;
|
| 245 |
}
|
218 |
}
|
| 246 |
},
|
219 |
},
|
| 247 |
{
|
220 |
{
|
| Línea 252... |
Línea 225... |
| 252 |
'targets': -2,
|
225 |
'targets': -2,
|
| 253 |
'orderable': false,
|
226 |
'orderable': false,
|
| 254 |
'className' : 'text-center',
|
227 |
'className' : 'text-center',
|
| 255 |
'render' : function ( data, type, row ) {
|
228 |
'render' : function ( data, type, row ) {
|
| Línea 256... |
Línea 229... |
| 256 |
|
229 |
|
| 257 |
checked = data == 'a' ? ' checked="checked" ' : '';
|
230 |
checked = data == 'a' ? 'checked' : '';
|
| 258 |
return '<div class="checkbox checkbox-success">' +
|
231 |
return '<div class="form-check">' +
|
| 259 |
'<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
|
232 |
'<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
|
| 260 |
'<label ></label></div>';
|
233 |
'<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
|
| 261 |
}
|
234 |
}
|
| 262 |
},
|
235 |
},
|
| 263 |
{
|
236 |
{
|
| 264 |
'targets': -1,
|
237 |
'targets': -1,
|
| Línea 526... |
Línea 499... |
| 526 |
var href = $(this).data('href');
|
499 |
var href = $(this).data('href');
|
| 527 |
window.open(href, '_blank');
|
500 |
window.open(href, '_blank');
|
| Línea 528... |
Línea 501... |
| 528 |
|
501 |
|
| Línea -... |
Línea 502... |
| - |
|
502 |
});
|
| - |
|
503 |
|
| - |
|
504 |
$('body').on('click', 'button.btn-delete', function(e) {
|
| - |
|
505 |
e.preventDefault();
|
| - |
|
506 |
var action = $(this).data('href');
|
| - |
|
507 |
|
| - |
|
508 |
|
| - |
|
509 |
swal.fire({
|
| - |
|
510 |
title: 'LABEL_ARE_YOU_SURE',
|
| - |
|
511 |
icon: 'question',
|
| - |
|
512 |
cancelButtonText: 'LABEL_NO',
|
| - |
|
513 |
showCancelButton: true,
|
| - |
|
514 |
confirmButtonText: 'LABEL_YES'
|
| - |
|
515 |
}).then((result) => {
|
| - |
|
516 |
if (result.isConfirmed) {
|
| - |
|
517 |
|
| - |
|
518 |
NProgress.start();
|
| - |
|
519 |
$.ajax({
|
| - |
|
520 |
'dataType' : 'json',
|
| - |
|
521 |
'accept' : 'application/json',
|
| - |
|
522 |
'method' : 'post',
|
| - |
|
523 |
'url' : action,
|
| - |
|
524 |
}).done(function(response) {
|
| - |
|
525 |
if(response['success']) {
|
| - |
|
526 |
$.fn.showSuccess(response['data']);
|
| - |
|
527 |
gridTable.api().ajax.reload(null, false);
|
| - |
|
528 |
} else {
|
| - |
|
529 |
$.fn.showError(response['data']);
|
| - |
|
530 |
}
|
| - |
|
531 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
| - |
|
532 |
$.fn.showError(textStatus);
|
| - |
|
533 |
}).always(function() {
|
| - |
|
534 |
NProgress.done();
|
| - |
|
535 |
});
|
| - |
|
536 |
}
|
| Línea 529... |
Línea 537... |
| 529 |
});
|
537 |
});
|
| 530 |
|
538 |
});
|
| 531 |
|
539 |
|
| Línea 667... |
Línea 675... |
| 667 |
<div class="modal-content">
|
675 |
<div class="modal-content">
|
| Línea 668... |
Línea 676... |
| 668 |
|
676 |
|
| 669 |
<!-- Modal Header -->
|
677 |
<!-- Modal Header -->
|
| 670 |
<div class="modal-header">
|
678 |
<div class="modal-header">
|
| 671 |
<h4 class="modal-title">LABEL_ADD</h4>
|
679 |
<h4 class="modal-title">LABEL_ADD</h4>
|
| 672 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
680 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
|
| Línea 673... |
Línea 681... |
| 673 |
</div>
|
681 |
</div>
|
| 674 |
|
682 |
|
| 675 |
<!-- Modal body -->
|
683 |
<!-- Modal body -->
|
| Línea 768... |
Línea 776... |
| 768 |
<?php echo $this->form()->closeTag($form); ?>
|
776 |
<?php echo $this->form()->closeTag($form); ?>
|
| 769 |
</div>
|
777 |
</div>
|
| Línea 770... |
Línea 778... |
| 770 |
|
778 |
|
| 771 |
<!-- Modal footer -->
|
779 |
<!-- Modal footer -->
|
| 772 |
<div class="modal-footer">
|
780 |
<div class="modal-footer">
|
| 773 |
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
781 |
<button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
|
| Línea 774... |
Línea 782... |
| 774 |
</div>
|
782 |
</div>
|
| 775 |
|
783 |
|
| 776 |
</div>
|
784 |
</div>
|
| Línea 785... |
Línea 793... |
| 785 |
<div class="modal-content">
|
793 |
<div class="modal-content">
|
| Línea 786... |
Línea 794... |
| 786 |
|
794 |
|
| 787 |
<!-- Modal Header -->
|
795 |
<!-- Modal Header -->
|
| 788 |
<div class="modal-header">
|
796 |
<div class="modal-header">
|
| 789 |
<h4 class="modal-title">LABEL_EDIT</h4>
|
797 |
<h4 class="modal-title">LABEL_EDIT</h4>
|
| 790 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
798 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
|
| Línea 791... |
Línea 799... |
| 791 |
</div>
|
799 |
</div>
|
| 792 |
|
800 |
|
| 793 |
<!-- Modal body -->
|
801 |
<!-- Modal body -->
|
| Línea 886... |
Línea 894... |
| 886 |
<?php echo $this->form()->closeTag($form); ?>
|
894 |
<?php echo $this->form()->closeTag($form); ?>
|
| 887 |
</div>
|
895 |
</div>
|
| Línea 888... |
Línea 896... |
| 888 |
|
896 |
|
| 889 |
<!-- Modal footer -->
|
897 |
<!-- Modal footer -->
|
| 890 |
<div class="modal-footer">
|
898 |
<div class="modal-footer">
|
| 891 |
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
899 |
<button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
|
| Línea 892... |
Línea 900... |
| 892 |
</div>
|
900 |
</div>
|
| 893 |
|
901 |
|
| 894 |
</div>
|
902 |
</div>
|
| 895 |
</div>
|
903 |
</div>
|