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

Integrate ACL page permissions from plugin aclinfo in sidebar #75

Open
wants to merge 1 commit into
base: master
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
1 change: 1 addition & 0 deletions img/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lang/de/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$lang['head_breadcrumb_youarehere'] = 'Standortanzeiger';
$lang['head_menu_trace'] = 'Zuletzt Angesehen';
$lang['head_meta_box'] = 'Metainformationen zur Seite';
$lang['head_menu_aclinfo'] = 'Seitenberechtigungen';
$lang['head_menu_starred'] = 'Gemerkte Seiten';
$lang['head_menu_tool-select'] = 'Werkzeuge';

Expand Down
1 change: 1 addition & 0 deletions lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$lang['head_breadcrumb_youarehere'] = 'location indicator';
$lang['head_menu_trace'] = 'Last Visited Pages';
$lang['head_meta_box'] = 'meta data for this page';
$lang['head_menu_aclinfo'] = 'Page Permissions';
$lang['head_menu_starred'] = 'Starred Pages';
$lang['head_menu_tool-select'] = 'Tools';

Expand Down
26 changes: 26 additions & 0 deletions tpl/main-sidebar-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,32 @@
</div>
</nav>

<?php
/** @var helper_plugin_aclinfo $plugin_aclinfo */
$plugin_aclinfo = plugin_load('helper', 'aclinfo');
$aclinfo = array();
if($plugin_aclinfo) $aclinfo = $plugin_aclinfo->getACLInfo($ID);
if($aclinfo):
?>
<nav class="nav-aclinfo">
<div class="nav"><a href="#sidebar-menu-aclinfo" role="heading" aria-level="2">
<span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/key.svg') ?></span>
<span class="lbl"><?php echo tpl_getLang('head_menu_aclinfo'); ?></span>
</a></div>
<div class="nav-panel level1 plugin_aclinfo">
<ul id="sidebar-menu-aclinfo">
<?php
foreach($aclinfo as $entry) {
echo '<li>';
echo $plugin_aclinfo->getACLInfoString($entry);
echo '</li>';
}
?>
</ul>
</div>
</nav>
<?php endif; ?>

<?php
/** @var helper_plugin_starred $plugin_starred */
$plugin_starred = plugin_load('helper', 'starred');
Expand Down