Sha256: 257f197882b83737710ac9bc4fa02edc4ba688d55203a14d02f0ac5a81148c17
Contents?: true
Size: 1.35 KB
Versions: 15
Compression:
Stored size: 1.35 KB
Contents
- post ||= @post - omit_label ||= !post.first? - form_for post, :html => {:multipart => true, :id => "post_form_#{post.id}", :class => 'friendly'} do |f| - if post.page = f.hidden_field :page_id - elsif post.first? - f.fields_for :topic do |tf| %p = tf.label :name, t('label.topic.name'), :class => 'required' %br = tf.text_field :name, :class => 'titular' - if admin? %br %span.quiet = tf.check_box :sticky = tf.label :sticky, t('label.topic.sticky'), :class => 'minor' = tf.check_box :locked = tf.label :locked, t('label.topic.locked'), :class => 'minor' %p = tf.label :forum_id, t('label.topic.forum'), :class => "required" %br = tf.select :forum_id, Forum.all.collect {|forum| [ forum.name, forum.id ] }, :class=> 'standard' - elsif post.topic = f.hidden_field :topic_id %p - unless omit_label = f.label :body, t('label.post.body'), :class => 'required' %br = f.text_area :body, :rows => 12, :class => Radiant::Config['forum.toolbar?'] ? 'toolbarred' : '' = render :partial => 'posts/uploader', :locals => {:post => post, :f => f} %p.buttons = f.submit t('save_post') - unless post.new_record? = t('or') = link_to t("cancel"), paginated_post_url(post), :class => 'cancel'
Version data entries
15 entries across 15 versions & 1 rubygems