Sha256: 047ad37aab8ed04fd124497966c58d7f1233a55fd395a725ad3bc7d20ab52c39

Contents?: true

Size: 1.79 KB

Versions: 3

Compression:

Stored size: 1.79 KB

Contents

<div class="bot-bg">
  <div class="filt-bl">
    <%%= link_to_function t('manage.model_filter.title'), "Manage.toggle_element('block_filter')", :class=>"dark-arr" %>
    
    <%%= t('manage.model_filter.total_count') %>: <%%= @<%= plural_name %>.total_count %>
    
    <%%= cookie_content_tag(:div, :id=>"block_filter", :class=>"filt") do %>
      <%%= form_for search_filter, :url => manage_<%= plural_name %>_path, :html => { :method => :get } do |f| %>
        <%% controller.scopes_configuration.each do |key, value| %>
          <%%= f.label value[:as], t(value[:as], :scope => "activerecord.attributes.<%= singular_name %>") %>
          <%%= f.text_field value[:as], :class => "text", :name => value[:as] %>
        <%% end %>
          
        <div class="buts">
          <%%= content_tag(:button, :value=>"search", :type=>"submit", :name=>"commit", :class=>"gr cupid-green") do %>
            <%%= t('manage.model_filter.search') %>
          <%% end %>
          
          <%%= link_to t('manage.model_filter.clear'), manage_<%= plural_name %>_path, :class=>"erase" %>
        </div>
      <%% end %>
    <%% end %>
  </div>
  <div class="sort">
  	<label><%%= t('manage.sort') %></label>
    <div class="select-input"><%%= link_to_function t(search_filter.current_order, :scope => "manage.<%= plural_name %>.sort"), "SelectList.toggle(event)", :class=>"corn", :id=>'sort_select' %></div>
    <div id='sort_select_list' class="select-list" style='display:none;'>
      <%% controller.orders_configuration.each do |key, value| %>
        <%%= link_to_sort(t("#{key}_desc", :scope => "manage.<%= plural_name %>.sort"), :name => key, :order_type=>'desc') %>
        <%%= link_to_sort(t("#{key}_asc", :scope => "manage.<%= plural_name %>.sort"), :name => key, :order_type=>'asc') %>
      <%% end %>
    </div>
  </div>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sunrise-scaffold-0.2.2 lib/generators/sunrise/scaffold/templates/single/views/model_filter.html.erb
sunrise-scaffold-0.2.1 lib/generators/sunrise/scaffold/templates/single/views/model_filter.html.erb
sunrise-scaffold-0.2.0 lib/generators/sunrise/scaffold/templates/single/views/model_filter.html.erb