diff --git a/app/assets/images/favicon.ico b/app/assets/images/favicon.ico
new file mode 100644
index 0000000..1e64b7e
Binary files /dev/null and b/app/assets/images/favicon.ico differ
diff --git a/app/assets/images/preloader.gif b/app/assets/images/preloader.gif
new file mode 100644
index 0000000..0f2bc83
Binary files /dev/null and b/app/assets/images/preloader.gif differ
diff --git a/app/controllers/admin/dashboards_controller.rb b/app/controllers/admin/dashboards_controller.rb
index a676697..4af945d 100644
--- a/app/controllers/admin/dashboards_controller.rb
+++ b/app/controllers/admin/dashboards_controller.rb
@@ -1,9 +1,10 @@
-class Admin::DashboardsController < OrbitAdminController
+class Admin::DashboardsController < ApplicationController
+ include OrbitBackendHelper
+ before_action :check_backend_openness
layout "basic_back_end"
def index
- # check_backend_openness
- apps = ['bulletin', 'page', 'page_context', 'web_link']
+ apps = ['bulletin', 'page', 'web_link']
@module_app_contents, @module_app_contents_total = get_module_app_count(apps)
@recent_updated = get_recently_updated(apps)
@most_visited = get_most_visited(apps)
@@ -86,4 +87,13 @@ class Admin::DashboardsController < OrbitAdminController
sorted_objects[0..19]
Kaminari.paginate_array(sorted_objects).page(params[:page]).per(5)
end
+
+ private
+
+ def check_backend_openness
+ if !current_site.backend_openness_on && current_user.blank?
+ redirect_to new_session_path
+ end
+ end
+
end
diff --git a/app/controllers/admin/designs_controller.rb b/app/controllers/admin/designs_controller.rb
new file mode 100644
index 0000000..2b271d6
--- /dev/null
+++ b/app/controllers/admin/designs_controller.rb
@@ -0,0 +1,11 @@
+class Admin::DesignsController < OrbitAdminController
+ layout "structure"
+
+ def index
+ @designs = Dir.glob("#{Rails.root}/app/templates/*").map{|template| {
+ "key"=>template.split('/').last,
+ "title"=>template.split('/').last.titleize,
+ "author"=>"Ray"
+ }}
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb
index 4c3879a..534bddb 100644
--- a/app/controllers/admin/sites_controller.rb
+++ b/app/controllers/admin/sites_controller.rb
@@ -18,13 +18,19 @@ class Admin::SitesController < OrbitAdminController
def sitemap
end
+ def change_design
+ @site.template = params[:design_key]
+ @site.save
+ restart_server
+ end
+
def system_info
@disk_free = `df -h /`.gsub("\n"," ").html_safe
@nginx_version = %x[/opt/nginx/sbin/nginx -v 2>&1].gsub("\n"," ").html_safe
@mongo_version = `mongod --version`.split("\n")[0].html_safe
- # @linux_version = `lsb_release -d`.split(":")[1].html_safe
+ @linux_version = `lsb_release -d`.split(":")[1].html_safe
- # @user_actions = UserAction.all.desc(:created_at).page(params[:page]).per(100)
+ @user_actions = UserAction.all.desc(:created_at).page(params[:page]).per(10)
# @mail_crons = MailCron.desc(:created_at)
@@ -87,14 +93,16 @@ class Admin::SitesController < OrbitAdminController
result = "failed"
else
result = "success"
- Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` }
+ Bundler.with_clean_env { `cd #{Rails.root} && bundle install` }
end
render :text => result
end
def restart_server
- render :text => "success"
+ %x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
+ sleep 5
+ render :nothing => true
end
private
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e0133fe..f504b6f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -38,13 +38,17 @@ class ApplicationController < ActionController::Base
end
def get_key
- @key = Template::KEY
+ @key = current_site.template
end
def current_site
@current_site = Site.first
end
+ def frontent_allowed
+ current_user.nil? and !current_site.frontend_open
+ end
+
private
def current_user
diff --git a/app/controllers/orbit_admin_controller.rb b/app/controllers/orbit_admin_controller.rb
index 13317b4..f98ce05 100644
--- a/app/controllers/orbit_admin_controller.rb
+++ b/app/controllers/orbit_admin_controller.rb
@@ -4,7 +4,7 @@ class OrbitAdminController < ApplicationController
include Authorize
include OrbitBackendHelper
- before_action :authenticate_user
+ before_action :authenticate_user, :log_user_action
layout "back_end"
def sort
@@ -50,4 +50,21 @@ class OrbitAdminController < ApplicationController
end
end
+ private
+
+ def log_user_action
+ unless (request.filtered_parameters['action'].eql? "system_info") and (request.filtered_parameters['controller'].eql? "admin/sites")
+ log = UserAction.new
+ log.action = request.filtered_parameters['action']
+ log.controller = request.filtered_parameters['controller']
+ log.request_path = request.original_fullpath
+ log.request_method = request.request_method
+ log.remote_ip = request.remote_ip
+ log.referer = request.referer
+ log.save
+
+ current_user.user_actions << log
+ end
+ end
+
end
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index 9199688..bad57c9 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -2,9 +2,10 @@
# data-layout-content="arrayname" in layouts can be used to render data in the array
class PagesController < ApplicationController
- before_action :get_key
+ before_action :get_key
layout :get_layout
include PagesHelper
+ before_filter :check_frontend_open, :only => [:home,:show]
def index
@pages = Page.all
@@ -71,10 +72,10 @@ class PagesController < ApplicationController
# render render_final_page("#{module_app}/#{params[:target_action]}",page)
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
else
- render :file => "#{Rails.root}/public/404", :layout => false, :status => :not_found
+ render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
end
else
- render :file => "#{Rails.root}/public/404", :layout => false, :status => :not_found
+ render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
end
end
end
@@ -266,4 +267,10 @@ class PagesController < ApplicationController
return true if str == "true"
return false if str == "false"
end
+
+ def check_frontend_open
+ if !current_site.frontend_open && current_user.blank?
+ redirect_to '/admin/dashboards'
+ end
+ end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 2dc524e..206a6cc 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,13 +1,13 @@
require "json"
module ApplicationHelper
def render_widget(widget)
- key = Template::KEY
+ key = current_site.template
file = File.join("../templates", "#{key}", "modules/#{widget}")
render :partial => file
end
def render_partial(partial)
- key = Template::KEY
+ key = current_site.template
file = File.join("../templates", "#{key}", "partial/#{partial}")
render :partial => file
end
@@ -33,7 +33,7 @@ module ApplicationHelper
item
end
@items = create_json(@pages)
- key = Template::KEY
+ key = current_site.template
menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{key}", '/home/menu.html.erb'))
doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
menu_file.close
diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb
index e5bc063..5c66ff8 100644
--- a/app/helpers/pages_helper.rb
+++ b/app/helpers/pages_helper.rb
@@ -13,7 +13,7 @@ module PagesHelper
def render_widget_for_frontend(controller_name, widget_method, widget_file)
controller_name = controller_name.downcase.singularize
- f = File.join('../templates', "#{Template::KEY}", 'modules', "#{controller_name}", "_#{widget_file}.html.erb");
+ f = File.join('../templates', current_site.template, 'modules', "#{controller_name}", "_#{widget_file}.html.erb");
s = render_to_string(f)
doc = Nokogiri::HTML(s, nil, "UTF-8")
wrap_elements = doc.css("*[data-repeat]")
diff --git a/app/models/site.rb b/app/models/site.rb
index 4b6e7dd..eb117f9 100644
--- a/app/models/site.rb
+++ b/app/models/site.rb
@@ -22,12 +22,13 @@ class Site
field :mobile_on, :type => Boolean, :default => false
field :announcement_category, :type => Array, :default=>[]
field :mobile_bar_color, :type => Array, :default=>[]
- field :mobile_on, :type => Boolean, :default => false
field :phone_number, :type => Array,:default=>[]
field :title_always_on, :type => Boolean, :default => false
field :sitemap_menu_in_header, :type => Boolean, :default => false
field :enable_terms_of_use, :type => Boolean, :default => false
field :search,:type => Hash
+ field :site_settings
+ field :template, type: String
mount_uploader :default_image, ImageUploader
@@ -37,6 +38,4 @@ class Site
I18n.locale = :en
title.parameterize
end
-
- mount_uploader :default_image, ImageUploader
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 0a8e9d5..23e9910 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -10,6 +10,7 @@ class User
field :confirmation_token, type: String
field :reset_token, type: String
has_many :assets
+ has_many :user_actions, :dependent => :destroy
index({ confirmation_token: 1}, { unique: true })
diff --git a/app/models/user_action.rb b/app/models/user_action.rb
new file mode 100644
index 0000000..c887abf
--- /dev/null
+++ b/app/models/user_action.rb
@@ -0,0 +1,14 @@
+class UserAction
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :action
+ field :controller
+ field :request_path
+ field :request_method
+ field :remote_ip
+ field :referer
+
+ belongs_to :user
+
+end
\ No newline at end of file
diff --git a/app/views/admin/dashboards/_recent_update.html.erb b/app/views/admin/dashboards/_recent_update.html.erb
index ed55d9a..676e102 100644
--- a/app/views/admin/dashboards/_recent_update.html.erb
+++ b/app/views/admin/dashboards/_recent_update.html.erb
@@ -16,7 +16,7 @@
<% @recent_updated.each do |object| %>
- <%= (object[0].title rescue nil) || (object[0].page.title rescue nil) || (object[0].name rescue nil) %>
+ <%= (object[0].title rescue nil) || (object[0].page.name rescue nil) || (object[0].name rescue nil) %>
<%= t("dashboard.#{object[0].class.to_s.underscore}") %>
<% end %>
diff --git a/app/views/admin/dashboards/index.html.erb b/app/views/admin/dashboards/index.html.erb
index 32d60fa..b895cca 100644
--- a/app/views/admin/dashboards/index.html.erb
+++ b/app/views/admin/dashboards/index.html.erb
@@ -5,7 +5,7 @@
- <% if is_admin? %>
+ <% unless current_user.blank? %>
<%= render 'server_loading' %>
diff --git a/app/views/admin/designs/_design.html.erb b/app/views/admin/designs/_design.html.erb
new file mode 100644
index 0000000..9b92116
--- /dev/null
+++ b/app/views/admin/designs/_design.html.erb
@@ -0,0 +1,11 @@
+
+
+ <%= design['title'] %>
+
+
+ <%= design['author'] %>
+
+
+ <%= radio_button_tag 'design_default', design['key'], (current_site.template && current_site.template.eql?(design['key']) ? true : false), :class => 'design_default toggle-check', :rel => admin_site_change_design_path(:site_id=>current_site.id, :design_key=>design['key']) %>
+
+
\ No newline at end of file
diff --git a/app/views/admin/designs/_designs.html.erb b/app/views/admin/designs/_designs.html.erb
new file mode 100644
index 0000000..16ff916
--- /dev/null
+++ b/app/views/admin/designs/_designs.html.erb
@@ -0,0 +1,11 @@
+
+
+
+
+
+ <%= render :partial => 'design', :collection => @designs %>
+
\ No newline at end of file
diff --git a/app/views/admin/designs/index.html.erb b/app/views/admin/designs/index.html.erb
new file mode 100644
index 0000000..bf7a9ce
--- /dev/null
+++ b/app/views/admin/designs/index.html.erb
@@ -0,0 +1,233 @@
+
+ <%= stylesheet_link_tag "lib/wrap-nav"%>
+ <%= stylesheet_link_tag "lib/main-list"%>
+ <%= stylesheet_link_tag "lib/mt-list"%>
+ <%= stylesheet_link_tag "lib/filter"%>
+ <%= stylesheet_link_tag "lib/togglebox"%>
+
+ <%= javascript_include_tag 'lib/footable-0.1' %>
+ <%= javascript_include_tag 'lib/all-list' %>
+ <%= javascript_include_tag 'lib/retina' %>
+
+
+
+
+<%#= render 'filter' %>
+<%#= flash[:notice] rescue nil%>
+
+
+
Please wait...
+ Theme changes taking effect
+ <%= image_tag("preloader.gif", size: "50") %>
+
+
+
+
+
+
+
+
<%= t(:installed_templates) %>
+
+
+
+ <%= render 'designs' %>
+
+
+
+
+
+
+
+
+
+
<%= t(:template_store) %>
+
+
+
+
+
+
+ <%= image_tag("preloader.gif", size: "50") %>
+ Loading template store...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/admin/sites/_user_action.html.erb b/app/views/admin/sites/_user_action.html.erb
index 0a00c5c..8cb312c 100644
--- a/app/views/admin/sites/_user_action.html.erb
+++ b/app/views/admin/sites/_user_action.html.erb
@@ -1,5 +1,7 @@
<%= user_action.created_at %>
- <%= user_action.user.name %>
- <%= user_action.page %>
+ <%= user_action.user.user_name %>
+ <%= user_action.remote_ip %>
+ <%= user_action.request_method %>
+ <%= user_action.request_path %>
\ No newline at end of file
diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb
index 56c3d34..fc55301 100644
--- a/app/views/admin/sites/preference.html.erb
+++ b/app/views/admin/sites/preference.html.erb
@@ -48,7 +48,7 @@
-
+ <% end %>
@@ -132,7 +132,7 @@
-
<%= I18n.t('site.enable_personal_desktop')%>
+
<%= I18n.t('site.disable_personal_desktop')%>
<%= f.check_box :desktop_closed , :class=>"toggle-check", :data=> { disabled: true } %>
diff --git a/app/views/admin/sites/system_info.html.erb b/app/views/admin/sites/system_info.html.erb
index 9e25898..d8e2af4 100644
--- a/app/views/admin/sites/system_info.html.erb
+++ b/app/views/admin/sites/system_info.html.erb
@@ -54,17 +54,23 @@
<%= t("user_actions") %>
-
-
- <%= I18n.t 'user_action.time' %>
- <%= I18n.t 'user_action.name' %>
- <%= I18n.t 'user_action.page' %>
-
- <%= render :partial => "user_action", :collection=> @user_actions%>
+
+
+
+ <%= I18n.t 'user_action.time' %>
+ <%= I18n.t 'user_action.name' %>
+ <%= I18n.t 'user_action.ip' %>
+ <%= I18n.t 'user_action.request_method' %>
+ <%= I18n.t 'user_action.request_path' %>
+
+
+
+ <%= render :partial => "user_action", :collection=> @user_actions%>
+
-
- <%#= paginate @user_actions, :remote => true %>
+
+ <%= paginate @user_actions, :remote => true %>
diff --git a/app/views/admin/sites/system_info.js.erb b/app/views/admin/sites/system_info.js.erb
index 6e7a88c..6c72454 100644
--- a/app/views/admin/sites/system_info.js.erb
+++ b/app/views/admin/sites/system_info.js.erb
@@ -1,8 +1,8 @@
-$("<%= j(render :partial => 'user_action', :collection => @user_actions) %>").appendTo($("#user_actions"));
+$("#user_actions").html("<%= j(render :partial => 'user_action', :collection => @user_actions) %>");
$(".user-paginate").html("<%= j(paginate @user_actions, :remote => true) %>");
-$("<%= j(render :partial => 'mail_cron_log', :collection => @mail_cron_logs) %>").appendTo($("#mail_cron_logs"));
-$(".paginate").html("<%= j(paginate @mail_cron_logs, :remote => true) %>");
+// $("<%#= j(render :partial => 'mail_cron_log', :collection => @mail_cron_logs) %>").appendTo($("#mail_cron_logs"));
+// $(".paginate").html("<%#= j(paginate @mail_cron_logs, :remote => true) %>");
checkScroll();
$('.list-check').listCheck();
\ No newline at end of file
diff --git a/app/views/layouts/_left_menu.html.erb b/app/views/layouts/_left_menu.html.erb
index 17b7178..22a5691 100644
--- a/app/views/layouts/_left_menu.html.erb
+++ b/app/views/layouts/_left_menu.html.erb
@@ -2,7 +2,7 @@
-
+ style="background-image: url('<%= current_site. default_image.url %>');" <% end %> >
-
-
- <%= t(:desktop) %>
-
-
+ <% unless current_site.desktop_closed %>
+
+
+ <%= t(:desktop) %>
+
+
+ <% end%>
\ No newline at end of file
diff --git a/app/views/layouts/_right_menu.html.erb b/app/views/layouts/_right_menu.html.erb
index b541b67..23cca78 100644
--- a/app/views/layouts/_right_menu.html.erb
+++ b/app/views/layouts/_right_menu.html.erb
@@ -2,8 +2,9 @@
-
diff --git a/app/views/shared/_meta.html.erb b/app/views/shared/_meta.html.erb
index a00bb81..1f8a477 100644
--- a/app/views/shared/_meta.html.erb
+++ b/app/views/shared/_meta.html.erb
@@ -1,4 +1,4 @@
-
+<%= favicon_link_tag (current_site.favicon.blank? ? 'favicon.ico' : current_site.favicon.url) %>
diff --git a/config/application.rb b/config/application.rb
index b69975d..ca3b77a 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -18,15 +18,6 @@ module Orbit
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
- # require "#{Rails.root}/app/models/template.rb"
- # config.assets.paths << "#{Rails.root}/app/templates/*/css"
- require "#{Rails.root}/app/models/template.rb"
- Dir.glob("#{Rails.root}/app/templates/#{Template::KEY}").each do |path|
- config.assets.paths << "#{path}/assets/stylesheets"
- config.assets.paths << "#{path}/assets/javascripts"
- config.assets.paths << "#{path}/assets/images"
- config.assets.paths << "#{path}/assets/fonts"
- end
# tell the I18n library where to find your translations
I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
diff --git a/config/environment.rb b/config/environment.rb
index 015b484..138b167 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -12,6 +12,12 @@ if Site.count == 0
site.save
end
+if Site.first.template.nil?
+ site = Site.first
+ site.template = Dir.glob("#{Rails.root}/app/templates/#{Template::KEY}").first.split("/").last
+ site.save
+end
+
if Page.count == 0
home = Page.new
home.name_translations = {:en=>"home",:zh_tw=>"首頁"}
diff --git a/config/initializers/template.rb b/config/initializers/template.rb
new file mode 100644
index 0000000..291d59e
--- /dev/null
+++ b/config/initializers/template.rb
@@ -0,0 +1,6 @@
+Dir.glob("#{Rails.root}/app/templates/#{Site.first.template}").each do |path|
+ Rails.application.config.assets.paths << "#{path}/assets/stylesheets"
+ Rails.application.config.assets.paths << "#{path}/assets/javascripts"
+ Rails.application.config.assets.paths << "#{path}/assets/images"
+ Rails.application.config.assets.paths << "#{path}/assets/fonts"
+end
\ No newline at end of file
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 31b089a..6e7efc3 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -171,6 +171,7 @@ en:
bulletin: Announcement
page_context: Page
web_link: Link
+ page: Page
dashboard_: Dashboard
deadline: Deadline
default: Default
@@ -455,7 +456,7 @@ en:
anaytics_code: Google Analytics Code
description: Description
keywords: Keywords
- syntax: Google Search Syntax
+ syntax: Google Custom Search engine ID
search_: Search
search_engine: Search Engine
search_google: Search Google
@@ -479,7 +480,7 @@ en:
footer_help: Footer Guide
frontend_closed: Frontend Closed
frontend_open: Frontend Open
- enable_personal_desktop: Enable Personal Desktop
+ disable_personal_desktop: Disable Personal Desktop
header: Site header
info: Site information
keywords: Site keywords
@@ -614,10 +615,6 @@ en:
editing:
tag: Editing tag
- site:
- system_preference: System Preference
- settings: Site Settings
-
category_auth: Category Authorization
authorization: Authorization
module_authorization: Module Authorization
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index b284e19..e27ea56 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -1,107 +1,594 @@
zh_tw:
+
_locale: 中文
- en: 英文
zh_tw: 中文
- more: "更多"
- site_: 網站
- site_info: 基本資訊
- site_map: 網站地圖
- site_structure: 網站架構
- sitemap: 網站地圖
- site_name: 網站名稱
- submit: 送出
- mobile_settings: 行動設定
- modules: 網站模組
- name: 名稱
- search_engine: 搜尋引擎
- templates: 網站模版
- preference: 系統偏好
- update_manager: 更新管理員
- homepage: 首頁
- locale: 位置
- login: 登入
- logout: 登出
+ en: 英文
+ access:
+ denied:
+ ajax_401_error: 使用者已逾時或是登出,請重新登入
+ app:
+ not_authed_user: 拒絕存取,因你不是此應用程式授權使用者
+ not_manager: 拒絕存取,因你不是此應用程式管理員
+ not_sub_manager: 拒絕存取,因你不是此應用程式次管理員
+ not_admin: 拒絕存取,因你不是系統管理者
+ object: 拒絕存取,因你沒有權限
+ academic_info: 學術資訊
+ action: 操作
+ active: 啟用
+ ad:
+ chinese_1: 在套圖中出現次數 1次請輸入1
+ chinese_2: 輸入連結
+ chinese_3: 輸入標題
+ ab_fx: 轉場效果
+ add_link: 輸入參考連結
+ banner_best_size: 圖片最佳尺寸
+ best_size: 最佳尺寸
+ best_size_example: 如:500px x 300px
+ new_image: 新增輪播圖片
+ not_showing: 沒有顯示
+ picture_list: 圖片列表
+ sec_place_holder: 每張輪播圖片顯示秒數(3秒就請輸入3)
+ select_fx: 選擇效果
+ set_dates: 設定上架及下架時間
+ set_range: 設定時間期間
+ showing: 顯示中
+ success_destroy_ad_image: 刪除圖片成功
+ trans_unit_sec: 秒
+ transition_sec: 轉場單位時間
+ update_banner: 更新輪播
+ upload_pictures: 上傳圖片
+ widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}"
+ ad_banner: 廣告輪播
+ add: 新增
+ add_attribute_field: 新增欄位
+ add_image: 加入圖片
+ add_item: 新增項目
+ add_member: 新增成員
+ add_more: 可擴充欄位
+ address_modal:
+ city: 城市
+ country: 國家/地區
+ county: 縣市
+ default_title: 地址
+ street_address: 街道地址
+ zip: 郵遞區號
+ addthis_tools:
+ add_to_bookmark: 加入書籤
+ admin: 系統管理者
+ all: 全部
+ all_content: 所有內容
+ all_file: 所有檔案
+ all_member: 成員列表
+ all_plugin_summary: 所有學術資訊摘要
+ all_plugins: 所有學術資訊
+ always_display_title: 永遠顯示標題
+ apply_change: 套用變更
+ applying_change: 正在套用變更
+ app_auth:
+ list_setting_result: 授權列表
+ assigning_manager:
+ add_manager_fail: 新增管理員失敗
+ add_manager_ok: 新增管理員成功
+ assigning_sub_manager:
+ add_sub_manager_fail: 新增次管理員失敗
+ add_sub_manager_ok: 新增次管理員成功
+ can_not_add_this_user: 不能新增這個使用員
+ delete_manager:
+ fail: 刪除管理員失敗
+ success: 刪除管理員成功
+ delete_sub_manager:
+ fail: 刪除次管理員失敗
+ success: 刪除次管理員成功
+ failed_no_user: 失敗,不是使用者
+ operation_not_permitted: 拒絕操作
+ approval:
+ not_pass: 拒絕
+ not_pass_reason: 拒絕原因
+ pass: 已認可
+ setting: 審核設定
+ stat: 審核狀態
+ user_list: 使用者列表
+ approval_: 審核
+ approval_setting: 審核設定
+ asset: 資產
+ attributes: 屬性
+ auth:
+ add_manager: 新增管理員
+ add_sub_manager: 新增次管理員
+ add_to_block_list: 增加到封鎖名單
+ add_to_privilege_list: 增加到特許名單
+ all_member: 所有會員
+ auth_by: -由%{user_display_name}授權
+ by_role: 用戶狀態
+ by_sub_role: 次用戶狀態
+ author: 作者
+ authorization: 權限
+ back: 回上一步
+ basic: 基本
+ browse: 瀏覽
+ built_in: 內建
+ # calendar: 行事曆
cancel: 取消
+ cant_delete_self: 不可以刪除自己
+ cant_empty_star: 不能為空白 (*)
+ cant_revoke_self_admin: 不可以撤銷自己的管理狀態
+ categories: 類別
+ category: 類別
+ category_auth: 類別授權
+ change_applied: 變更套用完成
+ clear: 清除
+ close: 關閉
+ content: 內容
+ courses: 課程
+ create:
+ error:
+ link: 建立連結時出錯
+ page: 建立頁面時出錯
+ fail: 建立失敗
+ success:
+ asset_category: 資產類別已成功建立
+ co_author: 共同作者已成功建立
+ link: 連結已成功建立
+ page: 頁面已成功建立
+ paper: 使用者已建立成功
+ user: 使用者已成功建立
+ create_: 建立
+ cross_lang: 啟用單語系
+ data: 資料
+ date:
+ calendar: 紀年法
+ format: 格式
+ minguo_calendar:
+ after: 民國
+ before: 民前
+ first_year: 民國元年
+ month: 月
+ year: 年
+ range: 時間區段設定
+ tw_calendar: 民國
+ west_calendar: 西元
+ date_: 日期
dashboard:
bulletin: 公告
page_context: 頁面內容
web_link: 連結
page: 頁面
dashboard_: 儀表版
- server_usage: 主機負載
- traffic: 流量
- desktop: 桌面
- disable: 停用
- password: 密碼
- all: 全部
- add: 新增
- basic: 基本
- title: 標題
- url: 網址
- description: 描述
- new_: 新增
- category: 類別
- categories: 類別
- new_category: 新增類別
- tags: 標籤
- new_tag: 新增標籤
- authorization: 授權
- list_: 列表
- status: 狀態
- top: 置頂
- hot: 熱門
- hide: 隱藏
- is_top: 置頂
- is_hot: 熱門
- is_hidden: 隱藏
- close: 關閉
- clear: 清除
- create_: 建立
- start_date: 開始日期
- end_date: 結束日期
- last_modified: 最後修改者
- subtitle: 副標題
- content: 內容
- link: 連結
- file_: 檔案
- preview: 預覽
- image: 封面圖片
- member_: 成員
- help: 幫助
- frequency: 頻率
- edit: 編輯
+ deadline: 最後期限
+ default: 預設
+ default_css: 預設樣式表
+ default_widget:
+ caption:
+ typeA: 表格式排版,簡單明瞭呈現內容
+ typeB_style2: 一圖一文式,輸出欄位水平排列
+ typeB_style3: 一圖一文式,輸出欄位垂直排列,圖片在左方
+ typeB_style4: 一圖一文式,輸出欄位垂直排列,圖片在右方
+ typeC: 一圖多文式,輸出欄位垂直排列
+ data_source:
+ category: 資料來源:類別
+ tag: 資料來源:標籤
+ default_widget: 預設樣板
+ field_is_link: 連結
+ fields_: 前台輸出欄位
+ fields_order: 輸出欄位順序
+ fields_style: 輸出欄位樣式
+ name: 預設樣式
+ no_support_setting: 沒有可以使用的設定
+ no_value: 不設定(全部)
+ select_module_app: 套用模組
+ select_widget_ext_option: 模組延伸選項
+ select_widget_path: 外掛樣版選擇
+ select_widget_style: 排版樣式
+ widget_data_count: 顯示則數
+ delete:
+ file: 刪除檔案
+ success:
+ paper: 著作已刪除成功
delete_: 刪除
- total_visitors: 總計造訪人次
- monthly_traffic: 本月流量
- most_visited_page: 最多瀏覽頁面
- visitors_count: 造訪人次
- visitors_this_month: 本月造訪人次
- visitors_this_week: 本星期造訪人次
- visitors_this_year: 今年造訪人次
- visitors_today: 今日造訪人次
- recent_update: 近期更新
- all_content: 所有內容
- quantity: 數量
+ description: 描述
+ desktop: 桌面
+ disable: 關閉
+ disabled: 已關閉
+ dots: ●●●●●●
+ download: 下載
+ downloaded: 已下載
+ edit: 編輯
+ editing:
+ asset: 編輯資產
+ design: 編輯設計
+ link: 編輯連結
+ page: 編輯頁面
+ email: 電子郵件
+ email_log: 寄送紀錄
+ email_queue: 待寄送郵件
+ enable: 開啟
+ enabled_for: 啟用
+ end: 結束
+ end_date: 結束日期
+ errors:
+ at_least_one: 至少擁有一個值
+ field: 欄位
+ file:
+ size: 檔案大小
+ type: 檔案類型
+ upload: F上傳檔案
+ file_: 檔案
+ file_type: 檔案類型
+ followers: 訂閱者
+ forgot_password: 忘記密碼?
+ frequency: 頻率
+ front_page:
+ name_field_helper: 請輸入數字或英文,不可使用空白
+ select_app_url: 模組前台樣式
+ is_published: 是否公開
+ menu_enable_lang: 選單啓用語系
+ link_enable_lang: 連結生效語系
+ frontend_data_count: 前台顯示資料筆數
+ gallery: 相簿
+ gallery:
+ all: 全部
+ new: 新增
+ categories: 類別
+ groups: 群組
+ help: 幫助
+ hidden: 隱藏的
+ is_hidden: 隱藏
+ hide: 隱藏
hits: 點擊次數
- insert: 插入
- search_files: 搜尋檔案
- filename: 檔案名稱
- filemanager: 檔案管理員
- upload: 上傳
- start_upload: 開始上傳
- cancel_upload: 取消上傳
- add_files: 新增檔案
- size: 大小
- edit_file: 編輯檔案
- save: 儲存
+ homepage: 首頁
+ horizontal: 水平的
+ hot: 熱門
+ is_hot: 熱門
+ image: 圖片
+ images: images
+ info: 基本資料
+ initial: 預設值
+ install: 安裝
+ installed_modules: 已安裝模組
+ intro: 簡介
+ is_published: 已發佈
+ item: 項目
+ item_name: 名稱
+ javascripts: JavaScripts
+ key: 索引值
+ last_modified: 最後修改者
+ layout: 範本
+ link: 連結
+ list:
+ ad_banner: 廣告輪播列表
+ asset: 資產列表
+ info: 使用者資訊列表
+ link: 連結列表
+ purchase: 已購買項目列表
+ role: 使用者角色列表
+ user: 使用者列表
+ list_: 列表
+ list_lower: 列表
+ lists:
+ markups:
+ address: 地址欄位
+ checkbox: 多選
+ date: 日期
+ radio_button: 單選
+ select: 下拉選單
+ text_area: 文字輸入方塊
+ text_field: 文字輸入框
+ locale: 位置
+ login: 登入
+ logout: 登出
+ mail:
+ service_email: 網站管理員信箱
+ reply_email: 回信用信箱
+ address: 電子郵件地址
+ authentication: 電子郵件認證
+ domain: 電子郵件網域名稱
+ enable_starttls_auto: 啟用安全通訊
+ manager: 管理者
+ password: 密碼
+ port: 電子郵件傳輸埠
+ setting: 電子郵件設定
+ tls: 電子郵件TLS
+ user_name: 電子郵件帳號
+ mail_from_app: 寄送模組
+ mail_to: 收件者
+ mail_user: 寄件者
+ manager: 管理者
+ markup: 輸入模式
+ markup_options: 標註選項
+ markup_value: 標註值
+ me: 我
+ # member: 成員
+ member_: 成員
+ member_authorization: 成員權限
+ member_info: 基本資料表
+ member_registration: 註冊審核
+ member_role: 身份欄位
+ menu_enabled_for: 選單啟用
+ mobile_setting:
+ address: 聯絡地址
+ api_reminder: 開啟手機App開發用API
+ change: 更改
+ default_color: 預設顏色
+ enabled_reminder: "請注意若您的網頁模版若已採用適應性網頁設計(RWD),開啟此標準版手機版面後將取代原有的適應性網頁設計,您仍隨時能關閉此標準版手機版面"
+ mobile_site_icon: 手機版Icon圖示
+ or: 或
+ phone_number: 聯絡電話
+ remove_icon: 移除圖示
+ select_announcement_categories: 選擇公告顯示分類
+ select_image: 選擇圖片
+ select_orbit_bar_color: 選擇Orbit Bar顏色
+ mobile_settings: 行動設定
+ module: 模組
+ module_name:
+ category: 類別
+ tag: 標籤
+ modules: 網站模組
+ module_authorization: 模組授權
+ module_store: 模組商店
+ monthly_traffic: 本月流量
+ more_plus: 更多+
+ most_visited_page: 最多瀏覽頁面
+ multilingual: 多語系
+ name: 名稱
+ need_home: 你需要建立首頁
+ neutral_title: 中立標題
+ neutral_for: 中立
+ new:
+ asset: 新增資產
+ banner: 新增橫幅
+ design: 新增設計
+ info: 新增使用者資訊
+ link: 新增連結
+ page: 新增頁面
+ role: 新增身份
+ sub_role: 新增子身份
+ user: 新增使用者
+ new_: 新增
+ new_category: 新增類別
+ new_tag: 新增標籤
+ no_: "不是"
+ no_deadline: 沒有期限
+ nothing: "無"
+ object_auth:
+ a_object_must_have_only_one_object_auth_profile_for_each_action: ''
+ list_title_of_users: 授權列表
+ new_object_auth: 新增授權
+ off_upcase: "開啟"
+ on_upcase: "關閉"
+ options: 選項
+ or_lower: 或
+ organization: 組織
+ page: 頁面
page_content:
page: 頁面
-
-
- site:
- system_preference: 系統狀態
+ page_part_kinds:
+ module_widget: 外掛模塊
+ non: 沒有
+ public_r_tag: 系統模塊
+ text: 文字區域
+ passed: 通過審核
+ is_checked: 通過審核
+ password: 密碼
+ password_change: 更改密碼
+ password_confirmation: 確認密碼
+ password_current: 目前的密碼
+ pending: 待審核
+ is_pending: 待審核
+ personal_plugins:
+ author : "著作人"
+ edit_brief_intro : "編輯摘要"
+ brief_intro : "摘要"
+ complete_list : "完整列表"
+ frontend_page : "前台呈現"
+ phone_number: "電話"
+ picture: 圖片
+ placeholder: 欄位提示文字
+ please_wait: 請稍候
+ plugins: 學術資訊
+ postdate: 張貼日期
+ posted_by: 張貼人
+ preview: 預覽
+ preference: 系統偏好
+ preferences:
+ backend_open: 開啟後台給所有使用者
+ change: 更改
+ classification: 類別
+ frontend_open: "設定後, 前台將會開放給所有使用者."
+ favicon: 偏好圖示
+ icon: 圖示
+ language: 語系設定
+ lang_detection: 開啟使用者語系偵測
+ lang_enabled: 開啟語系
+ lang_default: 預設語系
+ nav_enabled: 開啟側欄導引
+ openness: 權限開放
+ orbitbar_theme: OrbitBar佈景主題
+ select_image: 選擇圖片
+ sidebar_nav: 側欄導引
+ system_email: 系統信箱
+ profile: 基本資料
+ publications: 著作
+ purchase: 購買
+ quantity: 數量
+ quick_edit: 快速編輯
+ recent_update: 近期更新
+ referral_in_links: 參考連結
+ register: 註冊
+ registered: 已註冊
+ rejected: 拒絕
+ is_rejected: 拒絕
+ rejected_reason: 拒絕原因:'
+ rejected_reason_empty: "拒絕核准, 沒有參考資訊"
+ related_links: 相關連結
+ role: 身份
+ role_field: 身份欄位
+ role_info: 身份資料
+ roles: 身份
+ ruling_site: 銳綸網站
+ rulingcom:
+ errors:
+ init:
+ app_page_noname: 未命名前台頁面
+ module_app_noname: 未命名模組
+ save_and_close: 儲存並關閉
+ search:
+ domains: Google搜尋網域
+ not_found: 沒有搜尋結果
+ result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料"
+ sitesearch: 全站搜尋
+ too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?"
+ unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆"
+ search_engines:
+ anaytics_code: Google分析追蹤程式碼
+ description: 網站描述
+ keywords: 網站關鍵字
+ syntax: Google搜尋語法設定
+ search_: 搜尋
+ search_engine: 搜尋引擎
+ search_google: 搜尋Google
+ setup_member: 會員設定
+ server_usage: 主機負載
+ select_all: 全選
+ show: 顯示
+ show_mode:
+ index: 檢索
+ summary: 摘要
+ thumbnail: 縮圖
+ sent_date: 寄送日期
+ settings: 基本設定
+ site:
+ frontend_closed: 前台關閉?
+ frontend_open: 開啟前台
+ backend_openness_on: 開啟開放式後台(訪客可遊覽)
+ mobile_api_openness_on: 開啟手機API
+ disable_personal_desktop: 關閉個人桌面
+ default_image: 預設圖像
+ description: 網站描述
+ description_help: 網站描述說明
+ footer: 網站頁尾
+ footer_help: 網站頁尾說明
+ header: 網站頁首
+ info: 網站資訊
+ keywords: 搜尋關鍵字
+ keywords_help: 關鍵字說明
+ language: 網站語言
+ mobile_version: 手機版
+ announcement: 公告
+ openness: 開放模式
+ search: 網站搜尋
+ search_help: 請輸入送交Google搜尋的參數
settings: 基本設定
-
+ sub_menu: 次選單
+ system_preference: 系統狀態
+ system_preference_:
+ tab_backups: 備份記錄
+ tab_commits: 程式版本
+ tab_summary: 總覽
+ tab_logs: 排程工作日誌
+ tab_send_reminders_log: 寄送提醒紀錄
+ summary:
+ code_update_at: 程式更新紀錄
+ disk_space: 硬碟空間
+ no_data: 沒有資訊
+ version: 版本
+ weekness_report: 弱點掃瞄資訊
+ terms_of_use: 使用規則
+ terms_of_use_content: 使用規則內容
+ terms_display_in_footer: 是否顯示於頁尾
+ title: 網站標題
+ title_help: 網站標題說明
+ site_: 網站
+ site_info: 基本資訊
+ site_map: 網站地圖
+ site_structure: 網站架構
+ sitemap: 網站地圖
+ site_name: 網站名稱
+ site_title_always_display: 網站標題將永遠顯示於瀏覽器頁籤、頁面標題將列於網站標題後方
+ sitemap_menu_in_header: 網站導覽顯示於頁首
+ size: 大小
+ start: 開始
+ start_date: 開始日期
+ statistics: 統計資訊
+ status: 狀態
+ structure: 結構
+ sub_manager: 次管理員
+ sub_role: 子身份
+ sub_role_field: 子身份欄位
+ sub_role_info: 子身份資料
+ subject: 主題
+ subtitle: 副標題
+ submit: 送出
+ submit_approval: 送出已核准
+ submit_user_list: 送出使用者列表
+ sure?: "您確定嗎?"
+ sys:
+ can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示"
+ limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}"
+ module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本"
+ not_previewable: "不支援預覽"
+ preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式"
+ sys_basic_form: 系統預設基本欄位
+ sys_basic_id_form: 系統帳號資料
+ system_info: 系統資訊
+ tag_cloud: 標籤雲
+ tags: 標籤
+ template: 樣版
+ templates: 網站模版
+ template_name: 樣版名稱
+ terms_of_use: 使用規則
+ text: 內文
+ theme: 套用頁面樣式
+ themes: 主題
+ this_action_can_not_be_restore: 刪除後將無法還原,您確定要刪除嗎?
+ title: 標題
+ to_search: 加入搜尋條件
+ to_show: 是否顯示於前台
+ top: 置頂
+ is_top: 置頂
+ total_visitors: 總計造訪人次
+ traffic: 流量
+ type: 欄位類型
+ unit_name: 單位名稱
+ unzip_success: 應用程式解壓縮成功,請重啟伺服器以套用應用程式
+ up_to_date: 最新版本
+ update:
+ error:
+ link: 更新連接時出錯
+ fail: 更新消息
+ success:
+ co_author: 共同作者已更新成功
+ content: 內容已更新成功
+ link: 連結已更新成功
+ page: 頁面已更新成功
+ paper: 著作已更新成功
+ user: 使用者已更新成功
+ success_: 使用者已更新成功
+ update_: 更新
+ update_at: 最後更新時間
+ update_manager: 更新管理員
+ update_manager_:
+ available_updates: 有可用更新
+ check_update: 檢查更新
+ checking_update: 檢查更新中
+ system_update: 安裝更新
+ update_done: 系統已是最新版本
+ update_faild: 更新失敗. 更新需要合併程式碼. 請登入伺服器手動進行更新.
+ update_history: 更新紀錄
+ update_status: 更新狀態
+ updating_orbit: 安裝更新中,請稍候.
+ restart_server: 重啟伺服器中,請稍候.
+ upload: 上傳
+ url: 網址
+ use_status: 使用狀態
+ user: 使用者
+ user_actions: 使用者Log
+ user_action:
+ time: 時間
+ name: 使用帳號
+ page: 頁面
+ ip: IP
+ request_method: Method
+ request_path: Path
users:
admin_change_password: 您不能在此處修改自己的密碼!
avatar: 大頭貼照
@@ -130,11 +617,14 @@ zh_tw:
user_id_error: 該使用者帳號已被使用
user_basic_id_form: 帳號資料
user_basic_data: 個人資料
-
- dots: ●●●●●●
- register: 註冊
- registered: 已註冊
-
- module: 模組
- module_name:
- category: 類別
+ version: 版本
+ vertical: 垂直的
+ view: 檢視
+ view_count: 查看次數
+ visitors_count: 造訪人次
+ visitors_this_month: 本月造訪人次
+ visitors_this_week: 本星期造訪人次
+ visitors_this_year: 今年造訪人次
+ visitors_today: 今日造訪人次
+ yes_: "是"
+ sort_number: 排序數
diff --git a/config/routes.rb b/config/routes.rb
index 4eb3a97..184f241 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -133,7 +133,20 @@ Orbit::Application.routes.draw do
- resources :designs
+ resources :designs do
+ collection do
+ get 'upload_package'
+ get 'delete'
+ post 'upload_package'
+ end
+ member do
+ post 'edit_file' => 'designs#edit_file'
+ post 'update_file' => 'designs#update_file'
+ post 'upload_image' => 'designs#upload_image'
+ end
+ end
+ get 'design_list' => 'designs#design_list'
+
get 'module_store' => 'module_store#index'
end
get ':page(/:page)(/:page)(/:page)', to: 'pages#show', constraints: KeywordConstraint.new