Fixed Site Info completely and added search engine page
This commit is contained in:
parent
fef7cc4ed2
commit
9e4686a565
|
@ -55,6 +55,11 @@ class Admin::SitesController < OrbitBackendController
|
|||
|
||||
end
|
||||
|
||||
def search_engine
|
||||
|
||||
end
|
||||
|
||||
|
||||
def ui_theme
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
|
||||
<li title="Site Info"><%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><span><i class="icons-browser"></i></span><%end%></li>
|
||||
|
||||
<li title="Search Engine"><a href="/orbit_4.0.1/admin/search_engine/index.shtml?sidebarNavList=5&subNavBlockList=0"><span><i class="icons-search"></i></span></a></li>
|
||||
<li title="Search Engine"><%= link_to admin_site_search_engine_path(@site), :class => active_for_action('sites', 'site_info') do %><span><i class="icons-search"></i></span><%end%></li>
|
||||
|
||||
<li title="Preference"><a href="/orbit_4.0.1/admin/preference/index.shtml?sidebarNavList=7&subNavBlockList=0"><span><i class="icons-cog"></i></span></a></li>
|
||||
<li title="System Info"><a href="/orbit_4.0.1/admin/system_info/index.shtml?sidebarNavList=8&subNavBlockList=0"><span><i class="icons-info-2"></i></span></a></li>
|
||||
</ul>
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
|
||||
<li title="Site Info"><%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><span><i class="icons-browser"></i></span><%end%></li>
|
||||
|
||||
<li title="Search Engine"><a href="/orbit_4.0.1/admin/search_engine/index.shtml?sidebarNavList=5&subNavBlockList=0"><span><i class="icons-search"></i></span></a></li>
|
||||
<li title="Search Engine"><%= link_to admin_site_search_engine_path(@site), :class => active_for_action('sites', 'site_info') do %><span><i class="icons-search"></i></span><%end%></li>
|
||||
|
||||
<li title="Preference"><a href="/orbit_4.0.1/admin/preference/index.shtml?sidebarNavList=7&subNavBlockList=0"><span><i class="icons-cog"></i></span></a></li>
|
||||
<li title="System Info"><a href="/orbit_4.0.1/admin/system_info/index.shtml?sidebarNavList=8&subNavBlockList=0"><span><i class="icons-info-2"></i></span></a></li>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
<% # encoding: utf-8 %>
|
||||
|
||||
<% content_for :side_bar do %>
|
||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
|
||||
<% end %>
|
||||
|
||||
<head>
|
||||
<%= stylesheet_link_tag "lib/wrap-nav"%>
|
||||
<%= stylesheet_link_tag "lib/main-forms"%>
|
||||
<%= stylesheet_link_tag "lib/togglebox"%>
|
||||
|
||||
<%= javascript_include_tag 'lib/ckeditor/ckeditor' %>
|
||||
<%= javascript_include_tag 'lib/ckeditor/replace/site_info' %>
|
||||
<%= javascript_include_tag 'lib/site_set' %>
|
||||
</head>
|
||||
|
||||
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "form-horizontal main-forms"} do |f| %>
|
||||
|
||||
<fieldset>
|
||||
<!-- Input Area -->
|
||||
<div class="input-area">
|
||||
|
||||
<!-- Language Tabs -->
|
||||
<div class="nav-name"><strong>Language</strong></div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%#= raise @site_valid_locales.inspect %>
|
||||
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<!-- Language -->
|
||||
<div class="tab-content language-area">
|
||||
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t 'site.title' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!-- Always shoe in the title bar -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Always show in the title bar
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :title_always_on, :class => "toggle-check" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- CKeditor Site Header -->
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted"><%= t('site.header')%></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :sub_menu_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
<!-- Sitemap menu in Header -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Sitemap menu in header
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check" data-disabled="true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Terms of Use -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Terms of Use
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check terms" data-disabled="true" checked="checked">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CKeditor Default Terms of Use -->
|
||||
<div class="control-group input-content hide">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted">Default Terms of Use</label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :terms_of_user_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.terms_of_user_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<% end %>
|
|
@ -14,9 +14,6 @@
|
|||
<%= javascript_include_tag 'lib/site_set' %>
|
||||
</head>
|
||||
|
||||
<section id="main-wrap">
|
||||
<div class="wrap-inner">
|
||||
<!-- Forms -->
|
||||
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "form-horizontal main-forms"} do |f| %>
|
||||
|
||||
<fieldset>
|
||||
|
@ -60,7 +57,8 @@
|
|||
<hr>
|
||||
|
||||
<!-- CKeditor Site Header -->
|
||||
<div class="control-group input-content">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted"><%= t('site.header')%></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
|
@ -68,8 +66,9 @@
|
|||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
<!-- Sitemap menu in Header -->
|
||||
<div class="control-group">
|
||||
|
@ -82,27 +81,6 @@
|
|||
|
||||
<hr>
|
||||
|
||||
<!-- CKeditor Site Footer -->
|
||||
<div class="control-group input-content">
|
||||
<label class="control-label muted"><%= t 'site.footer' %></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<textarea class="ckeditor input-block-level" id="footer_en" name="content_en"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sitemap menu in Footer -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Sitemap menu in footer
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check" data-disabled="true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Terms of Use -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Terms of Use
|
||||
|
@ -114,156 +92,28 @@
|
|||
|
||||
<!-- CKeditor Default Terms of Use -->
|
||||
<div class="control-group input-content hide">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted">Default Terms of Use</label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<textarea class="ckeditor input-block-level" id="terms_en" name="content_en"></textarea>
|
||||
<%= f.fields_for :terms_of_user_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.terms_of_user_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div id="poststuff">
|
||||
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>
|
||||
<div id="post-body">
|
||||
<div id="post-body-content" class="clear">
|
||||
<ul class="nav nav-tabs">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%#= raise @site_valid_locales.inspect %>
|
||||
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="tab-content form-horizontal">
|
||||
<div class="control-group" style="margin-bottom: 0;">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<%= f.check_box :title_always_on %> <%= t :always_display_title %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.title' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'site.title_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.openness' %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :frontend_closed %><%= I18n.t('site.frontend_closed') %><br/>
|
||||
<%= f.check_box :backend_openness_on %><%= I18n.t('site.backend_openness_on') %>
|
||||
<p class="help-block"><%= (t 'site.search_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.search' %></label>
|
||||
<div class="controls">
|
||||
<%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%>
|
||||
<%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>
|
||||
<p class="help-block"><%= (t 'site.search_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.keywords' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :keywords do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'site.keywords_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.description' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :description do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'site.description_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.header' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :sub_menu_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.footer' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :footer_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'site.footer_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.default_image' %></label>
|
||||
<div class="controls">
|
||||
<%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
|
||||
<span id='fu' class="file-name"></span>
|
||||
<!--請程式務必將圖片尺寸加入到行內裡-->
|
||||
<% if @site.default_image %>
|
||||
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<img class="pull-left upload-picture" src="/assets/default-img.png" />
|
||||
<% end %>
|
||||
<br>
|
||||
<% if @site.default_image.file %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'site[remove_default_image]' %>
|
||||
<%= t(:delete_) %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="control-group" style="margin-bottom: 0;">
|
||||
<label class="control-label"><%= t 'site.mobile_version' %></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<%= f.check_box :mobile_on %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -190,6 +190,7 @@ Orbit::Application.routes.draw do
|
|||
resources :sites do
|
||||
get 'mail_setting'
|
||||
get 'site_info'
|
||||
get 'search_engine'
|
||||
get 'sitemap'
|
||||
get 'sitemap_frontend'
|
||||
get 'sitemap_toggle', :on => :member
|
||||
|
|
Reference in New Issue