socialforge/app/views/sub_document_comments/index.html.erb

21 lines
1.0 KiB
Plaintext

<% if @organization.switch_type %>
<% unless @documents.nil? %>
<%= render :partial => 'sub_document_comments/show_sub_document_newstyle', :locals => {:documents => @documents} %>
<% end %>
<% else %>
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
<% end %>
<%= render :partial => 'new' %>
<% unless @documents.nil? %>
<% @documents.each do |document| %>
<script>
$(function() {
sd_create_editor_from_data(<%= OrgActivity.where("org_act_type='SubDocumentComment'and org_act_id=?", document.id).first.id %>, null, "100%", "OrgActivity");
});
</script>
<%= render :partial => 'sub_document_comments/show_sub_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='SubDocumentComment'and org_act_id=?", document.id).first, :flag => 0} %>
<% end %>
<% end %>
<% end %>