File manager - Edit - /home/capoccitel/www/administrator/components/com_rtform/views/submissions/view.html.php
Back
<?php /** * @version CVS: 1.0.0 * @package Com_Rtform * @author Radius Theme <support@radiustheme.com> * @copyright 2016 RadiusTheme.com * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access defined('_JEXEC') or die; jimport('joomla.application.component.view'); /** * View class for a list of Rtform. * * @since 1.6 */ class RtformViewSubmissions extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view * * @param string $tpl Template name * * @return void * * @throws Exception */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } RtformHelpersRtform::addSubmenu('submissions'); $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = RtformHelpersRtform::getActions(); JToolBarHelper::title(JText::_('COM_RTFORM_TITLE_SUBMISSIONS'), 'submissions.png'); // Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/submit'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('submit.add', 'JTOOLBAR_NEW'); JToolbarHelper::custom('submissions.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('submit.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('submissions.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('submissions.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } elseif (isset($this->items[0])) { // If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'submissions.delete', 'JTOOLBAR_DELETE'); } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('submissions.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('submissions.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } // Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'submissions.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('submissions.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_rtform'); } // Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_rtform&view=submissions'); $this->extra_sidebar = ''; //Filter for the field appointment_date $this->extra_sidebar .= '<div class="other-filters">'; $this->extra_sidebar .= '<small><label for="filter_from_appointment_date">'. JText::sprintf('COM_RTFORM_FROM_FILTER', 'Appointment Date') .'</label></small>'; $this->extra_sidebar .= JHtml::_('calendar', $this->state->get('filter.appointment_date.from'), 'filter_from_appointment_date', 'filter_from_appointment_date', '%Y-%m-%d', array('style' => 'width:142px;', 'onchange' => 'this.form.submit();')); $this->extra_sidebar .= '<small><label for="filter_to_appointment_date">'. JText::sprintf('COM_RTFORM_TO_FILTER', 'Appointment Date') .'</label></small>'; $this->extra_sidebar .= JHtml::_('calendar', $this->state->get('filter.appointment_date.to'), 'filter_to_appointment_date', 'filter_to_appointment_date', '%Y-%m-%d', array('style' => 'width:142px;', 'onchange'=> 'this.form.submit();')); $this->extra_sidebar .= '</div>'; $this->extra_sidebar .= '<hr class="hr-condensed">'; JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true) ); } /** * Method to order fields * * @return void */ protected function getSortFields() { return array( 'a.`id`' => JText::_('JGRID_HEADING_ID'), 'a.`name`' => JText::_('COM_RTFORM_SUBMISSIONS_NAME'), 'a.`email`' => JText::_('COM_RTFORM_SUBMISSIONS_EMAIL'), 'a.`appointment_date`' => JText::_('COM_RTFORM_SUBMISSIONS_APPOINTMENT_DATE'), 'a.`phone`' => JText::_('COM_RTFORM_SUBMISSIONS_PHONE'), 'a.`ordering`' => JText::_('JGRID_HEADING_ORDERING'), 'a.`state`' => JText::_('JSTATUS'), ); } }
| ver. 1.6 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings