-
Notifications
You must be signed in to change notification settings - Fork 6
Fix up menus and information architecture to improve navigability. Fi… #2
Merged
+468
−299
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| <?php | ||
| /* | ||
| * COmanage Match Secondary Menu Bar | ||
| * Displayed above all pages when logged in | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @link http://www.internet2.edu/comanage COmanage Project | ||
| * @package match | ||
| * @since COmanage Match v1.0.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
| ?> | ||
| <?php if(!empty($vv_user)): ?> | ||
| <ul> | ||
| <?php if($vv_menu_permissions['gridroles']): ?> | ||
| <li id="top-menu-platform"> | ||
| <a class="dropdown-toggle" href="#" role="button" id="platform-dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
| <span class="top-menu-link-text"> | ||
| <?= __('match.op.platform'); ?> | ||
| </span> | ||
| <em class="material-icons">settings</em> | ||
| </a> | ||
|
|
||
| <div class="dropdown-menu" aria-labelledby="platform-dropdown-toggle"> | ||
| <?php | ||
| $models = [ | ||
| 'matchgrids' => 'grid_on', | ||
| 'permissions' => 'lock', | ||
| 'api_users' => 'vpn_key' | ||
| ]; | ||
|
|
||
| foreach($models as $model => $icon) { | ||
| if($vv_menu_permissions[$model]) { | ||
| $linkContent = '<em class="material-icons" aria-hidden="true">' . $icon . '</em><span class="menu-title">' | ||
| . __('match.ct.'.\Cake\Utility\Inflector::camelize($model), [99]) | ||
| . '</span>'; | ||
|
|
||
| print $this->Html->link( | ||
| $linkContent, | ||
| ['plugin' => null, | ||
| 'controller' => $model, | ||
| 'action' => 'index'], | ||
| ['escape' => false,'class' => 'dropdown-item'] | ||
| ); | ||
| } | ||
| } | ||
| ?> | ||
| </div> | ||
| </li> | ||
| <?php endif; ?> | ||
| <li id="top-menu-user"> | ||
| <a class="dropdown-toggle" href="#" role="button" id="user-panel-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
| <span class="top-menu-link-text"> | ||
| <?= $vv_user['username']; ?> | ||
| </span> | ||
| <em class="material-icons icon-adjust">person</em> | ||
| </a> | ||
| <!-- Account Dropdown --> | ||
| <div id="user-panel" aria-expanded="false" style="display: none;"> | ||
| <div id="logout-in-panel"> | ||
| <?php | ||
| print $this->Html->link(__('match.op.logout'), | ||
| '/auth/logout/logout.php', | ||
| ['escape' => false, | ||
| 'class' => 'btn']); | ||
| ?> | ||
| </div> | ||
| <div id="user-panel-user-info"> | ||
| <em class="material-icons">person</em> | ||
| <div id="user-panel-cn"><?= $vv_user['username']; ?></div> | ||
| <div id="user-panel-id"><?php print $this->getRequest()->getSession()->read('Auth.User.username'); ?></div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| </ul> | ||
| <?php endif; ?> | ||
|
|
||
| <?php if(!isset($noLoginLogout) || !$noLoginLogout) : ?> | ||
| <?php | ||
| if(!$vv_user) { | ||
| print $this->Html->link(__('match.op.login'), | ||
| ['controller' => 'matchgrids', | ||
| 'action' => 'select', | ||
| 'plugin' => false], | ||
| ['escape' => false, | ||
| 'id' => 'login', | ||
| 'class' => '']); | ||
| } | ||
| ?> | ||
| <?php endif; ?> | ||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this go away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is that the only way to get to the Platform-level Matchgrid listing (where we can edit or delete a Matchgrid) is from the Platform menu. When we're in the context of managing the matches, we want to only operate within the interior context of the matchgrid. So the breacrumbs will reflect getting to the matchgrid selector and then the matchgrid management page only. (The matchgrid select view should also not have the interstitial "Matchgrids" crumb, so I should weed that out.) I think the interstitial link to the platform level matchgrid page is otherwise a little confusing even for platform admins - because the grid selector list is the simple path to switch between the grids, and having both crumbs creates a situation where we have two adjacent links to extremely similar but slightly different information ... and in reality the activies and contexts of the pages are different. (One for moving between matchgrids, one for managing matchgrids themselves.)
(On a related note, I'd like to bounce users straight to the matchgrid management page on login if only one matchgrid exists, and we've discussed adding a quick selector to switch between matchgrids near the matchgrid management title, too. ...But both can wait.)