forked from bofh/fetsite
meeting views
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<div class="contentbox" id="document_<%= document.id%>">
|
||||
<% image_tag("/iconnavy/time.png") %>
|
||||
<%= fa_icon("file-text 2x") %>
|
||||
|
||||
<%= document.name %>
|
||||
<%= fa_icon("file-text") %>
|
||||
<%= link_to document.name, document %>
|
||||
<%= link_to "edit", edit_document_path(document),:remote=>true if can? :edit, document %>
|
||||
<%= link_to 'Delete', document, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, document %>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<%= semantic_form_for @document, :remote=>true, :html=>{:class=>""} do |f| %>
|
||||
|
||||
<%= f.input :name %>
|
||||
<%= f.input :parent_id, :as=>:hidden %>
|
||||
<%= f.input :parent_type, :as=>:hidden %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
|
||||
1
app/views/documents/create.js.erb
Normal file
1
app/views/documents/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent)%>\"></div><%=escape_javascript( render :partial=>"document", :object=>@document)%>");
|
||||
6
app/views/documents/edit.html.erb
Executable file
6
app/views/documents/edit.html.erb
Executable file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Dokument</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @document %> |
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
$("#document_<%= @document.id %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@document)%>");
|
||||
$("#<%= @document.divid %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@document)%>");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
$("#document_new").replaceWith("<div id=\"document_new\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@document) %></div>");
|
||||
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent) %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@document) %></div>");
|
||||
|
||||
|
||||
8
app/views/documents/show.html.erb
Normal file
8
app/views/documents/show.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<h2><%= @document.name %></h2>
|
||||
<%= raw(@document.text) %>
|
||||
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
|
||||
<%= f.input :text, :as=>:tinymce_text %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
Reference in New Issue
Block a user