Sha256: 05997777093f2f868e164d97767374bb68d46bcfbfe4862623ce0d4fee536609

Contents?: true

Size: 920 Bytes

Versions: 9

Compression:

Stored size: 920 Bytes

Contents

<%%= manage_form_for @<%= singular_name %> do |f| %> 
  
  <% unless translated_columns.empty? -%>  
  <%%= render(:partial=>"manage/shared/locale") %>
  
  <%% Sunrise.available_locales.each do |locale|%>
    <%%= content_tag :div, :id=>"s#{locale}_block", :class=>"add-white-bl", :style=>(I18n.locale.to_s == locale.to_s ? nil : 'display:none;') do %>
      <div class="bot-bg">
      	<div class="inputs-bl">
      	  <% translated_columns.each do |attribute| -%>
      	    <%%= f.input :<%= attribute%>, :locale => locale %>
      	  <% end -%>
        </div>
      </div>
    <%% end -%>
  <%% end -%>
  <% end -%>

  <div class="edit-cont">
    <div class="inputs-bl">
      <% model.attributes.each do |attribute, value| -%>
        <% next if translated_columns.include?(attribute.to_sym) %>
        <%%= f.input :<%= attribute%> %>
      <% end -%>
    </div>
  </div>
  
  <%%= f.button :submit %>
<%% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sunrise-scaffold-0.2.2 lib/generators/sunrise/scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.2.1 lib/generators/sunrise/scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.2.0 lib/generators/sunrise/scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.5 lib/generators/sunrise/scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.4 lib/generators/sunrise/scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.3 lib/generators/sunrise_scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.2 lib/generators/sunrise_scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.1 lib/generators/sunrise_scaffold/templates/single/views/form.html.erb
sunrise-scaffold-0.1.0 lib/generators/sunrise_scaffold/templates/single/views/form.html.erb