[Logbook Advanced] Changed DE filter to be location instead

This commit is contained in:
Andreas
2024-01-25 11:02:13 +01:00
parent bd95594aec
commit 021e205074
3 changed files with 13 additions and 13 deletions

View File

@@ -53,6 +53,7 @@ class Logbookadvanced extends CI_Controller {
$pageData['dxccarray'] = $this->logbook_model->fetchDxcc();
$pageData['iotaarray'] = $this->logbook_model->fetchIota();
$pageData['sats'] = $this->bands->get_worked_sats();
$pageData['station_profile'] = $this->stations->all_of_user();
$pageData['bands'] = $this->bands->get_worked_bands();

View File

@@ -34,8 +34,8 @@ class Logbookadvanced_model extends CI_Model {
$conditions[] = "date(COL_TIME_ON) <= ?";
$binding[] = $to;
}
if ($searchCriteria['de'] !== '') {
$conditions[] = "COL_STATION_CALLSIGN = ?";
if ($searchCriteria['de'] !== 'All') {
$conditions[] = "qsos.station_id = ?";
$binding[] = trim($searchCriteria['de']);
}
if ($searchCriteria['dx'] !== '') {

View File

@@ -77,17 +77,6 @@ $options = json_decode($options);
<label class="form-label" for="dateTo"><?php echo lang('filter_general_to') . ": " ?></label>
<input name="dateTo" id="dateTo" type="date" class="form-control form-control-sm w-auto">
</div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="de"><?php echo lang('gen_hamradio_de'); ?></label>
<select id="de" name="de" class="form-select form-select-sm">
<option value=""><?php echo lang('general_word_all'); ?></option>
<?php
foreach($deOptions as $deOption){
?><option value="<?php echo htmlentities($deOption);?>"><?php echo htmlspecialchars($deOption);?></option><?php
}
?>
</select>
</div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dx"><?php echo lang('gen_hamradio_dx'); ?></label>
<input type="text" name="dx" id="dx" class="form-control form-control-sm" value="">
@@ -401,6 +390,16 @@ $options = json_decode($options);
<option value="2500">2500</option>
<option value="5000">5000</option>
</select>
<label class="me-2" for="de"><?php echo lang('general_word_location'); ?></label>
<select id="de" name="de" class="form-select form-select-sm me-2 w-auto">
<option value="All"><?php echo lang('general_word_all'); ?></option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" >
<?php echo lang('gen_hamradio_callsign') . ": " ?>
<?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)
</option>
<?php } ?>
</select>
<button type="submit" class="btn btn-sm btn-primary me-1" id="searchButton"><?php echo lang('filter_search'); ?></button>
<button type="button" class="btn btn-sm btn-primary me-1" id="dupeButton"><?php echo lang('filter_dupes'); ?></button>
<button type="button" class="btn btn-sm btn-primary me-1" id="mapButton" onclick="mapQsos(this.form);"><?php echo lang('filter_map'); ?></button>