Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* View class for a list of contacts.
* @package Joomla.Administrator
* @subpackage com_contact
public function display($tpl =
null)
if (count($errors =
$this->get('Errors')))
// Preprocess the list of items to find ordering divisions.
// TODO: Complete the ordering stuff with nested sets
foreach ($this->items as &$item)
* Add the page title and toolbar.
require_once JPATH_COMPONENT .
'/helpers/contact.php';
// Get the toolbar object instance
$bar =
JToolBar::getInstance('toolbar');
if ($canDo->get('core.create') ||
(count($user->getAuthorisedCategories('com_contact', 'core.create'))) >
0)
if (($canDo->get('core.edit')) ||
($canDo->get('core.edit.own')))
if ($canDo->get('core.edit.state'))
if ($this->state->get('filter.published') == -
2 &&
$canDo->get('core.delete'))
elseif ($canDo->get('core.edit.state'))
if ($user->authorise('core.create', 'com_contacts') &&
$user->authorise('core.edit', 'com_contacts') &&
$user->authorise('core.edit.state', 'com_contacts'))
JHtml::_('bootstrap.modal', 'collapseModal');
$title =
JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$dhtml =
$layout->render(array('title' =>
$title));
$bar->appendButton('Custom', $dhtml, 'batch');
if ($canDo->get('core.admin'))
JText::_('JOPTION_SELECT_PUBLISHED'),
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
JText::_('JOPTION_SELECT_CATEGORY'),
JHtml::_('select.options', JHtml::_('category.options', 'com_contact'), 'value', 'text', $this->state->get('filter.category_id'))
JText::_('JOPTION_SELECT_ACCESS'),
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
JText::_('JOPTION_SELECT_LANGUAGE'),
JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))
JText::_('JOPTION_SELECT_TAG'),
JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))
* Returns an array of fields the table can be sorted by
* @return array Array containing the field name to sort by as the key and display text as value
'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
'a.published' =>
JText::_('JSTATUS'),
'a.name' =>
JText::_('JGLOBAL_TITLE'),
'category_title' =>
JText::_('JCATEGORY'),
'ul.name' =>
JText::_('COM_CONTACT_FIELD_LINKED_USER_LABEL'),
'a.featured' =>
JText::_('JFEATURED'),
'a.access' =>
JText::_('JGRID_HEADING_ACCESS'),
'a.language' =>
JText::_('JGRID_HEADING_LANGUAGE'),
'a.id' =>
JText::_('JGRID_HEADING_ID')
Documentation generated on Tue, 19 Nov 2013 15:16:50 +0100 by phpDocumentor 1.4.3