Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] How to Cha...
 
Notifications
Clear all

[SOLVED] How to Change Layout/Position of Predecessor, Successor and Linked Elements

20 Posts
2 Users
0 Reactions
18.9 K Views
(@iconic)
Posts: 280
Active Member
Topic starter
 
[#2470]

Firstly I would just like to say, I loved version 5.0.3 It is so much easier to look at and use. I have the new buttons and feel of the program.

The only question I have is how could I change the position or Layout of the the Elements. At the moment the elements are displayed from left to right as ...

Predecessor element | Successor Element | Linked Elements
| Attachments
| Notes

This layout doesn't work for us at the moment. I am trying to find a way to make it display as
Notes | Attachments | Linked Elements
| Predecessor element
| Successor Element


 
Posted : 29 Jul 2015 13H16
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Just change order in object definition (for instance in /model/Activity.php for activities)


 
Posted : 29 Jul 2015 13H31
(@iconic)
Posts: 280
Active Member
Topic starter
 

Can you be a little more specific as to where I can change the order in object definition. I looked at /model/Activity.php and I can't seem to find anything I can change the order for.


 
Posted : 29 Jul 2015 13H35
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

My mistake.
It is in ActivityMain.php.

class ActivityMain extends SqlElement {

  // List of fields that will be exposed in general user interface
  // List of fields that will be exposed in general user interface
  public $_sec_description;
  public $id;    // redefine $id to specify its visible place 
  public $reference;
  public $name;
  public $idActivityType;
  public $idProject;
  public $externalReference;  
  public $creationDate;
  public $idUser;
  public $idContact;
  public $Origin;
  public $description;  
  public $_sec_treatment;
  public $idActivity;
  public $idStatus;
  public $idResource;  
  public $handled;
  public $handledDate;
  public $done;
  public $doneDate;
  public $idle;
  public $idleDate;
  public $cancelled;
  public $_lib_cancelled;
  public $idTargetVersion;
  public $result;
  public $_sec_Assignment;
  public $_Assignment=array();
  public $_sec_Progress;
  public $ActivityPlanningElement; // is an object
  
  public $_sec_predecessor;
  public $_Dependency_Predecessor=array();
  public $_sec_successor;
  public $_Dependency_Successor=array();
  public $_sec_Link;
  public $_Link=array();
  public $_Attachment=array();
  public $_Note=array();
  
  public $_nbColMax=3;

But best way is :
-copy Activity.php in /model/custom
- copy fields description from /model/ActivityMain.php to /model/custom/Activity.php
- change order or fields in /model/custom/Activity.php
This should do the job and will not be overwritten by new versions.


 
Posted : 29 Jul 2015 13H46
(@iconic)
Posts: 280
Active Member
Topic starter
 

I think I made an error as I am now receiving the following error.
"Fatal error: Class 'Activity' not found in /home/iconicprod/public_html/Project-Management/view/objectList.php on line 42"

I did as you said and made a copy in of Activity.php in .../model/custom

Here is what I copied and is now showing in Activity.php in .../model/custom

require_once('_securityCheck.php');
class ActivityMain extends SqlElement {
 
  // List of fields that will be exposed in general user interface
  // List of fields that will be exposed in general user interface
  public $_sec_description;
  public $id;    // redefine $id to specify its visible place 
  public $reference;
  public $name;
  public $idActivityType;
  public $idProject;
  public $externalReference;  
  public $creationDate;
  public $idUser;
  public $idContact;
  public $Origin;
  public $description;  
  public $_sec_treatment;
  public $idActivity;
  public $idStatus;
  public $idResource;  
  public $handled;
  public $handledDate;
  public $done;
  public $doneDate;
  public $idle;
  public $idleDate;
  public $cancelled;
  public $_lib_cancelled;
  public $idTargetVersion;
  public $result;
  public $_sec_Assignment;
  public $_Assignment=array();
  public $_sec_Progress;
  public $ActivityPlanningElement; // is an object
 
  public $_Note=array();
  public $_Attachment=array();
  public $_sec_Link;
  public $_Link=array();  
  public $_sec_predecessor;
  public $_Dependency_Predecessor=array();
  public $_sec_successor;
  public $_Dependency_Successor=array();
 
  public $_nbColMax=3;
  
   /** ==========================================================================
   * Constructor
   * @param $id the id of the object in the database (null if not stored yet)
   * @return void
   */ 
  function __construct($id = NULL, $withoutDependentObjects=false) {
    parent::__construct($id,$withoutDependentObjects);
  }

   /** ==========================================================================
   * Destructor
   * @return void
   */ 
  function __destruct() {
    parent::__destruct();
  }


}
?>

What have I done wrong?


 
Posted : 29 Jul 2015 14H03
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Issue is that you copied all what I showed.
You should just have copied fields (lines starting with public)
The most important is the class definition that must be :

class Activity extends ActivityMain {

 
Posted : 29 Jul 2015 14H08
(@iconic)
Posts: 280
Active Member
Topic starter
 

Fixed that, however the I have moved Notes to be on the top, but the
Predecessor element | Successor Element | Linked Elements

are still in the same order, they are just showing below it.

Here is an image.


 
Posted : 29 Jul 2015 14H16
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Can you sow your definition (code of class) ?


 
Posted : 29 Jul 2015 14H41
(@iconic)
Posts: 280
Active Member
Topic starter
 

Here is the code i am using.

class Activity extends ActivityMain {
 
  // List of fields that will be exposed in general user interface
  // List of fields that will be exposed in general user interface
  public $_sec_description;
  public $id;    // redefine $id to specify its visible place 
  public $reference;
  public $name;
  public $idActivityType;
  public $idProject;
  public $externalReference;  
  public $creationDate;
  public $idUser;
  public $idContact;
  public $Origin;
  public $description;  
  public $_sec_treatment;
  public $idActivity;
  public $idStatus;
  public $idResource;  
  public $handled;
  public $handledDate;
  public $done;
  public $doneDate;
  public $idle;
  public $idleDate;
  public $cancelled;
  public $_lib_cancelled;
  public $idTargetVersion;
  public $result;
  public $_sec_Progress;
  public $ActivityPlanningElement; // is an object
 
  public $_sec_Link;
  public $_Link=array();  
  public $_sec_predecessor;
  public $_Dependency_Predecessor=array();
  public $_sec_successor;
  public $_Dependency_Successor=array();
  public $_Attachment=array();
  public $_Note=array();
  public $_sec_Assignment;
  public $_Assignment=array();
 
  public $_nbColMax=3;
  
}
?>

 
Posted : 29 Jul 2015 15H19
(@iconic)
Posts: 280
Active Member
Topic starter
 

Hi there, any further assistance would be greatly appreciated


 
Posted : 30 Jul 2015 13H42
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

You must have done somethong wrong.
When I try your new Activity.php (in /model/custom) I get this :

(I just closed sections just to show order).
It fist what you defined...


 
Posted : 30 Jul 2015 14H36
(@iconic)
Posts: 280
Active Member
Topic starter
 

I noticed that yours is setup in 2 columns, whereas I have 3 columns setup. Would this be the issue?


 
Posted : 30 Jul 2015 14H40
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Here is result on 3 columns :


 
Posted : 30 Jul 2015 14H45
(@iconic)
Posts: 280
Active Member
Topic starter
 

Yes, that is similar to what I have, and there is the issue I am having.

You see, I want Notes and Linked elements to be in the position of where Predecessor and Successor Elements are.

In essence, I want Notes in the first column where Predescessor is.

Is there anyway i can do this?


 
Posted : 30 Jul 2015 16H42
(@iconic)
Posts: 280
Active Member
Topic starter
 

Hi there,
Any further updates with this would be greatly appreciated


 
Posted : 01 Aug 2015 14H12
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Field description should be (for instance)

 public $_sec_description;
  public $id;    // redefine $id to specify its visible place 
  public $reference;
  public $name;
  public $idActivityType;
  public $idProject;
  public $externalReference;  
  public $creationDate;
  public $idUser;
  public $idContact;
  public $Origin;
  public $description;  
  public $_sec_treatment;
  public $idActivity;
  public $idStatus;
  public $idResource;  
  public $handled;
  public $handledDate;
  public $done;
  public $doneDate;
  public $idle;
  public $idleDate;
  public $cancelled;
  public $_lib_cancelled;
  public $idTargetVersion;
  public $result;
  public $_sec_Progress;
  public $ActivityPlanningElement; // is an object
   public $_sec_Assignment;
  public $_Assignment=array();
  public $_Note=array();
  public $_sec_Link;
  public $_Link=array();  
  public $_Attachment=array();
  public $_sec_predecessor;
  public $_Dependency_Predecessor=array();
  public $_sec_successor;
  public $_Dependency_Successor=array();
 
  public $_nbColMax=3;

and in /view/objectDetail.php, about line 1676 , values for $arrayPosition , correct

'note'=>          array('float'=>'left',  'clear'=>'left')
'link'=>          array('float'=>'left', 'clear'=>'none'),

Pay attention, these change will have to be reapplied after each upgrade of new version.


 
Posted : 01 Aug 2015 19H13
(@iconic)
Posts: 280
Active Member
Topic starter
 

I made the changes, however there was no change. The notes are still showing on the left.

Here is the code to show you that I made the changes

    $arrayPosition=array(
         'treatment'=>     array('clear'=>(($nbCol==2)?'right':'none')),
         'progress'=>      array('float'=>(($nbCol==2)?'right':'left'), 'clear'=>(($nbCol==2)?'right':'none')),
         'predecessor'=>   array('clear'=>(($nbCol==2)?'both':(($classObj=='Activity')?'left':'none'))),
         'successor'=>     array('float'=>(($nbCol==2 or $classObj!='Project')?'left':'right'),  'clear'=>'none'),
        
         //'subprojects'=>   array('float'=>(($nbCol==2)?'left':'left'),   'clear'=>(($nbCol==2)?'left':'none')),
         'versionproject_versions'=>array('float'=>(($nbCol==2)?'right':'left'),  'clear'=>'right'),
         
         'version'=>       array('float'=>(($nbCol==2)?'right':'left'),  'clear'=>'none'),
         'approver'=>      array('float'=>'right','clear'=>'right'),
         'lock'=>          array('float'=>(($nbCol==2)?'left':'right'),  'clear'=>(($nbCol==2)?'none':'right')),
        
         'assignment'=>    array('float'=>'left','clear'=>(($nbCol==2)?'left':'none')),
         'attendees'=>     array('float'=>'left','clear'=>(($nbCol==2)?'left':'none')),
        
        //'periodicity'=>    array('float'=>'left','clear'=>'left'),
        
        'internalalert'=>  array('float'=>'right'),
        
        'expensedetail'=>      array('clear'=>'left'),
         'billline'=>      array('clear'=>'left'),
         'link'=>          array('float'=>'left', 'clear'=>'none'),
         'attachment'=>    array('float'=>'left',  'clear'=>'none'),
         'note'=>          array('float'=>'left',  'clear'=>'left')

 
Posted : 03 Aug 2015 3H48
(@iconic)
Posts: 280
Active Member
Topic starter
 

Hi there,
Are they are further updates with regards to this?


 
Posted : 05 Aug 2015 8H53
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

No, sorry.
Busy with other things.
No time to support devs if you don't mind investigating yourself.


 
Posted : 05 Aug 2015 16H54
(@iconic)
Posts: 280
Active Member
Topic starter
 

That is a bit disappointing. I understand that you are busy with other things, but disappointed.


 
Posted : 10 Aug 2015 6H56
Share:

Scroll to Top