Sha256: 86439a895fab65d55479255ac411d805b2dacc27d83602e4150dd34661149b99

Contents?: true

Size: 1.91 KB

Versions: 2

Compression:

Stored size: 1.91 KB

Contents

<%% secondary_navigation({:value => t(:list), :active => true},
                        ({:value => link_to(t(:add), new_<%= singular_table_name %>_path)}<%= " if can?(:create, @#{singular_table_name})" if authorization? %>)
) %>

<%% title t('attributes.<%= singular_table_name %>.op_index') %>

<%% remote = <%= options.remote? %> %>
<%%= form_for :<%= singular_table_name %>, :remote => remote, :html => { :method => :get, :id => "form_search" } do |f| %>
<div class="filter-container">
  <%- attributes.each do |attribute| -%>
  <div class="filter-field">
    <b><%%= f.label :<%= attribute.name %>, t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %></b><br />
    <%- case attribute.type -%>
    <%-	when :boolean -%>
        <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "1", {:checked => (@<%= singular_table_name %>.<%= attribute.name %>)}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_1", t(:yes) %><br />
        <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "0", {:checked => (!@<%= singular_table_name %>.<%= attribute.name %>)}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_0", t(:no) %><br />
        <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "") %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_", t(:all) %>
    <%-	when :text -%>
        <%%= f.text_field :<%= attribute.name %> %>
    <%-	when :date -%>
        <%%= f.text_field :<%= attribute.name %><%=", :class => \"calendar\"" if jquery_ui?%> %>
    <%-	else -%>
        <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
    <%- end -%>

  </div>
  <%- end -%>
  <div style="clear:both;">
      <%%= f.submit t(:search), {:class=>'button medium'} %>
      <%%= f.submit 'Csv', {:class=>'button medium csv'} %>
  </div>
</div>
<%% end %>

<div id="list">
    <%%= render 'list', :remote => remote %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
leonardo-1.5.0 lib/generators/erb/leosca/templates/index.html.erb
leonardo-1.4.0 lib/generators/erb/leosca/templates/index.html.erb