From 6eaedd679117fa085fcef7ad81246bc519bfffe6 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 4 Sep 2021 21:54:48 +0200 Subject: [PATCH] change hideous admin menu to something way better --- index.php | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/index.php b/index.php index 888cf1c..311a6be 100644 --- a/index.php +++ b/index.php @@ -139,18 +139,13 @@ $breadcrumb = [ html::escapeHTML($core->blog->name) => '', __('Enhance post content') => $p_url ]; -$top_menu = []; +$filters_combo = []; foreach($filters_id as $id => $name) { - - $active = ''; if ($default_part == $id) { $breadcrumb[__($filters_id[$default_part])] = ''; - $active = ' class="active"'; } - - $top_menu[] = - '' . __($name) . ''; + $filters_combo[__($name)] = $id; } # -- Display page -- @@ -172,9 +167,12 @@ dcPage::breadcrumb($breadcrumb) . dcPage::notices() . # Filters list -''; +'
' . +'

' . + form::combo('part', $filters_combo, $default_part) . ' ' . +$core->formNonce() . +'

' . +'
'; # Filter content if (isset($filters_id[$default_part])) { @@ -348,7 +346,8 @@ if (isset($filters_id[$default_part])) { echo '

' . __('Page(s)') . ' : ' . $pager->getLinks() . '

- +
+
@@ -368,15 +367,15 @@ if (isset($filters_id[$default_part])) { form::hidden(['epc_old_value[]'], html::escapeHTML($list->epc_value)) . form::field(['epc_key[]'], 30, 225, html::escapeHTML($list->epc_key), '') . ' - + '; } echo ' -
' . __('Key') . ' ' . - form::field(['epc_value[]'], 90, 225, html::escapeHTML($list->epc_value), 'maximal') . '' . + form::field(['epc_value[]'], 90, 225, html::escapeHTML($list->epc_value), '') . '' . dt::dt2str(__('%Y-%m-%d %H:%M'), $list->epc_upddt,$core->auth->getInfo('user_tz')) . '
+

' . __('In order to remove a record, leave empty its key or value.') . '

' . __('Page(s)') . ' : ' . $pager->getLinks() . '

@@ -422,10 +421,4 @@ $core->callBehavior('enhancePostContentAdminPage', $core); dcPage::helpBlock('enhancePostContent'); -# Footers -echo -'

-enhancePostContent - ' . $core->plugins->moduleInfo('enhancePostContent', 'version') . '  -' . __('enhancePostContent') . ' -

-'; \ No newline at end of file +echo ''; \ No newline at end of file