kopia lustrzana https://github.com/magicbug/Cloudlog
Add offset parameter to visitor map view
Introduces an offset parameter to the Visitor controller and updates the footer view to include the offset in the map URL. This enables paginated or segmented access to QSOs for public logbook pages. Fixes #3317copilot/fix-c1623248-9691-46e2-a4cc-7f8c39b3738b
rodzic
6af65e6dbb
commit
31ac64ae65
|
@ -180,6 +180,7 @@ class Visitor extends CI_Controller {
|
|||
$this->load->library('qra');
|
||||
|
||||
$slug = $this->security->xss_clean($this->uri->segment(3));
|
||||
$offset = $this->security->xss_clean($this->uri->segment(4));
|
||||
|
||||
$this->load->model('logbooks_model');
|
||||
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($slug);
|
||||
|
@ -196,7 +197,7 @@ class Visitor extends CI_Controller {
|
|||
show_404('Unknown Public Page.');
|
||||
}
|
||||
|
||||
$qsos = $this->logbook_model->get_qsos('18', null, $logbooks_locations_array);
|
||||
$qsos = $this->logbook_model->get_qsos('18', $offset, $logbooks_locations_array);
|
||||
// [PLOT] ADD plot //
|
||||
$plot_array = $this->logbook_model->get_plot_array_for_map($qsos->result());
|
||||
|
||||
|
|
|
@ -36,8 +36,12 @@
|
|||
var q_lng = -32.695312;
|
||||
<?php } ?>
|
||||
|
||||
<?php if(isset($slug)) { ?>
|
||||
var qso_loc = '<?php echo site_url('visitor/map/'.$slug);?>';
|
||||
<?php if(isset($slug)) {
|
||||
$offset = $this->uri->segment(4);
|
||||
?>
|
||||
|
||||
|
||||
var qso_loc = '<?php echo site_url('visitor/map/'.$slug.'/'.$offset);?>';
|
||||
<?php } ?>
|
||||
var q_zoom = 3;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue