Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #276 from hizel/tracker-title

tracker:вывод расчета title из jsp в controller
  • Loading branch information...
commit e1774e04b25ffb4b8b6182241b9b88c3a0afd208 2 parents c57bacd + 5a2fa05
@maxcom authored
View
3  src/main/java/ru/org/linux/spring/TrackerController.java
@@ -144,6 +144,9 @@ public ModelAndView tracker(
if (!tmpl.isSessionAuthorized()) {
throw new UserErrorException("Not authorized");
}
+ params.put("title", "Последние сообщения (мои темы)");
+ } else {
+ params.put("title", "Последние сообщения");
}
params.put("msgs", trackerDao.getTrackAll(trackerFilter, user, dateLimit, topics, offset, messages));
View
12 src/main/webapp/WEB-INF/jsp/tracker.jsp
@@ -30,20 +30,12 @@
<%@ taglib prefix="ftm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
-<%
- String title = "Последние сообщения";
- if ((Boolean) request.getAttribute("mine")) {
- title += " (мои темы)";
- }
-%>
-
-<title><%= title %>
-</title>
+<title>${title}</title>
<jsp:include page="/WEB-INF/jsp/header.jsp"/>
<div class=nav>
<div id="navPath">
- <%= title %>
+ ${title}
</div>
<div class="nav-buttons">
Please sign in to comment.
Something went wrong with that request. Please try again.