Sha256: c3f87226a9c0e8c5f8f149e696e1cc6b1c987aea17b5df402ec0f0330f29f0e8

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

- content_for :page_header do
  %p= link_to t('back'), [:edit, :admin, @<%=resource_name%>.<%= parent_name %>], :class => "bright_link"
  %h1
    - if @<%=resource_name%>.new_record?
      = "#{t 'add'} #{<%= @model_name.demodulize %>.model_name.human}"
    - else
      = "#{t 'edit'} #{<%= @model_name.demodulize %>.model_name.human}"

= form_for [:admin, @<%=resource_name%>.<%= parent_name %>, @<%=resource_name%>] do |f|
  - if @<%=resource_name%>.errors.any?
    #error_explanation
      %h2= "#{t 'save_errors'}: #{@<%=resource_name%>.errors.count}"
      %ul
        - @<%=resource_name%>.errors.full_messages.each do |msg|
          %li= msg
  %table
    %tr
      %th{colspan: 2}
        - if @<%=resource_name%>.image && @<%=resource_name%>.image_url
          = image_tag @<%=resource_name%>.image_url
          %br
          Выберите другое изображение
          %br
    %tr
      %th= f.label :image
      %td= f.file_field :image
    %tr
      %th= f.label :visible
      %td= f.check_box :visible 
  
  .actions
    = f.submit t('save')

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ideyabox-0.1.12 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.11 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.10 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.9 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.8 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.7 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.6 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.5 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.4 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml
ideyabox-0.1.3 lib/generators/ideyabox/images_scaffold/templates/views/edit.html.haml