Skip to content

Commit

Permalink
NEW: Create Plugins Configuration Accordion
Browse files Browse the repository at this point in the history
 - migrate values - #19
  • Loading branch information
aljawaid committed Sep 14, 2023
1 parent 9adfdbe commit 2527969
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 63 deletions.
70 changes: 70 additions & 0 deletions Template/config/app-config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<details class="accordion-section app-config">
<summary class="accordion-title">
<?= t('Plugins Configuration') ?>
</summary>
<div class="accordion-content">
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Installer') ?></li>
<li class="app-info-value border-bottom-thick">
<?php if (PLUGIN_INSTALLER == false): ?>
<?= t('Disabled') ?>
<?php else: ?>
<?= t('Enabled') ?>
<?php endif ?>
</li>
<?php if (PLUGIN_INSTALLER == false): ?>
<span class="fail-x" title="<?= t('Plugins cannot be installed. This is also set by default for security reasons.') ?>">&#10008;</span>
<?php else: ?>
<span class="pass-tick" title="<?= t('Plugins can be automatically installed through the Plugins Directory') ?>">&#10004;</span>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= PLUGINS_DIR ?></li>
<?php if (!is_writable(PLUGINS_DIR)): ?>
<span class="fail-x" title="<?= t('This directory is not writeable by the web server user') ?>">&#10008;</span>
<?php else: ?>
<span class="pass-tick" title="<?= t('This directory is writeable by the web server user') ?>">&#10004;</span>
<?php endif ?>
<?php if ($this->user->isAdmin()): ?>
<div id="pCheck" class="p-check">
<?php if (!is_writable(PLUGINS_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(PLUGINS_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(PLUGINS_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(PLUGINS_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(PLUGINS_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(PLUGINS_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(PLUGINS_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Directory URL') ?></li>
<?php if (PLUGIN_API_URL == 'https://kanboard.org/plugins.json'): ?>
<li class="app-info-value border-bottom-thick" title="<?= t('Plugins will be listed from the default source') ?>">
<?= PLUGIN_API_URL ?>
</li>
<span class="pass-tick" title="<?= t('Plugins will be listed from the default source') ?>">&#10004;</span>
<?php else: ?>
<li class="app-info-value border-bottom-thick privacy" title="<?= t('Plugins will be listed from a custom source') ?>">
<?= PLUGIN_API_URL ?>
</li>
<span class="pass-tick" title="<?= t('Plugins will be listed from a custom source') ?>">&#10004;</span>
<?php endif ?>
</span>
</div>
</details>
63 changes: 0 additions & 63 deletions Template/config/support.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,69 +225,6 @@
<?php endif ?>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Installer') ?></li>
<li class="app-info-value border-bottom-thick">
<?php if (PLUGIN_INSTALLER == false): ?>
<?= t('Disabled') ?>
<?php else: ?>
<?= t('Enabled') ?>
<?php endif ?>
</li>
<?php if (PLUGIN_INSTALLER == false): ?>
<span class="fail-x" title="<?= t('Plugins cannot be installed. This is also set by default for security reasons.') ?>">&#10008;</span>
<?php else: ?>
<span class="pass-tick" title="<?= t('Plugins can be automatically installed through the Plugins Directory') ?>">&#10004;</span>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= PLUGINS_DIR ?></li>
<?php if (!is_writable(PLUGINS_DIR)): ?>
<span class="fail-x" title="<?= t('This directory is not writeable by the web server user') ?>">&#10008;</span>
<?php else: ?>
<span class="pass-tick" title="<?= t('This directory is writeable by the web server user') ?>">&#10004;</span>
<?php endif ?>
<?php if ($this->user->isAdmin()): ?>
<div id="pCheck" class="p-check">
<?php if (!is_writable(PLUGINS_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(PLUGINS_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(PLUGINS_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(PLUGINS_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(PLUGINS_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(PLUGINS_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(PLUGINS_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Plugins Directory URL') ?></li>
<?php if (PLUGIN_API_URL == 'https://kanboard.org/plugins.json'): ?>
<li class="app-info-value border-bottom-thick" title="<?= t('Plugins will be listed from the default source') ?>">
<?= PLUGIN_API_URL ?>
</li>
<span class="pass-tick" title="<?= t('Plugins will be listed from the default source') ?>">&#10004;</span>
<?php else: ?>
<li class="app-info-value border-bottom-thick privacy" title="<?= t('Plugins will be listed from a custom source') ?>">
<?= PLUGIN_API_URL ?>
</li>
<span class="pass-tick" title="<?= t('Plugins will be listed from a custom source') ?>">&#10004;</span>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Log File') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= LOG_FILE ?></li>
Expand Down

0 comments on commit 2527969

Please sign in to comment.