2015-10-19 00:45:58 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
HTML::title(array('title'=>$L->g('New page'), 'icon'=>'file-text-o'));
|
|
|
|
|
|
|
|
HTML::formOpen(array('class'=>'uk-form-stacked'));
|
|
|
|
|
|
|
|
// Security token
|
|
|
|
HTML::formInputHidden(array(
|
2015-10-20 05:14:28 +02:00
|
|
|
'name'=>'tokenCSRF',
|
2015-11-28 15:47:03 +01:00
|
|
|
'value'=>$Security->getTokenCSRF()
|
2015-10-19 00:45:58 +02:00
|
|
|
));
|
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
// LEFT SIDE
|
|
|
|
// --------------------------------------------------------------------
|
2016-09-14 04:59:12 +02:00
|
|
|
echo '<div class="uk-grid uk-grid-medium">';
|
|
|
|
echo '<div class="bl-publish-view uk-width-8-10">';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
|
|
|
// Title input
|
|
|
|
HTML::formInputText(array(
|
|
|
|
'name'=>'title',
|
|
|
|
'value'=>'',
|
|
|
|
'class'=>'uk-width-1-1 uk-form-large',
|
|
|
|
'placeholder'=>$L->g('Title')
|
|
|
|
));
|
|
|
|
|
|
|
|
// Content input
|
|
|
|
HTML::formTextarea(array(
|
|
|
|
'name'=>'content',
|
|
|
|
'value'=>'',
|
|
|
|
'class'=>'uk-width-1-1 uk-form-large',
|
2016-01-31 00:01:04 +01:00
|
|
|
'placeholder'=>''
|
2015-10-19 00:45:58 +02:00
|
|
|
));
|
|
|
|
|
|
|
|
// Form buttons
|
|
|
|
echo '<div class="uk-form-row uk-margin-bottom">
|
|
|
|
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
2017-01-10 17:43:38 +01:00
|
|
|
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
|
|
|
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'manage-posts">'.$L->g('Cancel').'</a>
|
2015-10-19 00:45:58 +02:00
|
|
|
</div>';
|
|
|
|
|
|
|
|
echo '</div>';
|
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
// RIGHT SIDE
|
|
|
|
// --------------------------------------------------------------------
|
2016-09-14 04:59:12 +02:00
|
|
|
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
echo '<ul>';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
// GENERAL TAB
|
|
|
|
// --------------------------------------------------------------------
|
2017-01-13 18:38:12 +01:00
|
|
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> '.$L->g('General').'</h2></li>';
|
2017-01-10 17:43:38 +01:00
|
|
|
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2017-04-26 18:56:10 +02:00
|
|
|
// Category
|
2017-05-04 22:36:49 +02:00
|
|
|
/*
|
2017-04-26 18:56:10 +02:00
|
|
|
HTML::formSelect(array(
|
|
|
|
'name'=>'category',
|
|
|
|
'label'=>$L->g('Category'),
|
|
|
|
'class'=>'uk-width-1-1 uk-form-medium',
|
|
|
|
'options'=>$dbCategories->getAll(),
|
|
|
|
'selected'=>'',
|
|
|
|
'tip'=>'',
|
|
|
|
'addEmptySpace'=>true
|
2017-05-04 22:36:49 +02:00
|
|
|
));*/
|
2017-04-26 18:56:10 +02:00
|
|
|
|
2015-10-19 00:45:58 +02:00
|
|
|
// Description input
|
|
|
|
HTML::formTextarea(array(
|
|
|
|
'name'=>'description',
|
|
|
|
'label'=>$L->g('description'),
|
|
|
|
'value'=>'',
|
2015-12-28 23:28:42 +01:00
|
|
|
'rows'=>'4',
|
2015-10-19 00:45:58 +02:00
|
|
|
'class'=>'uk-width-1-1 uk-form-medium',
|
|
|
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo '</li>';
|
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
// IMAGES TAB
|
|
|
|
// --------------------------------------------------------------------
|
2017-01-13 18:38:12 +01:00
|
|
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>';
|
2017-01-10 17:43:38 +01:00
|
|
|
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
2015-11-04 01:28:11 +01:00
|
|
|
|
2015-12-28 23:28:42 +01:00
|
|
|
// --- BLUDIT COVER IMAGE ---
|
|
|
|
HTML::bluditCoverImage();
|
|
|
|
|
|
|
|
// --- BLUDIT QUICK IMAGES ---
|
|
|
|
HTML::bluditQuickImages();
|
|
|
|
|
|
|
|
// --- BLUDIT IMAGES V8 ---
|
|
|
|
HTML::bluditImagesV8();
|
2015-11-04 01:28:11 +01:00
|
|
|
|
2016-02-10 00:02:51 +01:00
|
|
|
// --- BLUDIT MENU V8 ---
|
|
|
|
HTML::bluditMenuV8();
|
|
|
|
|
2015-11-04 01:28:11 +01:00
|
|
|
echo '</li>';
|
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
// TAGS
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
|
|
|
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
|
|
|
|
|
|
|
// Tags input
|
|
|
|
HTML::tags(array(
|
|
|
|
'name'=>'tags',
|
|
|
|
'label'=>'',
|
2017-05-12 20:18:44 +02:00
|
|
|
'allTags'=>$dbTags->getKeyNameArray(),
|
2017-01-10 17:43:38 +01:00
|
|
|
'selectedTags'=>array()
|
|
|
|
));
|
|
|
|
|
|
|
|
echo '</li>';
|
|
|
|
|
|
|
|
// ADVANCED TAB
|
|
|
|
// --------------------------------------------------------------------
|
2017-01-13 18:38:12 +01:00
|
|
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> '.$L->g('Advanced').'</h2></li>';
|
2017-01-10 17:43:38 +01:00
|
|
|
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2015-12-31 04:01:16 +01:00
|
|
|
// Status input
|
|
|
|
HTML::formSelect(array(
|
|
|
|
'name'=>'status',
|
|
|
|
'label'=>$L->g('Status'),
|
|
|
|
'class'=>'uk-width-1-1 uk-form-medium',
|
|
|
|
'options'=>array('published'=>$L->g('Published'), 'draft'=>$L->g('Draft')),
|
|
|
|
'selected'=>'published',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2015-10-19 00:45:58 +02:00
|
|
|
// Parent input
|
|
|
|
$options = array();
|
|
|
|
$options[NO_PARENT_CHAR] = '('.$Language->g('No parent').')';
|
|
|
|
$options += $dbPages->parentKeyList();
|
|
|
|
|
|
|
|
HTML::formSelect(array(
|
|
|
|
'name'=>'parent',
|
|
|
|
'label'=>$L->g('Parent'),
|
|
|
|
'class'=>'uk-width-1-1 uk-form-medium',
|
|
|
|
'options'=>$options,
|
|
|
|
'selected'=>NO_PARENT_CHAR,
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
// Position input
|
|
|
|
HTML::formInputText(array(
|
|
|
|
'name'=>'position',
|
|
|
|
'value'=>'1',
|
|
|
|
'class'=>'uk-width-1-1 uk-form-large',
|
|
|
|
'label'=>$L->g('Position')
|
|
|
|
));
|
|
|
|
|
|
|
|
// Slug input
|
|
|
|
HTML::formInputText(array(
|
|
|
|
'name'=>'slug',
|
|
|
|
'value'=>'',
|
|
|
|
'class'=>'uk-width-1-1 uk-form-large',
|
|
|
|
'tip'=>$L->g('you-can-modify-the-url-which-identifies'),
|
|
|
|
'label'=>$L->g('Friendly URL')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo '</li>';
|
|
|
|
echo '<ul>';
|
|
|
|
|
|
|
|
echo '</div>';
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
HTML::formClose();
|
|
|
|
|
|
|
|
?>
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$(document).ready(function()
|
|
|
|
{
|
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
$("#jsslug").keyup(function() {
|
|
|
|
var text = $(this).val();
|
|
|
|
var parent = $("#jsparent").val();
|
|
|
|
|
|
|
|
checkSlugPage(text, parent, "", $("#jsslug"));
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#jstitle").keyup(function() {
|
|
|
|
var text = $(this).val();
|
|
|
|
var parent = $("#jsparent").val();
|
|
|
|
|
|
|
|
checkSlugPage(text, parent, "", $("#jsslug"));
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#jsparent").change(function() {
|
|
|
|
var parent = $(this).val();
|
|
|
|
var text = $("#jsslug").val();
|
|
|
|
|
|
|
|
if(parent==NO_PARENT_CHAR) {
|
|
|
|
$("#jsparentExample").text("");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$("#jsparentExample").text(parent+"/");
|
|
|
|
}
|
|
|
|
|
|
|
|
checkSlugPage(text, parent, "", $("#jsslug"));
|
|
|
|
});
|
|
|
|
|
|
|
|
// Button Save as draft
|
|
|
|
$("#jsSaveDraft").on("click", function() {
|
|
|
|
$("#jsstatus").val("draft");
|
|
|
|
$(".uk-form").submit();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Right sidebar
|
|
|
|
$(".sidebar-button").click(function() {
|
|
|
|
var view = "#" + $(this).data("view");
|
|
|
|
|
|
|
|
if( $(view).is(":visible") ) {
|
|
|
|
$(view).hide();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$(".sidebar-view").hide();
|
2017-05-04 22:36:49 +02:00
|
|
|
$(view).show();
|
2017-01-10 17:43:38 +01:00
|
|
|
}
|
|
|
|
});
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
});
|
2015-03-27 02:00:01 +01:00
|
|
|
|
2017-01-10 17:43:38 +01:00
|
|
|
</script>
|