Sha256: 916d24ca7455ab49d7caed159bf3a025443643422a4fa026674a63138a1c7a4b

Contents?: true

Size: 987 Bytes

Versions: 26

Compression:

Stored size: 987 Bytes

Contents

<div class="page-header">
  <h1>New <%= human_name.titleize %></h1>
</div>

<%%= form_tag(<%= plural_name %>_url, method: 'post', class: 'form-horizontal') do %>
<% attributes.each do |attribute| -%>
  <div class="form-group">
    <%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %>
    <div class="col-md-6">
<% if attribute.field_type == :date_select || attribute.field_type == :time_select || attribute.field_type == :datetime_select -%>
      <%%= text_field_tag :<%= attribute.name %>, nil, class: 'form-control' %>
<% elsif attribute.field_type == :check_box -%>
      <%%= check_box_tag :<%= attribute.name %> %>
<% else -%>
      <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, nil, class: 'form-control' %>
<% end -%>
    </div>
  </div>

<% end -%>
  <div class="form-group">
    <div class="col-md-offset-2 col-md-6">
      <%%= submit_tag "Create <%= human_name.titleize %>", class: 'btn btn-primary' %>
    </div>
  </div>
<%% end %>

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ez-1.3.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.2.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.1.3 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.1.2 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.1.1 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.1.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-1.0.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.9 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.7 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.6 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.5 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.1 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.9.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.8.7 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.8.6 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.7.0 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.6.5 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.6.4 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.6.3 lib/generators/ez/resource/templates/bootstrapped/new.html.erb
ez-0.6.2 lib/generators/ez/resource/templates/bootstrapped/new.html.erb