Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 4800 Rev 4802
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 5... Línea 5...
5
$roleName = $currentUser->getUserTypeId();
5
$roleName = $currentUser->getUserTypeId();
6
 
6
 
7
$routeAdd       = $this->url('settings/company-sizes/add');
7
$routeAdd       = $this->url('settings/company-sizes/add');
Línea 8... Línea 8...
8
$routeDatatable = $this->url('settings/company-sizes');
8
$routeDatatable = $this->url('settings/company-sizes');
9
$routeDashboard = $this->url('dashboard');
9
$routeDashboard = $this->url('dashboard');
10
 
10
 
Línea 11... Línea 11...
11
$jsonRoutAdde= json_encode($routeAdd);      
11
$jsonRoutAdde = json_encode($routeAdd);
12
$jsonRouteTable= json_encode($routeDatatable);
12
$jsonRouteTable = json_encode($routeDatatable);
13
$jsonRouteDashboard= json_decode($routeDashboard);
13
$jsonRouteDashboard = json_decode($routeDashboard);
Línea 53... Línea 53...
53
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
53
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
54
$this->inlineScript()->appendFile('/react-bundles/settings/company-sizes/companySizesBundle.js');
54
$this->inlineScript()->appendFile('/react-bundles/settings/company-sizes/companySizesBundle.js');
Línea 55... Línea 55...
55
 
55
 
Línea -... Línea 56...
-
 
56
$status_active = \LeadersLinked\Model\CompanySize::STATUS_ACTIVE;
-
 
57
 
-
 
58
$js = <<<JS
-
 
59
const routesVars = {
-
 
60
        routeAdd: JSON.parse('$jsonRoutAdde'),
-
 
61
        routeTable: JSON.parse('$jsonRouteTable'),
-
 
62
        routeDashboard: JSON.parse('$jsonRouteDashboard'),
-
 
63
   }
-
 
64
JS;
56
$status_active = \LeadersLinked\Model\CompanySize::STATUS_ACTIVE;
65
$this->inlineScript()->appendScript($js);
57
 
66
 
58
$this->inlineScript()->captureStart();
67
$this->inlineScript()->captureStart();
Línea 59... Línea 68...
59
echo <<<JS
68
echo <<<JS
Línea 368... Línea 377...
368
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
377
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
Línea 369... Línea 378...
369
 
378
 
370
        $('#form #minimum_no_of_employee').inputNumberFormat({decimal : 0});
379
        $('#form #minimum_no_of_employee').inputNumberFormat({decimal : 0});
371
        $('#form #maximum_no_of_employee').inputNumberFormat({decimal : 0});
380
        $('#form #maximum_no_of_employee').inputNumberFormat({decimal : 0});
372
    });
-
 
373
 
-
 
374
    const vars = {
-
 
375
        routeAdd: JSON.parse('$jsonRoutAdde'),
-
 
376
        routeTable: JSON.parse('$jsonRouteTable'),
-
 
377
        routeDashboard: JSON.parse('$jsonRouteDashboard'),
-
 
378
   }
381
    });
379
JS;
382
JS;
380
$this->inlineScript()->captureEnd();
383
$this->inlineScript()->captureEnd();
381
?>
384
?>
382
  
385
 
383
<!-- Content Header (Page header) -->
386
<!-- Content Header (Page header) -->
384
<section class="content-header">
387
<section class="content-header">
385
	<div class="container-fluid">
388
    <div class="container-fluid">
386
    	<div class="row mb-2">
389
        <div class="row mb-2">
387
        	<div class="col-sm-12">
390
            <div class="col-sm-12">
388
            	<h1>LABEL_COMPANY_SIZES</h1>
391
                <h1>LABEL_COMPANY_SIZES</h1>
389
			</div>
392
            </div>
390
		</div>
393
        </div>
391
	</div><!-- /.container-fluid -->
394
    </div><!-- /.container-fluid -->
Línea 392... Línea 395...
392
</section>
395
</section>
393
 
396
 
394
<section class="content">
397
<section class="content">
395
   <div id="company-sizes"></div>
398
    <div id="company-sizes"></div>
396
	<div class="container-fluid">
399
    <div class="container-fluid">
397
    	<div class="row">
400
        <div class="row">
398
        	<div class="col-12">
401
            <div class="col-12">
399
				<div class="card">                    
402
                <div class="card">
400
					<div class="card-body">
403
                    <div class="card-body">
401
        	    		<table id="gridTable" class="table   table-hover">
404
                        <table id="gridTable" class="table   table-hover">
402
                      		<thead>
405
                            <thead>
403
        						<tr>
406
                                <tr>
404
                                	<th>LABEL_NAME</th>
407
                                    <th>LABEL_NAME</th>
405
                                  	<th>LABEL_MINIMUM</th>
408
                                    <th>LABEL_MINIMUM</th>
406
                                  	<th>LABEL_MAXIMUM</th>
409
                                    <th>LABEL_MAXIMUM</th>
407
                                  	<th>LABEL_ACTIVE</th>
410
                                    <th>LABEL_ACTIVE</th>
408
                                  	<th>LABEL_ACTIONS</th>
411
                                    <th>LABEL_ACTIONS</th>
409
                                </tr>
412
                                </tr>
410
                       		</thead>
413
                            </thead>
411
                         	<tbody>
414
                            <tbody>
412
                         	</tbody>
415
                            </tbody>
413
                    	</table>
416
                        </table>
414
                   	</div>
417
                    </div>
415
                   	<div class="card-footer clearfix">
418
                    <div class="card-footer clearfix">
416
                   		<div style="float:right;">
419
                        <div style="float:right;">
417
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
420
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
418
							<?php if($allowAdd) : ?>
421
                            <?php if ($allowAdd) : ?>
419
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
422
                                <button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
420
							<?php endif; ?>
423
                            <?php endif; ?>
421
						</div>
424
                        </div>
422
                 	</div>
425
                    </div>
423
          		</div>
426
                </div>
424
           	</div>     
427
            </div>
425
        </div>          
428
        </div>
Línea 426... Línea 429...
426
 	</div>
429
    </div>
427
</section> 	
430
</section>
428
 
431
 
429
<!-- The Modal -->
432
<!-- The Modal -->
Línea 430... Línea 433...
430
<div class="modal" id="modal">
433
<div class="modal" id="modal">
431
	<div class="modal-dialog  modal-xl">
434
    <div class="modal-dialog  modal-xl">
432
    	<div class="modal-content">
435
        <div class="modal-content">
433
 
436
 
434
            <!-- Modal Header -->
437
            <!-- Modal Header -->
Línea 435... Línea 438...
435
      		<div class="modal-header">
438
            <div class="modal-header">
436
        		<h4 class="modal-title">LABEL_COMPANY_SIZES - <span id="form-title"></span></h4>
439
                <h4 class="modal-title">LABEL_COMPANY_SIZES - <span id="form-title"></span></h4>
437
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
440
                <button type="button" class="close" data-dismiss="modal">&times;</button>
438
      		</div>
441
            </div>
439
 
442
 
440
            <!-- Modal body -->
443
            <!-- Modal body -->
441
      		<div class="modal-body">
444
            <div class="modal-body">
442
       			 <?php 
445
                <?php
443
                    $form = $this->form;
446
                $form = $this->form;
444
            		$form->setAttributes([
447
                $form->setAttributes([
445
                        'method'    => 'post',
448
                    'method'    => 'post',
446
                        'name'      => 'form',
449
                    'name'      => 'form',
447
                        'id'        => 'form'
450
                    'id'        => 'form'
448
                    ]);
451
                ]);
449
    
452
 
450
                    $form->prepare();
453
                $form->prepare();
451
                    echo $this->form()->openTag($form);
454
                echo $this->form()->openTag($form);
452
                    ?>					
455
                ?>
453
    					<div class="form-group">
456
                <div class="form-group">
454
        					<?php 
457
                    <?php
455
                            $element = $form->get('name');
458
                    $element = $form->get('name');
456
                            $element->setOptions(['label' => 'LABEL_NAME']);
459
                    $element->setOptions(['label' => 'LABEL_NAME']);
457
                            $element->setAttributes(['class' => 'form-control']); 
460
                    $element->setAttributes(['class' => 'form-control']);
458
                                            
461
 
459
                            echo $this->formLabel($element);
462
                    echo $this->formLabel($element);
460
                            echo $this->formText($element);
463
                    echo $this->formText($element);
461
                            ?>
464
                    ?>
462
						</div>
465
                </div>
463
						<div class="form-group">
466
                <div class="form-group">
464
                    	<?php 
467
                    <?php
465
                            $element = $form->get('minimum_no_of_employee');
468
                    $element = $form->get('minimum_no_of_employee');
466
                            $element->setOptions(['label' => 'LABEL_MINIMUM']);
469
                    $element->setOptions(['label' => 'LABEL_MINIMUM']);
467
                            $element->setAttributes(['class' => 'form-control']); 
470
                    $element->setAttributes(['class' => 'form-control']);
468
 
471
 
469
                            echo $this->formLabel($element);
472
                    echo $this->formLabel($element);
470
                            echo $this->formText($element);
473
                    echo $this->formText($element);
471
                        ?>
474
                    ?>
472
						</div>
475
                </div>
473
						<div class="form-group">
476
                <div class="form-group">
474
                    	<?php 
477
                    <?php
475
                            $element = $form->get('maximum_no_of_employee');
478
                    $element = $form->get('maximum_no_of_employee');
476
                            $element->setOptions(['label' => 'LABEL_MAXIMUM']);
479
                    $element->setOptions(['label' => 'LABEL_MAXIMUM']);
477
                            $element->setAttributes(['class' => 'form-control']); 
480
                    $element->setAttributes(['class' => 'form-control']);
478
                                        
481
 
479
                            echo $this->formLabel($element);
482
                    echo $this->formLabel($element);
480
                            echo $this->formText($element);
483
                    echo $this->formText($element);
481
                        ?>
484
                    ?>
482
						</div>
485
                </div>
483
						<div class="form-group">
486
                <div class="form-group">
484
                      	<?php 
487
                    <?php
485
                            $element = $form->get('status');
488
                    $element = $form->get('status');
486
                            echo $this->formCheckbox($element);
489
                    echo $this->formCheckbox($element);
487
                        ?>
490
                    ?>
488
						</div>
491
                </div>
489
								
492
 
490
        				<div class="form-group">
493
                <div class="form-group">
Línea 491... Línea 494...
491
                    		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
494
                    <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
492
                    		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
495
                    <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
493
                   		</div>
496
                </div>
494
     	      		<?php echo $this->form()->closeTag($form); ?>
497
                <?php echo $this->form()->closeTag($form); ?>
495
      		</div>
498
            </div>
496
 
499
 
497
            <!-- Modal footer -->
500
            <!-- Modal footer -->
498
      		<div class="modal-footer">
501
            <div class="modal-footer">
499
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
-
 
500
      		</div>
-
 
501
 
-
 
502
    	</div>
-
 
503
	</div>
-
 
504
</div>    			
-
 
505
			
502
                <button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>