Commit 06c69cea by jhrabal

radegast

parent c28b2eda
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<parent> <parent>
<groupId>com.jh</groupId> <groupId>com.jh</groupId>
<artifactId>boot-react</artifactId> <artifactId>boot-react</artifactId>
<version>0.0.4</version> <version>0.0.5</version>
<relativePath>../boot-react</relativePath> <relativePath>../boot-react</relativePath>
</parent> </parent>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<frontend-maven-plugin-version>1.0</frontend-maven-plugin-version> <frontend-maven-plugin-version>1.0</frontend-maven-plugin-version>
<node-version>v8.1.3</node-version> <node-version>v8.1.3</node-version>
<npm-version>5.0.3</npm-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> </properties>
<dependencies> <dependencies>
......
package com.jh.radegast.api; package com.jh.radegast.api;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus; 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.model.Rating;
import com.jh.radegast.rating.RatingService; import com.jh.radegast.rating.RatingService;
...@@ -21,6 +28,12 @@ public class RatingApiController { ...@@ -21,6 +28,12 @@ public class RatingApiController {
private RatingService service; private RatingService service;
//paged endpoint //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) @RequestMapping(path = "ratings", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED) @ResponseStatus(HttpStatus.CREATED)
......
package com.jh.radegast.api;
public class RatingsStats {
public RatingsStats() {
}
}
...@@ -2,6 +2,7 @@ package com.jh.radegast.rating; ...@@ -2,6 +2,7 @@ package com.jh.radegast.rating;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -21,6 +22,7 @@ public class RatingRepository extends AbstractHibernateRepository { ...@@ -21,6 +22,7 @@ public class RatingRepository extends AbstractHibernateRepository {
} }
for (Rating r : ratings) { for (Rating r : ratings) {
r.setCreated(new Date(Long.parseLong(r.getKey())));
save(r); save(r);
} }
} }
......
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html lang="en" class="auth-body">
<head> <head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="cache-control" content="max-age=0"> <meta http-equiv="cache-control" content="max-age=0">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> <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 http-equiv="pragma" content="no-cache">
<meta name="theme-color" content="#1287ed"> <link rel="stylesheet" type="text/css" href="/p.css"/>
<meta name="msapplication-navbutton-color" content="#1287ed"> <title th:text="#{login.title}">Login</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <!-- [[#{login.error.usernameRequired}]] -->
<link rel="stylesheet" type="text/css" href="p.css"/> <script type="text/javascript" th:utext="${_labels}">
<title th:text="#{public.title}">Inodio</title> /* TODO */
window.__labels = [];
<script type="text/javascript" th:utext="${_labels}"> window.__labels['UsernameRequired'] = "Vyplňte prosím e-mail";
window.__labels = []; window.__labels['PasswordRequired'] = "Vyplňte prosím heslo";
window.__labels['UsernameRequired'] = "Vyplňte prosím e-mail"; window.__labels['UnexpectedError'] = "Došlo k neočekávané chybě";
window.__labels['PasswordRequired'] = "Vyplňte prosím heslo"; window.__labels['UsernameTaken'] = "Uživatel již existuje. Zvolte prosím jiný e-mail";
window.__labels['UnexpectedError'] = "Došlo k neočekávané chybě"; window.__labels['BadUsername'] = "Neplatný e-mail";
window.__labels['UsernameTaken'] = "Uživatel již existuje. Zvolte prosím jiný e-mail"; window.__labels['BadPassword'] = "Neplatné heslo";
window.__labels['BadUsername'] = "Neplatný e-mail"; window.__labels['BadUsernameOrPassword'] = "Neplatný e-mail nebo heslo";
window.__labels['BadPassword'] = "Neplatné heslo"; window.__labels['ResetTokenSent'] = "Na emailovou adresu byl zaslán postup pro obnovení hesla";
</script> </script>
</head> </head>
<body class="public-body with-top-menu"> <body class="auth-body">
<div class="jumbotron" id="link1"> <div class="auth-page">
<div class="container"> <div class="auth-form">
<!-- <span class="section-image-right" style="background-image:url('./images/dashboard.png');"></span> --> <h1 class="small" th:text="#{login.title}">Login</h1>
<!-- background-position:center bottom; --> <div id="loginError" class="auth-form-field-error" style="display:none;"></div>
<div class="content half pull-left"> <form id="loginForm">
<div class="jumbotron-main"> <div id="loginErrorId"></div>
<h2 th:text="#{public.title}">Inodio</h2> <div class="auth-form-input">
<p th:text="#{public.jumbotron.text}">Chytrý nástroj pro online správu živností a malých společností</p> <input id="loginUsername" type="text" placeholder="username (email)" th:placeholder="#{login.login}"/>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a> <div id="loginUsernameError" class="auth-form-field-error"></div>
</div> </div>
</div> <div class="auth-form-input">
</div> <input id="loginPassword" type="password" placeholder="password" th:placeholder="#{login.password}"/>
</div> <div id="loginPasswordError" class="auth-form-field-error"></div>
</div>
<div class="section section-1" id="link2"> <div class="auth-button-container">
<div class="container"> <button id="loginButton" th:text="#{login.loginAction}">Login</button>
<span class="section-image-left" style="background-image:url('./images/dashboard.png');"></span> <div id="authActivityIndicator" class="activity-indicator-container" style="display:none;">
<div class="content half pull-right content-350"> <div class="ball-pulse">
<h2 _th:text="#{public.section1.title}">Fusce consectetuer risus a nunc</h2> <div></div>
<span class="full-content"> <div></div>
<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> <div></div>
<!-- </div>
<ul _th:utext="#{public.section1.features}"> </div>
<li>Vystavovat a rozesílat <b>faktury</b></li> </div>
<li>Sledovat své <b>příjmy a výdaje</b></li> <div>
<li>Jednoduchou správu <b>daňových sazeb</b> a <b>DPH</b></li> <p class="message">
<li>Organizovat zakázky a náklady do <b>projektů</b></li> <a href="/auth/signup" th:text="#{login.signupLink}">Create new account</a>
<li>Spravovat informace o svých <b>zákaznících</b></li> </p>
<li>Mít <b>přehled</b> o stavu své firmy prostřednictvím <b>reportů</b></li> <p class="message">
<li><b>Sdílet informace</b> se svými <b>účetními</b> <a href="/" th:text="#{login.homeLink}">Home</a>
<li>Přístup <b>24 hodin denně</b></li> </p>
<li>... a mnoho dalšího</li> </div>
</ul> <div>
--> <p class="message">
</span> <a href="/auth/reset" id="resetLink" th:text="#{login.resetLink}">Having trouble logging in?</a>
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a> </p>
</div> </div>
</div> </form>
</div> </div>
</div>
<!-- TODO line -->
<div class="section section-2" id="link3"> <script type="text/javascript" src="/utils.js"></script>
<div class="container"> <script type="text/javascript" src="/auth/login.js"></script>
<span class="section-image-right" style="background-image:url('./images/secondary.png');"></span>
<div class="content half pull-left content-350"> <script defer="defer">
<h2 _th:text="#{public.section2.title}">Nulla accumsan, elit sit amet varius semper</h2> (function() {
<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. login.form({
</span> formId: "loginForm",
<a class="btn anim" href="signup" onclick="return handleScroll('signup');" th:text="#{public.cta}">Založit účet zdarma</a> usernameId: "loginUsername",
</div> passwordId: "loginPassword",
</div> loginTargetUri: "[[${loginTargetUri}]]",
</div> resetTargetUri: "[[${resetTargetUri}]]"
});
<!-- TODO line -->
<!--div class="section section-3"> })();
<div class="container"> </script>
<div class="content center"> </body>
<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>
<div id="authActivityIndicator" class="activity-indicator-container" style="display:none;">
<div class="ball-pulse">
<div></div>
<div></div>
<div></div>
</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>
<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>
</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="./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">
(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");
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> </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