Cloudlog/application/views/options/appearance.php

109 wiersze
6.7 KiB
PHP

<div class="container settings">
<div class="row">
<!-- Nav Start -->
<?php $this->load->view('options/sidebar') ?>
<!-- Nav End -->
<!-- Content -->
<div class="col-md-9">
<div class="card">
<div class="card-header"><h2><?php echo $page_title; ?> - <?php echo $sub_heading; ?></h2></div>
<div class="card-body">
<?php if($this->session->flashdata('success')) { ?>
<!-- Display Success Message -->
<div class="alert alert-success">
<?php echo $this->session->flashdata('success'); ?>
</div>
<?php } ?>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<?php echo $this->session->flashdata('message'); ?>
</div>
<?php } ?>
<?php if(validation_errors()) { ?>
<div class="alert alert-danger">
<a class="close" data-dismiss="alert">x</a>
<?php echo validation_errors(); ?>
</div>
<?php } ?>
<?php echo form_open('options/appearance_save'); ?>
<!-- <div class="form-group">
<label for="themeSelect">Language</label>
<select class="custom-select" id="langSelect" name="language" aria-describedby="langHelp" required>
<?php foreach ($language_options as &$lang_opt) { ?>
<option value='<?php echo $lang_opt; ?>' <?php if($this->optionslib->get_option('language')== $lang_opt) { echo "selected=\"selected\""; } ?>><?php echo ucfirst($lang_opt); ?></option>
<?php } ?>
</select>
<small id="langHelp" class="form-text text-muted">Select the default language for Cloudlog.</small>
</div> -->
<!-- Form options for selecting global theme choice -->
<div class="form-group">
<label for="themeSelect">Theme</label>
<select class="custom-select" id="themeSelect" name="theme" aria-describedby="themeHelp" required>
<?php
foreach ($themes as $theme) {
echo '<option value="' . $theme->foldername . '"';
if ($this->optionslib->get_option('option_theme') == $theme->foldername) {
echo 'selected="selected"';
}
echo '>' . $theme->name . '</option>';
}
?>
</select>
<small id="themeHelp" class="form-text text-muted">Global Theme Choice, this is used when users arent logged in.</small>
</div>
<div class="form-group">
<label for="globalSearch">Public Search Bar</label>
<select class="custom-select" id="globalSearch" name="globalSearch" aria-describedby="globalSearchHelp" required>
<option value='true' <?php if($this->optionslib->get_option('global_search') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
<option value='false' <?php if($this->optionslib->get_option('global_search') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
</select>
<small id="globalSearchHelp" class="form-text text-muted">This allows non logged in users to access the search functions.</small>
</div>
<div class="form-group">
<label for="dashboardBanner">Dashboard Notification Banner</label>
<select class="custom-select" id="dashboardBanner" name="dashboardBanner" aria-describedby="dashboardBannerHelp" required>
<option value='true' <?php if($this->optionslib->get_option('dashboard_banner') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
<option value='false' <?php if($this->optionslib->get_option('dashboard_banner') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
</select>
<small id="dashboardBannerHelp" class="form-text text-muted">This allows to disable the global notification banner on the dashboard.</small>
</div>
<div class="form-group">
<label for="dashboardMap">Dashboard Map</label>
<select class="custom-select" id="dashboardMap" name="dashboardMap" aria-describedby="dashboardMapHelp" required>
<option value='true' <?php if($this->optionslib->get_option('dashboard_map') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
<option value='false' <?php if($this->optionslib->get_option('dashboard_map') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
<option value='map_at_right' <?php if($this->optionslib->get_option('dashboard_map') == "map_at_right") { echo "selected=\"selected\""; } ?>>Map at right</option>
</select>
<small id="dashboardMapHelp" class="form-text text-muted">This allows the map on the dashboard to be disabled or placed on the right.</small>
</div>
<div class="form-group">
<label for="logbookMap">Logbook Map</label>
<select class="custom-select" id="logbookMap" name="logbookMap" aria-describedby="logbookMapHelp" required>
<option value='true' <?php if($this->optionslib->get_option('logbook_map') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
<option value='false' <?php if($this->optionslib->get_option('logbook_map') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
</select>
<small id="logbookMapHelp" class="form-text text-muted">This allows to disable the map in the logbook.</small>
</div>
<!-- Save the Form -->
<input class="btn btn-primary" type="submit" value="Save" />
</form>
</div>
</div>
</div>
</div>
</div>