Show stationlist of ClubMembers

This commit is contained in:
int2001
2025-12-08 06:10:39 +00:00
parent 2924bbbc53
commit 3d1d911e8b
3 changed files with 6 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ class Stationsetup extends CI_Controller {
$this->load->helper(array('form', 'url'));
$this->load->model('user_model');
if (($this->router->method == 'list_locations') && $this->user_model->authorize(2) && ((clubaccess_check(3) || clubaccess_check(6)))) { return; } // Allow Clubmembers and Clubmembers ADIF to access list_locations
if(!$this->user_model->authorize(2) || !clubaccess_check(9)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
}
@@ -524,6 +525,7 @@ class Stationsetup extends CI_Controller {
$this->load->model('stationsetup_model');
$data['locations'] = $this->stationsetup_model->list_all_locations();
$data['page_title'] = __("Station location list");
$data['cd_p_level'] = ($this->session->userdata('cd_p_level') ?? 0);
$this->load->view('interface_assets/header', $data);
$this->load->view('stationsetup/locationlist');
$this->load->view('interface_assets/footer');

View File

@@ -470,6 +470,8 @@
<div class="dropdown-divider"></div>
<?php } if ((clubaccess_check(3) || clubaccess_check(3)) && !(clubaccess_check(9))) { ?> <!-- Club Access Check -->
<li><a class="dropdown-item" href="<?php echo site_url('stationsetup/list_locations'); ?>" title="Manage station setup"><i class="fas fa-home"></i> <?= __("Station Setup"); ?></a></li>
<?php } if (clubaccess_check(6) || clubaccess_check(9)) { ?> <!-- Club Access Check -->
<li><a class="dropdown-item" href="<?php echo site_url('adif'); ?>" title="Amateur Data Interchange Format (ADIF) import / export"><i class="fas fa-sync"></i> <?= __("ADIF Import / Export"); ?></a></li>
<?php } if (clubaccess_check(9)) { ?> <!-- Club Access Check -->

View File

@@ -116,6 +116,7 @@
$(node).removeClass('dt-button').addClass('btn btn-primary');
}
},
<?php if (!($cd_p_level == 3) && !($cd_p_level == 6)) { // ClubOfficer (9) and normal User can import, while ClubOfficer (ADIF) (3,6) can only see. ?>
{
text: 'Import Locations',
className: 'mb-1 btn btn-sm btn-primary',
@@ -158,6 +159,7 @@
$(node).removeClass('dt-button').addClass('btn btn-primary');
}
}
<?php } ?>
]
});