gh-60 language translation component added, basic implementation
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_closed_issues_the_closed_issues_on_github.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_main.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_open_issues_the_open_issues_on_github.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_readme_information.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vast_development_method_notice_board.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vdm.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
@ -262,6 +262,7 @@ jQuery('#adminForm').on('change', '#jform_comment_type',function (e)
|
||||
jQuery('#phpjs-comment-info').show();
|
||||
}
|
||||
});
|
||||
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
var x=0;
|
||||
@ -273,5 +274,5 @@ jQuery(document).ready( function($) {
|
||||
}
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 81 of this MVC
|
||||
@build 1st March, 2017
|
||||
@version @update number 82 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.4.2
|
||||
@build 3rd April, 2017
|
||||
@build 5th April, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 311 of this MVC
|
||||
@build 1st April, 2017
|
||||
@version @update number 314 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
@ -42,7 +42,7 @@ Joomla.submitbutton = function(task)
|
||||
Joomla.submitform(task);
|
||||
return true;
|
||||
} else {
|
||||
alert(Joomla.JText._('language_placeholder, some values are not acceptable.','Some values are unacceptable'));
|
||||
alert(Joomla.JText._('language_translation, some values are not acceptable.','Some values are unacceptable'));
|
||||
return false;
|
||||
}
|
||||
}
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
@ -58,35 +58,35 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
<div id="componentbuilder_loader" style="display: none;">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('language_placeholder.details_above', $this); ?><div class="form-horizontal">
|
||||
<?php echo JLayoutHelper::render('language_translation.details_above', $this); ?><div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'language_placeholderTab', array('active' => 'details')); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'language_translationTab', array('active' => 'details')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_placeholderTab', 'details', JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_DETAILS', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_translationTab', 'details', JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('language_placeholder.details_fullwidth', $this); ?>
|
||||
<?php echo JLayoutHelper::render('language_translation.details_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->canDo->get('language_placeholder.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language_placeholder.edit.state') || $this->canDo->get('core.edit.created')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_placeholderTab', 'publishing', JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_PUBLISHING', true)); ?>
|
||||
<?php if ($this->canDo->get('language_translation.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language_translation.edit.state') || $this->canDo->get('core.edit.created')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_translationTab', 'publishing', JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PUBLISHING', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('language_placeholder.publishing', $this); ?>
|
||||
<?php echo JLayoutHelper::render('language_translation.publishing', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('language_placeholder.publlshing', $this); ?>
|
||||
<?php echo JLayoutHelper::render('language_translation.publlshing', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->canDo->get('core.admin')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_placeholderTab', 'permissions', JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_PERMISSION', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'language_translationTab', 'permissions', JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<fieldset class="adminform">
|
||||
@ -107,9 +107,37 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="task" value="language_placeholder.edit" />
|
||||
<input type="hidden" name="task" value="language_translation.edit" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery('input.form-field-repeatable').on('value-update', function(e, value){
|
||||
if (value)
|
||||
{
|
||||
getBuildTable(JSON.stringify(value), e.currentTarget.id);
|
||||
}
|
||||
});
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@ -30,9 +30,9 @@ defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Language_placeholder View class
|
||||
* Language_translation View class
|
||||
*/
|
||||
class ComponentbuilderViewLanguage_placeholder extends JViewLegacy
|
||||
class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* display method of View
|
||||
@ -53,7 +53,7 @@ class ComponentbuilderViewLanguage_placeholder extends JViewLegacy
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_placeholder',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
@ -91,29 +91,29 @@ class ComponentbuilderViewLanguage_placeholder extends JViewLegacy
|
||||
$userId = $user->id;
|
||||
$isNew = $this->item->id == 0;
|
||||
|
||||
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_EDIT'), 'pencil-2 article-add');
|
||||
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT'), 'pencil-2 article-add');
|
||||
// Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('language_placeholder.create') && $isNew)
|
||||
if ($this->canDo->get('language_translation.create') && $isNew)
|
||||
{
|
||||
// We can create the record.
|
||||
JToolBarHelper::save('language_placeholder.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::save('language_translation.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('language_placeholder.edit'))
|
||||
elseif ($this->canDo->get('language_translation.edit'))
|
||||
{
|
||||
// We can save the record.
|
||||
JToolBarHelper::save('language_placeholder.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::save('language_translation.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// Do not creat but cancel.
|
||||
JToolBarHelper::cancel('language_placeholder.cancel', 'JTOOLBAR_CANCEL');
|
||||
JToolBarHelper::cancel('language_translation.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// We can close it.
|
||||
JToolBarHelper::cancel('language_placeholder.cancel', 'JTOOLBAR_CLOSE');
|
||||
JToolBarHelper::cancel('language_translation.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -121,43 +121,43 @@ class ComponentbuilderViewLanguage_placeholder extends JViewLegacy
|
||||
if ($isNew)
|
||||
{
|
||||
// For new records, check the create permission.
|
||||
if ($this->canDo->get('language_placeholder.create'))
|
||||
if ($this->canDo->get('language_translation.create'))
|
||||
{
|
||||
JToolBarHelper::apply('language_placeholder.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('language_placeholder.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::custom('language_placeholder.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
JToolBarHelper::apply('language_translation.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('language_translation.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::custom('language_translation.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
};
|
||||
JToolBarHelper::cancel('language_placeholder.cancel', 'JTOOLBAR_CANCEL');
|
||||
JToolBarHelper::cancel('language_translation.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->canDo->get('language_placeholder.edit'))
|
||||
if ($this->canDo->get('language_translation.edit'))
|
||||
{
|
||||
// We can save the new record
|
||||
JToolBarHelper::apply('language_placeholder.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('language_placeholder.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::apply('language_translation.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('language_translation.save', 'JTOOLBAR_SAVE');
|
||||
// We can save this record, but check the create permission to see
|
||||
// if we can return to make a new one.
|
||||
if ($this->canDo->get('language_placeholder.create'))
|
||||
if ($this->canDo->get('language_translation.create'))
|
||||
{
|
||||
JToolBarHelper::custom('language_placeholder.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
JToolBarHelper::custom('language_translation.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
}
|
||||
}
|
||||
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('language_placeholder.version'));
|
||||
if ($this->state->params->get('save_history', 1) && $this->canDo->get('language_placeholder.edit') && $canVersion)
|
||||
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('language_translation.version'));
|
||||
if ($this->state->params->get('save_history', 1) && $this->canDo->get('language_translation.edit') && $canVersion)
|
||||
{
|
||||
JToolbarHelper::versions('com_componentbuilder.language_placeholder', $this->item->id);
|
||||
JToolbarHelper::versions('com_componentbuilder.language_translation', $this->item->id);
|
||||
}
|
||||
if ($this->canDo->get('language_placeholder.create'))
|
||||
if ($this->canDo->get('language_translation.create'))
|
||||
{
|
||||
JToolBarHelper::custom('language_placeholder.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
JToolBarHelper::custom('language_translation.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
}
|
||||
JToolBarHelper::cancel('language_placeholder.cancel', 'JTOOLBAR_CLOSE');
|
||||
JToolBarHelper::cancel('language_translation.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_placeholder');
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_translation');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
@ -191,10 +191,21 @@ class ComponentbuilderViewLanguage_placeholder extends JViewLegacy
|
||||
{
|
||||
$isNew = ($this->item->id < 1);
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_placeholder.css");
|
||||
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translation.css");
|
||||
// Add Ajax Token
|
||||
$document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
$document->addScript(JURI::root() . $this->script);
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language_placeholder/submitbutton.js");
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language_translation/submitbutton.js");
|
||||
// add JavaScripts
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit.min.js' );
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/lightbox.min.js', 'text/javascript', true);
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/notify.min.js', 'text/javascript', true);
|
||||
// add the style sheets
|
||||
$document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit.gradient.min.css' );
|
||||
$document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/components/notify.gradient.min.css' );
|
||||
// add var key
|
||||
$document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
@ -34,8 +34,8 @@ JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=language_placeholders.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'language_placeholderList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=language_translations.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'language_translationList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -56,7 +56,7 @@ if ($this->saveOrder)
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=language_placeholders'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=language_translations'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
@ -72,7 +72,7 @@ if ($this->saveOrder)
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="language_placeholderList">
|
||||
<table class="table table-striped" id="language_translationList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
@ -83,7 +83,7 @@ if ($this->saveOrder)
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS_BATCH_OPTIONS'),
|
||||
'title' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
@ -28,5 +28,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
|
||||
<p><?php echo JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS_BATCH_TIP'); ?></p>
|
||||
<p><?php echo JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_TIP'); ?></p>
|
||||
<?php echo $this->batchDisplay; ?>
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
@ -32,6 +32,6 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JText::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<!-- post the batch values if process -->
|
||||
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('language_placeholder.batch');">
|
||||
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('language_translation.batch');">
|
||||
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
@ -26,18 +26,18 @@
|
||||
// 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";
|
||||
$edit = "index.php?option=com_componentbuilder&view=language_translations&task=language_translation.edit";
|
||||
|
||||
?>
|
||||
<?php foreach ($this->items as $i => $item): ?>
|
||||
<?php
|
||||
$canCheckin = $this->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');
|
||||
$canDo = ComponentbuilderHelper::getActions('language_translation',$item,'language_translations');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('language_placeholder.edit.state')): ?>
|
||||
<?php if ($canDo->get('language_translation.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
@ -60,7 +60,7 @@ $edit = "index.php?option=com_componentbuilder&view=language_placeholders&task=l
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center">
|
||||
<?php if ($canDo->get('language_placeholder.edit')): ?>
|
||||
<?php if ($canDo->get('language_translation.edit')): ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
@ -75,33 +75,33 @@ $edit = "index.php?option=com_componentbuilder&view=language_placeholders&task=l
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('language_placeholder.edit')): ?>
|
||||
<?php if ($canDo->get('language_translation.edit')): ?>
|
||||
<div class="name">
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->placeholder); ?></a>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->entranslation); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_placeholders.', $canCheckin); ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_translations.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="name"><?php echo $this->escape($item->placeholder); ?></div>
|
||||
<div class="name"><?php echo $this->escape($item->entranslation); ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->components); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('language_placeholder.edit.state')) : ?>
|
||||
<?php if ($canDo->get('language_translation.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_placeholders.', true, 'cb'); ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_translations.', true, 'cb'); ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_placeholders.', false, 'cb'); ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_translations.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_placeholders.', true, 'cb'); ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_translations.', true, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_placeholders.', false, 'cb'); ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'language_translations.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center hidden-phone">
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
@ -44,21 +44,21 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_PLACEHOLDER_LABEL', 'placeholder', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL', 'entranslation', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_COMPONENTS_LABEL', 'components_system_name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_COMPONENTS_LABEL', 'components_system_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_STATUS'); ?>
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS'); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th width="5" class="nowrap center hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_ID', 'id', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID', 'id', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('Search');?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Language_placeholders'); ?>" />
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Language_translations'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 8 of this MVC
|
||||
@build 3rd April, 2017
|
||||
@version @update number 28 of this MVC
|
||||
@build 5th April, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@ -30,12 +30,12 @@ defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Componentbuilder View class for the Language_placeholders
|
||||
* Componentbuilder View class for the Language_translations
|
||||
*/
|
||||
class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Language_placeholders view display method
|
||||
* Language_translations view display method
|
||||
* @return void
|
||||
*/
|
||||
function display($tpl = null)
|
||||
@ -43,7 +43,7 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
// Include helper submenu
|
||||
ComponentbuilderHelper::addSubmenu('language_placeholders');
|
||||
ComponentbuilderHelper::addSubmenu('language_translations');
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -62,11 +62,11 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
$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->canDo = ComponentbuilderHelper::getActions('language_translation');
|
||||
$this->canEdit = $this->canDo->get('language_translation.edit');
|
||||
$this->canState = $this->canDo->get('language_translation.edit.state');
|
||||
$this->canCreate = $this->canDo->get('language_translation.create');
|
||||
$this->canDelete = $this->canDo->get('language_translation.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
@ -93,13 +93,13 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDERS'), 'comments-2');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=language_placeholders');
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS'), 'comments-2');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=language_translations');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
JToolBarHelper::addNew('language_placeholder.add');
|
||||
JToolBarHelper::addNew('language_translation.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
@ -107,18 +107,18 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('language_placeholder.edit');
|
||||
JToolBarHelper::editList('language_translation.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('language_placeholders.publish');
|
||||
JToolBarHelper::unpublishList('language_placeholders.unpublish');
|
||||
JToolBarHelper::archiveList('language_placeholders.archive');
|
||||
JToolBarHelper::publishList('language_translations.publish');
|
||||
JToolBarHelper::unpublishList('language_translations.unpublish');
|
||||
JToolBarHelper::archiveList('language_translations.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('language_placeholders.checkin');
|
||||
JToolBarHelper::checkin('language_translations.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,34 +135,34 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
if ($this->user->authorise('language_placeholder.update_placeholders'))
|
||||
if ($this->user->authorise('language_translation.update_placeholders'))
|
||||
{
|
||||
// add Update Placeholders button.
|
||||
JToolBarHelper::custom('language_placeholders.updatePlaceholders', 'flash', '', 'COM_COMPONENTBUILDER_UPDATE_PLACEHOLDERS', false);
|
||||
JToolBarHelper::custom('language_translations.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');
|
||||
JToolbarHelper::deleteList('', 'language_translations.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('language_placeholders.trash');
|
||||
JToolbarHelper::trash('language_translations.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('language_placeholder.export'))
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('language_translation.export'))
|
||||
{
|
||||
JToolBarHelper::custom('language_placeholders.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
JToolBarHelper::custom('language_translations.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('language_placeholder.import'))
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('language_translation.import'))
|
||||
{
|
||||
JToolBarHelper::custom('language_placeholders.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
JToolBarHelper::custom('language_translations.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_placeholders');
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_translations');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
@ -216,8 +216,8 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
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");
|
||||
$document->setTitle(JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translations.css");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -248,7 +248,7 @@ class ComponentbuilderViewLanguage_placeholders extends JViewLegacy
|
||||
return array(
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.placeholder' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_PLACEHOLDER_PLACEHOLDER_LABEL'),
|
||||
'a.entranslation' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user