Skip to content

Commit

Permalink
NEW: Create Directory Paths 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 2527969 commit 757fe08
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 106 deletions.
113 changes: 113 additions & 0 deletions Template/config/app-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,116 @@
</span>
</div>
</details>
<details class="accordion-section app-config">
<summary class="accordion-title">
<?= t('Directory Paths') ?>
</summary>
<div class="accordion-content">
<span class="data-wrap">
<li class="app-info-title"><?= t('Data Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= DATA_DIR ?></li>
<?php if (!is_writable(DATA_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(DATA_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(DATA_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(DATA_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(DATA_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(DATA_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(DATA_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(DATA_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Files Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= FILES_DIR ?></li>
<?php if (!is_writable(FILES_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(FILES_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(FILES_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(FILES_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(FILES_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(FILES_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(FILES_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(FILES_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Cache Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= CACHE_DIR ?></li>
<?php if (!is_writable(CACHE_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 (CACHE_DRIVER == 'memory'): ?>
<span class="p-note"><i><?= t('Not required as Cache Driver is set to') ?></i> <code>memory</code></span>
<?php else: ?>
<?php if ($this->user->isAdmin()): ?>
<div id="pCheck" class="p-check">
<?php if (!is_writable(CACHE_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(CACHE_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(CACHE_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(CACHE_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(CACHE_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(CACHE_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(CACHE_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
<?php endif ?>
</span>
</div>
</details>
106 changes: 0 additions & 106 deletions Template/config/support.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,112 +119,6 @@
<?php endif ?>
</span>
<br>
<span class="data-wrap">
<li class="app-info-title"><?= t('Data Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= DATA_DIR ?></li>
<?php if (!is_writable(DATA_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(DATA_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(DATA_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(DATA_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(DATA_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(DATA_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(DATA_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(DATA_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Files Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= FILES_DIR ?></li>
<?php if (!is_writable(FILES_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(FILES_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(FILES_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(FILES_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(FILES_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(FILES_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(FILES_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(FILES_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
</span>
<span class="data-wrap">
<li class="app-info-title"><?= t('Cache Directory') ?></li>
<li class="app-info-value value-path border-bottom-thick privacy"><?= CACHE_DIR ?></li>
<?php if (!is_writable(CACHE_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 (CACHE_DRIVER == 'memory'): ?>
<span class="p-note"><i><?= t('Not required as Cache Driver is set to') ?></i> <code>memory</code></span>
<?php else: ?>
<?php if ($this->user->isAdmin()): ?>
<div id="pCheck" class="p-check">
<?php if (!is_writable(CACHE_DIR)): ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(CACHE_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(CACHE_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(CACHE_DIR) ?>
</span>
<?php else: ?>
<span class="p-dir" title="<?= t('Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissions(CACHE_DIR) ?>
</span>
<span class="p-linux value-ip" title="<?= t('Linux Directory Permissions') ?>">
<?= $this->helper->supportHelper->getPermissionsLinux(CACHE_DIR) ?>
</span>
<span class="p-owner" title="<?= t('Directory Owner') ?>">
<?= $this->helper->supportHelper->getPermissionsOwner(CACHE_DIR) ?>
</span>
<?php endif ?>
</div>
<?php endif ?>
<?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 757fe08

Please sign in to comment.