bludit/admin/views/settings.php

179 lines
6.5 KiB
PHP
Raw Normal View History

2015-09-07 21:51:48 -03:00
<h2 class="title"><i class="fa fa-cogs"></i><?php $Language->p('Settings') ?></h2>
2015-05-05 01:00:01 +00:00
<nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#general">
<ul>
2015-07-03 19:36:37 -03:00
<li class="active"><a href="#general"><?php $Language->p('General') ?></a></li>
<li><a href="#advanced"><?php $Language->p('Advanced') ?></a></li>
<li><a href="#regional"><?php $Language->p('Regional') ?></a></li>
<li><a href="#about"><?php $Language->p('About') ?></a></li>
2015-05-05 01:00:01 +00:00
</ul>
</nav>
<!-- ===================================== -->
<!-- General Settings -->
<!-- ===================================== -->
<div id="general">
<form method="post" action="" class="forms">
2015-09-07 21:51:48 -03:00
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
2015-05-05 01:00:01 +00:00
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Site title') ?>
2015-05-05 01:00:01 +00:00
<input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>">
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('use-this-field-to-name-your-site') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-05-18 23:22:05 +00:00
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Site slogan') ?>
2015-05-18 23:22:05 +00:00
<input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>">
2015-08-16 23:33:49 -03:00
<div class="forms-desc"><?php $Language->p('use-this-field-to-add-a-catchy-phrase') ?></div>
2015-05-18 23:22:05 +00:00
</label>
2015-05-05 01:00:01 +00:00
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Site description') ?>
2015-05-05 01:00:01 +00:00
<input type="text" name="description" class="width-50" value="<?php echo $Site->description() ?>">
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('you-can-add-a-site-description-to-provide') ?></div>
2015-05-05 01:00:01 +00:00
</label>
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Footer text') ?>
2015-05-05 01:00:01 +00:00
<input type="text" name="footer" class="width-50" value="<?php echo $Site->footer() ?>">
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('you-can-add-a-small-text-on-the-bottom') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-07-14 01:41:32 -03:00
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="form-general">
2015-05-05 01:00:01 +00:00
</form>
</div>
<!-- ===================================== -->
<!-- Advanced Settings -->
<!-- ===================================== -->
2015-07-03 19:36:37 -03:00
2015-05-05 01:00:01 +00:00
<div id="advanced">
<form method="post" action="" class="forms">
2015-09-07 21:51:48 -03:00
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
2015-05-05 01:00:01 +00:00
<label for="postsperpage">
2015-07-03 19:36:37 -03:00
<?php $Language->p('Posts per page') ?>
2015-05-05 01:00:01 +00:00
<select name="postsperpage" class="width-50">
<?php
$htmlOptions = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8');
foreach($htmlOptions as $text=>$value) {
echo '<option value="'.$value.'"'.( ($Site->postsPerPage()===$value)?' selected="selected"':'').'>'.$text.'</option>';
}
?>
</select>
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('number-of-posts-to-show-per-page') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-07-26 00:37:51 -03:00
<label for="homepage">
<?php $Language->p('Default home page') ?>
<select name="homepage" class="width-50">
<?php
$htmlOptions = $_homePageList;
foreach($htmlOptions as $value=>$text) {
echo '<option value="'.$value.'"'.( ($Site->homepage()===$value)?' selected="selected"':'').'>'.$text.'</option>';
}
?>
</select>
</label>
2015-05-05 01:00:01 +00:00
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Site URL') ?>
2015-05-05 01:00:01 +00:00
<input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>">
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('the-url-of-your-site') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-07-03 19:36:37 -03:00
<h4><?php $Language->p('URL Filters') ?></h4>
2015-05-05 01:00:01 +00:00
<label>
<div class="input-groups width-50">
2015-07-03 19:36:37 -03:00
<span class="input-prepend"><?php $Language->p('Posts') ?></span><input type="text" name="uriPost" value="<?php echo $Site->uriFilters('post') ?>">
2015-05-05 01:00:01 +00:00
</div>
</label>
<label>
<div class="input-groups width-50">
2015-07-03 19:36:37 -03:00
<span class="input-prepend"><?php $Language->p('Pages') ?></span><input type="text" name="uriPage" value="<?php echo $Site->uriFilters('page') ?>">
2015-05-05 01:00:01 +00:00
</div>
</label>
<label>
<div class="input-groups width-50">
2015-07-03 19:36:37 -03:00
<span class="input-prepend"><?php $Language->p('Tags') ?></span><input type="text" name="uriTag" value="<?php echo $Site->uriFilters('tag') ?>">
2015-05-05 01:00:01 +00:00
</div>
</label>
2015-07-14 01:41:32 -03:00
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="form-advanced">
2015-05-05 01:00:01 +00:00
</form>
</div>
<!-- ===================================== -->
<!-- Regional Settings -->
<!-- ===================================== -->
<div id="regional">
<form method="post" action="" class="forms" name="form-regional">
2015-09-07 21:51:48 -03:00
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
2015-07-03 17:44:26 -03:00
<label for="jslanguage">
2015-07-03 19:36:37 -03:00
<?php $Language->p('Language') ?>
2015-07-03 17:44:26 -03:00
<select id="jslanguage" name="language" class="width-50">
2015-05-05 01:00:01 +00:00
<?php
2015-06-28 23:51:48 -03:00
$htmlOptions = $Language->getLanguageList();
foreach($htmlOptions as $locale=>$nativeName) {
echo '<option value="'.$locale.'"'.( ($Site->language()===$locale)?' selected="selected"':'').'>'.$nativeName.'</option>';
2015-05-05 01:00:01 +00:00
}
?>
</select>
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('select-your-sites-language') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-07-03 17:44:26 -03:00
<label for="jstimezone">
2015-07-03 19:36:37 -03:00
<?php $Language->p('Timezone') ?>
2015-07-03 17:44:26 -03:00
<select id="jstimezone" name="timezone" class="width-50">
2015-05-14 22:07:45 +00:00
<?php
$htmlOptions = Date::timezoneList();
foreach($htmlOptions as $text=>$value) {
echo '<option value="'.$value.'"'.( ($Site->timezone()===$value)?' selected="selected"':'').'>'.$text.'</option>';
}
?>
2015-05-05 01:00:01 +00:00
</select>
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('select-a-timezone-for-a-correct') ?></div>
2015-05-05 01:00:01 +00:00
</label>
<label>
2015-07-03 19:36:37 -03:00
<?php $Language->p('Locale') ?>
2015-07-03 17:44:26 -03:00
<input id="jslocale" type="text" name="locale" class="width-50" value="<?php echo $Site->locale() ?>">
2015-07-03 19:36:37 -03:00
<div class="forms-desc"><?php $Language->p('you-can-use-this-field-to-define-a-set-of') ?></div>
2015-05-05 01:00:01 +00:00
</label>
2015-07-14 01:41:32 -03:00
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="form-regional">
2015-05-05 01:00:01 +00:00
</form>
</div>
2015-07-03 17:44:26 -03:00
<script>
$(document).ready(function() {
$("#jslanguage").change(function () {
var locale = $("#jslanguage option:selected").val();
$("#jslocale").attr("value",locale);
});
});
</script>
2015-05-05 01:00:01 +00:00
<!-- ===================================== -->
<!-- About -->
<!-- ===================================== -->
<div id="about">
2015-07-20 00:14:12 -03:00
<p><i class="fa fa-pencil-square-o"></i> <?php $Language->p('Bludit version') ?>: <?php echo BLUDIT_VERSION.' ('.BLUDIT_RELEASE_DATE.')' ?></p>
2015-07-03 19:36:37 -03:00
</div>