Orbit bar
Structure: page, link, edit and new, page view, edit page parts Temporary disable authentication in items controller
This commit is contained in:
parent
e4c33b443f
commit
a9d25dcdec
|
@ -1,11 +1,11 @@
|
|||
class Admin::ItemsController < OrbitBackendController
|
||||
|
||||
layout "site_editor"
|
||||
layout "structure"
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_parent_item
|
||||
before_filter :is_admin?
|
||||
before_filter :set_current_item
|
||||
# before_filter :authenticate_user!
|
||||
# before_filter :find_parent_item
|
||||
# before_filter :is_admin?
|
||||
# before_filter :set_current_item
|
||||
|
||||
def index
|
||||
if params[:item_id]
|
||||
|
@ -15,6 +15,14 @@ class Admin::ItemsController < OrbitBackendController
|
|||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@item = Item.find(params[:id])
|
||||
@item.destroy
|
||||
respond_to do |format|
|
||||
format.js { render 'admin/items/reload_items' }
|
||||
end
|
||||
end
|
||||
|
||||
def update_position
|
||||
item = Item.find(params[:id])
|
||||
item.shift_to(params[:parent_id], params[:position])
|
||||
|
|
|
@ -7,10 +7,12 @@ class Admin::LinksController < Admin::ItemsController
|
|||
def new
|
||||
@item = Link.new
|
||||
@item.parent = Page.find(params[:parent_id]) rescue nil
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def edit
|
||||
@item = Link.find(params[:id])
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -19,10 +21,7 @@ class Admin::LinksController < Admin::ItemsController
|
|||
if @item.save
|
||||
flash.now[:notice] = t('create.success.link')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_link_url(@item)
|
||||
}
|
||||
format.js {}
|
||||
format.js { render 'admin/items/reload_items' }
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('create.error.link')
|
||||
|
@ -36,35 +35,12 @@ class Admin::LinksController < Admin::ItemsController
|
|||
if @item.update_attributes(params[:link])
|
||||
flash.now[:notice] = t('update.success.link')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_link_url(@item)
|
||||
}
|
||||
format.js {}
|
||||
format.js { render 'admin/items/reload_items' }
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('update.error.link')
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@item = Link.find(params[:id])
|
||||
@item.destroy
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_items_url
|
||||
}
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
@item = Link.find(params[:id])
|
||||
@item.destroy
|
||||
respond_to do |format|
|
||||
format.html {}
|
||||
format.js { @item = @item.parent }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Admin::PagePartsController < OrbitBackendController
|
||||
include Admin::FrontendWidgetInterface
|
||||
layout "site_editor"
|
||||
layout "structure"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :is_admin?
|
||||
before_filter :set_current_item
|
||||
|
@ -43,6 +43,7 @@ class Admin::PagePartsController < OrbitBackendController
|
|||
get_categories_and_tags
|
||||
get_frontend_data_count
|
||||
@app_frontend_urls = get_app_frontend_urls
|
||||
@no_orbit_bar = true
|
||||
end
|
||||
|
||||
def reload_widgets
|
||||
|
|
|
@ -1,65 +1,24 @@
|
|||
class Admin::PagesController < Admin::ItemsController
|
||||
helper Admin::PagePartsHelper
|
||||
include Admin::FrontendWidgetInterface
|
||||
helper Admin::PagePartsHelper
|
||||
include Admin::FrontendWidgetInterface
|
||||
|
||||
def show
|
||||
@item = Page.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render 'admin/items/index'
|
||||
}
|
||||
format.js {}
|
||||
end
|
||||
@no_orbit_bar = true
|
||||
render layout: 'page_layout'
|
||||
end
|
||||
|
||||
def new
|
||||
@item = Page.new
|
||||
@item = Page.new(params[:page])
|
||||
@item.parent = Item.find(params[:parent_id]) rescue nil
|
||||
# @apps = ModuleApp.for_frontend_select
|
||||
|
||||
@designs = Design.all.entries
|
||||
@themes = Design.first.themes
|
||||
@module_apps = ModuleApp.for_frontend_select
|
||||
@app_frontend_urls = nil
|
||||
@categories = nil
|
||||
@tags = nil
|
||||
@page_frontend_data_counts = nil
|
||||
@frontend_styles = nil
|
||||
@selected={
|
||||
:design => @designs.first,
|
||||
:theme=> @themes.first,
|
||||
:module_app=>nil,#@module_apps.first
|
||||
:app_frontend_url=> nil, #@module_apps.first
|
||||
:category=>nil,
|
||||
:tag=>nil,
|
||||
:page_frontend_data_count=>nil,
|
||||
:frontend_style => nil
|
||||
}
|
||||
get_variables_for_new
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def edit
|
||||
@item = Page.find(params[:id])
|
||||
|
||||
@designs = Design.all.entries
|
||||
@themes = @item.design ? @item.design.themes : @designs.first.themes
|
||||
@module_apps = ModuleApp.for_frontend_select
|
||||
@categories = nil
|
||||
@tags = nil
|
||||
@page_frontend_data_counts = nil
|
||||
@frontend_styles = nil
|
||||
|
||||
@selected={
|
||||
:design => @item.design || @designs.first,
|
||||
:theme=> @item.theme,
|
||||
:module_app=>@item.module_app,#@module_apps.first
|
||||
:app_frontend_url=> @item.app_frontend_url, #@module_apps.first
|
||||
:category=>nil, #fetch by method: get_categories_and_tags
|
||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
||||
:page_frontend_data_count=>nil,
|
||||
:frontend_style => nil
|
||||
}
|
||||
@app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil
|
||||
get_categories_and_tags
|
||||
get_frontend_data_count
|
||||
get_variables_for_edit
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def reload_themes
|
||||
|
@ -133,22 +92,17 @@ include Admin::FrontendWidgetInterface
|
|||
clean_tags_and_category_params
|
||||
@item = Page.new(params[:page])
|
||||
|
||||
if @item.module_app && @item.module_app.key == 'page_content'
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
if @item.module_app && @item.module_app.key == 'page_content'
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('create.success.page')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_page_url(@item)
|
||||
}
|
||||
format.js {}
|
||||
format.js { render 'admin/items/reload_items' }
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('create.error.page')
|
||||
@designs = Design.all.entries
|
||||
@design = Design.first
|
||||
get_variables_for_new
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
@ -163,40 +117,64 @@ include Admin::FrontendWidgetInterface
|
|||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('update.success.page')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_page_url(@item)
|
||||
}
|
||||
format.js {}
|
||||
format.js { render 'admin/items/reload_items' }
|
||||
end
|
||||
else
|
||||
get_variables_for_edit
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@item = Page.find(params[:id])
|
||||
@item.destroy
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
||||
}
|
||||
format.js { redirect_to admin_items_url }
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
@item = Page.find(params[:id])
|
||||
@item.destroy
|
||||
respond_to do |format|
|
||||
format.html {}
|
||||
format.js { @item = @item.parent }
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_frontend_styles
|
||||
has_old_value = @selected[:module_app].app_pages[@selected[:app_frontend_url]]
|
||||
@frontend_styles = has_old_value ? has_old_value["style"] : (@selected[:module_app].app_pages.first[1]["style"] rescue nil)
|
||||
end
|
||||
|
||||
def get_variables_for_new
|
||||
@designs = Design.all.entries
|
||||
@themes = Design.first.themes
|
||||
@module_apps = ModuleApp.for_frontend_select
|
||||
@app_frontend_urls = nil
|
||||
@categories = nil
|
||||
@tags = nil
|
||||
@page_frontend_data_counts = nil
|
||||
@frontend_styles = nil
|
||||
@selected={
|
||||
:design => @designs.first,
|
||||
:theme=> @themes.first,
|
||||
:module_app=>nil,#@module_apps.first
|
||||
:app_frontend_url=> nil, #@module_apps.first
|
||||
:category=>nil,
|
||||
:tag=>nil,
|
||||
:page_frontend_data_count=>nil,
|
||||
:frontend_style => nil
|
||||
}
|
||||
end
|
||||
|
||||
def get_variables_for_edit
|
||||
@designs = Design.all.entries
|
||||
@themes = @item.design ? @item.design.themes : @designs.first.themes
|
||||
@module_apps = ModuleApp.for_frontend_select
|
||||
@categories = nil
|
||||
@tags = nil
|
||||
@page_frontend_data_counts = nil
|
||||
@frontend_styles = nil
|
||||
|
||||
@selected={
|
||||
:design => @item.design || @designs.first,
|
||||
:theme=> @item.theme,
|
||||
:module_app=>@item.module_app,#@module_apps.first
|
||||
:app_frontend_url=> @item.app_frontend_url, #@module_apps.first
|
||||
:category=>nil, #fetch by method: get_categories_and_tags
|
||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
||||
:page_frontend_data_count=>nil,
|
||||
:frontend_style => nil
|
||||
}
|
||||
@app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil
|
||||
get_categories_and_tags
|
||||
get_frontend_data_count
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -41,4 +41,13 @@ module Admin::ItemsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def get_item_module_infos(item)
|
||||
if module_app = item.module_app
|
||||
app = OrbitApp::Module::Registration.find_by_key(module_app.key)
|
||||
[t(app.get_label_i18n), (app.get_icon_class rescue 'icons-daniel-bruce-2')]
|
||||
else
|
||||
[t(:no_app), 'icons-daniel-bruce-2']
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ module ApplicationHelper
|
|||
def current_or_guest_user
|
||||
if current_user
|
||||
if session[:guest_user_id]
|
||||
guest_user.destroy
|
||||
User.find(session[:guest_user_id]).destroy rescue nil
|
||||
session[:guest_user_id] = nil
|
||||
end
|
||||
current_user
|
||||
|
@ -179,16 +179,8 @@ module ApplicationHelper
|
|||
|
||||
def page_stylesheets(page, edit=nil)
|
||||
stylesheets = ''
|
||||
unless edit
|
||||
stylesheets << "<link href='/assets/bootstrap-orbit.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/icons.css' rel='stylesheet' type='text/css' />\n"
|
||||
end
|
||||
stylesheets << "<link href='#{asset_path 'orbit_bar_bootstrap'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.css_reset.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.css_reset
|
||||
stylesheets << "<link href='/assets/bootstrap.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/font-awesome.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/orbit-bar.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/social-share-button.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{asset_path 'banner_nav.css'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{asset_path 'default_widget.css'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.css_default.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.css_default
|
||||
|
@ -199,20 +191,8 @@ module ApplicationHelper
|
|||
|
||||
def page_javascripts(page, edit=nil)
|
||||
javascripts = ''
|
||||
unless edit
|
||||
javascripts << "<script type='text/javascript' src='/static/jquery.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/bootstrap.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
||||
end
|
||||
javascripts << "<script type='text/javascript' src='/assets/lib/jquery.preload-min.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/static/kernel.js'></script>\n"
|
||||
# javascripts << "<script type='text/javascript' src='/assets/social-share-button.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/lib/social-share-button.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||
# javascripts << "<script type='text/javascript' src='/assets/lib/jquery.preload-min.js'></script>\n"
|
||||
# javascripts << "<script type='text/javascript' src='/assets/jquery.cycle.all.latest.js'></script>\n"
|
||||
page.design.javascripts.each do |js|
|
||||
javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
|
|
|
@ -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)) %>");
|
|
@ -1,4 +1,4 @@
|
|||
<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>
|
||||
<script type='text/javascript' src='/assets/jquery.cycle.all.latest.js'></script>
|
||||
<script type='text/javascript'>
|
||||
jQuery(function( $ ){
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<ul id="orblist">
|
||||
<li><%= link_to t(:homepage), root_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:item), admin_items_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:template), admin_designs_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:purchase), admin_purchases_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:asset), admin_assets_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:member), admin_users_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:site_), admin_sites_path, :class => 'orblink' %></li>
|
||||
</ul>
|
|
@ -0,0 +1 @@
|
|||
<link href='http://fonts.googleapis.com/css?family=Quicksand|Varela+Round|Chivo|Raleway|Playfair+Display+SC|Archivo+Black&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
|
@ -1,5 +0,0 @@
|
|||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-gauge') + t(:dashboard_), admin_dashboards_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + t(:member), admin_users_new_interface_index_path %></li>
|
||||
</ul>
|
|
@ -0,0 +1,4 @@
|
|||
<!-- IE HTML5 Fix -->
|
||||
<!--[if IE]>
|
||||
<script src="<%= asset_path 'html5.js' %>"></script>
|
||||
<![endif]-->
|
|
@ -1,7 +0,0 @@
|
|||
<%= raw(VALID_LOCALES.map{ |locale|
|
||||
if I18n.locale.to_s.eql?(locale)
|
||||
t(:_locale, :locale => locale)
|
||||
else
|
||||
link_to t(:_locale, :locale => locale), params.merge({:locale => locale})
|
||||
end
|
||||
}.join(' | ')) %>
|
|
@ -0,0 +1,31 @@
|
|||
<ul class="nav" role="navigation">
|
||||
|
||||
<!-- menu -->
|
||||
<li id="orbit-start" class="dropdown">
|
||||
<a class="orbitlogo" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-start">
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-gauge') + ' ' + t(:dashboard_), admin_dashboards_path, tabindex: '-1' %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + ' ' + t(:member), admin_users_new_interface_index_path, tabindex: '-1' %></li>
|
||||
<% if (is_admin? rescue false) %>
|
||||
<li class="divider"></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-flow-tree') + ' ' + t(:structure), admin_items_path, tabindex: '-1' %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + ' ' + t('site.settings'), admin_site_site_info_path(@site), tabindex: '-1' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<!-- home -->
|
||||
<li id="orbit-home">
|
||||
<a href="<%= root_path %>" role="button">
|
||||
<i class="icons-house"></i> <span class="hide"><%= t(:homepage) %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Desktop -->
|
||||
<li id="orbit-desktop">
|
||||
<a href="<%= desktop_path %>" role="button">
|
||||
<i class="icons-screen"></i> <span class="hide"><%= t(:desktop) %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
|
@ -1,15 +0,0 @@
|
|||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-gauge') + t(:dashboard_), admin_dashboards_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + t(:member), admin_users_new_interface_index_path %></li>
|
||||
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-content') + t(:content) %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-member') + t(:member), admin_users_path %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-asset') + t(:asset), admin_assets_path %></li>
|
||||
<%if (is_admin? rescue false)%>
|
||||
<li class="divider"></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-flow-cascade') + t(:structure), admin_items_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('site.settings'), admin_site_site_info_path(@site) %></li>
|
||||
<% end -%>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t(:add_item) %></li>
|
||||
</ul>
|
|
@ -0,0 +1,5 @@
|
|||
<link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
@ -1,103 +1,7 @@
|
|||
<header id="orbit-bar" class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clear">
|
||||
<div class="dropdown orbit-logo pull-left">
|
||||
<% if !current_user.nil? %>
|
||||
<%= render :partial=>"layouts/member_orbit_menu"%>
|
||||
<% else %>
|
||||
<%= render :partial=>"layouts/guest_orbit_menu"%>
|
||||
<% end -%>
|
||||
</div>
|
||||
<ul class="nav">
|
||||
<li><a href="<%= root_path %>" data-icons=""></a></li>
|
||||
<li><a href="<%= desktop_path %>" data-icons=""></a></li>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<!--
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
||||
<ul class="dropdown-menu">
|
||||
<% #t('ntu.site_names').each do |site| %>
|
||||
<li><%#= link_to site[1], get_link(site[0]) %></li>
|
||||
<%# end %>
|
||||
</ul>
|
||||
</li>
|
||||
-->
|
||||
<li class="search clear" title="<%= t :search_google %>">
|
||||
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
||||
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
||||
<input type="hidden" name="client" value="pub-&" />
|
||||
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
||||
<input type="hidden" name="oe" id="oe" value="utf-8" />
|
||||
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
|
||||
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
|
||||
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
|
||||
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
|
||||
</form>
|
||||
</li>
|
||||
<li class="dropdown language">
|
||||
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown" data-icons=""></a>
|
||||
<ul class="dropdown-menu language-menu">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
<li class="dropdown active">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
<img class="member-img" src="/assets/person.png" />
|
||||
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<span class="member-name"><%= current_user.name %></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu account-menu">
|
||||
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-tools') + ' ' + t(:account_setting), desktop_path+"#settings-account" %></li> -->
|
||||
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-screen') + ' ' + t(:desktop), desktop_path %></li> -->
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-logout') + ' ' + t(:logout), destroy_user_session_path %></li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="icons-help"></i>
|
||||
<%= t(:help) %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="dropdown bar-login">
|
||||
<a class="dropdown-toggle orbit-bar-member" href="#" data-icons=""></a>
|
||||
<div class="dropdown-menu">
|
||||
<ul class="log">
|
||||
<li class="title hide"></li>
|
||||
|
||||
<%= form_for :user, :url => user_session_path do |f| %>
|
||||
<li>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-user"></i></span>
|
||||
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-lock"></i></span>
|
||||
<%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clear hide">
|
||||
<%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
|
||||
</li>
|
||||
<li>
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
||||
|
||||
</li>
|
||||
<li class="divider hide"><span><%= t(:or_lower) %></span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%#= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<header id="orbit-bar" class="orbit-bar navbar">
|
||||
<div class="navbar-inner">
|
||||
<%= render :partial => "layouts/left_menu" %>
|
||||
<%= render :partial => "layouts/right_menu" %>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<ul class="nav pull-right" role="navigation">
|
||||
|
||||
<!-- search -->
|
||||
<li id="search">
|
||||
<form method="get" action="http://www.google.com/custom">
|
||||
<input type="hidden" name="client" value="pub-&" />
|
||||
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
||||
<input type="hidden" name="oe" id="oe" value="utf-8" />
|
||||
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
|
||||
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
|
||||
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
|
||||
<%= text_field_tag 'q','', {:class => "search-query input-medium", :placeholder => t(:search_google)} %>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<!-- Language -->
|
||||
<li id="orbit-language" class="dropdown">
|
||||
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><%= t(:_locale, :locale => I18n.locale) %></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-language">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil), tabindex: "-1" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% if user_signed_in? %>
|
||||
<!-- user -->
|
||||
<li id="orbit-user" class="dropdown">
|
||||
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<%= image_tag 'menber-pic.png', class: "user-pic" %>
|
||||
<span><%= current_user.name %></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-user">
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t(:account_settings), desktop_path + "#settings-account", tabindex: '-1' %></li>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-screen') + ' ' + t(:desktop), desktop_path, tabindex: '-1' %></li>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-logout') + ' ' + t(:logout), destroy_user_session_path, tabindex: '-1' %></li>
|
||||
<li class="divider"></li>
|
||||
<li><a tabindex="-1" href="#"><i class="icons-lifebuoy"></i> <%= t(:help) %></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<!-- login -->
|
||||
<li id="orbit-login">
|
||||
<a href="#login" role="button" data-toggle="modal">
|
||||
<i class="icons-login"></i> <span class="hide"><%= t(:login) %></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Log in Modal -->
|
||||
<div id="login" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="ModalLabel"><%= t(:login_orbit) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<%= form_for :user, url: user_session_path, html: {class: 'container'} do |f| %>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on">
|
||||
<i class="icon-user"></i>
|
||||
</span>
|
||||
<input class="input-xlarge" id="user_email" type="text" placeholder="<%= t(:email) %>">
|
||||
</div>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on">
|
||||
<i class="icon-lock"></i>
|
||||
</span>
|
||||
<input class="input-xlarge" id="user_email" type="password" placeholder="<%= t(:password) %>">
|
||||
</div>
|
||||
<div class="pull-left" style="width: 150px;">
|
||||
<!-- <label class="checkbox">
|
||||
<input type="checkbox" value="">
|
||||
<small>Remember me</small>
|
||||
</label> -->
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<%= link_to content_tag(:small, t(:forgot_password)), new_user_password_path %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="<%= I18n.locale.to_s %>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<%= page_title(@item).html_safe %>
|
||||
<link rel="shortcut icon" href="<%= asset_path "ncculogo.ico" %>">
|
||||
<%= page_metas(@item).html_safe %>
|
||||
<!--[if lt IE 9]>
|
||||
<%= javascript_include_tag "html5" %>
|
||||
<![endif]-->
|
||||
<%= page_stylesheets(@item).html_safe %>
|
||||
<%= stylesheet_link_tag "page_layout" %>
|
||||
<%= page_javascripts(@item).html_safe %>
|
||||
<%= javascript_include_tag "page_layout" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
|
@ -8,8 +8,11 @@
|
|||
<!--[if lt IE 9]>
|
||||
<%= javascript_include_tag "html5" %>
|
||||
<![endif]-->
|
||||
<%= page_stylesheets(@item).html_safe %>
|
||||
<%= page_javascripts(@item).html_safe %>
|
||||
<%= stylesheet_link_tag "page_layout" %>
|
||||
<%= page_stylesheets(@item).html_safe %>
|
||||
<%= javascript_include_tag "page_layout" %>
|
||||
<%= page_javascripts(@item).html_safe %>
|
||||
<%= javascript_include_tag "orbit_js_1.0.1-front-end.js" unless @no_orbit_bar %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<!--[if lt IE 9]>
|
||||
<%= javascript_include_tag "html5" %>
|
||||
<![endif]-->
|
||||
<%= stylesheet_link_tag "site_editor" %>
|
||||
<%= javascript_include_tag "site_editor" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<%= render 'layouts/orbit_bar' %>
|
||||
<nav id="main-sidebar" class="my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div id='back_sidebar' class="overview">
|
||||
<%= yield :sidebar %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="main-wrap">
|
||||
<div id='back_main'>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||
<%= render 'layouts/meta' %>
|
||||
<%= render 'layouts/google_font' %>
|
||||
<%= stylesheet_link_tag "structure" %>
|
||||
<%= render 'layouts/ie_html5_fix' %>
|
||||
<%= javascript_include_tag "structure" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body id="items">
|
||||
<%= render 'layouts/orbit_bar' unless @no_orbit_bar %>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
add_link: Add link
|
||||
add_page: Add page
|
||||
login_orbit: Log In to Orbit
|
||||
no_app: No module
|
|
@ -91,6 +91,10 @@ module OrbitApp
|
|||
@data_count
|
||||
end
|
||||
|
||||
def get_icon_class
|
||||
@side_bar.get_icon_class
|
||||
end
|
||||
|
||||
def get_widget_by_path(path)
|
||||
if @widget_set
|
||||
@widget_set.find_by_path(path)
|
||||
|
|
|
@ -63,11 +63,19 @@ module OrbitApp
|
|||
def get_sidebar_order!
|
||||
@sidebar_order = (get_module_app.sidebar_order rescue 0)
|
||||
end
|
||||
|
||||
def get_icon_class
|
||||
@icon_class
|
||||
end
|
||||
|
||||
def get_module_app
|
||||
@get_module_app.call
|
||||
end
|
||||
|
||||
def get_module_app_key
|
||||
@module_app_key
|
||||
end
|
||||
|
||||
def head_label_i18n(var,options ={})
|
||||
@head_label = var
|
||||
@icon_class = options[:icon_class]
|
||||
|
|
|
@ -28,7 +28,7 @@ module ParserCommon
|
|||
res << "_#{i}" if i
|
||||
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
|
||||
res << "'>"
|
||||
root = "/"
|
||||
root = ""
|
||||
res << "<a href='#{edit ? root + admin_page_path(page.id) : (page.class.to_s.eql?('Page') ? root + page.path : page.url)}'><span>#{page.title}</span></a>"
|
||||
if page.visible_children.size > 0 && current < menu.levels
|
||||
res << "<span class='dot'></span>"
|
||||
|
@ -131,7 +131,7 @@ module ParserCommon
|
|||
res << "<ul class='list'>"
|
||||
menu_page.visible_children.each do |child|
|
||||
res << "<li class='#{page.id.eql?(child.id) ? 'active' : nil}'>"
|
||||
root = "/"
|
||||
root = ""
|
||||
res << "<a href='#{edit ? root + admin_page_path(child.id) : (child.class.to_s.eql?('Page') ? root + child.path : child.url)}'>#{child.title}</a>"
|
||||
res << "</li>"
|
||||
end
|
||||
|
@ -248,8 +248,8 @@ module ParserCommon
|
|||
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
||||
part_title = part.title rescue nil
|
||||
if edit
|
||||
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable' style='border:solid 1px; margin:5px; padding:5px;'>" if part
|
||||
ret << "<div class='edit_link' style='display:none'>"
|
||||
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable'>" if part
|
||||
ret << "<div class='edit_link'>"
|
||||
ret << " <a href='#{edit_admin_page_part_path(part.id)}' class='nav'>#{t(:edit)}</a>" if part
|
||||
ret << '</div>'
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,45 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$.each($(".dymanic_load"),function(){
|
||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||
|
||||
if($(this).attr("path")!=''){
|
||||
ajax_load_proc($(this),$(this).attr("path"));
|
||||
}
|
||||
}
|
||||
);
|
||||
$("#main_content").addClass("module");
|
||||
});
|
||||
|
||||
function ajax_load_proc(wapper,url){
|
||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||
if (textSta == 'success') {
|
||||
wapper.html(respText);
|
||||
};
|
||||
if(textSta == 'error')
|
||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||
});
|
||||
}
|
||||
|
||||
// Ad Banner FX code [start]
|
||||
function getTimeout() {
|
||||
return $(this).attr('time_to_next');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.slideshow img', function()
|
||||
{
|
||||
if($(this).attr('link_url')!='')
|
||||
{
|
||||
if($(this).attr('link_open')=='new_window')
|
||||
{
|
||||
window.open($(this).attr('link_url'));
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href=$(this).attr('link_url')
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
// Ad Banner FX code [end]
|
Loading…
Reference in New Issue