Commit 06c69cea by jhrabal

radegast

parent c28b2eda
......@@ -11,7 +11,7 @@
<parent>
<groupId>com.jh</groupId>
<artifactId>boot-react</artifactId>
<version>0.0.4</version>
<version>0.0.5</version>
<relativePath>../boot-react</relativePath>
</parent>
......@@ -21,7 +21,7 @@
<frontend-maven-plugin-version>1.0</frontend-maven-plugin-version>
<node-version>v8.1.3</node-version>
<npm-version>5.0.3</npm-version>
<boot-common.version>0.0.4</boot-common.version>
<boot-common.version>0.0.5</boot-common.version>
</properties>
<dependencies>
......
package com.jh.radegast.api;
import java.util.Collection;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.jh.common.web.list.DefaultSorting;
import com.jh.common.web.list.ListHelper;
import com.jh.common.web.list.Page;
import com.jh.common.web.list.PagingInfo;
import com.jh.common.web.list.SortTrend;
import com.jh.radegast.model.Rating;
import com.jh.radegast.rating.RatingService;
......@@ -21,6 +28,12 @@ public class RatingApiController {
private RatingService service;
//paged endpoint
// @RequestMapping(path = "ratings", method = RequestMethod.GET)
// @DefaultSorting(field = "name", trend = SortTrend.ASCENDING)
// public ResponseEntity<List<Rating>> filterCustomers(PagingInfo pagingInfo) {
// Page<Rating> page = service.filter(pagingInfo);
// return ListHelper.pagedResponse(page);
// }
@RequestMapping(path = "ratings", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED)
......
package com.jh.radegast.api;
public class RatingsStats {
public RatingsStats() {
}
}
......@@ -2,6 +2,7 @@ package com.jh.radegast.rating;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
......@@ -21,6 +22,7 @@ public class RatingRepository extends AbstractHibernateRepository {
}
for (Rating r : ratings) {
r.setCreated(new Date(Long.parseLong(r.getKey())));
save(r);
}
}
......
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en" class="auth-body">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
......@@ -8,18 +8,16 @@
<meta http-equiv="cache-control" content="max-age=0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="Thu, 19 Jul 1984 7:15:00 GMT">
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
<meta name="theme-color" content="#1287ed">
<meta name="msapplication-navbutton-color" content="#1287ed">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" type="text/css" href="/p.css"/>
<title th:text="#{login.title}">Login</title>
<link rel="stylesheet" type="text/css" href="p.css"/>
<title th:text="#{public.title}">Inodio</title>
<!-- [[#{login.error.usernameRequired}]] -->
<script type="text/javascript" th:utext="${_labels}">
/* TODO */
window.__labels = [];
window.__labels['UsernameRequired'] = "Vyplňte prosím e-mail";
window.__labels['PasswordRequired'] = "Vyplňte prosím heslo";
......@@ -27,98 +25,29 @@
window.__labels['UsernameTaken'] = "Uživatel již existuje. Zvolte prosím jiný e-mail";
window.__labels['BadUsername'] = "Neplatný e-mail";
window.__labels['BadPassword'] = "Neplatné heslo";
window.__labels['BadUsernameOrPassword'] = "Neplatný e-mail nebo heslo";
window.__labels['ResetTokenSent'] = "Na emailovou adresu byl zaslán postup pro obnovení hesla";
</script>
</head>
<body class="public-body with-top-menu">
<body class="auth-body">
<div class="jumbotron" id="link1">
<div class="container">
<!-- <span class="section-image-right" style="background-image:url('./images/dashboard.png');"></span> -->
<!-- background-position:center bottom; -->
<div class="content half pull-left">
<div class="jumbotron-main">
<h2 th:text="#{public.title}">Inodio</h2>
<p th:text="#{public.jumbotron.text}">Chytrý nástroj pro online správu živností a malých společností</p>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a>
<div class="auth-page">
<div class="auth-form">
<h1 class="small" th:text="#{login.title}">Login</h1>
<div id="loginError" class="auth-form-field-error" style="display:none;"></div>
<form id="loginForm">
<div id="loginErrorId"></div>
<div class="auth-form-input">
<input id="loginUsername" type="text" placeholder="username (email)" th:placeholder="#{login.login}"/>
<div id="loginUsernameError" class="auth-form-field-error"></div>
</div>
<div class="auth-form-input">
<input id="loginPassword" type="password" placeholder="password" th:placeholder="#{login.password}"/>
<div id="loginPasswordError" class="auth-form-field-error"></div>
</div>
</div>
</div>
<div class="section section-1" id="link2">
<div class="container">
<span class="section-image-left" style="background-image:url('./images/dashboard.png');"></span>
<div class="content half pull-right content-350">
<h2 _th:text="#{public.section1.title}">Fusce consectetuer risus a nunc</h2>
<span class="full-content">
<span _th:text="#{public.section1.text}">Sed convallis magna eu sem. Fusce wisi. Morbi scelerisque luctus velit. Nullam lectus justo, vulputate eget mollis sed, tempor sed magna. Fusce nibh. Proin mattis lacinia justo. Nam sed tellus id magna elementum tincidunt.</span>
<!--
<ul _th:utext="#{public.section1.features}">
<li>Vystavovat a rozesílat <b>faktury</b></li>
<li>Sledovat své <b>příjmy a výdaje</b></li>
<li>Jednoduchou správu <b>daňových sazeb</b> a <b>DPH</b></li>
<li>Organizovat zakázky a náklady do <b>projektů</b></li>
<li>Spravovat informace o svých <b>zákaznících</b></li>
<li>Mít <b>přehled</b> o stavu své firmy prostřednictvím <b>reportů</b></li>
<li><b>Sdílet informace</b> se svými <b>účetními</b>
<li>Přístup <b>24 hodin denně</b></li>
<li>... a mnoho dalšího</li>
</ul>
-->
</span>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a>
</div>
</div>
</div>
<!-- TODO line -->
<div class="section section-2" id="link3">
<div class="container">
<span class="section-image-right" style="background-image:url('./images/secondary.png');"></span>
<div class="content half pull-left content-350">
<h2 _th:text="#{public.section2.title}">Nulla accumsan, elit sit amet varius semper</h2>
<span class="full-content" _th:text="#{public.section2.text}">
Integer pellentesque quam vel velit. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
</span>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a>
</div>
</div>
</div>
<!-- TODO line -->
<!--div class="section section-3">
<div class="container">
<div class="content center">
<h2 th:text="#{public.section3.title}">Testovací verze</h2>
<span class="full-content" th:utext="#{public.section3.text}">Naše řešení neustále vylepšujeme, aby bylo co <b>nejužitečnější</b> a práce s ním co <b>nejjednodušší</b> a <b>nejzábavnější</b>.<br/>Budeme rádi za Vaši zpětnou vazbu</span>
<br/>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a>
</div>
</div>
</div-->
<div class="section section-prominent">
<div class="container" id="signup">
<div class="content pv0">
<div class="center pv25">
<h2 th:text="#{public.signupSection.title}">Začněte používat Inodio zdarma</h2>
<span th:text="#{public.signupSection.text}">Připojte se k různorodé komunitě živnostníků a podnikatelů a začněte používat Inodio během několika málo minut</span>
</div>
<form id="signupForm">
<div class="row-margin-10">
<div id="signupErrorId" class="p10 error-label"></div>
<div class="cell third form-field p10">
<input type="text" id="signupUsername" placeholder="E-mail" th:placeholder="#{public.signupSection.placeholder.email}"/>
<div id="signupUsernameError" class="error-label"></div>
</div>
<div class="cell third form-field p10">
<input type="password" id="signupPassword" placeholder="Password" th:placeholder="#{public.signupSection.placeholder.password}"/>
<div id="signupPasswordError" class="error-label"></div>
</div>
<span class="cell third form-button bottom p10">
<div class="auth-button-container">
<button id="signupButton" class="btn" th:text="#{public.signupSection.button}">Založit účet</button>
<button id="loginButton" th:text="#{login.loginAction}">Login</button>
<div id="authActivityIndicator" class="activity-indicator-container" style="display:none;">
<div class="ball-pulse">
<div></div>
......@@ -127,115 +56,38 @@
</div>
</div>
</div>
</span>
</div>
</form>
<div class="row-margin-10">
<div class="center terms-disclaimer" th:utext="#{public.signupSection.terms}">
<input class="checkbox-inline" type="checkbox" /> Založením a používáním účtu souhlasíte s <a href="./terms.html" target="_terms">podmínkami služby</a>.
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container center">
Copyright <a href="http://www.janhrabal.com" target="_blank">Jan Hrabal</a> &copy;2014-<span id="copyright-year">2018</span>
</div>
</div>
<div class="top-menu">
<div class="container">
<div class="top-menu-items pull-left left hidden-sm">
<a href="#link1" onclick="return handleScroll('link1');" th:text="#{public.menu.item1}">Domů</a>
<a href="#link2" onclick="return handleScroll('link2');" th:text="#{public.menu.item2}">Vlastnosti</a>
<a href="#link3" onclick="return handleScroll('link3');" th:text="#{public.menu.item3}">O Projektu</a>
<a href="#link3" onclick="return handleScroll('signup');" th:text="#{public.menu.item4}">Registrace</a>
</div>
<div class="top-menu-items pull-right right">
<a href="/auth/login">
<img src="./icons/login.svg" class="login-icon" />
<b th:text="#{public.menu.login}">Přihlášení</b>
</a>
</div>
</div>
<div>
<p class="message">
<a href="/auth/signup" th:text="#{login.signupLink}">Create new account</a>
</p>
<p class="message">
<a href="/" th:text="#{login.homeLink}">Home</a>
</p>
</div>
<div id="side-menu">
<div>
<a href="#" class="menu-item" onclick="return handleScroll('link1', true);" th:text="#{public.menu.item1}">Domů</a>
<a href="#" class="menu-item" onclick="return handleScroll('link2', true);" th:text="#{public.menu.item2}">Vlastnosti</a>
<a href="#" class="menu-item" onclick="return handleScroll('link3', true);" th:text="#{public.menu.item3}">O Projektu</a>
<a href="#" class="menu-item" onclick="return handleScroll('signup', true);" th:text="#{public.menu.item4}">Registrace</a>
<p class="message">
<a href="/auth/reset" id="resetLink" th:text="#{login.resetLink}">Having trouble logging in?</a>
</p>
</div>
</form>
</div>
</div>
<a href="#" id="side-menu-button" class="side-menu-button pull-left visible-block-sm">
<img src="./icons/bars.svg"/>
</a>
<script type="text/javascript" src="/utils.js"></script>
<script type="text/javascript" src="/auth/login.js"></script>
<script type="text/javascript" src="./js/velocity.min.js"></script>
<script type="text/javascript" src="./js/public.js"></script>
<script type="text/javascript" src="./js/signup.js"></script>
<script type="text/javascript">
<script defer="defer">
(function() {
var year = Math.max(2018, (new Date()).getFullYear());
document.getElementById("copyright-year").innerHTML = year;
})();
window.$ = function(id, nonnull) {
if (!id) {
return nonnull ? {} : null;
}
var el = document.getElementById(id);
return el || (nonnull ? {} : null);
}
function handleScroll(id, toggle) {
if (toggle) {
toggleSideMenu();
}
var el = $(id);
if (el) {
Velocity(el, 'scroll', { duration: 750, offset: -62 });
}
return false;
}
function toggleSideMenu() {
var menu = $("side-menu");
var button = $("side-menu-button");
login.form({
formId: "loginForm",
usernameId: "loginUsername",
passwordId: "loginPassword",
loginTargetUri: "[[${loginTargetUri}]]",
resetTargetUri: "[[${resetTargetUri}]]"
});
if (!menu || !button) {
return;
}
var open = window.sideMenuOpen;
if (open) {
Velocity(menu, { translateX: ['-110%', '0%'] }, { duration: 250 });
window.sideMenuOpen = false;
} else {
Velocity(menu, { translateX: ['0%', '-110%'] }, { duration: 250 });
window.sideMenuOpen = true;
}
}
(function() {
var button = document.getElementById("side-menu-button");
if (!button) {
return;
}
button.onclick = function(e) {
var ev = e || event;
ev.preventDefault();
toggleSideMenu();
}
})();
</script>
<script type="text/javascript" defer="defer">
(function() { signup && signup.form() })();
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment