Sha256: f15e73a540fcee503c4b2093a691bcc9b0d0af5027fb06375e992daddbaa1822

Contents?: true

Size: 1.55 KB

Versions: 3

Compression:

Stored size: 1.55 KB

Contents

<%
# Variables:
# * kind => :proposals or :sessions. REQUIRED.
# * container => ActiveRecord instance that owns the Proposal records to show, e.g., a User. REQUIRED.
# * records => Array of Proposal instances to display. Optional, defaults to #proposals method on +container+.
# * title => Title of the container, e.g., "user". Optional, leave blank to guess based on container's class.
# * header_tag => HTML tag used to wrap the header, defaults to :h3
# * header_prefix => Prefix to add to the title, e.g., "Favorite"
# * show_sorter => Display the sort toolbar? Optional, defaults to false.
# * is_archived => Archive the content and hide it behind a link? Optional, defaults to false.

kind          = local_assigns[:kind]
container     = local_assigns[:container] || container.proposals
records       = local_assigns[:records]
title         = local_assigns[:title]
header_tag    ||= :h3
header_prefix = local_assigns[:header_prefix]
show_sorter   = local_assigns[:show_sorter]
%>

<% unless records.blank? %>
  <div class="proposals_sub_list_for_kind proposals_sub_list_for_kind_<%= kind %>">
    <div class="proposals_sub_list_for_kind_toggle" style="display: none">
      <%= link_to "Display #{kind}...", "#" %>
    </div>
    <div class="proposals_sub_list_for_kind_content">
      <%= content_tag header_tag, "#{header_prefix} #{kind} for this #{title || container.class.name.singularize}".strip.humanize %>
      <%= render :partial => "open_conference_ware/proposals/list", :locals => {:kind => kind, :records => records, :sorter => show_sorter} %>
    </div>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre3 app/views/open_conference_ware/proposals/_sub_list_for_kind.html.erb
open_conference_ware-1.0.0.pre2 app/views/open_conference_ware/proposals/_sub_list_for_kind.html.erb
open_conference_ware-1.0.0.pre1 app/views/open_conference_ware/proposals/_sub_list_for_kind.html.erb