diff --git a/Gemfile b/Gemfile index 9520765..fd3868a 100644 --- a/Gemfile +++ b/Gemfile @@ -42,7 +42,7 @@ gem 'usagewatch_ext' gem 'ckeditor' gem 'unicorn' gem 'zhconv' - +gem 'time_difference' gem 'execjs' gem 'therubyracer' diff --git a/app/assets/javascripts/frontend.js b/app/assets/javascripts/frontend.js index 379f678..fa2e95a 100644 --- a/app/assets/javascripts/frontend.js +++ b/app/assets/javascripts/frontend.js @@ -1,7 +1,7 @@ (function($) { $("document").ready(function(){ // Get link data-attribute and make the banner clickable - $('.w-ad-banner__slide').not('[data-link=""]').addClass('cursor').on("click",function(){ + $('.w-ad-banner__slide').not('[data-link=""]').not(".youtube").addClass('cursor').on("click",function(){ window.open($(this).data("link"),"_blank"); }) }) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index dc3e5b4..b243590 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -75,10 +75,19 @@ class PagesController < ApplicationController end params[:url] = page.url categories = [] - page.categories.each do |c| - category = Category.find(c) rescue nil - if !category.nil? && !category.disable - categories << c + if page.module == "member" + page.categories.each do |c| + category = Role.find(c) rescue nil + if !category.nil? && !category.disabled + categories << c + end + end + else + page.categories.each do |c| + category = Category.find(c) rescue nil + if !category.nil? && !category.disable + categories << c + end end end categories = ["all"] if categories.blank? diff --git a/app/helpers/orbit_backend_helper.rb b/app/helpers/orbit_backend_helper.rb index 304fa29..73734d2 100644 --- a/app/helpers/orbit_backend_helper.rb +++ b/app/helpers/orbit_backend_helper.rb @@ -151,6 +151,10 @@ module OrbitBackendHelper end end + def user_authenticated_categories + @user_authenticated_categories + end + def is_user_sub_manager? @current_user_is_sub_manager end diff --git a/app/templates/orbit_bootstrap/assets/javascripts/app.js b/app/templates/orbit_bootstrap/assets/javascripts/app.js index c275461..a9dd1ed 100644 --- a/app/templates/orbit_bootstrap/assets/javascripts/app.js +++ b/app/templates/orbit_bootstrap/assets/javascripts/app.js @@ -30,9 +30,9 @@ // Necessary for Responsive images function bullEye() { - $(".bullseye").bullseye({ - fadeEffect: false - }); + // $(".bullseye").bullseye({ + // fadeEffect: false + // }); } // Adding class to submenu that has dropdown items diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss index fdb0a60..fbe663b 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss @@ -99,7 +99,7 @@ position: absolute; right: 1em; bottom: 1em; - z-index: 100; + z-index: 102; li { display: inline-block; @@ -158,4 +158,8 @@ opacity: 1; } } +} + +.cycle-slide-active{ + z-index: 101 !important; } \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2.html.erb b/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2.html.erb deleted file mode 100644 index bd835e9..0000000 --- a/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -
diff --git a/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2_video.html.erb b/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2_video.html.erb new file mode 100644 index 0000000..6b77a90 --- /dev/null +++ b/app/templates/orbit_bootstrap/modules/ad_banner/_ad_banner_widget2_video.html.erb @@ -0,0 +1,39 @@ + + \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/ad_banner/info.json b/app/templates/orbit_bootstrap/modules/ad_banner/info.json index 46a4917..bfc594d 100644 --- a/app/templates/orbit_bootstrap/modules/ad_banner/info.json +++ b/app/templates/orbit_bootstrap/modules/ad_banner/info.json @@ -9,10 +9,10 @@ "thumbnail" : "thumbnail-block.png" }, { - "filename" : "ad_banner_widget2", + "filename" : "ad_banner_widget2_video", "name" : { "zh_tw" : "2. 橫幅輪播 ( 圖片, 導航圖示 )", - "en" : "2. Carousel ( image, navigation )" + "en" : "2. Carousel ( image, navigation, video )" }, "thumbnail" : "thumbnail-block.png" }, diff --git a/app/templates/orbit_bootstrap/modules/calendar/index.html.erb b/app/templates/orbit_bootstrap/modules/calendar/index.html.erb new file mode 100644 index 0000000..abdd5cf --- /dev/null +++ b/app/templates/orbit_bootstrap/modules/calendar/index.html.erb @@ -0,0 +1,40 @@ +