meeting views

This commit is contained in:
Andreas Stephanides
2014-12-04 00:00:57 +01:00
parent b259c1080a
commit ab396c002e
20 changed files with 129 additions and 37 deletions

View File

@@ -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>

View File

@@ -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 %>

View 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)%>");

View File

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

View File

@@ -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)%>");

View File

@@ -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>");

View 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 %>