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,7 @@
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
<%= f.input :text, :as=>:tinymce_text %>
<%= f.action :submit, :as => :input_ %>
<% end %>
<%= tinymce %>

View File

@@ -0,0 +1,6 @@
<h1>Editing Dokument</h1>
<%= render 'form' %>
<%= link_to 'Show', @document %> |

View File

@@ -0,0 +1 @@
<%= link_to "weiter" , "http://www.fet.at/etherpad/p/"+@document.ep_pad.id , target: :blank %>

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' )%>")