Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 20 Rev 5711
Línea 1... Línea 1...
1
<?php 
1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
3
$currentUser    = $this->currentUserHelper();
Línea 4... Línea 4...
4
 
4
 
Línea 85... Línea 85...
85
                    error.insertAfter(field.parent());
85
                    error.insertAfter(field.parent());
86
                }
86
                }
87
            }
87
            }
88
        };
88
        };
Línea 89... Línea -...
89
 
-
 
90
 
-
 
91
 
-
 
92
 
-
 
93
 
89
 
94
        var allowEdit   = $allowEdit;
90
        var allowEdit   = $allowEdit;
Línea 95... Línea 91...
95
        var allowDelete = $allowDelete;
91
        var allowDelete = $allowDelete;
96
        
92
        
97
        var gridTable = $('#gridTable').dataTable( {
93
        /* var gridTable = $('#gridTable').dataTable( {
98
            'processing': true,
94
            'processing': true,
99
            'serverSide': true,
95
            'serverSide': true,
100
            'searching': true,
96
            'searching': true,
Línea 346... Línea 342...
346
            $('#div-listing').show();
342
            $('#div-listing').show();
347
        });
343
        });
Línea 348... Línea 344...
348
 
344
 
349
 
345
 
350
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
346
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
351
        CKEDITOR.replace( 'description');
347
        CKEDITOR.replace( 'description'); */
352
    });
348
    });
353
JS;
-
 
Línea 354... Línea 349...
354
$this->inlineScript()->captureEnd();
349
JS;
-
 
350
$this->inlineScript()->captureEnd();
-
 
351
 
-
 
352
$js = <<<JS
-
 
353
const urlsVar = {
-
 
354
        linkTable: '$routeDatatable',
-
 
355
        addUrl: '$routeAdd',
355
?>
356
        allowAdd: '$allowAdd',
356
 
357
        allowEdit: '$allowEdit',
Línea 357... Línea -...
357
		
-
 
358
		
-
 
359
			
-
 
360
 
-
 
361
			
-
 
362
<!-- Content Header (Page header) -->
-
 
363
<section class="content-header">
-
 
364
	<div class="container-fluid">
-
 
365
    	<div class="row mb-2">
-
 
366
        	<div class="col-sm-12">
-
 
367
            	<h1>LABEL_JOB_CATEGORIES</h1>
-
 
368
			</div>
-
 
369
		</div>
-
 
370
	</div><!-- /.container-fluid -->
-
 
371
</section>
-
 
372
 
-
 
373
<section class="content">
-
 
374
	<div class="container-fluid">
-
 
375
    	<div class="row">
-
 
376
        	<div class="col-12">
-
 
377
				<div class="card">                    
-
 
378
					<div class="card-body">
-
 
379
        	    		<table id="gridTable" class="table   table-hover">
-
 
380
                      		<thead>
-
 
381
        						<tr>
-
 
382
                                	<th>LABEL_NAME</th>
-
 
383
                                  	<th>LABEL_ACTIVE</th>
-
 
384
                                  	<th>LABEL_ACTIONS</th>
-
 
385
                                </tr>
-
 
386
                       		</thead>
-
 
387
                         	<tbody>
-
 
388
                         	</tbody>
-
 
389
                    	</table>
-
 
390
                   	</div>
-
 
391
                   	<div class="card-footer clearfix">
-
 
392
                   		<div style="float:right;">
-
 
393
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH  </button>
-
 
394
							<?php if($allowAdd) : ?>
-
 
395
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
396
							<?php endif; ?>
-
 
397
						</div>
-
 
398
                 	</div>
-
 
399
          		</div>
-
 
400
           	</div>     
-
 
401
        </div>          
-
 
402
 	</div>
-
 
403
</section> 	
-
 
404
 
-
 
405
<!-- The Modal -->
-
 
406
<div class="modal" id="modal">
-
 
407
	<div class="modal-dialog  modal-xl">
-
 
408
    	<div class="modal-content">
-
 
409
 
-
 
410
            <!-- Modal Header -->
-
 
411
      		<div class="modal-header">
-
 
412
        		<h4 class="modal-title">LABEL_JOB_CATEGORIES - <span id="form-title"></span></h4>
-
 
413
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
-
 
414
      		</div>
-
 
415
 
-
 
416
            <!-- Modal body -->
358
        allowDelete: '$allowDelete',
417
      		<div class="modal-body">
-
 
418
       			 <?php 
-
 
419
                    $form = $this->form;
-
 
420
            		$form->setAttributes([
-
 
421
                        'method'    => 'post',
-
 
422
                        'name'      => 'form',
-
 
423
                        'id'        => 'form'
-
 
424
                    ]);
-
 
425
    
-
 
426
                    $form->prepare();
-
 
427
                    echo $this->form()->openTag($form);
-
 
428
                    ?>					
-
 
429
    					<div class="form-group">
-
 
430
        					<?php 
-
 
431
                            $element = $form->get('name');
-
 
432
                            $element->setOptions(['label' => 'LABEL_NAME']);
-
 
433
                            $element->setAttributes(['class' => 'form-control']); 
-
 
434
                                            
-
 
435
                            echo $this->formLabel($element);
-
 
436
                            echo $this->formText($element);
-
 
437
                            ?>
-
 
438
						</div>
-
 
439
						<div class="form-group">
-
 
440
                    	<?php 
-
 
441
                            $element = $form->get('description');
-
 
442
                            $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
443
                            $element->setAttributes(['class' => 'form-control']); 
-
 
444
 
-
 
445
                            echo $this->formLabel($element);
-
 
446
                            echo $this->formTextArea($element);
-
 
447
                        ?>
-
 
448
						</div>
-
 
449
						<div class="form-group">
-
 
450
                      	<?php 
-
 
451
                            $element = $form->get('status');
-
 
452
                            echo $this->formCheckbox($element);
-
 
453
                        ?>
-
 
454
						</div>
-
 
455
								
-
 
456
        				<div class="form-group">
-
 
457
                    		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
458
                    		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
-
 
459
                   		</div>
-
 
460
     	      		<?php echo $this->form()->closeTag($form); ?>
-
 
461
      		</div>
359
   }
462
 
-
 
463
            <!-- Modal footer -->
-
 
464
      		<div class="modal-footer">
-
 
465
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
-
 
466
      		</div>
-
 
467
 
360
JS;
Línea 468... Línea -...
468
    	</div>
-
 
469
	</div>
-
 
470
</div>   			
-
 
471
			
-
 
Línea -... Línea 361...
-
 
361
 
472
 
362
$this->inlineScript()->appendScript($js);
-
 
363
$this->inlineScript()->appendFile('/react-bundles/settings/job-categories/jobCategoriesBundle.js');
-
 
364
?>
473
 
365