This commit is contained in:
BoHung Chiu 2022-07-11 11:03:14 +08:00
parent 6ce0270d0b
commit 1fb55becdf
4 changed files with 7 additions and 2 deletions

View File

@ -68,6 +68,9 @@ class CalendarsController < ApplicationController
subpartid = params[:subpart_id]
page = Page.where(page_id: subpartid).first
calendar_types = page.categories
if calendar_types.include?('all')
calendar_types = []
end
else
calendar_types = []
end

View File

@ -9,6 +9,7 @@ en:
save: Save
select_calendar: "Select Calendar"
categories: Categories
categories_management: Categories Management
new_category: New Category
all_day: All Day
note: Note

View File

@ -8,6 +8,7 @@ zh_tw:
save: 儲存
select_calendar: 選取行事曆
categories: 類別
categories_management: 類別管理
all_day: 全天
note: 註記
repeats: 重複

View File

@ -7,7 +7,7 @@ module Calendar
widget_methods ["widget"]
widget_settings [{"override_category_with"=>"calendar_type","multiselect"=>true,"display_field"=>"title"}]
taggable "Event"
categorizable
# categorizable
authorizable
frontend_enabled
data_count 1..10
@ -23,7 +23,7 @@ module Calendar
:priority=>1,
:active_for_action=>{'admin/calendars'=>'index'},
:available_for => 'users'
context_link 'new_',
context_link 'calendar.categories_management',
:link_path=>"admin_calendar_types_path" ,
:priority=>2,
:active_for_action=>{'admin/calendar_types'=>'index'},