diff --git a/Config/Migration/NetCommonsMigration.php b/Config/Migration/NetCommonsMigration.php new file mode 100644 index 00000000..fb1cc57b --- /dev/null +++ b/Config/Migration/NetCommonsMigration.php @@ -0,0 +1,59 @@ + + * @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('CakeMigration', 'Migrations.Lib'); +App::uses('I18n', 'I18n'); + +/** + * NetCommonsMigration + * + * @author Shohei Nakajima + * @package NetCommons\NetCommons\Config\Migration + */ +class NetCommonsMigration extends CakeMigration { + +/** + * Update model records + * + * @param string $model model name to update + * @param string $records records to be stored + * @param string $scope ? + * @return bool Should process continue + */ + public function updateRecords($model, $records, $scope = null) { + $Model = $this->generateModel($model); + foreach ($records as $record) { + $Model->create(); + if (!$Model->save($record, false)) { + return false; + } + } + + return true; + } + +/** + * Load models + * + * @param array $models models to load + * @param string $source data source + * @return void + */ + public function loadModels(array $models = [], $source = 'master') { + foreach ($models as $model => $class) { + $this->$model = ClassRegistry::init($class, true); + if ($this->$model->useDbConfig !== 'test') { + $this->$model->setDataSource($source); + } + } + } + +} diff --git a/Controller/Component/NetCommonsBlockComponent.php b/Controller/Component/NetCommonsBlockComponent.php index cc35b6e1..aa3bd843 100644 --- a/Controller/Component/NetCommonsBlockComponent.php +++ b/Controller/Component/NetCommonsBlockComponent.php @@ -75,7 +75,8 @@ class NetCommonsBlockComponent extends Component { * @var array */ public $components = array( - 'NetCommons.NetCommonsFrame' + 'NetCommons.NetCommonsFrame', + 'NetCommons.NetCommonsRoomRole' ); /** @@ -112,60 +113,15 @@ public function getBlockRolePermissions($blockKey, $permissions) { $this->$model = ClassRegistry::init($class, true); } - //RoomRole取得 - $roomRoles = $this->RoomRole->find('all', array( - 'recursive' => -1, - )); - $roomRoles = Hash::combine($roomRoles, '{n}.RoomRole.role_key', '{n}.RoomRole'); - - //Role取得 - $roles = $this->Role->find('all', array( - 'recursive' => -1, - 'conditions' => array( - 'Role.type' => Role::ROLE_TYPE_ROOM, - 'Role.language_id' => $this->controller->viewVars['languageId'], - ), - )); - $roles = Hash::combine($roles, '{n}.Role.key', '{n}.Role'); - - //DefaultRolePermission取得 - $defaultPermissions = $this->DefaultRolePermission->find('all', array( - 'recursive' => -1, - 'conditions' => array( - 'DefaultRolePermission.permission' => $permissions, - ), - )); - $defaultPermissions = Hash::combine( - $defaultPermissions, - '{n}.DefaultRolePermission.role_key', - '{n}.DefaultRolePermission', - '{n}.DefaultRolePermission.permission' - ); - $defaultPermissions = Hash::remove($defaultPermissions, '{s}.{s}.id'); + //RoomRolePermissions取得 + $roomId = $this->controller->viewVars['roomId']; - //RolesRoomのIDリストを取得 - $rolesRooms = $this->RolesRoom->find('list', array( - 'recursive' => -1, - 'conditions' => array( - 'RolesRoom.room_id' => $this->controller->viewVars['roomId'], - ), - )); - - //RoomRolePermission取得 - $roomRolePermissions = $this->RoomRolePermission->find('all', array( - 'recursive' => 0, - 'conditions' => array( - 'RoomRolePermission.roles_room_id' => $rolesRooms, - 'RoomRolePermission.permission' => $permissions, - ), - )); - $roomRolePermissions = Hash::combine( - $roomRolePermissions, - '{n}.RolesRoom.role_key', - '{n}.RoomRolePermission', - '{n}.RoomRolePermission.permission' - ); - $roomRolePermissions = Hash::remove($roomRolePermissions, '{s}.{s}.id'); + $results = $this->NetCommonsRoomRole->getRoomRolePermissions($roomId, $permissions, DefaultRolePermission::TYPE_ROOM_ROLE); + $defaultPermissions = Hash::remove($results['DefaultRolePermission'], '{s}.{s}.id'); + $roles = $results['Role']; + $rolesRooms = $results['RolesRoom']; + $roomRolePermissions = Hash::remove($results['RoomRolePermission'], '{s}.{s}.id'); + $roomRoles = $results['RoomRole']; //BlockRolePermission取得 $blockPermissions = $this->BlockRolePermission->find('all', array( diff --git a/Controller/Component/NetCommonsFrameComponent.php b/Controller/Component/NetCommonsFrameComponent.php index 17e4c195..439c563f 100644 --- a/Controller/Component/NetCommonsFrameComponent.php +++ b/Controller/Component/NetCommonsFrameComponent.php @@ -46,7 +46,7 @@ public function initialize(Controller $controller) { $models = array( 'Box' => 'Boxes.Box', 'Frame' => 'Frames.Frame', - 'Language' => 'M17n.Language', + //'Language' => 'M17n.Language', ); foreach ($models as $model => $class) { $this->$model = ClassRegistry::init($class); @@ -73,17 +73,24 @@ public function initialize(Controller $controller) { * @return void */ public function setView() { - //set language_id - if (isset($this->controller->viewVars['languageId']) && $this->controller->viewVars['languageId'] === 0) { - $language = $this->Language->findByCode(Configure::read('Config.language')); - $this->controller->set('languageId', $language['Language']['id']); - } - //set frame by id $frame = $this->Frame->findById($this->frameId); $this->data = $frame; $this->__setViewFrame($frame); + + // Find page data from frame + $this->controller->current = $this->data; + + $box = $this->Box->find('first', [ + 'conditions' => [ + 'Box.id' => $this->data['Box']['id'], + ], + ]); + if (isset($box['Page'][0])) { + $this->controller->current['page'] = $box['Page'][0]; + $this->controller->set('cancelUrl', $this->controller->current['page']['permalink']); + } } /** diff --git a/Controller/Component/NetCommonsRoomRoleComponent.php b/Controller/Component/NetCommonsRoomRoleComponent.php index 15cb69e7..279addda 100644 --- a/Controller/Component/NetCommonsRoomRoleComponent.php +++ b/Controller/Component/NetCommonsRoomRoleComponent.php @@ -142,6 +142,105 @@ public function startup(Controller $controller) { } } +/** + * Function to get the data of RoomRolePermmissions. + * e.g.) RoomRolePermmissions controller + * + * @param int $roomId rooms.id + * @param array $permissions permissions + * @param string $type default_role_permissions.type + * @return array Role and Permissions and Rooms data + * - The `DefaultPermissions` data. + * - The `Roles` data. + * - The `RolesRooms` data. + * - The `RoomRolePermissions` data. + * - The `RoomRoles` data. + */ + public function getRoomRolePermissions($roomId, $permissions, $type) { + //戻り値の設定 + $results = array( + 'DefaultRolePermission' => null, + 'Role' => null, + 'RolesRoom' => null, + 'RoomRolePermission' => null, + 'RoomRole' => null, + ); + + //modelのロード + $models = array( + 'DefaultRolePermission' => 'Roles.DefaultRolePermission', + 'Role' => 'Roles.Role', + 'RolesRoom' => 'Rooms.RolesRoom', + 'RoomRole' => 'Rooms.RoomRole', + 'RoomRolePermission' => 'Rooms.RoomRolePermission', + ); + foreach ($models as $model => $class) { + $this->$model = ClassRegistry::init($class, true); + } + + //RoomRole取得 + $roomRoles = $this->RoomRole->find('all', array( + 'recursive' => -1, + )); + $results['RoomRole'] = Hash::combine($roomRoles, '{n}.RoomRole.role_key', '{n}.RoomRole'); + + //Role取得 + $roles = $this->Role->find('all', array( + 'recursive' => -1, + 'conditions' => array( + 'Role.type' => Role::ROLE_TYPE_ROOM, + 'Role.language_id' => Configure::read('Config.languageId'), + ), + )); + $results['Role'] = Hash::combine($roles, '{n}.Role.key', '{n}.Role'); + + //DefaultRolePermission取得 + $defaultPermissions = $this->DefaultRolePermission->find('all', array( + 'recursive' => -1, + 'conditions' => array( + 'DefaultRolePermission.type' => $type, + 'DefaultRolePermission.permission' => $permissions, + ), + )); + $results['DefaultRolePermission'] = Hash::combine( + $defaultPermissions, + '{n}.DefaultRolePermission.role_key', + '{n}.DefaultRolePermission', + '{n}.DefaultRolePermission.permission' + ); + + if (! isset($roomId)) { + return $results; + } + + //RolesRoomのIDリストを取得 + $results['RolesRoom'] = $this->RolesRoom->find('list', array( + 'recursive' => -1, + 'conditions' => array( + 'RolesRoom.room_id' => $roomId, + ), + )); + + //RoomRolePermission取得 + $roomRolePermissions = $this->RoomRolePermission->find('all', array( + 'recursive' => 0, + 'conditions' => array( + 'RoomRolePermission.roles_room_id' => $results['RolesRoom'], + 'RoomRolePermission.permission' => $permissions, + ), + )); + $results['RoomRolePermission'] = Hash::combine( + $roomRolePermissions, + '{n}.RolesRoom.role_key', + '{n}.RoomRolePermission', + '{n}.RoomRolePermission.permission' + ); + //$results['RoomRolePermission'] = Hash::remove($roomRolePermissions, '{s}.{s}.id'); + + //戻り値の設定 + return $results; + } + /** * Checks whether current action is accessible without authentication. * diff --git a/Controller/NetCommonsAppController.php b/Controller/NetCommonsAppController.php index 715d11fa..80526868 100644 --- a/Controller/NetCommonsAppController.php +++ b/Controller/NetCommonsAppController.php @@ -76,10 +76,8 @@ class NetCommonsAppController extends Controller { * @var array */ public $uses = [ - 'Boxes.Box', 'NetCommons.SiteSetting', - 'Pages.Page', - 'Frames.Frame', + 'M17n.Language', ]; /** @@ -124,12 +122,16 @@ public function __construct($request = null, $response = null) { * @return void */ public function beforeFilter() { - if (Configure::read('NetCommons.installed')) { - //現在のテーマを取得 - $theme = $this->Asset->getSiteTheme($this); - if ($theme) { - $this->theme = $theme; - } + Security::setHash('sha512'); + + if (! Configure::read('NetCommons.installed')) { + return; + } + + //現在のテーマを取得 + $theme = $this->Asset->getSiteTheme($this); + if ($theme) { + $this->theme = $theme; } if (isset($this->request->query['language'])) { Configure::write('Config.language', $this->request->query['language']); @@ -137,32 +139,21 @@ public function beforeFilter() { } elseif ($this->Session->check('Config.language')) { Configure::write('Config.language', $this->Session->read('Config.language')); } + //set language_id + $language = $this->Language->findByCode(Configure::read('Config.language')); + Configure::write('Config.languageId', $language['Language']['id']); + $this->set('languageId', $language['Language']['id']); + $this->Auth->allow('index', 'view'); - Security::setHash('sha512'); if ($this->RequestHandler->accepts('json')) { $this->renderJson(); } - $this->set('userId', (int)$this->Auth->user('id')); - - // Find page data from frame - if ($this->NetCommonsFrame && $this->NetCommonsFrame->data) { - $this->current = $this->NetCommonsFrame->data; + $this->set('userId', $this->Auth->user('id')); - $box = $this->Box->find('first', [ - 'conditions' => [ - 'Box.id' => $this->NetCommonsFrame->data['Box']['id'], - ], - ]); - if (isset($box['Page'][0])) { - $this->current['page'] = $box['Page'][0]; - $this->set('cancelUrl', $this->current['page']['permalink']); - } - - $results = $this->camelizeKeyRecursive(['current' => $this->current]); - $this->set($results); - } + $results = $this->camelizeKeyRecursive(['current' => $this->current]); + $this->set($results); } /** diff --git a/Locale/jpn/LC_MESSAGES/net_commons.mo b/Locale/jpn/LC_MESSAGES/net_commons.mo index 3e0062b9..cf7a9138 100644 Binary files a/Locale/jpn/LC_MESSAGES/net_commons.mo and b/Locale/jpn/LC_MESSAGES/net_commons.mo differ diff --git a/Locale/jpn/LC_MESSAGES/net_commons.po b/Locale/jpn/LC_MESSAGES/net_commons.po index 5d4b610e..d2947f1d 100644 --- a/Locale/jpn/LC_MESSAGES/net_commons.po +++ b/Locale/jpn/LC_MESSAGES/net_commons.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"PO-Revision-Date: 2015-06-02 17:11+0900\n" +"PO-Revision-Date: 2015-07-24 06:51+0900\n" "Last-Translator: NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -13,7 +13,7 @@ msgstr "" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "POT-Creation-Date: \n" "Language: ja\n" -"X-Generator: Poedit 1.8.1\n" +"X-Generator: Poedit 1.7.5\n" #: AccessCounters/Model/AccessCounter.php:60;68;75 #: AccessCounters/Model/AccessCounterFrameSetting.php:84;90;97;101 @@ -27,9 +27,12 @@ msgstr "" #: Categories/Model/CategoryOrder.php:43;52;61 #: Categories/Test/Case/Model/CategoryOrderValidateCategoryOrderTest.php:96;124;152 #: Categories/Test/Case/Model/CategoryValidateCategoryTest.php:93;150;178 +#: CircularNotices/Model/CircularNoticeChoice.php:43;49 +#: CircularNotices/Model/CircularNoticeContent.php:64;84;94;98;118;125 +#: CircularNotices/Model/CircularNoticeFrameSetting.php:54;61 #: Comments/Model/Comment.php:43 #: ContentComments/Controller/Component/ContentCommentsComponent.php:137 -#: ContentComments/Model/ContentComment.php:65;72;79;86 +#: ContentComments/Model/ContentComment.php:56;63;70;77 #: Edumap/Model/Edumap.php:116;125;137;173 #: Edumap/Model/EdumapSocialMedium.php:56;62;68 #: Edumap/Model/EdumapStudent.php:52;60;68 @@ -49,13 +52,20 @@ msgstr "" #: Links/Model/LinkOrder.php:43;52;61 Links/Model/LinkSetting.php:43;52 #: NetCommons/Controller/Component/NetCommonsWorkflowComponent.php:44 #: NetCommons/Model/Behavior/PublishableBehavior.php:136;143 -#: Pages/Model/LanguagesPage.php:73;83 Pages/Model/Page.php:172 -#: Questionnaires/Model/Questionnaire.php:120;128;141;173;179;185;195;201;207 -#: Questionnaires/Model/QuestionnaireQuestion.php:91;97;103;115;121;127;133;137;143 +#: Pages/Model/LanguagesPage.php:73;83 Pages/Model/Page.php:173 +#: Questionnaires/Model/Questionnaire.php:102;109;122;148;164;170;176;186;192;198 +#: Questionnaires/Model/QuestionnaireQuestion.php:91;97;103;115;121;127;133;137;143;149 +#: Questionnaires/Test/Case/Model/QuestionnaireQuestionBehaviorTest.php:90;116 +#: Questionnaires/Test/Case/Model/QuestionnaireQuestionValidationTest.php:85;107;129;173;195;217;239 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationBoolTest.php:75;95;118;141;164;187;210;234 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationTest.php:74 #: RssReaders/Model/RssReader.php:102 #: RssReaders/Model/RssReaderFrameSetting.php:52;60 #: RssReaders/Model/RssReaderItem.php:61 #: RssReaders/Test/Case/Model/RssReaderValidateRssReaderTest.php:67 +#: Videos/Model/VideoBlockSetting.php:43;49;55;61;67;73;79;85;91 +#: Videos/Model/VideoFrameSetting.php:71;78;85 +#: Videos/Model/Behavior/VideoValidationBehavior.php:28;82 msgid "Invalid request." msgstr "入力値が不正です。" @@ -67,41 +77,53 @@ msgstr "入力値が不正です。" #: Bbses/Model/BbsArticleTree.php:218 Bbses/Model/BbsArticlesUser.php:102 #: Bbses/Model/BbsFrameSetting.php:156 Bbses/Model/BbsSetting.php:81;85 #: Blocks/Model/Block.php:181;195;202;249;254;263 -#: Blogs/Controller/BlogEntriesEditController.php:83;149 -#: Blogs/Model/Blog.php:181;186;280;284;288 Blogs/Model/BlogEntry.php:263 -#: Blogs/Model/BlogFrameSetting.php:130 Blogs/Model/BlogSetting.php:79;83 +#: Blogs/Controller/BlogEntriesEditController.php:189 +#: Blogs/Model/Blog.php:181;186;280;284;288 +#: Blogs/Model/BlogEntry.php:279;292;331 Blogs/Model/BlogFrameSetting.php:130 +#: Blogs/Model/BlogSetting.php:79;83 #: Categories/Model/Category.php:166;169;178;184;263;268 -#: Comments/Model/Comment.php:114;129 -#: ContentComments/Model/ContentComment.php:143;177 -#: Edumap/Model/Edumap.php:344;464;467;490;497;506;513;560;564;568;572 +#: CircularNotices/Model/CircularNoticeChoice.php:84;97 +#: CircularNotices/Model/CircularNoticeContent.php:384;450;453;456 +#: CircularNotices/Model/CircularNoticeFrameSetting.php:111;123;172 +#: CircularNotices/Model/CircularNoticeSetting.php:112;137;156;222;226 +#: CircularNotices/Model/CircularNoticeTargetUser.php:299;329;355;368 +#: Comments/Model/Comment.php:114;129 Containers/Model/ContainersPage.php:64 +#: ContentComments/Model/ContentComment.php:132;166 +#: Edumap/Model/Edumap.php:344;464;467;502;509;556;560;564;568 +#: Edumap/Model/EdumapSocialMedium.php:109 Edumap/Model/EdumapStudent.php:104 #: Edumap/Model/EdumapVisibilitySetting.php:117 #: Faqs/Model/Faq.php:181;186;281;285;289;293 #: Faqs/Model/FaqQuestion.php:196;205;212;278;289 #: Faqs/Model/FaqQuestionOrder.php:166 Faqs/Model/FaqSetting.php:110;114 #: Files/Model/FileModel.php:178;258;290;342 -#: Frames/Model/Frame.php:151;193;234;253 Iframes/Model/Iframe.php:188;251 +#: Frames/Model/Frame.php:158;200;241;260 Iframes/Model/Iframe.php:188;251 #: Likes/Model/Like.php:157 Links/Model/Link.php:215;224;231;297;308 #: Links/Model/LinkBlock.php:110;206;210;214 #: Links/Model/LinkFrameSetting.php:309 Links/Model/LinkOrder.php:213 #: Links/Model/LinkSetting.php:110;114 -#: NetCommons/Controller/Component/NetCommonsFrameComponent.php:98 +#: NetCommons/Controller/Component/NetCommonsFrameComponent.php:111 #: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:204;223;249 -#: Pages/Model/Page.php:323;328;333;336;358;363;446;449 +#: Notifications/Model/Notification.php:114;119 +#: Pages/Model/Page.php:324;329;334;337;359;364;447;450 #: Pages/Model/Behavior/PageBehavior.php:217;221;239;243 -#: Questionnaires/Model/Questionnaire.php:503;513;519;551 +#: PluginManager/Model/Plugin.php:328;368;372;376 +#: PluginManager/Model/PluginsRole.php:133 +#: PluginManager/Model/PluginsRoom.php:102 +#: Questionnaires/Model/Questionnaire.php:474;484;490;527;537;544 #: Questionnaires/Model/QuestionnaireBlocksSetting.php:69;73 -#: Questionnaires/Model/QuestionnaireChoice.php:160 -#: Questionnaires/Model/QuestionnaireFrameSetting.php:137;286;299 -#: Questionnaires/Model/QuestionnairePage.php:230 -#: Questionnaires/Model/QuestionnaireQuestion.php:239 +#: Questionnaires/Model/QuestionnaireChoice.php:161 +#: Questionnaires/Model/QuestionnaireFrameSetting.php:137;249;262 +#: Questionnaires/Model/QuestionnairePage.php:237 +#: Questionnaires/Model/QuestionnaireQuestion.php:249 #: RssReaders/Model/RssReader.php:238;245;249;258;330;334 #: RssReaders/Model/RssReaderFrameSetting.php:112 #: RssReaders/Model/RssReaderItem.php:203;207;211 -#: SearchBoxes/Model/SearchBox.php:130 -#: Videos/Model/Video.php:304;312;387;395;457;463;524 -#: Videos/Model/VideoBlockSetting.php:256;298;317;325;330;382;387 -#: Videos/Model/VideoFrameSetting.php:162 -#: Videos/Model/VideosAppModel.php:118;121;148;151 +#: SearchBoxes/Model/SearchBox.php:130 Tags/Model/Behavior/TagBehavior.php:63 +#: Videos/Model/Video.php:310;373;381;456;464;526;532;569;577;582;587;592 +#: Videos/Model/VideoBlockSetting.php:246;311;319;327;332;337;342;347;397;402 +#: Videos/Model/VideoFrameSetting.php:178 +#: Videos/Model/Behavior/VideoBehavior.php:67 +#: Videos/Model/Behavior/VideoFileBehavior.php:112;115;142;145 msgid "Internal Server Error" msgstr "Internal Server Error" @@ -111,12 +133,14 @@ msgstr "作成日時" #: AccessCounters/View/AccessCounterBlocks/not_found.ctp:24 #: Announcements/View/AnnouncementBlocks/not_found.ctp:24 -#: Bbses/View/BbsBlocks/not_found.ctp:24 Blogs/View/Blocks/not_found.ctp:24 +#: Bbses/View/BbsBlocks/not_found.ctp:24 +#: Blogs/View/BlogBlocks/not_found.ctp:24 #: Edumap/View/EdumapBlocks/not_found.ctp:24 #: Faqs/View/FaqBlocks/not_found.ctp:24 #: Faqs/View/FaqQuestionOrders/edit.ctp:43 #: Iframes/View/IframeBlocks/not_found.ctp:24 #: Links/View/LinkBlocks/not_found.ctp:24 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:16 #: Questionnaires/View/QuestionnaireBlocks/not_found.ctp:24 #: RssReaders/View/RssReaderBlocks/not_found.ctp:24 #: Videos/View/VideoBlockSettings/not_found.ctp:25 @@ -133,15 +157,17 @@ msgstr "登録されていません。" #: Links/View/Elements/LinkBlocks/delete_form.ctp:14 #: Pages/View/Elements/Pages/delete_form.ctp:28 #: RssReaders/View/Elements/RssReaderBlocks/delete_form.ctp:14 +#: Videos/View/Elements/VideoBlockSettings/delete_form.ctp:17 msgid "Delete all data associated with the %s." msgstr "%sに関連するデータをすべて削除します。
一度削除すると元に戻せません。" #: AccessCounters/View/Elements/AccessCounters/delete_form.ctp:22 #: Announcements/View/Elements/AnnouncementBlocks/delete_form.ctp:25 #: Bbses/View/Elements/BbsBlocks/delete_form.ctp:25 -#: Blogs/View/BlogEntriesEdit/form.ctp:227 +#: Blogs/View/BlogEntriesEdit/form.ctp:194 #: Blogs/View/Elements/Blocks/delete_form.ctp:25 #: Categories/View/Elements/edit_form.ctp:59 +#: CircularNotices/View/Elements/CircularNotices/choice_edit_form.ctp:58 #: Edumap/View/Elements/EdumapBlocks/delete_form.ctp:25 #: Faqs/View/Elements/FaqBlocks/delete_form.ctp:25 #: Iframes/View/Elements/IframeBlocks/delete_form.ctp:25 @@ -156,8 +182,10 @@ msgstr "削除" #: Announcements/View/Elements/AnnouncementBlocks/delete_form.ctp:28 #: Bbses/View/Elements/BbsArticles/delete_form.ctp:35 #: Bbses/View/Elements/BbsBlocks/delete_form.ctp:28 -#: Blogs/View/BlogEntriesEdit/form.ctp:228 +#: Blogs/View/BlogEntriesEdit/form.ctp:195 #: Blogs/View/Elements/Blocks/delete_form.ctp:28 +#: CircularNotices/View/Elements/CircularNotices/delete_form.ctp:17 +#: ContentComments/View/Elements/index.ctp:238 #: Edumap/View/Elements/EdumapBlocks/delete_form.ctp:28 #: Faqs/View/Elements/FaqBlocks/delete_form.ctp:28 #: Faqs/View/Elements/FaqQuestions/delete_form.ctp:38 @@ -166,14 +194,18 @@ msgstr "削除" #: Links/View/Elements/Links/delete_form.ctp:38 #: Pages/View/Elements/Pages/delete_form.ctp:38 #: RssReaders/View/Elements/RssReaderBlocks/delete_form.ctp:28 +#: Videos/View/Elements/VideoBlockSettings/delete_form.ctp:22 +#: Videos/View/VideosEdit/edit.ctp:147 msgid "Deleting the %s. Are you sure to proceed?" msgstr "%sを削除します。本当によろしいですか。" #: Announcements/Model/Announcement.php:106 Bbses/Model/Bbs.php:109 #: Bbses/Model/BbsArticle.php:113;120 Blogs/Model/Blog.php:110 -#: Categories/Model/Category.php:102 +#: Blogs/Model/BlogEntry.php:70;80;90 Categories/Model/Category.php:102 #: Categories/Test/Case/Model/CategoryValidateCategoryTest.php:121 -#: ContentComments/Model/ContentComment.php:92 +#: CircularNotices/Model/CircularNoticeContent.php:48;54;68;74;80;90;114 +#: CircularNotices/Model/CircularNoticeTargetUser.php:53 +#: ContentComments/Model/ContentComment.php:83 #: Edumap/Model/Edumap.php:143;150;157;168;179;186;204 #: Edumap/Test/Case/Model/EdumapValidateEdumapTest.php:125;162;199;236;273;310;347 #: Faqs/Model/Faq.php:110 Faqs/Model/FaqQuestion.php:115;123 @@ -182,18 +214,20 @@ msgstr "%sを削除します。本当によろしいですか。" #: Iframes/Model/Iframe.php:101 #: Iframes/Test/Case/Model/IframeValidateTest.php:80 #: Links/Model/Link.php:125;139 Links/Model/LinkBlock.php:142 -#: Pages/Model/LanguagesPage.php:66 Pages/Model/Page.php:165 -#: Questionnaires/Model/Questionnaire.php:134 +#: Pages/Model/LanguagesPage.php:66 Pages/Model/Page.php:166 +#: Questionnaires/Model/Questionnaire.php:115 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationTest.php:93 #: RssReaders/Model/RssReader.php:116;129 #: RssReaders/Model/RssReaderItem.php:70;77 #: RssReaders/Test/Case/Model/RssReaderItemValidateRssReaderItemsTest.php:34;80 #: RssReaders/Test/Case/Model/RssReaderValidateRssReaderTest.php:92;133 -#: Videos/Model/Video.php:109 Videos/Model/VideoBlockSetting.php:232 +#: Videos/Model/VideoBlockSetting.php:221 +#: Videos/Model/Behavior/VideoValidationBehavior.php:35;89 msgid "Please input %s." msgstr "%sを入力してください" #: Announcements/View/AnnouncementBlocks/index.ctp:43 -#: Blogs/View/Blocks/index.ctp:43 Edumap/View/EdumapBlocks/index.ctp:40 +#: Blogs/View/BlogBlocks/index.ctp:43 Edumap/View/EdumapBlocks/index.ctp:40 #: Faqs/View/FaqBlocks/index.ctp:40 Iframes/View/IframeBlocks/index.ctp:40 #: Links/View/LinkBlocks/index.ctp:40 #: Questionnaires/View/Elements/FrameSettings/edit_display_questionnaire.ctp:36 @@ -205,18 +239,20 @@ msgstr "更新日" #: Announcements/View/Announcements/view.ctp:16 #: Bbses/View/Elements/BbsArticles/breadcrumb.ctp:63 #: Bbses/View/Elements/BbsArticles/edit_link.ctp:26 -#: Blogs/View/BlogEntries/view.ctp:47 Edumap/View/Edumap/view.ctp:23 +#: CircularNotices/View/CircularNotices/index.ctp:107 +#: Edumap/View/Edumap/view.ctp:23 #: Faqs/View/Elements/FaqQuestions/article.ctp:59 #: RssReaders/View/RssReaders/view.ctp:36 Videos/View/Videos/view.ctp:37 msgid "Edit" msgstr "編集" -#: Auth/View/Auth/login.ctp:26 NetCommons/View/Elements/common_header.ctp:51 +#: Auth/View/Auth/login.ctp:26 NetCommons/View/Elements/common_header.ctp:54 msgid "Login" msgstr "ログイン" #: Bbses/View/Elements/BbsArticles/comment_status_label.ctp:15 -#: NetCommons/View/Elements/status_label.ctp:15 +#: CircularNotices/View/Elements/CircularNotices/status_label.ctp:23 +#: NetCommons/View/Elements/status_label.ctp:16 #: Questionnaires/View/Elements/edit_status_selector.ctp:19 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:19 #: Questionnaires/View/Elements/status_label.ctp:13 @@ -230,29 +266,34 @@ msgid "Danger Zone" msgstr "" #: Blocks/View/Elements/edit_form.ctp:32 +#: CircularNotices/View/CircularNotices/view.ctp:219 +#: ContentComments/View/Elements/index.ctp:163 #: Faqs/View/FaqQuestionOrders/edit.ctp:89 Links/View/LinkOrders/edit.ctp:84 #: NetCommons/View/Elements/workflow_buttons.ctp:14 -#: Pages/View/Pages/edit.ctp:36 +#: Pages/View/Elements/edit_layout.ctp:98 Pages/View/Pages/edit.ctp:36 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:84 +#: PluginManager/View/PluginManager/view.ctp:135 #: Questionnaires/View/Elements/FrameSettings/edit_form.ctp:47 #: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:12 -#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:97 -#: Questionnaires/View/QuestionnaireBlocksSettings/edit.ctp:66 +#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:93 +#: Questionnaires/View/QuestionnaireAnswers/test_mode.ctp:121 #: Questionnaires/View/QuestionnairePage/setting.ctp:31 -#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:320 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:204 -#: Questionnaires/View/Questionnaires/add.ctp:129 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:365 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:198 +#: Questionnaires/View/Questionnaires/add.ctp:117 msgid "Cancel" msgstr "キャンセル" #: Blocks/View/Elements/edit_form.ctp:35 +#: CircularNotices/View/CircularNotices/view.ctp:227 #: Faqs/View/FaqQuestionOrders/edit.ctp:92 -#: Frames/View/Elements/setting_header.ctp:100 +#: Frames/View/Elements/setting_header.ctp:101 #: Links/View/LinkOrders/edit.ctp:87 #: NetCommons/View/Elements/workflow_buttons.ctp:45;52 -#: Pages/View/Pages/edit.ctp:39 +#: Pages/View/Elements/edit_layout.ctp:101 Pages/View/Pages/edit.ctp:39 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:87 #: Questionnaires/View/Elements/FrameSettings/edit_form.ctp:50 -#: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:47;54 -#: Questionnaires/View/QuestionnaireBlocksSettings/edit.ctp:76 +#: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:47;57 msgid "OK" msgstr "決定" @@ -261,6 +302,29 @@ msgstr "決定" msgid "Role permission settings" msgstr "権限設定" +#: Blogs/Controller/BlogEntriesEditController.php:148;185 +#: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:141 +#: Questionnaires/Controller/QuestionnaireAnswerSummariesController.php:110 +#: Questionnaires/Controller/QuestionnairesController.php:216 +msgid "Permission denied" +msgstr "アクセスができません。" + +#: CircularNotices/Controller/CircularNoticesAppController.php:125 +#: NetCommons/View/Elements/setting_tabs.ctp:31 +msgid "Frame settings" +msgstr "表示方法変更" + +#: CircularNotices/Model/CircularNoticeContent.php:104 +msgid "Pleas input boolean." +msgstr "" + +#: CircularNotices/View/CircularNotices/index.ctp:45 +#: Pages/View/Elements/add_plugin.ctp:60 +#: Questionnaires/View/Elements/Questionnaires/add_button.ctp:14 +#: Videos/View/Videos/index.ctp:36 +msgid "Add" +msgstr "追加" + #: Comments/Model/Comment.php:57 Comments/View/Elements/form.ctp:28 #: Faqs/Test/Case/Model/FaqQuestionValidateFaqQuestionTest.php:458 #: RssReaders/Test/Case/Model/RssReaderValidateRssReaderTest.php:271 @@ -276,15 +340,15 @@ msgid "Please enter comments to the person in charge." msgstr "担当者へコメントがあれば、入力して下さい。" #: Comments/View/Elements/index.ctp:48 -#: ContentComments/View/Elements/index.ctp:217 Videos/View/Videos/view.ctp:252 +#: ContentComments/View/Elements/index.ctp:251 Videos/View/Videos/view.ctp:255 msgid "More" msgstr "もっと見る" #: ContentComments/Controller/Component/ContentCommentsComponent.php:138;141 -#: NetCommons/Controller/NetCommonsAppController.php:270;304;310 +#: NetCommons/Controller/NetCommonsAppController.php:287;324;330 #: NetCommons/Controller/Component/NetCommonsWorkflowComponent.php:45;48 -#: Questionnaires/Controller/QuestionnaireQuestionsController.php:79;114;139;169 -#: Questionnaires/Controller/QuestionnairesController.php:258;305 +#: Questionnaires/Controller/QuestionnaireQuestionsController.php:85;123;148;178 +#: Questionnaires/Controller/QuestionnairesController.php:321;368 msgid "Bad Request" msgstr "不正なリクエストの可能性があります" @@ -318,7 +382,7 @@ msgid "In draft" msgstr "一時保存" #: Faqs/View/Elements/FaqQuestions/select_status.ctp:33 -#: NetCommons/View/Elements/status_label.ctp:19 +#: NetCommons/View/Elements/status_label.ctp:20 #: Questionnaires/View/Elements/edit_status_selector.ctp:18 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:23 #: Questionnaires/View/Elements/status_label.ctp:14 @@ -327,7 +391,7 @@ msgid "Approving" msgstr "承認待ち" #: Faqs/View/Elements/FaqQuestions/select_status.ctp:37 -#: NetCommons/View/Elements/status_label.ctp:23 +#: NetCommons/View/Elements/status_label.ctp:24 #: Questionnaires/View/Elements/edit_status_selector.ctp:20 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:27 #: Questionnaires/View/Elements/status_label.ctp:15 @@ -336,6 +400,8 @@ msgid "Disapproving" msgstr "差し戻し" #: Frames/Controller/FramesController.php:169 +#: Pages/Controller/PagesController.php:247 +#: PluginManager/Controller/PluginManagerController.php:148 msgid "Successfully saved." msgstr "正常に登録しました。" @@ -349,21 +415,15 @@ msgstr "終了" msgid "URL" msgstr "" -#: NetCommons/Controller/NetCommonsAppController.php:272 +#: NetCommons/Controller/NetCommonsAppController.php:289 msgid "Failed on validation errors. Please check the input data." msgstr "入力した内容に誤りがあります。内容を確認して下さい。" -#: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:141 -#: Questionnaires/Controller/QuestionnaireAnswerSummariesController.php:99 -#: Questionnaires/Controller/QuestionnairesController.php:163 -msgid "Permission denied" -msgstr "アクセスができません。" - -#: NetCommons/View/Elements/common_header.ctp:36 +#: NetCommons/View/Elements/common_header.ctp:39 msgid "Home" msgstr "ホーム" -#: NetCommons/View/Elements/common_header.ctp:47 +#: NetCommons/View/Elements/common_header.ctp:50 msgid "Logout" msgstr "ログアウト" @@ -376,6 +436,7 @@ msgid "Accept" msgstr "承認する" #: NetCommons/View/Elements/required.ctp:14 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:189 msgid "Required" msgstr "*" @@ -383,9 +444,29 @@ msgstr "*" msgid "List" msgstr "一覧表示" -#: NetCommons/View/Elements/setting_tabs.ctp:31 -msgid "Frame settings" -msgstr "表示方法変更" +#: NetCommons/View/Elements/visual_captcha.ctp:34 +msgid "Sound icon" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:35 +msgid "Accessibility option: listen to a question and answer it!" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:36 +msgid "Type below the answer to what you hear. Numbers or words:" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:37 +msgid "Click or touch the ANSWER" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:38 +msgid "Refresh/reload icon" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:39 +msgid "Refresh/reload: get new images and accessibility option!" +msgstr "" #: NetCommons/View/Elements/workflow_buttons.ctp:20 #: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:22 @@ -397,23 +478,13 @@ msgstr "差し戻し" msgid "Save temporally" msgstr "一時保存" -#: NetCommons/View/Helper/ComposerHelper.php:88 -msgid "Author(s)" -msgstr "" - -#: NetCommons/View/Helper/ComposerHelper.php:93 -msgid "Developer" -msgstr "開発者" - -#: Pages/Model/Page.php:177 +#: Pages/Model/Page.php:178 msgid "%s is already in use." msgstr "%sは既に使われています。" -#: Pages/View/Elements/add_plugin.ctp:60 -#: Questionnaires/View/Elements/Questionnaires/add_button.ctp:14 -#: Videos/View/Videos/index.ctp:36 -msgid "Add" -msgstr "追加" +#: Pages/View/Elements/add_plugin.ctp:78 +msgid "Close" +msgstr "閉じる" #: Pages/View/Elements/dropdown_menu.ctp:28 msgid "Theme setting" @@ -424,19 +495,19 @@ msgid "All Display" msgstr "" #: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:16 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:207 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:201 msgid "BACK" msgstr "" -#: Questionnaires/View/QuestionnaireAnswers/answer.ctp:134 -#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:99 -#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:322 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:210 -#: Questionnaires/View/Questionnaires/add.ctp:131 +#: Questionnaires/View/QuestionnaireAnswers/answer.ctp:129 +#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:95 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:367 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:204 +#: Questionnaires/View/Questionnaires/add.ctp:119 msgid "NEXT" msgstr "" -#: Questionnaires/View/QuestionnaireAnswers/confirm.ctp:99 +#: Questionnaires/View/QuestionnaireAnswers/confirm.ctp:92 msgid "Confirm" msgstr "" diff --git a/Locale/net_commons.pot b/Locale/net_commons.pot index e0fe9cdb..7a77ebfa 100644 --- a/Locale/net_commons.pot +++ b/Locale/net_commons.pot @@ -28,9 +28,12 @@ msgstr "" #: Categories/Model/CategoryOrder.php:43;52;61 #: Categories/Test/Case/Model/CategoryOrderValidateCategoryOrderTest.php:96;124;152 #: Categories/Test/Case/Model/CategoryValidateCategoryTest.php:93;150;178 +#: CircularNotices/Model/CircularNoticeChoice.php:43;49 +#: CircularNotices/Model/CircularNoticeContent.php:64;84;94;98;118;125 +#: CircularNotices/Model/CircularNoticeFrameSetting.php:54;61 #: Comments/Model/Comment.php:43 #: ContentComments/Controller/Component/ContentCommentsComponent.php:137 -#: ContentComments/Model/ContentComment.php:65;72;79;86 +#: ContentComments/Model/ContentComment.php:56;63;70;77 #: Edumap/Model/Edumap.php:116;125;137;173 #: Edumap/Model/EdumapSocialMedium.php:56;62;68 #: Edumap/Model/EdumapStudent.php:52;60;68 @@ -55,13 +58,20 @@ msgstr "" #: NetCommons/Controller/Component/NetCommonsWorkflowComponent.php:44 #: NetCommons/Model/Behavior/PublishableBehavior.php:136;143 #: Pages/Model/LanguagesPage.php:73;83 -#: Pages/Model/Page.php:172 -#: Questionnaires/Model/Questionnaire.php:120;128;141;173;179;185;195;201;207 -#: Questionnaires/Model/QuestionnaireQuestion.php:91;97;103;115;121;127;133;137;143 +#: Pages/Model/Page.php:173 +#: Questionnaires/Model/Questionnaire.php:102;109;122;148;164;170;176;186;192;198 +#: Questionnaires/Model/QuestionnaireQuestion.php:91;97;103;115;121;127;133;137;143;149 +#: Questionnaires/Test/Case/Model/QuestionnaireQuestionBehaviorTest.php:90;116 +#: Questionnaires/Test/Case/Model/QuestionnaireQuestionValidationTest.php:85;107;129;173;195;217;239 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationBoolTest.php:75;95;118;141;164;187;210;234 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationTest.php:74 #: RssReaders/Model/RssReader.php:102 #: RssReaders/Model/RssReaderFrameSetting.php:52;60 #: RssReaders/Model/RssReaderItem.php:61 #: RssReaders/Test/Case/Model/RssReaderValidateRssReaderTest.php:67 +#: Videos/Model/VideoBlockSetting.php:43;49;55;61;67;73;79;85;91 +#: Videos/Model/VideoFrameSetting.php:71;78;85 +#: Videos/Model/Behavior/VideoValidationBehavior.php:28;82 msgid "Invalid request." msgstr "" @@ -75,22 +85,30 @@ msgstr "" #: Bbses/Model/BbsFrameSetting.php:156 #: Bbses/Model/BbsSetting.php:81;85 #: Blocks/Model/Block.php:181;195;202;249;254;263 -#: Blogs/Controller/BlogEntriesEditController.php:83;149 +#: Blogs/Controller/BlogEntriesEditController.php:189 #: Blogs/Model/Blog.php:181;186;280;284;288 -#: Blogs/Model/BlogEntry.php:263 +#: Blogs/Model/BlogEntry.php:279;292;331 #: Blogs/Model/BlogFrameSetting.php:130 #: Blogs/Model/BlogSetting.php:79;83 #: Categories/Model/Category.php:166;169;178;184;263;268 +#: CircularNotices/Model/CircularNoticeChoice.php:84;97 +#: CircularNotices/Model/CircularNoticeContent.php:384;450;453;456 +#: CircularNotices/Model/CircularNoticeFrameSetting.php:111;123;172 +#: CircularNotices/Model/CircularNoticeSetting.php:112;137;156;222;226 +#: CircularNotices/Model/CircularNoticeTargetUser.php:299;329;355;368 #: Comments/Model/Comment.php:114;129 -#: ContentComments/Model/ContentComment.php:143;177 -#: Edumap/Model/Edumap.php:344;464;467;490;497;506;513;560;564;568;572 +#: Containers/Model/ContainersPage.php:64 +#: ContentComments/Model/ContentComment.php:132;166 +#: Edumap/Model/Edumap.php:344;464;467;502;509;556;560;564;568 +#: Edumap/Model/EdumapSocialMedium.php:109 +#: Edumap/Model/EdumapStudent.php:104 #: Edumap/Model/EdumapVisibilitySetting.php:117 #: Faqs/Model/Faq.php:181;186;281;285;289;293 #: Faqs/Model/FaqQuestion.php:196;205;212;278;289 #: Faqs/Model/FaqQuestionOrder.php:166 #: Faqs/Model/FaqSetting.php:110;114 #: Files/Model/FileModel.php:178;258;290;342 -#: Frames/Model/Frame.php:151;193;234;253 +#: Frames/Model/Frame.php:158;200;241;260 #: Iframes/Model/Iframe.php:188;251 #: Likes/Model/Like.php:157 #: Links/Model/Link.php:215;224;231;297;308 @@ -98,24 +116,30 @@ msgstr "" #: Links/Model/LinkFrameSetting.php:309 #: Links/Model/LinkOrder.php:213 #: Links/Model/LinkSetting.php:110;114 -#: NetCommons/Controller/Component/NetCommonsFrameComponent.php:98 +#: NetCommons/Controller/Component/NetCommonsFrameComponent.php:111 #: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:204;223;249 -#: Pages/Model/Page.php:323;328;333;336;358;363;446;449 +#: Notifications/Model/Notification.php:114;119 +#: Pages/Model/Page.php:324;329;334;337;359;364;447;450 #: Pages/Model/Behavior/PageBehavior.php:217;221;239;243 -#: Questionnaires/Model/Questionnaire.php:503;513;519;551 +#: PluginManager/Model/Plugin.php:328;368;372;376 +#: PluginManager/Model/PluginsRole.php:133 +#: PluginManager/Model/PluginsRoom.php:102 +#: Questionnaires/Model/Questionnaire.php:474;484;490;527;537;544 #: Questionnaires/Model/QuestionnaireBlocksSetting.php:69;73 -#: Questionnaires/Model/QuestionnaireChoice.php:160 -#: Questionnaires/Model/QuestionnaireFrameSetting.php:137;286;299 -#: Questionnaires/Model/QuestionnairePage.php:230 -#: Questionnaires/Model/QuestionnaireQuestion.php:239 +#: Questionnaires/Model/QuestionnaireChoice.php:161 +#: Questionnaires/Model/QuestionnaireFrameSetting.php:137;249;262 +#: Questionnaires/Model/QuestionnairePage.php:237 +#: Questionnaires/Model/QuestionnaireQuestion.php:249 #: RssReaders/Model/RssReader.php:238;245;249;258;330;334 #: RssReaders/Model/RssReaderFrameSetting.php:112 #: RssReaders/Model/RssReaderItem.php:203;207;211 #: SearchBoxes/Model/SearchBox.php:130 -#: Videos/Model/Video.php:304;312;387;395;457;463;524 -#: Videos/Model/VideoBlockSetting.php:256;298;317;325;330;382;387 -#: Videos/Model/VideoFrameSetting.php:162 -#: Videos/Model/VideosAppModel.php:118;121;148;151 +#: Tags/Model/Behavior/TagBehavior.php:63 +#: Videos/Model/Video.php:310;373;381;456;464;526;532;569;577;582;587;592 +#: Videos/Model/VideoBlockSetting.php:246;311;319;327;332;337;342;347;397;402 +#: Videos/Model/VideoFrameSetting.php:178 +#: Videos/Model/Behavior/VideoBehavior.php:67 +#: Videos/Model/Behavior/VideoFileBehavior.php:112;115;142;145 msgid "Internal Server Error" msgstr "" @@ -126,12 +150,13 @@ msgstr "" #: AccessCounters/View/AccessCounterBlocks/not_found.ctp:24 #: Announcements/View/AnnouncementBlocks/not_found.ctp:24 #: Bbses/View/BbsBlocks/not_found.ctp:24 -#: Blogs/View/Blocks/not_found.ctp:24 +#: Blogs/View/BlogBlocks/not_found.ctp:24 #: Edumap/View/EdumapBlocks/not_found.ctp:24 #: Faqs/View/FaqBlocks/not_found.ctp:24 #: Faqs/View/FaqQuestionOrders/edit.ctp:43 #: Iframes/View/IframeBlocks/not_found.ctp:24 #: Links/View/LinkBlocks/not_found.ctp:24 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:16 #: Questionnaires/View/QuestionnaireBlocks/not_found.ctp:24 #: RssReaders/View/RssReaderBlocks/not_found.ctp:24 #: Videos/View/VideoBlockSettings/not_found.ctp:25 @@ -148,15 +173,17 @@ msgstr "" #: Links/View/Elements/LinkBlocks/delete_form.ctp:14 #: Pages/View/Elements/Pages/delete_form.ctp:28 #: RssReaders/View/Elements/RssReaderBlocks/delete_form.ctp:14 +#: Videos/View/Elements/VideoBlockSettings/delete_form.ctp:17 msgid "Delete all data associated with the %s." msgstr "" #: AccessCounters/View/Elements/AccessCounters/delete_form.ctp:22 #: Announcements/View/Elements/AnnouncementBlocks/delete_form.ctp:25 #: Bbses/View/Elements/BbsBlocks/delete_form.ctp:25 -#: Blogs/View/BlogEntriesEdit/form.ctp:227 +#: Blogs/View/BlogEntriesEdit/form.ctp:194 #: Blogs/View/Elements/Blocks/delete_form.ctp:25 #: Categories/View/Elements/edit_form.ctp:59 +#: CircularNotices/View/Elements/CircularNotices/choice_edit_form.ctp:58 #: Edumap/View/Elements/EdumapBlocks/delete_form.ctp:25 #: Faqs/View/Elements/FaqBlocks/delete_form.ctp:25 #: Iframes/View/Elements/IframeBlocks/delete_form.ctp:25 @@ -171,8 +198,10 @@ msgstr "" #: Announcements/View/Elements/AnnouncementBlocks/delete_form.ctp:28 #: Bbses/View/Elements/BbsArticles/delete_form.ctp:35 #: Bbses/View/Elements/BbsBlocks/delete_form.ctp:28 -#: Blogs/View/BlogEntriesEdit/form.ctp:228 +#: Blogs/View/BlogEntriesEdit/form.ctp:195 #: Blogs/View/Elements/Blocks/delete_form.ctp:28 +#: CircularNotices/View/Elements/CircularNotices/delete_form.ctp:17 +#: ContentComments/View/Elements/index.ctp:238 #: Edumap/View/Elements/EdumapBlocks/delete_form.ctp:28 #: Faqs/View/Elements/FaqBlocks/delete_form.ctp:28 #: Faqs/View/Elements/FaqQuestions/delete_form.ctp:38 @@ -181,6 +210,8 @@ msgstr "" #: Links/View/Elements/Links/delete_form.ctp:38 #: Pages/View/Elements/Pages/delete_form.ctp:38 #: RssReaders/View/Elements/RssReaderBlocks/delete_form.ctp:28 +#: Videos/View/Elements/VideoBlockSettings/delete_form.ctp:22 +#: Videos/View/VideosEdit/edit.ctp:147 msgid "Deleting the %s. Are you sure to proceed?" msgstr "" @@ -188,9 +219,12 @@ msgstr "" #: Bbses/Model/Bbs.php:109 #: Bbses/Model/BbsArticle.php:113;120 #: Blogs/Model/Blog.php:110 +#: Blogs/Model/BlogEntry.php:70;80;90 #: Categories/Model/Category.php:102 #: Categories/Test/Case/Model/CategoryValidateCategoryTest.php:121 -#: ContentComments/Model/ContentComment.php:92 +#: CircularNotices/Model/CircularNoticeContent.php:48;54;68;74;80;90;114 +#: CircularNotices/Model/CircularNoticeTargetUser.php:53 +#: ContentComments/Model/ContentComment.php:83 #: Edumap/Model/Edumap.php:143;150;157;168;179;186;204 #: Edumap/Test/Case/Model/EdumapValidateEdumapTest.php:125;162;199;236;273;310;347 #: Faqs/Model/Faq.php:110 @@ -202,19 +236,20 @@ msgstr "" #: Links/Model/Link.php:125;139 #: Links/Model/LinkBlock.php:142 #: Pages/Model/LanguagesPage.php:66 -#: Pages/Model/Page.php:165 -#: Questionnaires/Model/Questionnaire.php:134 +#: Pages/Model/Page.php:166 +#: Questionnaires/Model/Questionnaire.php:115 +#: Questionnaires/Test/Case/Model/QuestionnaireValidationTest.php:93 #: RssReaders/Model/RssReader.php:116;129 #: RssReaders/Model/RssReaderItem.php:70;77 #: RssReaders/Test/Case/Model/RssReaderItemValidateRssReaderItemsTest.php:34;80 #: RssReaders/Test/Case/Model/RssReaderValidateRssReaderTest.php:92;133 -#: Videos/Model/Video.php:109 -#: Videos/Model/VideoBlockSetting.php:232 +#: Videos/Model/VideoBlockSetting.php:221 +#: Videos/Model/Behavior/VideoValidationBehavior.php:35;89 msgid "Please input %s." msgstr "" #: Announcements/View/AnnouncementBlocks/index.ctp:43 -#: Blogs/View/Blocks/index.ctp:43 +#: Blogs/View/BlogBlocks/index.ctp:43 #: Edumap/View/EdumapBlocks/index.ctp:40 #: Faqs/View/FaqBlocks/index.ctp:40 #: Iframes/View/IframeBlocks/index.ctp:40 @@ -228,7 +263,7 @@ msgstr "" #: Announcements/View/Announcements/view.ctp:16 #: Bbses/View/Elements/BbsArticles/breadcrumb.ctp:63 #: Bbses/View/Elements/BbsArticles/edit_link.ctp:26 -#: Blogs/View/BlogEntries/view.ctp:47 +#: CircularNotices/View/CircularNotices/index.ctp:107 #: Edumap/View/Edumap/view.ctp:23 #: Faqs/View/Elements/FaqQuestions/article.ctp:59 #: RssReaders/View/RssReaders/view.ctp:36 @@ -237,12 +272,13 @@ msgid "Edit" msgstr "" #: Auth/View/Auth/login.ctp:26 -#: NetCommons/View/Elements/common_header.ctp:51 +#: NetCommons/View/Elements/common_header.ctp:54 msgid "Login" msgstr "" #: Bbses/View/Elements/BbsArticles/comment_status_label.ctp:15 -#: NetCommons/View/Elements/status_label.ctp:15 +#: CircularNotices/View/Elements/CircularNotices/status_label.ctp:23 +#: NetCommons/View/Elements/status_label.ctp:16 #: Questionnaires/View/Elements/edit_status_selector.ctp:19 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:19 #: Questionnaires/View/Elements/status_label.ctp:13 @@ -256,30 +292,37 @@ msgid "Danger Zone" msgstr "" #: Blocks/View/Elements/edit_form.ctp:32 +#: CircularNotices/View/CircularNotices/view.ctp:219 +#: ContentComments/View/Elements/index.ctp:163 #: Faqs/View/FaqQuestionOrders/edit.ctp:89 #: Links/View/LinkOrders/edit.ctp:84 #: NetCommons/View/Elements/workflow_buttons.ctp:14 +#: Pages/View/Elements/edit_layout.ctp:98 #: Pages/View/Pages/edit.ctp:36 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:84 +#: PluginManager/View/PluginManager/view.ctp:135 #: Questionnaires/View/Elements/FrameSettings/edit_form.ctp:47 #: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:12 -#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:97 -#: Questionnaires/View/QuestionnaireBlocksSettings/edit.ctp:66 +#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:93 +#: Questionnaires/View/QuestionnaireAnswers/test_mode.ctp:121 #: Questionnaires/View/QuestionnairePage/setting.ctp:31 -#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:320 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:204 -#: Questionnaires/View/Questionnaires/add.ctp:129 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:365 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:198 +#: Questionnaires/View/Questionnaires/add.ctp:117 msgid "Cancel" msgstr "" #: Blocks/View/Elements/edit_form.ctp:35 +#: CircularNotices/View/CircularNotices/view.ctp:227 #: Faqs/View/FaqQuestionOrders/edit.ctp:92 -#: Frames/View/Elements/setting_header.ctp:100 +#: Frames/View/Elements/setting_header.ctp:101 #: Links/View/LinkOrders/edit.ctp:87 #: NetCommons/View/Elements/workflow_buttons.ctp:45;52 +#: Pages/View/Elements/edit_layout.ctp:101 #: Pages/View/Pages/edit.ctp:39 +#: PluginManager/View/Elements/PluginManager/plugins.ctp:87 #: Questionnaires/View/Elements/FrameSettings/edit_form.ctp:50 -#: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:47;54 -#: Questionnaires/View/QuestionnaireBlocksSettings/edit.ctp:76 +#: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:47;57 msgid "OK" msgstr "" @@ -288,6 +331,29 @@ msgstr "" msgid "Role permission settings" msgstr "" +#: Blogs/Controller/BlogEntriesEditController.php:148;185 +#: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:141 +#: Questionnaires/Controller/QuestionnaireAnswerSummariesController.php:110 +#: Questionnaires/Controller/QuestionnairesController.php:216 +msgid "Permission denied" +msgstr "" + +#: CircularNotices/Controller/CircularNoticesAppController.php:125 +#: NetCommons/View/Elements/setting_tabs.ctp:31 +msgid "Frame settings" +msgstr "" + +#: CircularNotices/Model/CircularNoticeContent.php:104 +msgid "Pleas input boolean." +msgstr "" + +#: CircularNotices/View/CircularNotices/index.ctp:45 +#: Pages/View/Elements/add_plugin.ctp:60 +#: Questionnaires/View/Elements/Questionnaires/add_button.ctp:14 +#: Videos/View/Videos/index.ctp:36 +msgid "Add" +msgstr "" + #: Comments/Model/Comment.php:57 #: Comments/View/Elements/form.ctp:28 #: Faqs/Test/Case/Model/FaqQuestionValidateFaqQuestionTest.php:458 @@ -304,16 +370,16 @@ msgid "Please enter comments to the person in charge." msgstr "" #: Comments/View/Elements/index.ctp:48 -#: ContentComments/View/Elements/index.ctp:217 -#: Videos/View/Videos/view.ctp:252 +#: ContentComments/View/Elements/index.ctp:251 +#: Videos/View/Videos/view.ctp:255 msgid "More" msgstr "" #: ContentComments/Controller/Component/ContentCommentsComponent.php:138;141 -#: NetCommons/Controller/NetCommonsAppController.php:270;304;310 +#: NetCommons/Controller/NetCommonsAppController.php:287;324;330 #: NetCommons/Controller/Component/NetCommonsWorkflowComponent.php:45;48 -#: Questionnaires/Controller/QuestionnaireQuestionsController.php:79;114;139;169 -#: Questionnaires/Controller/QuestionnairesController.php:258;305 +#: Questionnaires/Controller/QuestionnaireQuestionsController.php:85;123;148;178 +#: Questionnaires/Controller/QuestionnairesController.php:321;368 msgid "Bad Request" msgstr "" @@ -348,7 +414,7 @@ msgid "In draft" msgstr "" #: Faqs/View/Elements/FaqQuestions/select_status.ctp:33 -#: NetCommons/View/Elements/status_label.ctp:19 +#: NetCommons/View/Elements/status_label.ctp:20 #: Questionnaires/View/Elements/edit_status_selector.ctp:18 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:23 #: Questionnaires/View/Elements/status_label.ctp:14 @@ -357,7 +423,7 @@ msgid "Approving" msgstr "" #: Faqs/View/Elements/FaqQuestions/select_status.ctp:37 -#: NetCommons/View/Elements/status_label.ctp:23 +#: NetCommons/View/Elements/status_label.ctp:24 #: Questionnaires/View/Elements/edit_status_selector.ctp:20 #: Questionnaires/View/Elements/questionnaire_status_label.ctp:27 #: Questionnaires/View/Elements/status_label.ctp:15 @@ -366,6 +432,8 @@ msgid "Disapproving" msgstr "" #: Frames/Controller/FramesController.php:169 +#: Pages/Controller/PagesController.php:247 +#: PluginManager/Controller/PluginManagerController.php:148 msgid "Successfully saved." msgstr "" @@ -379,21 +447,15 @@ msgstr "" msgid "URL" msgstr "" -#: NetCommons/Controller/NetCommonsAppController.php:272 +#: NetCommons/Controller/NetCommonsAppController.php:289 msgid "Failed on validation errors. Please check the input data." msgstr "" -#: NetCommons/Controller/Component/NetCommonsRoomRoleComponent.php:141 -#: Questionnaires/Controller/QuestionnaireAnswerSummariesController.php:99 -#: Questionnaires/Controller/QuestionnairesController.php:163 -msgid "Permission denied" -msgstr "" - -#: NetCommons/View/Elements/common_header.ctp:36 +#: NetCommons/View/Elements/common_header.ctp:39 msgid "Home" msgstr "" -#: NetCommons/View/Elements/common_header.ctp:47 +#: NetCommons/View/Elements/common_header.ctp:50 msgid "Logout" msgstr "" @@ -406,6 +468,7 @@ msgid "Accept" msgstr "" #: NetCommons/View/Elements/required.ctp:14 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:189 msgid "Required" msgstr "" @@ -413,8 +476,28 @@ msgstr "" msgid "List" msgstr "" -#: NetCommons/View/Elements/setting_tabs.ctp:31 -msgid "Frame settings" +#: NetCommons/View/Elements/visual_captcha.ctp:34 +msgid "Sound icon" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:35 +msgid "Accessibility option: listen to a question and answer it!" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:36 +msgid "Type below the answer to what you hear. Numbers or words:" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:37 +msgid "Click or touch the ANSWER" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:38 +msgid "Refresh/reload icon" +msgstr "" + +#: NetCommons/View/Elements/visual_captcha.ctp:39 +msgid "Refresh/reload: get new images and accessibility option!" msgstr "" #: NetCommons/View/Elements/workflow_buttons.ctp:20 @@ -427,22 +510,12 @@ msgstr "" msgid "Save temporally" msgstr "" -#: NetCommons/View/Helper/ComposerHelper.php:88 -msgid "Author(s)" -msgstr "" - -#: NetCommons/View/Helper/ComposerHelper.php:93 -msgid "Developer" -msgstr "" - -#: Pages/Model/Page.php:177 +#: Pages/Model/Page.php:178 msgid "%s is already in use." msgstr "" -#: Pages/View/Elements/add_plugin.ctp:60 -#: Questionnaires/View/Elements/Questionnaires/add_button.ctp:14 -#: Videos/View/Videos/index.ctp:36 -msgid "Add" +#: Pages/View/Elements/add_plugin.ctp:78 +msgid "Close" msgstr "" #: Pages/View/Elements/dropdown_menu.ctp:28 @@ -454,19 +527,19 @@ msgid "All Display" msgstr "" #: Questionnaires/View/Elements/Questionnaires/workflow_buttons.ctp:16 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:207 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:201 msgid "BACK" msgstr "" -#: Questionnaires/View/QuestionnaireAnswers/answer.ctp:134 -#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:99 -#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:322 -#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:210 -#: Questionnaires/View/Questionnaires/add.ctp:131 +#: Questionnaires/View/QuestionnaireAnswers/answer.ctp:129 +#: Questionnaires/View/QuestionnaireAnswers/pre_answer.ctp:95 +#: Questionnaires/View/QuestionnaireQuestions/edit.ctp:367 +#: Questionnaires/View/QuestionnaireQuestions/edit_result.ctp:204 +#: Questionnaires/View/Questionnaires/add.ctp:119 msgid "NEXT" msgstr "" -#: Questionnaires/View/QuestionnaireAnswers/confirm.ctp:99 +#: Questionnaires/View/QuestionnaireAnswers/confirm.ctp:92 msgid "Confirm" msgstr "" diff --git a/Model/Behavior/OriginalKeyBehavior.php b/Model/Behavior/OriginalKeyBehavior.php index f81c9c6a..0a53521e 100644 --- a/Model/Behavior/OriginalKeyBehavior.php +++ b/Model/Behavior/OriginalKeyBehavior.php @@ -38,7 +38,7 @@ public function beforeSave(Model $model, $options = array()) { return true; } if (! isset($model->data[$model->name]['key']) || $model->data[$model->name]['key'] === '') { - $model->data[$model->name]['key'] = Security::hash($model->name . mt_rand() . microtime(), 'md5'); + $model->data[$model->name]['key'] = $this->generateKey($model); } return true; } @@ -67,4 +67,14 @@ public function afterSave(Model $model, $created, $options = array()) { } } +/** + * Generate key + * + * @param Model $model Model using this behavior + * @return string Hash key + */ + public function generateKey(Model $model) { + return Security::hash($model->name . mt_rand() . microtime(), 'md5'); + } + } diff --git a/Model/NetCommonsAppModel.php b/Model/NetCommonsAppModel.php index 0016dcaf..17e7340f 100644 --- a/Model/NetCommonsAppModel.php +++ b/Model/NetCommonsAppModel.php @@ -105,4 +105,61 @@ public function loadModels(array $models = [], $source = 'master') { } } } + +/** + * Checks that a string contains something other than whitespace + * + * Returns true if string contains something other than whitespace + * + * $check can be passed as an array: + * array('check' => 'valueToCheck'); + * + * @param string|array $check Value to check + * @return bool Success + */ + public static function notBlank($check) { + //暫定、version 2.7対応。ただし、2.7にバージョンアップした際に削除する + if (! method_exists('Validation', 'notBlank')) { + //version 2.7以前 + return Validation::notEmpty($check); + } else { + return Validation::notBlank($check); + } + } + +/** + * Called during validation operations, before validation. Please note that custom + * validation rules can be defined in $validate. + * + * @param array $options Options passed from Model::save(). + * @return bool True if validate operation should continue, false to abort + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforevalidate + * @see Model::save() + */ + public function beforeValidate($options = array()) { + //暫定、version 2.7対応。ただし、2.7にバージョンアップした際に削除する + if (method_exists('Validation', 'notBlank')) { + $repValidate = 'notBlank'; + $setValidate = 'notEmpty'; + } else { + $repValidate = 'notEmpty'; + $setValidate = 'notBlank'; + } + + foreach (array_keys($this->validate) as $field) { + if (isset($this->validate[$field]['rule'])) { + continue; + } + + foreach ($this->validate[$field] as $rule => $validate) { + if ($rule === $setValidate) { + $this->validate[$field][$repValidate] = $validate; + $this->validate[$field][$repValidate]['rule'] = array($repValidate); + unset($this->validate[$field][$rule]); + } + } + } + return parent::beforeValidate($options); + } + } diff --git a/Test/Case/Controller/Component/NetCommonsBlockComponentTest.php b/Test/Case/Controller/Component/NetCommonsBlockComponentTest.php index 86497d26..b428c827 100644 --- a/Test/Case/Controller/Component/NetCommonsBlockComponentTest.php +++ b/Test/Case/Controller/Component/NetCommonsBlockComponentTest.php @@ -15,6 +15,7 @@ App::uses('ComponentCollection', 'Controller'); App::uses('Block', 'Blocks.Model'); App::uses('NetCommonsBlockComponent', 'NetCommons.Controller/Component'); +App::uses('YAControllerTestCase', 'NetCommons.TestSuite'); /** * Controller for NetCommonsBlock component test @@ -32,7 +33,7 @@ class TestNetCommonsBlockController extends Controller { * @author Shohei Nakajima * @package NetCommons\NetCommons\Test\Case\Controller */ -class NetCommonsBlockComponentTest extends CakeTestCase { +class NetCommonsBlockComponentTest extends ControllerTestCase { /** * Fixtures diff --git a/Test/Case/Controller/Component/NetCommonsFrameComponentTest.php b/Test/Case/Controller/Component/NetCommonsFrameComponentTest.php index 53040d99..4597d390 100644 --- a/Test/Case/Controller/Component/NetCommonsFrameComponentTest.php +++ b/Test/Case/Controller/Component/NetCommonsFrameComponentTest.php @@ -14,6 +14,7 @@ App::uses('CakeResponse', 'Network'); App::uses('ComponentCollection', 'Controller'); App::uses('NetCommonsFrameComponent', 'NetCommons.Controller/Component'); +App::uses('YAControllerTestCase', 'NetCommons.TestSuite'); /** * Controller for NetCommonsFrame component test @@ -23,6 +24,16 @@ */ class TestNetCommonsFrameController extends Controller { +/** + * camelizeKeyRecursive + * + * @param array $orig data to camelize + * @return array camelized data + */ + public static function camelizeKeyRecursive($orig) { + return $orig; + } + } /** @@ -31,7 +42,7 @@ class TestNetCommonsFrameController extends Controller { * @author Shohei Nakajima * @package NetCommons\NetCommons\Test\Case\Controller */ -class NetCommonsFrameComponentTest extends CakeTestCase { +class NetCommonsFrameComponentTest extends ControllerTestCase { /** * Fixtures @@ -41,9 +52,13 @@ class NetCommonsFrameComponentTest extends CakeTestCase { public $fixtures = array( 'plugin.blocks.block', 'plugin.boxes.box', + 'plugin.boxes.boxes_page', + 'plugin.containers.container', 'plugin.frames.frame', 'plugin.m17n.language', + 'plugin.pages.page', 'plugin.plugin_manager.plugin', + 'plugin.rooms.space', 'plugin.users.user', ); @@ -145,11 +160,13 @@ public function testSetView() { $expected = array( 'frameId' => 1, 'frameKey' => 'frame_1', - 'blockId' => 5, + 'blockId' => '5', 'blockKey' => 'block_5', 'roomId' => 1, - 'languageId' => 2 + 'languageId' => 2, + 'cancelUrl' => '', ); + $this->assertEquals($expected, $this->FrameController->viewVars); } diff --git a/Test/Case/Controller/Component/NetCommonsRoomRoleComponentTest.php b/Test/Case/Controller/Component/NetCommonsRoomRoleComponentTest.php index 1d1ed3e9..347f3950 100644 --- a/Test/Case/Controller/Component/NetCommonsRoomRoleComponentTest.php +++ b/Test/Case/Controller/Component/NetCommonsRoomRoleComponentTest.php @@ -15,6 +15,7 @@ App::uses('CakeResponse', 'Network'); App::uses('ComponentCollection', 'Controller'); App::uses('NetCommonsRoomRoleComponent', 'NetCommons.Controller/Component'); +App::uses('YAControllerTestCase', 'NetCommons.TestSuite'); /** * AuthComponent for NetCommonsRoomRole component test @@ -91,7 +92,7 @@ class TestNetCommonsRoomRoleController extends Controller { * @author Shohei Nakajima * @package NetCommons\NetCommons\Test\Case\Controller */ -class NetCommonsRoomRoleComponentTest extends CakeTestCase { +class NetCommonsRoomRoleComponentTest extends ControllerTestCase { /** * Fixtures diff --git a/Test/Case/Controller/NetCommonsAppControllerTest.php b/Test/Case/Controller/NetCommonsAppControllerTest.php index 1c67cc5d..4f2e6a37 100644 --- a/Test/Case/Controller/NetCommonsAppControllerTest.php +++ b/Test/Case/Controller/NetCommonsAppControllerTest.php @@ -26,25 +26,7 @@ class NetCommonsAppControllerTest extends YAControllerTestCase { * * @var array */ - public $fixtures = array( - //'app.session', - 'plugin.blocks.block', - 'plugin.boxes.box', - 'plugin.boxes.boxes_page', - 'plugin.containers.container', - 'plugin.frames.frame', - 'plugin.m17n.language', - 'plugin.net_commons.site_setting', - 'plugin.pages.page', - 'plugin.pages.space', - 'plugin.plugin_manager.plugin', - 'plugin.roles.default_role_permission', - 'plugin.rooms.roles_rooms_user', - 'plugin.rooms.roles_room', - 'plugin.rooms.room', - 'plugin.rooms.room_role_permission', - 'plugin.users.user', - ); + public $fixtures = array(); /** * setUp diff --git a/Test/Case/Controller/NetCommonsControllerTest.php b/Test/Case/Controller/NetCommonsControllerTest.php index cdafa505..611668ce 100644 --- a/Test/Case/Controller/NetCommonsControllerTest.php +++ b/Test/Case/Controller/NetCommonsControllerTest.php @@ -25,24 +25,7 @@ class NetCommonsControllerTest extends YAControllerTestCase { * * @var array */ - public $fixtures = [ - 'plugin.blocks.block', - 'plugin.boxes.box', - 'plugin.boxes.boxes_page', - 'plugin.containers.container', - 'plugin.frames.frame', - 'plugin.m17n.language', - 'plugin.net_commons.site_setting', - 'plugin.pages.page', - 'plugin.pages.space', - 'plugin.plugin_manager.plugin', - 'plugin.roles.default_role_permission', - 'plugin.rooms.room', - 'plugin.rooms.room_role_permission', - 'plugin.rooms.roles_rooms_user', - 'plugin.rooms.roles_room', - 'plugin.users.user', - ]; + public $fixtures = []; /** * setUp diff --git a/TestSuite/YACakeTestCase.php b/TestSuite/YACakeTestCase.php index 750b2140..f7a3cc5a 100644 --- a/TestSuite/YACakeTestCase.php +++ b/TestSuite/YACakeTestCase.php @@ -26,6 +26,38 @@ */ class YACakeTestCase extends CakeTestCase { +/** + * Fixtures + * + * @var array + */ + protected $_fixtures = array( + 'plugin.blocks.block', + 'plugin.blocks.block_role_permission', + 'plugin.boxes.box', + 'plugin.boxes.boxes_page', + 'plugin.containers.container', + 'plugin.containers.containers_page', + 'plugin.frames.frame', + 'plugin.m17n.language', + 'plugin.pages.page', + 'plugin.plugin_manager.plugin', + 'plugin.roles.role', + 'plugin.rooms.room', + 'plugin.rooms.roles_room', + 'plugin.users.user', + //'plugin.users.users_language', + ); + +/** + * Fixtures load + * + * @return void + */ + public function __construct() { + $this->fixtures = array_merge($this->fixtures, $this->_fixtures); + } + /** * Load TestPlugin * diff --git a/TestSuite/YAControllerTestCase.php b/TestSuite/YAControllerTestCase.php index 6fe81e2d..648218aa 100644 --- a/TestSuite/YAControllerTestCase.php +++ b/TestSuite/YAControllerTestCase.php @@ -21,6 +21,46 @@ */ class YAControllerTestCase extends ControllerTestCase { +/** + * Fixtures + * + * @var array + */ + protected $_fixtures = array( + 'plugin.blocks.block', + 'plugin.blocks.block_role_permission', + 'plugin.boxes.box', + 'plugin.boxes.boxes_page', + 'plugin.containers.container', + 'plugin.containers.containers_page', + 'plugin.frames.frame', + 'plugin.m17n.language', + 'plugin.net_commons.site_setting', + 'plugin.pages.languages_page', + 'plugin.pages.page', + 'plugin.plugin_manager.plugin', + 'plugin.plugin_manager.plugins_room', + 'plugin.roles.default_role_permission', + 'plugin.roles.role', + 'plugin.rooms.roles_room', + 'plugin.rooms.roles_rooms_user', + 'plugin.rooms.room', + 'plugin.rooms.room_role', + 'plugin.rooms.room_role_permission', + 'plugin.rooms.space', + 'plugin.users.user', + //'plugin.users.users_language', + ); + +/** + * Fixtures load + * + * @return void + */ + public function __construct() { + $this->fixtures = array_merge($this->fixtures, $this->_fixtures); + } + /** * Lets you do functional tests of a controller action. * diff --git a/View/Elements/common_alert.ctp b/View/Elements/common_alert.ctp index fae2c5b8..5afc0da6 100644 --- a/View/Elements/common_alert.ctp +++ b/View/Elements/common_alert.ctp @@ -9,7 +9,7 @@ */ ?> -
+
@@ -27,4 +27,4 @@ $('#nc-flash-message').fadeIn(500); - \ No newline at end of file + diff --git a/View/Elements/common_header.ctp b/View/Elements/common_header.ctp index c54f38c8..e0f4433f 100644 --- a/View/Elements/common_header.ctp +++ b/View/Elements/common_header.ctp @@ -16,10 +16,14 @@ $pageEditable = isset($pageEditable) ? $pageEditable : null; if (! isset($isPageSetting)) { $isPageSetting = Page::isSetting(); } + +if (! isset($container)) { + $container = 'container'; +} ?>