Added sharing of snippets option and started adding get snippets custom admin view gh-92. Fixed gh-153 published settings for categories.

This commit is contained in:
2017-11-16 06:37:32 +02:00
parent 1cc40dbfe4
commit f34e1b19f8
37 changed files with 1372 additions and 124 deletions

View File

@ -133,7 +133,12 @@ class ComponentbuilderViewSnippets extends JViewLegacy
// add the button to the page
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
}
if ($this->user->authorise('snippet.share_snippets', 'com_componentbuilder'))
{
// add Share Snippets button.
JToolBarHelper::custom('snippets.shareSnippets', 'share', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', false);
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{
@ -148,7 +153,12 @@ class ComponentbuilderViewSnippets extends JViewLegacy
{
JToolBarHelper::custom('snippets.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
}
if ($this->user->authorise('snippet.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('snippets.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('snippet.import'))
{