Commit a8341718 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: fix layout bugs in admin and update translation files

fixes #40
parent e109df30
<?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
return [
'dashboard' => 'Admin dashboard',
'welcome_message' => 'Welcome to the admin area!',
];
......@@ -20,4 +20,9 @@ return [
'pages' => 'Pages',
'page-list' => 'All pages',
'page-create' => 'New Page',
'account' => [
'my-account' => 'My account',
'change-password' => 'Change password',
'logout' => 'Logout',
],
];
......@@ -7,7 +7,7 @@
}
.form-radio-btn + label {
@apply px-2 py-1 text-sm text-black bg-white border rounded cursor-pointer;
@apply inline-block px-2 py-1 text-sm text-black bg-white border rounded cursor-pointer;
&:hover {
@apply bg-green-100;
......
......@@ -30,7 +30,7 @@
'pageTitle'
) ?></h1>
</div>
<div class="flex flex-wrap gap-y-2"><?= $this->renderSection(
<div class="flex flex-wrap"><?= $this->renderSection(
'headerRight'
) ?></div>
</div>
......
......@@ -52,13 +52,12 @@ $navigation = [
<nav class="absolute z-50 flex-col hidden py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="my-accountDropdown" data-popper="menu" data-popper-placement="right-end">
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'my-account'
) ?>">My Account</a>
) ?>"><?= lang('AdminNavigation.account.my-account') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'change-password'
) ?>">Change password</a>
) ?>"><?= lang('AdminNavigation.account.change-password') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'logout'
) ?>">Logout</a>
) ?>"><?= lang('AdminNavigation.account.logout') ?></a>
</nav>
</div>
......@@ -2,13 +2,13 @@
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
Dashboard
<?= lang('Admin.dashboard') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
Admin dashboard
<?= lang('Admin.dashboard') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
Welcome to the admin area!
<?= lang('Admin.welcome_message') ?>
<?= $this->endsection() ?>
......@@ -108,7 +108,7 @@
</div>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend>
<?= lang('Episode.form.type.label') .
hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?>
......
......@@ -233,7 +233,7 @@
<?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex mb-6 gap-1']) ?>
<?= form_fieldset('', ['class' => 'mb-6']) ?>
<legend>
<?= lang('Episode.form.parental_advisory.label') .
hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?>
......@@ -287,11 +287,7 @@
hint_tooltip(lang('Episode.form.block_hint'), 'ml-1'),
['id' => 'block', 'name' => 'block'],
'yes',
old(
'block',
$episode->block
)
old('block', $episode->block)
) ?>
<?= form_section_close() ?>
......
......@@ -4,6 +4,10 @@
<?= lang('MyAccount.changePassword') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('MyAccount.changePassword') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
......
......@@ -4,6 +4,10 @@
<?= lang('MyAccount.info') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('MyAccount.info') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
......
......@@ -83,12 +83,12 @@ $podcastNavigation = [
<nav class="absolute z-50 flex-col hidden py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="my-accountDropdown" data-popper="menu" data-popper-placement="right-end">
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'my-account'
) ?>">My Account</a>
) ?>"><?= lang('AdminNavigation.account.my-account') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'change-password'
) ?>">Change password</a>
) ?>"><?= lang('AdminNavigation.account.change-password') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'logout'
) ?>">Logout</a>
) ?>"><?= lang('AdminNavigation.account.logout') ?></a>
</nav>
</div>
......@@ -58,7 +58,9 @@
'required' => 'required',
]) ?>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
<?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend>
<?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
......@@ -131,7 +133,7 @@
]
) ?>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend>
<?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
......
......@@ -61,7 +61,7 @@
'required' => 'required',
]) ?>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend><?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
</legend>
......@@ -143,7 +143,7 @@
]
) ?>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend><?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
</legend>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment