PluginProbe
User Access Manager / trunk
User Access Manager vtrunk
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
user-access-manager / src / View / TabList.php

TabList.php in User Access Manager trunk, at src/View/TabList.php

86 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * TabList.php
4 *
5 * Shows the tab list at the admin panel.
6 *
7 * PHP versions 5
8 *
9 * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 * @copyright 2008-2017 Alexander Schneider
11 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 * @version SVN: $id$
13 * @link http://wordpress.org/extend/plugins/user-access-manager/
14 */
15
16 /**
17 * @var ControllerTabNavigationTrait $controller
18 */
19
20 use UserAccessManager\Controller\Backend\ControllerTabNavigationTrait;
21
22 ?>
23 <h2 class="nav-tab-wrapper">
24 <?php
25 $currentGroupKey = $controller->getCurrentTabGroup();
26 $tabGroups = $controller->getTabGroups();
27
28 foreach ($tabGroups as $group => $defaultSection) {
29 $cssClass = 'nav-tab';
30
31 if ($currentGroupKey === $group) {
32 $cssClass .= ' nav-tab-active';
33 }
34 ?>
35 <a class="<?php echo $cssClass; ?>"
36 href="<?php echo $controller->getTabGroupLink($group); ?>">
37 <?php echo $controller->getGroupText($group); ?>
38 </a>
39 <?php
40 }
41 ?>
42 </h2>
43 <?php
44 $sections = $controller->getSections();
45 if (count($sections) > 1) {
46 $currentSection = $controller->getCurrentTabGroupSection();
47
48 ?>
49 <table class="form-table">
50 <tbody>
51 <tr>
52 <th>
53 <label for="uam_settings_group_section">
54 <?php echo $controller->getGroupText($currentGroupKey . '_SECTION_SELECTION'); ?>
55 </label>
56 </th>
57 <td>
58 <select id="uam_settings_group_section" name="section">
59 <?php
60 foreach ($sections as $section) {
61 ?>
62 <option value="<?php echo htmlspecialchars($section, ENT_QUOTES); ?>"
63 data-link="<?php
64 echo $controller->getTabGroupSectionLink($currentGroupKey, $section);
65 ?>"
66 <?php
67 if ($currentSection === $section) {
68 echo 'selected="selected"';
69 }
70 ?>><?php
71 echo $controller->getGroupSectionText($section);
72 ?></option>
73 <?php
74 }
75 ?>
76 </select>
77 <p class="description">
78 <?php echo $controller->getGroupText($currentGroupKey . '_SECTION_SELECTION', true); ?>
79 </p>
80 </td>
81 </tr>
82 </tbody>
83 </table>
84 <?php
85 }
86