aboutsummaryrefslogtreecommitdiff
path: root/app/view
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-11 22:04:49 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-11 22:04:49 +0100
commita64af357ff41a61f5248e2052274315b390e979c (patch)
treef08323727b1b2a1fc86f8290777cf847f9604334 /app/view
parentcea923a1e82a7e8ce696418c3a5a0f7703871101 (diff)
downloadwcms-a64af357ff41a61f5248e2052274315b390e979c.tar.gz
wcms-a64af357ff41a61f5248e2052274315b390e979c.zip
clean
Diffstat (limited to 'app/view')
-rw-r--r--app/view/templates/body.php0
-rw-r--r--app/view/templates/confirmdelete.php (renamed from app/view/templates/delete.php)4
-rw-r--r--app/view/templates/connect.php2
-rw-r--r--app/view/templates/edit.php5
-rw-r--r--app/view/templates/editrightbar.php2
-rw-r--r--app/view/templates/edittopbar.php15
-rw-r--r--app/view/templates/home.php10
-rw-r--r--app/view/templates/layout.php2
-rw-r--r--app/view/templates/navart.php4
-rw-r--r--app/view/templates/read.php6
-rw-r--r--app/view/templates/readcreate.php5
11 files changed, 24 insertions, 31 deletions
diff --git a/app/view/templates/body.php b/app/view/templates/body.php
deleted file mode 100644
index e69de29..0000000
--- a/app/view/templates/body.php
+++ /dev/null
diff --git a/app/view/templates/delete.php b/app/view/templates/confirmdelete.php
index be54451..e05f6da 100644
--- a/app/view/templates/delete.php
+++ b/app/view/templates/confirmdelete.php
@@ -1,4 +1,4 @@
-<?php $this->layout('layout', ['title' => 'delete', 'description' => 'delete']) ?>
+<?php $this->layout('layout', ['title' => 'delete', 'description' => 'delete', 'css' => $css . 'delete.css']) ?>
<?php $this->start('page') ?>
@@ -34,7 +34,7 @@
</div>
-<form action="./?id=<?= $art->id() ?>&action=delete" method="post">
+<form action="<?= $this->uart('artdelete', $art->id()) ?>" method="post">
<input type="hidden" name="deleteconfirm" value="true">
<input type="submit" value="confirm delete">
</form>
diff --git a/app/view/templates/connect.php b/app/view/templates/connect.php
index 3e2aeba..a4d58e7 100644
--- a/app/view/templates/connect.php
+++ b/app/view/templates/connect.php
@@ -1,4 +1,4 @@
-<?php $this->layout('layout', ['title' => 'Connect', 'description' => 'connect']) ?>
+<?php $this->layout('layout', ['title' => 'Connect', 'description' => 'connect', 'css' => $css . 'connect.css']) ?>
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php
index 33d42f4..7379378 100644
--- a/app/view/templates/edit.php
+++ b/app/view/templates/edit.php
@@ -1,4 +1,4 @@
-<?php $this->layout('layout', ['title' => '✏ '.$art->title()]) ?>
+<?php $this->layout('layout', ['title' => '✏ '.$art->title(), 'css' => $css . 'edit.css']) ?>
@@ -24,9 +24,6 @@
</div>
-
-<input type="hidden" name="id" value="<?= $art->id() ?>">
-
</form>
</section>
diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php
index 92d5f81..a6cc2a0 100644
--- a/app/view/templates/editrightbar.php
+++ b/app/view/templates/editrightbar.php
@@ -7,7 +7,7 @@
<?php
foreach ($artlist as $item ) {
?>
- <a href="?id=<?= $item ?>&aff=edit"><?= $item ?></a>
+ <a href="<?= $this->uart('artedit', $item) ?>"><?= $item ?></a>
<input type="text" value="[<?= $item ?>](=<?= $item ?>)">
<?php
}
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php
index 20c2d8b..b97db12 100644
--- a/app/view/templates/edittopbar.php
+++ b/app/view/templates/edittopbar.php
@@ -1,23 +1,22 @@
<div id="topbar">
- <form id="delete" action="./" method="get">
- <input type="hidden" name="id" value="<?= $art->id() ?>">
- </form>
- <form action="?id=<?= $art->id() ?>&action=update" method="post" id="update">
+
+ <form action="<?= $this->uart('artupdate', $art->id()) ?>" method="post" id="update">
<span>
- <input type="submit" name="action" value="update" accesskey="x" form="update">
+ <input type="submit" value="update" accesskey="x" form="update">
</span>
<span>
- <input type="submit" name="action" value="delete" form="delete">
+ <a href="<?= $this->uart('artconfirmdelete', $art->id()) ?>">βœ– delete</a>
</span>
<span>
- <a href="?id=<?= $art->id() ?>" target="_blank">πŸ‘</a>
- <a href="?id=<?= $art->id() ?>&aff=log" target="_blank">ΒΆ</a>
+ <a href="<?= $this->url('backrouter') ?>" >🏠</a>
+ <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">πŸ‘</a>
+ <a href="<?= $this->uart('artlog', $art->id()) ?>" target="_blank">ΒΆ</a>
</span>
<span id="headid"><?= $art->id() ?></span>
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 2303f0f..5c3a007 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -1,4 +1,4 @@
-<?php $this->layout('layout', ['title' => 'home']) ?>
+<?php $this->layout('layout', ['title' => 'home', 'css' => $css . 'home.css']) ?>
@@ -80,10 +80,10 @@
<tr>
<td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="<?= $item->id() ?>"></td>
<td><label title="<?= $item->title() ?>" for="<?= $item->id() ?>"><?= $item->id() ?></label></td>
- <td><a href="?id=<?= $item->id() ?>&aff=edit">✏</a></td>
- <td><a href="?id=<?= $item->id() ?>" target="_blank">πŸ‘</a></td>
- <td><a href="?id=<?= $item->id() ?>&action=delete" >πŸ—‘</a></td>
- <td><a href="?id=<?= $item->id() ?>&aff=log" target="_blank">ΒΆ</a></td>
+ <td><a href="<?= $this->uart('artedit', $item->id()) ?>">✏</a></td>
+ <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank">πŸ‘</a></td>
+ <td><a href="<?= $this->uart('artdelete', $item->id()) ?>" >πŸ—‘</a></td>
+ <td><a href="<?= $this->uart('artlog', $item->id()) ?>" target="_blank">ΒΆ</a></td>
<td><?= $item->tag('sort') ?></td>
<td><?= $item->description() ?></td>
<td><?= $item->linkto('sort') ?></td>
diff --git a/app/view/templates/layout.php b/app/view/templates/layout.php
index 7439f48..c20264d 100644
--- a/app/view/templates/layout.php
+++ b/app/view/templates/layout.php
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width" />
<link rel="shortcut icon" href="./media/logo.png" type="image/x-icon">
<title><?= $title ?></title>
- <link rel="stylesheet" href="./../public/css/soft.css">
+ <link rel="stylesheet" href="<?= $css ?>">
<?=$this->section('customhead')?>
<?=$this->section('arthead')?>
diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php
index 6f4388c..f747eca 100644
--- a/app/view/templates/navart.php
+++ b/app/view/templates/navart.php
@@ -53,10 +53,10 @@ div#dropmenu {
<?php if($user->canedit() && $artexist) { ?>
<li>
- <a class="button" href="<?= $this->url('artread/', ['art' => $art->id()]) ?>" target="_blank">display</a>
+ <a class="button" href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">display</a>
</li>
<li>
- <a class="button" href="<?= $this->url('artedit/', ['art' => $art->id()]) ?>" >edit</a>
+ <a class="button" href="<?= $this->uart('artedit', $art->id()) ?>" >edit</a>
</li>
<?php } ?>
diff --git a/app/view/templates/read.php b/app/view/templates/read.php
index 35b1e7d..1911cf6 100644
--- a/app/view/templates/read.php
+++ b/app/view/templates/read.php
@@ -53,8 +53,10 @@ $this->stop();
} else {
echo '<h1>' . $alertnotexist . '</h1>';
if ($cancreate) {
- $this->insert('readcreate', ['id' => $art->id()]);
- }
+ ?>
+ <a href="<?= $this->uart('artadd', $art->id()) ?>">⭐ Create</a>
+ <?php
+ }
}
diff --git a/app/view/templates/readcreate.php b/app/view/templates/readcreate.php
deleted file mode 100644
index dc36420..0000000
--- a/app/view/templates/readcreate.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<form action="./" method="get">
-<input type="hidden" name="id" value="<?= $id ?>">
-<input type="hidden" name="action" value="add">
-<input type="submit" value="create">
-</form> \ No newline at end of file