.body.inset_box.no_shadow - if f.object.new_record? = f.hidden_field :parent_id, :value => params[:parent_id] || f.object.parent_id .globalFieldContainer.collapsableSection.global_fields = render 'edit.field', :name => 'name', :f => f, :view_prefix => 'edit.field' .field{ 'data-name' => 'template' } .label_wrap = f.label :content_type, 'Veids:', :title => f.object.content_type .value %span= (f.object.content_type || params[:content_type]) - if f.object.new_record? = hidden_field(:resource, :content_type, {:value => params[:content_type]}) .clear = render 'edit.slug', :name => 'slug', :f => f .field{ 'data-name' => 'position' } .label_wrap= f.label :position, t('position') + ':' .value :ruby opt_for_select = [[t('first'), 1]] @order_nodes.each do |node| # FIXME fix i18n usage opt_for_select.push [ t('after') + ' ' + node.name, node.lower_item ? node.lower_item.position : node.position ] end = f.select :position, options_for_select(opt_for_select, @position) .clear = render 'edit.field', :name => 'visible', :f => f, :view_prefix => 'edit.field' = render 'edit.field', :name => 'protected', :f => f, :view_prefix => 'edit.field' .clear %button.no_styling.toggleSection.collapse{:title => "Saīsināt sadaļu", :type => "button"} = image_tag("releaf/icons/130.png", :alt => "Saīsināt sadaļu") %button.no_styling.toggleSection.expand{:title => "Parādīt pilnu sadaļu", :type => "button"} = image_tag("releaf/icons/129.png", :alt => "Parādīt pilnu sadaļu") .clear.persistent = render 'edit.content_fields', :f => f