This commit is contained in:
Nicolas Bally 2017-08-31 17:30:59 +02:00
parent eb1a9dd0e1
commit 70e24b2161
5 changed files with 71 additions and 50 deletions

View File

@ -3,5 +3,5 @@ class HtmlContent < ActiveRecord::Base
has_one :portlet, :as => :content, :dependent => :destroy
STYLES = []#[["Style 1",1], ["Style 2",2]]
CONTENT_TYPES = ["haml","html"]
CONTENT_TYPES = ["html"]
end

View File

@ -2,6 +2,7 @@
= form.input :enabled, :label => "Publié ?"
= form.input :visible, :label => "Visible ?"
= form.input :sidebar, :label => "Sidebar ?"

View File

@ -33,6 +33,7 @@
#main.row
-if (@menu_item and @menu_item.sidebar) or !@menu_item
.col-md-8
=yield
@ -105,6 +106,10 @@
$("#testimony_slideshow").children(".testimony:first").show().addClass("active")
-else
.col-md-12
=yield
#bottom

View File

@ -5,8 +5,9 @@
=f.text_area :content, :style => "width:98%;height:400px;", :class => "inputText", :id => "ace_editor_textarea"
%pre#ace_editor_pre{:style => "margin:0px;"}
=raw "<!---"
%pre#ace_editor_pre{:style => "margin:0px;"}
<script>
var editor;
@ -29,6 +30,7 @@
</script>
%button{:onclick => "$(this).closest('.html_content_form').toggleClass('large');editor.resize() ;return false;"} zoom
=raw "---->"
%table.form_table
@ -39,7 +41,6 @@
.action
%button{:onclick => "$(this).closest('.html_content_form').toggleClass('large');editor.resize() ;return false;"} zoom

View File

@ -1,5 +1,19 @@
-begin
-if admin
.html_content_label
Contenu HTML
:scss
.html_content_label{
padding:15px;
background:#f5f5f5;
text-align:center;
border:1px solid #d7d7d7;
color:#616161;
margin:10px 0;
}
-else
=render :inline => input.content, :type => input.content_type
-rescue Exception=>e
=raw "<br /><br /><br /><br />"