Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.50 KB | None | 0 0
  1. <% if (!user) { %>
  2. <p>Welcome! Please <a href="/login">log in</a>.</p>
  3. <% } else { %>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7.  
  8. <meta charset="UTF-8">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  11. <link rel="stylesheet" href="/views/bachelor.css">
  12.  
  13. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  14.  
  15. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  16.  
  17. <script src="javascripts/modal.js"></script>
  18.  
  19. <title>RadioWheel</title>
  20. <link rel="shortcut icon" type="image/png" href="assets/logo1.png">
  21.  
  22. <script>
  23. function toTheTop() {
  24. document.body.scrollTop = 0;
  25. document.documentElement.scrollTop = 0;
  26. }
  27. </script>
  28.  
  29. </head>
  30.  
  31. <body>
  32.  
  33. <div class="jumbotron" >
  34. <h1 id="header">RadioWheel</h1>
  35. <p id="header-p"> - Ha oversikt over hva som spilles av -</p>
  36. </div>
  37.  
  38. <nav class="navbar navbar-default tabs">
  39. <div class="container-fluid">
  40. <div class="navbar-header" id="navbar-header">
  41. <img class="navbar-brand" src="../assets/logo1.svg">
  42. <a class="navbar-brand" href="#" >Administrasjon</a>
  43. </div>
  44.  
  45. <ul class="nav navbar-nav tabcontent">
  46. <li class ="active" data-toggle="tab" href="#tabBus" role="tab"><a href="#tabBus">Busser</a></li>
  47. </ul>
  48.  
  49. <ul class="nav navbar-nav tabcontent">
  50. <li class ="" data-toggle="tab" href="#tabUsers" ><a href="#tabUsers">Aktive brukere</a></li>
  51. </ul>
  52.  
  53. <ul class="nav navbar-nav navbar-right">
  54. <li data-toggle="tab" href="#tabProfile"><a href="#tabProfile"><span class="glyphicon glyphicon-user"></span> Profil</a></li>
  55. <li><a href="/logout"><span class="glyphicon glyphicon-log-out"></span> Logg ut</a></li>
  56. </ul>
  57. </div>
  58. </nav>
  59.  
  60. <!--TAB 1: busses -->
  61. <div class="tab-content">
  62. <div class="tab" id="tabBus">
  63. <h2 >Oversikt over busser</h2>
  64.  
  65. <!--Search input -->
  66. <form>
  67. <div id="inputSearch"class="input-group">
  68. <input type="text" class="form-control" placeholder="Søk på buss">
  69. <div class="input-group-btn">
  70. <button class="btn btn-default" type="submit">
  71. <i class="glyphicon glyphicon-search"></i>
  72. </button>
  73. </div>
  74. </div>
  75. </form>
  76.  
  77. <table class="table" id="overviewTableNew">
  78. <thead>
  79. <tr>
  80. <th>Hvilken buss</th>
  81. <th>Hva spilles</th>
  82. <th>Status</th>
  83. <th>Endre</th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. <% for(i = 0; i < data.length; i++) { %>
  88. <tr class="modalOpenButton" id="rowbus<%=data[i].idBus%>">
  89. <!-- Bus ID-->
  90. <td class="busField"><%= data[i].idBus%></td>
  91.  
  92. <!-- shows playing channel -->
  93. <% if (data[i].channel != null) {%>
  94. <td class="channelField"><%=data[i].channel %></td>
  95. <% } else {%>
  96. <td class="channelField">NULL</td>
  97. <% } %>
  98.  
  99. <!-- if active != 0 show active-->
  100. <% if (data[i].active == 0 ){%>
  101. <td class ="activeField">Inaktiv</td>
  102. <% } else {%>
  103. <td class="activeField">Aktiv</td>
  104. <% } %>
  105.  
  106. <!--Button in table opens modal. Has ID "bus" + number from data -->
  107. <td><button id = "bus<%=data[i].idBus%>" type="button" class="btn btn-default btn-sm" style="background-color:#DCF1EE">
  108. <span class="glyphicon glyphicon-pencil"></span></button>
  109. </td>
  110. </tr>
  111. <%}%>
  112. </tbody>
  113. </table>
  114. <nav>
  115. <button id="topBtn" type="button" onclick="toTheTop()" title="Go to top">Gå til toppen
  116. <span class="glyphicon glyphicon-chevron-up"></span></button>
  117. </nav>
  118. </div>
  119.  
  120. <!--TAB 2: users -->
  121. <div class="tab" id="tabUsers">
  122. <h2 >Oversikt over brukere</h2>
  123. <table class="table" id="overviewTableNew">
  124. <thead>
  125. <tr>
  126. <th>Bruker</th>
  127. <th>Buss</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. <% for(i = 0; i < userData.length; i++) { %>
  132. <tr class="modalOpenButton" id="hei">
  133. <!-- User -->
  134. <td><%= userData[i].name%></td>
  135.  
  136. <!-- shows playing channel -->
  137. <td><%=userData[i].username %></td>
  138. </tr>
  139. <%}%>
  140. </tbody>
  141. </table>
  142. <nav>
  143. <button id="topBtn" type="button" onclick="toTheTop()" title="Go to top">Gå til toppen
  144. <span class="glyphicon glyphicon-chevron-up"></span></button>
  145. </nav>
  146. </div>
  147.  
  148. <!--TAB 3: Profile -->
  149. <div class="tab" id="tabProfile">
  150. <div class="profile">
  151. <h4 id="profileHeader">Min profil</h4>
  152. <form id="profileForm">
  153. Brukernavn:
  154. <input type="text" name="firstname">
  155. <br>
  156. Passord:
  157. <input type="text" name="password">
  158. <br>
  159. Nytt passord:
  160. <input type="text" name="newPassword">
  161. <input type="submit" name="save">
  162. </form>
  163. </div>
  164. </div>
  165. </div>
  166.  
  167. <!-- Modal -->
  168. <div id="myModal" class="modal fade" role="dialog">
  169. <div class="modal-dialog">
  170.  
  171. <!-- Modal content-->
  172. <div class="modal-content">
  173. <div class="modal-header">
  174. <button type="button" class="close" data-dismiss="modal">&times;</button>
  175. <h4 class="modal-title">Reguler avspilling</h4>
  176. </div>
  177. <div class="modal-body">
  178. <h5>Buss: </h5>
  179. <input type="text" id="modalBusField">
  180.  
  181. <h5> Aktivitet: </h5>
  182. <input type="text" id="modalActiveField">
  183.  
  184. <h5>Spiller av: </h5>
  185. <input type="text" id="modalChannelField">
  186.  
  187. <button type="button">Endre avspilling <span class="glyphicon glyphicon-pencil"></span></button>
  188. <button type="button">Hei</button>
  189. </div>
  190. <div class="modal-footer">
  191. <button type="button" class="btn btn-default" data-dismiss="modal">Lukk</button>
  192. </div>
  193. </div>
  194.  
  195. </div>
  196. </div>
  197.  
  198. <!-- footer at bottom of page -->
  199. <footer id="footer">
  200. <p id="copyright">FourC AS © 2013 - 2018 - All Rights Reserved</p>
  201. </footer>
  202.  
  203. </body>
  204. </html>
  205.  
  206. <% } %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement