From 004425d59b56cecd62a1dab65bafe9f4aeb60765 Mon Sep 17 00:00:00 2001
From: Axel <wiepke@uni-potsdam.de>
Date: Thu, 13 Sep 2018 16:16:58 +0200
Subject: [PATCH] fixed all clickpaths. DummyCourseSql creates Kaleo and
 gemeinsamForschen

---
 gemeinsamforschen/src/main/webapp/core/footer.js    |  3 +++
 .../src/main/webapp/core/project-student.js         | 12 ++++--------
 gemeinsamforschen/src/main/webapp/core/utility.js   | 13 +++++++------
 .../src/main/webapp/feedback/give-feedback.jsp      |  7 ++-----
 .../src/main/webapp/feedback/view-feedback.jsp      | 10 ++++------
 .../src/main/webapp/project-student.jsp             |  2 --
 .../src/scripts/dbschema/createDummyCourses.sql     |  4 ++++
 7 files changed, 24 insertions(+), 27 deletions(-)
 create mode 100644 gemeinsamforschen/src/scripts/dbschema/createDummyCourses.sql

diff --git a/gemeinsamforschen/src/main/webapp/core/footer.js b/gemeinsamforschen/src/main/webapp/core/footer.js
index 9407ef60..6875866f 100644
--- a/gemeinsamforschen/src/main/webapp/core/footer.js
+++ b/gemeinsamforschen/src/main/webapp/core/footer.js
@@ -1,3 +1,6 @@
 $(document).ready(function(){
+    $('#btnUnstructuredUpload').click(function () {
+        location.href="annotation/upload-unstructured-annotation.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId");
+    });
 
 });
diff --git a/gemeinsamforschen/src/main/webapp/core/project-student.js b/gemeinsamforschen/src/main/webapp/core/project-student.js
index ff3a8f1e..8c7642eb 100644
--- a/gemeinsamforschen/src/main/webapp/core/project-student.js
+++ b/gemeinsamforschen/src/main/webapp/core/project-student.js
@@ -11,7 +11,7 @@ $(document).ready(function(){
         $('.annotationview').click(function () {
             let fullSubmissionId = $(this).closest("li").data("fullSubmissionId");
             let category = $(this).closest("li").data("category");
-            location.href="/annotation/annotation-document.jsp?token=" + getUserTokenFromUrl() +
+            location.href="annotation/annotation-document.jsp?token=" + getUserTokenFromUrl() +
                 "&projectId=" + getQueryVariable("projectId") +
                 "&fullSubmissionId=" + fullSubmissionId +
                 "&category=" + category;
@@ -30,20 +30,16 @@ $(document).ready(function(){
     });
     */
     $('.givefeedback').click(function () {
-        location.href="givefeedback.jsp?token="+getUserTokenFromUrl();
+        location.href="feedback/give-feedback.jsp?token="+getUserTokenFromUrl();
     });
     $('.viewfeedback').click(function () {
-        location.href="viewfeedback.jsp?token="+getUserTokenFromUrl();
+        location.href="feedback/view-feedback.jsp?token="+getUserTokenFromUrl();
     });
 
     $('.annotationview').click(function () {
-        location.href="annotation-document.jsp?token="+getUserTokenFromUrl();
+        location.href="annotation/annotation-document.jsp?token="+getUserTokenFromUrl();
     });
 
-    $('#btnUnstructuredUpload').click(function () {
-        location.href="/annotation/upload-unstructured-annotation.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId");
-    })
-
     $('.viewprojectstudent').click(function () {
         location.href="project-student.jsp?token="+getUserTokenFromUrl();
     })
diff --git a/gemeinsamforschen/src/main/webapp/core/utility.js b/gemeinsamforschen/src/main/webapp/core/utility.js
index 0c674ce7..334fdd7d 100644
--- a/gemeinsamforschen/src/main/webapp/core/utility.js
+++ b/gemeinsamforschen/src/main/webapp/core/utility.js
@@ -1,9 +1,3 @@
-function changeLocationTo(target) {
-    let level = $('#hierarchyLevel').html().trim();
-    let link = calculateHierachy(level) + target;
-    return link;
-}
-
 $(document).ready(function(){
     $('#headLineProject').html($('#projectId').html());
     $('#logout').click(function(){
@@ -20,6 +14,13 @@ $(document).ready(function(){
     });
 });
 
+function changeLocationTo(target) {
+    let level = $('#hierarchyLevel').html().trim();
+    let link = calculateHierachy(level) + target;
+    return link;
+}
+
+
 function goBack() {
     window.history.back();
 }
diff --git a/gemeinsamforschen/src/main/webapp/feedback/give-feedback.jsp b/gemeinsamforschen/src/main/webapp/feedback/give-feedback.jsp
index 26e9ed28..365f23b1 100644
--- a/gemeinsamforschen/src/main/webapp/feedback/give-feedback.jsp
+++ b/gemeinsamforschen/src/main/webapp/feedback/give-feedback.jsp
@@ -2,6 +2,7 @@
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="menu" %>
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="headLine" %>
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="omniDependencies" %>
+<%@ taglib uri="../core/gemeinsamForschen.tld" prefix="footer" %>
 
 <!DOCTYPE html>
 <html>
@@ -135,12 +136,8 @@
 </table>
 </div>
 </div>
+    <footer:footer/>
 </div>
-
-<script src="js/jquery.min.js"></script>
-<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
-<script src="js/Sidebar-Menu.js"></script>
-<script src="js/createJournal.js"></script>
 </body>
 
 </html>
\ No newline at end of file
diff --git a/gemeinsamforschen/src/main/webapp/feedback/view-feedback.jsp b/gemeinsamforschen/src/main/webapp/feedback/view-feedback.jsp
index 4673f4eb..b50e9f89 100644
--- a/gemeinsamforschen/src/main/webapp/feedback/view-feedback.jsp
+++ b/gemeinsamforschen/src/main/webapp/feedback/view-feedback.jsp
@@ -2,6 +2,7 @@
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="menu" %>
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="headLine" %>
 <%@ taglib uri="../core/gemeinsamForschen.tld" prefix="omniDependencies" %>
+<%@ taglib uri="../core/gemeinsamForschen.tld" prefix="footer" %>
 
 <!DOCTYPE html>
 <html>
@@ -113,7 +114,7 @@
                                             <div></div>
                                             <div class="media-body">
                                                 <div class="media" style="overflow:visible;">
-                                                    <div><img src="../assets/img/1.jpg" class="mr-3"
+                                                    <div><img src="../libs/img/1.jpg" class="mr-3"
                                                               style="width: 25px; height:25px;"></div>
                                                     <div class="media-body" style="overflow:visible;">
                                                         <div class="row">
@@ -135,7 +136,7 @@
                                             <div></div>
                                             <div class="media-body">
                                                 <div class="media" style="overflow:visible;">
-                                                    <div><img src="../assets/img/2.jpg" class="mr-3"
+                                                    <div><img src="../libs/img/2.jpg" class="mr-3"
                                                               style="width: 25px; height:25px;"></div>
                                                     <div class="media-body" style="overflow:visible;">
                                                         <div class="row">
@@ -163,11 +164,8 @@
             </table>
         </div>
     </div>
+    <footer:footer/>
 </div>
-
-<script src="js/jquery.min.js"></script>
-<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
-<script src="js/Sidebar-Menu.js"></script>
 </body>
 
 </html>
diff --git a/gemeinsamforschen/src/main/webapp/project-student.jsp b/gemeinsamforschen/src/main/webapp/project-student.jsp
index ccf60351..63562e8b 100644
--- a/gemeinsamforschen/src/main/webapp/project-student.jsp
+++ b/gemeinsamforschen/src/main/webapp/project-student.jsp
@@ -102,8 +102,6 @@
 
                             </tr>
                         </table>
-
-                        <button onclick="goBack()" class="btn btn-secondary">Zur&uuml;ck</button>
                     </td>
                 </tr>
             </table>
diff --git a/gemeinsamforschen/src/scripts/dbschema/createDummyCourses.sql b/gemeinsamforschen/src/scripts/dbschema/createDummyCourses.sql
new file mode 100644
index 00000000..873c6a89
--- /dev/null
+++ b/gemeinsamforschen/src/scripts/dbschema/createDummyCourses.sql
@@ -0,0 +1,4 @@
+INSERT INTO `projects` (`id`, `password`, `active`, `timecreated`, `author`, `adminPassword`, `token`, `phase`) VALUES
+('Kaleo', 'password', 1, '2018-09-07 12:13:21', 'axel', '1234', '4pingsfelmf4', 'CourseCreation'),
+('gemeinsamForschen', 'password', 1, '2018-09-13 08:55:02', 'axel', '1234', '32ptng45g9', 'Execution');
+COMMIT;
\ No newline at end of file
-- 
GitLab