aboutsummaryrefslogtreecommitdiff
path: root/app/view
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-08-21 18:24:05 +0200
committervincent-peugnet <v.peugnet@free.fr>2019-08-21 18:24:05 +0200
commitf0e2ac8baa2aa025cb820d96630b97041307d1d7 (patch)
tree85ae18e873dde467d052c00843fb8dcfdf3f6011 /app/view
parentb146952bb3ebacec8d4f1dd806ea5a9955bd3693 (diff)
downloadwcms-f0e2ac8baa2aa025cb820d96630b97041307d1d7.tar.gz
wcms-f0e2ac8baa2aa025cb820d96630b97041307d1d7.zip
Feature : datalist with autofocus
Diffstat (limited to 'app/view')
-rw-r--r--app/view/templates/admin.php2
-rw-r--r--app/view/templates/backtopbar.php11
-rw-r--r--app/view/templates/edit.php2
-rw-r--r--app/view/templates/font.php2
-rw-r--r--app/view/templates/home.php2
-rw-r--r--app/view/templates/info.php2
-rw-r--r--app/view/templates/media.php2
-rw-r--r--app/view/templates/timeline.php2
-rw-r--r--app/view/templates/user.php2
9 files changed, 18 insertions, 9 deletions
diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php
index 98027dc..97442ac 100644
--- a/app/view/templates/admin.php
+++ b/app/view/templates/admin.php
@@ -5,7 +5,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'admin']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'admin', 'pagelist' => $pagelist]) ?>
<main class="admin">
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php
index 8e15d14..19b9cf0 100644
--- a/app/view/templates/backtopbar.php
+++ b/app/view/templates/backtopbar.php
@@ -2,9 +2,18 @@
<span id="search">
<form action="<?= $this->url('search') ?>" method="post">
-<input type="text" name="id" id="id" placeholder="page id" required>
+<input type="text" list="searchdatalist" name="id" id="search" placeholder="page id" required <?= $tab !== 'edit' ? 'autofocus' : '' ?>>
<input type="submit" name="action" value="read">
<?= $user->iseditor() ? '<input type="submit" name="action" value="edit">' : '' ?>
+
+<?php if($user->iseditor()) { ?>
+<datalist id="searchdatalist">
+ <?php foreach ($pagelist as $id) { ?>
+ <option value="<?= $id ?>"><?= $id ?></option>
+ <?php } ?>
+</datalist>
+<?php } ?>
+
</form>
</span>
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php
index 5ce1d35..b097378 100644
--- a/app/view/templates/edit.php
+++ b/app/view/templates/edit.php
@@ -10,7 +10,7 @@
<body>
<main class="editor">
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist]) ?>
<?php $this->insert('edittopbar', ['art' => $art, 'user' => $user]) ?>
diff --git a/app/view/templates/font.php b/app/view/templates/font.php
index 6c53023..8fcf149 100644
--- a/app/view/templates/font.php
+++ b/app/view/templates/font.php
@@ -5,7 +5,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'font']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'font', 'pagelist' => $pagelist]) ?>
<main class="font">
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 820d185..17d0a22 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -8,7 +8,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'home']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'home', 'pagelist' => $pagelist]) ?>
<?php if ($user->iseditor()) { ?>
diff --git a/app/view/templates/info.php b/app/view/templates/info.php
index 6c28068..f1ca1f9 100644
--- a/app/view/templates/info.php
+++ b/app/view/templates/info.php
@@ -5,7 +5,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'info']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'info', 'pagelist' => $pagelist]) ?>
<main class="info">
diff --git a/app/view/templates/media.php b/app/view/templates/media.php
index b13c58a..0f60368 100644
--- a/app/view/templates/media.php
+++ b/app/view/templates/media.php
@@ -5,7 +5,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'media']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'media', 'pagelist' => $pagelist]) ?>
<main class="media">
diff --git a/app/view/templates/timeline.php b/app/view/templates/timeline.php
index 874b953..2db861c 100644
--- a/app/view/templates/timeline.php
+++ b/app/view/templates/timeline.php
@@ -8,7 +8,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'timeline']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'timeline', 'pagelist' => $pagelist]) ?>
<?php if($user->iseditor()) { ?>
diff --git a/app/view/templates/user.php b/app/view/templates/user.php
index 6e302f8..21a7639 100644
--- a/app/view/templates/user.php
+++ b/app/view/templates/user.php
@@ -5,7 +5,7 @@
<body>
- <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'user']) ?>
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'user', 'pagelist' => $pagelist]) ?>
<main class="user">