<% #Partial parameters default values post #Mandatory %> <%= content_for :javascript do %> $(".newAttach").livequery('click',function () { $(".newAttach1").show(); var new_id = new Date().getTime(); $(this).before( attachment.replace(/NEW_RECORD/g, new_id) ); $("#post_attachments_attributes_"+new_id+"__tags").fcbkcomplete({ cache: true, filter_case: false, filter_hide: true, firstselected: true, filter_selected: true, maxshownitems: 4, newel: true, complete_opts: true }); }); <% end %>
<%# div title %> <% if post.event.present?%>

<%= t('comment.edit') %>

<% elsif post.parent_id.nil?%>

<%=link_to image_tag("arrow_right_up.png", :size=>"16x16",:title=>"Show Advanced Editor"), edit_space_post_path(@space, post), :id => "big_edit_thread", :class => "extract_form" %><%= t('thread.edit') %>

<%else%>

<%=link_to image_tag("arrow_right_up.png", :size=>"16x16",:title=>"Show Advanced Editor"), edit_space_post_path(@space, post), :id => "big_edit_thread", :class => "extract_form" %><%= t('comment.edit') %>

<%end%> <%# Form %> <%= form_for(prepare_for_form(post),:html => { :multipart => true, :id => "edit-form"}) do |f| -%>
<%=hidden_field_tag 'format', 'html'%> <%# Title %> <%if post.parent_id.nil? && post.event.nil?%>
<%= f.text_field :title, :size => 25, :class => "small_post_title" %> <%end%> <%# Text %>
<%= small_post_text_area(post.text) %>
<%# Attachments%> <%= content_for :javascript do %> <%= raw("var attachment='#{ generate_template(f, :attachments, :partial => 'posts/attachment') }'") %> <% end %>
<%=t('delete.select')%>
<%= f.fields_for(:attachments) do |at_form| %> <% unless at_form.object.new_record? %>
<%= at_form.check_box '_delete' %>
<%=image_tag(logo_image_path(at_form.object, :size => at_form.object.thumbnail_size)) %> <%=at_form.object.filename%>
<% end %> <%end %>
<%=t('attachment.new') %>
<%# Footer %> <%unless post.event.present?%>
<%= link_to t('thread.or_add_new'), space_posts_path(@space) %>
<%end%> <%end%>