kopia lustrzana https://github.com/magicbug/Cloudlog
remove search_enabled config requirement
rodzic
eab8af8068
commit
b0a7eef25e
|
@ -75,37 +75,36 @@ class Visitor extends CI_Controller {
|
|||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
// Only load, config, and init pagination if public search is enabled
|
||||
if ($this ->public_search_enabled($public_slug)) {
|
||||
$this->load->library('pagination');
|
||||
|
||||
//Pagination config
|
||||
$config['base_url'] = base_url().'index.php/visitor/'. $public_slug . '/index';
|
||||
$config['total_rows'] = $this->logbook_model->total_qsos($logbooks_locations_array);
|
||||
$config['per_page'] = '25';
|
||||
$config['num_links'] = $this->logbook_model->total_qsos($logbooks_locations_array) / 25;
|
||||
$config['full_tag_open'] = '<ul class="pagination">';
|
||||
$config['full_tag_close'] = '</ul>';
|
||||
$config['attributes'] = ['class' => 'page-link'];
|
||||
$config['first_link'] = false;
|
||||
$config['last_link'] = false;
|
||||
$config['first_tag_open'] = '<li class="page-item">';
|
||||
$config['first_tag_close'] = '</li>';
|
||||
$config['prev_link'] = '«';
|
||||
$config['prev_tag_open'] = '<li class="page-item">';
|
||||
$config['prev_tag_close'] = '</li>';
|
||||
$config['next_link'] = '»';
|
||||
$config['next_tag_open'] = '<li class="page-item">';
|
||||
$config['next_tag_close'] = '</li>';
|
||||
$config['last_tag_open'] = '<li class="page-item">';
|
||||
$config['last_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = '<li class="page-item active"><a href="#" class="page-link">';
|
||||
$config['cur_tag_close'] = '<span class="visually-hidden">(current)</span></a></li>';
|
||||
$config['num_tag_open'] = '<li class="page-item">';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
// load config and init pagination
|
||||
$this->load->library('pagination');
|
||||
|
||||
//Pagination config
|
||||
$config['base_url'] = base_url().'index.php/visitor/'. $public_slug . '/index';
|
||||
$config['total_rows'] = $this->logbook_model->total_qsos($logbooks_locations_array);
|
||||
$config['per_page'] = '25';
|
||||
$config['num_links'] = $this->logbook_model->total_qsos($logbooks_locations_array) / 25;
|
||||
$config['full_tag_open'] = '<ul class="pagination">';
|
||||
$config['full_tag_close'] = '</ul>';
|
||||
$config['attributes'] = ['class' => 'page-link'];
|
||||
$config['first_link'] = false;
|
||||
$config['last_link'] = false;
|
||||
$config['first_tag_open'] = '<li class="page-item">';
|
||||
$config['first_tag_close'] = '</li>';
|
||||
$config['prev_link'] = '«';
|
||||
$config['prev_tag_open'] = '<li class="page-item">';
|
||||
$config['prev_tag_close'] = '</li>';
|
||||
$config['next_link'] = '»';
|
||||
$config['next_tag_open'] = '<li class="page-item">';
|
||||
$config['next_tag_close'] = '</li>';
|
||||
$config['last_tag_open'] = '<li class="page-item">';
|
||||
$config['last_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = '<li class="page-item active"><a href="#" class="page-link">';
|
||||
$config['cur_tag_close'] = '<span class="visually-hidden">(current)</span></a></li>';
|
||||
$config['num_tag_open'] = '<li class="page-item">';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$this->pagination->initialize($config);
|
||||
}
|
||||
|
||||
// Public visitor so no QRA to setup
|
||||
$data['qra'] = "none";
|
||||
|
@ -141,9 +140,7 @@ class Visitor extends CI_Controller {
|
|||
$data['total_lotw_rcvd'] = $QSLStatsBreakdownArray['LoTW_Received'];
|
||||
|
||||
// If public search is enabled, show paginated results, otherwise show last 18 qsos
|
||||
$data['results'] = $this->public_search_enabled($public_slug)
|
||||
? $this->logbook_model->get_qsos($config['per_page'], $this->uri->segment(4), $logbooks_locations_array)
|
||||
: $this->logbook_model->get_last_qsos('18', $logbooks_locations_array);
|
||||
$data['results'] = $this->logbook_model->get_qsos($config['per_page'], $this->uri->segment(4), $logbooks_locations_array);
|
||||
|
||||
$data['page_title'] = "Dashboard";
|
||||
$data['slug'] = $public_slug;
|
||||
|
|
|
@ -113,11 +113,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
</tr>
|
||||
<?php $i++; } } ?>
|
||||
</table>
|
||||
<?php if($this->CI->public_search_enabled($slug)) { ?>
|
||||
<div class="pagination-links">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="pagination-links">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue