diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-02-01 15:15:13 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-02-01 15:15:13 +0100 |
commit | 0e8661256f7851e1feb0d5d49a46a2a56149fd83 (patch) | |
tree | 84ad7c238cb8c24e80f07a12f4a32afd64bb897e /app/view | |
parent | cc183f395a5e4eb93b712dfacc8083f6554b2250 (diff) | |
download | wcms-0e8661256f7851e1feb0d5d49a46a2a56149fd83.tar.gz wcms-0e8661256f7851e1feb0d5d49a46a2a56149fd83.zip |
edit by fix
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/home.php | 29 | ||||
-rw-r--r-- | app/view/templates/homeopt.php | 12 |
2 files changed, 20 insertions, 21 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 9636d7e..160b383 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -28,10 +28,13 @@ <div id="main"> <h2>Pages</h2> -<form action="/massedit" method="post"> - <div id="massedit"> + +<form action="/massedit" method="post"> + +<div id="massedit"> + <!-- <select name="massedit" required> <option value="public">set as public</option> <option value="private">set as private</option> @@ -43,17 +46,9 @@ </select> <input type="submit" name="massaction" value="do" onclick="confirmSubmit(event, 'Are you sure')" > + --> - <?php - - $array = ['id' => [ 'getadress' => true, - 'label' => 'id', - 'show' => true] - ] - - - ?> <input type="hidden" name="action" value="massedit"> </div> @@ -65,11 +60,13 @@ <th><a href="<?= $opt->getadress('id') ?>">id</a></th> <th>edit</th> <th>see</th> - <th class="delete">del</th> - <?php if($user->isadmin()) { ?> - <th class="download">dl</th> + <th class="delete" title="delete page">del</th> + <?php if($user->issupereditor()) { ?> + <th class="download" title="download page as json">dl</th> <?php } if($columns['tag']) { ?> <th class="tag"><a href="<?= $opt->getadress('tag') ?>">tag</a></th> + <?php } if($columns['title']) { ?> + <th class="title"><a href="<?= $opt->getadress('title') ?>">title</a></th> <?php } if($columns['description']) { ?> <th class="summary">summary</th> <?php } if($columns['linkto']) { ?> @@ -99,10 +96,12 @@ <td><a href="<?= $this->uart('artedit', $item->id()) ?>">✏</a></td> <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank">👁</a></td> <td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>" >✖</a></td> - <?php if($user->isadmin()) { ?> + <?php if($user->issupereditor()) { ?> <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download>↓</a></td> <?php } if($columns['tag']) { ?> <td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td> + <?php } if($columns['title']) { ?> + <td class="title" title="<?= $item->title() ?>"><?= $item->title() ?></td> <?php } if($columns['description']) { ?> <td class="summary" title="<?= $item->description() ?>"><?= $item->description('short') ?></td> <?php } if($columns['linkto']) { ?> diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php index 36b44c5..8b1b7d7 100644 --- a/app/view/templates/homeopt.php +++ b/app/view/templates/homeopt.php @@ -32,8 +32,8 @@ foreach ($opt->col('array') as $key => $col) { <ul> -<input type="radio" id="OR" name="tagcompare" value="OR" ' . <?= $opt->tagcompare() == "OR" ? "checked" : "" ?> ><label for="OR">OR</label> -<input type="radio" id="AND" name="tagcompare" value="AND" <?= $opt->tagcompare() == "AND" ? "checked" : "" ?>><label for="AND">AND</label> +<input type="radio" id="tag_OR" name="tagcompare" value="OR" ' . <?= $opt->tagcompare() == "OR" ? "checked" : "" ?> ><label for="tag_OR">OR</label> +<input type="radio" id="tag_AND" name="tagcompare" value="AND" <?= $opt->tagcompare() == "AND" ? "checked" : "" ?>><label for="tag_AND">AND</label> <?php $in = false; @@ -71,8 +71,8 @@ if ($in = true || $out = true) { <ul> -<input type="radio" id="OR" name="authorcompare" value="OR" ' . <?= $opt->authorcompare() == "OR" ? "checked" : "" ?> ><label for="OR">OR</label> -<input type="radio" id="AND" name="authorcompare" value="AND" <?= $opt->authorcompare() == "AND" ? "checked" : "" ?>><label for="AND">AND</label> +<input type="radio" id="author_OR" name="authorcompare" value="OR" ' . <?= $opt->authorcompare() == "OR" ? "checked" : "" ?> ><label for="author_OR">OR</label> +<input type="radio" id="author_AND" name="authorcompare" value="AND" <?= $opt->authorcompare() == "AND" ? "checked" : "" ?>><label for="author_AND">AND</label> <?php $in = false; @@ -91,9 +91,9 @@ foreach ($opt->authorlist() as $authorfilter => $count) { if (in_array($authorfilter, $opt->authorfilter())) { - echo '<li><input type="checkbox" name="authorfilter[]" id="tag_' . $authorfilter . '" value="' . $authorfilter . '" checked /><label for="tag_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; + echo '<li><input type="checkbox" name="authorfilter[]" id="author_' . $authorfilter . '" value="' . $authorfilter . '" checked /><label for="author_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; } else { - echo '<li><input type="checkbox" name="authorfilter[]" id="tag_' . $authorfilter . '" value="' . $authorfilter . '" /><label for="tag_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; + echo '<li><input type="checkbox" name="authorfilter[]" id="author_' . $authorfilter . '" value="' . $authorfilter . '" /><label for="author_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; } } if ($in = true || $out = true) { |