Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16817 Rev 16822
Línea 13... Línea 13...
13
$allowEdit      = $acl->isAllowed($roleName, 'jobs-description/behaviors/edit') ? 1 : 0;
13
$allowEdit      = $acl->isAllowed($roleName, 'jobs-description/behaviors/edit') ? 1 : 0;
14
$allowDelete    = $acl->isAllowed($roleName, 'jobs-description/behaviors/delete') ? 1 : 0;
14
$allowDelete    = $acl->isAllowed($roleName, 'jobs-description/behaviors/delete') ? 1 : 0;
15
$allowImport    = $acl->isAllowed($roleName, 'jobs-description/behaviors/import') ? 1 : 0;
15
$allowImport    = $acl->isAllowed($roleName, 'jobs-description/behaviors/import') ? 1 : 0;
Línea 16... Línea 16...
16
 
16
 
17
 
17
 
Línea 18... Línea 18...
18
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
18
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
19
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
20
 
20
 
Línea 21... Línea 21...
21
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
Línea 22... Línea 22...
22
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
23
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
Línea 24... Línea 24...
24
 
24
 
25
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
25
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
Línea 26... Línea -...
26
 
-
 
27
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
-
 
Línea -... Línea 26...
-
 
26
 
-
 
27
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
28
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
28
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 29... Línea 29...
29
 
29
 
Línea 30... Línea 30...
30
 
30
 
31
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
31
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
Línea 149... Línea 149...
149
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
149
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
150
                },
150
                },
151
            },
151
            },
152
            'drawCallback': function( settings ) {
152
            'drawCallback': function( settings ) {
153
                NProgress.done();
153
                NProgress.done();
154
                $('button.btn-delete').confirmation({
-
 
155
                    rootSelector: 'button.btn-delete',
-
 
156
                    title : 'LABEL_ARE_YOU_SURE',
-
 
157
                    singleton : true,
-
 
158
                    btnOkLabel: 'LABEL_YES',
-
 
159
                    btnCancelLabel: 'LABEL_NO',
-
 
160
                    onConfirm: function(value) {
-
 
161
                        action = $(this).data('href');
-
 
162
                        NProgress.start();
-
 
163
                        $.ajax({
-
 
164
                            'dataType'  : 'json',
-
 
165
                            'accept'    : 'application/json',
-
 
-
 
154
                
166
                            'method'    : 'post',
-
 
167
                            'url'       :  action,
-
 
168
                        }).done(function(response) {
-
 
169
                            if(response['success']) {
-
 
170
                                $.fn.showSuccess(response['data']);
-
 
171
                                gridTable.api().ajax.reload(null, false);
-
 
172
                            } else {
-
 
173
                                $.fn.showError(response['data']);
-
 
174
                            }
-
 
175
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
176
                            $.fn.showError(textStatus);
-
 
177
                        }).always(function() {
-
 
178
                            NProgress.done();
-
 
179
                        });
-
 
180
                    },
-
 
181
                });
-
 
182
            },
155
            },
183
            'aoColumns': [
156
            'aoColumns': [
184
                { 'mDataProp': 'description' },
157
                { 'mDataProp': 'description' },
185
                { 'mDataProp': 'status' },
158
                { 'mDataProp': 'status' },
186
                { 'mDataProp': 'actions' },
159
                { 'mDataProp': 'actions' },
Línea 194... Línea 167...
194
                    'targets': -2,
167
                    'targets': -2,
195
                    'orderable': false,
168
                    'orderable': false,
196
                    'className' : 'text-center',
169
                    'className' : 'text-center',
197
                      'render' : function ( data, type, row ) {
170
                      'render' : function ( data, type, row ) {
Línea 198... Línea 171...
198
                      
171
                      
199
                        checked = data == 'a' ? ' checked="checked" ' : '';
172
                        checked = data == 'a'  ? 'checked' : '';
200
                        return '<div class="checkbox checkbox-success">' +
173
                        return '<div class="form-check">' +
201
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
174
                            '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
202
                            '<label ></label></div>';
175
                            '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
203
                    }
176
                    }
204
                },
177
                },
205
                {
178
                {
206
                    'targets': -1,
179
                    'targets': -1,
Línea 330... Línea 303...
330
        $('body').on('click', 'button.btn-cancel', function(e) {
303
        $('body').on('click', 'button.btn-cancel', function(e) {
331
            e.preventDefault();
304
            e.preventDefault();
332
            $('#modal').modal('hide');
305
            $('#modal').modal('hide');
333
        });
306
        });
Línea -... Línea 307...
-
 
307
 
-
 
308
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
309
        e.preventDefault();
-
 
310
        var action = $(this).data('href');
-
 
311
 
-
 
312
 
-
 
313
          swal.fire({
-
 
314
            title: 'LABEL_ARE_YOU_SURE',
-
 
315
            icon: 'question',
-
 
316
            cancelButtonText: 'LABEL_NO',
-
 
317
            showCancelButton: true,
-
 
318
            confirmButtonText: 'LABEL_YES'
-
 
319
          }).then((result) => {
-
 
320
            if (result.isConfirmed) {
-
 
321
 
-
 
322
                    NProgress.start();
-
 
323
                    $.ajax({
-
 
324
                        'dataType'  : 'json',
-
 
325
                        'accept'    : 'application/json',
-
 
326
                        'method'    : 'post',
-
 
327
                        'url'       :  action,
-
 
328
                    }).done(function(response) {
-
 
329
                        if(response['success']) {
-
 
330
                            $.fn.showSuccess(response['data']);
-
 
331
                            gridTable.api().ajax.reload(null, false);
-
 
332
                        } else {
-
 
333
                            $.fn.showError(response['data']);
-
 
334
                        }
-
 
335
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
336
                        $.fn.showError(textStatus);
-
 
337
                    }).always(function() {
-
 
338
                        NProgress.done();
-
 
339
                    });
-
 
340
                }
-
 
341
           });
-
 
342
 
-
 
343
        });
Línea 334... Línea 344...
334
 
344
 
Línea 372... Línea 382...
372
$this->inlineScript()->captureEnd();
382
$this->inlineScript()->captureEnd();
373
?>
383
?>
Línea 374... Línea -...
374
 
-
 
375
 
-
 
376
 
-
 
377
<!-- Content Header (Page header) -->
-
 
378
<section class="content-header">
-
 
379
    <div class="container-fluid">
-
 
380
        <div class="row mb-2">
-
 
381
            <div class="col-sm-12">
-
 
382
                <h1>LABEL_BEHAVIORS</h1>
-
 
383
            </div>
-
 
Línea 384... Línea -...
384
        </div>
-
 
-
 
384
 
385
    </div><!-- /.container-fluid -->
385
 
386
</section>
386
 
387
 
387
 
388
<section class="content">
388
 
-
 
389
<div class="container">
389
    <div class="container-fluid">
390
        <div class="row">
390
        <div class="row">
391
            <div class="col-12">
391
            <div class="col-12">
392
                <div class="card">
392
                <div class="card">
393
                	<h6 class="card-title">LABEL_BEHAVIORS</h6>
393
                    <div class="card-body">
394
                    <div class="card-body">
Línea 415... Línea 416...
415
                        </div>
416
                        </div>
416
                    </div>
417
                    </div>
417
                </div>
418
                </div>
418
            </div>
419
            </div>
419
        </div>
420
        </div>
420
    </div>
-
 
421
</section>
-
 
422
 
-
 
423
<!-- The Modal -->
-
 
424
<div class="modal" id="modal">
-
 
425
    <div class="modal-dialog  modal-xl">
-
 
426
        <div class="modal-content">
-
 
427
 
-
 
428
            <!-- Modal Header -->
-
 
429
            <div class="modal-header">
-
 
430
                <h4 class="modal-title">LABEL_BEHAVIOR - <span id="form-title"></span></h4>
-
 
431
                <button type="button" class="close" data-dismiss="modal">&times;</button>
-
 
432
            </div>
-
 
Línea 433... Línea -...
433
 
-
 
434
            <!-- Modal body -->
-
 
435
            <div class="modal-body">
-
 
436
                <?php
-
 
437
                $form = $this->form;
-
 
438
                $form->setAttributes([
-
 
439
                    'method'    => 'post',
-
 
440
                    'name'      => 'form',
-
 
441
                    'id'        => 'form'
-
 
442
                ]);
-
 
443
 
-
 
444
                $form->prepare();
-
 
445
                echo $this->form()->openTag($form);
-
 
446
                ?>
-
 
447
                <div class="form-group">
-
 
448
                    <?php
-
 
449
                    $element = $form->get('description');
-
 
450
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
451
                    $element->setAttributes(['class' => 'form-control']);
-
 
452
 
-
 
453
                    echo $this->formLabel($element);
-
 
454
                    echo $this->formText($element);
-
 
455
                    ?>
-
 
456
                </div>
-
 
457
                <div class="form-group">
-
 
458
                    <?php
-
 
459
                    $element = $form->get('status');
-
 
460
                    echo $this->formCheckbox($element);
-
 
461
                    ?>
-
 
Línea -... Línea 421...
-
 
421
 
-
 
422
 
-
 
423
        <!-- The Modal -->
-
 
424
        <div class="modal" id="modal">
-
 
425
            <div class="modal-dialog  modal-xl">
-
 
426
                <div class="modal-content">
-
 
427
        
-
 
428
                    <!-- Modal Header -->
-
 
429
                    <div class="modal-header">
-
 
430
                        <h4 class="modal-title">LABEL_BEHAVIOR - <span id="form-title"></span></h4>
-
 
431
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
-
 
432
                    </div>
-
 
433
        
-
 
434
                    <!-- Modal body -->
-
 
435
                    <div class="modal-body">
-
 
436
                        <?php
-
 
437
                        $form = $this->form;
-
 
438
                        $form->setAttributes([
-
 
439
                            'method'    => 'post',
-
 
440
                            'name'      => 'form',
-
 
441
                            'id'        => 'form'
-
 
442
                        ]);
-
 
443
        
-
 
444
                        $form->prepare();
-
 
445
                        echo $this->form()->openTag($form);
-
 
446
                        ?>
-
 
447
                        <div class="form-group">
-
 
448
                            <?php
-
 
449
                            $element = $form->get('description');
-
 
450
                            $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
451
                            $element->setAttributes(['class' => 'form-control']);
-
 
452
        
-
 
453
                            echo $this->formLabel($element);
-
 
454
                            echo $this->formText($element);
-
 
455
                            ?>
-
 
456
                        </div>
-
 
457
                        <div class="form-group">
-
 
458
                            <?php
-
 
459
                            $element = $form->get('status');
-
 
460
                            echo $this->formCheckbox($element);
-
 
461
                            ?>
462
                </div>
462
                        </div>
463
 
463
        
464
                <div class="text-right">
464
                        <div class="text-right">
-
 
465
                            <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
466
                            <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
-
 
467
                        </div>
-
 
468
                        <?php echo $this->form()->closeTag($form); ?>
-
 
469
                    </div>
465
                    <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
470
        
466
                    <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
-
 
467
                </div>
471
        
468
                <?php echo $this->form()->closeTag($form); ?>
-
 
469
            </div>
-
 
470
 
472
                </div>
471
 
-
 
472
        </div>
-
 
473
    </div>
473
            </div>
-
 
474
        </div>
-
 
475
        
474
</div>
476
</div>