Skip to content

Commit

Permalink
Merge pull request #108 from s-nakajima/master
Browse files Browse the repository at this point in the history
多言語対応
  • Loading branch information
s-nakajima committed Jan 16, 2017
2 parents c99d587 + d54c85e commit 59e5740
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Config/Migration/001_plugin_records.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class PluginRecords extends NetCommonsMigration {
'default_setting_action' => 'bbs_blocks/index',
'display_topics' => 1,
'display_search' => 1,
'is_m17n' => false,
),
//英語
array(
Expand All @@ -65,6 +66,7 @@ class PluginRecords extends NetCommonsMigration {
'default_setting_action' => 'bbs_blocks/index',
'display_topics' => 1,
'display_search' => 1,
'is_m17n' => false,
),
),
'PluginsRole' => array(
Expand Down
2 changes: 1 addition & 1 deletion Controller/BbsArticlesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public function approve() {
return $this->throwBadRequest();
}
//ステータスチェック
if ($bbsArticle['BbsArticle']['status'] !== WorkflowComponent::STATUS_APPROVED) {
if ($bbsArticle['BbsArticle']['status'] !== WorkflowComponent::STATUS_APPROVAL_WAITING) {
return $this->throwBadRequest();
}

Expand Down
2 changes: 1 addition & 1 deletion Test/Case/Controller/BbsArticlesController/AddTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function dataProviderAddGetByCreatable() {
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_IN_DRAFT, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVED, 'value' => null),
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVAL_WAITING, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[BbsArticle][id]', 'value' => $data['BbsArticle']['id']),
Expand Down
2 changes: 1 addition & 1 deletion Test/Case/Controller/BbsArticlesController/EditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function dataProviderEditGetByEditable() {
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_IN_DRAFT, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVED, 'value' => null),
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVAL_WAITING, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[BbsArticle][id]', 'value' => $data['BbsArticle']['id']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function dataProviderReplyGetByEditable() {
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_IN_DRAFT, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVED, 'value' => null),
'assert' => array('method' => 'assertInput', 'type' => 'button', 'name' => 'save_' . WorkflowComponent::STATUS_APPROVAL_WAITING, 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[BbsArticle][id]', 'value' => $data['BbsArticle']['id']),
Expand Down
2 changes: 1 addition & 1 deletion View/Elements/BbsArticles/comment_approving_link.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
?>

<?php if ($bbsArticle['BbsArticle']['status'] === WorkflowComponent::STATUS_APPROVED && Current::permission('content_publishable')) : ?>
<?php if ($bbsArticle['BbsArticle']['status'] === WorkflowComponent::STATUS_APPROVAL_WAITING && Current::permission('content_publishable')) : ?>
<?php $this->request->data = $bbsArticle; ?>
<?php echo $this->NetCommonsForm->create('BbsArticle', array(
'div' => false,
Expand Down
2 changes: 1 addition & 1 deletion View/Elements/BbsArticles/view_bbs_article.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $linkFormatId = BbsArticlesController::LINK_ID_FORMAT;
'class' => 'label-info',
'message' => __d('net_commons', 'Temporary'),
),
WorkflowComponent::STATUS_APPROVED => array(
WorkflowComponent::STATUS_APPROVAL_WAITING => array(
'class' => 'label-warning',
'message' => __d('bbses', 'Comment approving'),
),
Expand Down
2 changes: 1 addition & 1 deletion View/Helper/BbsesFormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function replyEditButtons($statusFieldName) {
$saveOptions = array(
'label' => __d('net_commons', 'OK'),
'class' => 'btn btn-primary' . $this->Button->getButtonSize() . ' btn-workflow',
'name' => 'save_' . WorkflowComponent::STATUS_APPROVED,
'name' => 'save_' . WorkflowComponent::STATUS_APPROVAL_WAITING,
'ng-class' => '{disabled: sending}'
);
}
Expand Down

0 comments on commit 59e5740

Please sign in to comment.