forked from bofh/fetsite
document views
This commit is contained in:
16
app/views/themen/_documents.html.erb
Normal file
16
app/views/themen/_documents.html.erb
Normal 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%>
|
||||
|
||||
1
app/views/themen/documents.js.erb
Normal file
1
app/views/themen/documents.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#themaview").html("<%=escape_javascript( render :partial=>'themen/documents' )%>")
|
||||
Reference in New Issue
Block a user