Add grid_index_nav() template def, for page header
				
					
				
			This commit is contained in:
		
							parent
							
								
									abb42e9f25
								
							
						
					
					
						commit
						4ec8fdcf82
					
				
					 1 changed files with 16 additions and 0 deletions
				
			
		
							
								
								
									
										16
									
								
								tailbone/templates/newgrids/nav.mako
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								tailbone/templates/newgrids/nav.mako
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					## -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					<%def name="grid_index_nav()">
 | 
				
			||||||
 | 
					  <div class="grid-nav">
 | 
				
			||||||
 | 
					    % if grid_index > 1:
 | 
				
			||||||
 | 
					        ${h.link_to(u"« Previous", '{}?index={}'.format(url('{}.view_index'.format(route_prefix)), grid_index - 1), class_='button')}
 | 
				
			||||||
 | 
					    % else:
 | 
				
			||||||
 | 
					        ${h.link_to(u"« Previous", '#', class_='button', disabled='disabled')}
 | 
				
			||||||
 | 
					    % endif
 | 
				
			||||||
 | 
					    <span class="viewing">viewing #${'{:,}'.format(grid_index)} of ${'{:,}'.format(grid_count)} results</span>
 | 
				
			||||||
 | 
					    % if grid_index < grid_count:
 | 
				
			||||||
 | 
					        ${h.link_to(u"Next »", '{}?index={}'.format(url('{}.view_index'.format(route_prefix)), grid_index + 1), class_='button')}
 | 
				
			||||||
 | 
					    % else:
 | 
				
			||||||
 | 
					        ${h.link_to(u"Next »", '#', class_='button', disabled='disabled')}
 | 
				
			||||||
 | 
					    % endif
 | 
				
			||||||
 | 
					  </div><!-- grid-nav -->
 | 
				
			||||||
 | 
					</%def>
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue