Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
8b146047
Commit
8b146047
authored
Feb 27, 2015
by
Matija Obreza
Browse files
local:paginate tag
parent
0b108dfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/jsp/descr/index.jsp
View file @
8b146047
...
...
@@ -13,15 +13,7 @@
<div
class=
"main-col-header clearfix"
>
<div
class=
"nav-header pull-left"
>
<div
class=
"results"
><spring:message
code=
"paged.totalElements"
arguments=
"
${
pagedData
.
totalElements
}
"
/></div>
<form
method=
"get"
action=
""
>
<div
class=
"pagination"
>
<spring:message
code=
"paged.pageOfPages"
arguments=
"
${
pagedData
.
number
+
1
}
,${pagedData.totalPages}"
/>
<a
href=
"
<spring:url
value=
""
><spring:param
name=
"page"
value=
"
${
pagedData
.
number
eq
0
?
1
:
pagedData
.
number
}
"
/></spring:url>
"
><spring:message
code=
"pagination.previous-page"
/></a>
<input
class=
"form-control"
style=
"display: inline; max-width: 5em; text-align: center"
type=
"text"
name=
"page"
placeholder=
"${pagedData.number + 1}"
/>
<a
href=
"
<spring:url
value=
""
><spring:param
name=
"page"
value=
"
${
pagedData
.
number
+
2
}
"
/></spring:url>
"
><spring:message
code=
"pagination.next-page"
/></a>
</div>
</form>
<local:paginate
page=
"
${
pagedData
}
"
/>
</div>
</div>
...
...
src/main/webapp/WEB-INF/jsp/user/index.jsp
View file @
8b146047
...
...
@@ -13,11 +13,7 @@
<div
class=
"main-col-header clearfix"
>
<div
class=
"nav-header pull-left"
>
<div
class=
"results"
><spring:message
code=
"paged.totalElements"
arguments=
"
${
pagedData
.
totalElements
}
"
/></div>
<div
class=
"pagination"
>
<spring:message
code=
"paged.pageOfPages"
arguments=
"
${
pagedData
.
number
+
1
}
,${pagedData.totalPages}"
/>
<a
class=
"${pagedData.number eq 0 ? 'disabled' :''}"
href=
"?page=${pagedData.number eq 0 ? 1 : pagedData.number}"
><spring:message
code=
"pagination.previous-page"
/></a>
<a
href=
"?page=${pagedData.number + 2}"
><spring:message
code=
"pagination.next-page"
/></a>
</div>
<local:paginate
page=
"
${
pagedData
}
"
/>
</div>
</div>
...
...
src/main/webapp/WEB-INF/jsp/wiews/index.jsp
View file @
8b146047
...
...
@@ -12,20 +12,17 @@
</h1>
<div
class=
"main-col-header clearfix"
>
<div
class=
"nav-header
pull-left
"
>
<div
class=
"results"
><spring:message
code=
"paged.totalElements"
arguments=
"
${
pagedData
.
totalElements
}
"
/
>
<c:if
test=
"
${
activeOnly
eq
true
}
"
>
<div
class=
"nav-header"
>
<div>
<c:if
test=
"
${
activeOnly
eq
true
}
"
>
<a
href=
"
<c:url
value=
"/wiews/active/map"
/>
"
><spring:message
code=
"maps.view-map"
/></a>
<a
href=
"
<c:url
value=
"/wiews/"
/>
"
><spring:message
code=
"faoInstitutes.viewAll"
/></a>
</c:if>
<c:if
test=
"
${
activeOnly
ne
true
}
"
>
<a
href=
"
<c:url
value=
"/wiews/active"
/>
"
><spring:message
code=
"faoInstitutes.viewActiveOnly"
/></a>
</c:if>
</div>
<div
class=
"pagination"
>
<spring:message
code=
"paged.pageOfPages"
arguments=
"
${
pagedData
.
number
+
1
}
,${pagedData.totalPages}"
/>
<a
class=
"${pagedData.number eq 0 ? 'disabled' :''}"
href=
"?page=${pagedData.number eq 0 ? 1 : pagedData.number}"
><spring:message
code=
"pagination.previous-page"
/></a>
<a
href=
"?page=${pagedData.number + 2}"
><spring:message
code=
"pagination.next-page"
/></a>
</c:if>
<c:if
test=
"
${
activeOnly
ne
true
}
"
>
<a
href=
"
<c:url
value=
"/wiews/active"
/>
"
><spring:message
code=
"faoInstitutes.viewActiveOnly"
/></a>
</c:if>
</div>
<local:paginate
page=
"
${
pagedData
}
"
/>
</div>
</div>
...
...
src/main/webapp/WEB-INF/tags/paginate.tag
0 → 100644
View file @
8b146047
<%@ tag description="Display pagination block" pageEncoding="UTF-8" %>
<%@ tag body-content="tagdependent" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ attribute name="page" required="true" type="org.springframework.data.domain.Page" %>
<%@ attribute name="action" required="false" type="java.lang.String" %>
<%
%>
<form method="get" action="">
<div class="results"><spring:message code="paged.totalElements" arguments="${page.totalElements}" /></div>
<jsp:doBody/>
<div class="paginate">
<span class="">
<spring:message code="paged.pageOfPages" arguments="${page.number+1},${page.totalPages}" />
</span>
<c:if test="${page.number eq 0}">
<a><spring:message code="pagination.previous-page" /></a>
</c:if>
<c:if test="${page.number gt 0}">
<a href="<spring:url value=""><spring:param name="page" value="${page.number eq 0 ? 1 : page.number}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
</c:if>
<input class="form-control" style="display: inline; max-width: 5em; text-align: center" type="text" name="page" placeholder="${page.number + 1}" />
<c:if test="${page.number ge page.totalPages-1}">
<a><spring:message code="pagination.next-page" /></a>
</c:if>
<c:if test="${page.number lt page.totalPages-1}">
<a href="<spring:url value=""><spring:param name="page" value="${page.number+2}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</c:if>
</div>
</form>
\ No newline at end of file
src/main/webapp/html/css/custom.css
View file @
8b146047
...
...
@@ -1136,7 +1136,7 @@ html[dir="rtl"] #stats .stat-lists ol li img {
color
:
#6f6e69
;
}
.main-col
.pagination
{
.main-col
.pagination
,
.paginate
{
font-size
:
18px
;
font-weight
:
bold
;
margin
:
10px
0
5px
;
...
...
@@ -1149,8 +1149,8 @@ html[dir="rtl"] #stats .stat-lists ol li img {
padding
:
10px
0
;
}
.main-col
.pagination
a
{
padding
:
0
1
0px
;
.main-col
.pagination
a
,
.main-col
.paginate
a
{
padding
:
0
0px
;
text-transform
:
uppercase
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment