forked from bofh/fetsite
document views
This commit is contained in:
7
app/views/documents/_form.html.erb
Normal file
7
app/views/documents/_form.html.erb
Normal 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 %>
|
||||||
|
|
||||||
6
app/views/documents/write.html.erb
Executable file
6
app/views/documents/write.html.erb
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
<h1>Editing Dokument</h1>
|
||||||
|
|
||||||
|
<%= render 'form' %>
|
||||||
|
|
||||||
|
<%= link_to 'Show', @document %> |
|
||||||
|
|
||||||
1
app/views/documents/write_etherpad.html.erb
Normal file
1
app/views/documents/write_etherpad.html.erb
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%= link_to "weiter" , "http://www.fet.at/etherpad/p/"+@document.ep_pad.id , target: :blank %>
|
||||||
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