nexus site path corrected
[portal.git] / ecomp-portal-BE / war / WEB-INF / tags / header.tag
1 <%@attribute name="title" required="false"%>
2 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
3 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 <%@ tag import="com.google.gson.Gson" %>
5 <!DOCTYPE html>
6 <html lang="en">
7 <head>
8
9     <base href="${config.issuer}">
10
11     <meta charset="utf-8">
12     <title>Simple Web App - ${title}</title>
13     <meta name="viewport" content="width=device-width, initial-scale=1.0">
14     <meta name="description" content="">
15     <meta name="author" content="">
16
17     <!-- stylesheets -->
18     <link href="static/oid-connect/bootstrap2/css/bootstrap.css" rel="stylesheet">
19     <link href="static/oid-connect/bootstrap2/css/bootstrap-responsive.css" rel="stylesheet">
20
21     <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
22     <!--[if lt IE 9]>
23     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
24     <![endif]-->
25
26     <!-- Load jQuery up here so that we can use in-page functions -->
27     <script type="text/javascript" src="static/oid-connect/js/lib/jquery.js"></script>
28     <script type="text/javascript">
29         // safely set the title of the application
30         function setPageTitle(title) {
31                 document.title = "${config.topbarTitle} - " + title;
32         }
33         
34                 // get the info of the current user, if available (null otherwise)
35         function getUserInfo() {
36                 return ${userInfoJson};
37         }
38                 
39                 // get the authorities of the current user, if available (null otherwise)
40                 function getUserAuthorities() {
41                         return ${userAuthorities};
42                 }
43                 
44                 // is the current user an admin?
45                 // NOTE: this is just for  
46                 function isAdmin() {
47                         var auth = getUserAuthorities();
48                         if (auth && _.contains(auth, "ROLE_ADMIN")) {
49                                 return true;
50                         } else {
51                                 return false;
52                         }
53                 }
54     </script>    
55 </head>
56
57 <body>
58
59 <!-- Start body -->