Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c93dceafde | ||
|
|
35ce0fda6e | ||
|
|
802ebbcdbe | ||
|
|
e8483bf4c5 | ||
|
|
3bac21647e | ||
|
|
2325086776 | ||
|
|
9178ebd793 | ||
|
|
fbb0bf6e04 | ||
|
|
c545c6f172 | ||
|
|
6040e63034 |
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 |
@@ -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;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,13 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def check_mobile_api_openness
|
||||
if !Site.first.mobile_api_openness_on
|
||||
redirect_to '/users/sign_in' if not (authenticate_user! and is_member? )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def site_restart
|
||||
Resque.enqueue(RestartServer)
|
||||
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
|
||||
@@ -188,9 +189,11 @@ class PagesController < ApplicationController
|
||||
@item = Item.where(:category => category_ids).first
|
||||
else
|
||||
if params[:action] && params[:action] == "show_from_link"
|
||||
model = params[:app_action].classify.constantize
|
||||
item = model.find(params[:id])
|
||||
@item = Item.where(:category => [item.category_id.to_s]).first
|
||||
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?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -214,4 +217,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
|
||||
@@ -14,6 +14,7 @@ class Site
|
||||
|
||||
field :frontend_open, :type => Boolean, :default => true
|
||||
field :backend_openness_on, :type => Boolean, :default => false
|
||||
field :mobile_api_openness_on, :type => Boolean, :default => false
|
||||
field :desktop_closed, :type => Boolean, :default => false
|
||||
field :sitemap_menu_in_header, :type => Boolean, :default => false
|
||||
field :enable_terms_of_use, :type => Boolean, :default => false
|
||||
|
||||
@@ -132,6 +132,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.mobile_version')%></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :mobile_on , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
<span class="help-block">Make API available for Mobile Apps</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Language -->
|
||||
|
||||
@@ -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>
|
||||
@@ -3,9 +3,7 @@
|
||||
<% end %>
|
||||
|
||||
<ul>
|
||||
<li>總機電話:<a href="tel:+886229393091">02-29393091</a></li>
|
||||
<li>傳真:02-29379611</li>
|
||||
<li>緊急重大事件通聯窗口:校內分機 66119、66110</li>
|
||||
<li>總值日室:<a href="tel:+88229387132">02-29387132</a></li>
|
||||
<li>駐警衛室:<a href="tel:+88229387129">02-29387129</a></li>
|
||||
<li>電話:<a href="tel:+886492563489">0492563489</a></li>
|
||||
<li>傳真:0492568302</li>
|
||||
<li>地址:南投縣草屯鎮中正路568號</li>
|
||||
</ul>
|
||||
@@ -5,6 +5,6 @@
|
||||
<div id='map_canvas'></div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var $map_center = "24.987449, 121.576117"
|
||||
var $map_center = "23.979724,120.696806"
|
||||
var $map_zoom = 17
|
||||
</script>
|
||||
@@ -386,6 +386,7 @@ en:
|
||||
thumbnail: Thumbnail
|
||||
site:
|
||||
backend_openness_on: Backend Openness
|
||||
mobile_api_openness_on: Mobile API Openness
|
||||
default_image: Site default image
|
||||
description: Site description
|
||||
description_help: Description Guide
|
||||
@@ -399,7 +400,7 @@ en:
|
||||
keywords: Site keywords
|
||||
keywords_help: Keyword Guide
|
||||
language: Site language
|
||||
mobile_version: Mobile version
|
||||
mobile_version: Enable Mobile Web
|
||||
openness: Openness
|
||||
search: Site Search
|
||||
search_help: Please Enter the search argument for Google search.
|
||||
|
||||
@@ -389,6 +389,7 @@ zh_tw:
|
||||
frontend_closed: 前台關閉?
|
||||
frontend_open: 開啟前台
|
||||
backend_openness_on: 開啟開放式後台(訪客可遊覽)
|
||||
mobile_api_openness_on: 開啟手機API
|
||||
enable_personal_desktop: 開啟個人桌面
|
||||
default_image: 預設圖像
|
||||
description: 網站描述
|
||||
|
||||
@@ -3,15 +3,18 @@ production:
|
||||
hostname: localhost
|
||||
port: 8982
|
||||
log_level: WARNING
|
||||
solr_home: solr
|
||||
|
||||
development:
|
||||
solr:
|
||||
hostname: localhost
|
||||
port: 8982
|
||||
log_level: INFO
|
||||
solr_home: solr
|
||||
|
||||
test:
|
||||
solr:
|
||||
hostname: localhost
|
||||
port: 8981
|
||||
log_level: WARNING
|
||||
solr_home: solr
|
||||
@@ -12,7 +12,9 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%if user_signed_in? && is_manager?%>
|
||||
<div class="modal-footer">
|
||||
<%= link_to t(:delete_), panel_calendar_new_back_end_event_path(@event),:class => "btn bt-del", :method => :delete, :remote => true %>
|
||||
<%= link_to t(:edit), edit_panel_calendar_new_back_end_event_path(@event),:class => "btn btn-primary",:id=>"edit_event_btn" ,:remote => true %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -48,18 +48,7 @@
|
||||
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
|
||||
<div id="event_create_space" class="modal" style="right: 8px; bottom: 50px; left: auto; top: auto; width: 400px; margin: 0;display:none;"></div>
|
||||
<div id="calendar-loading">Loading...</div>
|
||||
<div class="form-actions form-fixed">
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
</div>
|
||||
<%if is_manager?%>
|
||||
<div class="span4">
|
||||
<%= link_to "Add", new_panel_calendar_new_back_end_event_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var calendar = new Calendar("#calendar");
|
||||
</script>
|
||||
<%end%>
|
||||
@@ -1,5 +1,5 @@
|
||||
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
open_for_visitor :only => [:index, :show]
|
||||
open_for_visitor :only => [:index, :show, :get_album_json, :get_imgs_json, :imgs]
|
||||
open_for_manager :except => [:index,:show,:update]
|
||||
open_for_sub_manager :except => [:index, :show]
|
||||
|
||||
@@ -78,7 +78,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
tag_names = Array.new
|
||||
|
||||
album.tag_ids.each do |tag|
|
||||
tag_names << GalleryTag.find(tag)[I18n.locale]
|
||||
tag_names << get_tags.include?(tag)
|
||||
end
|
||||
if album.cover_path
|
||||
cover_path = album.cover_path
|
||||
@@ -105,7 +105,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
tags = Array.new
|
||||
|
||||
image.tag_ids.each do |tag|
|
||||
tags << GalleryTag.find(tag)[I18n.locale]
|
||||
tags << get_tags.include?(tag)
|
||||
end
|
||||
|
||||
output << {
|
||||
@@ -127,7 +127,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
@images.each do |values|
|
||||
tags = Array.new
|
||||
values.tag_ids.each do |tag|
|
||||
tags << GalleryTag.find(tag)[I18n.locale]
|
||||
tags << get_tags.include?(tag)
|
||||
end
|
||||
@output << { _id: values.id,
|
||||
theater_link: panel_gallery_back_end_album_image_path(values),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
include AdminHelper
|
||||
open_for_visitor :only => [:get_location_categories, :get_categorywise_locations]
|
||||
|
||||
def index
|
||||
@locations = LocationInfo.all
|
||||
@@ -89,4 +90,43 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
|
||||
def get_location_categories
|
||||
check_mobile_api_openness
|
||||
location_categories = get_categories_for_index
|
||||
@data = Array.new
|
||||
|
||||
location_categories.each do |category|
|
||||
I18n.locale = :en
|
||||
name_en = category.title
|
||||
I18n.locale = :zh_tw
|
||||
name_zh_tw = category.title
|
||||
category_id = category.id.to_s
|
||||
@data << { name_en: name_en, name_zh_tw: name_zh_tw, category_id: category_id, location_link: "http://#{request.host_with_port}"+"/#{panel_location_back_end_locations_get_categorywise_locations_path}"+"?category_id=#{category_id}"}
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
|
||||
def get_categorywise_locations
|
||||
check_mobile_api_openness
|
||||
location_infos = LocationInfo.where(:category_id => params[:category_id])
|
||||
@data = Array.new
|
||||
|
||||
location_infos.each do |location|
|
||||
|
||||
picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}"
|
||||
thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}"
|
||||
|
||||
@data << { id: location.id.to_s,
|
||||
name: location.name,
|
||||
pic_url: picurl,
|
||||
thumb_url: thumburl,
|
||||
longitude: location.longitude,
|
||||
latitude: location.latitude,
|
||||
description: location.description }
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
end
|
||||
@@ -3,6 +3,9 @@ Rails.application.routes.draw do
|
||||
namespace :location do
|
||||
namespace :back_end do
|
||||
match 'location_categories/list' => "location_categories#list"
|
||||
match "locations/get_locations" => "locations#get_locations"
|
||||
match "locations/get_categorywise_locations" => "locations#get_categorywise_locations"
|
||||
match "locations/get_location_categories" => "locations#get_location_categories"
|
||||
resources :location_categories
|
||||
match "locations/get_locations" => "locations#get_locations"
|
||||
match "locations/get_categories" => "locations#get_categories"
|
||||
|
||||