💄 (admin): rework plugin pages
This commit is contained in:
parent
466afdbbf4
commit
2688148d1e
4 changed files with 50 additions and 38 deletions
|
@ -2,16 +2,18 @@
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
|
||||||
|
|
||||||
<div class="align-middle">
|
<div class="d-flex justify-content-between mb-2">
|
||||||
|
<?php echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'cog')); ?>
|
||||||
<?php if ($plugin->formButtons()): ?>
|
<?php if ($plugin->formButtons()): ?>
|
||||||
<div class="float-right mt-1">
|
<div>
|
||||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
<button type="submit" class="btn btn-primary" name="save"><?php $L->p('Save') ?></button>
|
||||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
<a class="btn btn-secondary" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'cog')); ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
<?php
|
<?php
|
||||||
// Token CSRF
|
// Token CSRF
|
||||||
echo Bootstrap::formInputHidden(array(
|
echo Bootstrap::formInputHidden(array(
|
||||||
|
@ -24,3 +26,5 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formClose(); ?>
|
<?php echo Bootstrap::formClose(); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -201,7 +201,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a href="' . HTML_PATH_ADMIN_ROOT . 'user-password/' . $user->username() . '" class="btn btn-primary mr-2">' . $L->g('Change password') . '</a>
|
<a href="' . HTML_PATH_ADMIN_ROOT . 'user-password/' . $user->username() . '" class="btn btn-primary me-2">' . $L->g('Change password') . '</a>
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
<div class="align-middle">
|
<div class="d-flex justify-content-between mb-2">
|
||||||
<div class="float-right mt-1">
|
|
||||||
<button type="button" class="btn btn-primary btn-sm jsbuttonSave" name="save"><?php $L->p('Save') ?></button>
|
|
||||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
|
||||||
</div>
|
|
||||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); ?>
|
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); ?>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="btn btn-primary jsbuttonSave" name="save"><?php $L->p('Save') ?></button>
|
||||||
|
<a class="btn btn-secondary" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="alert alert-primary"><?php $L->p('Drag and Drop to sort the plugins') ?></div>
|
<div class="alert alert-primary"><?php $L->p('Drag and Drop to sort the plugins') ?></div>
|
||||||
|
|
|
@ -1,18 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
echo "<div class='d-flex justify-content-between align-content-center'>";
|
||||||
|
|
||||||
echo Bootstrap::pageTitle(array('title' => $L->g('Plugins'), 'icon' => 'puzzle-piece'));
|
echo Bootstrap::pageTitle(array('title' => $L->g('Plugins'), 'icon' => 'puzzle-piece'));
|
||||||
|
|
||||||
|
echo "<div>";
|
||||||
|
|
||||||
echo Bootstrap::link(array(
|
echo Bootstrap::link(array(
|
||||||
'title' => $L->g('Change the position of the plugins'),
|
'title' => $L->g('Change the position of the plugins'),
|
||||||
'href' => HTML_PATH_ADMIN_ROOT . 'plugins-position',
|
'href' => HTML_PATH_ADMIN_ROOT . 'plugins-position',
|
||||||
'icon' => 'arrows'
|
'icon' => 'arrows',
|
||||||
|
'class' => 'btn btn-outline-secondary'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
echo "</div></div>";
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title' => $L->g('Search plugins')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Search plugins')));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="text" dir="auto" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
<input type="text" dir="auto" class="form-control mb-3" id="search" placeholder="<?php $L->p('Search') ?>">
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#search").on("keyup", function() {
|
$("#search").on("keyup", function() {
|
||||||
|
@ -33,10 +40,9 @@ echo Bootstrap::formTitle(array('title' => $L->g('Search plugins')));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title' => $L->g('Enabled plugins')));
|
echo '<div class="card mb-3"><h6 class="card-header">';
|
||||||
|
echo $L->g('Enabled plugins');
|
||||||
echo '
|
echo ' </h6><table class="table m-0">
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
@ -48,13 +54,13 @@ foreach ($pluginsInstalled as $plugin) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<tr id="' . $plugin->className() . '" class="bg-light searchItem">';
|
echo '<tr id="' . $plugin->className() . '" class="searchItem card-tablebody">';
|
||||||
|
|
||||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||||
<div class="searchText">' . $plugin->name() . '</div>
|
<div class="searchText">' . $plugin->name() . '</div>
|
||||||
<div class="mt-1">';
|
<div class="mt-1">';
|
||||||
if (method_exists($plugin, 'form')) {
|
if (method_exists($plugin, 'form')) {
|
||||||
echo '<a class="mr-3" href="' . HTML_PATH_ADMIN_ROOT . 'configure-plugin/' . $plugin->className() . '">' . $L->g('Settings') . '</a>';
|
echo '<a class="me-3" href="' . HTML_PATH_ADMIN_ROOT . 'configure-plugin/' . $plugin->className() . '">' . $L->g('Settings') . '</a>';
|
||||||
}
|
}
|
||||||
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'uninstall-plugin/' . $plugin->className() . '">' . $L->g('Deactivate') . '</a>';
|
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'uninstall-plugin/' . $plugin->className() . '">' . $L->g('Deactivate') . '</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -78,12 +84,13 @@ foreach ($pluginsInstalled as $plugin) {
|
||||||
echo '
|
echo '
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title' => $L->g('Disabled plugins')));
|
|
||||||
|
|
||||||
echo '
|
echo '<div class="card mb-3"><h6 class="card-header">';
|
||||||
<table class="table">
|
echo $L->g('Disabled plugins');
|
||||||
|
echo ' </h6><table class="table m-0">
|
||||||
<tbody>
|
<tbody>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
@ -122,4 +129,5 @@ foreach ($pluginsNotInstalled as $plugin) {
|
||||||
echo '
|
echo '
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
';
|
';
|
||||||
|
|
Loading…
Add table
Reference in a new issue