Orbit bar
Structure: page, link, edit and new, page view, edit page parts Temporary disable authentication in items controller
This commit is contained in:
1 parent
e4c33b443f
commit
a9d25dcdec
62 files changed
+6129
-7208
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand"><i class="<%= node.root? ? 'icons-house' : 'icons-list-2' %>"></i></span>
|
||||
<% if node.class.to_s.eql?('Page') %>
|
||||
<% unless node.root? %>
|
||||
<% name, icon_name = get_item_module_infos(node) %>
|
||||
<span title="<%= name %>" class="item-type page tip"><i class="<%= icon_name %>"></i></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span title="<%= t(:link) %>" class="item-type link tip"><i class="icon-link"></i></span>
|
||||
<% end %>
|
||||
<div class="item-title">
|
||||
<%= link_to node.title, "/"+node.path %>
|
||||
<div class="item-menu">
|
||||
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "view-page open-slide tip", title: t(:view) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-edit"), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), class: "open-slide tip", title: t(:edit) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-newspaper"), new_admin_page_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_page) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-link"), new_admin_link_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_link) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-trash"), nil, rel: eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "delete tip", title: t(:delete_) unless node.root? %>
|
||||
</div>
|
||||
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %>
|
||||
</div>
|
||||
<div class="item-info pull-right">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<% if node.menu_enabled_for.include?(valid_locale) %>
|
||||
<span class="label label-warning"><%= I18nVariable.from_locale(valid_locale) %></span>
|
||||
|
|
||||
<% end %>
|
||||
<% end %>
|
||||
<span class="badge <%= 'badge-inverse' if node.root? %>"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<% unless node.root? %>
|
||||
<li id='<%= node.id %>' class="<%= 'disabled' unless node.is_published %> <%= 'no-nest' if node.class.to_s.eql?('Link') %>" >
|
||||
<% end %>
|
||||
|
||||
<%= render 'node', node: node %>
|
||||
|
||||
<% unless node.children.blank? %>
|
||||
<% unless node.root? %>
|
||||
<ol>
|
||||
<% end %>
|
||||
<% node.children.each do |child| %>
|
||||
<%= render 'node_and_children', node: child %>
|
||||
<% end %>
|
||||
<% unless node.root? %>
|
||||
</ol>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless node.root? %>
|
||||
</li>
|
||||
<% end %>
|
||||
@@ -0,0 +1,10 @@
|
||||
<nav id="sidebar">
|
||||
<h2 class="position"><a href="#"><i class="icons-flow-tree"></i></a></h2>
|
||||
<div id="sidebar-menu">
|
||||
<div class="scroller">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-nav-block-list">
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</nav>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ol class="nav nav-list">
|
||||
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
||||
</ol>
|
||||
<script type="text/javascript">
|
||||
bindTreeDragHandle();
|
||||
</script>
|
||||
@@ -1,5 +1,35 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
<% node = Item.root %>
|
||||
|
||||
<%= render "admin/#{@item.class.to_s.downcase.pluralize}/show" %>
|
||||
<%= render 'site_bar' %>
|
||||
|
||||
<section id="main-wrap">
|
||||
<div class="wrap-inner initial">
|
||||
<ol id='<%= node.id %>' class="sortable">
|
||||
<%= render 'node_and_children', node: node %>
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="dialog" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Delete item</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="text-warning text-center">This action can not be restored, are you sure you want to delete?</span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<%= link_to t(:delete_), nil, class: "delete-item btn btn-danger", method: :delete, remote: true %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="view-page" class="nano" style="display:none">
|
||||
<div class="page-info clearfix">
|
||||
<a class="pull-right" href="javascript:$.pageslide.close()"><i class="icons-arrow-left-2"></i></a>
|
||||
<h3 class="page-name">Communications and liaison</h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
<%= javascript_include_tag "lib/jquery.pageslide.js" %>
|
||||
@@ -0,0 +1,3 @@
|
||||
$("#dialog").modal('hide');
|
||||
$("#main-wrap ol.sortable").html("<%= j render 'admin/items/node_and_children', node: Item.root %>");
|
||||
reloadStructure();
|
||||
@@ -1,12 +1,10 @@
|
||||
<h1><%= t('editing.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= form_for @item, :url => admin_link_path(@item), :html => { :class => 'form' } do |f| %>
|
||||
|
||||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:update_) %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= form_for @item, url: admin_link_path(@item), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.link') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,59 +1,40 @@
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= 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.label :name, t(:name) %>
|
||||
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
|
||||
|
||||
<%= f.label :url, t(:url) %>
|
||||
<%= f.text_field :url, :class => 'input-xlarge', placeholder: t(:url) %>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</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>
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
|
||||
<p>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
<%= t(:yes_) %>
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
<%= t(:no_) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag 'link[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 'link[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 :url, "#{t(:url)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :url, :class => 'text input-xlarge', :value => (@item.url rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'link[menu_enabled_for][]', '' %>
|
||||
</p>
|
||||
@@ -1,13 +1,10 @@
|
||||
<h1><%= t('new.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= form_for @item, :url => admin_links_path, :html => { :class => 'form' } do |f| %>
|
||||
|
||||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:create_) %> <%= link_back %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
<%= form_for @item, url: admin_links_path, remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('new.link') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/edit')) %>");
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'new' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/new')) %>");
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -1,2 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
||||
@@ -2,7 +2,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.select_widget_style") %>
|
||||
</label>
|
||||
<div class="controls well">
|
||||
<div class="controls">
|
||||
<% if @selected[:module_app].nil? || @selected[:module_app].widgets.nil? || (@selected[:module_app].widgets[@selected[:app_frontend_url]].blank? rescue true) || @selected[:module_app].widgets[@selected[:app_frontend_url]]["style"].nil? %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<%else%>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.fields_") %>
|
||||
</label>
|
||||
<div id="widget_field" class="well clear controls">
|
||||
<div id="widget_field" class="clear controls">
|
||||
|
||||
|
||||
<div class="rows clear">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.select_widget_style") %>
|
||||
</label>
|
||||
<div class="controls well">
|
||||
<div class="controls">
|
||||
<ul class="clear">
|
||||
<% if @selected[:module_app].get_default_widget["enabled_styles"].include?("typeA") %>
|
||||
<li>
|
||||
|
||||
@@ -19,6 +19,3 @@
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
|
||||
@@ -6,17 +6,17 @@
|
||||
<% end %>
|
||||
|
||||
|
||||
<label class="control-label"><%= t "default_widget.data_source.category" %></label>
|
||||
<div class="well controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:category) %>
|
||||
<%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%>
|
||||
<%= check_box_tag("#{field_name}[category][]", category.id, category_checked_value(object,category.id),:class=>'select_option' )%>
|
||||
<%= category.title%>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<% else %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<% end %>
|
||||
</div>
|
||||
<label class="control-label"><%= t "default_widget.data_source.category" %></label>
|
||||
<div class="controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:category) %>
|
||||
<%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%>
|
||||
<%= check_box_tag("#{field_name}[category][]", category.id, category_checked_value(object,category.id),:class=>'select_option' )%>
|
||||
<%= category.title%>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<% else %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
<label class="control-label"><%= t "default_widget.data_source.tag" %></label>
|
||||
<div class="well controls">
|
||||
<div class="controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:tag) %>
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<label for="<%= field_name %>" class="control-label">
|
||||
<%= t("default_widget.widget_data_count") %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= select_tag(field_name,options_for_select(@page_frontend_data_counts||[],field_value )) %>
|
||||
</div>
|
||||
<label for="<%= field_name %>">
|
||||
<%= t("default_widget.widget_data_count") %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= select_tag(field_name, options_for_select(@page_frontend_data_counts||[],field_value), class: "input-xlarge") %>
|
||||
</div>
|
||||
@@ -1,11 +1,10 @@
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('editing.page') %></h1>
|
||||
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:update_), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for @item, url: admin_page_path(@item), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.page') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,116 +1,90 @@
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
<%= f.hidden_field :id, :value => (@item.id),:id=>"object_id" %>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, '*'+t(:name), :class => 'control-label' %>
|
||||
|
||||
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<span class="help-inline"><%= I18n.t("front_page.name_field_helper") %></span>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.hidden_field :id, :value => (@item.id), :id => "object_id" %>
|
||||
|
||||
<%= f.label :name, '*' + t(:name) %>
|
||||
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
|
||||
<span class="help-block"><%= I18n.t("front_page.name_field_helper") %></span>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:template_name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => (@selected[:design].id rescue nil) }, {:rel => reload_themes_admin_pages_path} %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
<%= f.label :design, t(:template_name) %>
|
||||
<%= f.collection_select :design, @designs, :id, :title, {selected: (@selected[:design].id rescue nil) }, {rel: reload_themes_admin_pages_path, class: "input-xlarge"} %>
|
||||
|
||||
<%= f.label :theme, t(:theme) %>
|
||||
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {include_blank: true, selected: (@selected[:theme].id rescue nil) }, { class: "input-xlarge" } %>
|
||||
|
||||
<div id="module_app_list">
|
||||
<label for="select_module_app">
|
||||
<%= t("default_widget.select_module_app") %>
|
||||
</label>
|
||||
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, selected: (@selected[:module_app].id rescue nil)), {include_blank: true }, {rel: reload_after_module_changed_admin_pages_path, id: "page_module_app_id", class: "input-xlarge"} %>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:theme), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {:include_blank => true, :selected=>(@selected[:theme].id rescue nil) } %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
|
||||
<div id="frontend_list">
|
||||
<label for="select_app_url">
|
||||
<%= t("default_widget.select_app_url") %>
|
||||
</label>
|
||||
<div id="app_page_url">
|
||||
<%= select('page','app_frontend_url', @app_frontend_urls || [], {selected: @selected[:app_frontend_url], rel: reload_after_list_changed_admin_pages_path}, class: "input-xlarge") rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="module_app_list">
|
||||
<%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected =>(@selected[:module_app].id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="frontend_list">
|
||||
<%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
|
||||
<div class="controls" id="app_page_url">
|
||||
<%= select('page','app_frontend_url', @app_frontend_urls || [], {:selected => @selected[:app_frontend_url],:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="app_page_category" class="control-group">
|
||||
<div id="app_page_category">
|
||||
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %>
|
||||
</div>
|
||||
|
||||
<div id="app_page_tag" class="control-group">
|
||||
<div id="app_page_tag">
|
||||
<%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%>
|
||||
</div>
|
||||
|
||||
<div id="frontend_setting">
|
||||
<%= render :partial => 'frontend_setting', :locals=>{:object=>@item,:f=>f} %>
|
||||
<% if show_default_widget_setting_panel %>
|
||||
<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>@item,:f=>f} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id='data_count'>
|
||||
<div id='data_count'>
|
||||
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@selected[:page_frontend_data_count]} %>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</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('front_page.menu_enable_lang')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
|
||||
<p>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
<%= t(:yes_) %>
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
<%= t(:no_) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= 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>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= 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>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
|
||||
</p>
|
||||
@@ -1,3 +0,0 @@
|
||||
<% if show_default_widget_setting_panel %>
|
||||
<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>object,:f=>f} %>
|
||||
<% end %>
|
||||
@@ -1,11 +1,10 @@
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('new.page') %></h1>
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:create_), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for @item, url: admin_pages_path, remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('new.page') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,7 +1,7 @@
|
||||
<%#= flash_messages %>
|
||||
|
||||
|
||||
<%= page_stylesheets(@item, true).html_safe %>
|
||||
<%= page_javascripts(@item, true).html_safe %>
|
||||
<%#= page_stylesheets(@item, true).html_safe %>
|
||||
<%#= page_javascripts(@item, true).html_safe %>
|
||||
|
||||
<%= parse_page_edit_noko(@item).html_safe %>
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
||||
@@ -1,6 +1 @@
|
||||
<%= stylesheet_link_tag "admin/default_widget_setting" %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
<%= render 'edit' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render 'edit') %>");
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'new' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/new')) %>");
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
||||
Reference in new issue
Block a user