← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2312: Reverted r2311

 

------------------------------------------------------------
revno: 2312
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-12-08 15:55:57 +0100
message:
  Reverted r2311
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm	2010-12-08 07:43:46 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm	2010-12-08 14:55:57 +0000
@@ -7,63 +7,65 @@
 	
 	<input type="hidden" id="baseLink" value="$!baseLink"/>
 	<input type="hidden" id="currentPage" value="$!currentPage"/>
-	<table style="background-color: #ebf0f6;" width='100%'>
-		<tr>
-			<td>
-				<span>$i18n.getString("no_of_pages"):</span> $numberOfPages
-			</td>
-			<td>
-				<span>$i18n.getString("size_of_page"):</span>
-				<input type="text" id="sizeOfPage" value="$!pageSize" style="width:50px" onchange="changePageSize('$baseLink');">
-			</td>
-			<td>
-				<span>$i18n.getString("jump_to_page"):</span>					
-				<input type="text" id="jumpToPage" value="$!currentPage" style="width:50px" onchange="jumpToPage('$baseLink');">
-			</td>
-			<td>
-				<input type="button" id="submitButton" value="$i18n.getString('go')" onclick="jumpToPage('$baseLink');">
-			</td>				
-		</tr>		
-		<tr>
-			<td colspan="4"><hr/></td>
-		</tr>		
-		<tr>
-		<td colspan="4">
-		<div class="paging">
-		#if ($currentPage > 1)
-			#set ( $prev = $currentPage - 1 )
-			<a href="${baseLink}currentPage=1&pageSize=${pageSize}" class="first" title="First">&laquo;&laquo;</a>
-			<a href="${baseLink}currentPage=${prev}&pageSize=${pageSize}" class="prev" title="Previous">&laquo;</a>
-		#else
-			<span class="first" title="First">&laquo;&laquo;</span>
-			<span class="prev" title="Previous">&laquo;</span>
-		#end
-		
-		#foreach( $i in [0..4]   )
-			#set( $p = $startPage + $i )
-			#if ( $p <= $numberOfPages )
-				#if( $i > 0 )
-					<span class="seperator">|</span>
-				#end
-				#if( $p != $currentPage )
-					<a href="${baseLink}currentPage=${p}&pageSize=${pageSize}" class="page" title="Page $p">$p</a>
-				#else
-					<span class="page" title="Page $p">$p</span>
-				#end
-			#end
-		#end
-		
-		#if ( $currentPage < $numberOfPages )
-			#set ( $next = $currentPage + 1 )
-			<a href="${baseLink}currentPage=${next}&pageSize=${pageSize}" class="next" title="Next">&raquo;</a>
-			<a href="${baseLink}currentPage=${numberOfPages}&pageSize=${pageSize}" class="last" title="Last">&raquo;&raquo;</a>
-		#else
-			<span class="next" title="Next">&raquo; </span>
-			<span class="last" title="Last">&raquo;&raquo;</span>
-		#end
-		</div>
-		
-		</td>
-		</tr>
-	</table>
+	#if ( $numberOfPages > 1 )
+		<table style="background-color: #ebf0f6;" width='100%'>
+			<tr>
+				<td>
+					<span>$i18n.getString("no_of_pages"):</span> $numberOfPages
+				</td>
+				<td>
+					<span>$i18n.getString("size_of_page"):</span>
+					<input type="text" id="sizeOfPage" value="$!pageSize" style="width:50px" onchange="changePageSize('$baseLink');">
+				</td>
+				<td>
+					<span>$i18n.getString("jump_to_page"):</span>					
+					<input type="text" id="jumpToPage" value="$!currentPage" style="width:50px" onchange="jumpToPage('$baseLink');">
+				</td>
+				<td>
+					<input type="button" id="submitButton" value="$i18n.getString('go')" onclick="jumpToPage('$baseLink');">
+				</td>				
+			</tr>		
+			<tr>
+				<td colspan="4"><hr/></td>
+			</tr>		
+			<tr>
+			<td colspan="4">
+			<div class="paging">
+			#if ($currentPage > 1)
+				#set ( $prev = $currentPage - 1 )
+				<a href="${baseLink}currentPage=1&pageSize=${pageSize}" class="first" title="First">&laquo;&laquo;</a>
+				<a href="${baseLink}currentPage=${prev}&pageSize=${pageSize}" class="prev" title="Previous">&laquo;</a>
+			#else
+				<span class="first" title="First">&laquo;&laquo;</span>
+				<span class="prev" title="Previous">&laquo;</span>
+			#end
+			
+			#foreach( $i in [0..4]   )
+				#set( $p = $startPage + $i )
+				#if ( $p <= $numberOfPages )
+					#if( $i > 0 )
+						<span class="seperator">|</span>
+					#end
+					#if( $p != $currentPage )
+						<a href="${baseLink}currentPage=${p}&pageSize=${pageSize}" class="page" title="Page $p">$p</a>
+					#else
+						<span class="page" title="Page $p">$p</span>
+					#end
+				#end
+			#end
+			
+			#if ( $currentPage < $numberOfPages )
+				#set ( $next = $currentPage + 1 )
+				<a href="${baseLink}currentPage=${next}&pageSize=${pageSize}" class="next" title="Next">&raquo;</a>
+				<a href="${baseLink}currentPage=${numberOfPages}&pageSize=${pageSize}" class="last" title="Last">&raquo;&raquo;</a>
+			#else
+				<span class="next" title="Next">&raquo; </span>
+				<span class="last" title="Last">&raquo;&raquo;</span>
+			#end
+			</div>
+			
+			</td>
+			</tr>
+		</table>
+	#end
 </div>
\ No newline at end of file