mirror of
				https://github.com/kaminari/kaminari.git
				synced 2022-11-09 13:44:37 -05:00 
			
		
		
		
	bring link_tag generation logic back into the main logic
This commit is contained in:
		
							parent
							
								
									5b76f94b51
								
							
						
					
					
						commit
						a1a3d64a8d
					
				
					 3 changed files with 27 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -12,7 +12,13 @@
 | 
			
		|||
      <% if page.current? -%>
 | 
			
		||||
        <%= current_page_tag %>
 | 
			
		||||
      <% elsif page.left_outer? || page.right_outer? || page.inside_window? -%>
 | 
			
		||||
        <%= page_link_tag %>
 | 
			
		||||
        <% if page.first? -%>
 | 
			
		||||
          <%= first_page_link_tag %>
 | 
			
		||||
        <% elsif page.last? -%>
 | 
			
		||||
          <%= last_page_link_tag %>
 | 
			
		||||
        <% else -%>
 | 
			
		||||
          <%= page_link_tag %>
 | 
			
		||||
        <% end -%>
 | 
			
		||||
      <% elsif !page.was_truncated? -%>
 | 
			
		||||
        <%= truncated_span_tag %>
 | 
			
		||||
      <% end -%>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,12 @@
 | 
			
		|||
      - if page.current?
 | 
			
		||||
        = current_page_tag
 | 
			
		||||
      - elsif page.left_outer? || page.right_outer? || page.inside_window?
 | 
			
		||||
        = page_link_tag
 | 
			
		||||
        - if page.first?
 | 
			
		||||
          = first_page_link_tag
 | 
			
		||||
        - elsif page.last?
 | 
			
		||||
          = last_page_link_tag
 | 
			
		||||
        - else
 | 
			
		||||
          = page_link_tag
 | 
			
		||||
      - elsif !page.was_truncated?
 | 
			
		||||
        = truncated_span_tag
 | 
			
		||||
    = num_pages > current_page ? next_link_tag : next_span_tag
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue