Template loading & switching, Log user actions and more...

This commit is contained in:
manson 2014-05-20 10:31:44 +08:00
parent c6dfa3f9a0
commit 9243be1f21
31 changed files with 1000 additions and 160 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,9 +1,10 @@
class Admin::DashboardsController < OrbitAdminController class Admin::DashboardsController < ApplicationController
include OrbitBackendHelper
before_action :check_backend_openness
layout "basic_back_end" layout "basic_back_end"
def index def index
# check_backend_openness apps = ['bulletin', 'page', 'web_link']
apps = ['bulletin', 'page', 'page_context', 'web_link']
@module_app_contents, @module_app_contents_total = get_module_app_count(apps) @module_app_contents, @module_app_contents_total = get_module_app_count(apps)
@recent_updated = get_recently_updated(apps) @recent_updated = get_recently_updated(apps)
@most_visited = get_most_visited(apps) @most_visited = get_most_visited(apps)
@ -86,4 +87,13 @@ class Admin::DashboardsController < OrbitAdminController
sorted_objects[0..19] sorted_objects[0..19]
Kaminari.paginate_array(sorted_objects).page(params[:page]).per(5) Kaminari.paginate_array(sorted_objects).page(params[:page]).per(5)
end end
private
def check_backend_openness
if !current_site.backend_openness_on && current_user.blank?
redirect_to new_session_path
end
end
end end

View File

@ -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

View File

@ -18,13 +18,19 @@ class Admin::SitesController < OrbitAdminController
def sitemap def sitemap
end end
def change_design
@site.template = params[:design_key]
@site.save
restart_server
end
def system_info def system_info
@disk_free = `df -h /`.gsub("\n","<br/>").html_safe @disk_free = `df -h /`.gsub("\n","<br/>").html_safe
@nginx_version = %x[/opt/nginx/sbin/nginx -v 2>&1].gsub("\n","<br/>").html_safe @nginx_version = %x[/opt/nginx/sbin/nginx -v 2>&1].gsub("\n","<br/>").html_safe
@mongo_version = `mongod --version`.split("\n")[0].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) # @mail_crons = MailCron.desc(:created_at)
@ -87,14 +93,16 @@ class Admin::SitesController < OrbitAdminController
result = "failed" result = "failed"
else else
result = "success" 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 end
render :text => result render :text => result
end end
def restart_server def restart_server
render :text => "success" %x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
sleep 5
render :nothing => true
end end
private private

View File

@ -38,13 +38,17 @@ class ApplicationController < ActionController::Base
end end
def get_key def get_key
@key = Template::KEY @key = current_site.template
end end
def current_site def current_site
@current_site = Site.first @current_site = Site.first
end end
def frontent_allowed
current_user.nil? and !current_site.frontend_open
end
private private
def current_user def current_user

View File

@ -4,7 +4,7 @@ class OrbitAdminController < ApplicationController
include Authorize include Authorize
include OrbitBackendHelper include OrbitBackendHelper
before_action :authenticate_user before_action :authenticate_user, :log_user_action
layout "back_end" layout "back_end"
def sort def sort
@ -50,4 +50,21 @@ class OrbitAdminController < ApplicationController
end end
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 end

View File

@ -2,9 +2,10 @@
# data-layout-content="arrayname" in layouts can be used to render data in the array # data-layout-content="arrayname" in layouts can be used to render data in the array
class PagesController < ApplicationController class PagesController < ApplicationController
before_action :get_key before_action :get_key
layout :get_layout layout :get_layout
include PagesHelper include PagesHelper
before_filter :check_frontend_open, :only => [:home,:show]
def index def index
@pages = Page.all @pages = Page.all
@ -71,10 +72,10 @@ class PagesController < ApplicationController
# render render_final_page("#{module_app}/#{params[:target_action]}",page) # render render_final_page("#{module_app}/#{params[:target_action]}",page)
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
else 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
else 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 end
end end
@ -266,4 +267,10 @@ class PagesController < ApplicationController
return true if str == "true" return true if str == "true"
return false if str == "false" return false if str == "false"
end end
def check_frontend_open
if !current_site.frontend_open && current_user.blank?
redirect_to '/admin/dashboards'
end
end
end end

View File

@ -1,13 +1,13 @@
require "json" require "json"
module ApplicationHelper module ApplicationHelper
def render_widget(widget) def render_widget(widget)
key = Template::KEY key = current_site.template
file = File.join("../templates", "#{key}", "modules/#{widget}") file = File.join("../templates", "#{key}", "modules/#{widget}")
render :partial => file render :partial => file
end end
def render_partial(partial) def render_partial(partial)
key = Template::KEY key = current_site.template
file = File.join("../templates", "#{key}", "partial/#{partial}") file = File.join("../templates", "#{key}", "partial/#{partial}")
render :partial => file render :partial => file
end end
@ -33,7 +33,7 @@ module ApplicationHelper
item item
end end
@items = create_json(@pages) @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')) menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{key}", '/home/menu.html.erb'))
doc = Nokogiri::HTML(menu_file, nil, "UTF-8") doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
menu_file.close menu_file.close

View File

@ -13,7 +13,7 @@ module PagesHelper
def render_widget_for_frontend(controller_name, widget_method, widget_file) def render_widget_for_frontend(controller_name, widget_method, widget_file)
controller_name = controller_name.downcase.singularize 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) s = render_to_string(f)
doc = Nokogiri::HTML(s, nil, "UTF-8") doc = Nokogiri::HTML(s, nil, "UTF-8")
wrap_elements = doc.css("*[data-repeat]") wrap_elements = doc.css("*[data-repeat]")

View File

@ -22,12 +22,13 @@ class Site
field :mobile_on, :type => Boolean, :default => false field :mobile_on, :type => Boolean, :default => false
field :announcement_category, :type => Array, :default=>[] field :announcement_category, :type => Array, :default=>[]
field :mobile_bar_color, :type => Array, :default=>[] field :mobile_bar_color, :type => Array, :default=>[]
field :mobile_on, :type => Boolean, :default => false
field :phone_number, :type => Array,:default=>[] field :phone_number, :type => Array,:default=>[]
field :title_always_on, :type => Boolean, :default => false field :title_always_on, :type => Boolean, :default => false
field :sitemap_menu_in_header, :type => Boolean, :default => false field :sitemap_menu_in_header, :type => Boolean, :default => false
field :enable_terms_of_use, :type => Boolean, :default => false field :enable_terms_of_use, :type => Boolean, :default => false
field :search,:type => Hash field :search,:type => Hash
field :site_settings
field :template, type: String
mount_uploader :default_image, ImageUploader mount_uploader :default_image, ImageUploader
@ -37,6 +38,4 @@ class Site
I18n.locale = :en I18n.locale = :en
title.parameterize title.parameterize
end end
mount_uploader :default_image, ImageUploader
end end

View File

@ -10,6 +10,7 @@ class User
field :confirmation_token, type: String field :confirmation_token, type: String
field :reset_token, type: String field :reset_token, type: String
has_many :assets has_many :assets
has_many :user_actions, :dependent => :destroy
index({ confirmation_token: 1}, { unique: true }) index({ confirmation_token: 1}, { unique: true })

14
app/models/user_action.rb Normal file
View File

@ -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

View File

@ -16,7 +16,7 @@
<tbody> <tbody>
<% @recent_updated.each do |object| %> <% @recent_updated.each do |object| %>
<tr> <tr>
<td><%= (object[0].title rescue nil) || (object[0].page.title rescue nil) || (object[0].name rescue nil) %></td> <td><%= (object[0].title rescue nil) || (object[0].page.name rescue nil) || (object[0].name rescue nil) %></td>
<td><%= t("dashboard.#{object[0].class.to_s.underscore}") %></td> <td><%= t("dashboard.#{object[0].class.to_s.underscore}") %></td>
</tr> </tr>
<% end %> <% end %>

View File

@ -5,7 +5,7 @@
<section id="main-wrap"> <section id="main-wrap">
<div class="wrap-inner initial"> <div class="wrap-inner initial">
<div class="row-fluid"> <div class="row-fluid">
<% if is_admin? %> <% unless current_user.blank? %>
<div class="box span7"> <div class="box span7">
<div id='server_loading'> <div id='server_loading'>
<%= render 'server_loading' %> <%= render 'server_loading' %>

View File

@ -0,0 +1,11 @@
<tr>
<td class="detail-row">
<h5 class="mt_title"><span><%= design['title'] %></span></h5>
</td>
<td>
<p class="mt_dev"><%= design['author'] %></p>
</td>
<td class="active">
<%= 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']) %>
</td>
</tr>

View File

@ -0,0 +1,11 @@
<thead>
<tr class="sort-header">
<th class="first span4">Templates Title</th>
<th class="active span3">Designer</th>
<th class="span2">Status</th>
</tr>
</thead>
<tbody>
<tbody id="tbody_designs" class="sort-holder">
<%= render :partial => 'design', :collection => @designs %>
</tbody>

View File

@ -0,0 +1,233 @@
<head>
<%= 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' %>
<style type="text/css">
.container{
/*max-width: 600px;*/
}
.panel{
border-radius: 5px;
overflow: hidden;
border: 1px solid #DFDFDF;
background: #FFF;
box-shadow: 0px 0px 10px #CCC;
}
.break{
border-left: 1px solid #FCFCFC;
border-right: 1px solid #DDD;
padding: 10px 0;
margin: 0 15px;
}
.panel-heading{
font-size: 16px;
color: #666;
padding: 10px 20px;
height: 20px;
background-color: #fafafa;
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
*zoom: 1;
border-bottom: 1px solid #DDD;
}
.table{
margin: 0;
-webkit-border-radius: 5px;
border-radius: 5px;
}
/* .table td, .table th, .table .quick-edit{
vertical-align: middle;
text-align: center;
}
*/
/*.table td img{
background: #666;
border: 3px solid #AAA;
padding: 2px;
border-radius: 5px;
box-shadow: 0px 0px 10px #000 inset;
}
*/
.pannel-body{
min-height: 400px;
overflow: scroll;
overflow-x: hidden;
overflow-y: hidden;
padding: 15px;
}
.pannel-footer{
background: #f2f2f2; /* Old browsers */
background: -moz-linear-gradient(top, #f2f2f2 0%, #ffffff 76%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(76%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* IE10+ */
background: linear-gradient(to bottom, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f2f2', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
border: 1px solid #EEE;
border-top: 1px solid #CCC;
padding: 10px;
height: 30px;
}
#apply_change_btn{
display: none;
}
#alert_wrap{
display: none;
position: absolute;
width: 93%;
top: 30%;
z-index: 1045;
}
.alert{
width: 400px;
text-align: center;
z-index: 1050;
margin: 0 auto;
padding: 10px 0;
}
.modal-backdrop{
display: none;
}
.icons-faq:before{ content: "\e086"; }
.icons-ask:before { content: "\e062"; }
</style>
</head>
<%#= render 'filter' %>
<%#= flash[:notice] rescue nil%>
<div id="alert_wrap">
<div class="alert alert-success">
<h4><span id="module_msg_title">Please wait...</span></h4><br/>
<span id="module_msg_content">Theme changes taking effect</span><br/>
<%= image_tag("preloader.gif", size: "50") %>
</div>
</div>
<div class="container row-fluid">
<div class="span4">
<div class="panel">
<div class="panel-heading"><i class="icons-download"></i><span class="break"></span><%= t(:installed_templates) %></div>
<div class="pannel-body">
<table class="table table-striped">
<tbody id="extensions_table">
<%= render 'designs' %>
</tbody>
</table>
</div>
<div class="pannel-footer">
<button id="apply_change_btn" onclick="apply_change();" class="btn btn-primary btn-small pull-right">Appy Change</button>
</div>
</div>
</div>
<div class="span8 pull-right">
<div class="panel">
<div class="panel-heading"><i class="icon-shopping-cart"></i><span class="break"></span><%= t(:template_store) %></div>
<div class="pannel-body">
<table id="mt-list" class="table main-list">
<tbody>
<tr id="loading">
<td>
<%= image_tag("preloader.gif", size: "50") %>
<span>Loading template store...</span>
<td>
</tr>
</tbody>
</table>
</div>
<div class="pannel-footer">
</div>
</div>
</div>
</div>
<div class="modal-backdrop"></div>
</table>
<div class="form-actions form-fixed pagination-right">
<%#= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:upload), upload_package_admin_designs_path, :class => 'btn btn-primary pull-right' %>
</div>
<script type="text/javascript">
// $.ajax({
// url : "<%#= admin_template_store_path %>",
// type : "get",
// datatType : "html"
// }).done(function(data){
// $("#loading").addClass('hide');
// $("#mt-list").html(data);
// bindHandlers();
// }).fail(function(){
// $("#loading").addClass('hide');
// $("#mt-list").html("<tr><td>Error loading template store</td></tr>");
// })
$(document).on('change', '.design_default', function(){
$("#alert_wrap").show();
$(".modal-backdrop").show();
$(this).attr('value');
// console.log($(this).attr('rel') + '/' + $(this).val());
$.getScript($(this).attr('rel'),function(){
$("#alert_wrap").hide();
$(".modal-backdrop").hide();
});
});
var bindHandlers = function(){
// $("a.download-link").on(clickEvent,function(){
// if($(this).attr("disabled") == "disabled")return false;
// var el = $(this);
// el.removeClass("btn-primary").addClass("btn-info").text("Installing").attr('disabled',"disabled");
// $.ajax({
// url : "<%#= admin_template_store_download_theme_path %>",
// data : el.data(),
// dataType : "json",
// type : "post"
// }).done(function(data){
// if(data.success){
// el.removeClass('btn-info').addClass('btn-success').text("Installed");
// $.ajax({
// url: '<%= admin_design_list_path %>',
// type: 'get',
// dataType: 'html'
// })
// .done(function(data) {
// $("#tbody_designs").html(data);
// $(".toggle-check").togglebox();
// });
// }
// }).fail(function(){
// el.removeClass('btn-info').addClass('btn-danger').text("Error, please try again.").removeAttr('disabled');
// })
// })
}
</script>

View File

@ -1,5 +1,7 @@
<tr> <tr>
<td><%= user_action.created_at %></td> <td><%= user_action.created_at %></td>
<td><%= user_action.user.name %></td> <td><%= user_action.user.user_name %></td>
<td><%= user_action.page %></td> <td><%= user_action.remote_ip %></td>
<td><%= user_action.request_method %></td>
<td><%= user_action.request_path %></td>
</tr> </tr>

View File

@ -48,7 +48,7 @@
<!-- System Email --> <!-- System Email -->
<!-- <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> <%= f.fields_for :site_settings, @site['site_settings'] do |f| %>
<div id="system-email" class="tab-pane fade"> <div id="system-email" class="tab-pane fade">
@ -114,7 +114,7 @@
</div> </div>
</div> </div>
<% end %> --> <% end %>
<!-- Openness --> <!-- Openness -->
@ -132,7 +132,7 @@
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= I18n.t('site.enable_personal_desktop')%></label> <label class="control-label muted"><%= I18n.t('site.disable_personal_desktop')%></label>
<div class="controls"> <div class="controls">
<%= f.check_box :desktop_closed , :class=>"toggle-check", :data=> { disabled: true } %> <%= f.check_box :desktop_closed , :class=>"toggle-check", :data=> { disabled: true } %>
</div> </div>

View File

@ -54,17 +54,23 @@
<!-- User Actions --> <!-- User Actions -->
<div id="user-actions" class="tab-pane fade"> <div id="user-actions" class="tab-pane fade">
<h3 class="muted"><%= t("user_actions") %></h3> <h3 class="muted"><%= t("user_actions") %></h3>
<table class="table" id="user_actions"> <table class="table">
<tr> <thead>
<th><%= I18n.t 'user_action.time' %></th> <tr>
<th><%= I18n.t 'user_action.name' %></th> <th><%= I18n.t 'user_action.time' %></th>
<th><%= I18n.t 'user_action.page' %></th> <th><%= I18n.t 'user_action.name' %></th>
</tr> <th><%= I18n.t 'user_action.ip' %></th>
<%= render :partial => "user_action", :collection=> @user_actions%> <th><%= I18n.t 'user_action.request_method' %></th>
<th><%= I18n.t 'user_action.request_path' %></th>
</tr>
</thead>
<tbody id="user_actions">
<%= render :partial => "user_action", :collection=> @user_actions%>
</tbody>
</table> </table>
<div class="user-paginate text-center" style="display:none"> <div class="user-paginate text-center">
<%#= paginate @user_actions, :remote => true %> <%= paginate @user_actions, :remote => true %>
</div> </div>
</div> </div>

View File

@ -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) %>"); $(".user-paginate").html("<%= j(paginate @user_actions, :remote => true) %>");
$("<%= j(render :partial => 'mail_cron_log', :collection => @mail_cron_logs) %>").appendTo($("#mail_cron_logs")); // $("<%#= j(render :partial => 'mail_cron_log', :collection => @mail_cron_logs) %>").appendTo($("#mail_cron_logs"));
$(".paginate").html("<%= j(paginate @mail_cron_logs, :remote => true) %>"); // $(".paginate").html("<%#= j(paginate @mail_cron_logs, :remote => true) %>");
checkScroll(); checkScroll();
$('.list-check').listCheck(); $('.list-check').listCheck();

View File

@ -2,7 +2,7 @@
<!-- menu --> <!-- menu -->
<li id="orbit-start" class="dropdown"> <li id="orbit-start" class="dropdown">
<a class="orbitlogo" href="<%= admin_dashboards_path %>" role="button" class="dropdown-toggle" data-toggle="dropdown" title="<%= t('dashboard_')%>"></a> <a class="orbitlogo" href="<%= admin_dashboards_path %>" role="button" class="dropdown-toggle" data-toggle="dropdown" title="<%= t('dashboard_')%>" <% unless current_site.default_image.blank? %> style="background-image: url('<%= current_site. default_image.url %>');" <% end %> ></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-start"> <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-gauge') + ' ' + t(:dashboard_), admin_dashboards_path, tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + ' ' + t(:member_), admin_members_path, tabindex: '-1' %></li> <li><%= link_to content_tag(:i, nil, :class => 'icons-users') + ' ' + t(:member_), admin_members_path, tabindex: '-1' %></li>
@ -21,9 +21,11 @@
</li> </li>
<!-- Desktop --> <!-- Desktop -->
<li id="orbit-desktop"> <% unless current_site.desktop_closed %>
<a href="" role="button" title="<%= t('desktop')%>"> <li id="orbit-desktop">
<i class="icons-screen"></i> <span class="hide"><%= t(:desktop) %></span> <a href="" role="button" title="<%= t('desktop')%>">
</a> <i class="icons-screen"></i> <span class="hide"><%= t(:desktop) %></span>
</li> </a>
</li>
<% end%>
</ul> </ul>

View File

@ -2,8 +2,9 @@
<!-- search --> <!-- search -->
<li id="search" class="searchClear"> <li id="search" class="searchClear">
<form id="search_form" method="get" action="/site_search"> <form id="search_form" method="get" action="http://www.google.com/cse" target="_blank">
<%= text_field_tag 'q','', {:class => "search-query input-medium", :placeholder => "Search", 'x-webkit-speech' => ''} %> <input type="hidden" name="cx" value="<%= current_site.search['sitesearch'] %>">
<%= text_field_tag 'q', '', {:class => "search-query input-medium", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => ''} %>
</form> </form>
</li> </li>

View File

@ -1,4 +1,4 @@
<link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>"> <%= favicon_link_tag (current_site.favicon.blank? ? 'favicon.ico' : current_site.favicon.url) %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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="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-capable" content="yes">

View File

@ -18,15 +18,6 @@ module Orbit
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded. # -- 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 # tell the I18n library where to find your translations
I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')] I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]

View File

@ -12,6 +12,12 @@ if Site.count == 0
site.save site.save
end 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 if Page.count == 0
home = Page.new home = Page.new
home.name_translations = {:en=>"home",:zh_tw=>"首頁"} home.name_translations = {:en=>"home",:zh_tw=>"首頁"}

View File

@ -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

View File

@ -171,6 +171,7 @@ en:
bulletin: Announcement bulletin: Announcement
page_context: Page page_context: Page
web_link: Link web_link: Link
page: Page
dashboard_: Dashboard dashboard_: Dashboard
deadline: Deadline deadline: Deadline
default: Default default: Default
@ -455,7 +456,7 @@ en:
anaytics_code: Google Analytics Code anaytics_code: Google Analytics Code
description: Description description: Description
keywords: Keywords keywords: Keywords
syntax: Google Search Syntax syntax: Google Custom Search engine ID
search_: Search search_: Search
search_engine: Search Engine search_engine: Search Engine
search_google: Search Google search_google: Search Google
@ -479,7 +480,7 @@ en:
footer_help: Footer Guide footer_help: Footer Guide
frontend_closed: Frontend Closed frontend_closed: Frontend Closed
frontend_open: Frontend Open frontend_open: Frontend Open
enable_personal_desktop: Enable Personal Desktop disable_personal_desktop: Disable Personal Desktop
header: Site header header: Site header
info: Site information info: Site information
keywords: Site keywords keywords: Site keywords
@ -614,10 +615,6 @@ en:
editing: editing:
tag: Editing tag tag: Editing tag
site:
system_preference: System Preference
settings: Site Settings
category_auth: Category Authorization category_auth: Category Authorization
authorization: Authorization authorization: Authorization
module_authorization: Module Authorization module_authorization: Module Authorization

View File

@ -1,107 +1,594 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
en: 英文
zh_tw: 中文 zh_tw: 中文
more: "更多" en: 英文
site_: 網站 access:
site_info: 基本資訊 denied:
site_map: 網站地圖 ajax_401_error: 使用者已逾時或是登出,請重新登入
site_structure: 網站架構 app:
sitemap: 網站地圖 not_authed_user: 拒絕存取,因你不是此應用程式授權使用者
site_name: 網站名稱 not_manager: 拒絕存取,因你不是此應用程式管理員
submit: 送出 not_sub_manager: 拒絕存取,因你不是此應用程式次管理員
mobile_settings: 行動設定 not_admin: 拒絕存取,因你不是系統管理者
modules: 網站模組 object: 拒絕存取,因你沒有權限
name: 名稱 academic_info: 學術資訊
search_engine: 搜尋引擎 action: 操作
templates: 網站模版 active: 啟用
preference: 系統偏好 ad:
update_manager: 更新管理員 chinese_1: 在套圖中出現次數 1次請輸入1
homepage: 首頁 chinese_2: 輸入連結
locale: 位置 chinese_3: 輸入標題
login: 登入 ab_fx: 轉場效果
logout: 登出 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: 取消 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: dashboard:
bulletin: 公告 bulletin: 公告
page_context: 頁面內容 page_context: 頁面內容
web_link: 連結 web_link: 連結
page: 頁面 page: 頁面
dashboard_: 儀表版 dashboard_: 儀表版
server_usage: 主機負載 deadline: 最後期限
traffic: 流量 default: 預設
desktop: 桌面 default_css: 預設樣式表
disable: 停用 default_widget:
password: 密碼 caption:
all: 全部 typeA: 表格式排版,簡單明瞭呈現內容
add: 新增 typeB_style2: 一圖一文式,輸出欄位水平排列
basic: 基本 typeB_style3: 一圖一文式,輸出欄位垂直排列,圖片在左方
title: 標題 typeB_style4: 一圖一文式,輸出欄位垂直排列,圖片在右方
url: 網址 typeC: 一圖多文式,輸出欄位垂直排列
description: 描述 data_source:
new_: 新增 category: 資料來源:類別
category: 類別 tag: 資料來源:標籤
categories: 類別 default_widget: 預設樣板
new_category: 新增類別 field_is_link: 連結
tags: 標籤 fields_: 前台輸出欄位
new_tag: 新增標籤 fields_order: 輸出欄位順序
authorization: 授權 fields_style: 輸出欄位樣式
list_: 列表 name: 預設樣式
status: 狀態 no_support_setting: 沒有可以使用的設定
top: 置頂 no_value: 不設定(全部)
hot: 熱門 select_module_app: 套用模組
hide: 隱藏 select_widget_ext_option: 模組延伸選項
is_top: 置頂 select_widget_path: 外掛樣版選擇
is_hot: 熱門 select_widget_style: 排版樣式
is_hidden: 隱藏 widget_data_count: 顯示則數
close: 關閉 delete:
clear: 清除 file: 刪除檔案
create_: 建立 success:
start_date: 開始日期 paper: 著作已刪除成功
end_date: 結束日期
last_modified: 最後修改者
subtitle: 副標題
content: 內容
link: 連結
file_: 檔案
preview: 預覽
image: 封面圖片
member_: 成員
help: 幫助
frequency: 頻率
edit: 編輯
delete_: 刪除 delete_: 刪除
total_visitors: 總計造訪人次 description: 描述
monthly_traffic: 本月流量 desktop: 桌面
most_visited_page: 最多瀏覽頁面 disable: 關閉
visitors_count: 造訪人次 disabled: 已關閉
visitors_this_month: 本月造訪人次 dots: ●●●●●●
visitors_this_week: 本星期造訪人次 download: 下載
visitors_this_year: 今年造訪人次 downloaded: 已下載
visitors_today: 今日造訪人次 edit: 編輯
recent_update: 近期更新 editing:
all_content: 所有內容 asset: 編輯資產
quantity: 數量 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: 點擊次數 hits: 點擊次數
insert: 插入 homepage: 首頁
search_files: 搜尋檔案 horizontal: 水平的
filename: 檔案名稱 hot: 熱門
filemanager: 檔案管理員 is_hot: 熱門
upload: 上傳 image: 圖片
start_upload: 開始上傳 images: images
cancel_upload: 取消上傳 info: 基本資料
add_files: 新增檔案 initial: 預設值
size: 大小 install: 安裝
edit_file: 編輯檔案 installed_modules: 已安裝模組
save: 儲存 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_content:
page: 頁面 page: 頁面
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: site:
system_preference: 系統狀態 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: 基本設定 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: users:
admin_change_password: 您不能在此處修改自己的密碼! admin_change_password: 您不能在此處修改自己的密碼!
avatar: 大頭貼照 avatar: 大頭貼照
@ -130,11 +617,14 @@ zh_tw:
user_id_error: 該使用者帳號已被使用 user_id_error: 該使用者帳號已被使用
user_basic_id_form: 帳號資料 user_basic_id_form: 帳號資料
user_basic_data: 個人資料 user_basic_data: 個人資料
version: 版本
dots: ●●●●●● vertical: 垂直的
register: 註冊 view: 檢視
registered: 已註冊 view_count: 查看次數
visitors_count: 造訪人次
module: 模組 visitors_this_month: 本月造訪人次
module_name: visitors_this_week: 本星期造訪人次
category: 類別 visitors_this_year: 今年造訪人次
visitors_today: 今日造訪人次
yes_: "是"
sort_number: 排序數

View File

@ -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' get 'module_store' => 'module_store#index'
end end
get ':page(/:page)(/:page)(/:page)', to: 'pages#show', constraints: KeywordConstraint.new get ':page(/:page)(/:page)(/:page)', to: 'pages#show', constraints: KeywordConstraint.new