Skip to content

Commit 84deeea

Browse files
committed
10 0 1 fix ui
1 parent 53e64e6 commit 84deeea

8 files changed

Lines changed: 77 additions & 81 deletions

File tree

config/messages/app.properties

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ meals.dateTime=DateTime
2424
meals.calories=Calories
2525

2626
common.add=Add
27-
common.select=Select
28-
common.deleted=Deleted
29-
common.saved=Saved
30-
common.enabled=Enabled
31-
common.disabled=Disabled
27+
common.deleted=Record deleted
28+
common.saved=Record saved
29+
common.enabled=Record enabled
30+
common.disabled=Record disabled
3231
common.errorStatus=Error status

config/messages/app_ru.properties

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ app.footer=Приложение по проекту <a href="https://github.com/
33
app.enter=Войти как
44

55
users.title=Пользователи
6-
users.edit=Редактировать пользователя
7-
users.add=Добавить пользователя
6+
users.edit=Редактирование пользователя
7+
users.add=Добавление пользователя
88
users.name=Имя
99
users.email=Почта
1010
users.roles=Роли
@@ -13,20 +13,19 @@ users.registered=Зарегистрирован
1313
users.password=Пароль
1414

1515
meals.title=Моя еда
16-
meals.edit=Редактировать еду
17-
meals.add=Добавить еду
16+
meals.edit=Редактирование еды
17+
meals.add=Добавление еды
1818
meals.startDate=От даты
1919
meals.endDate=До даты
2020
meals.startTime=От времени
2121
meals.endTime=До времени
2222
meals.description=Описание
23-
meals.dateTime=Время
23+
meals.dateTime=Дата и время
2424
meals.calories=Калории
2525

2626
common.add=Добавить
27-
common.select=Выбрать
28-
common.deleted=Удален
29-
common.saved=Записан
30-
common.enabled=Активирован
31-
common.disabled=Деактивирован
27+
common.deleted=Запись удалена
28+
common.saved=Запись сохранена
29+
common.enabled=Запись активирована
30+
common.disabled=Запись деактивирована
3231
common.errorStatus=Статус ошибки

src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<%@page contentType="text/html" pageEncoding="UTF-8" %>
1+
<%@ page session="false" %>
2+
<%@ page contentType="text/html" pageEncoding="UTF-8" %>
23
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
34

45
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

src/main/webapp/WEB-INF/jsp/fragments/footer.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<%@page contentType="text/html" pageEncoding="UTF-8" %>
1+
<%@ page session="false" %>
2+
<%@ page contentType="text/html" pageEncoding="UTF-8" %>
23
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
34

45
<div class="footer">

src/main/webapp/WEB-INF/jsp/fragments/headTag.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<%@page contentType="text/html" pageEncoding="UTF-8" %>
1+
<%@ page session="false" %>
2+
<%@ page contentType="text/html" pageEncoding="UTF-8" %>
23
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
34
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
45

src/main/webapp/WEB-INF/jsp/login.jsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<%@ page session="false" %>
12
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
23
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
34
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

src/main/webapp/WEB-INF/jsp/meals.jsp

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<%@ page session="false" %>
12
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
23
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
34
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
@@ -11,12 +12,10 @@
1112

1213
<div class="jumbotron">
1314
<div class="container">
14-
<div class="shadow">
15-
<h3><spring:message code="meals.title"/></h3>
15+
<h3><spring:message code="meals.title"/></h3>
1616

17-
<div class="view-box">
18-
<div class="row">
19-
<div class="col-sm-7">
17+
<div class="row">
18+
<div class="col-sm-7">
2019
<div class="panel panel-default">
2120
<div class="panel-body">
2221
<form class="form-horizontal" id="filter">
@@ -61,43 +60,41 @@
6160
</a>
6261
</div>
6362
</div>
64-
</div>
65-
</div>
66-
<a class="btn btn-primary" onclick="add()">
67-
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
68-
<spring:message code="common.add"/>
69-
</a>
70-
<table class="table table-striped display" id="datatable">
71-
<thead>
72-
<tr>
73-
<th><spring:message code="meals.dateTime"/></th>
74-
<th><spring:message code="meals.description"/></th>
75-
<th><spring:message code="meals.calories"/></th>
76-
<th></th>
77-
<th></th>
78-
</tr>
79-
</thead>
80-
<c:forEach items="${meals}" var="meal">
81-
<jsp:useBean id="meal" scope="page" type="ru.javawebinar.topjava.to.MealWithExceed"/>
82-
<tr class="${meal.exceed ? 'exceeded' : 'normal'}">
83-
<td>
84-
<%--<fmt:parseDate value="${meal.dateTime}" pattern="y-M-dd'T'H:m" var="parsedDate"/>--%>
85-
<%--<fmt:formatDate value="${parsedDate}" pattern="yyyy.MM.dd HH:mm" />--%>
86-
${fn:formatDateTime(meal.dateTime)}
87-
</td>
88-
<td>${meal.description}</td>
89-
<td>${meal.calories}</td>
90-
<td><a>
91-
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
92-
</a></td>
93-
<td><a onclick="deleteRow(${meal.id})">
94-
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
95-
</a></td>
96-
</tr>
97-
</c:forEach>
98-
</table>
9963
</div>
10064
</div>
65+
<a class="btn btn-primary" onclick="add()">
66+
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
67+
<spring:message code="common.add"/>
68+
</a>
69+
<table class="table table-striped display" id="datatable">
70+
<thead>
71+
<tr>
72+
<th><spring:message code="meals.dateTime"/></th>
73+
<th><spring:message code="meals.description"/></th>
74+
<th><spring:message code="meals.calories"/></th>
75+
<th></th>
76+
<th></th>
77+
</tr>
78+
</thead>
79+
<c:forEach items="${meals}" var="meal">
80+
<jsp:useBean id="meal" scope="page" type="ru.javawebinar.topjava.to.MealWithExceed"/>
81+
<tr class="${meal.exceed ? 'exceeded' : 'normal'}">
82+
<td>
83+
<%--<fmt:parseDate value="${meal.dateTime}" pattern="y-M-dd'T'H:m" var="parsedDate"/>--%>
84+
<%--<fmt:formatDate value="${parsedDate}" pattern="yyyy.MM.dd HH:mm" />--%>
85+
${fn:formatDateTime(meal.dateTime)}
86+
</td>
87+
<td>${meal.description}</td>
88+
<td>${meal.calories}</td>
89+
<td><a>
90+
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
91+
</a></td>
92+
<td><a onclick="deleteRow(${meal.id})">
93+
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
94+
</a></td>
95+
</tr>
96+
</c:forEach>
97+
</table>
10198
</div>
10299
</div>
103100
<jsp:include page="fragments/footer.jsp"/>

src/main/webapp/WEB-INF/jsp/users.jsp

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<%@ page session="false" %>
12
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
23
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
34
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
@@ -11,30 +12,26 @@
1112

1213
<div class="jumbotron">
1314
<div class="container">
14-
<div class="shadow">
15-
<h3><spring:message code="users.title"/></h3>
16-
<br/>
17-
<div class="view-box">
18-
<a class="btn btn-primary" onclick="add()">
19-
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
20-
<spring:message code="common.add"/>
21-
</a>
15+
<h3><spring:message code="users.title"/></h3>
16+
<br/>
17+
<a class="btn btn-primary" onclick="add()">
18+
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
19+
<spring:message code="common.add"/>
20+
</a>
2221

23-
<table class="table table-striped display" id="datatable">
24-
<thead>
25-
<tr>
26-
<th><spring:message code="users.name"/></th>
27-
<th><spring:message code="users.email"/></th>
28-
<th><spring:message code="users.roles"/></th>
29-
<th><spring:message code="users.active"/></th>
30-
<th><spring:message code="users.registered"/></th>
31-
<th></th>
32-
<th></th>
33-
</tr>
34-
</thead>
35-
</table>
36-
</div>
37-
</div>
22+
<table class="table table-striped display" id="datatable">
23+
<thead>
24+
<tr>
25+
<th><spring:message code="users.name"/></th>
26+
<th><spring:message code="users.email"/></th>
27+
<th><spring:message code="users.roles"/></th>
28+
<th><spring:message code="users.active"/></th>
29+
<th><spring:message code="users.registered"/></th>
30+
<th></th>
31+
<th></th>
32+
</tr>
33+
</thead>
34+
</table>
3835
</div>
3936
</div>
4037
<jsp:include page="fragments/footer.jsp"/>

0 commit comments

Comments
 (0)