Файловый менеджер - Редактировать - /var/www/html/administrator/components/com_jchat/View/Meetings/HtmlView.php
Ðазад
<?php namespace JExtstore\Component\JChat\Administrator\View\Meetings; /** * @package JCHAT::MEETINGS::administrator::components::com_jchat * @subpackage views * @subpackage rooms * @author Joomla! Extensions Store * @Copyright (C) 2015 - Joomla! Extensions Store * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html */ defined ( '_JEXEC' ) or die ( 'Restricted access' ); use Joomla\CMS\Language\Text; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\Pagination\Pagination; use JExtstore\Component\JChat\Administrator\Framework\View as JChatView; /** * @package JCHAT::MEETINGS::administrator::components::com_jchat * @subpackage views * @subpackage rooms * @since 2.44 */ class HtmlView extends JChatView { // Template view variables protected $pagination; protected $searchword; protected $lists; protected $orders; protected $items; protected $record; /** * Add the page title and toolbar. * * @since 1.6 */ protected function addEditEntityToolbar() { $user = $this->app->getIdentity(); $userId = $user->get('id'); $isNew = ($this->record->id == 0); $checkedOut = !($this->record->checked_out == 0 || $this->record->checked_out == $userId); $toolbarHelperTitle = $isNew ? 'COM_JCHAT_MEETING_NEW' : 'COM_JCHAT_MEETING_EDIT'; $doc = $this->app->getDocument(); ToolBarHelper::title( Text::_( $toolbarHelperTitle ), 'jchat' ); if ($isNew) { // For new records, check the create permission. if ($isNew && ($user->authorise('core.create', 'com_jchat'))) { ToolBarHelper::apply( 'meetings.applyEntity', 'JAPPLY'); ToolBarHelper::save( 'meetings.saveEntity', 'JSAVE'); ToolBarHelper::save2new( 'meetings.saveEntity2New'); } } else { // Can't save the record if it's checked out. if (!$checkedOut) { // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. if ($user->authorise('core.edit', 'com_jchat')) { ToolBarHelper::apply( 'meetings.applyEntity', 'JAPPLY'); ToolBarHelper::save( 'meetings.saveEntity', 'JSAVE'); ToolBarHelper::save2new( 'meetings.saveEntity2New'); } } } ToolBarHelper::custom('meetings.cancelEntity', 'cancel', 'cancel', 'JCANCEL', false); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addDisplayToolbar() { $user = $this->app->getIdentity(); ToolBarHelper::title( Text::_('COM_JCHAT_MAINTITLE_TOOLBAR') . Text::_( 'COM_JCHAT_LIST_MEETINGS' ), 'jchat' ); ToolBarHelper::addNew('meetings.editEntity', 'COM_JCHAT_ADD_MEETING'); ToolBarHelper::editList('meetings.editEntity', 'COM_JCHAT_EDIT_MEETING'); ToolBarHelper::deleteList(Text::_('COM_JCHAT_DELETE_MEETING'), 'meetings.deleteEntity'); ToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JCHAT_CPANEL', false); } /** * Default display listEntities * * @access public * @param string $tpl * @return void */ public function display($tpl = 'list') { // Get main records $rows = $this->get ( 'Data' ); $lists = $this->get ( 'Filters' ); $total = $this->get ( 'Total' ); $doc = $this->app->getDocument(); $this->loadJQuery($doc); $this->loadBootstrap($doc); $orders = array (); $orders ['order'] = $this->getModel ()->getState ( 'order' ); $orders ['order_Dir'] = $this->getModel ()->getState ( 'order_dir' ); // Pagination view object model state populated $pagination = new Pagination ( $total, $this->getModel ()->getState ( 'limitstart' ), $this->getModel ()->getState ( 'limit' ) ); $this->pagination = $pagination; $this->searchword = $this->getModel ()->getState ( 'searchword' ); $this->lists = $lists; $this->orders = $orders; $this->items = $rows; $this->document = $doc; // Aggiunta toolbar $this->addDisplayToolbar(); parent::display ($tpl); } /** * Edit entity view * * @access public * @param Object& $row the item to edit * @return void */ public function editEntity($row) { // Sanitize HTML Object2Form OutputFilter::objectHTMLSafe( $row ); // Load JS Client App dependencies $doc = $this->app->getDocument(); $base = Uri::root(); $this->loadJQuery($doc); $this->loadBootstrap($doc); $this->loadValidation($doc); $this->loadSelect2($doc); $doc->getWebAssetManager()->addInlineStyle('@media (max-width: 640px) { body.admin.com_jchat { min-width: 640px; }}'); // Inject js translations $translations = array ( 'COM_JCHAT_SELECT2_PLACEHOLDER', 'COM_JCHAT_SELECT2_COPIED' ); $this->injectJsTranslations($translations, $doc); // Load specific JS App $doc->addScriptDeclaration(" Joomla.submitbutton = function(pressbutton) { if(!jQuery.fn.validation) { jQuery.extend(jQuery.fn, jchatjQueryBackup.fn); } jQuery('#adminForm').validation(); if (pressbutton == 'meetings.cancelEntity') { jQuery('#adminForm').off(); Joomla.submitform( pressbutton ); return true; } if(jQuery('#adminForm').validate()) { Joomla.submitform( pressbutton ); return true; } return false; } "); $lists = $this->getModel()->getLists($row); $this->record = $row; $this->lists = $lists; // Aggiunta toolbar $this->addEditEntityToolbar(); parent::display ( 'edit' ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка