nexus site path corrected
[portal.git] / ecomp-portal-BE / war / WEB-INF / fusion / jsp / collaborateList.jsp
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 <script src= "static/ebz/angular_js/angular.js"></script> 
21 <script src= "static/ebz/angular_js/angular-sanitize.js"></script>
22
23 <script src= "static/ebz/angular_js/app.js"></script>
24 <script src= "static/ebz/angular_js/gestures.js"></script>
25
26 <script src="static/js/jquery-1.10.2.js"></script>
27 <script src="static/js/modalService.js"></script>
28 <script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
29 <script src="static/js/jquery-ui.js" type="text/javascript"></script>
30 <script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
31 <%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %>
32 <div ng-controller="collaborateListController">
33         <div>
34                 <h1 class="heading1" style="margin-top:20px;">Collaborate List</h1>
35                 <div style="margin-top:30px">
36                         <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
37
38                             <thead  att-table-row type="header">
39                                         <tr>
40                                                 <th att-table-header key="id">User ID</th>
41                                     <th att-table-header key="last_name">Last Name</th>        
42                                     <th att-table-header key="first_name">First Name</th>    
43                                     <th att-table-header key="email">Email</th>
44                                     <th att-table-header key="sbcid">ATTUID</th>        
45                                     <th att-table-header key="active">Online/Offline</th>         
46                                 </tr>
47                             </thead>
48                             <tbody att-table-row type="body" row-repeat="rowData in tableData">
49                                 <tr>
50                                 <td att-table-body >{{rowData.id}}</td>
51                                 <td att-table-body >{{rowData.lastName}}</td>
52                                 <td att-table-body >{{rowData.firstName}}</td>
53                                 <td att-table-body >{{rowData.email}}</td>
54                                 <td att-table-body >{{rowData.sbcid}}</td>
55                                         <td att-table-body >
56                                            <tag-badges ng-hide="rowData.online" style-type="color" class="lred" ng-click="rowData.isActive=true;openCollaboration(rowData.sbcid)">Offline</tag-badges>
57                                                    <tag-badges ng-show="rowData.online" style-type="color" class="lgreen" ng-click="rowData.isActive=false;openCollaboration(rowData.sbcid)">Online</tag-badges>                                
58                                    </td>
59                                 </tr>     
60                             </tbody>      
61                         </table>
62                 </div>
63         </div>  
64         <input ng-model="currentPage"></input>
65 </div>
66         
67 <script>
68 app.controller("collaborateListController", function ($scope,$http,modalService, $modal) { 
69         // Table Data
70         $scope.tableData=${model.profileList};
71         $scope.viewPerPage = 20;
72     $scope.scrollViewsPerPage = 2;
73     $scope.currentPage = 1;
74     $scope.totalPage;
75     $scope.searchCategory = "";
76     $scope.searchString = "";
77  /*    modalService.showSuccess('','Modal Sample') ; */
78         for(x in $scope.tableData){
79                 if($scope.tableData[x].active_yn=='Y')
80                         $scope.tableData[x].active_yn=true;
81                 else
82                         $scope.tableData[x].active_yn=false;
83         }
84     $scope.openCollaboration = function(userId){
85         openInNewTab('collaboration?user_id=' + userId);
86     }
87    
88     $scope.toggleProfileActive = function(profileId) {
89         if (confirm("You are about to change user's active status. Do you want to continue?")) {
90                  $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){});
91         }
92     };
93    
94 });
95
96 function openInNewTab(url) {
97           var win = window.open(url, '_blank');
98           win.focus();
99 };
100
101 </script>