Update view.html.php

Create the Associations Toolbar button to directly link to com_associations when editing a weblink
This commit is contained in:
infograf768 2020-08-02 12:07:00 +02:00 committed by GitHub
parent 5ad08ed6e0
commit 31964a86e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class WeblinksViewWeblink extends JViewLegacy
return false;
}
// If we are forcing a language in modal (used for associations).
if ($this->getLayout() === 'modal' && $forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'cmd'))
{
@ -88,15 +88,23 @@ class WeblinksViewWeblink extends JViewLegacy
JToolbarHelper::apply('weblink.apply');
JToolbarHelper::save('weblink.save');
}
if (!$checkedOut && (count($user->getAuthorisedCategories('com_weblinks', 'core.create'))))
{
JToolbarHelper::save2new('weblink.save2new');
}
// If an existing item, can save to a copy.
if (!$isNew && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0))
{
JToolbarHelper::save2copy('weblink.save2copy');
}
if (JLanguageAssociations::isEnabled() && JComponentHelper::isEnabled('com_associations'))
{
JToolbarHelper::custom('weblink.editAssociations', 'contract', 'contract', 'JTOOLBAR_ASSOCIATIONS', false, false);
}
if (empty($this->item->id))
{
JToolbarHelper::cancel('weblink.cancel');