Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-4'
Browse files Browse the repository at this point in the history
  • Loading branch information
gondoh committed Nov 25, 2021
2 parents c58a647 + d5a1486 commit c995123
Show file tree
Hide file tree
Showing 77 changed files with 11,435 additions and 5,824 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# test.yml
#
# コンテナ起動時に、composer install を実行するが、Github Actions では、非同期で処理が走るため
# composer の処理が完了する前にテストが行われてしまい、テストが失敗する。
# そのため、composer install を同期処理とするため、ジョブの steps に composer の処理を追加している
#

name: Test

on: [ push, pull_request ]

jobs:
test:
name: Unit Test

runs-on: ubuntu-20.04

strategy:
matrix:
php-version: ['7.4']

steps:

- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Checkout
uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run compose
run: |
cd docker
cp docker-compose.yml.default docker-compose.yml
docker-compose up -d
- name: Sleep for 10 seconds
run: sleep 10

- name: Compose log
run: |
cd docker
docker-compose logs
- name: Run test suite
run: |
docker exec bc-php composer run-script install
docker exec bc-php composer run-script test
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ Documentation

Some Handy Links
-------------

- See [baserCMS Official](https://basercms.net/)
- See [baserCMS Users Community](https://basercms.net/community/)
- See [CakePHP - the rapid development PHP framework](https://cakephp.org)

Get Support!
-------------MaildataHelperTest
-------------

- See [baserCMS Users Forum](https://forum.basercms.net/)
- See [baserCMS Issues](https://github.com/baserproject/basercms/issues)
Expand Down
4 changes: 2 additions & 2 deletions app/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* @see ErrorHandler for more information on error handling and configuration.
*/
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'handler' => 'BcErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
Expand Down Expand Up @@ -85,7 +85,7 @@
* @see ErrorHandler for more information on exception handling and configuration.
*/
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException',
'handler' => 'BcErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true
));
Expand Down
2 changes: 1 addition & 1 deletion app/webroot/theme/admin-third/BlogContents/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#blogContentsSettingBody" aria-expanded="false"
aria-controls="blogContentsSettingBody">詳細設定&nbsp;&nbsp;<i
aria-controls="blogContentsSettingBody"><?php echo __d('baser', '詳細設定') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="blogContentsSettingBody" data-bca-state="">
Expand Down
10 changes: 5 additions & 5 deletions app/webroot/theme/admin-third/BlogPosts/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class="bca-form-table__label -label"><?php echo $this->BcForm->label('BlogPost.c
<?php endif ?>

<section class="bca-section bca-section__post-detail">
<label for="BlogPostDetailTmp" class="bca-form-table__label -label">本文</label>
<label for="BlogPostDetailTmp" class="bca-form-table__label -label"><?php echo __d('baser', '本文') ?></label>
<span class="bca-form-table__input-wrap">
<?php echo $this->BcForm->editor('BlogPost.detail', array_merge([
'type' => 'editor',
Expand Down Expand Up @@ -233,8 +233,8 @@ class="bca-form-table__label -label"><?php echo $this->BcForm->label('BlogPost.c
'type' => 'dateTimePicker',
'size' => 12,
'maxlength' => 10,
'dateLabel' => ['text' => '開始日付'],
'timeLabel' => ['text' => '開始時間']
'dateLabel' => ['text' => __d('baser', '開始日付')],
'timeLabel' => ['text' => __d('baser', '開始時間')]
], true) ?>
</span>
<span class="bca-datetimepicker__delimiter">〜</span>
Expand All @@ -243,8 +243,8 @@ class="bca-form-table__label -label"><?php echo $this->BcForm->label('BlogPost.c
'type' => 'dateTimePicker',
'size' => 12,
'maxlength' => 10,
'dateLabel' => ['text' => '終了日付'],
'timeLabel' => ['text' => '終了時間']
'dateLabel' => ['text' => __d('baser', '終了日付')],
'timeLabel' => ['text' => __d('baser', '終了時間')]
], true) ?>
</span>
</span>
Expand Down
6 changes: 3 additions & 3 deletions app/webroot/theme/admin-third/Dblogs/admin/ajax_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<?php endforeach; ?>
</ul>
<div class="align-right">
<a
href="<?= Router::url(['controller'=>'dblogs','action'=>'/']) ?>/"
>&gt; 全てのログを見る</a>
<a href="<?= Router::url(['controller'=>'dblogs','action'=>'/']) ?>/">
&gt; <?php echo __d('baser', '全てのログを見る') ?>
</a>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@


<div class="bca-actions">
<div class="bca-actions__main">
<div class="bca-actions__before">
<?php echo $this->BcHtml->link(__d('baser', '一覧に戻る'), ['plugin' => '', 'admin' => true, 'controller' => 'contents', 'action' => 'index'], [
'class' => 'button bca-btn',
'data-bca-btn-type' => 'back-to-list'
]) ?>
</div>
<div class="bca-actions__main">
<?php if ($isAvailablePreview): ?>
<?php echo $this->BcForm->button(__d('baser', 'プレビュー'), [
'class' => 'button bca-btn',
'class' => 'button bca-btn bca-actions__item',
'data-bca-btn-type' => 'preview',
'id' => 'BtnPreview'
]) ?>
Expand Down
12 changes: 6 additions & 6 deletions app/webroot/theme/admin-third/Elements/admin/content_fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ class="bca-icon--globe"></i><?php echo urldecode($fullUrl) ?></a>
</th>
<td class="col-input bca-form-table__input">
<?php if (!$disableEdit): ?>
<?php echo $this->BcForm->input('Content.self_status', ['type' => 'radio', 'options' => $this->BcText->booleanDoList('公開')]) ?>
<?php echo $this->BcForm->input('Content.self_status', ['type' => 'radio', 'options' => [0 => __d('baser', '公開しない'), 1 => __d('baser', '公開する')]]) ?>
<?php else: ?>
<?php echo $this->BcText->arrayValue($this->BcForm->value('Content.self_status'), $this->BcText->booleanDoList('公開')) ?>
<?php echo $this->BcText->arrayValue($this->BcForm->value('Content.self_status'), [0 => __d('baser', '公開しない'), 1 => __d('baser', '公開する')]) ?>
<?php echo $this->BcForm->hidden('Content.self_status') ?>
<?php endif ?>
<br>
Expand All @@ -178,15 +178,15 @@ class="bca-icon--globe"></i><?php echo urldecode($fullUrl) ?></a>
'type' => 'dateTimePicker',
'size' => 12,
'maxlength' => 10,
'dateLabel' => ['text' => '開始日付'],
'timeLabel' => ['text' => '開始時間']
'dateLabel' => ['text' => __d('baser', '開始日付')],
'timeLabel' => ['text' => __d('baser', '開始時間')]
]) ?>
&nbsp;〜&nbsp;
<?php echo $this->BcForm->input('Content.self_publish_end', [
'type' => 'dateTimePicker',
'size' => 12, 'maxlength' => 10,
'dateLabel' => ['text' => '終了日付'],
'timeLabel' => ['text' => '終了時間']
'dateLabel' => ['text' => __d('baser', '終了日付')],
'timeLabel' => ['text' => __d('baser', '終了時間')]
]) ?>
<?php else: ?>
<?php if ($this->BcForm->value('Content.self_publish_begin') || $this->BcForm->value('Content.self_publish_end')): ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<section id="ContentsOptionSetting" class="bca-section" data-bca-section-type="form-group">
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#formContentsOptionBody" aria-expanded="false" aria-controls="formOptionBody">オプション&nbsp;&nbsp;<i
data-bca-target="#formContentsOptionBody" aria-expanded="false" aria-controls="formOptionBody"><?php echo __d('baser', 'オプション') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="formContentsOptionBody" data-bca-state="">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
);
?>
</th>
<th class="bca-table-listup__thead-th" style="white-space: nowrap">受信内容</th>
<th class="bca-table-listup__thead-th" style="white-space: nowrap">添付</th>
<th class="bca-table-listup__thead-th" style="white-space: nowrap"><?php echo __d('baser', '受信内容') ?></th>
<th class="bca-table-listup__thead-th" style="white-space: nowrap"><?php echo __d('baser', '添付') ?></th>
<?php echo $this->BcListTable->dispatchShowHead() ?>
<th class="bca-table-listup__thead-th"><?php echo __d('baser', 'アクション') ?></th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
<th class="bca-table-listup__thead-th"><?php echo __d('baser', 'タイプ') ?><br><?php echo __d('baser', 'タイトル') ?>
</th>
<th class="bca-table-listup__thead-th"><?php echo __d('baser', 'コンテンツ内容') ?></th>
<th class="bca-table-listup__thead-th"><?php echo __d('baesr', '公開状態') ?></th>
<th class="bca-table-listup__thead-th"><?php echo __d('baesr', '公開期間') ?></th>
<th class="bca-table-listup__thead-th"><?php echo __d('baser', '公開状態') ?></th>
<th class="bca-table-listup__thead-th"><?php echo __d('baser', '公開期間') ?></th>
<?php echo $this->BcListTable->dispatchShowHead() ?>
<th class="bca-table-listup__thead-th"><?php echo __d('baser', '登録日') ?><br><?php echo __d('baser', '更新日') ?>
</th>
Expand Down
18 changes: 18 additions & 0 deletions app/webroot/theme/admin-third/Installations/admin/step2.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,25 @@ class="bca-main__text"><?php echo __d('baser', 'セーフモードがOnの場合
</ul>
<?php endif ?>
</div>

<div class="panel-box bca-panel-box corner10">
<h3 class="bca-panel-box__title"><?php echo __d('baser', '拡張モジュール') ?></h3>
<ul class="section">
<li class='<?php if ($zipOk) echo 'check'; else echo 'failed'; ?>'>
<?php echo __d('baser', 'Zip') ?><br/>
<div class="check-result">
<?php if ($zipOk): ?>
<?php echo __d('baser', '利用可') ?>
<?php else: ?>
<?php echo __d('baser', '利用不可') ?><br/>
<small><?php echo __d('baser', 'テーマなどのzipダウンロードが制限されます。') ?></small>
<?php endif ?>
</div>
</li>
</ul>
</div>
</div>


<form action="<?php echo $this->request->base ?>/installations/step2" method="post" id="checkenv">
<?php echo $this->BcForm->hidden('clicked') ?>
Expand Down
2 changes: 1 addition & 1 deletion app/webroot/theme/admin-third/MailFields/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class="helptext"><?php echo __d('baser', ' グループとして設定する場
<section class="bca-section" data-bca-section-type="form-group">
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#mailFieldSettingBody" aria-expanded="false" aria-controls="mailFieldSettingBody">詳細設定&nbsp;&nbsp;<i
data-bca-target="#mailFieldSettingBody" aria-expanded="false" aria-controls="mailFieldSettingBody"><?php echo __d('baser', '詳細設定') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="mailFieldSettingBody" data-bca-state="">
Expand Down
2 changes: 1 addition & 1 deletion app/webroot/theme/admin-third/Pages/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<section class="bca-section" data-bca-section-type="form-group">
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#pageSettingBody" aria-expanded="false" aria-controls="pageSettingBody">詳細設定&nbsp;&nbsp;<i
data-bca-target="#pageSettingBody" aria-expanded="false" aria-controls="pageSettingBody"><?php echo __d('baser', '詳細設定') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="pageSettingBody" data-bca-state="">
Expand Down
14 changes: 10 additions & 4 deletions app/webroot/theme/admin-third/Plugins/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,18 @@
</div>


<div class="submit">
<div class="bca-actions">
<?php if ($dbInited): ?>
<?php echo $this->BcForm->submit(__d('baser', 'プラグインのデータを初期化する'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnReset']) ?>
<?php echo $this->BcForm->submit(__d('baser', '有効化'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnSave']) ?>
<div class="bca-actions__main">
<?php echo $this->BcForm->submit(__d('baser', '有効化'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnSave', 'data-bca-btn-status' => 'primary']) ?>
</div>
<div class="bca-actions__sub">
<?php echo $this->BcForm->submit(__d('baser', 'プラグインのデータを初期化する'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnReset']) ?>
</div>
<?php else: ?>
<?php echo $this->BcForm->submit(__d('baser', 'インストール'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnSave']) ?>
<div class="bca-actions__main">
<?php echo $this->BcForm->submit(__d('baser', 'インストール'), ['div' => false, 'class' => 'button bca-btn', 'id' => 'BtnSave', 'data-bca-btn-status' => 'primary']) ?>
</div>
<?php endif; ?>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/webroot/theme/admin-third/SiteConfigs/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class="helptext"><?php echo __d('baser', 'ダッシュボードに表示され
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#formOuterServiceSettingBody" aria-expanded="false"
aria-controls="formOuterServiceSettingBody">外部サービス設定&nbsp;&nbsp;<i
aria-controls="formOuterServiceSettingBody"><?php echo __d('baser', '外部サービス設定') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="formOuterServiceSettingBody" data-bca-state="">
Expand Down Expand Up @@ -260,7 +260,7 @@ class="helptext"><?php echo __d('baser', 'GoogleMapを利用する場合は地
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#formSubSiteSettingBody" aria-expanded="false" aria-controls="formSubSiteSettingBody">
サブサイト設定&nbsp;&nbsp;<i class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
<?php echo __d('baser', 'サブサイト設定') ?>&nbsp;&nbsp;<i class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="formSubSiteSettingBody" data-bca-state="">
<table class="form-table bca-form-table section" data-bca-table-type="type2">
Expand Down Expand Up @@ -354,7 +354,7 @@ class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
<section class="bca-section" data-bca-section-type='form-group'>
<div class="bca-collapse__action">
<button type="button" class="bca-collapse__btn" data-bca-collapse="collapse"
data-bca-target="#formMailSettingBody" aria-expanded="false" aria-controls="formMailSettingBody">メール設定&nbsp;&nbsp;<i
data-bca-target="#formMailSettingBody" aria-expanded="false" aria-controls="formMailSettingBody"><?php echo __d('baser', 'メール設定') ?>&nbsp;&nbsp;<i
class="bca-icon--chevron-down bca-collapse__btn-icon"></i></button>
</div>
<div class="bca-collapse" id="formMailSettingBody" data-bca-state="">
Expand Down
16 changes: 10 additions & 6 deletions app/webroot/theme/admin-third/Sites/admin/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@
<?php echo $this->BcFormTable->dispatchAfter() ?>

<div class="submit bca-actions">
<?php echo $this->BcForm->button(__d('baser', '保存'), ['div' => false, 'class' => 'button bca-btn',
'data-bca-btn-type' => 'save',
'data-bca-btn-size' => 'lg',
'data-bca-btn-width' => 'lg',
]) ?>
<div class="bca-actions__before">
<?php echo $this->BcHtml->link(__d('baser', '一覧に戻る'), ['plugin' => '', 'admin' => true, 'controller' => 'sites', 'action' => 'index'], ['class' => 'button bca-btn', 'data-bca-btn-type' => 'back-to-list']) ?>
</div>
<div class="bca-actions__main">
<?php echo $this->BcForm->button(__d('baser', '保存'), ['div' => false, 'class' => 'button bca-btn',
'data-bca-btn-type' => 'save',
'data-bca-btn-size' => 'lg',
'data-bca-btn-width' => 'lg',
]) ?>
</div>
</div>
<?php echo $this->BcHtml->link(__d('baser', '一覧に戻る'), ['plugin' => '', 'admin' => true, 'controller' => 'sites', 'action' => 'index'], ['class' => 'button bca-btn', 'data-bca-btn-type' => 'back-to-list']) ?>

<?php echo $this->BcForm->end() ?>
4 changes: 3 additions & 1 deletion app/webroot/theme/admin-third/Sites/admin/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
<?php $this->BcBaser->element('sites/form') ?>

<div class="submit bca-actions">
<div class="bca-actions__before">
<?php echo $this->BcHtml->link(__d('baser', '一覧に戻る'), ['plugin' => '', 'admin' => true, 'controller' => 'sites', 'action' => 'index'], ['class' => 'button bca-btn', 'data-bca-btn-type' => 'back-to-list']) ?>
</div>
<div class="bca-actions__main">
<?php echo $this->BcForm->button(__d('baser', '保存'), ['div' => false, 'class' => 'button bca-btn', 'data-bca-btn-type' => 'save', 'data-bca-btn-size' => 'lg', 'data-bca-btn-width' => 'lg',]) ?>
</div>
<div class="bca-actions__sub">
<?php echo $this->BcForm->button(__d('baser', '削除'), ['class' => 'button bca-btn', 'data-bca-btn-type' => 'delete', 'id' => 'BtnDelete', 'data-action' => $this->BcBaser->getUrl(['action' => 'delete'])]) ?>
</div>
</div>
<?php echo $this->BcHtml->link(__d('baser', '一覧に戻る'), ['plugin' => '', 'admin' => true, 'controller' => 'sites', 'action' => 'index'], ['class' => 'button bca-btn', 'data-bca-btn-type' => 'back-to-list']) ?>
15 changes: 9 additions & 6 deletions app/webroot/theme/admin-third/ThemeFiles/admin/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@
<?php echo $this->BcFormTable->dispatchAfter() ?>

<div class="submit bca-actions">
<div class="bca-actions__before">
<?php if ($this->request->action == 'admin_add' || $this->request->action == 'admin_edit'): ?>
<?php $this->BcBaser->link(__d('baser', '一覧に戻る'), array_merge(['action' => 'index', $theme, $plugin, $type], $parentPrams), ['class' => 'btn-gray button bca-btn', 'data-bca-btn-type' => 'back-to-list']); ?>
<?php else: ?>
<?php $this->BcBaser->link(__d('baser', '一覧に戻る'), array_merge(['action' => 'index', $theme, $plugin, $type], explode('/', dirname($path))), ['class' => 'btn-gray button bca-btn', 'data-bca-btn-type' => 'back-to-list']); ?>
<?php endif; ?>
</div>

<?php if ($this->request->action == 'admin_add'): ?>
<div class="bca-actions__main">
<?php echo $this->BcForm->button(__d('baser', '保存'), ['div' => false, 'class' => 'button bca-btn', 'data-bca-btn-type' => 'save', 'data-bca-btn-size' => 'lg', 'data-bca-btn-width' => 'lg', 'id' => 'BtnSave']) ?>
Expand All @@ -120,13 +128,8 @@
<?php echo __d('baser', '機能制限のセーフモードで動作していますので、現在のテーマへのコピーはできません。') ?>
<?php endif; ?>
<?php endif; ?>
</div>

<?php if ($this->request->action == 'admin_add' || $this->request->action == 'admin_edit'): ?>
<?php $this->BcBaser->link(__d('baser', '一覧に戻る'), array_merge(['action' => 'index', $theme, $plugin, $type], $parentPrams), ['class' => 'btn-gray button bca-btn', 'data-bca-btn-type' => 'back-to-list']); ?>
<?php else: ?>
<?php $this->BcBaser->link(__d('baser', '一覧に戻る'), array_merge(['action' => 'index', $theme, $plugin, $type], explode('/', dirname($path))), ['class' => 'btn-gray button bca-btn', 'data-bca-btn-type' => 'back-to-list']); ?>
<?php endif; ?>

</div>

<?php echo $this->BcForm->end() ?>
Loading

0 comments on commit c995123

Please sign in to comment.