aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-07-13 17:10:05 +0200
committervincent-peugnet <v.peugnet@free.fr>2019-07-13 17:10:05 +0200
commit7ccb591697227fcc77125e6b6fbe33f9fbe13ca4 (patch)
tree97bd0ffb8d828a93af2a372f5282123cd1039743
parent917e0b8dc3e11a6c14af29a6d546b3e78d4fbedd (diff)
downloadwcms-7ccb591697227fcc77125e6b6fbe33f9fbe13ca4.tar.gz
wcms-7ccb591697227fcc77125e6b6fbe33f9fbe13ca4.zip
icon-path fix
-rw-r--r--app/class/model.php6
-rw-r--r--app/view/templates/backtopbar.php14
-rw-r--r--app/view/templates/edittopbar.php4
-rw-r--r--app/view/templates/home.php6
4 files changed, 18 insertions, 12 deletions
diff --git a/app/class/model.php b/app/class/model.php
index 2b222ec..5815861 100644
--- a/app/class/model.php
+++ b/app/class/model.php
@@ -5,6 +5,7 @@ abstract class Model
const CONFIG_FILE = 'config.json';
const CSS_DIR = 'assets' . DIRECTORY_SEPARATOR .'css' . DIRECTORY_SEPARATOR;
const JS_DIR = 'assets' . DIRECTORY_SEPARATOR .'js' . DIRECTORY_SEPARATOR;
+ const ICONS_DIR = 'assets' . DIRECTORY_SEPARATOR .'icons' . DIRECTORY_SEPARATOR;
const FONT_DIR = 'fonts' . DIRECTORY_SEPARATOR;
const MEDIA_DIR = 'media' . DIRECTORY_SEPARATOR;
const FAVICON_DIR = 'media' . DIRECTORY_SEPARATOR . 'favicon' . DIRECTORY_SEPARATOR;
@@ -87,4 +88,9 @@ abstract class Model
return self::dirtopath(Model::FONT_DIR);
}
+ public static function iconpath()
+ {
+ return self::dirtopath(Model::ICONS_DIR);
+ }
+
}
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php
index 254a8ce..06ec1fe 100644
--- a/app/view/templates/backtopbar.php
+++ b/app/view/templates/backtopbar.php
@@ -12,17 +12,17 @@
<?php if($user->iseditor()) { ?>
<span id="menu">
-<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>><img src="assets/icons/home.png" alt="" class="icon">home</a>
-<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>><img src="assets/icons/media.png" alt="" class="icon">media</a>
-<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>><img src="assets/icons/font.png" alt="" class="icon">font</a>
+<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>home.png" alt="" class="icon">home</a>
+<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>media.png" alt="" class="icon">media</a>
+<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>font.png" alt="" class="icon">font</a>
<?php
if($user->isadmin()) {
?>
-<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>><img src="assets/icons/admin.png" alt="" class="icon">admin</a>
+<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>admin.png" alt="" class="icon">admin</a>
<?php
}
?>
-<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>><img src="assets/icons/info.png" alt="" class="icon">info</a>
+<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>info.png" alt="" class="icon">info</a>
</span>
@@ -48,8 +48,8 @@ if($user->isadmin()) {
<?php } else { ?>
<span>
-<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>><img src="assets/icons/timeline.png" alt="" class="icon">timeline</a>
-<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><img src="assets/icons/user.png" alt="" class="icon"><?= $user->id() ?></a> <i><?= $user->level() ?></i>
+<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>timeline.png" alt="" class="icon">timeline</a>
+<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><img src="<?= Model::iconpath() ?>user.png" alt="" class="icon"><?= $user->id() ?></a> <i><?= $user->level() ?></i>
</span>
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php
index 05cd0e2..04331b4 100644
--- a/app/view/templates/edittopbar.php
+++ b/app/view/templates/edittopbar.php
@@ -17,7 +17,7 @@
- <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" ><img src="assets/icons/read.png" class="icon">display</a>
+ <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" ><img src="<?= Model::iconpath() ?>read.png" class="icon">display</a>
<span id="headid"><?= $art->id() ?></span>
</span>
@@ -28,7 +28,7 @@
</span>
<span id="download">
- <a href="<?= $this->uart('artdownload', $art->id()) ?>"><img src="assets/icons/download.png" class="icon"><span class="text">download</span></a>
+ <a href="<?= $this->uart('artdownload', $art->id()) ?>"><img src="<?= Model::iconpath() ?>download.png" class="icon"><span class="text">download</span></a>
</span>
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index c5571a8..17dfc2d 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -117,11 +117,11 @@
<tr>
<td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td>
<td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td>
- <td><a href="<?= $this->uart('artedit', $item->id()) ?>"><img src="assets/icons/edit.png" class="icon"></a></td>
- <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank"><img src="assets/icons/read.png" class="icon"></a></td>
+ <td><a href="<?= $this->uart('artedit', $item->id()) ?>"><img src="<?= Model::iconpath() ?>edit.png" class="icon"></a></td>
+ <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank"><img src="<?= Model::iconpath() ?>read.png" class="icon"></a></td>
<td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>" >✖</a></td>
<?php if($user->issupereditor()) { ?>
- <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download><img src="assets/icons/download.png" class="icon"></a></td>
+ <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download><img src="<?= Model::iconpath() ?>download.png" class="icon"></a></td>
<?php } if($columns['tag']) { ?>
<td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td>
<?php } if($columns['title']) { ?>