forked from bofh/fetsite
inline tinymce document
This commit is contained in:
@@ -146,4 +146,4 @@ background:44F;
|
||||
}
|
||||
|
||||
@import 'galleries';
|
||||
|
||||
@import 'tinymce';
|
||||
|
||||
@@ -203,4 +203,6 @@ float:left;}
|
||||
form.inline input {
|
||||
}
|
||||
form.inline {
|
||||
float:clear; }
|
||||
float:clear; }
|
||||
|
||||
@import 'tinymce';
|
||||
@@ -16,4 +16,7 @@ i.fa-red { color:red; }
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.article {
|
||||
border: thin dotted black;
|
||||
}
|
||||
@import 'flatfeticon1'
|
||||
@@ -20,7 +20,7 @@ class DocumentsController < ApplicationController
|
||||
@document = Document.find(params[:id])
|
||||
@parent=@document.parent
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.js
|
||||
format.html
|
||||
end
|
||||
end
|
||||
@@ -28,7 +28,7 @@ class DocumentsController < ApplicationController
|
||||
@document = Document.find(params[:id])
|
||||
@document.sanitize
|
||||
@parent=@document.parent
|
||||
render :write
|
||||
render :edit
|
||||
end
|
||||
def show
|
||||
@document = Document.find(params[:id])
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
|
||||
<%= f.input :text, :as=>:tinymce_text %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
|
||||
|
||||
17
app/views/documents/edit.html.erb
Executable file
17
app/views/documents/edit.html.erb
Executable file
@@ -0,0 +1,17 @@
|
||||
<div style="background:white; border: thin #ccc solid; padding: 15px;-webkit-box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5); -moz-box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5); box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5);">
|
||||
<div id="toolBar"></div>
|
||||
<h1 class="editable_simple" data-target="#document_name"><%= @document.name %></h1>
|
||||
<div class="editable" data-target="#document_text">
|
||||
<%= raw(@document.text) %>
|
||||
</div>
|
||||
</div>
|
||||
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
|
||||
<%= f.input :name , :as=>:hidden %>
|
||||
<%= f.input :text, :as=>:hidden %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
<% end %>
|
||||
<%= tinymce :inline_div %>
|
||||
<%= tinymce :inline_simple %>
|
||||
|
||||
<%= link_to 'Show', @lva %> |
|
||||
<%= link_to 'Back', lvas_path %>
|
||||
@@ -12,10 +12,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="background:white; border: thin #ccc solid; padding: 15px;-webkit-box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5); -moz-box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5); box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5);">
|
||||
<h2><%= @document.name %></h2>
|
||||
<div id="">
|
||||
<%= raw(@document.text) %>
|
||||
</div>
|
||||
<h1><%= @document.name %></h1>
|
||||
<div>
|
||||
<%= raw(@document.text) %>
|
||||
</div>
|
||||
</div>
|
||||
<% if can?(:edit, @document) %>
|
||||
<ul class='breadcrumb hidden-print'>
|
||||
|
||||
Reference in New Issue
Block a user