Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16798 | Rev 16845 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16798 Rev 16822
Línea 10... Línea 10...
10
$allowEdit = $acl->isAllowed($roleName, 'microlearning/students/edit') ? 1 : 0;
10
$allowEdit = $acl->isAllowed($roleName, 'microlearning/students/edit') ? 1 : 0;
11
$allowTimeline = $acl->isAllowed($roleName, 'microlearning/students/timeline') ? 1 : 0;
11
$allowTimeline = $acl->isAllowed($roleName, 'microlearning/students/timeline') ? 1 : 0;
12
$allowChangePassword    = $acl->isAllowed($roleName, 'microlearning/students/change-password') ? 1 : 0;
12
$allowChangePassword    = $acl->isAllowed($roleName, 'microlearning/students/change-password') ? 1 : 0;
13
$allowUnblock           = $acl->isAllowed($roleName, 'microlearning/students/unblock') ? 1 : 0;
13
$allowUnblock           = $acl->isAllowed($roleName, 'microlearning/students/unblock') ? 1 : 0;
Línea 14... Línea 14...
14
 
14
 
15
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
15
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 16... Línea -...
16
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
-
 
Línea 17... Línea -...
17
 
-
 
18
 
-
 
19
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
-
 
Línea -... Línea 16...
-
 
16
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
20
 
17
 
21
 
18
 
Línea 22... Línea -...
22
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
-
 
23
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
19
 
24
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
-
 
25
 
20
 
Línea 26... Línea 21...
26
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
21
 
27
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
-
 
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
Línea -... Línea 25...
-
 
25
 
-
 
26
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
-
 
27
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
28
 
28
 
29
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
29
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
30
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 31... Línea 31...
31
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
32
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
33
 
33
 
34
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
34
 
Línea 189... Línea 189...
189
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
189
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
190
                },
190
                },
191
            },
191
            },
192
            'drawCallback': function( settings ) {
192
            'drawCallback': function( settings ) {
193
                NProgress.done();
193
                NProgress.done();
194
                $('button.btn-unblock').confirmation({
-
 
195
                    rootSelector: 'button.btn-unblock',
-
 
196
                    title : 'LABEL_ARE_YOU_SURE',
-
 
197
                    singleton : true,
-
 
198
                    btnOkLabel: 'LABEL_YES',
-
 
199
                    btnCancelLabel: 'LABEL_NO',
-
 
200
                    onConfirm: function(value) {
-
 
201
                        action = $(this).data('href');
-
 
202
                        NProgress.start();
-
 
203
                        $.ajax({
-
 
204
                            'dataType'  : 'json',
-
 
205
                            'accept'    : 'application/json',
-
 
-
 
194
                
206
                            'method'    : 'post',
-
 
207
                            'url'       :  action,
-
 
208
                        }).done(function(response) {
-
 
209
                            if(response['success']) {
-
 
210
                                $.fn.showSuccess(response['data']);
-
 
211
                                gridTable.api().ajax.reload(null, false);
-
 
212
                            } else {
-
 
213
                                $.fn.showError(response['data']);
-
 
214
                            }
-
 
215
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
216
                            $.fn.showError(textStatus);
-
 
217
                        }).always(function() {
-
 
218
                            NProgress.done();
-
 
219
                        });
-
 
220
                    },
-
 
221
                });
-
 
222
            },
195
            },
223
            'aoColumns': [
196
            'aoColumns': [
224
                { 'mDataProp': 'first_name' },
197
                { 'mDataProp': 'first_name' },
225
                { 'mDataProp': 'last_name' },
198
                { 'mDataProp': 'last_name' },
226
                { 'mDataProp': 'email' },
199
                { 'mDataProp': 'email' },
Línea 419... Línea 392...
419
            $('#modalExtendUser').modal('hide');
392
            $('#modalExtendUser').modal('hide');
420
            $('#modalTimeline').modal('hide');
393
            $('#modalTimeline').modal('hide');
421
            $('#modalChangePassword').modal('hide');
394
            $('#modalChangePassword').modal('hide');
422
        });
395
        });
Línea -... Línea 396...
-
 
396
 
-
 
397
    $('body').on('click', 'button.btn-unblock', function(e) { 
-
 
398
        e.preventDefault();
-
 
399
        var action = $(this).data('href');
-
 
400
 
-
 
401
 
-
 
402
          swal.fire({
-
 
403
            title: 'LABEL_ARE_YOU_SURE',
-
 
404
            icon: 'question',
-
 
405
            cancelButtonText: 'LABEL_NO',
-
 
406
            showCancelButton: true,
-
 
407
            confirmButtonText: 'LABEL_YES'
-
 
408
          }).then((result) => {
-
 
409
            if (result.isConfirmed) {
-
 
410
 
-
 
411
                    NProgress.start();
-
 
412
                    $.ajax({
-
 
413
                        'dataType'  : 'json',
-
 
414
                        'accept'    : 'application/json',
-
 
415
                        'method'    : 'post',
-
 
416
                        'url'       :  action,
-
 
417
                    }).done(function(response) {
-
 
418
                        if(response['success']) {
-
 
419
                            $.fn.showSuccess(response['data']);
-
 
420
                            gridTable.api().ajax.reload(null, false);
-
 
421
                        } else {
-
 
422
                            $.fn.showError(response['data']);
-
 
423
                        }
-
 
424
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
425
                        $.fn.showError(textStatus);
-
 
426
                    }).always(function() {
-
 
427
                        NProgress.done();
-
 
428
                    });
-
 
429
            }
-
 
430
       });
Línea 423... Línea 431...
423
 
431
    });
424
   
432
   
Línea 669... Línea 677...
669
    	<div class="modal-content">
677
    	<div class="modal-content">
Línea 670... Línea 678...
670
 
678
 
671
            <!-- Modal Header -->
679
            <!-- Modal Header -->
672
      		<div class="modal-header">
680
      		<div class="modal-header">
673
        		<h4 class="modal-title">LABEL_EDIT</h4>
681
        		<h4 class="modal-title">LABEL_EDIT</h4>
674
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
682
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
Línea 675... Línea 683...
675
      		</div>
683
      		</div>
676
 
684
 
677
            <!-- Modal body -->
685
            <!-- Modal body -->
Línea 781... Línea 789...
781
     	      		<?php echo $this->form()->closeTag($form); ?>
789
     	      		<?php echo $this->form()->closeTag($form); ?>
782
      		</div>
790
      		</div>
Línea 783... Línea 791...
783
 
791
 
784
            <!-- Modal footer -->
792
            <!-- Modal footer -->
785
      		<div class="modal-footer">
793
      		<div class="modal-footer">
786
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
794
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
Línea 787... Línea 795...
787
      		</div>
795
      		</div>
788
 
796
 
789
    	</div>
797
    	</div>
Línea 796... Línea 804...
796
    	<div class="modal-content">
804
    	<div class="modal-content">
Línea 797... Línea 805...
797
 
805
 
798
            <!-- Modal Header -->
806
            <!-- Modal Header -->
799
      		<div class="modal-header">
807
      		<div class="modal-header">
800
        		<h4 class="modal-title">LABEL_TIMELINE</h4>
808
        		<h4 class="modal-title">LABEL_TIMELINE</h4>
801
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
809
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
Línea 802... Línea 810...
802
      		</div>
810
      		</div>
803
 
811
 
804
            <!-- Modal body -->
812
            <!-- Modal body -->
Línea 811... Línea 819...
811
               	</div>    		
819
               	</div>    		
812
      		</div>
820
      		</div>
Línea 813... Línea 821...
813
 
821
 
814
            <!-- Modal footer -->
822
            <!-- Modal footer -->
815
      		<div class="modal-footer">
823
      		<div class="modal-footer">
816
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
824
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
Línea 817... Línea 825...
817
      		</div>
825
      		</div>
818
 
826
 
819
    	</div>
827
    	</div>
Línea 826... Línea 834...
826
    	<div class="modal-content">
834
    	<div class="modal-content">
Línea 827... Línea 835...
827
 
835
 
828
            <!-- Modal Header -->
836
            <!-- Modal Header -->
829
      		<div class="modal-header">
837
      		<div class="modal-header">
830
        		<h4 class="modal-title">LABEL_USERS</h4>
838
        		<h4 class="modal-title">LABEL_USERS</h4>
831
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
839
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
Línea 832... Línea 840...
832
      		</div>
840
      		</div>
833
 
841
 
834
            <!-- Modal body -->
842
            <!-- Modal body -->
Línea 903... Línea 911...
903
     	      		<?php echo $this->form()->closeTag($form); ?>
911
     	      		<?php echo $this->form()->closeTag($form); ?>
904
      		</div>
912
      		</div>
Línea 905... Línea 913...
905
 
913
 
906
            <!-- Modal footer -->
914
            <!-- Modal footer -->
907
      		<div class="modal-footer">
915
      		<div class="modal-footer">
908
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
916
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
Línea 909... Línea 917...
909
      		</div>
917
      		</div>
910
 
918
 
911
    	</div>
919
    	</div>