The Thinkery

Not finding what you're looking for? Don't hesitate to contact us!

Before Posting...

Before posting questions in the forums, please be sure to read the FAQs by clicking on the FAQs link in the sidebar product menu. You must be logged in and have a valid subscription to access the SUPPORT FORUMS.
×
Support Policy Notice

As outlined in our Rules section (though never closely followed by our staff!), effective immediately we will no longer be taking time to provide customizations of our products.

Adding status options

  • s.knuckles
  • s.knuckles's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
13 years 3 months ago #1180 by s.knuckles
s.knuckles replied the topic: RE: Adding status options
any takers?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #1181 by soshkt
soshkt replied the topic: RE: Adding status options
Hi - this isn't as easy as it sounds without losing some functionality - you can add more status options to the 'statusSelect()' method in the html.helper.php file, but that would break the quick change to be able to swap the status by clicking on it like you currently can in the project overview list. You could always disable that functionality -- we can't really support this customization but you're welcome to give it a shot. Thanks.

Please Log in or Create an account to join the conversation.

  • s.knuckles
  • s.knuckles's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
13 years 3 months ago #1189 by s.knuckles
s.knuckles replied the topic: RE: Adding status options
Why does it break the quick change?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #1193 by vinny
vinny replied the topic: RE: Adding status options
It breaks the quick change because there is a switch looking for the original status types and it will swap colors/text according to what the current status is and what the next status on the list is. Could probably write it to work no matter how many status levels there are, but it's not currently written that way.

Vinny - The Thinkery
Good reviews on the JED make us work harder :) | IProperty | Work Force | Report Card

Please Log in or Create an account to join the conversation.

  • s.knuckles
  • s.knuckles's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
13 years 3 months ago #1194 by s.knuckles
s.knuckles replied the topic: RE: Adding status options
wasn't that hard to figure out, and I'm not a programmer! =D

Add your extra options in this file

/components/com_projectlog/models/cat.php

change BOLD areas

Line 188
switch($oldstatus)
{
case JText::_('IN PROGRESS'):
$newstatus = JText::_('NEXT STATUS');
break;

case JText::_('NEW STATUS'):
$newstatus = JText::_('NEXT STATUS');
break;

case JText::_('ON HOLD'):
$newstatus = JText::_('COMPLETE');
break;

case JText::_('COMPLETE'):
$newstatus = JText::_('IN PROGRESS');
break;       

default:
$newstatus = JText::_('IN PROGRESS');
break;
}




To change in the administrator backend edit this file

/administrator/components/com_projectlog/models/projects.php

Copy and paste the same settings from the previous file. Line 218 starts the area.




To change in the category default view edit this file

/components/com_projectlog/views/cat/tmpl/default.php

line 110

switch( $p->status ){
case JText::_('IN PROGRESS'):
$statusclass = 'green';
break;
case JText::_('ON HOLD'):
$statusclass = 'orange';
break;
case JText::_('NEW STATUS'):
$statusclass = 'COLOR';
break;
case JText::_('COMPLETE'):
$statusclass = 'green';
break;
default:
$statusclass = 'green';
break;
}


COLOR in the previous can only be green, red, or orange, unless you add new definitions to the .css file.

You can make an entry in the projectlog language file for the new status options.


Don't forget to backup your files.

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #1197 by vinny
vinny replied the topic: RE: Adding status options
Glad you figured it out and thanks for posting your solution!

Vinny - The Thinkery
Good reviews on the JED make us work harder :) | IProperty | Work Force | Report Card

Please Log in or Create an account to join the conversation.

Moderators: vinny
Time to create page: 0.421 seconds