mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
Format panel templates
This commit is contained in:
parent
5563df22d9
commit
172e6ea476
@ -2,7 +2,7 @@
|
||||
<div class="caption"><?= $this->translate('panel.login.login') ?></div>
|
||||
<form action="<?= $panel->uri('/login/') ?>" method="post">
|
||||
<label for="username"><?= $this->translate('panel.login.username') ?>:</label>
|
||||
<input id="username" type="text" required name="username" <?php if (!empty($username)): ?>value="<?= $username ?>"<?php else: ?>autofocus<?php endif ?> maxlength="20">
|
||||
<input id="username" type="text" required name="username" <?php if (!empty($username)): ?>value="<?= $username ?>" <?php else: ?>autofocus<?php endif ?> maxlength="20">
|
||||
<label for="password"><?= $this->translate('panel.login.password') ?>:</label>
|
||||
<input <?php if (!empty($error)): ?>class="input-invalid" autofocus <?php endif ?>id="password" type="password" required name="password">
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<div data-view="dashboard">
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.dashboard.dashboard') ?></div>
|
||||
<div class="header-title"><?= $this->translate('panel.dashboard.dashboard') ?></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@ -11,41 +11,31 @@
|
||||
<span class="h4"><?= $this->translate('panel.dashboard.welcome') ?></span>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="section-header"><h3 class="caption"><?= $this->translate('panel.dashboard.quickActions') ?></h3></div>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('pages.create')):
|
||||
?>
|
||||
<button type="button" data-modal="newPageModal"><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.pages.newPage') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('cache.clear')):
|
||||
?>
|
||||
<button type="button" data-command="clear-cache"><?= $this->icon('cache-clear') ?> <?= $this->translate('panel.cache.clear') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('backup')):
|
||||
?>
|
||||
<button type="button" data-command="make-backup"><?= $this->icon('clock-rotate-left') ?> <?= $this->translate('panel.backup.backup') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('options.updates')):
|
||||
?>
|
||||
<a class="button" role="button" href="<?= $panel->uri('/tools/updates/'); ?>"><?= $this->icon('arrows-rotate-clockwise') ?> <?= $this->translate('panel.updates.check') ?></a>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.dashboard.quickActions') ?></h3>
|
||||
</div>
|
||||
<?php if ($panel->user()->permissions()->has('pages.create')): ?>
|
||||
<button type="button" data-modal="newPageModal"><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.pages.newPage') ?></button>
|
||||
<?php endif ?>
|
||||
<?php if ($panel->user()->permissions()->has('cache.clear')): ?>
|
||||
<button type="button" data-command="clear-cache"><?= $this->icon('cache-clear') ?> <?= $this->translate('panel.cache.clear') ?></button>
|
||||
<?php endif ?>
|
||||
<?php if ($panel->user()->permissions()->has('backup')): ?>
|
||||
<button type="button" data-command="make-backup"><?= $this->icon('clock-rotate-left') ?> <?= $this->translate('panel.backup.backup') ?></button>
|
||||
<?php endif ?>
|
||||
<?php if ($panel->user()->permissions()->has('options.updates')): ?>
|
||||
<a class="button" role="button" href="<?= $panel->uri('/tools/updates/') ?>"><?= $this->icon('arrows-rotate-clockwise') ?> <?= $this->translate('panel.updates.check') ?></a>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-m-2-3">
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-xs-1-2"><div class="section-header"><h3 class="caption"><?= $this->translate('panel.dashboard.statistics') ?></h3></div></div>
|
||||
<div class="col-xs-1-2">
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.dashboard.statistics') ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-1-2">
|
||||
<div class="ct-legend ct-legend-right">
|
||||
<span class="ct-legend-label ct-series-a mr-8"><?= $this->icon('circle-small-fill') ?> <?= $this->translate('panel.dashboard.statistics.visits') ?></span>
|
||||
@ -53,12 +43,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-chart ct-chart" data-chart-data="<?= $this->escapeAttr($statistics); ?>"></div>
|
||||
<div class="dashboard-chart ct-chart" data-chart-data="<?= $this->escapeAttr($statistics) ?>"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="section-header"><h3 class="caption"><?= $this->translate('panel.dashboard.lastModifiedPages') ?></h3></div>
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.dashboard.lastModifiedPages') ?></h3>
|
||||
</div>
|
||||
<?= $lastModifiedPages ?>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?php if (!empty($title)): ?><?= $title ?> | <?php endif ?>Formwork</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -8,6 +9,7 @@
|
||||
<link rel="alternate icon" href="<?= $this->assets()->uri('images/icon.png') ?>">
|
||||
<link rel="stylesheet" href="<?= $this->assets()->uri($colorScheme === 'dark' ? 'css/panel-dark.min.css' : 'css/panel.min.css', true) ?>">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<div class="container-full">
|
||||
@ -24,4 +26,5 @@
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1 +1 @@
|
||||
<?php $this->insert('fields.layout.' . $fields->layout()->type(), ['sections' => $fields->layout()->sections()]);
|
||||
<?php $this->insert('fields.layout.' . $fields->layout()->type(), ['sections' => $fields->layout()->sections()]) ?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div <?= $this->attr([
|
||||
'class' => ['input-array', $field->get('associative') ? 'input-array-associative' : ''],
|
||||
'id' => $field->name(),
|
||||
|
@ -13,4 +13,4 @@
|
||||
<span class="input-checkbox-text"><?= $field->label() ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?= $this->insert('fields.partials.description') ?>
|
||||
<?php $this->insert('fields.partials.description') ?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div class="input-wrap">
|
||||
<input <?= $this->attr([
|
||||
'type' => 'text',
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'type' => 'number',
|
||||
'id' => $field->name(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'type' => 'email',
|
||||
'id' => $field->name(),
|
||||
|
@ -16,4 +16,4 @@
|
||||
<label for="<?= $field->name() ?>" class="input-file-label">
|
||||
<span><?= $this->icon('cloud-upload') ?> <?= $this->translate('fields.file.uploadLabel') ?></span>
|
||||
</label>
|
||||
<?= $this->insert('fields.partials.description') ?>
|
||||
<?php $this->insert('fields.partials.description') ?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div class="input-wrap">
|
||||
<input <?= $this->attr([
|
||||
'type' => 'text',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<section class="section">
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<?php if ($field->isVisible()): ?>
|
||||
<?php $this->insert('fields.' . $field->type(), ['field' => $field]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<?php if ($field->isVisible()): ?>
|
||||
<?php $this->insert('fields.' . $field->type(), ['field' => $field]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
|
@ -1,32 +1,19 @@
|
||||
<div class="sections">
|
||||
<?php
|
||||
foreach ($sections as $section):
|
||||
?>
|
||||
<section <?= $this->attr(['class' => ['section', $section->is('collapsible') ? 'collapsible' : '', $section->is('collapsed') ? 'collapsed' : '']]) ?>>
|
||||
<div class="section-header">
|
||||
<?php
|
||||
if ($section->is('collapsible')):
|
||||
?>
|
||||
<button type="button" class="section-toggle mr-2" title="<?= $this->translate('panel.sections.toggle') ?>"><?= $this->icon('chevron-up') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<span class="caption"><?= $section->label() ?></span>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<?php
|
||||
foreach ($fields->getMultiple($section->get('fields', [])) as $field):
|
||||
?>
|
||||
<?php if ($field->isVisible()): ?>
|
||||
<?php $this->insert('fields.' . $field->type(), ['field' => $field]) ?>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($sections as $section): ?>
|
||||
<section <?= $this->attr(['class' => ['section', $section->is('collapsible') ? 'collapsible' : '', $section->is('collapsed') ? 'collapsed' : '']]) ?>>
|
||||
<div class="section-header">
|
||||
<?php if ($section->is('collapsible')): ?>
|
||||
<button type="button" class="section-toggle mr-2" title="<?= $this->translate('panel.sections.toggle') ?>"><?= $this->icon('chevron-up') ?></button>
|
||||
<?php endif ?>
|
||||
<span class="caption"><?= $section->label() ?></span>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<?php foreach ($fields->getMultiple($section->get('fields', [])) as $field): ?>
|
||||
<?php if ($field->isVisible()): ?>
|
||||
<?php $this->insert('fields.' . $field->type(), ['field' => $field]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div class="editor-wrap">
|
||||
<div class="editor-toolbar" data-for="<?= $field->name() ?>">
|
||||
<button type="button" class="toolbar-button" data-command="bold" title="<?= $this->translate('panel.pages.editor.bold') ?>"><?= $this->icon('bold') ?></button>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'type' => 'number',
|
||||
'id' => $field->name(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<select <?= $this->attr([
|
||||
'id' => $field->name(),
|
||||
'name' => $field->formName(),
|
||||
|
@ -7,26 +7,26 @@
|
||||
</div>
|
||||
|
||||
<div class="files-items">
|
||||
<?php foreach ($page->files()->sort() as $file): ?>
|
||||
<div class="files-item">
|
||||
<?php if ($file->type() === 'image'): ?>
|
||||
<div class="file-thumbnail" style="background-image:url('<?= $file->square(300, 'contain')->uri() ?>');"></div>
|
||||
<?php endif ?>
|
||||
<div class="file-icon"><?= $this->icon(is_null($file->type()) ? 'file' : 'file-' . $file->type()) ?></div>
|
||||
<div class="file-name truncate"><?= $file->name() ?> <span class="file-size">(<?= $file->size() ?>)</span></div>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="button-link dropdown-button" title="<?= $this->translate('panel.files.actions') ?>" data-dropdown="dropdown-<?= $file->hash() ?>"><?= $this->icon('ellipsis-v') ?></button>
|
||||
<div class="dropdown-menu" id="dropdown-<?= $file->hash() ?>">
|
||||
<a class="dropdown-item" href="<?= $page->uri($file->name(), includeLanguage: false) ?>" target="formwork-preview-file-<?= $file->hash() ?>"><?= $this->icon('eye') ?> <?= $this->translate('panel.pages.previewFile') ?></a>
|
||||
<?php if ($panel->user()->permissions()->has('pages.renameFiles')): ?>
|
||||
<a class="dropdown-item" data-modal="renameFileModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/file/' . $file->name() . '/rename/') ?>" data-filename="<?= $file->name() ?>"><?= $this->icon('pencil') ?> <?= $this->translate('panel.pages.renameFile') ?></a>
|
||||
<?php endif ?>
|
||||
<?php if ($panel->user()->permissions()->has('pages.deleteFiles')): ?>
|
||||
<a class="dropdown-item" data-modal="deleteFileModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/file/' . $file->name() . '/delete/') ?>"><?= $this->icon('trash') ?> <?= $this->translate('panel.pages.deleteFile') ?></a>
|
||||
<?php endif ?>
|
||||
<?php foreach ($page->files()->sort() as $file): ?>
|
||||
<div class="files-item">
|
||||
<?php if ($file->type() === 'image'): ?>
|
||||
<div class="file-thumbnail" style="background-image:url('<?= $file->square(300, 'contain')->uri() ?>');"></div>
|
||||
<?php endif ?>
|
||||
<div class="file-icon"><?= $this->icon(is_null($file->type()) ? 'file' : 'file-' . $file->type()) ?></div>
|
||||
<div class="file-name truncate"><?= $file->name() ?> <span class="file-size">(<?= $file->size() ?>)</span></div>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="button-link dropdown-button" title="<?= $this->translate('panel.files.actions') ?>" data-dropdown="dropdown-<?= $file->hash() ?>"><?= $this->icon('ellipsis-v') ?></button>
|
||||
<div class="dropdown-menu" id="dropdown-<?= $file->hash() ?>">
|
||||
<a class="dropdown-item" href="<?= $page->uri($file->name(), includeLanguage: false) ?>" target="formwork-preview-file-<?= $file->hash() ?>"><?= $this->icon('eye') ?> <?= $this->translate('panel.pages.previewFile') ?></a>
|
||||
<?php if ($panel->user()->permissions()->has('pages.renameFiles')): ?>
|
||||
<a class="dropdown-item" data-modal="renameFileModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/file/' . $file->name() . '/rename/') ?>" data-filename="<?= $file->name() ?>"><?= $this->icon('pencil') ?> <?= $this->translate('panel.pages.renameFile') ?></a>
|
||||
<?php endif ?>
|
||||
<?php if ($panel->user()->permissions()->has('pages.deleteFiles')): ?>
|
||||
<a class="dropdown-item" data-modal="deleteFileModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/file/' . $file->name() . '/delete/') ?>"><?= $this->icon('trash') ?> <?= $this->translate('panel.pages.deleteFile') ?></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,18 +1,14 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<select id="page-parent" name="parent">
|
||||
<option value="." <?php if ($page->parent()->isSite()): ?> selected<?php endif ?>><?= $this->translate('panel.pages.newPage.site') ?> (/)</option>
|
||||
<?php
|
||||
foreach ($parents as $parent):
|
||||
$scheme = $app->schemes()->get('pages.' . $parent->template()->name());
|
||||
if (!$scheme->options()->get('pages', true)) {
|
||||
continue;
|
||||
}
|
||||
if ($parent === $page) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<option value="<?= $parent->route() ?>"<?php if ($page->parent() === $parent): ?> selected<?php endif ?>><?= str_repeat('— ', $parent->level() - 1) . $parent->title() ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($parents as $parent): ?>
|
||||
<?php $scheme = $app->schemes()->get('pages.' . $parent->template()->name()) ?>
|
||||
<?php if (!$scheme->options()->get('pages', true)): ?>
|
||||
<?php continue ?>
|
||||
<?php endif ?>
|
||||
<?php if ($parent === $page): ?>
|
||||
<?php continue ?>
|
||||
<?php endif ?>
|
||||
<option value="<?= $parent->route() ?>" <?php if ($page->parent() === $parent): ?> selected<?php endif ?>><?= str_repeat('— ', $parent->level() - 1) . $parent->title() ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
|
@ -1,11 +1,7 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<select id="page-template" name="template">
|
||||
<?php
|
||||
foreach ($templates as $template):
|
||||
$scheme = $app->schemes()->get('pages.' . $template);
|
||||
?>
|
||||
<option value="<?= $template ?>"<?php if ($page->template()->name() === $template): ?> selected<?php endif ?>><?= $scheme->title() ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($templates as $template): ?>
|
||||
<?php $scheme = $app->schemes()->get('pages.' . $template) ?>
|
||||
<option value="<?= $template ?>" <?php if ($page->template()->name() === $template): ?> selected<?php endif ?>><?= $scheme->title() ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php if ($field->has('description')): ?>
|
||||
<div class="text-color-gray-light text-size-s mb-6"><?= $this->markdown($field->get('description')); ?></div>
|
||||
<div class="text-color-gray-light text-size-s mb-6"><?= $this->markdown($field->get('description')) ?></div>
|
||||
<?php endif ?>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php if ($field->has('label')): ?>
|
||||
<label for="<?= $field->name() ?>"><?= $field->label() ?></label>
|
||||
<label for="<?= $field->name() ?>"><?= $field->label() ?></label>
|
||||
<?php endif ?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'type' => 'password',
|
||||
'id' => $field->name(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div class="flex">
|
||||
<div class="input-range">
|
||||
<input <?= $this->attr([
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<select <?= $this->attr([
|
||||
'id' => $field->name(),
|
||||
'name' => $field->formName(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'type' => 'text',
|
||||
'id' => $field->name(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<input <?= $this->attr([
|
||||
'class' => $field->get('class'),
|
||||
'type' => 'text',
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<textarea <?= $this->attr([
|
||||
'id' => $field->name(),
|
||||
'name' => $field->formName(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?= $this->layout('fields.field') ?>
|
||||
<?php $this->layout('fields.field') ?>
|
||||
<div>
|
||||
<fieldset <?= $this->attr([
|
||||
'id' => $field->name(),
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?= $this->insert('fields.partials.label') ?>
|
||||
<?php $this->insert('fields.partials.label') ?>
|
||||
<?= $this->content() ?>
|
||||
<?= $this->insert('fields.partials.description') ?>
|
||||
<?php $this->insert('fields.partials.description') ?>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $app->translations()->getCurrent()->code() ?>">
|
||||
|
||||
<head>
|
||||
<title><?php if (!empty($title)): ?><?= $title ?> | <?php endif ?>Formwork</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -8,17 +9,19 @@
|
||||
<link rel="alternate icon" href="<?= $this->assets()->uri('images/icon.png') ?>">
|
||||
<link rel="stylesheet" href="<?= $this->assets()->uri($colorScheme === 'dark' ? 'css/panel-dark.min.css' : 'css/panel.min.css', true) ?>">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<div class="container-full">
|
||||
<div class="login-modal-container">
|
||||
<?php if ($notification = $panel->notification()): ?>
|
||||
<div class="login-modal-<?= $notification[0]['type'] ?>"><?= $this->icon($notification[0]['icon']) ?> <?= $notification[0]['text'] ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($notification = $panel->notification()): ?>
|
||||
<div class="login-modal-<?= $notification[0]['type'] ?>"><?= $this->icon($notification[0]['icon']) ?> <?= $notification[0]['text'] ?></div>
|
||||
<?php endif ?>
|
||||
<?= $this->content() ?>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?= $this->insert('partials.scripts') ?>
|
||||
<?php $this->insert('partials.scripts') ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,27 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $app->translations()->getCurrent()->code() ?>">
|
||||
|
||||
<head>
|
||||
<title><?php if (!empty($title)): ?><?= $title ?> | <?php endif ?>Formwork</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<?php
|
||||
if (isset($csrfToken)):
|
||||
?>
|
||||
<meta name="csrf-token" content="<?= $csrfToken ?>">
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php
|
||||
if ($notification = $panel->notification()):
|
||||
?>
|
||||
<meta name="notification" content='<?= $this->escapeAttr(Formwork\Parsers\Json::encode($notification)) ?>'>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php if (isset($csrfToken)): ?>
|
||||
<meta name="csrf-token" content="<?= $csrfToken ?>">
|
||||
<?php endif ?>
|
||||
<?php if ($notification = $panel->notification()): ?>
|
||||
<meta name="notification" content='<?= $this->escapeAttr(Formwork\Parsers\Json::encode($notification)) ?>'>
|
||||
<?php endif ?>
|
||||
<link rel="icon" type="image/svg+xml" href="<?= $this->assets()->uri('images/icon.svg') ?>">
|
||||
<link rel="alternate icon" href="<?= $this->assets()->uri('images/icon.png') ?>">
|
||||
<link rel="stylesheet" href="<?= $this->assets()->uri($colorScheme === 'dark' ? 'css/panel-dark.min.css' : 'css/panel.min.css', true) ?>">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php $this->insert('partials.sidebar') ?>
|
||||
<div class="title-bar">
|
||||
@ -34,6 +28,7 @@ endif
|
||||
</div>
|
||||
</main>
|
||||
<?= $modals ?>
|
||||
<?= $this->insert('partials.scripts') ?>
|
||||
<?php $this->insert('partials.scripts') ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -7,23 +7,15 @@
|
||||
<div class="image-picker-empty-state">
|
||||
<span class="image-picker-empty-state-icon"><?= $this->icon('image') ?></span>
|
||||
<h4 class="h5"><?= $this->translate('panel.modal.images.noImages') ?></h4>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('pages.uploadFiles')):
|
||||
?>
|
||||
<p><?= $this->translate('panel.modal.images.noImages.upload') ?></p>
|
||||
<button type="button" data-command="upload" data-upload-target="file-uploader"><?= $this->icon('cloud-upload') ?> <?= $this->translate('panel.modal.action.uploadFile') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php if ($panel->user()->permissions()->has('pages.uploadFiles')): ?>
|
||||
<p><?= $this->translate('panel.modal.images.noImages.upload') ?></p>
|
||||
<button type="button" data-command="upload" data-upload-target="file-uploader"><?= $this->icon('cloud-upload') ?> <?= $this->translate('panel.modal.action.uploadFile') ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<select class="image-picker">
|
||||
<?php
|
||||
foreach ($page->images() as $image):
|
||||
?>
|
||||
<option value="<?= $page->uri($image, includeLanguage: false) ?>"><?= $image ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($page->images() as $image): ?>
|
||||
<option value="<?= $page->uri($image, includeLanguage: false) ?>"><?= $image ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -13,28 +13,20 @@
|
||||
<label class="label-required" for="page-parent"><?= $this->translate('panel.pages.newPage.parent') ?>:</label>
|
||||
<select id="page-parent" name="parent">
|
||||
<option value="." selected><?= $this->translate('panel.pages.newPage.site') ?> (/)</option>
|
||||
<?php
|
||||
foreach ($pages as $page):
|
||||
$scheme = $app->schemes()->get('pages.' . $page->template()->name());
|
||||
if (!$scheme->options()->get('children', true)) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<option value="<?= $page->route() ?>"<?php if ($scheme->options()->has('children.templates')): ?> data-allowed-templates="<?= implode(', ', $scheme->options()->get('children.templates'))?>"<?php endif ?>><?= str_repeat('— ', $page->level() - 1) . $page->title() ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($pages as $page): ?>
|
||||
<?php $scheme = $app->schemes()->get('pages.' . $page->template()->name()) ?>
|
||||
<?php if (!$scheme->options()->get('children', true)): ?>
|
||||
<?php continue ?>
|
||||
<?php endif ?>
|
||||
<option value="<?= $page->route() ?>" <?php if ($scheme->options()->has('children.templates')): ?> data-allowed-templates="<?= implode(', ', $scheme->options()->get('children.templates')) ?>" <?php endif ?>><?= str_repeat('— ', $page->level() - 1) . $page->title() ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<label class="label-required" for="page-template"><?= $this->translate('panel.pages.newPage.template') ?>:</label>
|
||||
<select id="page-template" name="template">
|
||||
<?php
|
||||
foreach ($templates as $template):
|
||||
$scheme = $app->schemes()->get('pages.' . $template);
|
||||
?>
|
||||
<option value="<?= $template ?>"<?php if ($scheme->isDefault()): ?> selected<?php endif ?>><?= $scheme->title() ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($templates as $template): ?>
|
||||
<?php $scheme = $app->schemes()->get('pages.' . $template) ?>
|
||||
<option value="<?= $template ?>" <?php if ($scheme->isDefault()): ?> selected<?php endif ?>><?= $scheme->title() ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
</div>
|
||||
|
@ -17,13 +17,9 @@
|
||||
<input id="email" type="email" required name="email">
|
||||
<label class="label-required" for="language"><?= $this->translate('panel.user.language') ?>:</label>
|
||||
<select id="language" name="language">
|
||||
<?php
|
||||
foreach ($panel->availableTranslations() as $key => $value):
|
||||
?>
|
||||
<option value="<?= $key ?>"<?php if ($key === $panel->user()->language()): ?> selected<?php endif ?>><?= $value ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($panel->availableTranslations() as $key => $value): ?>
|
||||
<option value="<?= $key ?>" <?php if ($key === $panel->user()->language()): ?> selected<?php endif ?>><?= $value ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h3 class="caption"><?= $this->translate('panel.pages.renameFile') ?></h3>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<label class="label-required" for="filename"><?= $this->translate('panel.pages.renameFile.name')?>:</label>
|
||||
<label class="label-required" for="filename"><?= $this->translate('panel.pages.renameFile.name') ?>:</label>
|
||||
<input id="file-name" type="text" required name="filename" autofocus>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
</div>
|
||||
|
@ -1,36 +1,28 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.options.options') ?></div>
|
||||
<div class="header-title"><?= $this->translate('panel.options.options') ?></div>
|
||||
</div>
|
||||
|
||||
<?= $tabs ?>
|
||||
|
||||
<div>
|
||||
<?php
|
||||
foreach ($info as $section => $data):
|
||||
?>
|
||||
<section class="section collapsible">
|
||||
<div class="section-header">
|
||||
<span class="section-toggle"><?= $this->icon('chevron-up') ?></span>
|
||||
<span class="caption"><?= $section ?></span>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<table class="info-data">
|
||||
<?php
|
||||
foreach ($data as $key => $value):
|
||||
?>
|
||||
<tr>
|
||||
<td class="info-data-key"><?= $key ?></td>
|
||||
<td class="info-data-value"><?= $value ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($info as $section => $data): ?>
|
||||
<section class="section collapsible">
|
||||
<div class="section-header">
|
||||
<span class="section-toggle"><?= $this->icon('chevron-up') ?></span>
|
||||
<span class="caption"><?= $section ?></span>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<table class="info-data">
|
||||
<?php foreach ($data as $key => $value): ?>
|
||||
<tr>
|
||||
<td class="info-data-key"><?= $key ?></td>
|
||||
<td class="info-data-value"><?= $value ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
|
||||
|
||||
<form method="post" class="options-form" data-form="system-options-form">
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.options.options') ?></div>
|
||||
|
@ -1,11 +1,7 @@
|
||||
<div class="tabs" style="margin-top:-1.5rem">
|
||||
<?php
|
||||
foreach ($tabs as $tab):
|
||||
?>
|
||||
<?php if ($panel->user()->permissions()->has('options.' . $tab)): ?>
|
||||
<a class="tabs-tab<?= ($tab === $current) ? ' active' : '' ?>" href="<?= $panel->uri('/options/' . $tab . '/') ?>"><?= $this->translate('panel.options.' . $tab) ?></a>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($tabs as $tab): ?>
|
||||
<?php if ($panel->user()->permissions()->has('options.' . $tab)): ?>
|
||||
<a class="tabs-tab<?= ($tab === $current) ? ' active' : '' ?>" href="<?= $panel->uri('/options/' . $tab . '/') ?>"><?= $this->translate('panel.options.' . $tab) ?></a>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@ -1,55 +1,43 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
<form method="post" data-form="page-editor-form" enctype="multipart/form-data">
|
||||
|
||||
|
||||
<div class="header">
|
||||
<div class="min-w-0 flex-grow-1">
|
||||
<div class="header-title"><?= $this->icon($page->get('icon', 'page')) ?> <?= $page->title(); ?></div>
|
||||
<div class="flex">
|
||||
<div class="page-status-<?= $page->status() ?> mr-2"><?= $this->icon('circle-small-fill'); ?></div>
|
||||
<?php if (!$page->isIndexPage() && !$page->isErrorPage()): ?>
|
||||
<div class="page-route page-route-changeable min-w-0">
|
||||
<button type="button" class="page-slug-change truncate max-w-100" data-command="change-slug" title="<?= $this->translate('panel.pages.changeSlug') ?>"><?= $page->route() ?> <?= $this->icon('pencil') ?></button>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="page-route"><?= $page->route() ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="slug" name="slug" value="<?= $page->slug() ?>">
|
||||
<?php if ($currentLanguage): ?>
|
||||
<input type="hidden" id="language" name="language" value="<?= $currentLanguage ?>">
|
||||
<?php endif ?>
|
||||
<div>
|
||||
<a class="button button-link<?php if (!$page->published() || !$page->routable()): ?> disabled<?php endif ?>" role="button" <?php if ($page->published() && $page->routable()): ?>href="<?= $page->uri(includeLanguage: $currentLanguage ?: true) ?>"<?php endif ?> target="formwork-preview-<?= $page->uid() ?>" title="<?= $this->translate('panel.pages.preview') ?>" aria-label="<?= $this->translate('panel.pages.preview') ?>"><?= $this->icon('eye') ?></a>
|
||||
|
||||
<?php if ($panel->user()->permissions()->has('pages.delete')): ?>
|
||||
<button type="button" class="button-link" data-modal="deletePageModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/delete/' . ($currentLanguage ? 'language/' . $currentLanguage . '/' : '')) ?>" title="<?= $this->translate('panel.pages.deletePage') ?>" aria-label="<?= $this->translate('panel.pages.deletePage') ?>" <?php if (!$page->isDeletable()): ?> disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
if (!$site->languages()->available()->isEmpty()):
|
||||
?>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown-button caret button-accent" data-dropdown="languages-dropdown"><?= $this->icon('translate') ?> <?= $this->translate('panel.pages.languages') ?><?php if ($currentLanguage): ?> <span class="badge"><?= $currentLanguage ?></span><?php endif ?></button>
|
||||
<div class="dropdown-menu" id="languages-dropdown">
|
||||
<?php
|
||||
foreach ($site->languages()->available() as $language):
|
||||
?>
|
||||
<a href="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/edit/language/' . $language . '/') ?>" class="dropdown-item"><?= $page->languages()->available()->has($language) ? $this->translate('panel.pages.languages.editLanguage', $language->nativeName() . ' (' . $language->code() . ')') : $this->translate('panel.pages.languages.editLanguage', $language->nativeName() . ' (' . $language->code() . ')'); ?></a>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<div class="header">
|
||||
<div class="min-w-0 flex-grow-1">
|
||||
<div class="header-title"><?= $this->icon($page->get('icon', 'page')) ?> <?= $page->title() ?></div>
|
||||
<div class="flex">
|
||||
<div class="page-status-<?= $page->status() ?> mr-2"><?= $this->icon('circle-small-fill') ?></div>
|
||||
<?php if (!$page->isIndexPage() && !$page->isErrorPage()): ?>
|
||||
<div class="page-route page-route-changeable min-w-0">
|
||||
<button type="button" class="page-slug-change truncate max-w-100" data-command="change-slug" title="<?= $this->translate('panel.pages.changeSlug') ?>"><?= $page->route() ?> <?= $this->icon('pencil') ?></button>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="page-route"><?= $page->route() ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<button type="submit" class="button-accent mb-0" data-command="save"><?= $this->icon('check-circle') ?> <?= $this->translate('panel.pages.save') ?></button>
|
||||
<input type="hidden" id="slug" name="slug" value="<?= $page->slug() ?>">
|
||||
<?php if ($currentLanguage): ?>
|
||||
<input type="hidden" id="language" name="language" value="<?= $currentLanguage ?>">
|
||||
<?php endif ?>
|
||||
<div>
|
||||
<a class="button button-link<?php if (!$page->published() || !$page->routable()): ?> disabled<?php endif ?>" role="button" <?php if ($page->published() && $page->routable()): ?>href="<?= $page->uri(includeLanguage: $currentLanguage ?: true) ?>" <?php endif ?> target="formwork-preview-<?= $page->uid() ?>" title="<?= $this->translate('panel.pages.preview') ?>" aria-label="<?= $this->translate('panel.pages.preview') ?>"><?= $this->icon('eye') ?></a>
|
||||
<?php if ($panel->user()->permissions()->has('pages.delete')): ?>
|
||||
<button type="button" class="button-link" data-modal="deletePageModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/delete/' . ($currentLanguage ? 'language/' . $currentLanguage . '/' : '')) ?>" title="<?= $this->translate('panel.pages.deletePage') ?>" aria-label="<?= $this->translate('panel.pages.deletePage') ?>" <?php if (!$page->isDeletable()): ?> disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
<?php endif ?>
|
||||
<?php if (!$site->languages()->available()->isEmpty()): ?>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown-button caret button-accent" data-dropdown="languages-dropdown"><?= $this->icon('translate') ?> <?= $this->translate('panel.pages.languages') ?><?php if ($currentLanguage): ?> <span class="badge"><?= $currentLanguage ?></span><?php endif ?></button>
|
||||
<div class="dropdown-menu" id="languages-dropdown">
|
||||
<?php foreach ($site->languages()->available() as $language): ?>
|
||||
<a href="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/edit/language/' . $language . '/') ?>" class="dropdown-item"><?= $page->languages()->available()->has($language) ? $this->translate('panel.pages.languages.editLanguage', $language->nativeName() . ' (' . $language->code() . ')') : $this->translate('panel.pages.languages.editLanguage', $language->nativeName() . ' (' . $language->code() . ')') ?></a>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<button type="submit" class="button-accent mb-0" data-command="save"><?= $this->icon('check-circle') ?> <?= $this->translate('panel.pages.save') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
<div>
|
||||
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
||||
</div>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
</form>
|
||||
|
@ -3,13 +3,9 @@
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.pages.pages') ?> <span class="badge"><?= $app->site()->descendants()->count() ?></span></div>
|
||||
<div>
|
||||
<?php
|
||||
if ($panel->user()->permissions()->has('pages.create')):
|
||||
?>
|
||||
<button type="button" class="button-accent" data-modal="newPageModal"><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.pages.newPage') ?></button>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<?php if ($panel->user()->permissions()->has('pages.create')): ?>
|
||||
<button type="button" class="button-accent" data-modal="newPageModal"><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.pages.newPage') ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,78 +1,66 @@
|
||||
<?php
|
||||
if ($headers):
|
||||
?>
|
||||
<div class="pages-list-headers" aria-hidden="true">
|
||||
<div class="pages-headers-cell page-details truncate"><?= $this->translate('panel.pages.page.title') ?></div>
|
||||
<div class="pages-headers-cell page-date truncate show-from-m"><?= $this->translate('panel.pages.page.lastModified') ?></div>
|
||||
<div class="pages-headers-cell page-status truncate show-from-xs"><?= $this->translate('panel.pages.page.status') ?></div>
|
||||
<div class="pages-headers-cell page-actions"><?= $this->translate('panel.pages.page.actions') ?></div>
|
||||
</div>
|
||||
<?php
|
||||
endif
|
||||
?>
|
||||
<ul class="pages-list <?= $class ?>" data-orderable-children="<?= $orderable ? 'true' : 'false' ?>"<?php if ($parent): ?> data-parent="<?= $parent ?>"<?php endif ?>>
|
||||
<?php foreach ($pages as $page):
|
||||
$routable = $page->published() && $page->routable();
|
||||
$date = $this->datetime($page->contentFile()->lastModifiedTime());
|
||||
?>
|
||||
<li class="pages-item <?php if ($subpages): ?>pages-level-<?= $page->level() ?> <?php endif ?><?php if ($page->hasChildren()): ?>has-children <?php endif ?><?= $page->orderable() ? 'is-orderable' : 'is-not-orderable' ?>" data-route="<?= $page->route() ?>">
|
||||
<div class="pages-item-row">
|
||||
<div class="pages-item-cell page-details">
|
||||
<div class="page-title flex">
|
||||
<div class="sort-handle" style="min-width: 1rem" class="mr-2">
|
||||
<?php if ($orderable && $page->orderable()): ?>
|
||||
<span title="<?= $this->translate('panel.dragToReorder') ?>"><?= $this->icon('grabber') ?></span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($subpages): ?>
|
||||
<div style="min-width: 1rem" class="mr-2">
|
||||
<?php if ($page->hasChildren()): ?>
|
||||
<button type="button" class="page-children-toggle" title="<?= $this->translate('panel.pages.toggleChildren') ?>"><?= $this->icon('chevron-down') ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="mr-2" style="min-width: 1rem"><?= $this->icon($page->get('icon', 'page')) ?></div>
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-color-accent"><a href="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/edit/') ?>"><?= $this->escape($page->title()) ?></a></div>
|
||||
<?php foreach ($page->languages()->available() as $language): ?>
|
||||
<span class="badge"><?= $language->code() ?></span>
|
||||
<?php endforeach ?>
|
||||
<div class="page-route truncate" aria-hidden="true">
|
||||
<span><?= $page->canonicalRoute() ?? $page->route() ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pages-item-cell page-date truncate show-from-m">
|
||||
<?= $date ?>
|
||||
</div>
|
||||
<div class="pages-item-cell page-status page-status-<?= $page->status() ?> truncate show-from-xs">
|
||||
<?= $this->icon('circle-small-fill'); ?>
|
||||
<span class="page-status-label"><?= $this->translate('panel.pages.status.' . $page->status()) ?></span>
|
||||
</div>
|
||||
<div class="pages-item-cell page-actions">
|
||||
<a class="button button-link<?php if (!$page->published() || !$page->routable()): ?> disabled<?php endif ?>" role="button" <?php if ($page->published() && $page->routable()): ?>href="<?= $page->uri(includeLanguage: false) ?>"<?php endif ?> target="formwork-preview-<?= $page->uid() ?>" title="<?= $this->translate('panel.pages.preview') ?>" aria-label="<?= $this->translate('panel.pages.preview') ?>"><?= $this->icon('eye') ?></a>
|
||||
<?php if ($panel->user()->permissions()->has('pages.delete')): ?>
|
||||
<button type="button" class="button-link" data-modal="deletePageModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/delete/') ?>" title="<?= $this->translate('panel.pages.deletePage') ?>" aria-label="<?= $this->translate('panel.pages.deletePage') ?>"<?php if (!$page->isDeletable()): ?> disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
<?php if ($headers): ?>
|
||||
<div class="pages-list-headers" aria-hidden="true">
|
||||
<div class="pages-headers-cell page-details truncate"><?= $this->translate('panel.pages.page.title') ?></div>
|
||||
<div class="pages-headers-cell page-date truncate show-from-m"><?= $this->translate('panel.pages.page.lastModified') ?></div>
|
||||
<div class="pages-headers-cell page-status truncate show-from-xs"><?= $this->translate('panel.pages.page.status') ?></div>
|
||||
<div class="pages-headers-cell page-actions"><?= $this->translate('panel.pages.page.actions') ?></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<ul class="pages-list <?= $class ?>" data-orderable-children="<?= $orderable ? 'true' : 'false' ?>" <?php if ($parent): ?> data-parent="<?= $parent ?>" <?php endif ?>>
|
||||
<?php foreach ($pages as $page): ?>
|
||||
<?php $routable = $page->published() && $page->routable() ?>
|
||||
<?php $date = $this->datetime($page->contentFile()->lastModifiedTime()) ?>
|
||||
<li class="pages-item <?php if ($subpages): ?>pages-level-<?= $page->level() ?> <?php endif ?><?php if ($page->hasChildren()): ?>has-children <?php endif ?><?= $page->orderable() ? 'is-orderable' : 'is-not-orderable' ?>" data-route="<?= $page->route() ?>">
|
||||
<div class="pages-item-row">
|
||||
<div class="pages-item-cell page-details">
|
||||
<div class="page-title flex">
|
||||
<div class="sort-handle" style="min-width: 1rem" class="mr-2">
|
||||
<?php if ($orderable && $page->orderable()): ?>
|
||||
<span title="<?= $this->translate('panel.dragToReorder') ?>"><?= $this->icon('grabber') ?></span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($subpages): ?>
|
||||
<div style="min-width: 1rem" class="mr-2">
|
||||
<?php if ($page->hasChildren()): ?>
|
||||
<button type="button" class="page-children-toggle" title="<?= $this->translate('panel.pages.toggleChildren') ?>"><?= $this->icon('chevron-down') ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="mr-2" style="min-width: 1rem"><?= $this->icon($page->get('icon', 'page')) ?></div>
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-color-accent"><a href="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/edit/') ?>"><?= $this->escape($page->title()) ?></a></div>
|
||||
<?php foreach ($page->languages()->available() as $language): ?>
|
||||
<span class="badge"><?= $language->code() ?></span>
|
||||
<?php endforeach ?>
|
||||
<div class="page-route truncate" aria-hidden="true">
|
||||
<span><?= $page->canonicalRoute() ?? $page->route() ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($subpages && $page->hasChildren()):
|
||||
$scheme = $page->scheme();
|
||||
$reverseChildren = $scheme->options()->get('children.reverse', false);
|
||||
$orderableChildren = $scheme->options()->get('children.orderable', true);
|
||||
|
||||
$this->insert('pages.list', [
|
||||
'pages' => $reverseChildren ? $page->children()->reverse() : $page->children(),
|
||||
'subpages' => true,
|
||||
'class' => 'pages-children',
|
||||
'parent' => $page->route(),
|
||||
'orderable' => $orderable && $orderableChildren,
|
||||
'headers' => false,
|
||||
]);
|
||||
endif
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pages-item-cell page-date truncate show-from-m"><?= $date ?></div>
|
||||
<div class="pages-item-cell page-status page-status-<?= $page->status() ?> truncate show-from-xs">
|
||||
<?= $this->icon('circle-small-fill') ?>
|
||||
<span class="page-status-label"><?= $this->translate('panel.pages.status.' . $page->status()) ?></span>
|
||||
</div>
|
||||
<div class="pages-item-cell page-actions">
|
||||
<a class="button button-link<?php if (!$page->published() || !$page->routable()): ?> disabled<?php endif ?>" role="button" <?php if ($page->published() && $page->routable()): ?>href="<?= $page->uri(includeLanguage: false) ?>" <?php endif ?> target="formwork-preview-<?= $page->uid() ?>" title="<?= $this->translate('panel.pages.preview') ?>" aria-label="<?= $this->translate('panel.pages.preview') ?>"><?= $this->icon('eye') ?></a>
|
||||
<?php if ($panel->user()->permissions()->has('pages.delete')): ?>
|
||||
<button type="button" class="button-link" data-modal="deletePageModal" data-modal-action="<?= $panel->uri('/pages/' . trim($page->route(), '/') . '/delete/') ?>" title="<?= $this->translate('panel.pages.deletePage') ?>" aria-label="<?= $this->translate('panel.pages.deletePage') ?>" <?php if (!$page->isDeletable()): ?> disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($subpages && $page->hasChildren()): ?>
|
||||
<?php $this->insert('pages.list', [
|
||||
'pages' => $page->scheme()->options()->get('children.reverse', false) ? $page->children()->reverse() : $page->children(),
|
||||
'subpages' => true,
|
||||
'class' => 'pages-children',
|
||||
'parent' => $page->route(),
|
||||
'orderable' => $orderable && $page->scheme()->options()->get('children.orderable', true),
|
||||
'headers' => false,
|
||||
]) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
@ -15,16 +15,16 @@
|
||||
<div class="sidebar-wrapper">
|
||||
<h3 class="caption mb-8"><?= $this->translate('panel.manage') ?></h3>
|
||||
<ul class="sidebar-navigation">
|
||||
<?php foreach ($navigation as $id => ['label' => $label, 'uri' => $uri, 'permissions' => $permissions, 'badge' => $badge]): ?>
|
||||
<?php if ($panel->user()->permissions()->has($permissions)): ?>
|
||||
<li class="<?= ($location === $id) ? 'active' : '' ?>">
|
||||
<a href="<?= $panel->uri($uri) ?>"><?= $label ?></a>
|
||||
<?php if ($badge): ?>
|
||||
<span class="badge"><?= $badge ?></span>
|
||||
<?php foreach ($navigation as $id => ['label' => $label, 'uri' => $uri, 'permissions' => $permissions, 'badge' => $badge]): ?>
|
||||
<?php if ($panel->user()->permissions()->has($permissions)): ?>
|
||||
<li class="<?= ($location === $id) ? 'active' : '' ?>">
|
||||
<a href="<?= $panel->uri($uri) ?>"><?= $label ?></a>
|
||||
<?php if ($badge): ?>
|
||||
<span class="badge"><?= $badge ?></span>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,13 +15,9 @@
|
||||
<input id="email" type="email" required name="email">
|
||||
<label class="label-required" for="email"><?= $this->translate('panel.user.language') ?>:</label>
|
||||
<select id="language" name="language">
|
||||
<?php
|
||||
foreach ($panel->availableTranslations() as $key => $value):
|
||||
?>
|
||||
<option value="<?= $key ?>"<?php if ($key === $app->config()->get('system.panel.translation')): ?> selected<?php endif ?>><?= $value ?></option>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($panel->availableTranslations() as $key => $value): ?>
|
||||
<option value="<?= $key ?>" <?php if ($key === $app->config()->get('system.panel.translation')): ?> selected<?php endif ?>><?= $value ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
<div class="separator"></div>
|
||||
|
@ -1,12 +1,16 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.statistics.statistics') ?></div>
|
||||
<div class="header-title"><?= $this->translate('panel.statistics.statistics') ?></div>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-xs-1-2"><div class="section-header"><h3 class="caption"><?= $this->translate('panel.dashboard.statistics') ?></h3></div></div>
|
||||
<div class="col-xs-1-2">
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.dashboard.statistics') ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-1-2">
|
||||
<div class="ct-legend ct-legend-right">
|
||||
<span class="ct-legend-label ct-series-a mr-8"><?= $this->icon('circle-small-fill') ?> <?= $this->translate('panel.dashboard.statistics.visits') ?></span>
|
||||
@ -14,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistics-chart ct-chart" data-chart-data="<?= $this->escapeAttr($statistics); ?>"></div>
|
||||
<div class="statistics-chart ct-chart" data-chart-data="<?= $this->escapeAttr($statistics) ?>"></div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="row text-align-center">
|
||||
@ -38,7 +42,9 @@
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-header"><h3 class="caption"><?= $this->translate('panel.statistics.totalVisits') ?></h3></div>
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.statistics.totalVisits') ?></h3>
|
||||
</div>
|
||||
<table class="table-bordered table-striped table-hoverable text-size-s">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -48,13 +54,13 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($pageViews as $page => $views): ?>
|
||||
<tr>
|
||||
<td class="truncate"><a href="<?= $site->uri($page, includeLanguage: false) ?>" target="_blank"><?= $page ?></a></td>
|
||||
<td><?= $views ?></td>
|
||||
<td><?= round($views / $totalViews * 100, 2) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($pageViews as $page => $views): ?>
|
||||
<tr>
|
||||
<td class="truncate"><a href="<?= $site->uri($page, includeLanguage: false) ?>" target="_blank"><?= $page ?></a></td>
|
||||
<td><?= $views ?></td>
|
||||
<td><?= round($views / $totalViews * 100, 2) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.tools.tools') ?></div>
|
||||
<div class="header-title"><?= $this->translate('panel.tools.tools') ?></div>
|
||||
</div>
|
||||
|
||||
<?= $tabs ?>
|
||||
@ -12,7 +12,9 @@
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-header"><h3 class="caption"><?= $this->translate('panel.tools.latestBackups') ?></h3></div>
|
||||
<div class="section-header">
|
||||
<h3 class="caption"><?= $this->translate('panel.tools.latestBackups') ?></h3>
|
||||
</div>
|
||||
<table id="backups-table" class="table-bordered table-hoverable text-size-s">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -23,16 +25,16 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($backups as $backup): ?>
|
||||
<tr>
|
||||
<td class="truncate"><?= $this->icon('file-archive') ?> <a href="<?= $panel->uri('/backup/download/' . $backup['encodedName']) . '/' ?>"><?= $backup['name'] ?></a></td>
|
||||
<td class="truncate text-align-center show-from-m"><?= $this->datetime($backup['timestamp']) ?></td>
|
||||
<td class="truncate text-align-center show-from-s"><?= $backup['size'] ?></td>
|
||||
<td class="text-align-center">
|
||||
<button type="button" class="button-link" data-modal="deleteFileModal" data-modal-action="<?= $panel->uri('/backup/delete/' . $backup['encodedName']) . '/' ?>" title="<?= $this->translate('panel.tools.backup.delete') ?>" aria-label="<?= $this->translate('panel.tools.backup.delete') ?>"><?= $this->icon('trash') ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($backups as $backup): ?>
|
||||
<tr>
|
||||
<td class="truncate"><?= $this->icon('file-archive') ?> <a href="<?= $panel->uri('/backup/download/' . $backup['encodedName']) . '/' ?>"><?= $backup['name'] ?></a></td>
|
||||
<td class="truncate text-align-center show-from-m"><?= $this->datetime($backup['timestamp']) ?></td>
|
||||
<td class="truncate text-align-center show-from-s"><?= $backup['size'] ?></td>
|
||||
<td class="text-align-center">
|
||||
<button type="button" class="button-link" data-modal="deleteFileModal" data-modal-action="<?= $panel->uri('/backup/delete/' . $backup['encodedName']) . '/' ?>" title="<?= $this->translate('panel.tools.backup.delete') ?>" aria-label="<?= $this->translate('panel.tools.backup.delete') ?>"><?= $this->icon('trash') ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
@ -1,11 +1,7 @@
|
||||
<div class="tabs" style="margin-top:-1.5rem">
|
||||
<?php
|
||||
foreach ($tabs as $tab):
|
||||
?>
|
||||
<?php if ($panel->user()->permissions()->has('tools.' . $tab)): ?>
|
||||
<a class="tabs-tab<?= ($tab === $current) ? ' active' : '' ?>" href="<?= $panel->uri('/tools/' . $tab . '/') ?>"><?= $this->translate('panel.tools.' . $tab) ?></a>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
<?php foreach ($tabs as $tab): ?>
|
||||
<?php if ($panel->user()->permissions()->has('tools.' . $tab)): ?>
|
||||
<a class="tabs-tab<?= ($tab === $current) ? ' active' : '' ?>" href="<?= $panel->uri('/tools/' . $tab . '/') ?>"><?= $this->translate('panel.tools.' . $tab) ?></a>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.tools.tools') ?></div>
|
||||
<div class="header-title"><?= $this->translate('panel.tools.tools') ?></div>
|
||||
</div>
|
||||
|
||||
<?= $tabs ?>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.users.users') ?></div>
|
||||
<div>
|
||||
<button type="button" class="button-accent" data-modal="newUserModal"<?php if (!$panel->user()->permissions()->has('users.create')): ?> disabled<?php endif ?>><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.users.newUser') ?></button>
|
||||
<button type="button" class="button-accent" data-modal="newUserModal" <?php if (!$panel->user()->permissions()->has('users.create')): ?> disabled<?php endif ?>><?= $this->icon('plus-circle') ?> <?= $this->translate('panel.users.newUser') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -16,19 +16,19 @@
|
||||
<div class="users-headers-cell user-actions"><?= $this->translate('panel.user.actions') ?></div>
|
||||
</div>
|
||||
<div class="users-list">
|
||||
<?php foreach ($users as $user): ?>
|
||||
<div class="users-item">
|
||||
<div class="users-item-cell user-username truncate">
|
||||
<img class="user-avatar mr-4" src="<?= $user->image()->uri() ?>">
|
||||
<a href="<?= $panel->uri('/users/' . $user->username() . '/profile/') ?>"><?= $this->escape($user->username()) ?></a>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<div class="users-item">
|
||||
<div class="users-item-cell user-username truncate">
|
||||
<img class="user-avatar mr-4" src="<?= $user->image()->uri() ?>">
|
||||
<a href="<?= $panel->uri('/users/' . $user->username() . '/profile/') ?>"><?= $this->escape($user->username()) ?></a>
|
||||
</div>
|
||||
<div class="users-item-cell user-fullname truncate show-from-s"><?= $this->escape($user->fullname()) ?></div>
|
||||
<div class="users-item-cell user-email truncate show-from-m"><?= $this->escape($user->email()) ?></div>
|
||||
<div class="users-item-cell user-last-access truncate show-from-s"><?= is_null($user->lastAccess()) ? '∞' : $this->datetime($user->lastAccess()) ?></div>
|
||||
<div class="users-item-cell user-actions">
|
||||
<button type="button" class="button-link" data-modal="deleteUserModal" data-modal-action="<?= $panel->uri('/users/' . $user->username() . '/delete/') ?>" title="<?= $this->translate('panel.users.deleteUser') ?>" aria-label="<?= $this->translate('panel.users.deleteUser') ?>" <?php if (!$panel->user()->canDeleteUser($user)): ?>disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="users-item-cell user-fullname truncate show-from-s"><?= $this->escape($user->fullname()) ?></div>
|
||||
<div class="users-item-cell user-email truncate show-from-m"><?= $this->escape($user->email()) ?></div>
|
||||
<div class="users-item-cell user-last-access truncate show-from-s"><?= is_null($user->lastAccess()) ? '∞' : $this->datetime($user->lastAccess()) ?></div>
|
||||
<div class="users-item-cell user-actions">
|
||||
<button type="button" class="button-link" data-modal="deleteUserModal" data-modal-action="<?= $panel->uri('/users/' . $user->username() . '/delete/') ?>" title="<?= $this->translate('panel.users.deleteUser') ?>" aria-label="<?= $this->translate('panel.users.deleteUser') ?>" <?php if (!$panel->user()->canDeleteUser($user)): ?>disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -1,29 +1,29 @@
|
||||
<?php $this->layout('panel') ?>
|
||||
<form method="post" enctype="multipart/form-data" data-form="user-profile-form">
|
||||
|
||||
<div class="header">
|
||||
<div class="header">
|
||||
<div class="header-title"><?= $this->translate('panel.users.user') ?></div>
|
||||
<div>
|
||||
<button type="button" class="button-link" data-modal="deleteUserModal" data-modal-action="<?= $panel->uri('/users/' . $user->username() . '/delete/') ?>" title="<?= $this->translate('panel.users.deleteUser') ?>" aria-label="<?= $this->translate('panel.users.deleteUser') ?>" <?php if (!$panel->user()->canDeleteUser($user)): ?>disabled<?php endif ?>><?= $this->icon('trash') ?></button>
|
||||
<button type="submit" class="button-accent" data-command="save"><?= $this->icon('check-circle') ?> <?= $this->translate('panel.modal.action.save') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<div class="user-summary">
|
||||
<div class="user-summary-avatar">
|
||||
<img src="<?= $user->image()->uri() ?>">
|
||||
</div>
|
||||
<div class="user-summary-data">
|
||||
<h3><?= $this->escape($user->fullname()) ?></h3>
|
||||
<?= $this->escape($user->username()) ?><br>
|
||||
<a href="mailto:<?= $user->email() ?>"><?= $this->escape($user->email()) ?></a><br>
|
||||
<?= $this->translate('panel.user.lastAccess') ?>: <?= is_null($user->lastAccess()) ? '∞' : $this->datetime($user->lastAccess()) ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($panel->user()->canChangeOptionsOf($user)): ?>
|
||||
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<section class="section">
|
||||
<div class="user-summary">
|
||||
<div class="user-summary-avatar">
|
||||
<img src="<?= $user->image()->uri() ?>">
|
||||
</div>
|
||||
<div class="user-summary-data">
|
||||
<h3><?= $this->escape($user->fullname()) ?></h3>
|
||||
<?= $this->escape($user->username()) ?><br>
|
||||
<a href="mailto:<?= $user->email() ?>"><?= $this->escape($user->email()) ?></a><br>
|
||||
<?= $this->translate('panel.user.lastAccess') ?>: <?= is_null($user->lastAccess()) ? '∞' : $this->datetime($user->lastAccess()) ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($panel->user()->canChangeOptionsOf($user)): ?>
|
||||
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
||||
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>">
|
||||
<?php endif ?>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user