mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #27 from HB9HIL/github_button
This commit is contained in:
@@ -123,13 +123,11 @@ class Options extends CI_Controller {
|
||||
$this->session->set_flashdata('success', $this->lang->line('options_logbook_map_changed_to').$this->input->post('logbookMap'));
|
||||
}
|
||||
|
||||
// Update Lang choice within the options system
|
||||
// $lang_update_status = $this->optionslib->update('language', $this->input->post('language'));
|
||||
$public_github_button_update_status = $this->optionslib->update('public_github_button', $this->input->post('publicGithubButton'), 'yes');
|
||||
|
||||
// If Lang update is complete set a flashsession with a success note
|
||||
// if($lang_update_status == TRUE) {
|
||||
// $this->session->set_flashdata('success', 'Language changed to '.ucfirst($this->input->post('language')));
|
||||
// }
|
||||
if($public_github_button_update_status == TRUE) {
|
||||
$this->session->set_flashdata('success', 'Public Github Button is now ' . $this->input->post('publicGithubButton'));
|
||||
}
|
||||
|
||||
// Redirect back to /appearance
|
||||
redirect('/options/appearance');
|
||||
|
||||
@@ -94,6 +94,15 @@
|
||||
<small id="logbookMapHelp" class="form-text text-muted"><?php echo lang('options_this_allows_to_disable_the_map_in_the_logbook'); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="publicGithubButton">Public Github Button</label>
|
||||
<select class="form-select" id="publicGithubButton" name="publicGithubButton" aria-describedby="publicGithubButtonHelp" required>
|
||||
<option value='true' <?php if($this->optionslib->get_option('public_github_button') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
|
||||
<option value='false' <?php if($this->optionslib->get_option('public_github_button') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
|
||||
</select>
|
||||
<small id="publicGithubButtonHelp" class="form-text text-muted">This enables the button to Wavelog's Github page in the public view</small>
|
||||
</div>
|
||||
|
||||
<!-- Save the Form -->
|
||||
<input class="btn btn-primary" type="submit" value="<?php echo lang('options_save'); ?>" />
|
||||
</form>
|
||||
|
||||
@@ -65,17 +65,24 @@
|
||||
<a class="nav-link" href="<?php echo site_url('oqrs');?>">OQRS</a>
|
||||
</li>
|
||||
<?php }
|
||||
}
|
||||
if ($this->uri->segment(1) != "oqrs") { ?>
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-outline-primary" href="<?php echo site_url('user/login');?>">Login</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
} ?>
|
||||
</ul>
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<?php if($this->optionslib->get_option('public_github_button') != "false") { ?> <!-- != false causes to set it on per default -->
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-secondary" href="https://github.com/wavelog/wavelog">Visit Wavelog on Github</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ($this->uri->segment(1) != "oqrs") { ?>
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary ms-2" href="<?php echo site_url('user/login');?>">Login</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<div class="m-2">
|
||||
<?php if (!empty($slug)) {
|
||||
$this->CI =& get_instance();
|
||||
if ($this->CI->public_search_enabled($slug) || $this->session->userdata('user_type') >= 2) { ?>
|
||||
if ($this->CI->public_search_enabled($slug)) { ?>
|
||||
<form method="post" name="searchForm" action="<?php echo site_url('visitor/search'); ?>" onsubmit="return validateForm()" class="d-flex align-items-center">
|
||||
<input class="form-control me-sm-2" id="searchcall" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" <?php if (isset($callsign) && $callsign != '') { echo 'value="'.strtoupper($callsign).'"'; } ?> aria-label="Search" data-toogle="tooltip" data-bs-placement="bottom" title="Please enter a callsign!">
|
||||
<input type="hidden" name="public_slug" value="<?php echo $slug; ?>">
|
||||
|
||||
Reference in New Issue
Block a user