aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/home.php
diff options
context:
space:
mode:
authorVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-03-25 19:55:25 +0100
committerGitHub <noreply@github.com>2020-03-25 19:55:25 +0100
commita17b7fc6aa87341c51e68baf3f217f709eb817d7 (patch)
treeba6958ba93e76d2464ad9ae068b9bd56400d5294 /app/view/templates/home.php
parentfa92ec6b40676677595047b71b3c2fafb1bf89ea (diff)
parentd17713051ca2fef29de8025fe876d417838cea7f (diff)
downloadwcms-a17b7fc6aa87341c51e68baf3f217f709eb817d7.tar.gz
wcms-a17b7fc6aa87341c51e68baf3f217f709eb817d7.zip
Merge pull request #72 from n-peugnet/implement-cytoscape.js
Implement cytoscape.js
Diffstat (limited to 'app/view/templates/home.php')
-rw-r--r--app/view/templates/home.php57
1 files changed, 54 insertions, 3 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 8078d4a..4784b08 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -24,13 +24,62 @@
<main class="home">
- <?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user]) ?>
+ <?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user, 'display' => $display]) ?>
<section class="pages">
<div class="block">
- <h2 class="hidephone">Pages (<?= count($table2) ?>)</h2>
+ <h2 class="hidephone">Pages (<?= count($pagelistopt) ?>) <span class="right"><a href="?display=list" <?= $display === 'list' ? 'style="color: white"' : '' ?> >list</a> / <a href="?display=map" <?= $display === 'map' ? 'style="color: white"' : '' ?> >map</a></span> </h2>
+
+ <?php if($display === 'map') { ?>
+
+ <!-- ___________________ M A P _________________________ -->
+
+ <div id="deepsearchbar">
+ <form action="" method="get">
+ <input type="hidden" name="display" value="map">
+ <input type="checkbox" name="showorphans" value="1" id="showorphans" <?= $showorphans ? 'checked' : '' ?>>
+ <label for="showorphans">show orphans pages</label>
+ <input type="checkbox" name="showredirection" value="1" id="showredirection" <?= $showredirection ? 'checked' : '' ?>>
+ <label for="showredirection">show redirections</label>
+ <select name="layout" id="layout">
+ <?= options(Wcms\Model::MAP_LAYOUTS, $layout) ?>
+ </select>
+ <label for="layout">graph layout</label>
+ <input type="submit" value="update">
+ </form>
+ </div>
+
+ <div id="graph"></div>
+
+ <script>
+ var data = <?= $json ?>;
+ console.log(data);
+ </script>
+
+ <script src="<?= Wcms\Model::jspath() ?>map.bundle.js"></script>
+
+ <?php } else { ?>
+
+ <!-- ___________________ L I S T _________________________ -->
+
+ <div id="deepsearchbar" class="hidephone">
+ <form action="<?= $this->url('home') ?>" method="get">
+ <input type="text" name="search" value="<?= $deepsearch ?>" id="deepsearch" placeholder="deep search">
+ <input type="checkbox" name="title" id="deeptitle" value="1" <?= $searchopt['title'] ? 'checked' : '' ?>>
+ <label for="deeptitle">title</label>
+ <input type="checkbox" name="description" id="deepdescription" value="1" <?= $searchopt['description'] ? 'checked' : '' ?>>
+ <label for="deepdescription">description</label>
+ <input type="checkbox" name="content" id="deepcontent" value="1" <?= $searchopt['content'] ? 'checked' : '' ?>>
+ <label for="deepcontent" title="Markdown content : MAIN, HEADER, NAV, ASIDE, FOOTER">content</label>
+ <input type="checkbox" name="other" id="deepother" value="1" <?= $searchopt['other'] ? 'checked' : '' ?>>
+ <label for="deepother" title="Structure content : BODY, CSS, Javascript">other</label>
+ <input type="checkbox" name="case" id="deepcase" value="1" <?= $searchopt['casesensitive'] ? 'checked' : '' ?>>
+ <label for="deepcase" title="Case sensitive or not">case sensitive</label>
+ <input type="submit" value="search">
+ </form>
+ </div>
<div id="deepsearchbar" class="hidephone">
@@ -105,7 +154,7 @@
</tr>
</thead>
<tbody>
- <?php foreach ($table2 as $item) { ?>
+ <?php foreach ($pagelistopt as $item) { ?>
<tr>
<?php if($user->issupereditor()) { ?><td class="hidephone"><input type="checkbox" name="pagesid[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>" form="multi"></td><?php } ?>
<?php if($columns['favicon']) { ?>
@@ -161,6 +210,8 @@
</table>
</div>
+ <?php } ?>
+
</div>
</section>