Ray's changes for page_edit
This commit is contained in:
parent
ef49df448d
commit
ef2d416c70
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -11,6 +11,7 @@
|
||||||
}
|
}
|
||||||
.nav-list ol li {
|
.nav-list ol li {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
.nav-list ol li a {
|
.nav-list ol li a {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|
|
@ -110,10 +110,8 @@
|
||||||
padding:6px;
|
padding:6px;
|
||||||
}
|
}
|
||||||
#orbit-bar .nav > li.search {
|
#orbit-bar .nav > li.search {
|
||||||
background-image: none;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
margin-bottom: 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
#orbit-bar .nav > li > a.orbit-bar-home {
|
#orbit-bar .nav > li > a.orbit-bar-home {
|
||||||
|
@ -686,6 +684,32 @@
|
||||||
z-index: 2 !important;
|
z-index: 2 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#back_main .editable {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#back_main .editable:after {
|
||||||
|
content: '';
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
visibility: hidden;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#back_main .edit_link a {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
text-indent: -9999px;
|
||||||
|
background: url(<%= asset_path 'editicon.png' %>) no-repeat center center rgba(255,255,255,.8);
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[class^="icons-"] {
|
[class^="icons-"] {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<%= flash_messages %>
|
<%= flash_messages %>
|
||||||
|
<div id="poststuff">
|
||||||
<h1><%= t('admin.editing_page') %></h1>
|
<h1><%= t('admin.editing_page') %></h1>
|
||||||
|
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||||
<%= form_for @item, :url => admin_page_path(@item) do |f| %>
|
<%= render :partial => "form", :locals => { :f => f } %>
|
||||||
<%= render :partial => "form", :locals => { :f => f } %>
|
<div class="form-actions">
|
||||||
<p>
|
<%= f.submit t('update'), :class => 'btn btn-primary' %>
|
||||||
<%= f.submit t('update') %> <%= link_back %>
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
</p>
|
</div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,52 +1,92 @@
|
||||||
<%= f.error_messages %>
|
<%= f.error_messages %>
|
||||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||||
|
|
||||||
<p>
|
<div class="control-group">
|
||||||
<%= f.label :name, t('admin.name') %>
|
<%= f.label :name, t('admin.name'), :class => 'control-label' %>
|
||||||
<%= f.text_field :name, :class => 'text' %>
|
<div class="controls">
|
||||||
</p>
|
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||||
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
||||||
<% @site_valid_locales.each do |locale| %>
|
<% @site_valid_locales.each do |locale| %>
|
||||||
<p>
|
<div class="control-group">
|
||||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||||
<%= f.text_field locale %>
|
<div class="controls">
|
||||||
</p>
|
<%= f.text_field locale, :class => 'text input-xlarge' %>
|
||||||
<% end %>
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<p>
|
<div class="control-group">
|
||||||
<%= t('admin.design_name') %>
|
<%= f.label :name, t('admin.design_name'), :class => 'control-label' %>
|
||||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
<div class="controls">
|
||||||
</p>
|
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
||||||
<p>
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
<%= t('admin.theme') %>
|
</div>
|
||||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
</div>
|
||||||
</p>
|
<div class="control-group">
|
||||||
<p>
|
<%= f.label :name, t('admin.theme'), :class => 'control-label' %>
|
||||||
<%= t('admin.module_app') %>
|
<div class="controls">
|
||||||
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||||
<span id="app_page_url"><%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> </span>
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
<span id="app_page_category"><%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> </span>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="control-group">
|
||||||
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
|
<%= f.label :name, t('admin.module_app'), :class => 'control-label' %>
|
||||||
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
<div class="controls">
|
||||||
</p>
|
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
||||||
<p>
|
<span id="app_page_url">
|
||||||
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:" %>
|
<%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%>
|
||||||
<% @site_valid_locales.each do |valid_locale| %>
|
</span>
|
||||||
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
<span id="app_page_category">
|
||||||
<%= I18nVariable.from_locale(valid_locale) %>
|
<%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%>
|
||||||
<% end %>
|
</span>
|
||||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
</div>
|
||||||
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:" %>
|
<div class="control-group">
|
||||||
<% @site_valid_locales.each do |valid_locale| %>
|
<%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %>
|
||||||
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
<div class="controls">
|
||||||
<%= I18nVariable.from_locale(valid_locale) %>
|
<label class="radio">
|
||||||
<% end %>
|
<%= f.radio_button :is_published, true %>
|
||||||
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
Yes
|
||||||
</p>
|
</label>
|
||||||
|
<label class="radio">
|
||||||
|
<%= f.radio_button :is_published, false %>
|
||||||
|
No
|
||||||
|
</label>
|
||||||
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %>
|
||||||
|
<div class="controls">
|
||||||
|
<% @site_valid_locales.each do |valid_locale| %>
|
||||||
|
<label class="checkbox">
|
||||||
|
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||||
|
<%= I18nVariable.from_locale(valid_locale) %>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
|
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||||
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %>
|
||||||
|
<div class="controls">
|
||||||
|
<% @site_valid_locales.each do |valid_locale| %>
|
||||||
|
<label class="checkbox">
|
||||||
|
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
||||||
|
<%= I18nVariable.from_locale(valid_locale) %>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
|
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
||||||
|
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ module ParserBackEnd
|
||||||
ret << "'></div>"
|
ret << "'></div>"
|
||||||
else
|
else
|
||||||
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
||||||
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable' style='border:solid 1px; margin:5px; padding:5px;'>" if part
|
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable'>" if part
|
||||||
ret << "<div class='edit_link' style='display:none'>"
|
ret << "<div class='edit_link' style='display:none'>"
|
||||||
ret << " <a href='#{edit_admin_page_part_path(part.id)}' class='nav'>#{t(:edit)}</a>" if part
|
ret << " <a href='#{edit_admin_page_part_path(part.id)}' class='nav'>#{t(:edit)}</a>" if part
|
||||||
ret << '</div>'
|
ret << '</div>'
|
||||||
|
|
Loading…
Reference in New Issue