From 1dc3b43b5df4cb3590589b7d01ffb86cfe344d3c Mon Sep 17 00:00:00 2001 From: "kitatsuji.yuto" Date: Fri, 30 Sep 2016 11:38:09 +0900 Subject: [PATCH 1/7] =?UTF-8?q?ToDo=E3=81=AE=E4=B8=80=E8=A6=A7=E3=81=AE?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=82=BF=E3=82=A4=E3=83=9F=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=82=92=E8=A6=8B=E7=9B=B4=E3=81=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/TaskContentsController.php | 9 ++++++--- Model/TaskContent.php | 10 ++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Controller/TaskContentsController.php b/Controller/TaskContentsController.php index bad4869..f074f33 100644 --- a/Controller/TaskContentsController.php +++ b/Controller/TaskContentsController.php @@ -192,8 +192,9 @@ private function __list($conditions) { $params = array(); $afterOrder = array( 'TaskContent.task_end_date' => 'asc', - 'TaskContent.title' => 'asc', 'TaskContent.priority' => 'desc', + 'TaskContent.progress_rate' => 'desc', + 'TaskContent.title' => 'asc', 'TaskContent.modified' => 'desc' ); @@ -239,9 +240,11 @@ private function __list($conditions) { $params = $this->__setTaskChargeContents($params, $userParam); // ToDo一覧を取得 - $taskContents = $this->TaskContent->getTaskContentList($params, $order); + $results = $this->TaskContent->getTaskContentList($params, $order); + $taskContents = Hash::extract($results, 'tasks'); + // 期限間近のToDo一覧を取得 - $deadLineTasks = Hash::extract($taskContents, '{n}.TaskContents.{n}[isDeadLine=' . true . ']'); + $deadLineTasks = Hash::extract($results, 'deadLineTasks'); // 期限間近のToDo一覧 $this->set('deadLineTasks', $deadLineTasks); diff --git a/Model/TaskContent.php b/Model/TaskContent.php index ebeb48a..1bdbc41 100644 --- a/Model/TaskContent.php +++ b/Model/TaskContent.php @@ -325,6 +325,7 @@ protected function _getValidateTaskDate($validate = array()) { * @return array */ public function getTaskContentList($params = array(), $order = array()) { + $results = array(); $conditions = $this->getConditions(Current::read('Block.id'), $params); $taskContents = $this->find('all', @@ -366,6 +367,8 @@ public function getTaskContentList($params = array(), $order = array()) { $isDeadLine = $this->isDeadLine($taskContent['TaskContent']['date_color']); $addedTaskContents[] = array_merge($taskContent, array('isDeadLine' => $isDeadLine)); } + // 期限間近・期限切れの一覧を取得 + $deadLineTasks = Hash::extract($addedTaskContents, '{n}[isDeadLine=' . true . ']'); // カテゴリIDがキーのコンテンツ連想配列を生成 $sortedTaskContents = Hash::combine( @@ -394,7 +397,7 @@ public function getTaskContentList($params = array(), $order = array()) { )); $categoryRates = Hash::combine($categoryData, '{n}.TaskContent.category_id', '{n}.TaskContent'); - $results = array(); + $resultArr = array(); foreach ($categories as $category) { $result = array(); if (isset($sortedTaskContents[$category['id']])) { @@ -408,10 +411,13 @@ public function getTaskContentList($params = array(), $order = array()) { $result['Category'] = $category; $result['Category']['category_priority'] = $categoryPriority; - $results[] = $result; + $resultArr[] = $result; } } + $results['deadLineTasks'] = $deadLineTasks; + $results['tasks'] = $resultArr; + return $results; } From fac2f9912fe4af10dbece9b27a4de37df6b7f691 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 26 May 2017 19:25:37 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E5=87=A6=E7=90=86?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Migration/001_plugin_records.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Config/Migration/001_plugin_records.php b/Config/Migration/001_plugin_records.php index b5520aa..2b2571f 100644 --- a/Config/Migration/001_plugin_records.php +++ b/Config/Migration/001_plugin_records.php @@ -10,7 +10,6 @@ App::uses('NetCommonsMigration', 'NetCommons.Config/Migration'); App::uses('Space', 'Rooms.Model'); -class_exists('Space'); /** * Add plugin migration From 0623eb4a4d27be16e172321ea37f32698286aa3b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 28 Jun 2017 23:14:10 +0900 Subject: [PATCH 3/7] =?UTF-8?q?.travis.yml=E3=81=ABphp7.1=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/942?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fb56e10..898a57f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 sudo: false From 0feef1df8012db790f6032aa0ea2a1cd4a42f010 Mon Sep 17 00:00:00 2001 From: kitatsuji Date: Mon, 31 Jul 2017 11:57:17 +0900 Subject: [PATCH 4/7] =?UTF-8?q?Travis=E3=82=A8=E3=83=A9=E3=83=BC=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/TaskContentEditController.php | 7 +- .../BeforeFilterTest.php | 2 +- .../TaskContentEditController/EditTest.php | 9 + .../TaskContentsController/ViewTest.php | 9 + .../TaskContent/DeleteContentByKeyTest.php | 9 + .../Model/TaskContent/SaveContentTest.php | 12 + .../Model/TaskContent/SetReminderMailTest.php | 16 + Test/Fixture/CalendarEventContentFixture.php | 46 + Test/Fixture/CalendarEventFixture.php | 935 ++++++++++++++++++ .../Fixture/CalendarEventShareUserFixture.php | 54 + Test/Fixture/CalendarFixture.php | 54 + Test/Fixture/CalendarFrameSettingFixture.php | 51 + .../CalendarFrameSettingSelectRoomFixture.php | 72 ++ Test/Fixture/CalendarRruleFixture.php | 329 ++++++ Test/Fixture/Room4testFixture.php | 179 ++++ Test/Fixture/RoomsLanguageForTaskFixture.php | 97 ++ 16 files changed, 1876 insertions(+), 5 deletions(-) create mode 100644 Test/Fixture/CalendarEventContentFixture.php create mode 100644 Test/Fixture/CalendarEventFixture.php create mode 100644 Test/Fixture/CalendarEventShareUserFixture.php create mode 100644 Test/Fixture/CalendarFixture.php create mode 100644 Test/Fixture/CalendarFrameSettingFixture.php create mode 100644 Test/Fixture/CalendarFrameSettingSelectRoomFixture.php create mode 100644 Test/Fixture/CalendarRruleFixture.php create mode 100644 Test/Fixture/Room4testFixture.php create mode 100644 Test/Fixture/RoomsLanguageForTaskFixture.php diff --git a/Controller/TaskContentEditController.php b/Controller/TaskContentEditController.php index 07b16bf..f357dfb 100644 --- a/Controller/TaskContentEditController.php +++ b/Controller/TaskContentEditController.php @@ -148,6 +148,9 @@ public function edit() { $this->set('listTitle', $this->_taskTitle); $key = $this->params['key']; $taskContent = $this->TaskContent->getTask($key); + if (empty($taskContent)) { + return $this->throwBadRequest(); + } $calendarKey = $taskContent['TaskContent']['calendar_key']; //ADD カレンダ連携キーの取り出し $taskContent['TaskContent']['use_calendar'] = ($calendarKey == "") ? 0 : 1; @@ -158,10 +161,6 @@ public function edit() { // ToDo担当者ユーザー保持 $this->request->data = $this->TaskCharge->getSelectUsers($this->request->data, false); - if (empty($taskContent)) { - return $this->throwBadRequest(); - } - if ($this->TaskContent->canEditWorkflowContent($taskContent) === false) { return $this->throwBadRequest(); } diff --git a/Test/Case/Controller/TaskContentEditController/BeforeFilterTest.php b/Test/Case/Controller/TaskContentEditController/BeforeFilterTest.php index 05ca1b1..87ffeb7 100644 --- a/Test/Case/Controller/TaskContentEditController/BeforeFilterTest.php +++ b/Test/Case/Controller/TaskContentEditController/BeforeFilterTest.php @@ -84,7 +84,7 @@ public function testBeforeFilterGet() { //テスト実行 $this->_testGetAction( array( - 'action' => 'edit', 'block_id' => $blockId + 'action' => 'edit', 'block_id' => $blockId, 'key' => 'content_key_9' ), array( 'method' => 'assertEmpty' diff --git a/Test/Case/Controller/TaskContentEditController/EditTest.php b/Test/Case/Controller/TaskContentEditController/EditTest.php index 3472334..0017d6a 100644 --- a/Test/Case/Controller/TaskContentEditController/EditTest.php +++ b/Test/Case/Controller/TaskContentEditController/EditTest.php @@ -25,6 +25,14 @@ class TaskContentEditControllerEditTest extends WorkflowControllerEditTest { * @var array */ public $fixtures = array( + 'plugin.calendars.calendar', + 'plugin.calendars.calendar_event', + 'plugin.calendars.calendar_frame_setting', + 'plugin.calendars.calendar_frame_setting_select_room', + 'plugin.calendars.calendar_rrule', + 'plugin.calendars.calendar_event_share_user', + 'plugin.calendars.calendar_event_content', + 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', @@ -32,6 +40,7 @@ class TaskContentEditControllerEditTest extends WorkflowControllerEditTest { 'plugin.tasks.task_charge', 'plugin.tasks.task_content', 'plugin.tasks.block_setting_for_task', + 'plugin.tasks.rooms_language_for_task', 'plugin.workflow.workflow_comment', ); diff --git a/Test/Case/Controller/TaskContentsController/ViewTest.php b/Test/Case/Controller/TaskContentsController/ViewTest.php index 736a6ba..f6c955a 100644 --- a/Test/Case/Controller/TaskContentsController/ViewTest.php +++ b/Test/Case/Controller/TaskContentsController/ViewTest.php @@ -25,6 +25,14 @@ class TaskContentsControllerViewTest extends WorkflowControllerViewTest { * @var array */ public $fixtures = array( + 'plugin.calendars.calendar', + 'plugin.calendars.calendar_event', + 'plugin.calendars.calendar_frame_setting', + 'plugin.calendars.calendar_frame_setting_select_room', + 'plugin.calendars.calendar_rrule', + 'plugin.calendars.calendar_event_share_user', + 'plugin.calendars.calendar_event_content', + 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', @@ -32,6 +40,7 @@ class TaskContentsControllerViewTest extends WorkflowControllerViewTest { 'plugin.tasks.task_charge', 'plugin.tasks.task_content', 'plugin.tasks.block_setting_for_task', + 'plugin.tasks.rooms_language_for_task', 'plugin.workflow.workflow_comment', 'plugin.content_comments.content_comment', ); diff --git a/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php b/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php index 4dd1e2c..2cebf7f 100644 --- a/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php +++ b/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php @@ -28,6 +28,14 @@ class TaskContentDeleteContentByKeyTest extends NetCommonsModelTestCase { * @var array */ public $fixtures = array( + 'plugin.calendars.calendar', + 'plugin.calendars.calendar_event', + 'plugin.calendars.calendar_frame_setting', + 'plugin.calendars.calendar_frame_setting_select_room', + 'plugin.calendars.calendar_rrule', + 'plugin.calendars.calendar_event_share_user', + 'plugin.calendars.calendar_event_content', + 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', @@ -35,6 +43,7 @@ class TaskContentDeleteContentByKeyTest extends NetCommonsModelTestCase { 'plugin.tasks.task_charge', 'plugin.tasks.task_content', 'plugin.tasks.block_setting_for_task', + 'plugin.tasks.rooms_language_for_task', 'plugin.workflow.workflow_comment', 'plugin.content_comments.content_comment', ); diff --git a/Test/Case/Model/TaskContent/SaveContentTest.php b/Test/Case/Model/TaskContent/SaveContentTest.php index 317d18b..14e5bb3 100644 --- a/Test/Case/Model/TaskContent/SaveContentTest.php +++ b/Test/Case/Model/TaskContent/SaveContentTest.php @@ -27,6 +27,14 @@ class TaskContentSaveContentTest extends WorkflowSaveTest { * @var array */ public $fixtures = array( + 'plugin.calendars.calendar', + 'plugin.calendars.calendar_event', + 'plugin.calendars.calendar_frame_setting', + 'plugin.calendars.calendar_frame_setting_select_room', + 'plugin.calendars.calendar_rrule', + 'plugin.calendars.calendar_event_share_user', + 'plugin.calendars.calendar_event_content', + 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', @@ -37,6 +45,7 @@ class TaskContentSaveContentTest extends WorkflowSaveTest { 'plugin.tasks.task_charge', 'plugin.tasks.task_content', 'plugin.tasks.block_setting_for_task', + 'plugin.tasks.rooms_language_for_task', 'plugin.categories.category', 'plugin.workflow.workflow_comment', ); @@ -87,6 +96,9 @@ public function dataProviderSave() { $data['TaskContent'] = (new TaskContentFixture())->records[1]; $data['TaskCharge'][] = (new TaskChargeFixture())->records[0]; $data['TaskContent']['status'] = '1'; + + $data['TaskContent']['use_calendar'] = false; + $data['TaskContent']['calendar_key'] = ''; $results = array(); // * 編集の登録処理 diff --git a/Test/Case/Model/TaskContent/SetReminderMailTest.php b/Test/Case/Model/TaskContent/SetReminderMailTest.php index fc477d5..9925742 100644 --- a/Test/Case/Model/TaskContent/SetReminderMailTest.php +++ b/Test/Case/Model/TaskContent/SetReminderMailTest.php @@ -13,6 +13,12 @@ App::uses('NetCommonsModelTestCase', 'NetCommons.TestSuite'); App::uses('TaskContentFixture', 'Tasks.Test/Fixture'); App::uses('TaskChargeFixture', 'Tasks.Test/Fixture'); +App::uses('CalendarFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarEventFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarEventContentFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarFrameSettingFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarFrameSettingSelectRoomFixture', 'Calendars.Test/Fixture'); /** * TaskContent::setReminderMail()のテスト @@ -28,6 +34,15 @@ class TaskContentSetReminderMailTest extends NetCommonsModelTestCase { * @var array */ public $fixtures = array( + 'plugin.calendars.calendar', + 'plugin.calendars.calendar_event', + 'plugin.calendars.calendar_frame_setting', + 'plugin.calendars.calendar_frame_setting_select_room', + 'plugin.calendars.calendar_rrule', + 'plugin.calendars.calendar_event_share_user', + 'plugin.calendars.calendar_event_content', + 'plugin.rooms.room_role', +// 'plugin.calendars.event_content', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', @@ -38,6 +53,7 @@ class TaskContentSetReminderMailTest extends NetCommonsModelTestCase { 'plugin.tasks.task_charge', 'plugin.tasks.task_content', 'plugin.tasks.block_setting_for_task', + 'plugin.tasks.rooms_language_for_task', 'plugin.categories.category', 'plugin.workflow.workflow_comment', ); diff --git a/Test/Fixture/CalendarEventContentFixture.php b/Test/Fixture/CalendarEventContentFixture.php new file mode 100644 index 0000000..da86aee --- /dev/null +++ b/Test/Fixture/CalendarEventContentFixture.php @@ -0,0 +1,46 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarEventContentFixture + */ +class CalendarEventContentFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'model' => 'calendarmodel', + 'content_key' => 'calendarplan1', + 'calendar_event_id' => 1, + 'created_user' => 1, + 'created' => '2016-03-24 07:09:51', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:09:51' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/CalendarEventFixture.php b/Test/Fixture/CalendarEventFixture.php new file mode 100644 index 0000000..afe558d --- /dev/null +++ b/Test/Fixture/CalendarEventFixture.php @@ -0,0 +1,935 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarEventFixture + */ +class CalendarEventFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + //adminが書いた予定(パブリック) + array( + 'id' => '1', + 'calendar_rrule_id' => '1', + 'key' => 'calendarplan1', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'calendarplan1', + 'title_icon' => '/net_commons/img/title_icon/10_010_new.svg', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160908', + 'start_time' => '150000', + 'dtstart' => '20160908150000', + 'end_date' => '20160909', + 'end_time' => '150000', + 'dtend' => '20160909150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //一般が書いた予定 一度も公開していない + 'id' => '2', + 'calendar_rrule_id' => '2', + 'key' => 'calendarplan2', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'generaluser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '3', + 'is_active' => false, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '4', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '4', + 'modified' => '2016-03-24 07:09:51' + ), + array( //一般が書いた予定 一度公開している + 'id' => '3', + 'calendar_rrule_id' => '3', + 'key' => 'calendarplan3', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'generaluser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => '1', + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '4', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //editorが書いた予定 一度も公開していない + 'id' => '4', + 'calendar_rrule_id' => '4', + 'key' => 'calendarplan4', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'editoruser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '3', + 'is_active' => false, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '3', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '3', + 'modified' => '2016-03-24 07:09:51' + ), + array( //editorが書いた予定 一度公開している + 'id' => '5', + 'calendar_rrule_id' => '5', + 'key' => 'calendarplan5', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'editoruser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '3', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '3', + 'modified' => '2016-03-24 07:09:51' + ), + array( //chief_editorが書いた予定 一度公開している + 'id' => '6', + 'calendar_rrule_id' => '6', + 'key' => 'calendarplan6', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'chiefeditoruser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '2', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '2', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(日/2回) 1 + 'id' => '7', + 'calendar_rrule_id' => '8', + 'key' => 'calendarplan7', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplandaytime', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '1', //この予定のみ更新した + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', //1 + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', //1 + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(日/2回) 2 + 'id' => '8', + 'calendar_rrule_id' => '8', //8 + 'key' => 'calendarplan7', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplan', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '1', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //予定(期間) + 'id' => '9', + 'calendar_rrule_id' => '9', + 'key' => 'calendarplan9line', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'calendarplan9line', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => 0, + 'start_date' => '20160901', + 'start_time' => '050000', + 'dtstart' => '20160901050000', + 'end_date' => '20160902', + 'end_time' => '060000', + 'dtend' => '20160902060000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '2', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '2', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(週/2回) 1 + 'id' => '10', + 'calendar_rrule_id' => '10', + 'key' => 'calendarplan10', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanweek', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160909', + 'start_time' => '070000', + 'dtstart' => '20160909070000', + 'end_date' => '20160909', + 'end_time' => '080000', + 'dtend' => '20160909080000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(週/2回) 2 + 'id' => '11', + 'calendar_rrule_id' => '10', + 'key' => 'calendarplan10', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanweek', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/第1週日曜日/2回) 1 + 'id' => '12', + 'calendar_rrule_id' => '12', + 'key' => 'calendarplan12', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/第1週日曜日/2回) 2 + 'id' => '13', + 'calendar_rrule_id' => '12', + 'key' => 'calendarplan12', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(年/2回) 1 + 'id' => '14', + 'calendar_rrule_id' => '14', + 'key' => 'calendarplan14', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanyear', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(年/2回) 2 + 'id' => '15', + 'calendar_rrule_id' => '14', + 'key' => 'calendarplan14', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanyear', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(週/木/9月2日まで) + 'id' => '16', + 'calendar_rrule_id' => '16', + 'key' => 'calendarplan16', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatweekThursdaySep2', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160831', + 'start_time' => '150000', + 'dtstart' => '20160831150000', + 'end_date' => '20160901', + 'end_time' => '150000', + 'dtend' => '20160901150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/2か月おき2日/10月1日まで) + 'id' => '17', + 'calendar_rrule_id' => '17', + 'key' => 'calendarplan17', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatmonthlyuntil', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160831', + 'start_time' => '150000', + 'dtstart' => '20160831150000', + 'end_date' => '20160901', + 'end_time' => '150000', + 'dtend' => '20160901150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(2年ごとに,9月 / 開始日と同日 / 2017年09月01日まで) + 'id' => '18', + 'calendar_rrule_id' => '18', + 'key' => 'calendarplan18', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatmonthlyuntil', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => false, //test + 'start_date' => '20160831', + 'start_time' => '150000', + 'dtstart' => '20160831150000', + 'end_date' => '20160901', + 'end_time' => '150000', + 'dtend' => '20160901150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(日/2日ごと/2016.9.2まで) + 'id' => '19', + 'calendar_rrule_id' => '19', + 'key' => 'calendarplan19', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeat2dayuntil', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160831', + 'start_time' => '150000', + 'dtstart' => '20160831150000', + 'end_date' => '20160901', + 'end_time' => '150000', + 'dtend' => '20160901150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/第2週月曜日1回) + 'id' => '20', + 'calendar_rrule_id' => '20', + 'key' => 'calendarplan20', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/第3週火曜日1回) + 'id' => '21', + 'calendar_rrule_id' => '21', + 'key' => 'calendarplan21', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/第4週水曜日1回) + 'id' => '22', + 'calendar_rrule_id' => '22', + 'key' => 'calendarplan22', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //adminが書いた予定 繰り返しあり(月/最終週木曜日1回) + 'id' => '23', + 'calendar_rrule_id' => '23', + 'key' => 'calendarplan23', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'adminrepeatplanmonth', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + //adminが書いた予定(全会員) + array( + 'id' => '24', + 'calendar_rrule_id' => '24', + 'key' => 'calendarplan24', + 'room_id' => '4', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'calendarplan24', + 'title_icon' => '/net_commons/img/title_icon/10_010_new.svg', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160909', + 'start_time' => '070000', + 'dtstart' => '20160909070000', + 'end_date' => '20160909', + 'end_time' => '080000', + 'dtend' => '20160909080000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //一般が書いた予定(承認待ち) + 'id' => '25', + 'calendar_rrule_id' => '25', + 'key' => 'calendarplan25', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'generaluser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '2', + 'is_active' => '1', + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '4', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '4', + 'modified' => '2016-03-24 07:09:51' + ), + array( //一般が書いた予定(差し戻し) + 'id' => '26', + 'calendar_rrule_id' => '26', + 'key' => 'calendarplan26', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'generaluser', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160728', + 'start_time' => '070951', + 'dtstart' => '20160731150000', + 'end_date' => '20160728', + 'end_time' => '070951', + 'dtend' => '20160731150000', + 'timezone_offset' => '9.0', + 'status' => '4', + 'is_active' => '1', + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '4', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '4', + 'modified' => '2016-03-24 07:09:51' + ), + //adminが書いた予定(プライベート)(共有あり) + array( + 'id' => '27', + 'calendar_rrule_id' => '27', + 'key' => 'calendarplan27', + 'room_id' => '8', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'calendarplan27', + 'title_icon' => '/net_commons/img/title_icon/10_010_new.svg', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => true, + 'start_date' => '20160909', + 'start_time' => '070000', + 'dtstart' => '20160909070000', + 'end_date' => '20160909', + 'end_time' => '080000', + 'dtend' => '20160909080000', + 'timezone_offset' => '9.0', + 'status' => '1', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '1', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '1', + 'modified' => '2016-03-24 07:09:51' + ), + array( //予定(期間)(一時保存) + 'id' => '28', + 'calendar_rrule_id' => '0', + 'key' => 'calendarplan28line', + 'room_id' => '2', + 'language_id' => '2', + 'target_user' => '1', + 'title' => 'calendarplan28line', + 'title_icon' => 'Lorem ipsum dolor sit amet', + 'location' => 'Lorem ipsum dolor sit amet', + 'contact' => 'Lorem ipsum dolor sit amet', + 'description' => 'testdescription', + 'is_allday' => 0, + 'start_date' => '20160901', + 'start_time' => '050000', + 'dtstart' => '20160901050000', + 'end_date' => '20160902', + 'end_time' => '060000', + 'dtend' => '20160902060000', + 'timezone_offset' => '9.0', + 'status' => '3', + 'is_active' => true, + 'is_latest' => true, + 'recurrence_event_id' => '0', + 'exception_event_id' => '0', + 'is_enable_mail' => false, + 'email_send_timing' => '0', + 'created_user' => '2', + 'created' => '2016-03-24 07:09:51', + 'modified_user' => '2', + 'modified' => '2016-03-24 07:09:51' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/CalendarEventShareUserFixture.php b/Test/Fixture/CalendarEventShareUserFixture.php new file mode 100644 index 0000000..b2d74fe --- /dev/null +++ b/Test/Fixture/CalendarEventShareUserFixture.php @@ -0,0 +1,54 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarEventShareUserFixture + */ +class CalendarEventShareUserFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'calendar_event_id' => 1, + 'share_user' => 1, + 'created_user' => 1, + 'created' => '2016-03-24 07:09:58', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:09:58' + ), + array( + 'id' => 2, + 'calendar_event_id' => 27, + 'share_user' => 3, //編集長と共有 + 'created_user' => 1, + 'created' => '2016-03-24 07:09:58', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:09:58' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/CalendarFixture.php b/Test/Fixture/CalendarFixture.php new file mode 100644 index 0000000..2dc0dd8 --- /dev/null +++ b/Test/Fixture/CalendarFixture.php @@ -0,0 +1,54 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarFixture + */ +class CalendarFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'block_key' => 'block_1', + //'use_workflow' => 1, + 'created_user' => 1, + 'created' => '2016-03-24 07:10:30', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:30' + ), + array( + 'id' => 2, + 'block_key' => 'block_1', + //'use_workflow' => 1, + 'created_user' => 1, + 'created' => '2016-03-24 07:10:30', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:30' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/CalendarFrameSettingFixture.php b/Test/Fixture/CalendarFrameSettingFixture.php new file mode 100644 index 0000000..2f857f9 --- /dev/null +++ b/Test/Fixture/CalendarFrameSettingFixture.php @@ -0,0 +1,51 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarFrameSettingFixture + */ +class CalendarFrameSettingFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'frame_key' => 'frame_3', + 'display_type' => 1, + 'start_pos' => 1, + 'display_count' => 3, + 'is_myroom' => 1, + 'is_select_room' => 1, + 'room_id' => '2', + 'timeline_base_time' => 1, + 'created_user' => 1, + 'created' => '2016-03-24 07:10:18', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:18' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/CalendarFrameSettingSelectRoomFixture.php b/Test/Fixture/CalendarFrameSettingSelectRoomFixture.php new file mode 100644 index 0000000..09aeb6d --- /dev/null +++ b/Test/Fixture/CalendarFrameSettingSelectRoomFixture.php @@ -0,0 +1,72 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarFrameSettingSelectRoomFixture + */ +class CalendarFrameSettingSelectRoomFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'calendar_frame_setting_id' => 1, + 'room_id' => '2', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:11', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:11' + ), + array( + 'id' => 2, + 'calendar_frame_setting_id' => 1, + 'room_id' => '3', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:11', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:11' + ), + array( + 'id' => 3, + 'calendar_frame_setting_id' => 1, + 'room_id' => '4', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:11', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:11' + ), + array( + 'id' => 4, + 'calendar_frame_setting_id' => 1, + 'room_id' => '5', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:11', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:11' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} \ No newline at end of file diff --git a/Test/Fixture/CalendarRruleFixture.php b/Test/Fixture/CalendarRruleFixture.php new file mode 100644 index 0000000..fae3d80 --- /dev/null +++ b/Test/Fixture/CalendarRruleFixture.php @@ -0,0 +1,329 @@ + + * @author AllCreator + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +/** + * Summary for CalendarRruleFixture + */ +class CalendarRruleFixture extends CakeTestFixture { + +/** + * Records + * + * @var array + */ + public $records = array( + array( + 'id' => 1, + 'calendar_id' => 1, + 'key' => 'calendarplan1', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 2, + 'calendar_id' => 2, + 'key' => 'calendarplan2', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 4, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 4, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 3, + 'calendar_id' => 3, + 'key' => 'calendarplan3', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 4, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 4, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 4, + 'calendar_id' => 4, + 'key' => 'calendarplan4', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 5, + 'calendar_id' => 5, + 'key' => 'calendarplan5', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 6, + 'calendar_id' => 1, + 'key' => 'calendarplan6', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 2, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 2, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 7, + 'calendar_id' => 1, + 'key' => 'calendarplan7', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=DAILY;INTERVAL=1;COUNT=2', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 8, + 'calendar_id' => 8, + 'key' => 'calendarplan8', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 9, + 'calendar_id' => 9, + 'key' => 'calendarplan9line', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 10, + 'calendar_id' => 1, + 'key' => 'calendarplan10', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=WEEKLY;INTERVAL=1;BYDAY=1SU;COUNT=2', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 12, + 'calendar_id' => 1, + 'key' => 'calendarplan12', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=1;BYDAY=1SU;COUNT=2', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 14, + 'calendar_id' => 1, + 'key' => 'calendarplan14', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=YEARLY;INTERVAL=1;BYMONTH=2;COUNT=2', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 16, + 'calendar_id' => 1, + 'key' => 'calendarplan16', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TH;UNTIL=20160902T150000', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 17, + 'calendar_id' => 1, + 'key' => 'calendarplan17', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=2;COUNT=1', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 1, //test1 + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 18, + 'calendar_id' => 1, + 'key' => 'calendarplan18', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=YEARLY;INTERVAL=2;BYMONTH=9;BYDAY=2SA;UNTIL=20170901T150000', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 19, + 'calendar_id' => 1, + 'key' => 'calendarplan19', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=DAILY;INTERVAL=2;UNTIL=20160902T150000', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 20, + 'calendar_id' => 1, + 'key' => 'calendarplan20', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=1;BYDAY=2MO;COUNT=1', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 21, + 'calendar_id' => 1, + 'key' => 'calendarplan21', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=1;BYDAY=3TU;COUNT=1', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 22, + 'calendar_id' => 1, + 'key' => 'calendarplan22', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=1;BYDAY=4WE;COUNT=1', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 23, + 'calendar_id' => 1, + 'key' => 'calendarplan23', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => 'FREQ=MONTHLY;INTERVAL=1;BYDAY=-1TH;COUNT=1', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '2', + 'created_user' => 3, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 3, + 'modified' => '2016-03-24 07:10:24' + ), + array( + 'id' => 27, + 'calendar_id' => 1, + 'key' => 'calendarplan27', + 'name' => 'Lorem ipsum dolor sit amet', + 'rrule' => '', + 'icalendar_uid' => 'Lorem ipsum dolor sit amet', + 'icalendar_comp_name' => 'Lorem ipsum dolor sit amet', + 'room_id' => '8', + 'created_user' => 1, + 'created' => '2016-03-24 07:10:24', + 'modified_user' => 1, + 'modified' => '2016-03-24 07:10:24' + ), + ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } + +} diff --git a/Test/Fixture/Room4testFixture.php b/Test/Fixture/Room4testFixture.php new file mode 100644 index 0000000..c325318 --- /dev/null +++ b/Test/Fixture/Room4testFixture.php @@ -0,0 +1,179 @@ + + * @author Shohei Nakajima + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +App::uses('RoomFixture', 'Rooms.Test/Fixture'); + +/** + * Room4testFixture + * + * @author Shohei Nakajima + * @package NetCommons\Rooms\Test\Fixture + */ +class Room4testFixture extends RoomFixture { + +/** + * Model name + * + * @var string + */ + public $name = 'Room'; + +/** + * Full Table Name + * + * @var string + */ + public $table = 'rooms'; + +/** + * Records + * + * @var array + */ + public $records = array( + //サイト全体 + array( + 'id' => '1', + 'space_id' => '1', + 'page_id_top' => null, + 'parent_id' => null, + 'lft' => '1', + 'rght' => '18', + 'active' => '1', + 'default_role_key' => 'visitor', + 'need_approval' => '1', + 'default_participation' => '1', + 'page_layout_permitted' => '0', + 'theme' => null, + ), + //パブリックスペース + array( + 'id' => '2', + 'space_id' => '2', + 'page_id_top' => '1', + 'parent_id' => '1', + 'lft' => '2', + 'rght' => '9', + 'active' => true, + 'default_role_key' => 'visitor', + 'need_approval' => true, + 'default_participation' => true, + 'page_layout_permitted' => true, + 'theme' => null, + ), + //パブリックスペース、別ルーム(room_id=4) + array( + 'id' => '5', + 'space_id' => '2', + 'page_id_top' => '3', + 'parent_id' => '2', + 'lft' => '3', + 'rght' => '6', + 'active' => true, + 'default_role_key' => 'visitor', + 'need_approval' => true, + 'default_participation' => true, + 'page_layout_permitted' => true, + 'theme' => null, + ), + //パブリックスペース、サブサブルーム(room_id=8) + array( + 'id' => '9', + 'space_id' => '2', + 'page_id_top' => '8', + 'parent_id' => '5', + 'lft' => '4', + 'rght' => '5', + 'active' => true, + 'default_role_key' => 'visitor', + 'need_approval' => true, + 'default_participation' => true, + 'page_layout_permitted' => true, + 'theme' => null, + ), + //パブリックスペース、別ルーム(room_id=5、ブロックなし) + array( + 'id' => '6', + 'space_id' => '2', + 'page_id_top' => '4', + 'parent_id' => '2', + 'lft' => '7', + 'rght' => '8', + 'active' => true, + 'default_role_key' => 'visitor', + 'need_approval' => true, + 'default_participation' => true, + 'page_layout_permitted' => true, + 'theme' => null, + ), + //プライベートスペース + array( + 'id' => '3', + 'space_id' => '3', + 'page_id_top' => null, + 'parent_id' => '1', + 'lft' => '10', + 'rght' => '13', + 'active' => true, + 'default_role_key' => 'room_administrator', + 'need_approval' => false, + 'default_participation' => false, + 'page_layout_permitted' => false, + 'theme' => null, + ), + //プライベートスペース、別ルーム(room_id=7, プライベートルーム) + array( + 'id' => '8', + 'space_id' => '3', + 'page_id_top' => '7', + 'parent_id' => '3', + 'lft' => '11', + 'rght' => '12', + 'active' => true, + 'default_role_key' => 'room_administrator', + 'need_approval' => '0', + 'default_participation' => '0', + 'page_layout_permitted' => '0', + 'theme' => null, + ), + //コミュニティスペース + array( + 'id' => '4', + 'space_id' => '4', + 'page_id_top' => null, + 'parent_id' => '1', + 'lft' => '14', + 'rght' => '17', + 'active' => true, + 'default_role_key' => 'general_user', + 'need_approval' => true, + 'default_participation' => true, + 'page_layout_permitted' => true, + 'theme' => null, + ), + //コミュニティスペース、別ルーム(room_id=6, 準備中) + array( + 'id' => '7', + 'space_id' => '4', + 'page_id_top' => '5', + 'parent_id' => '4', + 'lft' => '15', + 'rght' => '16', + 'active' => '0', + 'default_role_key' => 'general_user', + 'need_approval' => true, + 'default_participation' => false, + 'page_layout_permitted' => true, + 'theme' => null, + ), + ); + +} diff --git a/Test/Fixture/RoomsLanguageForTaskFixture.php b/Test/Fixture/RoomsLanguageForTaskFixture.php new file mode 100644 index 0000000..8161cda --- /dev/null +++ b/Test/Fixture/RoomsLanguageForTaskFixture.php @@ -0,0 +1,97 @@ + + * @author Shohei Nakajima + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +App::uses('RoomsLanguageFixture', 'Rooms.Test/Fixture'); + +/** + * RoomsLanguage4testFixture + * + * @author Shohei Nakajima + * @package NetCommons\Rooms\Test\Fixture + */ +class RoomsLanguageForTaskFixture extends RoomsLanguageFixture { + + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'tasks'; + +/** + * Model name + * + * @var string + */ + public $name = 'RoomsLanguage'; + +/** + * Full Table Name + * + * @var string + */ + public $table = 'rooms_languages'; + +/** + * Records + * + * @var array + */ + public $records = array( + //パブリックスペース + //--日本語 + array('id' => '17', 'language_id' => '2', 'room_id' => '1', 'name' => 'サイト全体'), + //--英語 + array('id' => '18', 'language_id' => '1', 'room_id' => '1', 'name' => 'Whole site'), + //パブリックスペース + //--日本語 + array('id' => '1', 'language_id' => '2', 'room_id' => '2', 'name' => 'パブリックスペース'), + //--英語 + array('id' => '2', 'language_id' => '1', 'room_id' => '2', 'name' => 'Public space'), + //プライベートスペース + //--日本語 + array('id' => '3', 'language_id' => '2', 'room_id' => '3', 'name' => 'プライベートスペース'), + //--英語 + array('id' => '4', 'language_id' => '1', 'room_id' => '3', 'name' => 'Private space'), + //コミュニティスペース + //--日本語 + array('id' => '5', 'language_id' => '2', 'room_id' => '4', 'name' => 'コミュニティスペース'), + //--英語 + array('id' => '6', 'language_id' => '1', 'room_id' => '4', 'name' => 'Group space'), + + //パブリックスペース、別ルーム(room_id=4) + //--日本語 + array('id' => '7', 'language_id' => '2', 'room_id' => '5', 'name' => 'サブルーム1'), + //--英語 + array('id' => '8', 'language_id' => '1', 'room_id' => '5', 'name' => 'Sub room 1'), + //パブリックスペース、別ルーム(room_id=5、ブロックなし) + //--日本語 + array('id' => '9', 'language_id' => '2', 'room_id' => '6', 'name' => 'サブルーム2'), + //--英語 + array('id' => '10', 'language_id' => '1', 'room_id' => '6', 'name' => 'Sub room 2'), + //コミュニティスペース、別ルーム(room_id=6, 準備中) + //--日本語 + array('id' => '11', 'language_id' => '2', 'room_id' => '7', 'name' => 'ルーム1'), + //--英語 + array('id' => '12', 'language_id' => '1', 'room_id' => '7', 'name' => 'Room 1'), + //パブリックスペース、別ルーム(room_id=7, プライベートルーム) + //--日本語 + array('id' => '13', 'language_id' => '2', 'room_id' => '8', 'name' => 'プライベート'), + //--英語 + array('id' => '14', 'language_id' => '1', 'room_id' => '8', 'name' => 'Private room'), + //パブリックスペース、サブサブルーム(room_id=8) + //--日本語 + array('id' => '15', 'language_id' => '2', 'room_id' => '9', 'name' => 'サブサブルーム1'), + //--英語 + array('id' => '16', 'language_id' => '1', 'room_id' => '9', 'name' => 'Sub Sub room 1'), + ); + +} From bf1e1cc3a733dd01198ea50fb9a00908a79ddafd Mon Sep 17 00:00:00 2001 From: kitatsuji Date: Mon, 31 Jul 2017 12:02:44 +0900 Subject: [PATCH 5/7] =?UTF-8?q?Travis=E3=82=A8=E3=83=A9=E3=83=BC=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index b316e13..203255e 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "cakedc/migrations": "~2.2", "netcommons/blocks": "@dev", "netcommons/categories": "@dev", + "netcommons/calendars": "@dev", "netcommons/content-comments": "@dev", "netcommons/groups": "@dev", "netcommons/mails": "@dev", From de3a5a5dc6bf3198d63c9dc3e54279c0cc19d179 Mon Sep 17 00:00:00 2001 From: kitatsuji Date: Mon, 31 Jul 2017 15:29:06 +0900 Subject: [PATCH 6/7] =?UTF-8?q?Travis=E3=82=A8=E3=83=A9=E3=83=BC=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskContentEditController/EditTest.php | 14 +++---- .../TaskContentsController/ViewTest.php | 14 +++---- .../TaskContent/DeleteContentByKeyTest.php | 14 +++---- .../Model/TaskContent/SaveContentTest.php | 14 +++---- .../Model/TaskContent/SetReminderMailTest.php | 16 ++++---- ...=> CalendarEventContentForTaskFixture.php} | 35 ++++++++++++------ ...re.php => CalendarEventForTaskFixture.php} | 36 ++++++++++++------ ... CalendarEventShareUserForTaskFixture.php} | 37 ++++++++++++------- ...Fixture.php => CalendarForTaskFixture.php} | 36 +++++++++++------- ...=> CalendarFrameSettingForTaskFixture.php} | 24 +++++++++++- ...rFrameSettingSelectRoomForTaskFixture.php} | 25 ++++++++++++- ...re.php => CalendarRruleForTaskFixture.php} | 25 ++++++++++++- composer.json | 2 +- 13 files changed, 202 insertions(+), 90 deletions(-) rename Test/Fixture/{CalendarEventContentFixture.php => CalendarEventContentForTaskFixture.php} (62%) rename Test/Fixture/{CalendarEventFixture.php => CalendarEventForTaskFixture.php} (98%) rename Test/Fixture/{CalendarEventShareUserFixture.php => CalendarEventShareUserForTaskFixture.php} (67%) rename Test/Fixture/{CalendarFixture.php => CalendarForTaskFixture.php} (70%) rename Test/Fixture/{CalendarFrameSettingFixture.php => CalendarFrameSettingForTaskFixture.php} (72%) rename Test/Fixture/{CalendarFrameSettingSelectRoomFixture.php => CalendarFrameSettingSelectRoomForTaskFixture.php} (77%) rename Test/Fixture/{CalendarRruleFixture.php => CalendarRruleForTaskFixture.php} (96%) diff --git a/Test/Case/Controller/TaskContentEditController/EditTest.php b/Test/Case/Controller/TaskContentEditController/EditTest.php index 0017d6a..e7b0933 100644 --- a/Test/Case/Controller/TaskContentEditController/EditTest.php +++ b/Test/Case/Controller/TaskContentEditController/EditTest.php @@ -25,13 +25,13 @@ class TaskContentEditControllerEditTest extends WorkflowControllerEditTest { * @var array */ public $fixtures = array( - 'plugin.calendars.calendar', - 'plugin.calendars.calendar_event', - 'plugin.calendars.calendar_frame_setting', - 'plugin.calendars.calendar_frame_setting_select_room', - 'plugin.calendars.calendar_rrule', - 'plugin.calendars.calendar_event_share_user', - 'plugin.calendars.calendar_event_content', + 'plugin.tasks.calendar_for_task', + 'plugin.tasks.calendar_event_for_task', + 'plugin.tasks.calendar_frame_setting_for_task', + 'plugin.tasks.calendar_frame_setting_select_room_for_task', + 'plugin.tasks.calendar_rrule_for_task', + 'plugin.tasks.calendar_event_share_user_for_task', + 'plugin.tasks.calendar_event_content_for_task', 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', diff --git a/Test/Case/Controller/TaskContentsController/ViewTest.php b/Test/Case/Controller/TaskContentsController/ViewTest.php index f6c955a..0e787c5 100644 --- a/Test/Case/Controller/TaskContentsController/ViewTest.php +++ b/Test/Case/Controller/TaskContentsController/ViewTest.php @@ -25,13 +25,13 @@ class TaskContentsControllerViewTest extends WorkflowControllerViewTest { * @var array */ public $fixtures = array( - 'plugin.calendars.calendar', - 'plugin.calendars.calendar_event', - 'plugin.calendars.calendar_frame_setting', - 'plugin.calendars.calendar_frame_setting_select_room', - 'plugin.calendars.calendar_rrule', - 'plugin.calendars.calendar_event_share_user', - 'plugin.calendars.calendar_event_content', + 'plugin.tasks.calendar_for_task', + 'plugin.tasks.calendar_event_for_task', + 'plugin.tasks.calendar_frame_setting_for_task', + 'plugin.tasks.calendar_frame_setting_select_room_for_task', + 'plugin.tasks.calendar_rrule_for_task', + 'plugin.tasks.calendar_event_share_user_for_task', + 'plugin.tasks.calendar_event_content_for_task', 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', diff --git a/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php b/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php index 2cebf7f..ecb55dd 100644 --- a/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php +++ b/Test/Case/Model/TaskContent/DeleteContentByKeyTest.php @@ -28,13 +28,13 @@ class TaskContentDeleteContentByKeyTest extends NetCommonsModelTestCase { * @var array */ public $fixtures = array( - 'plugin.calendars.calendar', - 'plugin.calendars.calendar_event', - 'plugin.calendars.calendar_frame_setting', - 'plugin.calendars.calendar_frame_setting_select_room', - 'plugin.calendars.calendar_rrule', - 'plugin.calendars.calendar_event_share_user', - 'plugin.calendars.calendar_event_content', + 'plugin.tasks.calendar_for_task', + 'plugin.tasks.calendar_event_for_task', + 'plugin.tasks.calendar_frame_setting_for_task', + 'plugin.tasks.calendar_frame_setting_select_room_for_task', + 'plugin.tasks.calendar_rrule_for_task', + 'plugin.tasks.calendar_event_share_user_for_task', + 'plugin.tasks.calendar_event_content_for_task', 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', diff --git a/Test/Case/Model/TaskContent/SaveContentTest.php b/Test/Case/Model/TaskContent/SaveContentTest.php index 14e5bb3..9483e84 100644 --- a/Test/Case/Model/TaskContent/SaveContentTest.php +++ b/Test/Case/Model/TaskContent/SaveContentTest.php @@ -27,13 +27,13 @@ class TaskContentSaveContentTest extends WorkflowSaveTest { * @var array */ public $fixtures = array( - 'plugin.calendars.calendar', - 'plugin.calendars.calendar_event', - 'plugin.calendars.calendar_frame_setting', - 'plugin.calendars.calendar_frame_setting_select_room', - 'plugin.calendars.calendar_rrule', - 'plugin.calendars.calendar_event_share_user', - 'plugin.calendars.calendar_event_content', + 'plugin.tasks.calendar_for_task', + 'plugin.tasks.calendar_event_for_task', + 'plugin.tasks.calendar_frame_setting_for_task', + 'plugin.tasks.calendar_frame_setting_select_room_for_task', + 'plugin.tasks.calendar_rrule_for_task', + 'plugin.tasks.calendar_event_share_user_for_task', + 'plugin.tasks.calendar_event_content_for_task', 'plugin.rooms.room_role', 'plugin.categories.category', 'plugin.categories.category_order', diff --git a/Test/Case/Model/TaskContent/SetReminderMailTest.php b/Test/Case/Model/TaskContent/SetReminderMailTest.php index 9925742..b67d02b 100644 --- a/Test/Case/Model/TaskContent/SetReminderMailTest.php +++ b/Test/Case/Model/TaskContent/SetReminderMailTest.php @@ -34,15 +34,15 @@ class TaskContentSetReminderMailTest extends NetCommonsModelTestCase { * @var array */ public $fixtures = array( - 'plugin.calendars.calendar', - 'plugin.calendars.calendar_event', - 'plugin.calendars.calendar_frame_setting', - 'plugin.calendars.calendar_frame_setting_select_room', - 'plugin.calendars.calendar_rrule', - 'plugin.calendars.calendar_event_share_user', - 'plugin.calendars.calendar_event_content', + 'plugin.tasks.calendar_for_task', + 'plugin.tasks.calendar_event_for_task', + 'plugin.tasks.calendar_frame_setting_for_task', + 'plugin.tasks.calendar_frame_setting_select_room_for_task', + 'plugin.tasks.calendar_rrule_for_task', + 'plugin.tasks.calendar_event_share_user_for_task', + 'plugin.tasks.calendar_event_content_for_task', 'plugin.rooms.room_role', -// 'plugin.calendars.event_content', +// 'plugin.tasks.event_content', 'plugin.categories.category', 'plugin.categories.category_order', 'plugin.categories.categories_language', diff --git a/Test/Fixture/CalendarEventContentFixture.php b/Test/Fixture/CalendarEventContentForTaskFixture.php similarity index 62% rename from Test/Fixture/CalendarEventContentFixture.php rename to Test/Fixture/CalendarEventContentForTaskFixture.php index da86aee..b17400c 100644 --- a/Test/Fixture/CalendarEventContentFixture.php +++ b/Test/Fixture/CalendarEventContentForTaskFixture.php @@ -9,11 +9,33 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarEventContentFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarEventContentFixture */ -class CalendarEventContentFixture extends CakeTestFixture { +class CalendarEventContentForTaskFixture extends CalendarEventContentFixture { + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + + /** + * Model name + * + * @var string + */ + public $name = 'CalendarEventContents'; + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_event_contents'; + /** * Records * @@ -32,15 +54,4 @@ class CalendarEventContentFixture extends CakeTestFixture { ), ); -/** - * Initialize the fixture. - * - * @return void - */ - public function init() { - require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; - $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; - parent::init(); - } - } diff --git a/Test/Fixture/CalendarEventFixture.php b/Test/Fixture/CalendarEventForTaskFixture.php similarity index 98% rename from Test/Fixture/CalendarEventFixture.php rename to Test/Fixture/CalendarEventForTaskFixture.php index afe558d..e921c31 100644 --- a/Test/Fixture/CalendarEventFixture.php +++ b/Test/Fixture/CalendarEventForTaskFixture.php @@ -9,11 +9,34 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarEventFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarEventFixture */ -class CalendarEventFixture extends CakeTestFixture { +class CalendarEventForTaskFixture extends CalendarEventFixture { + + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + /** + * Model name + * + * @var string + */ + public $name = 'CalendarEvents'; + + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_events'; + /** * Records * @@ -921,15 +944,4 @@ class CalendarEventFixture extends CakeTestFixture { ), ); -/** - * Initialize the fixture. - * - * @return void - */ - public function init() { - require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; - $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; - parent::init(); - } - } diff --git a/Test/Fixture/CalendarEventShareUserFixture.php b/Test/Fixture/CalendarEventShareUserForTaskFixture.php similarity index 67% rename from Test/Fixture/CalendarEventShareUserFixture.php rename to Test/Fixture/CalendarEventShareUserForTaskFixture.php index b2d74fe..6746d76 100644 --- a/Test/Fixture/CalendarEventShareUserFixture.php +++ b/Test/Fixture/CalendarEventShareUserForTaskFixture.php @@ -9,11 +9,34 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarEventShareUserFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarEventShareUserFixture */ -class CalendarEventShareUserFixture extends CakeTestFixture { +class CalendarEventShareUserForTaskFixture extends CalendarEventShareUserFixture { + + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + /** + * Model name + * + * @var string + */ + public $name = 'CalendarEventShareUsers'; + + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_event_share_users'; + /** * Records * @@ -39,16 +62,4 @@ class CalendarEventShareUserFixture extends CakeTestFixture { 'modified' => '2016-03-24 07:09:58' ), ); - -/** - * Initialize the fixture. - * - * @return void - */ - public function init() { - require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; - $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; - parent::init(); - } - } diff --git a/Test/Fixture/CalendarFixture.php b/Test/Fixture/CalendarForTaskFixture.php similarity index 70% rename from Test/Fixture/CalendarFixture.php rename to Test/Fixture/CalendarForTaskFixture.php index 2dc0dd8..d8ae2b1 100644 --- a/Test/Fixture/CalendarFixture.php +++ b/Test/Fixture/CalendarForTaskFixture.php @@ -9,11 +9,33 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarFixture */ -class CalendarFixture extends CakeTestFixture { +class CalendarForTaskFixture extends CalendarFixture { + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + + /** + * Model name + * + * @var string + */ + public $name = 'Calendars'; + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendars'; + /** * Records * @@ -39,16 +61,4 @@ class CalendarFixture extends CakeTestFixture { 'modified' => '2016-03-24 07:10:30' ), ); - -/** - * Initialize the fixture. - * - * @return void - */ - public function init() { - require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; - $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; - parent::init(); - } - } diff --git a/Test/Fixture/CalendarFrameSettingFixture.php b/Test/Fixture/CalendarFrameSettingForTaskFixture.php similarity index 72% rename from Test/Fixture/CalendarFrameSettingFixture.php rename to Test/Fixture/CalendarFrameSettingForTaskFixture.php index 2f857f9..dfa43b9 100644 --- a/Test/Fixture/CalendarFrameSettingFixture.php +++ b/Test/Fixture/CalendarFrameSettingForTaskFixture.php @@ -9,11 +9,33 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarFrameSettingFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarFrameSettingFixture */ -class CalendarFrameSettingFixture extends CakeTestFixture { +class CalendarFrameSettingForTaskFixture extends CalendarFrameSettingFixture { + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + + /** + * Model name + * + * @var string + */ + public $name = 'CalendarFrameSettings'; + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_frame_settings'; + /** * Records * diff --git a/Test/Fixture/CalendarFrameSettingSelectRoomFixture.php b/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php similarity index 77% rename from Test/Fixture/CalendarFrameSettingSelectRoomFixture.php rename to Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php index 09aeb6d..eaa6b15 100644 --- a/Test/Fixture/CalendarFrameSettingSelectRoomFixture.php +++ b/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php @@ -9,11 +9,34 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarFrameSettingSelectRoomFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarFrameSettingSelectRoomFixture */ -class CalendarFrameSettingSelectRoomFixture extends CakeTestFixture { +class CalendarFrameSettingSelectRoomForTaskFixture extends CalendarFrameSettingSelectRoomFixture { + + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + + /** + * Model name + * + * @var string + */ + public $name = 'CalendarFrameSettingSelectRooms'; + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_frame_setting_select_rooms'; + /** * Records * diff --git a/Test/Fixture/CalendarRruleFixture.php b/Test/Fixture/CalendarRruleForTaskFixture.php similarity index 96% rename from Test/Fixture/CalendarRruleFixture.php rename to Test/Fixture/CalendarRruleForTaskFixture.php index fae3d80..8c0f3ce 100644 --- a/Test/Fixture/CalendarRruleFixture.php +++ b/Test/Fixture/CalendarRruleForTaskFixture.php @@ -9,11 +9,34 @@ * @copyright Copyright 2014, NetCommons Project */ +App::uses('CalendarRruleFixture', 'Calendars.Test/Fixture'); + /** * Summary for CalendarRruleFixture */ -class CalendarRruleFixture extends CakeTestFixture { +class CalendarRruleForTaskFixture extends CalendarRruleFixture { + + /** + * Plugin key + * + * @var string + */ + public $pluginKey = 'calendars'; + + /** + * Model name + * + * @var string + */ + public $name = 'CalendarRrules'; + /** + * Full Table Name + * + * @var string + */ + public $table = 'calendar_rrules'; + /** * Records * diff --git a/composer.json b/composer.json index 203255e..e371ebf 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "cakedc/migrations": "~2.2", "netcommons/blocks": "@dev", "netcommons/categories": "@dev", - "netcommons/calendars": "@dev", + "netcommons/calendars": "@dev", "netcommons/content-comments": "@dev", "netcommons/groups": "@dev", "netcommons/mails": "@dev", From 13c2ea64197fb8725d8a880c7cce4f874b4de1c9 Mon Sep 17 00:00:00 2001 From: kitatsuji Date: Tue, 1 Aug 2017 10:48:36 +0900 Subject: [PATCH 7/7] =?UTF-8?q?Travis=E3=82=A8=E3=83=A9=E3=83=BC=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/TaskContentEditController.php | 6 ++- Model/TaskContent.php | 12 ++--- .../CalendarEventContentForTaskFixture.php | 51 ++++++++++-------- Test/Fixture/CalendarEventForTaskFixture.php | 50 +++++++++-------- .../CalendarEventShareUserForTaskFixture.php | 53 +++++++++--------- Test/Fixture/CalendarForTaskFixture.php | 54 ++++++++++--------- .../CalendarFrameSettingForTaskFixture.php | 41 +++++++------- ...arFrameSettingSelectRoomForTaskFixture.php | 41 ++++++-------- Test/Fixture/CalendarRruleForTaskFixture.php | 40 ++++++-------- Test/Fixture/RoomsLanguageForTaskFixture.php | 12 ++--- .../TaskContentEdit/task_period_edit_form.ctp | 32 +++++------ 11 files changed, 197 insertions(+), 195 deletions(-) diff --git a/Controller/TaskContentEditController.php b/Controller/TaskContentEditController.php index f357dfb..59308b0 100644 --- a/Controller/TaskContentEditController.php +++ b/Controller/TaskContentEditController.php @@ -152,7 +152,8 @@ public function edit() { return $this->throwBadRequest(); } - $calendarKey = $taskContent['TaskContent']['calendar_key']; //ADD カレンダ連携キーの取り出し + //ADD カレンダ連携キーの取り出し + $calendarKey = $taskContent['TaskContent']['calendar_key']; $taskContent['TaskContent']['use_calendar'] = ($calendarKey == "") ? 0 : 1; if (! $this->request->data) { $this->request->data = $taskContent; @@ -173,7 +174,8 @@ public function edit() { $this->_taskSetting['TaskSetting']['task_key']; $this->request->data['TaskContent']['key'] = $key; - $this->request->data['TaskContent']['calendar_key'] = $calendarKey; //ADD カレンダー連携キー転写 + //ADD カレンダー連携キー転写 + $this->request->data['TaskContent']['calendar_key'] = $calendarKey; // set status $status = $this->Workflow->parseStatus(); diff --git a/Model/TaskContent.php b/Model/TaskContent.php index 09f4552..cddf5f8 100644 --- a/Model/TaskContent.php +++ b/Model/TaskContent.php @@ -652,11 +652,11 @@ public function saveContent($data) { //カレンダー連携ここから ADD $cmd = 'del'; if ($data['TaskContent']['is_date_set']) { - $cmd =($data['TaskContent']['use_calendar']) ? 'save' : 'del'; + $cmd = ($data['TaskContent']['use_calendar']) ? 'save' : 'del'; } - if ($cmd==='save') { + if ($cmd === 'save') { //実施期間設定あり&&カレンダー登録する - $this->loadModels([ + $this->loadModels([ 'CalendarActionPlan' => 'Calendars.CalendarActionPlan', ]); @@ -718,7 +718,7 @@ public function saveContent($data) { 'isDelRepeat' => false, //tasksはfalse固定 )); $delCalendarKey = $this->CalendarDeleteActionPlan->deletePlanForLink($data); -// if ($data['TaskContent']['calendar_key'] == $delCalendarKey) { + //if ($data['TaskContent']['calendar_key'] == $delCalendarKey) { //削除が成功したので、calenar_keyをクリアし、use_calendarをOFFにして、 //TaskContentにsave(update)しておく。 $data['TaskContent']['calendar_key'] = ''; @@ -728,7 +728,7 @@ public function saveContent($data) { throw new InternalErrorException(__d('net_commons', 'Internal Server Error')); } $data['TaskContent'] = $savedData['TaskContent']; -// } + //} $this->CalendarDeleteActionPlan->Behaviors->unload('Calendars.CalendarLink'); } else { //calendar_keyが記録されていないので、なにもしない @@ -861,7 +861,7 @@ public function deleteContentByKey($key) { } //カレンダー連携ここから ADD - $this->loadModels([ + $this->loadModels([ 'CalendarDeleteActionPlan' => 'Calendars.CalendarDeleteActionPlan', ]); //削除用settings指定 diff --git a/Test/Fixture/CalendarEventContentForTaskFixture.php b/Test/Fixture/CalendarEventContentForTaskFixture.php index b17400c..1158840 100644 --- a/Test/Fixture/CalendarEventContentForTaskFixture.php +++ b/Test/Fixture/CalendarEventContentForTaskFixture.php @@ -1,12 +1,6 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project + * CalendarEventContentForTaskFixture */ App::uses('CalendarEventContentFixture', 'Calendars.Test/Fixture'); @@ -15,27 +9,28 @@ * Summary for CalendarEventContentFixture */ class CalendarEventContentForTaskFixture extends CalendarEventContentFixture { - /** - * Plugin key - * - * @var string - */ + +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarEventContents'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_event_contents'; - + /** * Records * @@ -54,4 +49,14 @@ class CalendarEventContentForTaskFixture extends CalendarEventContentFixture { ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/CalendarEventForTaskFixture.php b/Test/Fixture/CalendarEventForTaskFixture.php index e921c31..b07eeed 100644 --- a/Test/Fixture/CalendarEventForTaskFixture.php +++ b/Test/Fixture/CalendarEventForTaskFixture.php @@ -1,12 +1,6 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project + * CalendarEventForTaskFixture */ App::uses('CalendarEventFixture', 'Calendars.Test/Fixture'); @@ -16,27 +10,27 @@ */ class CalendarEventForTaskFixture extends CalendarEventFixture { - /** - * Plugin key - * - * @var string - */ +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarEvents'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_events'; - + /** * Records * @@ -944,4 +938,14 @@ class CalendarEventForTaskFixture extends CalendarEventFixture { ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/CalendarEventShareUserForTaskFixture.php b/Test/Fixture/CalendarEventShareUserForTaskFixture.php index 6746d76..b0100d5 100644 --- a/Test/Fixture/CalendarEventShareUserForTaskFixture.php +++ b/Test/Fixture/CalendarEventShareUserForTaskFixture.php @@ -1,42 +1,36 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project */ -App::uses('CalendarEventShareUserFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarEventShareUserForTaskFixture', 'Calendars.Test/Fixture'); /** * Summary for CalendarEventShareUserFixture */ class CalendarEventShareUserForTaskFixture extends CalendarEventShareUserFixture { - /** - * Plugin key - * - * @var string - */ +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarEventShareUsers'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_event_share_users'; - + /** * Records * @@ -55,11 +49,22 @@ class CalendarEventShareUserForTaskFixture extends CalendarEventShareUserFixture array( 'id' => 2, 'calendar_event_id' => 27, - 'share_user' => 3, //編集長と共有 + 'share_user' => 3, 'created_user' => 1, 'created' => '2016-03-24 07:09:58', 'modified_user' => 1, 'modified' => '2016-03-24 07:09:58' ), ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/CalendarForTaskFixture.php b/Test/Fixture/CalendarForTaskFixture.php index d8ae2b1..18ab022 100644 --- a/Test/Fixture/CalendarForTaskFixture.php +++ b/Test/Fixture/CalendarForTaskFixture.php @@ -1,41 +1,36 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project */ -App::uses('CalendarFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarForTaskFixture', 'Calendars.Test/Fixture'); /** * Summary for CalendarFixture */ class CalendarForTaskFixture extends CalendarFixture { - /** - * Plugin key - * - * @var string - */ + +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'Calendars'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendars'; - + /** * Records * @@ -45,7 +40,6 @@ class CalendarForTaskFixture extends CalendarFixture { array( 'id' => 1, 'block_key' => 'block_1', - //'use_workflow' => 1, 'created_user' => 1, 'created' => '2016-03-24 07:10:30', 'modified_user' => 1, @@ -54,11 +48,21 @@ class CalendarForTaskFixture extends CalendarFixture { array( 'id' => 2, 'block_key' => 'block_1', - //'use_workflow' => 1, 'created_user' => 1, 'created' => '2016-03-24 07:10:30', 'modified_user' => 1, 'modified' => '2016-03-24 07:10:30' ), ); + +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Calendars') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/CalendarFrameSettingForTaskFixture.php b/Test/Fixture/CalendarFrameSettingForTaskFixture.php index dfa43b9..da95600 100644 --- a/Test/Fixture/CalendarFrameSettingForTaskFixture.php +++ b/Test/Fixture/CalendarFrameSettingForTaskFixture.php @@ -1,41 +1,36 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project */ -App::uses('CalendarFrameSettingFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarFrameSettingForTaskFixture', 'Calendars.Test/Fixture'); /** * Summary for CalendarFrameSettingFixture */ class CalendarFrameSettingForTaskFixture extends CalendarFrameSettingFixture { - /** - * Plugin key - * - * @var string - */ + +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarFrameSettings'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_frame_settings'; - + /** * Records * diff --git a/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php b/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php index eaa6b15..8d4912d 100644 --- a/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php +++ b/Test/Fixture/CalendarFrameSettingSelectRoomForTaskFixture.php @@ -1,42 +1,36 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project */ -App::uses('CalendarFrameSettingSelectRoomFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarFrameSettingSelectRoomForTaskFixture', 'Calendars.Test/Fixture'); /** * Summary for CalendarFrameSettingSelectRoomFixture */ class CalendarFrameSettingSelectRoomForTaskFixture extends CalendarFrameSettingSelectRoomFixture { - /** - * Plugin key - * - * @var string - */ +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarFrameSettingSelectRooms'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_frame_setting_select_rooms'; - + /** * Records * @@ -91,5 +85,4 @@ public function init() { $this->fields = (new CalendarsSchema())->tables[Inflector::tableize($this->name)]; parent::init(); } - } \ No newline at end of file diff --git a/Test/Fixture/CalendarRruleForTaskFixture.php b/Test/Fixture/CalendarRruleForTaskFixture.php index 8c0f3ce..dc4e630 100644 --- a/Test/Fixture/CalendarRruleForTaskFixture.php +++ b/Test/Fixture/CalendarRruleForTaskFixture.php @@ -1,42 +1,36 @@ - * @author AllCreator - * @link http://www.netcommons.org NetCommons Project - * @license http://www.netcommons.org/license.txt NetCommons License - * @copyright Copyright 2014, NetCommons Project */ -App::uses('CalendarRruleFixture', 'Calendars.Test/Fixture'); +App::uses('CalendarRruleForTaskFixture', 'Calendars.Test/Fixture'); /** * Summary for CalendarRruleFixture */ class CalendarRruleForTaskFixture extends CalendarRruleFixture { - /** - * Plugin key - * - * @var string - */ +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'calendars'; - /** - * Model name - * - * @var string - */ +/** + * Model name + * + * @var string + */ public $name = 'CalendarRrules'; - /** - * Full Table Name - * - * @var string - */ +/** + * Full Table Name + * + * @var string + */ public $table = 'calendar_rrules'; - + /** * Records * diff --git a/Test/Fixture/RoomsLanguageForTaskFixture.php b/Test/Fixture/RoomsLanguageForTaskFixture.php index 8161cda..3ba69bb 100644 --- a/Test/Fixture/RoomsLanguageForTaskFixture.php +++ b/Test/Fixture/RoomsLanguageForTaskFixture.php @@ -19,13 +19,13 @@ */ class RoomsLanguageForTaskFixture extends RoomsLanguageFixture { - /** - * Plugin key - * - * @var string - */ +/** + * Plugin key + * + * @var string + */ public $pluginKey = 'tasks'; - + /** * Model name * diff --git a/View/Elements/TaskContentEdit/task_period_edit_form.ctp b/View/Elements/TaskContentEdit/task_period_edit_form.ctp index bc9ee61..37154cb 100644 --- a/View/Elements/TaskContentEdit/task_period_edit_form.ctp +++ b/View/Elements/TaskContentEdit/task_period_edit_form.ctp @@ -86,22 +86,22 @@ NetCommonsForm->checkbox('TaskContent.use_calendar', array( - 'class' => 'text-left pull-left', - )); - ?> - NetCommonsForm->label( - 'TaskContent.use_calendar', - __d('tasks', 'Use calendar') - ); - ?> - NetCommonsForm->error('TaskContent.use_calendar'); + //カレンダー連携登録チェックボックス + echo $this->NetCommonsForm->checkbox('TaskContent.use_calendar', array( + 'class' => 'text-left pull-left', + )); + ?> + NetCommonsForm->label( + 'TaskContent.use_calendar', + __d('tasks', 'Use calendar') + ); + ?> + NetCommonsForm->error('TaskContent.use_calendar'); //ADD - ?> + ?>