qdPM Extended
project management software for growth
qdPM Extended based on free version of qdPM and has extended functionality and extra features read more.
Home About What's New? Features Demo Buy Now Translations Bug Report Forum Blog Contact Us

Project page tab

Moderators: flyingkites, qdPM_Support

<<

bermark

Posts: 6

Joined: Thu Mar 10, 2016 9:47 am

Post Fri Mar 11, 2016 4:00 pm

Project page tab

Is there any way to land on Project Info tab by default instead of landing on the last tab enabled?
<<

flyingkites

Site Admin

Posts: 281

Joined: Wed Nov 03, 2010 9:06 am

Post Sun Mar 13, 2016 1:00 pm

Re: Project page tab

Not without a code change.
<<

newsmark

Posts: 36

Joined: Fri Mar 11, 2016 1:24 pm

Post Mon Mar 14, 2016 9:34 am

Re: Project page tab

bermark wrote:
> Is there any way to land on Project Info tab by default instead of landing
> on the last tab enabled?

Yes, I have this setup on my installation.

Go to this file:

core/apps/qdPMExtended/modules/projects/actions/actions.class.php

You want to comment out the conditions within the executeOpen function on line 13. So, change this:

public function executeOpen(sfWebRequest $request)
{
if($ug = Doctrine_Core::getTable('UsersGroups')->find($this->getUser()->getAttribute('users_group_id')))
{
$role = Doctrine_Core::getTable('ProjectsRoles')->createQuery()->addWhere('users_id=?',$this->getUser()->getAttribute('id'))->addWhere('projects_id=?',$request->getParameter('projects_id'))->fetchOne();

if($role)
{
$ug = Doctrine_Core::getTable('UsersGroups')->find($role->getUsersGroupsId());
}

switch(true)
{
case strlen($ug->getAllowManageTasks())>0:
$this->redirect('tasks/index?projects_id=' . $request->getParameter('projects_id'));
break;
case strlen($ug->getAllowManageTickets())>0:
$this->redirect('tickets/index?projects_id=' . $request->getParameter('projects_id'));
break;

case strlen($ug->getAllowManageDiscussions())>0:
$this->redirect('discussions/index?projects_id=' . $request->getParameter('projects_id'));
break;
default:
$this->redirect('projectsComments/index?projects_id=' . $request->getParameter('projects_id'));
break;
}
}
else
{
$this->redirect('projectsComments/index?projects_id=' . $request->getParameter('projects_id'));
}
}




to this:




public function executeOpen(sfWebRequest $request)
{
/*if($ug = Doctrine_Core::getTable('UsersGroups')->find($this->getUser()->getAttribute('users_group_id')))
{
$role = Doctrine_Core::getTable('ProjectsRoles')->createQuery()->addWhere('users_id=?',$this->getUser()->getAttribute('id'))->addWhere('projects_id=?',$request->getParameter('projects_id'))->fetchOne();

if($role)
{
$ug = Doctrine_Core::getTable('UsersGroups')->find($role->getUsersGroupsId());
}

switch(true)
{
case strlen($ug->getAllowManageTasks())>0:
$this->redirect('tasks/index?projects_id=' . $request->getParameter('projects_id'));
break;
case strlen($ug->getAllowManageTickets())>0:
$this->redirect('tickets/index?projects_id=' . $request->getParameter('projects_id'));
break;

case strlen($ug->getAllowManageDiscussions())>0:
$this->redirect('discussions/index?projects_id=' . $request->getParameter('projects_id'));
break;
default:
$this->redirect('projectsComments/index?projects_id=' . $request->getParameter('projects_id'));
break;
}
}
else
{ */
$this->redirect('projectsComments/index?projects_id=' . $request->getParameter('projects_id'));
//}
}
<<

bermark

Posts: 6

Joined: Thu Mar 10, 2016 9:47 am

Post Tue Mar 15, 2016 3:31 am

Re: Project page tab

Thank you very much it works great... :D

newsmark wrote:
> bermark wrote:
> > Is there any way to land on Project Info tab by default instead of landing
> > on the last tab enabled?
>
> Yes, I have this setup on my installation.
>
> Go to this file:
>
> core/apps/qdPMExtended/modules/projects/actions/actions.class.php
>
> You want to comment out the conditions within the executeOpen function on line 13.
> So, change this:
>
> public function executeOpen(sfWebRequest $request)
> {
> if($ug =
> Doctrine_Core::getTable('UsersGroups')->find($this->getUser()->getAttribute('users_group_id')))
> {
> $role =
> Doctrine_Core::getTable('ProjectsRoles')->createQuery()->addWhere('users_id=?',$this->getUser()->getAttribute('id'))->addWhere('projects_id=?',$request->getParameter('projects_id'))->fetchOne();
>
> if($role)
> {
> $ug =
> Doctrine_Core::getTable('UsersGroups')->find($role->getUsersGroupsId());
> }
>
> switch(true)
> {
> case strlen($ug->getAllowManageTasks())>0:
> $this->redirect('tasks/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> case strlen($ug->getAllowManageTickets())>0:
> $this->redirect('tickets/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
>
> case strlen($ug->getAllowManageDiscussions())>0:
> $this->redirect('discussions/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> default:
> $this->redirect('projectsComments/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> }
> }
> else
> {
> $this->redirect('projectsComments/index?projects_id=' .
> $request->getParameter('projects_id'));
> }
> }
>
>
>
>
> to this:
>
>
>
>
> public function executeOpen(sfWebRequest $request)
> {
> /*if($ug =
> Doctrine_Core::getTable('UsersGroups')->find($this->getUser()->getAttribute('users_group_id')))
> {
> $role =
> Doctrine_Core::getTable('ProjectsRoles')->createQuery()->addWhere('users_id=?',$this->getUser()->getAttribute('id'))->addWhere('projects_id=?',$request->getParameter('projects_id'))->fetchOne();
>
> if($role)
> {
> $ug =
> Doctrine_Core::getTable('UsersGroups')->find($role->getUsersGroupsId());
> }
>
> switch(true)
> {
> case strlen($ug->getAllowManageTasks())>0:
> $this->redirect('tasks/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> case strlen($ug->getAllowManageTickets())>0:
> $this->redirect('tickets/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
>
> case strlen($ug->getAllowManageDiscussions())>0:
> $this->redirect('discussions/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> default:
> $this->redirect('projectsComments/index?projects_id=' .
> $request->getParameter('projects_id'));
> break;
> }
> }
> else
> { */
> $this->redirect('projectsComments/index?projects_id=' .
> $request->getParameter('projects_id'));
> //}
> }

Return to Version 4 Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.