document views

This commit is contained in:
Andreas Stephanides
2015-01-03 10:08:00 +01:00
parent d72f78488d
commit 0cca373f33
5 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<% if can?(:edit,@thema)|| ! @thema.documents.empty? %>
<b>Dokumente</b>
<%= link_to "Neues Dokument", new_document_path(:parent_id=>@thema.id, :parent_type=>"Thema"), :remote=>true %>
<div id="<%= Document.new_divid_for(@thema) %>"></div>
<% unless @documents.empty? %>
<% @documents.each do |d| %>
<%= render d %>
<% end%>
<% end%>
<% end%>

View File

@@ -0,0 +1 @@
$("#themaview").html("<%=escape_javascript( render :partial=>'themen/documents' )%>")