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.

Date & Status on Category List

More
7 years 11 months ago #45540 by DiGwork
DiGwork replied the topic: Date & Status on Category List
I must also add that I cannot seem to display status in the Category list either. And how do you edit status in the front end as clicking on the edit button in the status list does nothing??

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

More
7 years 11 months ago #45543 by tim
tim replied the topic: Date & Status on Category List
It sounds like you may have a javascript conflict. Please apply protostar template and see if the problem persists.

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

More
7 years 11 months ago #45548 by DiGwork
DiGwork replied the topic: Date & Status on Category List
Nope just tested it on Potostar and the Edit button does nothing in the project list view and when you select edit in the detail view it just takes you back to the list view.

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

More
7 years 11 months ago #45552 by tim
tim replied the topic: Date & Status on Category List
Please post a link.

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

More
7 years 11 months ago #45595 by DiGwork
DiGwork replied the topic: Date & Status on Category List
Unfortunately due to the retail competitive nature of the clients work I cannot post a public link

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

  • ninjanody
  • ninjanody's Avatar Topic Author
  • Offline
  • Puzzler
  • Puzzler
More
7 years 11 months ago - 7 years 11 months ago #45596 by ninjanody
ninjanody replied the topic: Date & Status on Category List
I have managed to display the fields i like on the frontend by some code tweaking.

Steps:
Create template override for com_projectlog -> category
Backup file/components/com_projectlog/views/category/tmpl/default.xml and add the following to the end of the <fields> group.
<!-- Custom options. -->
		<fieldset name="custom" label="JGLOBAL_CUSTOM_LABEL" description="COM_PROJECTLOG_CONFIG_CUSTOM_SETTINGS_DESC">
			<field name="show_project_date"
                type="list"
				class="chzn-color"
                label="COM_PROJECTLOG_DATE_LABEL" 
                description="COM_PROJECTLOG_FIELD_DATE_FORMAT_DESC"
                >         
				<option value="">JGLOBAL_USE_GLOBAL</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
            </field>
 
			<field name="show_project_status"
                type="list"
				class="chzn-color"
                label="COM_PROJECTLOG_STATUS_LABEL" 
                description="COM_PROJECTLOG_FIELD_STATUS_DESC"
                >         
				<option value="">JGLOBAL_USE_GLOBAL</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
            </field>
 
			<field name="show_contract_from"
                type="list"
				class="chzn-color"
                label="COM_PROJECTLOG_CONTRACT_FROM_DATE_LABEL" 
                description="COM_PROJECTLOG_FIELD_CONTRACT_FROM_DATE_DESC"
                >         
				<option value="">JGLOBAL_USE_GLOBAL</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
            </field>
        </fieldset>

Open file /templates/yourtemplate/html/com_projectlog/category/default_items.php and add the following after line 77.
<?php if ($this->params->get('show_contract_from')) : ?>
                        <th><?php echo JHtml::_('grid.sort', 'COM_PROJECTLOG_CONTRACT_FROM_DATE', 'contract_from', $listDirn, $listOrder); ?></th>
                    <?php endif; ?>
					<?php if ($this->params->get('show_project_status')) : ?>
                        <th><?php echo JHtml::_('grid.sort', 'COM_PROJECTLOG_STATUS_LABEL', 'status', $listDirn, $listOrder); ?></th>
                    <?php endif; ?>
					<?php if ($this->params->get('show_release_date')) : ?>
                        <th><?php echo JHtml::_('grid.sort', 'COM_PROJECTLOG_COMPLETE_DATE', 'release_date', $listDirn, $listOrder); ?></th>
                    <?php endif; ?>

Open file /templates/yourtemplate/html/com_projectlog/category/default_items.php and add the following after line 132.
                        <?php if ($this->params->get('show_contract_from') AND !empty($item->contract_from)) : ?>
                            <td><?php echo JHTML::date($item->contract_from, $item->params->get('pl_date_format')); ?></td>
						<?php endif; ?>
<?php if ($this->params->get('show_project_status')) : ?>
                            <td><?php echo ($item->params->get('show_project_status') AND !empty($item->status)) ? $item->status : '--'; ?></td>
						<?php endif; ?>
 
						<?php if ($this->params->get('show_release_date')) : ?>
                            <td><?php echo JHTML::date($item->release_date, $item->params->get('pl_date_format')); ?></td>
						<?php endif; ?>	

Now you will have an output and menu config option like the included screenshots exept the translation. I have change some of the field translation based on my needs.
Attachments:
Last Edit: 7 years 11 months ago by ninjanody.

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

Moderators: vinny
Time to create page: 0.336 seconds