From 32c1defba09a87e6d1f62a8b472dc9a63545ca46 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Fri, 18 Oct 2013 19:09:04 +0800 Subject: [PATCH] Updated Site Preferences Templates --- app/views/admin/designs/_tab_form.html.erb | 2 +- app/views/admin/designs/edit.html.erb | 140 +++++++++++++-------- 2 files changed, 90 insertions(+), 52 deletions(-) diff --git a/app/views/admin/designs/_tab_form.html.erb b/app/views/admin/designs/_tab_form.html.erb index e46428ab..e13f8fee 100644 --- a/app/views/admin/designs/_tab_form.html.erb +++ b/app/views/admin/designs/_tab_form.html.erb @@ -1,6 +1,6 @@ <%= form_for :file, :url => update_file_admin_design_path(:type => type, :object_id => object.id), :remote => true, :method => :post do |f| %>
- <%= f.text_area :content, :class => 'middle', :value => object.file.read.force_encoding('UTF-8') %> + <%= f.text_area :content, :class => 'code middle', :value => object.file.read.force_encoding('UTF-8'), :name=>"html_code"%>
diff --git a/app/views/admin/designs/edit.html.erb b/app/views/admin/designs/edit.html.erb index 9b0ef7fa..8a5b8187 100644 --- a/app/views/admin/designs/edit.html.erb +++ b/app/views/admin/designs/edit.html.erb @@ -4,60 +4,98 @@ <%= stylesheet_link_tag "lib/wrap-nav"%> - <%= stylesheet_link_tag "lib/main-list"%> - <%= stylesheet_link_tag "lib/mt-list"%> <%= stylesheet_link_tag "lib/filter"%> + <%= stylesheet_link_tag "lib/code_editor"%> + <%= stylesheet_link_tag "lib/codemirror/codemirror"%> <%= stylesheet_link_tag "lib/codemirror/theme/theme"%> - <%= javascript_include_tag 'codemirror/codemirror' %> - <%= javascript_include_tag 'codemirror/jquery.codemirror' %> - <%= javascript_include_tag 'codemirror/mode/css' %> - <%= javascript_include_tag 'codemirror/mode/xml' %> - <%= javascript_include_tag 'codemirror/mode/vbscript' %> - <%= javascript_include_tag 'codemirror/mode/javascript' %> - <%= javascript_include_tag 'codemirror/mode/htmlmixed' %> - <%= javascript_include_tag 'codemirror/addon/edit/closetag' %> - <%= javascript_include_tag 'codemirror/addon/edit/closebrackets' %> - <%= javascript_include_tag 'codemirror/util/formatting' %> - <%= javascript_include_tag 'lib/templates_code' %> + <%= javascript_include_tag "codemirror/codemirror" %> + <%= javascript_include_tag "codemirror/jquery.codemirror" %> + <%= javascript_include_tag "codemirror/mode/css" %> + <%= javascript_include_tag "codemirror/mode/xml" %> + <%= javascript_include_tag "codemirror/mode/vbscript" %> + <%= javascript_include_tag "codemirror/mode/javascript" %> + <%= javascript_include_tag "codemirror/mode/htmlmixed" %> + <%= javascript_include_tag "codemirror/addon/edit/closetag" %> + <%= javascript_include_tag "codemirror/addon/edit/closebrackets" %> + <%= javascript_include_tag "codemirror/util/formatting" %> + <%= javascript_include_tag "lib/templates_code" %> -

<%= @design.title %>

+ +

<%= @design.title %>

+ + +
+
+ <%= render :partial => 'tab_form', :locals => {:type => :layout, :object => @design.layout} %> +
+ <% @design.themes.each do |theme| %> +
+ <%= render :partial => 'tab_form', :locals => {:type => :themes, :object => theme} %> +
+ <% end %> +
+ <%= render :partial => 'tab_form', :locals => {:type => :css_default, :object => @design.css_default} %> +
+
+ <%= render :partial => 'tab_form', :locals => {:type => :css_reset, :object => @design.css_reset} %> +
- - -
-
<%= render :partial => 'form' %>
-
<%= render :partial => 'tab_form', :locals => {:type => :layout, :object => @design.layout} %>
-
<%= render :partial => 'tab_form', :locals => {:type => :css_default, :object => @design.css_default} %>
-
<%= render :partial => 'tab_form', :locals => {:type => :css_reset, :object => @design.css_reset} %>
- <% @design.themes.each do |theme| %> -
<%= render :partial => 'tab_form', :locals => {:type => :themes, :object => theme} %>
- <% end %> - <% @design.javascripts.each do |js| %> -
<%= render :partial => 'tab_form', :locals => {:type => :javascripts, :object => js} %>
- <% end %> -
<%= render :partial => 'images' %>
-
+ <% @design.javascripts.each do |js| %> +
+ <%= render :partial => 'tab_form', :locals => {:type => :javascripts, :object => js} %> +
+ <% end %> +
\ No newline at end of file