+
+
+
+items)): ?>
+ loadTemplate('toolbar');?>
+
+
+
+
+ loadTemplate('toolbar');?>
+
+ loadTemplate('head');?>
+ loadTemplate('foot');?>
+ loadTemplate('body');?>
+
+
+ canCreate && $this->canEdit) : ?>
+ JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS_BATCH_OPTIONS'),
+ 'footer' => $this->loadTemplate('batch_footer')
+ ),
+ $this->loadTemplate('batch_body')
+ ); ?>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_batch_body.php b/admin/views/language_placeholders/tmpl/default_batch_body.php
new file mode 100644
index 000000000..5c011683f
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_batch_body.php
@@ -0,0 +1,32 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+?>
+
+
+batchDisplay; ?>
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_batch_footer.php b/admin/views/language_placeholders/tmpl/default_batch_footer.php
new file mode 100644
index 000000000..c949e886e
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_batch_footer.php
@@ -0,0 +1,37 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+?>
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_body.php b/admin/views/language_placeholders/tmpl/default_body.php
new file mode 100644
index 000000000..f70d8b322
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_body.php
@@ -0,0 +1,111 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+$edit = "index.php?option=com_componentbuilder&view=language_placeholders&task=language_placeholder.edit";
+
+?>
+items as $i => $item): ?>
+ user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
+ $userChkOut = JFactory::getUser($item->checked_out);
+ $canDo = ComponentbuilderHelper::getActions('language_placeholder',$item,'language_placeholders');
+ ?>
+
+
+ get('language_placeholder.edit.state')): ?>
+ saveOrder)
+ {
+ $iconClass = ' inactive';
+ }
+ else
+ {
+ $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
+ }
+ ?>
+
+
+
+ saveOrder) : ?>
+
+
+
+ ⋮
+
+ |
+
+ get('language_placeholder.edit')): ?>
+ checked_out) : ?>
+
+ id); ?>
+
+ □
+
+
+ id); ?>
+
+
+ □
+
+ |
+
+ get('language_placeholder.edit')): ?>
+
+
+ escape($item->placeholder); ?>
+
+ |
+
+ escape($item->components); ?>
+ |
+
+ get('language_placeholder.edit.state')) : ?>
+ checked_out) : ?>
+
+ published, $i, 'language_placeholders.', true, 'cb'); ?>
+
+ published, $i, 'language_placeholders.', false, 'cb'); ?>
+
+
+ published, $i, 'language_placeholders.', true, 'cb'); ?>
+
+
+ published, $i, 'language_placeholders.', false, 'cb'); ?>
+
+ |
+
+ id; ?>
+ |
+
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_foot.php b/admin/views/language_placeholders/tmpl/default_foot.php
new file mode 100644
index 000000000..00796167e
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_foot.php
@@ -0,0 +1,32 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+?>
+
+ pagination->getListFooter(); ?> |
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_head.php b/admin/views/language_placeholders/tmpl/default_head.php
new file mode 100644
index 000000000..67db508f1
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_head.php
@@ -0,0 +1,64 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+?>
+
+ canEdit&& $this->canState): ?>
+
+ ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
+ |
+
+
+ |
+
+
+ ▾
+ |
+
+ ■
+ |
+
+
+ listDirn, $this->listOrder); ?>
+ |
+
+ listDirn, $this->listOrder); ?>
+ |
+ canState): ?>
+
+ listDirn, $this->listOrder); ?>
+ |
+
+
+
+ |
+
+
+ listDirn, $this->listOrder); ?>
+ |
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/default_toolbar.php b/admin/views/language_placeholders/tmpl/default_toolbar.php
new file mode 100644
index 000000000..095cbe62b
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/default_toolbar.php
@@ -0,0 +1,59 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+?>
+
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/tmpl/index.html b/admin/views/language_placeholders/tmpl/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/admin/views/language_placeholders/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/admin/views/language_placeholders/view.html.php b/admin/views/language_placeholders/view.html.php
new file mode 100644
index 000000000..777b6c5f0
--- /dev/null
+++ b/admin/views/language_placeholders/view.html.php
@@ -0,0 +1,255 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+// import Joomla view library
+jimport('joomla.application.component.view');
+
+/**
+ * Componentbuilder View class for the Language_placeholders
+ */
+class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
+{
+ /**
+ * Language_placeholders view display method
+ * @return void
+ */
+ function display($tpl = null)
+ {
+ if ($this->getLayout() !== 'modal')
+ {
+ // Include helper submenu
+ ComponentbuilderHelper::addSubmenu('language_placeholders');
+ }
+
+ // Check for errors.
+ if (count($errors = $this->get('Errors')))
+ {
+ JError::raiseError(500, implode('
', $errors));
+ return false;
+ }
+
+ // Assign data to the view
+ $this->items = $this->get('Items');
+ $this->pagination = $this->get('Pagination');
+ $this->state = $this->get('State');
+ $this->user = JFactory::getUser();
+ $this->listOrder = $this->escape($this->state->get('list.ordering'));
+ $this->listDirn = $this->escape($this->state->get('list.direction'));
+ $this->saveOrder = $this->listOrder == 'ordering';
+ // get global action permissions
+ $this->canDo = ComponentbuilderHelper::getActions('language_placeholder');
+ $this->canEdit = $this->canDo->get('language_placeholder.edit');
+ $this->canState = $this->canDo->get('language_placeholder.edit.state');
+ $this->canCreate = $this->canDo->get('language_placeholder.create');
+ $this->canDelete = $this->canDo->get('language_placeholder.delete');
+ $this->canBatch = $this->canDo->get('core.batch');
+
+ // We don't need toolbar in the modal window.
+ if ($this->getLayout() !== 'modal')
+ {
+ $this->addToolbar();
+ $this->sidebar = JHtmlSidebar::render();
+ // load the batch html
+ if ($this->canCreate && $this->canEdit && $this->canState)
+ {
+ $this->batchDisplay = JHtmlBatch_::render();
+ }
+ }
+
+ // Display the template
+ parent::display($tpl);
+
+ // Set the document
+ $this->setDocument();
+ }
+
+ /**
+ * Setting the toolbar
+ */
+ protected function addToolBar()
+ {
+ JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS'), 'comments-2');
+ JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=language_placeholders');
+ JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
+
+ if ($this->canCreate)
+ {
+ JToolBarHelper::addNew('language_placeholder.add');
+ }
+
+ // Only load if there are items
+ if (ComponentbuilderHelper::checkArray($this->items))
+ {
+ if ($this->canEdit)
+ {
+ JToolBarHelper::editList('language_placeholder.edit');
+ }
+
+ if ($this->canState)
+ {
+ JToolBarHelper::publishList('language_placeholders.publish');
+ JToolBarHelper::unpublishList('language_placeholders.unpublish');
+ JToolBarHelper::archiveList('language_placeholders.archive');
+
+ if ($this->canDo->get('core.admin'))
+ {
+ JToolBarHelper::checkin('language_placeholders.checkin');
+ }
+ }
+
+ // Add a batch button
+ if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
+ {
+ // Get the toolbar object instance
+ $bar = JToolBar::getInstance('toolbar');
+ // set the batch button name
+ $title = JText::_('JTOOLBAR_BATCH');
+ // Instantiate a new JLayoutFile instance and render the batch button
+ $layout = new JLayoutFile('joomla.toolbar.batch');
+ // add the button to the page
+ $dhtml = $layout->render(array('title' => $title));
+ $bar->appendButton('Custom', $dhtml, 'batch');
+ }
+ if ($this->user->authorise('language_placeholder.update_placeholders'))
+ {
+ // add Update Placeholders button.
+ JToolBarHelper::custom('language_placeholders.updatePlaceholders', 'flash', '', 'COM_COMPONENTBUILDER_UPDATE_PLACEHOLDERS', false);
+ }
+
+ if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
+ {
+ JToolbarHelper::deleteList('', 'language_placeholders.delete', 'JTOOLBAR_EMPTY_TRASH');
+ }
+ elseif ($this->canState && $this->canDelete)
+ {
+ JToolbarHelper::trash('language_placeholders.trash');
+ }
+
+ if ($this->canDo->get('core.export') && $this->canDo->get('language_placeholder.export'))
+ {
+ JToolBarHelper::custom('language_placeholders.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
+ }
+ }
+
+ if ($this->canDo->get('core.import') && $this->canDo->get('language_placeholder.import'))
+ {
+ JToolBarHelper::custom('language_placeholders.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
+ }
+
+ // set help url for this view if found
+ $help_url = ComponentbuilderHelper::getHelpUrl('language_placeholders');
+ if (ComponentbuilderHelper::checkString($help_url))
+ {
+ JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
+ }
+
+ // add the options comp button
+ if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
+ {
+ JToolBarHelper::preferences('com_componentbuilder');
+ }
+
+ if ($this->canState)
+ {
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_PUBLISHED'),
+ 'filter_published',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
+ );
+ // only load if batch allowed
+ if ($this->canBatch)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
+ 'batch[published]',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
+ );
+ }
+ }
+
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_ACCESS'),
+ 'filter_access',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
+ );
+
+ if ($this->canBatch && $this->canCreate && $this->canEdit)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
+ 'batch[access]',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
+ );
+ }
+ }
+
+ /**
+ * Method to set up the document properties
+ *
+ * @return void
+ */
+ protected function setDocument()
+ {
+ $document = JFactory::getDocument();
+ $document->setTitle(JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS'));
+ $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_placeholders.css");
+ }
+
+ /**
+ * Escapes a value for output in a view script.
+ *
+ * @param mixed $var The output to escape.
+ *
+ * @return mixed The escaped value.
+ */
+ public function escape($var)
+ {
+ if(strlen($var) > 50)
+ {
+ // use the helper htmlEscape method instead and shorten the string
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
+ }
+ // use the helper htmlEscape method instead.
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
+ }
+
+ /**
+ * 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
+ */
+ protected function getSortFields()
+ {
+ return array(
+ 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
+ 'a.published' => JText::_('JSTATUS'),
+ 'a.placeholder' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_PLACEHOLDER_LABEL'),
+ 'a.id' => JText::_('JGRID_HEADING_ID')
+ );
+ }
+}
diff --git a/admin/views/languages/index.html b/admin/views/languages/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/admin/views/languages/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/admin/views/languages/tmpl/default.php b/admin/views/languages/tmpl/default.php
new file mode 100644
index 000000000..8dc44bb69
--- /dev/null
+++ b/admin/views/languages/tmpl/default.php
@@ -0,0 +1,99 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+// load tooltip behavior
+JHtml::_('behavior.tooltip');
+JHtml::_('behavior.multiselect');
+JHtml::_('dropdown.init');
+JHtml::_('formbehavior.chosen', 'select');
+
+if ($this->saveOrder)
+{
+ $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=languages.saveOrderAjax&tmpl=component';
+ JHtml::_('sortablelist.sortable', 'languageList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
+}
+
+?>
+
+