Proyectos de Subversion LeadersLinked - Backend

Rev

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

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