Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9350533d11 | ||
|
|
6e39e4f240 | ||
|
|
e903bd0c39 | ||
|
|
3cd196e2a3 | ||
|
|
1eaa0f1801 | ||
|
|
822c23e841 | ||
|
|
ab94c79fdb | ||
|
|
d19223c873 | ||
|
|
77c00ac72f | ||
|
|
92f1f44e4b | ||
|
|
332658d394 | ||
|
|
e947af4c34 | ||
|
|
37e58cd780 | ||
|
|
2931676ecf | ||
|
|
e71a343718 | ||
|
|
a108426412 | ||
|
|
a154d16a7e |
No files matched your search
|
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 15 KiB |
@@ -38,6 +38,8 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$('.page_footer').append($('#last_update_date')[0]);
|
||||
});
|
||||
// Ad Banner FX code [end]
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
$(function() {
|
||||
$(".post_preview").click(function(){
|
||||
$("#main-wrap").after("<span id='show_preview'></span>");
|
||||
|
||||
var preview_url = $(this).attr('url');
|
||||
|
||||
$.post($(this).attr('url'), $(".previewable").serialize() ,function(data){
|
||||
$('#show_preview .modal').modal();
|
||||
$("form.previewable").ajaxSubmit({
|
||||
beforeSubmit: function(a,f,o){
|
||||
o.dataType = 'script';
|
||||
o.url = preview_url;
|
||||
o.type = 'post';
|
||||
},success: function(msg) {
|
||||
$('#show_preview .modal').modal()
|
||||
$('#show_preview .modal').height(function() {
|
||||
return $(window).height() * 0.7;
|
||||
});
|
||||
},'script');
|
||||
}});
|
||||
});
|
||||
$(".preview_trigger").click(function(){
|
||||
$("#main-wrap").after("<span id='show_preview'></span>");
|
||||
@@ -38,10 +45,10 @@ $(function() {
|
||||
// o.url = url.nodeValue;
|
||||
// o.type = 'post';
|
||||
// },success: function(msg) {
|
||||
// $('#show_preview .modal').modal()
|
||||
// $('#show_preview .modal').height(function() {
|
||||
// return $(window).height() * 0.7;
|
||||
// });
|
||||
// $('#show_preview .modal').modal()
|
||||
// $('#show_preview .modal').height(function() {
|
||||
// return $(window).height() * 0.7;
|
||||
// });
|
||||
// }
|
||||
|
||||
// });
|
||||
|
||||
@@ -179,6 +179,7 @@ div[data-role="page"] {
|
||||
}
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.content .orbit-cycle-slideshow img {
|
||||
width: 100%;
|
||||
@@ -325,13 +326,22 @@ div[id^="dialog"] .content {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@media(min-width:320px){
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 130px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 480px){
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 170px;
|
||||
}
|
||||
.content .newitem {
|
||||
width: 440px;
|
||||
}
|
||||
}
|
||||
@media(min-width:600px) {
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 200px;
|
||||
}
|
||||
.main-menu ul {
|
||||
width: 420px;
|
||||
}
|
||||
@@ -340,6 +350,9 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
}
|
||||
@media(min-width:768px) {
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 250px;
|
||||
}
|
||||
.main-menu ul {
|
||||
width: 480px;
|
||||
}
|
||||
@@ -351,6 +364,9 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
}
|
||||
@media(min-width:800px) {
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 330px;
|
||||
}
|
||||
.main-menu ul {
|
||||
width: 480px;
|
||||
}
|
||||
@@ -359,6 +375,9 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
}
|
||||
@media(min-width:961px) {
|
||||
.content .orbit-cycle-slideshow {
|
||||
height: 380px;
|
||||
}
|
||||
.main-menu ul {
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,48 @@
|
||||
class Admin::ModuleStoreController < OrbitBackendController
|
||||
|
||||
@@store = STORE_CONFIG[:store_settings]["url"]
|
||||
|
||||
def index
|
||||
@extensions = get_extensions
|
||||
end
|
||||
|
||||
def show
|
||||
@extension = get_extension(params[:id]) rescue nil
|
||||
end
|
||||
|
||||
def download
|
||||
#get extension related values
|
||||
extension = get_extension(params[:id]) rescue nil
|
||||
download_link = @@store + "/"+ extension["extension"]["extension"]["url"]
|
||||
downloaded_file_name = extension["extension_filename"]
|
||||
module_app_name = downloaded_file_name.split(/(.zip)/).first
|
||||
|
||||
#check if the directory exists or not
|
||||
@module_status = Dir.exists?("#{Rails.root}/vendor/built_in_modules/#{module_app_name}")
|
||||
if @module_status.eql?(true)
|
||||
flash[:notice] = "This module is already installed"
|
||||
else
|
||||
download_extension(download_link, downloaded_file_name,module_app_name)
|
||||
flash[:notice] = "This module has been successfully installed"
|
||||
end
|
||||
redirect_to admin_module_store_path
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_extensions
|
||||
JSON.parse(open("#{@@store}/api/extensions").read)
|
||||
end
|
||||
|
||||
def get_extension(id)
|
||||
JSON.parse(open("#{@@store}/api/extensions/#{id}").read)
|
||||
end
|
||||
|
||||
def download_extension(download_link, downloaded_file_name,module_app_name)
|
||||
puts %x(wget "#{download_link}")
|
||||
puts %x(unzip "#{downloaded_file_name}")
|
||||
puts %x(mv #{module_app_name} "#{Rails.root}/vendor/built_in_modules/")
|
||||
puts %x(rm "#{downloaded_file_name}")
|
||||
site_restart
|
||||
end
|
||||
end
|
||||
@@ -36,6 +36,26 @@ class Admin::PagesController < Admin::ItemsController
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
if @item.update_attributes(params[:page])
|
||||
unless params[:page]['frontend_field'].nil?
|
||||
frontend_class = []
|
||||
frontend_field_name = []
|
||||
frontend_sat_to_link = []
|
||||
|
||||
params[:page]['frontend_field'].each do |field|
|
||||
frontend_class << field['class']
|
||||
frontend_field_name << field['field_name']
|
||||
frontend_sat_to_link << field['sat_to_link']
|
||||
end
|
||||
|
||||
@item['frontend_class'] = frontend_class
|
||||
@item['frontend_field_name'] = frontend_field_name
|
||||
@item['frontend_sat_to_link'] = frontend_sat_to_link
|
||||
end
|
||||
|
||||
@item['tag'] = params[:page]['tag'] == nil ? [] : params[:page]['tag']
|
||||
|
||||
@item.save
|
||||
|
||||
render 'admin/items/reload_items'
|
||||
else
|
||||
@error = error_messages_for(@item)
|
||||
|
||||
@@ -72,7 +72,10 @@ class Admin::SitesController < OrbitBackendController
|
||||
end
|
||||
|
||||
def system_info
|
||||
|
||||
@disk_free = `df -h /`.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
|
||||
@linux_version = `lsb_release -d`.split(":")[1].html_safe
|
||||
end
|
||||
|
||||
def search_engine
|
||||
|
||||
@@ -1,22 +1,95 @@
|
||||
require 'net/http'
|
||||
require 'uri'
|
||||
require 'fileutils'
|
||||
require 'zip/zip'
|
||||
class Admin::TemplateStoreController < OrbitBackendController
|
||||
|
||||
|
||||
@@store_domain = "http://store.tp.rulingcom.com"
|
||||
@@store_domain = STORE_CONFIG[:store_settings]["url"]
|
||||
def index
|
||||
@store = @@store_domain
|
||||
@design_ids = Design.all.map{|d| d.template_store_id}
|
||||
@templates = JSON.parse(get_templates)
|
||||
end
|
||||
|
||||
def show
|
||||
@store = @@store_domain
|
||||
@design_ids = Design.all.map{|d| d.template_store_id}
|
||||
@template = JSON.parse(get_template(params[:id])) rescue nil
|
||||
end
|
||||
|
||||
def download_theme
|
||||
render :json => {"success"=>true}.to_json
|
||||
url = @@store_domain + params["url"]
|
||||
url_base = url.split('/')[2]
|
||||
url_path = '/'+url.split('/')[3..-1].join('/')
|
||||
Net::HTTP.start(url_base) do |http|
|
||||
open("public/#{params['slug']}.zip", "wb") do |file|
|
||||
http.get(url_path) do |str|
|
||||
file.write(str)
|
||||
end
|
||||
end
|
||||
end
|
||||
upload_package("#{params['slug']}.zip", params["id"])
|
||||
File.delete("public/#{params['slug']}.zip")
|
||||
render :json => {"success"=>true,"url"=>@@store_domain + params["url"]}.to_json
|
||||
end
|
||||
protected
|
||||
|
||||
def upload_package(package_name,template_store_id)
|
||||
|
||||
temp_file = Tempfile.new("temp_file")
|
||||
original_file = File.open("#{Rails.root}/public/#{package_name}")
|
||||
temp_file.write(original_file.read.force_encoding('UTF-8'))
|
||||
temp_file.rewind
|
||||
filename = File.basename(original_file,".zip")
|
||||
unzip_design(temp_file, filename, template_store_id)
|
||||
temp_file.close
|
||||
|
||||
end
|
||||
|
||||
def unzip_design(file, zip_name, template_store_id)
|
||||
Zip::ZipFile.open(file) { |zip_file|
|
||||
design = Design.new.from_json(zip_file.read("#{zip_name}/info.json"))
|
||||
design.template_store_id = template_store_id
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
themes_entries = []
|
||||
javascripts_entries = []
|
||||
images_entries = []
|
||||
|
||||
zip_file.entries.each do |entry|
|
||||
case (path = entry.to_s)
|
||||
when /\A(#{zip_name})\/(default\.css)\z/ #for default css
|
||||
design.build_css_default(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(reset\.css)\z/ #for reset css
|
||||
design.build_css_reset(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(layout\.html)\z/ #for layout html
|
||||
design.build_layout(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(themes)\/.*(\.css)\z/ #for themes css
|
||||
themes_entries << entry
|
||||
when /\A(#{zip_name})\/(javascripts)\/.*(\.js)\z/ #for js
|
||||
javascripts_entries << entry
|
||||
when /\A(#{zip_name})\/(images)\/.*((\.jpg)|(\.png)|(\.gif))\z/ #for img
|
||||
images_entries << entry
|
||||
end
|
||||
end
|
||||
|
||||
['themes', 'javascripts', 'images'].each do |type|
|
||||
eval("#{type}_entries").each do |entry|
|
||||
eval("design.#{type}").build(:file => get_temp_file(zip_file, dir, entry))
|
||||
end
|
||||
end
|
||||
}
|
||||
design.save
|
||||
}
|
||||
end
|
||||
|
||||
def get_temp_file(zip_file, dir, entry)
|
||||
filename = File.basename(entry.to_s)
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
temp_file
|
||||
end
|
||||
|
||||
def get_template(id)
|
||||
uri = URI.parse("#{@@store_domain}/api/templates/#{id}")
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
@@ -33,6 +106,4 @@ class Admin::TemplateStoreController < OrbitBackendController
|
||||
response.body
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
@@ -2,6 +2,7 @@ class PagesController < ApplicationController
|
||||
include ApplicationHelper
|
||||
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
||||
before_filter :check_frontend_open, :only => [:index,:show]
|
||||
before_filter :get_last_update_date, :only => [:index,:show]
|
||||
# caches_page :index
|
||||
|
||||
def index
|
||||
@@ -197,8 +198,8 @@ class PagesController < ApplicationController
|
||||
else
|
||||
model = params[:app_action].classify.constantize rescue nil
|
||||
if !model.nil?
|
||||
item = model.find(params[:id])
|
||||
@item = Item.where(:category => [item.category_id.to_s]).first if !module_app.has_category.blank?
|
||||
item = model.where(:_id=>params[:id]).first
|
||||
@item = Item.where(:category => [item.category_id.to_s]).first if !module_app.has_category.blank? and !item.blank?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -226,4 +227,8 @@ class PagesController < ApplicationController
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
def get_last_update_date
|
||||
@last_update_date = t(:total_visitors)+' : '+ Impression.count.to_s+' | '+t(:update_at)+' : '+Bulletin.order_by(:updated_at.desc).limit(1).first[:updated_at].to_s
|
||||
end
|
||||
end
|
||||
@@ -193,8 +193,8 @@ module ApplicationHelper
|
||||
stylesheets = ''
|
||||
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='#{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='#{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
|
||||
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
|
||||
stylesheets << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />\n" if theme
|
||||
|
||||
@@ -271,17 +271,31 @@ module OrbitBackendHelper
|
||||
# TODO: links to other actions
|
||||
# ===============================================================
|
||||
def footer(args={})
|
||||
|
||||
if args[:link_name]
|
||||
link_name = args[:link_name]
|
||||
else
|
||||
link_name = content_tag(:i, nil, :class => 'icon-plus') + ' ' + t(:add)
|
||||
end
|
||||
|
||||
paginate = args.has_key?(:paginate) ? args[:paginate] : true
|
||||
link = (is_manager? || is_sub_manager? rescue nil) && args.has_key?(:link) ? true : false
|
||||
if paginate || link
|
||||
@index_footer = content_tag :div, class: "bottomnav clearfix" do
|
||||
concat content_tag :div, link_to(content_tag(:i, nil, :class => 'icon-plus') + ' ' + t(:add), args[:link].blank? ? '#' : send(args[:link]), :class => (args[:link_class] || 'btn btn-primary'), data: args[:link_data]), class: "action pull-right" if link
|
||||
concat content_tag :div, link_to(link_name, args[:link].blank? ? '#' : send(args[:link]), :class => (args[:link_class] || 'btn btn-primary'), data: args[:link_data]), class: "action pull-right" if link
|
||||
concat content_tag :div, paginate(@objects, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]}), class: "pagination pagination-centered" if paginate
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_quick_link(quick, object, authorization, approvable)
|
||||
|
||||
if !quick[:link_option].blank?
|
||||
link_option = ",#{quick[:link_option]}"
|
||||
else
|
||||
link_option = ""
|
||||
end
|
||||
|
||||
case quick[:type]
|
||||
when 'approval'
|
||||
if show_approval_link(object)
|
||||
@@ -293,12 +307,12 @@ module OrbitBackendHelper
|
||||
end
|
||||
when 'edit'
|
||||
if authorization && approvable
|
||||
content_tag :li, link_to(t(quick[:translation] || :edit), quick[:link].nil? ? '#' : eval("#{quick[:link]}('#{object.id}')"), class: quick[:class], data: eval("#{quick[:data]}"))
|
||||
content_tag :li, link_to(t(quick[:translation] || :edit), quick[:link].nil? ? '#' : eval("#{quick[:link]}('#{object.id}'#{link_option})"), class: quick[:class], data: eval("#{quick[:data]}"))
|
||||
end
|
||||
when 'delete'
|
||||
if show_delete_link(object)
|
||||
@delete_options = {title: quick[:title], warning: quick[:warning], cancel: quick[:cancel], submit: quick[:submit]}
|
||||
content_tag :li, link_to(t(quick[:translation] || :delete_), '#', rel: eval("#{quick[:link]}('#{object.id}')"), class: "delete #{quick[:class] || 'text-error'}")
|
||||
content_tag :li, link_to(t(quick[:translation] || :delete_), '#', rel: eval("#{quick[:link]}('#{object.id}'#{link_option})"), class: "delete #{quick[:class] || 'text-error'}")
|
||||
end
|
||||
when 'detail'
|
||||
content_tag :li, link_to(t(quick[:translation] || :detail), '#', class: (quick[:class] || "detail-row"))
|
||||
@@ -307,7 +321,17 @@ module OrbitBackendHelper
|
||||
content_tag :li, link_to(t(quick[:translation] || :rejected_reason) + ' ' + truncate(object.not_checked_reason, :length => 10), '#', rel: "tooltip", 'data-original-title' => (wrap_string_with(object.not_checked_reason, :line_width => 24)), class: "reject_info #{quick[:class]}")
|
||||
end
|
||||
else
|
||||
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:link]}('#{object.id}')"), class: quick[:class])
|
||||
if quick[:define_link]
|
||||
if quick[:condition_option]
|
||||
if eval("#{quick[:condition_option]}")
|
||||
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:define_link]}"), class: quick[:class])
|
||||
end
|
||||
else
|
||||
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:define_link]}"), class: quick[:class])
|
||||
end
|
||||
else
|
||||
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:link]}('#{object.id}')"), class: quick[:class])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -419,6 +443,10 @@ module OrbitBackendHelper
|
||||
res << "<li class='active'>#{t(:search_engine)}</li>"
|
||||
when 'site_info'
|
||||
res << "<li class='active'>#{t(:site_info)}</li>"
|
||||
when 'update_manager'
|
||||
res << "<li class='active'>#{t(:update_manager)}</li>"
|
||||
when 'system_info'
|
||||
res << "<li class='active'>#{t("site.system_preference")}</li>"
|
||||
end
|
||||
when 'items'
|
||||
res << "<li class='active'>#{t(:structure)}</li>"
|
||||
|
||||
@@ -2,28 +2,30 @@ class CronMail < ActionMailer::Base
|
||||
default :from => "orbit_test@rulingcom.com"
|
||||
|
||||
def get_settings
|
||||
# @@smtp_settings = {
|
||||
# :address => "smtp.gmail.com",
|
||||
# :port => '587',
|
||||
# :domain => "smtp.gmail.com",
|
||||
# :authentication => "plain",
|
||||
# :user_name => "redmine@rulingcom.com",
|
||||
# :password => "rulingredmine",
|
||||
# :tls => true,
|
||||
# :enable_starttls_auto => true
|
||||
# }
|
||||
@@smtp_settings = {
|
||||
:address => @site['mail_settings']['address'],
|
||||
:port => @site['mail_settings']['port'],
|
||||
:domain => @site['mail_settings']['domain'],
|
||||
:authentication => @site['mail_settings']['authentication'],
|
||||
:user_name => @site['mail_settings']['user_name'],
|
||||
:password => @site['mail_settings']['password'],
|
||||
:tls => @site['mail_settings']['tls'],
|
||||
:enable_starttls_auto => @site['mail_settings']['enable_starttls_auto']
|
||||
@site = Site.first
|
||||
@@smtp_settings = {
|
||||
:enable_starttls_auto => @site['site_settings']['enable_starttls_auto'],
|
||||
:address => @site['site_settings']['address'],
|
||||
:port => @site['site_settings']['port'],
|
||||
:domain => @site['site_settings']['domain'],
|
||||
:authentication => @site['site_settings']['authentication'],
|
||||
:user_name => @site['site_settings']['user_name'],
|
||||
:password => @site['site_settings']['password']
|
||||
}
|
||||
end
|
||||
|
||||
def self.smtp_settings
|
||||
@site = Site.first
|
||||
@@smtp_settings = {
|
||||
:enable_starttls_auto => @site['site_settings']['enable_starttls_auto'],
|
||||
:address => @site['site_settings']['address'],
|
||||
:port => @site['site_settings']['port'],
|
||||
:domain => @site['site_settings']['domain'],
|
||||
:authentication => @site['site_settings']['authentication'],
|
||||
:user_name => @site['site_settings']['user_name'],
|
||||
:password => @site['site_settings']['password']
|
||||
}
|
||||
end
|
||||
|
||||
def time_check(msg)
|
||||
get_settings
|
||||
|
||||
@@ -7,6 +7,7 @@ class Design
|
||||
field :intro, :type => String
|
||||
field :title, :type => String
|
||||
field :version, :type => String
|
||||
field :template_store_id, :type => String
|
||||
|
||||
mount_uploader :zip_file, AssetUploader
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class AvatarUploader < CarrierWave::Uploader::Base
|
||||
# end
|
||||
|
||||
version :thumb do
|
||||
process :resize_to_fit => [80, 80]
|
||||
process :resize_to_fit => [200, 200]
|
||||
end
|
||||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
<li title="<%= t('update_manager') %>"><%= link_to admin_site_update_manager_path(@site), :class => active_for_action('sites', 'update_manager') do %><span><i class="icon-refresh"></i></span><%end%></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>
|
||||
<li title="<%= t("site.system_preference") %>"><%= link_to admin_site_system_info_path(@site), :class => active_for_action('sites', 'system_info') do %><span><i class="icons-info-2"></i></span><%end%></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</div>
|
||||
|
||||
@@ -14,8 +14,14 @@
|
||||
<%= javascript_include_tag 'lib/retina' %>
|
||||
<%= javascript_include_tag 'lib/mudole_templates_status' %>
|
||||
</head>
|
||||
<!--
|
||||
<% @extensions.each do |extension|%>
|
||||
<%=link_to extension["title"], admin_module_store_show_path(extension["_slugs"][0])%>
|
||||
<%end%> -->
|
||||
|
||||
<table id="mt-list" class="table main-list">
|
||||
<%= flash[:notice] rescue nil%>
|
||||
|
||||
<table id="mt-list" class="table main-list">
|
||||
<thead>
|
||||
<tr class="sort-header">
|
||||
<th class="first"><a href="#">Module Title</a></th>
|
||||
@@ -25,6 +31,38 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @extensions.each do |extension|%>
|
||||
<tr>
|
||||
<td class="detail-row">
|
||||
<div class="module_icon pull-left">
|
||||
<%= image_tag "module_icon.png"%>
|
||||
</div>
|
||||
<h5 class="mt_title"><span><%=link_to extension["title"], admin_module_store_show_path(extension["_slugs"][0])%></span></h5>
|
||||
<p class="mt_dev muted"><%=extension["author"]%></p>
|
||||
</td>
|
||||
<td class="detail-row">2013/07/12</td>
|
||||
<td>
|
||||
<%= extension["description"].html_safe%> <%= link_to 'Read More', admin_module_store_show_path(extension["_slugs"][0]) %>
|
||||
</td>
|
||||
<!-- <td class="active"><button class="act btn btn-mini" type="button">Uninstall</button></td>
|
||||
-->
|
||||
<% download_link = STORE_CONFIG[:store_settings]["url"] + "/"+ extension["extension"]["extension"]["url"]
|
||||
downloaded_file_name = extension["extension_filename"]
|
||||
module_app_name = downloaded_file_name.split(/(.zip)/).first
|
||||
@module_status = Dir.exists?("#{Rails.root}/vendor/built_in_modules/#{module_app_name}")
|
||||
%>
|
||||
<% if @module_status.eql?(true)%>
|
||||
<td class="active">Installed</td>
|
||||
<% else %>
|
||||
<td class="active"><%= link_to 'Download', admin_module_store_download_path(:id => extension["_slugs"][0]), :class=>"act btn btn-mini btn-success" %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<!--
|
||||
<tr>
|
||||
<td class="detail-row">
|
||||
<div class="module_icon pull-left">
|
||||
@@ -80,6 +118,5 @@
|
||||
@detail
|
||||
</td>
|
||||
<td class="active"><button class="act btn btn-mini btn-info" type="button">Update</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tr> -->
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="side">
|
||||
<div id="item-info">
|
||||
<img src="/assets/module/thumb/mt<%= params[:m] %>.jpg" alt="" class="item-thumb">
|
||||
<h2 class="item-name">Module Name</h2>
|
||||
<h2 class="item-name"><%= @extension.first["title"] %></h2>
|
||||
<a id="download" href="">free download</a>
|
||||
<ul class="item-extra-info">
|
||||
<li><span class="title">downloads</span><span class="count"><%= Random.new.rand(10..100) %></span></li>
|
||||
@@ -38,16 +38,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main clearfix">
|
||||
<h3>description</h3>
|
||||
<div id="desc-holder" class="paragraph">Pixel Union’s Jitensha defines storefront minimalism. Japanese for “bicycle,” Jitensha offers clean typography and easy usability, including full color, font, logo, and footer customization. With its painless social media and blog integration, Jitensha gorgeously accomodates every aspect of your business. Any questions before you launch? Don’t hesitate to email us: Support@PixelUnion.net.</div>
|
||||
<h3>Description</h3>
|
||||
<div id="desc-holder" class="paragraph"><%= @extension.first["description"].html_safe%></div>
|
||||
<h3>screen shot</h3>
|
||||
<div id="screen-shot">
|
||||
<div class="holder">
|
||||
<img src="" alt="Thumbnail 1" class="preview item-thumb">
|
||||
<img src="" alt="Thumbnail 2" class="preview item-thumb">
|
||||
<img src="" alt="Thumbnail 3" class="preview item-thumb">
|
||||
<img src="" alt="Thumbnail 4" class="preview item-thumb">
|
||||
<img src="" alt="Thumbnail 5" class="preview item-thumb">
|
||||
<%= image_tag "#{STORE_CONFIG[:store_settings]["url"]}/#{@extension.first['preview']['preview']['url']}"%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
<li title="<%= t('update_manager') %>"><%= link_to admin_site_update_manager_path(@site), :class => active_for_action('sites', 'update_manager') do %><span><i class="icon-refresh"></i></span><%end%></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>
|
||||
<li title="<%= t("site.system_preference") %>"><%= link_to admin_site_system_info_path(@site), :class => active_for_action('sites', 'system_info') do %><span><i class="icons-info-2"></i></span><%end%></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.domain' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil), :class=>"input-large", :placeholder=>"Domain" %>
|
||||
<%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil), :class=>"input-large", :placeholder=>"Domain" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
@@ -83,7 +83,7 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.password' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil), :class=>"input-large", :placeholder=>"Password" %>
|
||||
<%= f.password_field :password, :value => (@site['site_settings']['password'] rescue nil), :class=>"input-large", :placeholder=>"Password" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<h1><%= I18n.t("site.system_preference") %></h1>
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#summary" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_summary") %></a></li>
|
||||
<li><a href="#commits" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_commits") %></a></li>
|
||||
<li><a href="#backups" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_backups") %></a></li>
|
||||
<li><a href="#resque_logs" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_logs") %></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active in" id="summary">
|
||||
<h2><%= I18n.t("site.system_preference_.summary.disk_space") %>:</h2>
|
||||
<%= content_tag :p,@site.disk_space.gsub(/\n/,"<br />").html_safe if @site.disk_space %>
|
||||
<h2><%= I18n.t("site.system_preference_.summary.code_update_at") %>: </h2>
|
||||
<% @site.system_package_info.each do |index,value| %>
|
||||
<h2><%= index.titleize %> <%= I18n.t("site.system_preference_.summary.version") %>:</h2>
|
||||
<%= content_tag :p,value %>
|
||||
<% end %>
|
||||
<h2><%= I18n.t("site.system_preference_.summary.weekness_report") %>:<%= '' %></h2>
|
||||
</div>
|
||||
<div class="tab-pane" id="commits">
|
||||
<% if @git_commit_list_file %>
|
||||
<% @git_commit_list_file.lines do |line|%>
|
||||
<%= line %><br/>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="tab-pane" id="backups">
|
||||
<%if @db_backup_list_file %>
|
||||
<% @db_backup_list_file.lines do |line|%>
|
||||
<%=line %><br/>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="tab-pane" id="resque_logs">
|
||||
<%if @db_backup_list_file %>
|
||||
<% @resque_logs_file.lines do |line|%>
|
||||
<%=line %><br/>
|
||||
<% end if @resque_logs_file%>
|
||||
<%else %>
|
||||
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
});
|
||||
})
|
||||
});
|
||||
$(document).on('click', 'li .onoff', function () {
|
||||
$(document).on('click', 'li .map-block .onoff', function () {
|
||||
$(this).parents("li").toggleClass("disabled");
|
||||
if($(this).parents("li").attr("class").indexOf("disabled") > 0){
|
||||
$(this).text("<%= t('off_upcase') %>")
|
||||
|
||||
@@ -1,5 +1,159 @@
|
||||
<%= stylesheet_link_tag "lib/wrap-nav" %>
|
||||
<%= stylesheet_link_tag "lib/main-list" %>
|
||||
<%= stylesheet_link_tag "lib/main-forms" %>
|
||||
<%= stylesheet_link_tag "lib/fileupload.css" %>
|
||||
<%= stylesheet_link_tag "lib/togglebox.css" %>
|
||||
<%= stylesheet_link_tag "lib/list-check.css" %>
|
||||
|
||||
<%= javascript_include_tag "lib/site_set" %>
|
||||
<%= javascript_include_tag "lib/list-check" %>
|
||||
|
||||
<% 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 %>
|
||||
|
||||
system_info.html.erb
|
||||
<form class="form-horizontal main-forms">
|
||||
<fieldset>
|
||||
<div class="input-area">
|
||||
<div class="nav-name"><strong><%= t("preferences.classification") %></strong></div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<li class="active"><a href="#overview" data-toggle="tab"><%= t("site.system_preference_.tab_summary") %></a></li>
|
||||
<li><a href="#mail-cron-logs" data-toggle="tab"><%= t("site.system_preference_.tab_send_reminders_log") %></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<!-- Overview -->
|
||||
<div id="overview" class="tab-pane fade in active">
|
||||
<h3 class="muted"><%= t("site.system_preference_.summary.disk_space") %></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<%= @disk_free %>
|
||||
</p>
|
||||
</blockquote>
|
||||
<h3 class="muted">Nginx <%= t("site.system_preference_.summary.version") %></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<%= @nginx_version %>
|
||||
</p>
|
||||
</blockquote>
|
||||
</span>
|
||||
<h3 class="muted">MongoDB <%= t("site.system_preference_.summary.version") %></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<%= @mongo_version %>
|
||||
</p>
|
||||
</blockquote>
|
||||
<h3 class="muted">Linux <%= t("site.system_preference_.summary.version") %></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<%= @linux_version %>
|
||||
</p>
|
||||
</blockquote>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Email Log -->
|
||||
<div id="mail-cron-logs" class="tab-pane fade">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active">
|
||||
<a href="#send-log" data-toggle="tab"><%= t(:email_log) %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#waiting-sent" data-toggle="tab"><%= t(:email_queue) %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="send-log">
|
||||
<p class="">
|
||||
<a href="#" class="btn list-active-btn disabled" data-check-action="list-be-remove" rel="/panel/announcement/back_end/bulletins/delete"><i class="icons-trash"></i></a>
|
||||
</p>
|
||||
<table class="table main-list table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" class="list-check" name="to_delete[]" value="b" />
|
||||
</th>
|
||||
<th><%= t(:sent_date) %></th>
|
||||
<th><%= t(:subject) %></th>
|
||||
<th><%= t(:mail_to) %></th>
|
||||
<th><%= t(:mail_user) %></th>
|
||||
<th><%= t(:mail_from_app) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="list-check" name="to_delete[]" value="b" />
|
||||
</td>
|
||||
<td>2014-01-16 17:57</td>
|
||||
<td>【轉知】國家教育研究院辦理普通高級中學語文及社會領域課綱微調分區公聽會
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="#" class="text-error"><%= t(:delete_) %></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>alluser@tea.ntue.edu.tw</td>
|
||||
<td>蔣 欣潔</td>
|
||||
<td>er_email</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade in" id="waiting-sent">
|
||||
<p class="">
|
||||
<a href="#" class="btn list-active-btn disabled" data-check-action="list-be-remove" rel="/panel/announcement/back_end/bulletins/delete"><i class="icons-trash"></i></a>
|
||||
</p>
|
||||
<table class="table main-list table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" class="list-check" name="to_delete[]" value="b" />
|
||||
</th>
|
||||
<th>Sentdate</th>
|
||||
<th>Subject</th>
|
||||
<th>Mail To</th>
|
||||
<th>Mail User</th>
|
||||
<th>Mail From App</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="list-check" name="to_delete[]" value="b" />
|
||||
</td>
|
||||
<td>2014-01-16 17:57</td>
|
||||
<td>【轉知】國家教育研究院辦理普通高級中學語文及社會領域課綱微調分區公聽會
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="#" class="text-error"><%= t(:delete_) %></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>alluser@tea.ntue.edu.tw</td>
|
||||
<td>蔣 欣潔</td>
|
||||
<td>er_email</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><%= t(:sure?) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="text-warning text-center"><%= t(:this_action_can_not_be_restore) %></span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= t(:close) %></button>
|
||||
<button class="delete-item btn btn-danger"><%= t(:delete_) %></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,7 +60,11 @@
|
||||
<span class="item-price">Free</span>
|
||||
</span>
|
||||
</a>
|
||||
<%= link_to "Download", "javascript:void(0);", "data-url" => template['template']['template']['url'], :class=> 'btn btn-primary download-link' %>
|
||||
<% if @design_ids.include?(template["_id"]["$oid"]) %>
|
||||
<%= link_to "Installed", "javascript:void(0);", "data-url" => template['template']['template']['url'], :class=> 'btn btn-success download-link', "disabled"=>"disabled", "data-name"=>template['title'], "data-slug"=>template["_slugs"][0], "data-id"=>template["_id"]["$oid"] %>
|
||||
<% else %>
|
||||
<%= link_to "Download", "javascript:void(0);", "data-url" => template['template']['template']['url'], :class=> 'btn btn-primary download-link', "data-name"=>template['title'], "data-slug"=>template["_slugs"][0], "data-id"=>template["_id"]["$oid"] %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
@@ -71,20 +75,20 @@
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$("a.download-link").on(clickEvent,function(){
|
||||
var el = $(this),
|
||||
downloadurl = $(this).data("url");
|
||||
|
||||
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 : {"url" : downloadurl},
|
||||
data : el.data(),
|
||||
dataType : "json",
|
||||
type : "post",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
type : "post"
|
||||
}).done(function(data){
|
||||
if(data.success){
|
||||
el.removeClass('btn-info').addClass('btn-success').text("Installed");
|
||||
}
|
||||
}
|
||||
}).fail(function(){
|
||||
el.removeClass('btn-info').addClass('btn-danger').text("Error, please try again.").removeAttr('disabled');
|
||||
})
|
||||
})
|
||||
})()
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
<div id="item-info">
|
||||
<%= image_tag "#{@store}#{@template['preview']['preview']['thumb']['url']}", :class => "item-thumb" %>
|
||||
<h2 class="item-name"><%= @template['title'] %></h2>
|
||||
<%= link_to "Download", "javascript:void(0);", "data-url" => @template['template']['template']['url'], :class=> 'btn btn-primary download-link' %>
|
||||
<% if @design_ids.include?(@template["_id"]["$oid"]) %>
|
||||
<%= link_to "Installed", "javascript:void(0);", "data-url" => @template['template']['template']['url'], :class=> 'btn btn-success download-link', "disabled"=>"disabled", "data-name"=>@template['title'], "data-slug"=>@template["_slugs"][0], "data-id"=>@template["_id"]["$oid"] %>
|
||||
<% else %>
|
||||
<%= link_to "Download", "javascript:void(0);", "data-url" => @template['template']['template']['url'], :class=> 'btn btn-primary download-link', "data-name"=>@template['title'], "data-slug"=>@template["_slugs"][0], "data-id"=>@template["_id"]["$oid"] %>
|
||||
<% end %>
|
||||
<ul class="item-extra-info">
|
||||
<li><span class="title">views</span><span class="count"><%= Random.new.rand(10..100) %></span></li>
|
||||
<!-- <li><span class="title">color</span><span class="color-tag green"></span></li> -->
|
||||
@@ -64,21 +68,22 @@
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$("a.download-link").on(clickEvent,function(){
|
||||
var el = $(this),
|
||||
downloadurl = $(this).data("url");
|
||||
|
||||
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 : {"url" : downloadurl},
|
||||
data : el.data(),
|
||||
dataType : "json",
|
||||
type : "post",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
type : "post"
|
||||
}).done(function(data){
|
||||
if(data.success){
|
||||
el.removeClass('btn-info').addClass('btn-success').text("Installed");
|
||||
}
|
||||
}
|
||||
}).fail(function(){
|
||||
el.removeClass('btn-info').addClass('btn-danger').text("Error, please try again.").removeAttr('disabled');
|
||||
})
|
||||
})
|
||||
})()
|
||||
</script>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<ul class="nav nav-pills">
|
||||
<%= content_tag(:li, link_to(t(:edit),edit_admin_users_new_interface_path(user_for_listing))) if is_admin? %>
|
||||
<%= content_tag(:li, link_to(t("users.setting_privilege"),admin_users_new_interface_edit_privilege_path(user_for_listing))) if is_admin? and current_user.id != user_for_listing.id %>
|
||||
<%= content_tag(:li, link_to(t(:delete),admin_users_new_interface_path(user_for_listing, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"text-error", :remote => true)) if is_admin? %>
|
||||
<%= content_tag(:li, link_to(t(:delete_),admin_users_new_interface_path(user_for_listing, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"text-error", :remote => true)) if is_admin? %>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div id="sidebar-menu">
|
||||
<div class="scroller">
|
||||
<ul class="sidebar-nav">
|
||||
<% OrbitApp::Module::SideBarRegisition.all.each do |t| %>
|
||||
<% OrbitApp::Module::SideBarRegisition.all.sort{|x,y| x.get_module_app_key <=> y.get_module_app_key}.each do |t| %>
|
||||
<%= t.render_head(request, params, current_user, @module_app) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="sub-nav-block-list">
|
||||
<% OrbitApp::Module::SideBarRegisition.all.each do |t| %>
|
||||
<% OrbitApp::Module::SideBarRegisition.all.sort{|x,y| x.get_module_app_key <=> y.get_module_app_key}.each do |t| %>
|
||||
<%= t.render(request, params, current_user, @module_app) %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -41,5 +41,6 @@
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
<div id='last_update_date_wrap' style='display:none;'><div id='last_update_date'><%= @last_update_date %></div></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
function InsertPreviewImage(){
|
||||
if($("iframe").contents().find('.news_image').length){
|
||||
$("iframe").contents().find('.news_image').append("<a href='' target='_blank'><img src='"+preview_img+"' width='320' height='240' /></a>");
|
||||
$("iframe").contents().find('.news_image').append("<a href='' target='_blank'><img src='"+preview_img+"' width='320' /></a>");
|
||||
}else{
|
||||
setTimeout(InsertPreviewImage,1000);
|
||||
}
|
||||
|
||||
@@ -63,15 +63,5 @@ Orbit::Application.configure do
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.perform_deliveries = true
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
config.action_mailer.smtp_settings = {
|
||||
:enable_starttls_auto => true,
|
||||
:openssl_verify_mode => 'none',
|
||||
:address => 'smtp.sendgrid.net',
|
||||
:port => '587',
|
||||
:domain => "new.tp.rulingcom.com",
|
||||
:authentication => "plain",
|
||||
:user_name => "rulingcom",
|
||||
:password => "bjo4xjp6"
|
||||
}
|
||||
|
||||
end
|
||||
@@ -0,0 +1,2 @@
|
||||
data = File.open(File.join(Rails.root, 'config', 'store_config.yml')).read
|
||||
STORE_CONFIG = YAML::load(ERB.new(data).result(binding)).symbolize_keys
|
||||
@@ -86,7 +86,6 @@ en:
|
||||
user_list: Unit
|
||||
approval_: Approval
|
||||
approval_setting: Approval setting
|
||||
archive: Archive
|
||||
asset: Asset
|
||||
attributes: Attributes
|
||||
auth:
|
||||
@@ -193,6 +192,8 @@ en:
|
||||
link: Editing link
|
||||
page: Editing page
|
||||
email: Email
|
||||
email_log: Email Log
|
||||
email_queue: Waiting to be sent
|
||||
enable: Enable
|
||||
enabled_for: Enabled for
|
||||
end: End
|
||||
@@ -262,7 +263,6 @@ en:
|
||||
text_area: Text Area
|
||||
text_field: Text Field
|
||||
locale: Locale
|
||||
location: Location
|
||||
login: Login
|
||||
logout: Logout
|
||||
mail:
|
||||
@@ -276,6 +276,9 @@ en:
|
||||
setting: Mail settings
|
||||
tls: TLS
|
||||
user_name: User Name
|
||||
mail_from_app: Mail From App
|
||||
mail_to: Mail To
|
||||
mail_user: Mail User
|
||||
manager: Manager
|
||||
markup: Markup
|
||||
markup_options: Markup options
|
||||
@@ -426,6 +429,7 @@ en:
|
||||
index: Index
|
||||
summary: Summary
|
||||
thumbnail: Thumbnail
|
||||
sent_date: Sent Date
|
||||
settings: Site Setting
|
||||
site:
|
||||
backend_openness_on: Backend Openness
|
||||
@@ -456,6 +460,7 @@ en:
|
||||
tab_commits: Commits
|
||||
tab_summary: Summary
|
||||
tab_logs: Logs
|
||||
tab_send_reminders_log: Send reminders log
|
||||
summary:
|
||||
code_update_at: Code Update histroy
|
||||
disk_space: Disk Free
|
||||
@@ -485,6 +490,7 @@ en:
|
||||
sub_role: Sub Role
|
||||
sub_role_field: Sub Role Field
|
||||
sub_role_info: " Sub Role Info."
|
||||
subject: Subject
|
||||
subtitle: Subtitle
|
||||
submit: Submit
|
||||
submit_approval: Submit approval
|
||||
@@ -508,6 +514,7 @@ en:
|
||||
text: Text
|
||||
theme: Theme
|
||||
themes: Themes
|
||||
this_action_can_not_be_restore: This action can not be restored, are you sure you want to delete?
|
||||
title: Title
|
||||
to_search: Set as Search Key
|
||||
to_show: Display in frontend
|
||||
|
||||
@@ -86,7 +86,6 @@ zh_tw:
|
||||
user_list: 使用者列表
|
||||
approval_: 審核
|
||||
approval_setting: 審核設定
|
||||
archive: 檔案室
|
||||
asset: 資產
|
||||
attributes: 屬性
|
||||
auth:
|
||||
@@ -193,6 +192,8 @@ zh_tw:
|
||||
link: 編輯連結
|
||||
page: 編輯頁面
|
||||
email: 電子郵件
|
||||
email_log: 寄送紀錄
|
||||
email_queue: 待寄送郵件
|
||||
enable: 開啟
|
||||
enabled_for: 啟用
|
||||
end: 結束
|
||||
@@ -264,7 +265,6 @@ zh_tw:
|
||||
text_area: 文字輸入方塊
|
||||
text_field: 文字輸入框
|
||||
locale: 位置
|
||||
location: 地標
|
||||
login: 登入
|
||||
logout: 登出
|
||||
mail:
|
||||
@@ -278,6 +278,9 @@ zh_tw:
|
||||
setting: 電子郵件設定
|
||||
tls: 電子郵件TLS
|
||||
user_name: 電子郵件帳號
|
||||
mail_from_app: 寄送模組
|
||||
mail_to: 收件者
|
||||
mail_user: 寄件者
|
||||
manager: 管理者
|
||||
markup: 輸入模式
|
||||
markup_options: 標註選項
|
||||
@@ -428,6 +431,7 @@ zh_tw:
|
||||
index: 檢索
|
||||
summary: 摘要
|
||||
thumbnail: 縮圖
|
||||
sent_date: 寄送日期
|
||||
settings: 基本設定
|
||||
site:
|
||||
frontend_closed: 前台關閉?
|
||||
@@ -458,6 +462,7 @@ zh_tw:
|
||||
tab_commits: 程式版本
|
||||
tab_summary: 總覽
|
||||
tab_logs: 排程工作日誌
|
||||
tab_send_reminders_log: 寄送提醒紀錄
|
||||
summary:
|
||||
code_update_at: 程式更新紀錄
|
||||
disk_space: 硬碟空間
|
||||
@@ -487,6 +492,7 @@ zh_tw:
|
||||
sub_role: 子身份
|
||||
sub_role_field: 子身份欄位
|
||||
sub_role_info: 子身份資料
|
||||
subject: 主題
|
||||
subtitle: 副標題
|
||||
submit: 送出
|
||||
submit_approval: 送出已核准
|
||||
@@ -510,6 +516,7 @@ zh_tw:
|
||||
text: 內文
|
||||
theme: 套用頁面樣式
|
||||
themes: 主題
|
||||
this_action_can_not_be_restore: 刪除後將無法還原,您確定要刪除嗎?
|
||||
title: 標題
|
||||
to_search: 加入搜尋條件
|
||||
to_show: 是否顯示於前台
|
||||
|
||||
@@ -262,6 +262,7 @@ Orbit::Application.routes.draw do
|
||||
|
||||
match 'module_store' => 'module_store#index'
|
||||
match 'module_store/show' => 'module_store#show'
|
||||
match 'module_store/download' => 'module_store#download'
|
||||
match 'template_store' => 'template_store#index'
|
||||
match 'template_store/download_theme' => "template_store#download_theme"
|
||||
match 'template_store/template/:id' => 'template_store#show', :as => :template_store_template
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
store_settings:
|
||||
url: "http://store.tp.rulingcom.com"
|
||||
@@ -4,9 +4,13 @@ zh_tw:
|
||||
ad_banner: 廣告輪播
|
||||
banner: 橫幅
|
||||
banner_name: 橫幅名稱
|
||||
banner_name_note: 橫幅名稱只能為英文
|
||||
name_only_english: 橫幅名稱只能為英文
|
||||
edit_banner: 編輯橫幅
|
||||
enter_number: 請輸入數字
|
||||
enter_url: 請輸入網址
|
||||
ste: 轉換間隔時間
|
||||
ste_note: 請輸入秒數
|
||||
number_seconds: 請輸入秒數
|
||||
number_milliseconds: 請輸入毫秒數
|
||||
best_size: 最佳尺寸
|
||||
effect: 效果
|
||||
all: 全部
|
||||
@@ -16,3 +20,4 @@ zh_tw:
|
||||
size: 大小
|
||||
transition_interval: 轉換間隔時間
|
||||
transition_speed: 轉換速度
|
||||
type: 類型
|
||||
@@ -10,6 +10,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
end
|
||||
|
||||
def preview
|
||||
params['bulletin']['image'] = nil
|
||||
bulletin = Bulletin.new params
|
||||
@preview_obj = bulletin.to_preview
|
||||
@preview_obj.save
|
||||
|
||||
@@ -199,6 +199,7 @@ class Panel::Survey::BackEnd::SurveysController < OrbitBackendController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@survey.survey_questions.all.each do |question|
|
||||
new_question = @new_survey.survey_questions.new
|
||||
question.attributes.each do |key, value|
|
||||
@@ -210,30 +211,32 @@ class Panel::Survey::BackEnd::SurveysController < OrbitBackendController
|
||||
end
|
||||
end
|
||||
end
|
||||
question.survey_question_options.all.each do |option|
|
||||
new_option = new_question.survey_question_options.new
|
||||
option.attributes.each do |key, value|
|
||||
unless ['_id', 'survey_question_id'].include? key
|
||||
if option.respond_to?(key + '_translations')
|
||||
new_option.send(key + '_translations=', value)
|
||||
else
|
||||
new_option.write_attribute(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
question.survey_question_radiogroups.all.each do |radiogroup|
|
||||
new_radiogroup = new_question.survey_question_radiogroups.new
|
||||
radiogroup.attributes.each do |key, value|
|
||||
unless ['_id', 'survey_question_id'].include? key
|
||||
if radiogroup.respond_to?(key + '_translations')
|
||||
new_radiogroup.send(key + '_translations=', value)
|
||||
else
|
||||
new_radiogroup.write_attribute(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# question.survey_question_options.all.each do |option|
|
||||
# new_option = new_question.survey_question_options.new
|
||||
# option.attributes.each do |key, value|
|
||||
# unless ['_id', 'survey_question_id'].include? key
|
||||
# if option.respond_to?(key + '_translations')
|
||||
# new_option.name_translations = value
|
||||
# else
|
||||
# new_option.write_attribute(key, value)
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
# question.survey_question_radiogroups.all.each do |radiogroup|
|
||||
# new_radiogroup = new_question.survey_question_radiogroups.new
|
||||
# radiogroup.attributes.each do |key, value|
|
||||
# unless ['_id', 'survey_question_id'].include? key
|
||||
# if radiogroup.respond_to?(key + '_translations')
|
||||
# new_option.name_translations = value
|
||||
# else
|
||||
# new_radiogroup.write_attribute(key, value)
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
@new_survey.create_user_id = current_user.id
|
||||
|
||||