aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2018-01-24 19:55:56 -0800
committercedricnjanga2018-01-31 07:20:21 -0800
commitdd61691343892d502842341bc94ca8b355a716cc (patch)
tree289bce2b8e2b1b8b0fdd139e0dc3d31b85e0c8f7
parent6632217117a66bd09b2e8261e4351add9971d47c (diff)
downloadchouette-core-dd61691343892d502842341bc94ca8b355a716cc.tar.bz2
update calendar build_links for table builder
-rw-r--r--app/controllers/calendars_controller.rb1
-rw-r--r--app/helpers/table_builder_helper/url.rb6
-rw-r--r--app/views/calendars/index.html.slim10
3 files changed, 16 insertions, 1 deletions
diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb
index 6f1522428..61a62c285 100644
--- a/app/controllers/calendars_controller.rb
+++ b/app/controllers/calendars_controller.rb
@@ -1,4 +1,5 @@
class CalendarsController < ChouetteController
+ include WorkgroupSupport
include PolicyChecker
defaults resource_class: Calendar
before_action :ransack_contains_date, only: [:index]
diff --git a/app/helpers/table_builder_helper/url.rb b/app/helpers/table_builder_helper/url.rb
index 550b1e9d4..63a559162 100644
--- a/app/helpers/table_builder_helper/url.rb
+++ b/app/helpers/table_builder_helper/url.rb
@@ -3,7 +3,7 @@ module TableBuilderHelper
def self.polymorphic_url_parts(item, referential, workgroup)
polymorph_url = []
- unless item.is_a?(Referential) || item.is_a?(ComplianceControlSet)
+ unless item.is_a?(Calendar) || item.is_a?(Referential) || item.is_a?(ComplianceControlSet)
if referential
polymorph_url << referential
polymorph_url << item.line if item.respond_to? :line
@@ -21,10 +21,14 @@ module TableBuilderHelper
end
else
<<<<<<< HEAD
+<<<<<<< HEAD
polymorph_url << item.workgroup if item.respond_to? :workgroup
=======
polymorph_url << item.workgroup if item.is_a?(Calendar)
>>>>>>> First draft for including calendars into workgroup for having appropriate scoping
+=======
+ polymorph_url << item.workgroup if item.respond_to? :workgroup
+>>>>>>> update calendar build_links for table builder
polymorph_url << item
end
diff --git a/app/views/calendars/index.html.slim b/app/views/calendars/index.html.slim
index a2d6b4731..f7192bc01 100644
--- a/app/views/calendars/index.html.slim
+++ b/app/views/calendars/index.html.slim
@@ -1,4 +1,14 @@
+<<<<<<< HEAD
- breadcrumb :calendars, workgroup
+=======
+<<<<<<< HEAD
+- breadcrumb :calendars
+<<<<<<< HEAD
+=======
+=======
+- breadcrumb :calendars, current_workgroup
+>>>>>>> update calendar build_links for table builder
+>>>>>>> update calendar build_links for table builder
- content_for :page_header_actions do
- if policy(Calendar).create?
= link_to(t('actions.add'), new_workgroup_calendar_path(current_workgroup), class: 'btn btn-default')