Archived
1
0
This repository has been archived on 2020-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
old/application/views/admin/blog_edit.php

266 lines
13 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div class="right_col" role="main">
<div class="">
<div class="row">
<div class="col-md-8 col-sm-12 col-xs-12">
<div class="alert-container">
</div>
<div class="x_panel">
<div class="x_title">
<h2>Blog-Post bearbeiten</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<style>
.entry-meta span {
width: 100%;
border-radius: 2px;
padding: 0 10px;
transition: box-shadow .2s;
}
.entry-meta span[contenteditable=true]:focus {
-webkit-box-shadow: 0 0 14px 0 rgba(34, 114, 255, 0.75);
-moz-box-shadow: 0 0 14px 0 rgba(34, 114, 255, 0.75);
box-shadow: 0 0 14px 0 rgba(34, 114, 255, 0.75);
}
.entry-meta span:empty::before {
color: rgba(0, 0, 0, .6);
}
.blog .blog-item .entry-meta > span, .blog .blog-item .entry-meta > div {
width: auto;
max-width: 50% !important;
}
#postPublishDate {
display: inline;
width: auto;
height: 28px;
}
#postTitle:empty::before {
content: "Bitte gib einen Titel ein...";
}
#postDescription:empty::before {
content: "Bitte gib eine Beschreibung ein...";
}
.img-container {
height: 250px;
width: 100%;
background: #2272ff center;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
}
.img-container .upload-btn {
background-color: rgba(255, 255, 255, .8);
padding: 13px 16px;
width: 50px;
height: 50px;
transition: all .2s;
font-size: 18px;
}
.img-container .upload-btn:hover, .img-container .upload-btn:focus {
color: #222;
background-color: #fff;
}
.blog-content {
padding: 10px !important;
}
.upload-btn .upload-image {
position: fixed;
top: -1000px;
}
.tags .bootstrap-tagsinput {
width: 100%;
max-width: 100%;
font-size: 14px;
}
.tags .bootstrap-tagsinput > input {
margin: 5px 0;
}
.tags .tag {
display: inline-block;
width: unset;
background: #2272ff;
color: #fff !important;
border-radius: 25px;
}
.tags .tag::after {
display: none;
}
.ql-snow .ql-color-picker, .ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label svg, .ql-snow .ql-icon-picker .ql-picker-label svg {
width: 18px;
}
.ql-editor {
max-height: 80vh;
min-height: 10vh;
font-size: 18px;
font-family: Roboto, Helvetica, Arial, sans-serif;
}
</style>
<input type="hidden" value="<?= $postID ?>" id="postID">
<input type="hidden" value="<?= isset($versions[$lang]) ? $versions[$lang] : $versions['de'] ?>" id="versionID">
<input type="hidden" value="<?= $lang ?>" id="postLanguage">
<input type="hidden" value="" id="uploadedImage">
<div class="col-sm-12">
<div class="blog">
<div class="blog-item">
<div class="img-container">
<form id="image-upload" action="" method="post" enctype="multipart/form-data">
<label class="btn upload-btn">
<input type="file" name="image" class="upload-image"
accept="image/png,image/x-png,image/jpeg" required>
<i class="fa fa-upload"></i>
</label>
</form>
</div>
<div class="blog-content">
<div class="entry-meta">
<span>
<a href="<?= base_url('user/' . $_SESSION['user']['username']) ?>"
style="cursor:pointer">
<i class="fa fa-user"></i> <?= $_SESSION['user']['displayname'] ?>
</a>
</span>
<span style="cursor: pointer;">
<i class="fa fa-calendar"></i>
<input type="text" id="postPublishDate" class="form-control"
value="<?= date("d.m.Y H:i") ?>">
</span>
<div>
<i class="fa fa-folder-open"></i>
<div class="category-select" style="display: inline-block;">
<select class="form-control" id="postCategory" multiple>
<option value="new-category">-- Neue Kategorie --</option>
<?php foreach ($categories as $category) { ?>
<option value="<?= $category['ID'] ?>">
<?= $category['displayname'] ?>
</option>
<?php } ?>
</select>
</div>
</div>
</div>
<h1 class="post-title"><span id="postTitle" class="noEnter"></span></h1>
<h2 class="post-subtitle"><span id="postDescription"></span></h2>
<!-- <div id="postContent"></div>-->
<textarea id="postContent"></textarea>
</div>
<!--/.blog-item-->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Zusatzinformationen</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="row">
<label for="postTags"><i class="fa fa-tags"></i> Tags</label>
<div class="tags">
<input type="text" data-role="tagsinput" id="postTags">
</div>
<!-- <input type="text" id="postTags">-->
</div>
<div class="row">
<label for="url-input">URL</label>
<div class="input-group">
<input class="form-control" name="url-input" aria-describedby="url-prefix" id="postUrl">
</div>
</div>
<div class="row form-group" id="new-category">
<label for="category-dname">
Neue Kategorie Displayname
<input type="text" id="cat-dname" class="form-control"
name="category-dname"
placeholder="Anzeigename">
</label>
<label for="category-name">
Neue Kategorie interner Name
<input type="text" id="cat-name" class="form-control"
name="category-name"
placeholder="Interner Name">
</label>
</div>
<div class="row">
<button class="btn btn-default btn-sm" id="blogPreview">
<i class="fa fa-eye"></i>
Vorschau
</button>
</div>
<div class="row">
<button class="btn btn-default btn-sm" id="blogPostSave">
<i class="fa fa-save"></i>
Speichern
</button>
<button class="btn btn-primary btn-sm" id="blogSubmit" data-loading-text="Lädt...">
<i class="fa fa-cloud"></i>
Veröffentlichen
</button>
</div>
</div>
</div>
<div class="x_panel">
<div class="x_title">
<h2>Übersetzungen</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<ul class="nav nav-pills nav-stacked" id="switchLanguages">
<li role="presentation" class="<?= $lang == 'de' ? 'active' : '' ?>" data-lang="de" data-versionID="<?= $versions['de'] ?>">
<span class="flag-icon flag-icon-de"></span> Deutsch
</li>
<li role="presentation" class="<?= $lang == 'en' ? 'active' : '' ?>" data-lang="en" data-versionID="<?= isset($versions['en']) ? $versions['en'] : -1 ?>">
<span class="flag-icon flag-icon-us"></span> Englisch
</li>
<li role="presentation" class="<?= $lang == 'fr' ? 'active' : '' ?>" data-lang="fr" data-versionID="<?= isset($versions['fr']) ? $versions['fr'] : -1 ?>">
<span class="flag-icon flag-icon-fr"></span> Französisch
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Theme included stylesheets -->
<link href="//cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<link href="//cdn.quilljs.com/1.3.6/quill.bubble.css" rel="stylesheet">