diff --git a/app/views/admin/designs/_tab_form.html.erb b/app/views/admin/designs/_tab_form.html.erb index e46428aba..e13f8fee8 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 9b0ef7fad..8a5b8187d 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 %>

+
+ + Theme + + + +
+ +
+
+ <%= 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