Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 9.32 KB | None | 0 0
  1. <%--
  2.     Document   : home
  3.     Created on : 17.11.2017, 17:08:17
  4.     Author     : jankozusnik
  5. --%>
  6.  
  7. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  8. <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  9. <!DOCTYPE html>
  10. <html>
  11.     <head>
  12.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  13.         <title>Projects</title>
  14.         <style type="text/css">
  15.            
  16.             *,
  17.             *:after,
  18.             *:before {
  19.                 box-sizing: border-box;
  20.                 -webkit-box-sizing: border-box;
  21.                 -moz-box-sizing: border-box;
  22.             }
  23.            
  24.             body {
  25.                 background: #eee;
  26.             }
  27.             body, form input, form textarea, form select, form button {
  28.                 font-family: Arial;
  29.                 font-size: 14px;
  30.             }
  31.            
  32.             .main-wrap {
  33.                 width: 640px;
  34.                 margin: 20px auto 20px auto;
  35.                 padding: 50px;
  36.                
  37.             }
  38.             h2 {
  39.                 margin: 50px 0 0 0;
  40.                 padding: 0;
  41.                 text-align: center;
  42.                 /*border-bottom: 1px #eee solid;*/
  43.                 font-size: 32px;
  44.             }
  45.             h2:first-of-type {
  46.                 margin-top: 0;
  47.                 margin-bottom: 30px;
  48.             }
  49.            
  50.             .empty {
  51.                 text-align: center;
  52.                 color: #bbb;
  53.                
  54.                 padding: 30px;
  55.                 margin-top: 50px;
  56.                 border-radius: 3px;
  57.                 background: #fff;
  58.                 -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  59.                 -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  60.                 box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  61.                
  62.             }
  63.            
  64.             .message {
  65.                 border: 2px solid;
  66.                 border-radius: 3px;
  67.                 text-align: center;
  68.                 padding: 10px;
  69.             }
  70.             .message.success-message {
  71.                 border-color: #2a8e2a;
  72.                 background: #5cb85c;
  73.                 color: #fff;
  74.             }
  75.             .message.error-message {
  76.                 border-color: #ce342f;
  77.                 background: #d9534f;
  78.                 color: #fff;
  79.             }
  80.            
  81.            
  82.            
  83.             ul.projects {
  84.                 list-style-type: none;
  85.                 margin: 0;
  86.                 padding: 0;
  87.             }
  88.             ul.projects li {
  89.                 border-radius: 3px;
  90.                 background: #fff;
  91.                 -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  92.                 -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  93.                 box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  94.                 margin: 30px 0;
  95.                 padding: 30px;
  96.             }
  97.             ul.projects li .name {
  98.                 font-weight: 600;
  99.                 font-size: 1.5em;
  100.                 margin-bottom: 10px;
  101.             }
  102.             ul.projects li .description {
  103.                 color: #bbb;
  104.                 line-height: 1.5;
  105.                 margin-bottom: 10px;
  106.             }
  107.             ul.projects li .users {
  108.                 border-top: 1px #eee solid;
  109.                 padding-top: 10px;
  110.             }
  111.            
  112.            
  113.             .btn {
  114.                 line-height: 54px;
  115.                 border: 2px solid;
  116.                 transition: all .3s;
  117.                 padding: 0 60px;
  118.                 border-radius: 2px;
  119.                 font-size: 1.3em;
  120.             }
  121.             .btn.btn-primary {
  122.                 background: #4AE0E2;
  123.                 color: #fff;
  124.                 border: 2px #4AE0E2 solid;
  125.                 -webkit-appearance: none;
  126.                 cursor: pointer;
  127.             }
  128.             .btn.btn-primary:hover {
  129.                 background: #fff;
  130.                 color: #4AE0E2;
  131.             }
  132.            
  133.             label {
  134.                 margin-bottom: 6px;
  135.                 display: inline-block;
  136.                 font-weight: 600;
  137.             }
  138.             .input input,
  139.             .input select,
  140.             .input textarea {
  141.                 width: 100%;
  142.                 outline: none;
  143.             }
  144.             .input input,
  145.             .input textarea {
  146.                 border-radius: 2px;
  147.                 border: 1px #eee solid;
  148.                 padding-left: 10px;
  149.             }
  150.             .input input {
  151.                 height: 46px;
  152.             }
  153.             .input select {
  154.                 border: 1px #eee solid;
  155.             }
  156.             .input textarea {
  157.                 resize: none;
  158.                 height: 100px;
  159.                 padding-top: 10px;
  160.             }
  161.             .input input[type="checkbox"] {
  162.                 display: none;
  163.             }
  164.             .input input[type="checkbox"] + label {
  165.                 display: inline-block;
  166.                 border: 1px #eee solid;
  167.                 line-height: 44px;
  168.                 padding: 0 10px;
  169.                 cursor: pointer;
  170.                 border-radius: 2px;
  171.                 transition: all .3s;
  172.                 font-weight: 400;
  173.             }
  174.             .input input[type="checkbox"]:checked + label {
  175.                 background: #4AE0E2;
  176.                 color: #fff;
  177.                 border-color: #4AE0E2;
  178.             }
  179.            
  180.             .form-wraper {
  181.                 padding: 30px;
  182.                 margin-top: 50px;
  183.                 border-radius: 3px;
  184.                 background: #fff;
  185.                 -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  186.                 -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  187.                 box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
  188.             }
  189.             .form-wraper .form-row {
  190.                 margin: 20px 0;
  191.             }
  192.             .form-wraper .form-row.btn-form-row {
  193.                 text-align: center;
  194.                 margin-top: 40px;
  195.                 margin-bottom: 0;
  196.             }
  197.        
  198.         </style>
  199.     </head>
  200.     <body>
  201.         <div class="main-wrap">
  202.         <h2>Projekty</h2>
  203.        
  204.         <%
  205.             String successMessage = (String) application.getAttribute("success_message");
  206.             String errorMessage = (String) application.getAttribute("error_message");
  207.             if(successMessage != null){
  208.                 application.removeAttribute("success_message");
  209.                 %>
  210.                 <div class="message success-message">
  211.                     <%= successMessage %>
  212.                 </div>
  213.         <%
  214.             }
  215.             if(errorMessage != null){
  216.                 application.removeAttribute("error_message");
  217.                 %>
  218.                 <div class="message error-message">
  219.                     <%= errorMessage %>
  220.                 </div>
  221.         <%
  222.             }
  223.         %>
  224.  
  225.         <c:choose>
  226.             <c:when test="${empty projects.projects}">
  227.                 <div class="empty">
  228.                     Nejsou žádné projekty
  229.                 </div>
  230.             </c:when>
  231.             <c:otherwise>
  232.                 <ul class="projects">
  233.                     <c:forEach items="${projects.getProjects()}" var="project">
  234.                         <li>
  235.                             <div class="name"><c:out value="${project.value.getName()}"></c:out></div>
  236.                             <div class="description"><c:out value="${project.value.getDescription()}"></c:out></div>
  237.                             <div class="users"><c:out value="${project.value.getUsersFullNames()}"></c:out></div>
  238.                         </li>
  239.                     </c:forEach>
  240.                 </ul>
  241.             </c:otherwise>    
  242.         </c:choose>
  243.    
  244.        
  245.         <div class="form-wraper">
  246.             <h2>Nový projekt</h2>
  247.             <form method="POST" action="/SemestralniUkol/project">
  248.                 <input type="hidden" name="action" value="save" />
  249.                 <div class="form-row">
  250.                     <label>Název projektu</label>
  251.                     <div class="input">
  252.                         <input type="text" name="name" />
  253.                     </div>
  254.                 </div>
  255.                 <div class="form-row">
  256.                     <label>Zodpovědné osoby</label>
  257.                     <div class="input">
  258.                         <c:forEach items="${users.getUsers()}" var="user">
  259.                             <input type="checkbox" name="users" value="<c:out value="${user.value.getUserID()}"></c:out>" id="<c:out value="${user.value.getUserID()}"></c:out>" />
  260.                             <label for="<c:out value="${user.value.getUserID()}"></c:out>"><c:out value="${user.value.getFullName()}"></c:out></label>
  261.                         </c:forEach>
  262.                     </div>
  263.                 </div>
  264.                  <div class="form-row">
  265.                     <label>Popis projektu</label>
  266.                     <div class="input">
  267.                         <textarea name="description"></textarea>
  268.                     </div>
  269.                 </div>
  270.                 <div class="form-row btn-form-row">
  271.                     <button class="btn btn-primary">Vytvořit projekt</button>
  272.                 </div>
  273.             </form>
  274.         </div>        
  275.         </div>    
  276.     </body>
  277. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement