Modify edit page. Still need to handle "form" with drop down lists

This commit is contained in:
chris2tof committed 2011-08-24 02:34:24 +08:00
1 parent 1d214bedec
commit 27d47215e9
10 files changed
+42 -8

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
<%= flash_messages %>
<h1><%= t('admin.editing_page') %></h1>
<%= form_for @item, :url => admin_page_path(@item) do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
<p>
<%= f.submit t('update') %> <%= link_back %>
</p>
<% end %>
+4 -4
View File
@@ -16,13 +16,13 @@
<p>
<%= t('admin.design_name') %>
<%= f.select :design_id, @designs.collect { |d| [d.title, d.id] }, :selected => @default_design.id %>
<%#= f.select :design_id, @designs.collect { |d| [d.title, d.id] }, :selected => @default_design.id %>
<%= f.select :design_id, @designs.collect { |d| [d.title, d.id] } %>
</p>
<p>
<%= @item.design.inspect %>
<%= t('admin.theme') %>
<%= f.select :theme_id, @default_design.themes.collect { |t| [t.name, t.id] }, :selected => @default_design.themes.detect {|t| t.file_filename.to_s == 'default.css' }.id %>
<%#= f.collection_select :design, @designs, :id, :title %>
<%#= f.select :theme_id, @default_design.themes.collect { |t| [t.name, t.id] }, :selected => @default_design.themes.detect {|t| t.file_filename.to_s == 'default.css' }.id %>
<%= f.select :theme_id, @design.themes.collect { |t| [t.name, t.id] }%>
</p>
<p>
+5
View File
@@ -0,0 +1,5 @@
<% content_for :sidebar do %>
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'edit' %>
+1
View File
@@ -0,0 +1 @@
$('#panel_main').html("<%= escape_javascript(render 'edit') %>");
+2
View File
@@ -0,0 +1,2 @@
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");