Skip to content

Commit

Permalink
3rd part.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-doroshenko committed Mar 14, 2014
1 parent b5b3bff commit 042281b
Show file tree
Hide file tree
Showing 22 changed files with 135 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public DetachedCriteria addSearch (DetachedCriteria criteria, String filters) th
//Key is field
for (String key : checkedRules.keySet()) {
Set<SearchRule> rulesSet = checkedRules.get(key);

if(key.equals("project")) {
criteria.createAlias("issue.project", "project");
}
Expand Down
36 changes: 0 additions & 36 deletions src/main/resources/i18n/main.properties

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/resources/i18n/main_en_EN.properties

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/resources/i18n/main_ru_RU.properties

This file was deleted.

41 changes: 21 additions & 20 deletions src/main/resources/i18n/messages_ru.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
locale=ru
main=\u0413\u043b\u0430\u0432\u043d\u0430\u044f
search=\u041f\u043e\u0438\u0441\u043a
user.message.welcom=Welcom
user.message.info=User Info
user.message.welcom=\u041F\u0440\u0438\u0432\u0435\u0442
user.message.info=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
user.name=\u0418\u043c\u044f:
user.password=\u041f\u0430\u0440\u043e\u043b\u044c:
user.login=\u0412\u043e\u0439\u0442\u0438
user.logout=\u0412\u044b\u0445\u043e\u0434
user.remember=Remember
user.signin=Sign In
user.remember=\u0417\u0430\u043F\u043E\u044C\u043D\u0438\u0442\u044C
user.signin=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F
user.entername=ivan@gmail.com
submitissue=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0433
admin.users=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438
Expand All @@ -30,29 +30,30 @@ page.issue.summary=\u041a\u0440\u0430\u0442\u043a\u043e:
page.issue.description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:
page.issue.attachments=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u0435:
page.issue.comments=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438:
page.issue.unresolved=UNRESOLVED
button.addcomment=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439
button.new=\u041d\u043e\u0432\u044b\u0439
button.edit=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c
button.save=\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c
button.cancel=\u041e\u0442\u043c\u0435\u043d\u0430
button.delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c
button.upload=Upload
user.form.message=All form fields are required.
user.form.id=Id
user.form.firstname=First Name
user.form.lastname=Last Name
button.upload=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C
user.form.message=\u0412\u0441\u0435 \u043F\u043E\u043B\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B
user.form.id=\u0418\u0434
user.form.firstname=\u0418\u044C\u044F
user.form.lastname=\u0424\u0444\u043C\u0438\u043B\u0438\u044F
user.form.email=Email
user.form.password=Password
user.form.passwordconfirm=Password confirmation
user.form.password=\u041F\u0430\u0440\u043E\u043B\u044C
user.form.passwordconfirm=\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043F\u0430\u0440\u043E\u043B\u044F
issue.err.null=\u043F\u0440\u0438\u0432\u0435\u0442
user.err.duplicate=\u043F\u0440\u0438\u0432\u0435\u0442
user.firstName.empty=\u043F\u0440\u0438\u0432\u0435\u0442
user.firstName.too.short=First name must be between 1 and 20 characters long.
user.lastName.empty=Last name can't be empty!
user.lastName.too.short=Last name can't be less than 3
user.email.empty=Email name can't be empty!
user.email.invalid=Email address is invalid.
user.password.empty=Password name can't be empty!
user.password.too.short=Password can't be less than 3
user.register.success=You successfully registered, now - log in
user.register.fail=Registration fail, try again
user.firstName.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.lastName.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.lastName.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.email.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.email.invalid=\u041E\u0448\u0438\u0431\u043A\u0430!
user.password.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.password.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.register.success=\u0423\u0441\u043F\u0435\u0445
user.register.fail=\u041D\u0435\u0443\u0434\u0430\u0447\u0430
20 changes: 20 additions & 0 deletions src/main/resources/i18n/temp_ru.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
user.message.info=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
user.remember=\u0417\u0430\u043F\u043E\u044C\u043D\u0438\u0442\u044C
user.signin=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F
button.upload=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C
user.form.message=\u0412\u0441\u0435 \u043F\u043E\u043B\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B
user.form.id=\u0418\u0434
user.form.firstname=\u0418\u044C\u044F
user.form.lastname=\u0424\u0444\u043C\u0438\u043B\u0438\u044F
user.form.email=Email
user.form.password=\u041F\u0430\u0440\u043E\u043B\u044C
user.form.passwordconfirm=\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043F\u0430\u0440\u043E\u043B\u044F
user.firstName.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.lastName.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.lastName.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.email.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.email.invalid=\u041E\u0448\u0438\u0431\u043A\u0430!
user.password.empty=\u041E\u0448\u0438\u0431\u043A\u0430!
user.password.too.short=\u041E\u0448\u0438\u0431\u043A\u0430!
user.register.success=\u0423\u0441\u043F\u0435\u0445
user.register.fail=\u041D\u0435\u0443\u0434\u0430\u0447\u0430
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/dispatcher-servlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<property name="suffix" value=".jsp" />
</bean>

<context:property-placeholder location="classpath:db/h2-file.properties"/>
<context:property-placeholder location="classpath:db/h2-mem.properties"/>

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
Expand All @@ -38,10 +38,10 @@
<property name="password" value="${jdbc.password}"/>
</bean>

<!-- jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="classpath:db/schema.sql"/>
<jdbc:script location="classpath:db/test-data.sql"/>
</jdbc:initialize-database-->
</jdbc:initialize-database>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- intercept-url pattern="\A/*/edit\?oper=del*" access="hasRole('ADMINISTRATOR')"/-->

<http access-denied-page="/error.jsp" use-expressions="true">
<http access-denied-page="/error" use-expressions="true">
<intercept-url pattern="/index*" access="hasAnyRole('USER,GUEST,ADMINISTRATOR')"/>
<intercept-url pattern="/views/users/**" access="hasRole('ADMINISTRATOR')"/>
<intercept-url pattern="/views/properties/**" access="hasRole('ADMINISTRATOR')"/>
Expand Down
6 changes: 0 additions & 6 deletions src/main/webapp/WEB-INF/views/attachments-block.jsp
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!-- i18n -->
<fmt:requestEncoding value="UTF-8" />
<fmt:setLocale value="${sessionScope[constants.KEY_LOCALE]}"/>
<fmt:setBundle basename="i18n.main" var="lang"/>
<!-- End of i18n -->
<c:forEach var="attch" items="${requestScope[constants.ATTACHMENTS]}">
<div class="attachment">
<c:if test="${user.role.name eq constants.ROLE_ADMIN}">
Expand Down
19 changes: 6 additions & 13 deletions src/main/webapp/WEB-INF/views/buttons-edit.jsp
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!-- i18n -->
<fmt:requestEncoding value="UTF-8" />
<fmt:setLocale value="${sessionScope[constants.KEY_LOCALE]}"/>
<fmt:setBundle basename="i18n.main" var="lang"/>
<!-- End of i18n -->
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<div class="buttons-block">
<div class="buttons-container">
<c:choose>
<c:when test="${(user.role.name eq constants.ROLE_USER) or (user.role.name eq constants.ROLE_ADMIN)}">
<button id="save-button" class="control-button" type="submit" form="edit-issue-form"><fmt:message key="button.save" bundle="${lang}"/></button>
<button id="cancel-button" class="control-button" onclick="window.history.back()"><fmt:message key="button.cancel" bundle="${lang}"/></button>
</c:when>
</c:choose>
<security:authorize access="isAuthenticated()">
<button id="save-button" class="control-button" type="submit" form="edit-issue-form"><spring:message code="button.save"/></button>
<button id="cancel-button" class="control-button" onclick="window.history.back()"><spring:message code="button.cancel"/></button>
</security:authorize>
</div>
</div>
<script type="text/javascript">
Expand Down
27 changes: 10 additions & 17 deletions src/main/webapp/WEB-INF/views/buttons-view.jsp
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!-- i18n -->
<fmt:requestEncoding value="UTF-8" />
<fmt:setLocale value="${sessionScope[constants.KEY_LOCALE]}"/>
<fmt:setBundle basename="i18n.main" var="lang"/>
<!-- End of i18n -->
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<div class="buttons-block">
<div class="buttons-container">
<c:choose>
<c:when test="${(user.role.name eq constants.ROLE_USER) or (user.role.name eq constants.ROLE_ADMIN)}">
<button id="new-button" class="control-button"><fmt:message key="button.new" bundle="${lang}"/></button>
<button id="edit-button" class="control-button"><fmt:message key="button.edit" bundle="${lang}"/></button>
<button id="cancel-button" class="control-button" onclick="window.history.back()"><fmt:message key="button.cancel" bundle="${lang}"/></button>
<c:if test="${user.role.name eq constants.ROLE_ADMIN}">
<button id="delete-button" class="control-button"><fmt:message key="button.delete" bundle="${lang}"/></button>
</c:if>
</c:when>
</c:choose>
<security:authorize access="isAuthenticated()">
<button id="new-button" class="control-button"><spring:message code="button.new"/></button>
<button id="edit-button" class="control-button"><spring:message code="button.edit"/></button>
<button id="cancel-button" class="control-button" onclick="window.history.back()"><spring:message code="button.cancel"/></button>
</security:authorize>
<security:authorize access="hasRole('ADMINISTRATOR')">
<button id="delete-button" class="control-button"><spring:message code="button.delete"/></button>
</security:authorize>
</div>
</div>
<script type="text/javascript">
Expand Down
14 changes: 4 additions & 10 deletions src/main/webapp/WEB-INF/views/comments-block.jsp
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!-- i18n -->
<fmt:requestEncoding value="UTF-8" />
<fmt:setLocale value="${sessionScope[constants.KEY_LOCALE]}"/>
<fmt:setBundle basename="i18n.main" var="lang"/>
<!-- End of i18n -->
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<c:forEach var="comment" items="${requestScope[constants.COMMENTS]}">
<div class="comment-block">
<div class="comment-value">${comment.comment}</div>
<c:if test="${user.role.name eq constants.ROLE_ADMIN}">
<a href="${constants.URL_COMMENT_DEL_COMMAND}${constants.ROOT_PATH}${issue.id}${constants.ROOT_PATH}${comment.id}" class="download-link">-del- </a>
</c:if>
<security:authorize access="hasRole('ADMINISTRATOR')">
<a href="${constants.URL_COMMENT_DEL_COMMAND}${constants.ROOT_PATH}${issue.id}${constants.ROOT_PATH}${comment.id}" class="download-link">-del- </a>
</security:authorize>
<div class="comment-create-date">${comment.createDate}</div>
<div class="comment-create-by">
<c:out value="${comment.createBy.firstName} ${comment.createBy.lastName}"/>
Expand Down
Loading

0 comments on commit 042281b

Please sign in to comment.