Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#set($dotTheme = $contents.getEmptyMap())
#set($blah1 = $dotTheme.put("path", "/application/includes/"))
#dotParse("${dotTheme.path}header.vtl")
<h2>Staff</h2>
<ul class="staff">
#if($request.getParameter("page"))
#set($currentPage = $math.toInteger($request.getParameter("page")))
#else
#set($currentPage = 1)
#end
#set($staff-list = $dotcontent.pullPerPage("+structureName:Faculty +(conhost:$host.identifier conhost:SYSTEM_HOST)", $currentPage,3,"modDate desc"))
#foreach($staff in $staff-list)
<li class="staff-item"><a href="/staff/$staff.urlTitle">
#if($staff.image.name.length() > 0)
## resizes the image to 100px width and auto height
<img class="staff-image" src="$staff.image.getResizeUri(100, auto)" alt="$staff.firstName $staff.lastName">
#end
$staff.firstName $staff.lastName</a>
<span class="phone">$staff.phone</span>
<span class="email"><a href="mailto:${staff.email}">$staff.email</a></span>
</li>
#end
</ul>
#if($staff-list.totalPages > 1)
#set($nextPage = $currentPage + 1)
#set($prevPage = $currentPage - 1)
#set($twoBack = $currentPage - 2)
#set($twoForward = $currentPage + 2)
<ul class="paginate">
#if($currentPage > 2)<li><a href="?page=1">First</a></li>#end
#if($staff-list.previousPage == "true")<li><a href="?page=${prevPage}">Prev</a></li>#end
#if($twoBack > 1)<li><a href="?page=${twoBack}">$twoBack</a></li> #end
#if($staff-list.previousPage == "true")<li><a href="?page=${prevPage}">$prevPage</a></li>#end
<li>$currentPage - current</li>
#if($staff-list.nextPage == "true")<li><a href="?page=${nextPage}">$nextPage</a></li>#end
#if($twoForward < $staff-list.totalPages)<li><a href="?page=${twoForward}">$twoForward</a></li> #end
#if($staff-list.nextPage =="true")<li><a href="?page=${nextPage}">Next</a></li>#end
#if($currentPage < $staff-list.totalPages)<li><a href="?page=${staff-list.totalPages}">Last</a></li>#end
<li>$currentPage of $staff-list.totalPages total pages</li>
</ul>
#end
#dotParse("${dotTheme.path}footer.vtl")