32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-28 10:40:47 +00:00

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

View File

@ -88,15 +88,23 @@ class WeblinksViewWeblink extends JViewLegacy
JToolbarHelper::apply('weblink.apply'); JToolbarHelper::apply('weblink.apply');
JToolbarHelper::save('weblink.save'); JToolbarHelper::save('weblink.save');
} }
if (!$checkedOut && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')))) if (!$checkedOut && (count($user->getAuthorisedCategories('com_weblinks', 'core.create'))))
{ {
JToolbarHelper::save2new('weblink.save2new'); JToolbarHelper::save2new('weblink.save2new');
} }
// If an existing item, can save to a copy. // If an existing item, can save to a copy.
if (!$isNew && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0)) if (!$isNew && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0))
{ {
JToolbarHelper::save2copy('weblink.save2copy'); 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)) if (empty($this->item->id))
{ {
JToolbarHelper::cancel('weblink.cancel'); JToolbarHelper::cancel('weblink.cancel');