diff --git a/gemeinsamforschen/src/main/java/unipotsdam/gf/config/GFDatabaseConfig.java b/gemeinsamforschen/src/main/java/unipotsdam/gf/config/GFDatabaseConfig.java index cefe2e289c2727db459f27dc5606aa0ceb9f9d6b..252905102d2472eaa125f06499bbdfe1663ea254 100644 --- a/gemeinsamforschen/src/main/java/unipotsdam/gf/config/GFDatabaseConfig.java +++ b/gemeinsamforschen/src/main/java/unipotsdam/gf/config/GFDatabaseConfig.java @@ -7,7 +7,7 @@ public class GFDatabaseConfig { public static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; public static final String DB_URL = "jdbc:mysql://localhost"; // Database credentials - public static final String USER = "root2"; - public static final String PASS = "voyager2"; + public static final String USER = "root"; + public static final String PASS = ""; public static final String DB_NAME = "fltrail"; } diff --git a/gemeinsamforschen/src/main/java/unipotsdam/gf/core/management/user/headLine.java b/gemeinsamforschen/src/main/java/unipotsdam/gf/core/management/user/headLine.java index 5286e026565364393a3a680ff3c9484616202aa8..087a26f8dfd29728abc9de226ef1511a26c59c82 100644 --- a/gemeinsamforschen/src/main/java/unipotsdam/gf/core/management/user/headLine.java +++ b/gemeinsamforschen/src/main/java/unipotsdam/gf/core/management/user/headLine.java @@ -1,5 +1,7 @@ package unipotsdam.gf.core.management.user; +import unipotsdam.gf.core.management.ManagementImpl; + import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; @@ -12,11 +14,26 @@ public class headLine extends SimpleTagSupport { PageContext pageContext = (PageContext) getJspContext(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String projectId = request.getParameter("projectId"); + String token = request.getParameter("token"); + ManagementImpl management = new ManagementImpl(); JspWriter out = getJspContext().getOut(); + User user = management.getUserByToken(token); + Boolean isStudent = user.getStudent(); out.println("<div class=\"container-fluid\">\n" + " <table style=\"width:100%\">\n" + " <tr>\n" + - " <td style=\"width:70%\"><h2 id=\"headLineProject\"></h2></td>\n" + + " <td style=\"width:70%\"><h2 id=\"headLineProject\">"); + if (projectId!=null){ + out.println(projectId); + }else{ + if (isStudent){ + out.println("Studentenübersicht "+user.getName()); + }else{ + out.println("Dozentenübersicht "+user.getName()); + } + + } + out.println("</h2></td>\n" + " <td style=\"width:30%\">\n" + " <div align=\"right\" class=\"dropdown\">\n" + " <button style=\"right: 50px;margin-top:-4px;\" class=\"btn btn-primary dropdown-toggle\" type=\"button\"\n" + diff --git a/gemeinsamforschen/src/main/webapp/pages/createProject.jsp b/gemeinsamforschen/src/main/webapp/pages/createProject.jsp index b13361095939684046b7ab9328d3f42eb6f3bbf2..3984538cbfcaa344fa73305dcfd271d368ce6209 100644 --- a/gemeinsamforschen/src/main/webapp/pages/createProject.jsp +++ b/gemeinsamforschen/src/main/webapp/pages/createProject.jsp @@ -1,37 +1,22 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib uri="../core/pages/gemeinsamForschen.tld" prefix="menu" %> +<%@ taglib uri="../core/pages/gemeinsamForschen.tld" prefix="headLine" %> +<%@ taglib uri="../core/pages/gemeinsamForschen.tld" prefix="omniDependencies" %> <!DOCTYPE html> <html> <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>fltrail</title> - <link rel="stylesheet" href="../assets/css/styles.css"> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - <link rel="stylesheet" href="../assets/fonts/font-awesome.min.css"> - <link rel="stylesheet" href="../assets/css/Community-ChatComments.css"> - <link rel="stylesheet" href="../assets/css/Sidebar-Menu-1.css"> - <link rel="stylesheet" href="../assets/css/Sidebar-Menu.css"> - <script src="../assets/js/utility.js"></script> + <omniDependencies:omniDependencies/> <script src="../assets/js/createProject.js"></script> </head> <body> <div id="wrapper"> - <menu:menu></menu:menu> + <menu:menu/> <div class="page-content-wrapper"> - <div class="container-fluid"> - - <h1>Einschreiben in einen Kurs</h1> - <a href="#"><span class="glyphicon glyphicon-envelope" - style="font-size:27px;margin-top:-17px;margin-left:600px;"></span></a> - <a href="#"><span class="glyphicon glyphicon-cog" - style="font-size:29px;margin-left:5px;margin-top:-25px;"></span></a> - </div> + <headLine:headLine/> <div style="margin-left: 2%;"> <br><br> <label>Projektname: <input placeholder="Projektname"></label> diff --git a/gemeinsamforschen/src/main/webapp/pages/overview-docent.jsp b/gemeinsamforschen/src/main/webapp/pages/overview-docent.jsp index 7d41c3df0a9be59f029510b214077e6d57c59417..66419d3734d4082bce9a7053868133e011c76ed7 100644 --- a/gemeinsamforschen/src/main/webapp/pages/overview-docent.jsp +++ b/gemeinsamforschen/src/main/webapp/pages/overview-docent.jsp @@ -16,12 +16,7 @@ <menu:menu/> <div class="page-content-wrapper"> - <h1>Übersicht für Dozent1</h1> - <a href="#"><span class="glyphicon glyphicon-envelope" - style="font-size:27px;margin-top:-17px;margin-left:600px;"></span></a> - <a href="#"><span class="glyphicon glyphicon-cog" - style="font-size:29px;margin-left:5px;margin-top:-25px;"></span></a> - <div> + <headLine:headLine/> <table id="projects"> <!-- getElementById('projects').append um neue Projekte anzufügen --> <tr class="pageChanger"> <td>