[PORTAL-7] Rebase
[portal.git] / ecomp-portal-FE-common / client / app / views / header / header.tpl.html
1 <!--\r
2   ================================================================================\r
3   ECOMP Portal\r
4   ================================================================================\r
5   Copyright (C) 2017 AT&T Intellectual Property\r
6   ================================================================================\r
7   Licensed under the Apache License, Version 2.0 (the "License");\r
8   you may not use this file except in compliance with the License.\r
9   You may obtain a copy of the License at\r
10   \r
11        http://www.apache.org/licenses/LICENSE-2.0\r
12   \r
13   Unless required by applicable law or agreed to in writing, software\r
14   distributed under the License is distributed on an "AS IS" BASIS,\r
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16   See the License for the specific language governing permissions and\r
17   limitations under the License.\r
18   ================================================================================\r
19   -->\r
20 <div style="position:fixed;width: 100%;top: 0px;left: 0;background-color: #222;z-index:9999">\r
21     <header class="b2b-header-tabs" b2b-header-responsive>\r
22         <ul class="header__items" role="navigation">\r
23 <!-- Menu Icon and name -->\r
24             <li class="header__item icon__item" onclick="window.location = 'applicationsHome'">\r
25                 <span id="logo-image"  class="icon-primary-att-globe"></span>\r
26                 <span id="portal-title" class="portal-title" >OpenECOMP Portal</span>                   \r
27             </li>\r
28 <!-- First Level menu -->\r
29             <li b2b-header-menu \r
30                 id="megaMenu-{{item.text.split(' ').join('-')}}" \r
31                 class="header__item b2b-headermenu" \r
32                 ng-repeat="item in megaMenuDataObject" \r
33                 ng-mousedown="loadFavorites(item.text)"  \r
34                 role="presentation">\r
35                 \r
36                 <a href="javascript:void(0);" \r
37                 id="parentmenu-tabs"\r
38                 class="menu__item" \r
39                 role="menuitem">{{item.text}}</a>\r
40                 \r
41                 <div class="header-secondary-wrapper" ng-if="item.active_yn=='Y'">\r
42                     <ul class="header-secondary" role="menu">\r
43 <!-- Second Level menu -->\r
44                         <li class="header-subitem" \r
45                         id="subItem-{{subItem.text.split(' ').join('-')}}"\r
46                         b2b-header-submenu \r
47                         ng-repeat="i in item.children | orderBy : 'column'" \r
48                         ng-mousemove="submenuLevelAction(i.text,i.column)" \r
49                         role="presentation">\r
50            <!-- Favorites -->\r
51                                 <div ng-if="i.text=='Favorites'" >                                      \r
52                                         <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text}}</a>                \r
53                                         <i id="favorite-star" data-size="large"  class="icon-star favorites-icon-active"></i>                   \r
54                                         <div class="header-columns-div" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()" >\r
55                                                 <div class="header-tertiary-wrapper" id="header-favorites">\r
56                                                     <ul class="header-tertiary" role="menu">\r
57                                                         <li role="presentation">\r
58                                                                 <div                                                   \r
59                                                      ng-repeat="subItem in favoritesMenuItems"\r
60                                                      ng-show="showFavorites"\r
61                                                      ng-hide="hideMenus"\r
62                                                      id="favoritesMenuItems-{{subItem.text.split(' ').join('-')}}">\r
63                                                     <div class="fav-links">\r
64                                                         <i id="favorite-selector-favorites-list"\r
65                                                            class="icon-star favorites-icon-active"                                                       \r
66                                                            data-ng-click="removeAsFavoriteItem($event, subItem.menuId)"\r
67                                                            ng-mousedown="removeAsFavoriteItem($event, subItem.menuId)">\r
68                                                         </i>\r
69                                                         <a id="favorites-list" aria-label="{{subItem.text}}" ng-click="goToUrl(subItem)">{{subItem.text}}</a>\r
70                                                     </div>\r
71                                                 </div>  \r
72                                                                                                 \r
73                                                             <div id="favorites-empty"  class="favorites-window-empty"   ng-show="emptyFavorites">\r
74                                                                 <p id="p-no-favs-icon" class="no-fav-icon">\r
75                                                                         <span class="icon-star" ></span>\r
76                                                                 </p>\r
77                                                                 <p id="p-no-favs" class="largeText">No Favorites</p>\r
78                                                                 <p id="p-no-favs-desc"  class="normal">Add your favorite items for quick access.</p>\r
79                                                                 </div>\r
80                                                         </li>\r
81                                                     </ul>\r
82                                             </div>\r
83                                         </div>                  \r
84                                 </div>\r
85             <!-- Support or Help -->\r
86                                 <div ng-if="item.text=='Support' || item.text=='Help'" id="second-level-menus-help">                            \r
87                                         <a href="javascript:void(0);" ng-click="goToUrl(i);auditLog(i,'Support')" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>                \r
88                                 </div>\r
89                 <!-- Others -->\r
90                                 <div ng-if="i.text!='Favorites' && (item.text!='Support' && item.text!='Help')" >\r
91                                         <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>\r
92                                     <div class="header-tertiary-wrapper" >\r
93                                             <ul class="third-level-menu"  role="menu" id="third-level-menus">\r
94 <!-- Third Level menu -->                        \r
95                                                                                 \r
96                                                         <li b2b-header-tertiarymenu ng-repeat="link in i.children | orderBy : 'column'" role="presentation" >\r
97                                                             <i id="level3-star-inactive-{{link.menuId}}" ng-cloak\r
98                                                     class="icon-star favorites-icon-inactive"  data-size="large"\r
99                                                     data-ng-click="setAsFavoriteItem($event, link.menuId)"\r
100                                                     ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)==false">\r
101                                                 </i>\r
102                                                 <i id="level3-star-active-{{link.menuId}}" ng-cloak\r
103                                                    ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)"\r
104                                                    class="icon-star favorites-icon-active ng-cloak"  data-size="large"\r
105                                                    data-ng-click="removeAsFavoriteItem($event, link.menuId)">\r
106                                                 </i>                                              \r
107                                                 \r
108                                                             <a class="third-level-title"\r
109                                                           aria-label="{{link.text | elipsis: 50}}"\r
110                                                           ng-click="goToUrl(link);auditLog(link,'application')">{{link.text| elipsis: 50}}</a>\r
111 <!-- Fourth Level menu -->\r
112                                                             <div b2b-tertiary-link ng-repeat="title in link.children"  >\r
113                                                                 <i id="level4-star-inactive-{{title.menuId}}" ng-cloak\r
114                                                                class="icon-star favorites-icon-inactive"\r
115                                                                data-ng-click="setAsFavoriteItem($event, title.menuId)"\r
116                                                                ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)==false">\r
117                                                             </i>\r
118                                                             <i id="level4-star-active-{{title.menuId}}" ng-cloak\r
119                                                                class="icon-star favorites-icon-active"\r
120                                                                data-ng-click="removeAsFavoriteItem($event, title.menuId)"\r
121                                                                ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)">\r
122                                                             </i>\r
123                                                                 <a href="javascript:void(0);" class="header-tertiaryitem"  ng-class="{'disabled': title.disabled}" role="menuitem" ng-click="goToUrl(title);auditLog(title,'functional')">{{title.text | elipsis: 50}}</a>                                      \r
124                                                             </div>\r
125                                                         </li>   \r
126                                                         \r
127                                                            \r
128                                               \r
129                                                                  \r
130                                             </ul>\r
131                                     </div>\r
132                                 </div>\r
133            \r
134                         </li>                        \r
135                     </ul>\r
136                 </div>\r
137             </li>\r
138 <!-- Right side of the Menu - User Icon and Notification flag -->\r
139             <div class="login-section">\r
140      <!-- User Icon -->\r
141             <li class="header__item profile" aria-haspopup="true">\r
142                                 <b2b-flyout>\r
143                                         <div b2b-flyout-toggler >\r
144                                                 <div class="icon-people-oneperson" id="header-user-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>\r
145                                         <div id="login-snippet-text" class="login-snippet-text">{{header.isGuest ? 'Guest' : header.firstName}}</div>                  \r
146                                         </div>                                  \r
147                             <b2b-flyout-content horizontal-placement="center" vertical-placement="below">\r
148                                                 <div  ng-controller="loginSnippetCtrl" >\r
149                                                         <div id="reg-header-snippet">\r
150                                                                 <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">\r
151                                                                         <ul class="reg-Details-table">\r
152                                                                                 <li>\r
153                                                                 <div class="reg-userName-table">\r
154                                                                     <div id="reg-userName-table-row">\r
155                                                                         <div id="reg-userName-table-cell">\r
156                                                                             <h3 >\r
157                                                                             {{firstName}} {{lastName}}&nbsp;</h3>\r
158                                                                             <span>&nbsp;</span>\r
159                                                                         </div>\r
160                                                                     </div>\r
161                                                                 </div>\r
162                                                             </li>\r
163                                                                                 <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn" style=font-weight:bold>Email<span class="visuallyhidden">:\r
164                                                             </span></span></div></li>\r
165                                                                                 <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">\r
166                                                                 {{loginSnippetEmail}}</span></div></li>\r
167                                                             <li>&nbsp;</li>\r
168                                                                                 <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn" style=font-weight:bold>\r
169                                                                 User Id<span class="visuallyhidden">:</span></span></div></li>\r
170                                                                                 <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn">\r
171                                                                 {{loginSnippetUserid}}<span class="visuallyhidden"></span></span></div></li>\r
172                                                             <li>&nbsp;</li>\r
173                                                                                 <li><div class="reg-userLastLogin-label"><span class="reg-userLastLogin-label-spn" style=font-weight:bold>\r
174                                                                 Last login<span class="visuallyhidden">:</span></span></div></li>\r
175                                                                                 <li><div class="reg-userLastLogin-value"><span class="reg-userLastLogin-value-spn">\r
176                                                                 {{lastLogin}}<span class="visuallyhidden"></span></span></div></li>\r
177                                                                 <li>&nbsp;</li>\r
178                                                                                 <li>\r
179                                                                         <div class="display-userAppRoles-label">\r
180                                                                                 <a href="javascript:void(0);"  ng-click="getUserApplicationRoles()"  class="icon-controls-add-maximize" ><span>Applications and Roles</span></a>\r
181                                                                         </div>\r
182                                                                 \r
183                                                                 <div class="display-userAppRoles-label" ng-show="displayUserAppRoles" style="height:200px; overflow-y:auto;">\r
184                                                                      <div ng-repeat="ua in userapproles track by  $index">\r
185                                                                     <div class="reg-userApp-value">\r
186                                                                         <span class="reg-userApp-value-spn" style=font-weight:bold>{{ua.App}}<span class="visuallyhidden">:</span></span>\r
187                                                                                                         </div>                                                             \r
188                                                                         <div ng-repeat="role in ua.Roles track by  $index" class="reg-userAppRoles-value" >\r
189                                                                                 <span class="reg-userAppRoles-value-spn">{{role}}</span>\r
190                                                                         </div>\r
191                                                                         </div>\r
192                                                                 </div>\r
193                                                                 </li>\r
194                                                                         </ul>\r
195                                                         <div id="reg-logout-div" style="padding-top: 8px">\r
196                                                               <button href="javascript:void(0)" id="allLogout" ng-click="allAppsLogout()" class="btn btn-alt btn-small">\r
197                                                                                         Log out\r
198                                                                                 </button>\r
199                                                         </div>\r
200                                                         </div>\r
201                                                         </div>\r
202                                                 </div>          \r
203                             </b2b-flyout-content>\r
204                         </b2b-flyout>\r
205             </li> \r
206     <!-- Notification flag -->\r
207             <li class="header__item notification" aria-haspopup="true" class="notification-li">\r
208                 <b2b-flyout>\r
209                         <div b2b-flyout-toggler class="notification-div">\r
210                                 <div class="notifications-count" ng-hide="notificationCount.count==0" ng-bind="notificationCount.count"></div>          \r
211                                                 <div  class="icon-content-flag megamenu-notification-overrides" class="b2b-flyout-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>\r
212                             </div>\r
213                             <b2b-flyout-content horizontal-placement="center" vertical-placement="below">\r
214                                                 <div class="notification-content" ng-controller="notificationCtrl" >\r
215                                                         <div class="ng-scope">\r
216                                                                 <div id="notification" class="notificationBox ">\r
217                                                                         <div align ="right">\r
218                                                                                  <a ui-sref="root.notificationHistory" style="font-size: 14px"> View All Recent Notifications </a>\r
219                                                                         </div>\r
220                                                                         <div class="notification-header">\r
221                                                                                 <div style="float:left;">\r
222                                                                                         <p class="notification-heading">Notifications</p>\r
223                                                                                 </div>\r
224                                                                                 <div style="clear:both;"></div>\r
225                                                                         </div>\r
226                                                                         <div ng-show="notifications.length==0">\r
227                                                                                 <div class="notification-main">\r
228                                                                                         <div style="height:113px;">\r
229                                                                                                 <div align="center" class="icon-information notification-info-icon"></div>\r
230                                                                                         </div>\r
231                                                                                 <div>\r
232                                                                                 <p class="notification-text">No New Notifications.</p>\r
233                                                                         </div>\r
234                                                                         \r
235                                                                 </div>\r
236                                                         </div>\r
237                                                         <div class="notification-main" ng-show="notifications.length>0">\r
238                                                                 <ul class="notifications-list">\r
239                                                                         <li class="item" data-id="5" ng-repeat="item in notifications">\r
240                                                                                 <div class="icon">\r
241                                                                                         <span class="important" ng-show="item.priority==2"/>\r
242                                                                                         <span class="normal" ng-show="item.priority==1"/>\r
243                                                                                 </div>\r
244                                                                                 <div class="details">\r
245                                                                                         <span class="title" ng-bind="item.title"></span>\r
246                                                                                         <span class="message-body" ng-bind="item.message"></span>\r
247                                                                                         <!-- <span class="date" ng-bind="item.time" ></span> -->\r
248                                                                                         <mydate>{{item.time | date:'MM/dd/yyyy hh:mm:ss a Z'}}</mydate>                 \r
249                                                                                 </div>\r
250                                                                                 <button type="button" ng-click="deleteNotification($index)" class="button-default button-dismiss js-dismiss">x</button>\r
251                                                                         </li>\r
252                                                                 </ul>\r
253                                                         </div>\r
254                                                         <div class="notification-footer">\r
255                                                                 <div class="notification-links">\r
256                                                                         <div style="clear:both;"></div>\r
257                                                                 </div>\r
258                                                         </div>\r
259                                                 </div>                                  \r
260                             </b2b-flyout-content>\r
261                         </b2b-flyout>\r
262             </li>\r
263             </div>\r
264         </ul>\r
265         </header>\r
266 </div>\r