GUAC-1126 Created user page service which provides the list of main pages for a user.

This commit is contained in:
James Muehlner
2015-04-01 23:21:31 -07:00
committed by Michael Jumper
parent 1d0b32388b
commit 7bf4cb83d8
11 changed files with 314 additions and 210 deletions

View File

@@ -0,0 +1,84 @@
<div class="user-menu">
<!--
Copyright (C) 2015 Glyptodon LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<div class="user-menu-dropdown" ng-class="{open: menuShown}" ng-click="toggleMenu()">
<div class="username">{{username}}</div>
<div class="menu-indicator"></div>
<!-- Menu options -->
<ul class="options">
<!-- Navigation links -->
<li ng-repeat="page in pages">
<a class="home" ng-click="navigateToPage(page)"
ng-class="{disabled: isPageDisabled(page)}" href="#{{page.url}}">
{{page.name | translate}}
</a>
</li>
<!-- Change password -->
<li>
<a class="change-password" ng-click="showPasswordUpdate()"
ng-show="canChangePassword">
{{'USER_MENU.ACTION_CHANGE_PASSWORD' | translate}}
</a>
</li>
<!-- Logout -->
<li>
<a class="logout" ng-click="logout()">
{{'USER_MENU.ACTION_LOGOUT' | translate}}
</a>
</li>
</ul>
</div>
<!-- Password dialog -->
<div class="password-dialog" ng-class="{shown: showPasswordDialog}">
<!-- Password editor -->
<div class="section">
<table class="fields">
<tr>
<th>{{'USER_MENU.FIELD_HEADER_PASSWORD_OLD' | translate}}</th>
<td><input ng-model="oldPassword" type="password" /></td>
</tr>
<tr>
<th>{{'USER_MENU.FIELD_HEADER_PASSWORD_NEW' | translate}}</th>
<td><input ng-model="newPassword" type="password" /></td>
</tr>
<tr>
<th>{{'USER_MENU.FIELD_HEADER_PASSWORD_NEW_AGAIN' | translate}}</th>
<td><input ng-model="newPasswordMatch" type="password" /></td>
</tr>
</table>
</div>
<!-- Form action buttons -->
<div class="action-buttons">
<button ng-click="updatePassword()">{{'USER_MENU.ACTION_SAVE' | translate}}</button>
<button ng-click="closePasswordUpdate()">{{'USER_MENU.ACTION_CANCEL' | translate}}</button>
</div>
</div>
</div>