File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -646,6 +646,7 @@ protected function loadData($viewName, $view)
646646 parent ::loadData ($ viewName , $ view );
647647 if (false === $ view ->model ->exists ()) {
648648 $ view ->model ->idempresa = $ this ->user ->idempresa ;
649+ $ this ->setSettings ('docfiles ' , 'active ' , true );
649650 } elseif (false === $ view ->model ->userCanSee ($ this ->user )) {
650651 $ this ->setTemplate ('Error/AccessDenied ' );
651652 } elseif (false === $ view ->model ->editable ) {
@@ -656,12 +657,15 @@ protected function loadData($viewName, $view)
656657 }
657658 break ;
658659
660+ case 'docfiles ' :
661+ $ this ->loadDataDocFiles ($ view , $ this ->getModelClassName (), $ this ->getModel ()->primaryColumnValue ());
662+ break ;
663+
659664 case 'EditUserProyecto ' :
660665 case 'ListNotaProyecto ' :
661666 case 'ListStockProyecto ' :
662667 case 'ListTareaProyecto ' :
663668 case 'ListServicioAT ' :
664- case 'docfiles ' :
665669 $ where = [new DataBaseWhere ('idproyecto ' , $ idproyecto )];
666670 $ view ->loadData ('' , $ where );
667671 break ;
Original file line number Diff line number Diff line change @@ -36,11 +36,6 @@ class EditTareaProyecto extends EditController
3636{
3737 use DocFilesTrait;
3838
39- public function __construct (string $ className = '' , string $ uri = '' )
40- {
41- parent ::__construct ($ className , $ uri );
42- }
43-
4439 public function getModelClassName (): string
4540 {
4641 return 'TareaProyecto ' ;
@@ -60,10 +55,9 @@ protected function createViews()
6055 {
6156 parent ::createViews ();
6257
63- // the 'nick' field is defined in Table/tareas.xml and will be loaded automatically
64- // set tabs position and create notes view
6558 $ this ->setTabsPosition ('bottom ' );
6659 $ this ->createViewsNotes ();
60+ $ this ->createViewDocFiles ();
6761
6862 $ idproyecto = $ this ->request ->get ('code ' , '' )
6963 ? $ this ->getModel ()->idproyecto
@@ -144,7 +138,7 @@ protected function loadData($viewName, $view)
144138 $ this ->views ['EditTareaProyecto ' ]->disableColumn ('code ' );
145139 }
146140
147- // If it is a new task ( no model exists yet) keep the files tab active so user can add files
141+ // Si el modelo no existe, desactivamos la pestaña de archivos
148142 if (false === $ view ->model ->exists ()) {
149143 $ this ->setSettings ('docfiles ' , 'active ' , true );
150144 }
You can’t perform that action at this time.
0 commit comments