Sha256: 303a5577c329e71ed3d8357ab7c06703f66fcb4d3cda1c9d8978c598027e3afe

Contents?: true

Size: 1.97 KB

Versions: 4

Compression:

Stored size: 1.97 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" %>
    
    <%%= cookie_content_tag(:div, :id=>"block_filter", :class=>"filt") do %>
      <%%= form_for @search, :as => :search, :url=>manage_<%= plural_name %>_path, :html=>{:method=>:get, :id=>"form_filter"} do |f| %>
        <% model.attributes.each do |attribute, value| -%>
          <%%= f.label :<%= attribute %>, t('<%= singular_name %>.<%= attribute %>', :scope => [:activerecord, :attributes]) %>
          <%%= f.text_field :<%= attribute %>, :class=>"text" %>
        <% end -%>
          
        <div class="buts">
          <%%= f.submit t('manage.model_filter.search'), :style=>"display:none;" %>
          <%%= link_to_function content_tag(:span, t('manage.model_filter.search')), "$('#form_filter').submit()", :class=>"gr" %>                
          <%%= 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"><%%= link_to_function t("<%= plural_name %>.#{@search.order_column}_#{@search.order_type}", :scope => [:manage, :sort_columns], :default => :"#{@search.order_column}_#{@search.order_type}"), "SelectList.toggle(event)", :class=>"corn", :id=>'sort_select' %></div>
    <div id='sort_select_list' class="select-list" style='display:none;'>
      <% model.attributes.each do |attribute, value| %>
      <%%= link_to_sort(t('<%= plural_name %>.<%= attribute %>_desc', :scope => [:manage, :sort_columns], :default => :<%= attribute %>_desc), :name => <%= attribute.inspect %>, :order_type => 'desc') %>
      <%%= link_to_sort(t('<%= plural_name %>.<%= attribute %>_asc', :scope => [:manage, :sort_columns], :default => :<%= attribute %>_asc), :name => <%= attribute.inspect %>, :order_type => 'asc') %>
      <% end %>
    </div>
  </div>
  
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
freeberry-0.3.0 lib/generators/freeberry/manage_scaffold/templates/single/views/model_filter.html.erb
freeberry-0.2.9 lib/generators/freeberry/manage_scaffold/templates/single/views/model_filter.html.erb
freeberry-0.2.7 lib/generators/freeberry/manage_scaffold/templates/single/views/model_filter.html.erb
freeberry-0.2.6 lib/generators/freeberry/manage_scaffold/templates/single/views/model_filter.html.erb