Sha256: e1fe0a5136dbf4fbbc05b73820534da33e16a6d316c6a8509600789fd36fc4e3

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

<%
# TODO get the count from the parent element call
e_pages = ActionController::Pagination::Paginator.new(
		self, elt.children.count, PAGE_ELT_LENGTH, @params['page'])
e = Elt.find_all("parent_id = '#{elt.id}'",
		'created_on DESC', e_pages.current.to_sql)
%>

<%= link_to_remote('< Previous',
		:update => 'eltSubs_'+elt.id.to_s,
		:url => { :action => 'list', :id => elt, :page => e_pages.current.next },
		:loading => visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
		:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) if e_pages.current.next %>

<span style="display:<%= e_pages.length > 1 ? '' : 'none'%>" class="pageCount">
	(<%= e_pages.length-e_pages.current.to_i+1 %>/<%= e_pages.length %>)
</span>

<%= link_to_remote('Next >',
		:update => 'eltSubs_'+elt.id.to_s,
		:url => { :action => 'list', :id => elt, :page => e_pages.current.previous },
		:loading => visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
		:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) if e_pages.current.previous %>

<%= render :partial => '/elt/elt',
	:collection => e.reverse,
	:locals => { :eltTop => false } %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parlement-0.2 app/views/elt/_list.rhtml