Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%--
- Document : home
- Created on : 17.11.2017, 17:08:17
- Author : jankozusnik
- --%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Projects</title>
- <style type="text/css">
- *,
- *:after,
- *:before {
- box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- }
- body {
- background: #eee;
- }
- body, form input, form textarea, form select, form button {
- font-family: Arial;
- font-size: 14px;
- }
- .main-wrap {
- width: 640px;
- margin: 20px auto 20px auto;
- padding: 50px;
- }
- h2 {
- margin: 50px 0 0 0;
- padding: 0;
- text-align: center;
- /*border-bottom: 1px #eee solid;*/
- font-size: 32px;
- }
- h2:first-of-type {
- margin-top: 0;
- margin-bottom: 30px;
- }
- .empty {
- text-align: center;
- color: #bbb;
- padding: 30px;
- margin-top: 50px;
- border-radius: 3px;
- background: #fff;
- -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- }
- .message {
- border: 2px solid;
- border-radius: 3px;
- text-align: center;
- padding: 10px;
- }
- .message.success-message {
- border-color: #2a8e2a;
- background: #5cb85c;
- color: #fff;
- }
- .message.error-message {
- border-color: #ce342f;
- background: #d9534f;
- color: #fff;
- }
- ul.projects {
- list-style-type: none;
- margin: 0;
- padding: 0;
- }
- ul.projects li {
- border-radius: 3px;
- background: #fff;
- -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- margin: 30px 0;
- padding: 30px;
- }
- ul.projects li .name {
- font-weight: 600;
- font-size: 1.5em;
- margin-bottom: 10px;
- }
- ul.projects li .description {
- color: #bbb;
- line-height: 1.5;
- margin-bottom: 10px;
- }
- ul.projects li .users {
- border-top: 1px #eee solid;
- padding-top: 10px;
- }
- .btn {
- line-height: 54px;
- border: 2px solid;
- transition: all .3s;
- padding: 0 60px;
- border-radius: 2px;
- font-size: 1.3em;
- }
- .btn.btn-primary {
- background: #4AE0E2;
- color: #fff;
- border: 2px #4AE0E2 solid;
- -webkit-appearance: none;
- cursor: pointer;
- }
- .btn.btn-primary:hover {
- background: #fff;
- color: #4AE0E2;
- }
- label {
- margin-bottom: 6px;
- display: inline-block;
- font-weight: 600;
- }
- .input input,
- .input select,
- .input textarea {
- width: 100%;
- outline: none;
- }
- .input input,
- .input textarea {
- border-radius: 2px;
- border: 1px #eee solid;
- padding-left: 10px;
- }
- .input input {
- height: 46px;
- }
- .input select {
- border: 1px #eee solid;
- }
- .input textarea {
- resize: none;
- height: 100px;
- padding-top: 10px;
- }
- .input input[type="checkbox"] {
- display: none;
- }
- .input input[type="checkbox"] + label {
- display: inline-block;
- border: 1px #eee solid;
- line-height: 44px;
- padding: 0 10px;
- cursor: pointer;
- border-radius: 2px;
- transition: all .3s;
- font-weight: 400;
- }
- .input input[type="checkbox"]:checked + label {
- background: #4AE0E2;
- color: #fff;
- border-color: #4AE0E2;
- }
- .form-wraper {
- padding: 30px;
- margin-top: 50px;
- border-radius: 3px;
- background: #fff;
- -webkit-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- -moz-box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- box-shadow: 0px 10px 15px 0px rgba(0,0,0,0.15);
- }
- .form-wraper .form-row {
- margin: 20px 0;
- }
- .form-wraper .form-row.btn-form-row {
- text-align: center;
- margin-top: 40px;
- margin-bottom: 0;
- }
- </style>
- </head>
- <body>
- <div class="main-wrap">
- <h2>Projekty</h2>
- <%
- String successMessage = (String) application.getAttribute("success_message");
- String errorMessage = (String) application.getAttribute("error_message");
- if(successMessage != null){
- application.removeAttribute("success_message");
- %>
- <div class="message success-message">
- <%= successMessage %>
- </div>
- <%
- }
- if(errorMessage != null){
- application.removeAttribute("error_message");
- %>
- <div class="message error-message">
- <%= errorMessage %>
- </div>
- <%
- }
- %>
- <c:choose>
- <c:when test="${empty projects.projects}">
- <div class="empty">
- Nejsou žádné projekty
- </div>
- </c:when>
- <c:otherwise>
- <ul class="projects">
- <c:forEach items="${projects.getProjects()}" var="project">
- <li>
- <div class="name"><c:out value="${project.value.getName()}"></c:out></div>
- <div class="description"><c:out value="${project.value.getDescription()}"></c:out></div>
- <div class="users"><c:out value="${project.value.getUsersFullNames()}"></c:out></div>
- </li>
- </c:forEach>
- </ul>
- </c:otherwise>
- </c:choose>
- <div class="form-wraper">
- <h2>Nový projekt</h2>
- <form method="POST" action="/SemestralniUkol/project">
- <input type="hidden" name="action" value="save" />
- <div class="form-row">
- <label>Název projektu</label>
- <div class="input">
- <input type="text" name="name" />
- </div>
- </div>
- <div class="form-row">
- <label>Zodpovědné osoby</label>
- <div class="input">
- <c:forEach items="${users.getUsers()}" var="user">
- <input type="checkbox" name="users" value="<c:out value="${user.value.getUserID()}"></c:out>" id="<c:out value="${user.value.getUserID()}"></c:out>" />
- <label for="<c:out value="${user.value.getUserID()}"></c:out>"><c:out value="${user.value.getFullName()}"></c:out></label>
- </c:forEach>
- </div>
- </div>
- <div class="form-row">
- <label>Popis projektu</label>
- <div class="input">
- <textarea name="description"></textarea>
- </div>
- </div>
- <div class="form-row btn-form-row">
- <button class="btn btn-primary">Vytvořit projekt</button>
- </div>
- </form>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement