Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "all plugins" list on side menu #1681

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Helpers/PrepareView.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ public function initPluginsData(&$pageData, &$eventsJsPlugin)
$pageData['PANEL_MENU'] = [];
$pageData['MENU_PLUGIN'] = [];
$pageData['MENU_PLUGIN_CATEGORY'] = [];
$pageData['MENU_PLUGIN_ALL'] = [];

foreach ($categories as $categoryCode => $pluginsList) {
$pageData['MENU_PLUGIN'][$categoryCode] = [];
Expand All @@ -558,6 +559,7 @@ public function initPluginsData(&$pageData, &$eventsJsPlugin)
/** @var Plugin $plugin */
foreach ($pluginsList as $plugin) {
$pageData['MENU_PLUGIN'][$categoryCode][] = $plugin;
$pageData['MENU_PLUGIN_ALL'][] = $plugin;
if ($plugin->getId() == Utils::init('m')) {
$currentPlugin = $plugin;
$pageData[ControllerData::TITLE] = ucfirst($currentPlugin->getName()) . ' - NextDom';
Expand Down
1 change: 1 addition & 0 deletions translations/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ sidebar:
panel: Panel(s)
plugins: plugins
plugins-markets: Management & Markets
plugins-all: A..Z list
quick-notes: Quick Notes
rights: All rights reserved
show-all: Show all
Expand Down
1 change: 1 addition & 0 deletions translations/fr_FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ sidebar:
panel: Panel(s)
plugins: Plugins
plugins-markets: Gestion & Markets
plugins-all: Liste A..Z
quick-notes: Quick Notes
rights: All rights reserved
show-all: Afficher tout
Expand Down
8 changes: 8 additions & 0 deletions views/commons/AdminLTE_sidebar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
<a href="#"><i class="fas fa-puzzle-piece spacing-right"></i><span>{{ 'sidebar.plugins'|trans }}</span><span class="pull-right-container"><i class="fas fa-angle-left pull-right"></i></span></a>
<ul class="treeview-menu">
<li class="treeview divider"><a href="index.php?v=d&p=plugin"><i class="fas fa-tags spacing-right"></i>{{ 'sidebar.plugins-markets'|trans }}</a></li>
<li class="treeview divider"><a href="#" data-toggle="dropdown"><i class="fas fa-sort-alpha-down spacing-right"></i>{{ 'sidebar.plugins-all'|trans }}<span class="pull-right-container"><i class="fas fa-angle-left pull-right"></i></span></a>
<ul class="treeview-menu">
{% if MENU_PLUGIN_ALL is defined %}
{% for plugin in MENU_PLUGIN_ALL|sort((a, b) => a.name|lower <=> b.name|lower) %}
<li class="treeview treeview-plugin-item"><a href="index.php?v=d&m={{ plugin.id }}&p={{ plugin.index }}"><img class="img-responsive spacing-right" src="{{ plugin.pathImgIcon }}"/>{{ plugin.name }}</a></li>
{% endfor %}
{% endif %}
</ul>
{% if MENU_PLUGIN_CATEGORY is defined %}
{% for category, categoryData in MENU_PLUGIN_CATEGORY|sort %}
<li class="treeview">
Expand Down