Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1915【テーマファイル管理】サブメニューのアコーディオン調整 #2776

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
* @license https://basercms.net/license/index.html MIT License
*/

$(function (){
$(function () {
$('#ThemeFilesMenu').accordion({
collapsible: true,
heightStyle: "content"
heightStyle: "content",
active: parseInt($('.selected-plugin').attr("data-id"))
});
});

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @var \BaserCore\View\BcAdminAppView $this
* @var bool $isDefaultTheme
* @var string $theme
* @var string $plugin
*/
$types = [
'layout' => __d('baser_core', 'レイアウト'),
Expand All @@ -38,17 +39,25 @@


<div class="bca-main__submenu" id="ThemeFilesMenu">
<?php foreach($plugins as $plugin): ?>
<?php if (!\BaserCore\Utility\BcUtil::getExistsTemplateDir($theme, $plugin['name'], '', 'front') &&
!\BaserCore\Utility\BcUtil::getExistsWebrootDir($theme, $plugin['name'], '', 'front')) continue; ?>
<h2 class="bca-main__submenu-title">
<?php echo $plugin['title'] ?>
<?php foreach($plugins as $k => $pluginVal): ?>
<?php if (!\BaserCore\Utility\BcUtil::getExistsTemplateDir($theme, $pluginVal['name'], '', 'front') &&
!\BaserCore\Utility\BcUtil::getExistsWebrootDir($theme, $pluginVal['name'], '', 'front')) continue; ?>

<?php
if($pluginVal['name'] == $plugin) {
$activeClass = 'selected-plugin';
}else {
$activeClass = '';
}
?>
<h2 class="bca-main__submenu-title <?php echo $activeClass ?>" data-id="<?php echo ($k -1) ?>">
<?php echo $pluginVal['title'] ?>
</h2>
<ul class="bca-main__submenu-list clearfix">
<?php foreach($types as $key => $type): ?>
<li class="bca-main__submenu-list-item">
<?php if ($theme !== $plugin['name']): ?>
<?php $this->BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $plugin['name'], $key]) ?>
<?php if ($theme !== $pluginVal['name']): ?>
<?php $this->BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $pluginVal['name'], $key]) ?>
<?php else: ?>
<?php $this->BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $key]) ?>
<?php endif ?>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.