mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-27 02:12:50 +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:
parent
5ad08ed6e0
commit
31964a86e9
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user