Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6056 Rev 6094
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();
4
$roleName       = $currentUser->getUserTypeId();
4
$roleName       = $currentUser->getUserTypeId();
Línea 5... Línea 5...
5
 
5
 
Línea 532... Línea 532...
532
     $.fn.reload()
532
     $.fn.reload()
Línea 533... Línea 533...
533
 
533
 
534
 
534
 
535
});
-
 
536
JS;
-
 
Línea 537... Línea 535...
537
$this->inlineScript()->captureEnd();
535
});
-
 
536
JS;
538
 
537
 
Línea -... Línea 538...
-
 
538
$this->inlineScript()->captureEnd();
-
 
539
$this->headLink()->appendStylesheet('/look-and-field/knowledge.css');
-
 
540
?>
-
 
541
 
Línea 539... Línea -...
539
 
-
 
540
$this->headStyle()->captureStart();
-
 
541
echo <<<EOT
-
 
542
 
542
<section class="companies-info containerCHA">
543
 
543
    <div class="company-title">
544
.knowledge-category-list {
544
        <h1 class="title mx-auto">LABEL_KNOWLEDGE_AREA_TITLE</h1>
545
    width: 100%;
-
 
546
    padding: 25px 20px;
-
 
547
    border: 1px solid var(--border-primary);
-
 
548
    background-color: var(--bg-color);
-
 
549
    text-align: center;
-
 
550
    border-radius: 10px;
545
    </div>
551
 
546
 
552
}
-
 
553
 
547
    <div class="row" id="row-list">
554
 
548
        <div class="col-3 knowledge-category-list">
555
.knowledge-category-li  {
549
            <ul>
556
    font-family: 'Roboto';
550
                <li class="knowledge-category-li knowledge-category-li-selected">
557
    font-style: normal;
551
                    <a class="knowledge-category-a" href="" data-uuid="">LABEL_KNOWLEDGE_AREA_CATEGORY_ALL</a>
558
    font-weight: 400;
-
 
559
    font-size: 16px;
-
 
-
 
552
                </li>
560
    line-height: 19px;
553
                <?php
Línea -... Línea 554...
-
 
554
                foreach ($categories as $categorie) :
-
 
555
                ?>
561
    display: flex;
556
                    <li class="knowledge-category-li">
Línea 562... Línea -...
562
    align-items: center;
-
 
563
    
-
 
564
    color: #16283C;
-
 
565
    margin-top: 10px;
-
 
566
 
-
 
567
}
-
 
568
 
-
 
569
.knowledge-category-li-selected {
-
 
570
    background-color: var(--bg-color-secondary);
-
 
571
}
-
 
572
 
-
 
573
.knowledge-add-container {
-
 
574
    padding-top: 10px;
-
 
575
    padding-bottom: 10px;
-
 
576
    text-align: center;
-
 
577
}
-
 
Línea 578... Línea -...
578
 
-
 
-
 
557
                        <a class="knowledge-category-a" href="" data-uuid="<?php echo $categorie['uuid'] ?>"><?php echo $categorie['name'] ?></a>
-
 
558
                    </li>
-
 
559
 
-
 
560
                <?php endforeach; ?>
-
 
561
            </ul>
579
.knowledge-add-a {
562
        </div>
Línea 580... Línea -...
580
    font-family: 'Roboto';
-
 
-
 
563
 
Línea 581... Línea -...
581
    font-style: normal;
-
 
582
    font-weight: 400;
-
 
583
    font-size: 16px;
-
 
584
    line-height: 19px;
564
 
585
 
565
        <div class="col-9">
586
    
-
 
587
    color: #666666;
-
 
588
 
-
 
589
}
-
 
590
 
-
 
591
.knowledge-record-card {
-
 
592
    width: 100%;
566
            <div class="search-box">
593
    padding: 25px 20px;
-
 
594
    border: 1px solid var(--border-primary);
-
 
595
    background-color: var(--bg-color);
-
 
596
    text-align: center;
-
 
597
    border-radius: 10px;
567
                <form id="form-filter" name="form-filter">
598
}
-
 
599
 
-
 
600
.knowledge-record-card-category {
-
 
601
    font-family: 'Roboto';
-
 
Línea 602... Línea -...
602
    font-style: normal;
-
 
603
    font-weight: 400;
-
 
604
    font-size: 16px;
-
 
605
    line-height: 19px;
-
 
606
    display: flex;
-
 
607
    align-items: center;
-
 
608
    
-
 
609
    color: #666666;
-
 
610
    margin-top: 3px;
-
 
611
}
-
 
612
 
-
 
613
 
-
 
614
.knowledge-record-card-title {
-
 
615
    font-family: 'Roboto';
-
 
616
    font-style: normal;
-
 
617
    font-weight: 800;
-
 
618
    font-size: 16px;
-
 
619
    line-height: 19px;
-
 
620
    /* identical to box height */
-
 
621
    
-
 
622
    display: flex;
-
 
623
    align-items: center;
-
 
624
    
-
 
625
    color: #666666;
-
 
626
    margin-top: 3px;
-
 
627
}
-
 
628
 
-
 
629
.knowledge-record-card-description {
-
 
630
    font-family: 'Roboto';
-
 
631
    font-style: normal;
-
 
632
    font-weight: 400;
-
 
633
    font-size: 14px;
-
 
634
    line-height: 16px;
-
 
635
    text-align: justify;
-
 
636
    text-justify: inter-word;
-
 
637
    
-
 
638
    color: #666666;
-
 
639
    margin-top: 3px;
-
 
640
}
-
 
641
 
-
 
642
.knowledge-record-card-image  img {
-
 
643
    width: 100%;
-
 
644
    height: auto;
-
 
645
}
-
 
Línea 646... Línea -...
646
 
-
 
647
.knowledge-record-card-actions {
-
 
Línea -... Línea 568...
-
 
568
                    <input type="text" name="search" id="search" class="form-control"><button class="btn btn-search">LABEL_SEARCH</button>
-
 
569
                </form>
Línea -... Línea 570...
-
 
570
            </div>
648
    line-height: 20px;
571
 
Línea 649... Línea -...
649
}
-
 
650
 
-
 
651
.knowledge-record-card-actions-edit {
-
 
652
  float: left;
-
 
653
}
-
 
654
 
-
 
655
.knowledge-record-card-actions-delete {
-
 
656
  float: right;
-
 
657
}
-
 
658
 
-
 
659
EOT;    
-
 
660
$this->headStyle()->captureEnd();
-
 
661
 
-
 
662
 
-
 
663
?>
-
 
664
 
-
 
665
<section class="companies-info container">
-
 
666
	<div class="company-title">
-
 
667
		<h1 class="title mx-auto">LABEL_KNOWLEDGE_AREA_TITLE</h1>
-
 
668
	</div>
-
 
669
 
-
 
670
	<div class="row" id="row-list">
-
 
671
		<div class="col-3 knowledge-category-list">
-
 
672
			<ul>
-
 
673
				<li class="knowledge-category-li knowledge-category-li-selected" >
-
 
674
					<a  class="knowledge-category-a" href="" data-uuid="">LABEL_KNOWLEDGE_AREA_CATEGORY_ALL</a>
-
 
675
				</li>
-
 
676
    			<?php 
-
 
677
    			 foreach($categories as $categorie) : 
572
            <?php if ($content_edit && $allowAdd) : ?>
678
    			?>
-
 
679
    			<li class="knowledge-category-li" >
-
 
680
    				<a class="knowledge-category-a" href="" data-uuid="<?php echo $categorie['uuid']?>"><?php echo $categorie['name']?></a>
-
 
681
    			</li>
-
 
682
    			
-
 
683
    			<?php endforeach; ?>
573
 
684
			</ul>
-
 
Línea 685... Línea -...
685
		</div>
-
 
686
		
-
 
687
		
-
 
688
		<div class="col-9">
-
 
689
			<div class="search-box">
-
 
690
				<form id="form-filter" name="form-filter">
-
 
691
        			<input type="text" name="search"  id="search" class="form-control"><button class="btn btn-search">LABEL_SEARCH</button>
-
 
692
        		</form>
-
 
693
        	</div>
-
 
694
        		
-
 
695
        	<?php if($content_edit && $allowAdd) : ?>		
-
 
696
        		
-
 
697
			<div class="knowledge-add-container" >
574
                <div class="knowledge-add-container">
698
				<a href="" id="knowledge-add-a" class="knowledge-add-a"> LABEL_KNOWLEDGE_AREA_ADD </a>
575
                    <a href="" id="knowledge-add-a" class="knowledge-add-a"> LABEL_KNOWLEDGE_AREA_ADD </a>
699
			</div>
576
                </div>
700
			<?php endif; ?>		
577
            <?php endif; ?>
701
 
578
 
702
 
579
 
703
 
580
 
704
			
581
 
705
			<div id="knowledge-record-list">
582
            <div id="knowledge-record-list">
Línea 733... Línea 610...
733
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
610
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
734
                </div>
611
                </div>
Línea 735... Línea 612...
735
 
612
 
736
                <!-- Modal body -->
613
                <!-- Modal body -->
737
                <div class="card-body">
614
                <div class="card-body">
738
    
615
 
739
                    <div class="form-group">
616
                    <div class="form-group">
740
                        <?php
617
                        <?php
741
                        $element = $form->get('category_id');
618
                        $element = $form->get('category_id');
742
                        $element->setOptions(['label' => 'LABEL_CATEGORY']);
619
                        $element->setOptions(['label' => 'LABEL_CATEGORY']);
743
                        $element->setAttributes(['class' => 'form-control']);
620
                        $element->setAttributes(['class' => 'form-control']);
744
    
621
 
745
                        echo $this->formLabel($element);
622
                        echo $this->formLabel($element);
746
                        echo $this->formSelect($element);
623
                        echo $this->formSelect($element);
747
                        ?>
624
                        ?>
748
                    </div>
625
                    </div>
749
                  	<div class="form-group">
626
                    <div class="form-group">
750
                        <?php
627
                        <?php
751
                        $element = $form->get('title');
628
                        $element = $form->get('title');
752
                        $element->setOptions(['label' => 'LABEL_TITLE']);
629
                        $element->setOptions(['label' => 'LABEL_TITLE']);
753
                        $element->setAttributes(['class' => 'form-control']);
630
                        $element->setAttributes(['class' => 'form-control']);
754
                        
631
 
755
                        echo $this->formLabel($element);
632
                        echo $this->formLabel($element);
756
                        echo $this->formText($element);
633
                        echo $this->formText($element);
757
                        ?>
634
                        ?>
758
                    </div>
635
                    </div>
759
                  	<div class="form-group">
636
                    <div class="form-group">
760
                        <?php
637
                        <?php
761
                        $element = $form->get('description');
638
                        $element = $form->get('description');
762
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
639
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
763
                        $element->setAttributes(['class' => 'form-control', 'id' => 'description_add']);
640
                        $element->setAttributes(['class' => 'form-control', 'id' => 'description_add']);
764
                        
641
 
765
                        echo $this->formLabel($element);
642
                        echo $this->formLabel($element);
766
                        echo $this->formTextArea($element);
643
                        echo $this->formTextArea($element);
767
                        ?>
644
                        ?>
768
                    </div>
645
                    </div>
769
                  	<div class="form-group">
646
                    <div class="form-group">
770
                        <?php
647
                        <?php
771
                        $element = $form->get('image');
648
                        $element = $form->get('image');
772
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
649
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
773
                        $element->setAttributes(['class' => 'form-control']);
650
                        $element->setAttributes(['class' => 'form-control']);
774
                        
651
 
775
                        echo $this->formLabel($element);
652
                        echo $this->formLabel($element);
776
                        echo $this->formFile($element);
653
                        echo $this->formFile($element);
777
                        ?>
654
                        ?>
778
                    </div>
655
                    </div>
779
                  	<div class="form-group">
656
                    <div class="form-group">
780
                        <?php
657
                        <?php
781
                        $element = $form->get('attachment');
658
                        $element = $form->get('attachment');
782
                        $element->setOptions(['label' => 'LABEL_ATTACHMENT']);
659
                        $element->setOptions(['label' => 'LABEL_ATTACHMENT']);
783
                        $element->setAttributes(['class' => 'form-control']);
660
                        $element->setAttributes(['class' => 'form-control']);
784
                        
661
 
785
                        echo $this->formLabel($element);
662
                        echo $this->formLabel($element);
786
                        echo $this->formFile($element);
663
                        echo $this->formFile($element);
787
                        ?>
664
                        ?>
788
                    </div>
665
                    </div>
789
                 	<div class="form-group">
666
                    <div class="form-group">
790
                        <?php
667
                        <?php
791
                        $element = $form->get('link');
668
                        $element = $form->get('link');
792
                        $element->setOptions(['label' => 'LABEL_LINK']);
669
                        $element->setOptions(['label' => 'LABEL_LINK']);
793
                        $element->setAttributes(['class' => 'form-control']);
670
                        $element->setAttributes(['class' => 'form-control']);
794
                        
671
 
795
                        echo $this->formLabel($element);
672
                        echo $this->formLabel($element);
796
                        echo $this->formText($element);
673
                        echo $this->formText($element);
797
                        ?>
674
                        ?>
798
                    </div>
675
                    </div>
799
                </div>
676
                </div>
800
                <div class="card-footer">
677
                <div class="card-footer">
801
                		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
678
                    <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
802
                        <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
679
                    <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
803
                </div>
680
                </div>
Línea 804... Línea 681...
804
    			<?php echo $this->form()->closeTag($form); ?>
681
                <?php echo $this->form()->closeTag($form); ?>
805
 
682
 
806
            </div>
683
            </div>
807
        </div>
684
        </div>
808
    </div>
685
    </div>
809
    
686
 
810
	<div class="row" id="row-edit" style="display: none">
687
    <div class="row" id="row-edit" style="display: none">
811
		<div class="col-12">
688
        <div class="col-12">
812
			<div class="card">
689
            <div class="card">
813
				 <?php
690
                <?php
814
                $form = $this->formEdit;
691
                $form = $this->formEdit;
815
                $form->setAttributes([
692
                $form->setAttributes([
816
                    'method'    => 'post',
693
                    'method'    => 'post',
Línea 827... Línea 704...
827
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
704
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
828
                </div>
705
                </div>
Línea 829... Línea 706...
829
 
706
 
830
                <!-- Modal body -->
707
                <!-- Modal body -->
831
                <div class="card-body">
708
                <div class="card-body">
832
    
709
 
833
                    <div class="form-group">
710
                    <div class="form-group">
834
                        <?php
711
                        <?php
835
                        $element = $form->get('category_id');
712
                        $element = $form->get('category_id');
836
                        $element->setOptions(['label' => 'LABEL_CATEGORY']);
713
                        $element->setOptions(['label' => 'LABEL_CATEGORY']);
837
                        $element->setAttributes(['class' => 'form-control']);
714
                        $element->setAttributes(['class' => 'form-control']);
838
    
715
 
839
                        echo $this->formLabel($element);
716
                        echo $this->formLabel($element);
840
                        echo $this->formSelect($element);
717
                        echo $this->formSelect($element);
841
                        ?>
718
                        ?>
842
                    </div>
719
                    </div>
843
                  	<div class="form-group">
720
                    <div class="form-group">
844
                        <?php
721
                        <?php
845
                        $element = $form->get('title');
722
                        $element = $form->get('title');
846
                        $element->setOptions(['label' => 'LABEL_TITLE']);
723
                        $element->setOptions(['label' => 'LABEL_TITLE']);
847
                        $element->setAttributes(['class' => 'form-control']);
724
                        $element->setAttributes(['class' => 'form-control']);
848
                        
725
 
849
                        echo $this->formLabel($element);
726
                        echo $this->formLabel($element);
850
                        echo $this->formText($element);
727
                        echo $this->formText($element);
851
                        ?>
728
                        ?>
852
                    </div>
729
                    </div>
853
                  	<div class="form-group">
730
                    <div class="form-group">
854
                        <?php
731
                        <?php
855
                        $element = $form->get('description');
732
                        $element = $form->get('description');
856
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
733
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
857
                        $element->setAttributes(['class' => 'form-control', 'id' => 'description_edit']);
734
                        $element->setAttributes(['class' => 'form-control', 'id' => 'description_edit']);
858
                        
735
 
859
                        echo $this->formLabel($element);
736
                        echo $this->formLabel($element);
860
                        echo $this->formTextArea($element);
737
                        echo $this->formTextArea($element);
861
                        ?>
738
                        ?>
862
                    </div>
739
                    </div>
863
                  	<div class="form-group">
740
                    <div class="form-group">
864
                        <?php
741
                        <?php
865
                        $element = $form->get('image');
742
                        $element = $form->get('image');
866
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
743
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
867
                        $element->setAttributes(['class' => 'form-control']);
744
                        $element->setAttributes(['class' => 'form-control']);
868
                        
745
 
869
                        echo $this->formLabel($element);
746
                        echo $this->formLabel($element);
870
                        echo $this->formFile($element);
747
                        echo $this->formFile($element);
871
                        ?>
748
                        ?>
872
                    </div>
749
                    </div>
873
                  	<div class="form-group">
750
                    <div class="form-group">
874
                        <?php
751
                        <?php
875
                        $element = $form->get('attachment');
752
                        $element = $form->get('attachment');
876
                        $element->setOptions(['label' => 'LABEL_ATTACHMENT']);
753
                        $element->setOptions(['label' => 'LABEL_ATTACHMENT']);
877
                        $element->setAttributes(['class' => 'form-control']);
754
                        $element->setAttributes(['class' => 'form-control']);
878
                        
755
 
879
                        echo $this->formLabel($element);
756
                        echo $this->formLabel($element);
880
                        echo $this->formFile($element);
757
                        echo $this->formFile($element);
881
                        ?>
758
                        ?>
882
                    </div>
759
                    </div>
883
                 	<div class="form-group">
760
                    <div class="form-group">
884
                        <?php
761
                        <?php
885
                        $element = $form->get('link');
762
                        $element = $form->get('link');
886
                        $element->setOptions(['label' => 'LABEL_LINK']);
763
                        $element->setOptions(['label' => 'LABEL_LINK']);
887
                        $element->setAttributes(['class' => 'form-control']);
764
                        $element->setAttributes(['class' => 'form-control']);
888
                        
765
 
889
                        echo $this->formLabel($element);
766
                        echo $this->formLabel($element);
890
                        echo $this->formText($element);
767
                        echo $this->formText($element);
891
                        ?>
768
                        ?>
892
                    </div>
769
                    </div>
893
                </div>
770
                </div>
894
                <div class="card-footer">
771
                <div class="card-footer">
895
                		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
772
                    <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
896
                        <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
773
                    <button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
897
                </div>
774
                </div>
Línea 898... Línea 775...
898
    			<?php echo $this->form()->closeTag($form); ?>
775
                <?php echo $this->form()->closeTag($form); ?>
899
 
776
 
900
            </div>
777
            </div>
901
        </div>
778
        </div>
Línea 902... Línea 779...
902
    </div>
779
    </div>
Línea 903... Línea 780...
903
	
780
 
904
 
-
 
905
</section>
781
 
906
 
782
</section>
907
<script id="recordTemplate" type="text/x-jsrender">
783
 
908
    <div class="col-4 ">
784
<script id="recordTemplate" type="text/x-jsrender">
909
        <div class="knowledge-record-card">
-
 
910
            <div class="knowledge-record-card-image">
-
 
911
                <a href="{{>link_view}}"  target="_blank" class="knowledge-record-card-actions-view">
-
 
912
                    <img src="{{>image}}" alt="">
-
 
913
                </a>
-
 
914
            </div>
-
 
915
            <div class="knowledge-record-card-category">
-
 
916
                {{>category}}
-
 
917
            </div>
-
 
918
            <div class="knowledge-record-card-title">
-
 
919
                {{>title}}
-
 
920
            </div>
-
 
921
            <div class="knowledge-record-card-description">
-
 
922
                {{>description}}
-
 
923
            </div>
-
 
924
            <div class="knowledge-record-card-actions">
-
 
925
                {{if link_edit }}
-
 
926
                <div class="knowledge-record-card-actions-edit">
-
 
927
                    <button data-link="{{>link_edit}}" class="btn-knowledge-edit"> <i class="fa fa-pencil" aria-hidden="true"></i> </button>
-
 
928
                </div>
-
 
929
                {{/if}}
-
 
930
                {{if link_delete }}
-
 
931
                <div class="knowledge-record-card-actions-delete">
785
    <div class="knowledge-record-card">
932
                    <button data-link="{{>link_delete}}" class="btn-knowledge-delete"> <i class="fa fa-trash" aria-hidden="true"></i> </button>
786
        <div class="knowledge-record-card-image">
-
 
787
            <a href="{{>link_view}}"  target="_blank" class="knowledge-record-card-actions-view">
-
 
788
                <img src="{{>image}}" alt="{{>title}} image">
-
 
789
            </a>
-
 
790
        </div>
-
 
791
        <h3>{{>category}}</h3>
-
 
792
        <h2>{{>title}}</h2>
-
 
793
        <p>{{>description}}</p>
-
 
794
        <div class="knowledge-record-card-actions">
-
 
795
            {{if link_edit }}
-
 
796
            <button data-link="{{>link_edit}}" class="btn-knowledge-edit"> <i class="fa fa-pencil" aria-hidden="true"></i> </button>
-
 
797
            {{/if}}
933
                </div>
798
            {{if link_delete }}
934
                {{/if}}
799
            <button data-link="{{>link_delete}}" class="btn-knowledge-delete"> <i class="fa fa-trash" aria-hidden="true"></i> </button>
935
            </div>
-
 
936
        </div>
800
            {{/if}}