diff options
-rw-r--r-- | app/class/art2.php | 10 | ||||
-rw-r--r-- | app/class/controllerart.php | 2 | ||||
-rw-r--r-- | app/view/templates/home.php | 29 | ||||
-rw-r--r-- | app/view/templates/homeopt.php | 12 | ||||
-rw-r--r-- | composer.json | 2 |
5 files changed, 29 insertions, 26 deletions
diff --git a/app/class/art2.php b/app/class/art2.php index 4f04858..01ce218 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -148,7 +148,11 @@ class Art2 public function title($type = 'string') { - return $this->title; + if($type == 'sort') { + return strtolower($this->title); + } else { + return $this->title; + } } public function description($type = 'string') @@ -532,7 +536,7 @@ class Art2 public function setcss($css) { if (strlen($css) < self::LENTEXT and is_string($css)) { - $this->css = strip_tags(trim(strtolower($css))); + $this->css = trim(strtolower($css)); } } @@ -722,7 +726,7 @@ class Art2 public function setauthors($authors) { if(is_array($authors)) { - $this->authors = $authors; + $this->authors = array_values(array_filter($authors)); } } diff --git a/app/class/controllerart.php b/app/class/controllerart.php index dfdde7f..95a9d3e 100644 --- a/app/class/controllerart.php +++ b/app/class/controllerart.php @@ -149,7 +149,7 @@ class Controllerart extends Controller $this->setart($id, 'artedit'); - if ($this->importart() && $this->canedit()) { + if ($this->importart() && $this->canedit() && empty($this->art->editby())) { $tablist = ['main' => $this->art->main(), 'css' => $this->art->css(), 'header' => $this->art->header(), 'nav' => $this->art->nav(), 'aside' => $this->art->aside(), 'footer' => $this->art->footer(), 'body' => $this->art->body(), 'javascript' => $this->art->javascript()]; $faviconlist = $this->mediamanager->listfavicon(); 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) { diff --git a/composer.json b/composer.json index d572e49..ab0f8a6 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.1.0", + "version": "1.1.1", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", |