aboutsummaryrefslogtreecommitdiffstats
path: root/theme/admin/html/page
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2019-04-26 20:32:48 +0200
committerThomas Lange <code@nerdmind.de>2019-04-26 21:02:13 +0200
commit33794b12d5c68df918b988497a396b86acb09feb (patch)
tree810476a1fe4265f5163d0d1ceb6a49f5a668aa33 /theme/admin/html/page
parent0c918cafbef2e6c402e6852e821397114ea62284 (diff)
downloadblog-33794b12d5c68df918b988497a396b86acb09feb.tar.gz
blog-33794b12d5c68df918b988497a396b86acb09feb.tar.xz
blog-33794b12d5c68df918b988497a396b86acb09feb.zip
Rename "template" directory to "theme"
This commit renames the "template" directory to "theme" because "theme" is the more correct term here.
Diffstat (limited to 'theme/admin/html/page')
-rw-r--r--theme/admin/html/page/delete.php4
-rw-r--r--theme/admin/html/page/form.php98
-rw-r--r--theme/admin/html/page/index.php14
-rw-r--r--theme/admin/html/page/insert.php4
-rw-r--r--theme/admin/html/page/item.php29
-rw-r--r--theme/admin/html/page/search.php17
-rw-r--r--theme/admin/html/page/update.php4
7 files changed, 170 insertions, 0 deletions
diff --git a/theme/admin/html/page/delete.php b/theme/admin/html/page/delete.php
new file mode 100644
index 0000000..ccc569f
--- /dev/null
+++ b/theme/admin/html/page/delete.php
@@ -0,0 +1,4 @@
+<h1><i class="fa fa-trash-o"></i><?=$Language->text('delete_page')?></h1>
+<p><?=$Language->text('delete_page_desc')?></p>
+
+<?=$HTML?> \ No newline at end of file
diff --git a/theme/admin/html/page/form.php b/theme/admin/html/page/form.php
new file mode 100644
index 0000000..6a4be33
--- /dev/null
+++ b/theme/admin/html/page/form.php
@@ -0,0 +1,98 @@
+<form action="" method="POST">
+ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
+<?php if($FORM['TYPE'] !== 'DELETE'): ?>
+ <div class="flex flex-responsive">
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-database"></i></div>
+ <div class="form-label-flex"><label for="form_id">ID</label></div>
+ <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div>
+ </div>
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-user"></i></div>
+ <div class="form-label-flex"><label for="form_user"><?=$Language->text('label_user')?></label></div>
+ <div class="form-field-flex">
+ <select id="form_user" name="user">
+ <?php foreach($FORM['USER_LIST'] as $user): ?>
+ <option value="<?=$user['ID']?>"<?=($FORM['DATA']['USER'] === $user['ID']) ? ' selected' : '' ?>><?=escapeHTML($user['FULLNAME'])?> [<?=$user['USERNAME']?>]</option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="flex flex-responsive">
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-file-text-o"></i></div>
+ <div class="form-label-flex"><label for="form_name"><?=$Language->text('label_name')?></label></div>
+ <div class="form-field-flex"><input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /></div>
+ </div>
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-link"></i></div>
+ <div class="form-label-flex"><label for="form_slug"><?=$Language->text('label_slug')?></label></div>
+ <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div>
+ </div>
+ </div>
+ <div class="flex flex-responsive">
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
+ <div class="form-label-flex"><label for="form_time_insert"><?=$Language->text('label_insert')?></label></div>
+ <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="YYYY-MM-DD HH:II:SS" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div>
+ </div>
+ <div class="flex-item">
+ <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
+ <div class="form-label-flex"><label for="form_time_update"><?=$Language->text('label_update')?></label></div>
+ <div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : 'CURRENT_TIMESTAMP')?>" value="" /></div>
+ </div>
+ </div>
+ <div class="flex flex-direction-column">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
+ <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
+ </div>
+ <div class="flex flex-padding background flex-emoticons">
+ <ul id="emoticon-list" class="button-list emoticons">
+ <?php foreach(getUnicodeEmoticons() as $emoticon => $explanation):?>
+ <li data-emoticon="<?=$emoticon?>" title="<?=$explanation?>"><?=$emoticon?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div class="flex flex-padding background">
+ <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
+ </div>
+<?php else: ?>
+ <div class="flex flex-padding background flex-direction-column">
+ <?=$HTML?>
+ </div>
+<?php endif; ?>
+
+ <div class="flex flex-padding background">
+ <?php if($FORM['TYPE'] === 'INSERT'): ?>
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
+ <?php endif; ?>
+ </div>
+</form> \ No newline at end of file
diff --git a/theme/admin/html/page/index.php b/theme/admin/html/page/index.php
new file mode 100644
index 0000000..7067c40
--- /dev/null
+++ b/theme/admin/html/page/index.php
@@ -0,0 +1,14 @@
+<h1><i class="fa fa-file-text-o"></i><?=$Language->text('page_overview')?></h1>
+<p class="actions-before"><?=$Language->text('overview_page_desc')?></p>
+<ul class="actions">
+ <li><a href="<?=Application::getAdminURL('page/insert.php')?>" title="<?=$Language->text('insert_page')?>"><i class="fa fa-pencil-square-o"></i><?=$Language->text('insert')?></a></li>
+ <li><a href="<?=Application::getAdminURL('page/search.php')?>" title="<?=$Language->text('search_page')?>"><i class="fa fa-search"></i><?=$Language->text('search')?></a></li>
+</ul>
+
+<div class="item-container page">
+ <?php foreach($LIST['PAGES'] as $page): ?>
+ <?php echo $page; ?>
+ <?php endforeach; ?>
+</div>
+
+<?=$PAGINATION['HTML']?> \ No newline at end of file
diff --git a/theme/admin/html/page/insert.php b/theme/admin/html/page/insert.php
new file mode 100644
index 0000000..7442200
--- /dev/null
+++ b/theme/admin/html/page/insert.php
@@ -0,0 +1,4 @@
+<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('insert_page')?></h1>
+<p><?=$Language->text('insert_page_desc')?></p>
+
+<?=$HTML?> \ No newline at end of file
diff --git a/theme/admin/html/page/item.php b/theme/admin/html/page/item.php
new file mode 100644
index 0000000..a92b2fd
--- /dev/null
+++ b/theme/admin/html/page/item.php
@@ -0,0 +1,29 @@
+<article class="item">
+ <header>
+ <h2><i class="fa fa-file-text-o"></i><?=escapeHTML($PAGE['ATTR']['NAME'])?></h2>
+ <div>
+ <span class="brackets item-id">#<?=$PAGE['ATTR']['ID']?></span>
+ <a class="brackets" href="<?=Application::getAdminURL("user/update.php?id={$USER['ATTR']['ID']}")?>" title="<?=$Language->text('update_user')?>"><?=escapeHTML($USER['ATTR']['FULLNAME'])?></a>
+ <time class="brackets" datetime="<?=$PAGE['ATTR']['TIME_INSERT']?>"><?=parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->text('date_format'))?></time>
+ </div>
+ </header>
+ <blockquote cite="<?=$PAGE['URL']?>">
+ <p><?=excerpt($PAGE['BODY']['HTML']())?></p>
+ </blockquote>
+
+ <?php if($PAGE['ARGV']): ?>
+ <ul class="arguments">
+ <?php foreach($PAGE['ARGV'] as $argument => $value): ?>
+ <li><strong><?=$argument?>:</strong> <span><?=escapeHTML($value)?></span></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+
+ <footer>
+ <ul>
+ <li><a href="<?=$PAGE['URL']?>" target="_blank" title="<?=$Language->text('select_page')?>"><i class="fa fa-external-link"></i><span class="hidden"><?=$Language->text('select_page')?></span></a></li>
+ <li><a href="<?=Application::getAdminURL("page/update.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('update_page')?>"><i class="fa fa-pencil-square-o"></i><span class="hidden"><?=$Language->text('update_page')?></span></a></li>
+ <li><a href="<?=Application::getAdminURL("page/delete.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('delete_page')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_page')?></span></a></li>
+ </ul>
+ </footer>
+</article> \ No newline at end of file
diff --git a/theme/admin/html/page/search.php b/theme/admin/html/page/search.php
new file mode 100644
index 0000000..a48f604
--- /dev/null
+++ b/theme/admin/html/page/search.php
@@ -0,0 +1,17 @@
+<h1><i class="fa fa-search"></i><?=$Language->text('title_page_search')?></h1>
+<p><?=$Language->text('search_page_desc')?></p>
+
+<form id="search-form" method="GET">
+ <div class="flex flex-padding background">
+ <input id="search-text" type="search" name="q" placeholder="<?=$Language->text('placeholder_search')?>" value="<?=escapeHTML($QUERY)?>" />
+ </div>
+ <div class="flex flex-padding background">
+ <input id="update-button" type="submit" value="<?=$Language->text('search')?>" />
+ </div>
+</form>
+
+<div class="item-container post">
+ <?php foreach($PAGES as $page): ?>
+ <?php echo $page; ?>
+ <?php endforeach; ?>
+</div> \ No newline at end of file
diff --git a/theme/admin/html/page/update.php b/theme/admin/html/page/update.php
new file mode 100644
index 0000000..77a7eb2
--- /dev/null
+++ b/theme/admin/html/page/update.php
@@ -0,0 +1,4 @@
+<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('update_page')?></h1>
+<p><?=$Language->text('update_page_desc')?></p>
+
+<?=$HTML?> \ No newline at end of file