Deliver centralized role management feature
[portal.git] / ecomp-portal-FE-common / client / app / views / users / users.tpl.html
1 <!--
2   ================================================================================
3   ECOMP Portal
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ================================================================================
19   -->
20 <div class="w-ecomp-main">
21     <div class="w-ecomp-main-container" >
22         <div class="users-page-main" id="page-content">
23             <div id="users-page-title" class="w-ecomp-main-view-title">
24                  <h1 class="heading-page" >Users</h1>
25             </div>
26             <div class="users-table">
27                 <div class="table-control">
28                     <div class="table-control-fields">          
29                                                 <div class="table-dropdown">
30                                                         <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="Select Application" ng-model="users.selectedApp.value">
31                                                 <option b2b-dropdown-list option-repeat="d in users.adminApps" value="{{d.value}}">{{d.title}}</option>
32                                             </select>
33                                                 </div>
34                                                 <div>
35                                                         <input id="input-table-search" placeholder="Search" class="table-search-field" type="text" data-ng-model="users.searchString">
36                                                 </div>
37                                                 <button class="btn btn-alt btn-small" id="users-button-add"  ng-click="users.openAddNewUserModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add User</button> 
38                                 <button class="btn btn-alt btn-small" id="users-bulk-upload-button-add"  ng-click="users.openBulkUserUploadModal()"><i class="icon-arrows-upload" aria-hidden="true"></i>&nbsp;Bulk Upload</button>
39                                         </div>
40                 </div>
41                 <div ng-hide="users.isLoadingTable">
42                     <div class="error-text" id="div-select-app" ng-show="noAppSelected">
43                         <p class="error-help">Use the 'Select application' dropdown to see users.</p>
44                     </div>
45                     <div class="error-text"
46                          id="div-error-no-users"
47                          ng-show="noUsersInApp">
48                         <p>&nbsp;</p>
49                         <p class="error-help">
50                                 No users found. Select "Add User" to add a User to the application.
51                         </p>
52                     </div>
53                     <div class="error-text"
54                          id="div-error-app-down"
55                          ng-show="appsIsDown" >
56                         <p>&nbsp;</p>
57                         <p class="error-help">
58                                 Failed to communicate with the application.
59                             Please try again later or contact a system administrator.
60                         </p>
61                     </div>
62                 </div>
63                 <span class="ecomp-spinner" ng-show="users.isLoadingTable"></span>
64                 <div b2b-table table-data="users.accountUsers"  ng-hide="users.isLoadingTable"  search-string="users.searchString" class="b2b-table-div">
65                                         <table>
66                                                 <thead b2b-table-row type="header">
67                                                         <tr >
68                                                                 <th b2b-table-header key="firstName" sortable="true" id="col1" default-sort="a">First Name</th>
69                                                                 <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>
70                                                                 <th b2b-table-header key="orgUserId" sortable="true" id="col3">User ID</th>
71                                                                 <th b2b-table-header key="" sortable="falses" id="col4">Roles</th>
72                                                         </tr>
73                                                 </thead>
74                                                 <tbody b2b-table-row type="body"        row-repeat="rowData in users.accountUsers" class="table-users-div">
75                                                         <tr ng-click="users.openAddNewUserModal(rowData)">
76                                                                 <td b2b-table-body id="rowheader_t1_{{$index}}-firstName" headers="col1" ng-bind="rowData.firstName"></td>
77                                                                 <td b2b-table-body  id="rowheader_t1_{{$index}}-lastName"  headers="col2" ng-bind="rowData.lastName"></td>
78                                                                 <td b2b-table-body  id="rowheader_t1_{{$index}}-orgUserId"  headers="col3" ng-bind="rowData.orgUserId"></td>
79                                                                 <td b2b-table-body   id="rowheader_t1_{{$index}}"  headers="col4">
80                                                                         <div class="ecomp-table-repeat"  id="rowheader_t1_{{$index}}"  ng-repeat="role in rowData.roles" ng-bind="role.name"></div>
81                                                                 </td>                                                   
82                                                         </tr>
83                                                 </tbody>
84                                         </table>
85                                 </div>
86             </div>
87             <div class="error-text"  id="div-error-403" ng-show="adminAppsIsNull==true">
88                 <h1>Attention:</h1>
89                 <p>&nbsp;</p>
90                 <p class="error-help">It appears that you have not been added as an admin yet to an application.</p>
91                 <p>&nbsp;</p>
92                 <p class="error-help">Click on the Admins link to the left and check and see if you are listed as an admin for an application.
93                     If not, you can add yourself to the appropriate application.</p>
94             </div>
95         </div>
96     </div>
97
98 </div>