kopia lustrzana https://github.com/magicbug/Cloudlog
Added a button to only delete the log, not the profile. I found this to be valuable when testing out the import, and not having to create a new profile each time.
rodzic
98377c8b4a
commit
a4e942af43
|
@ -122,4 +122,11 @@ class Station extends CI_Controller {
|
|||
redirect('station');
|
||||
}
|
||||
|
||||
public function deletelog($id) {
|
||||
$this->load->model('stations');
|
||||
$this->stations->deletelog($id);
|
||||
|
||||
redirect('station');
|
||||
}
|
||||
|
||||
}
|
|
@ -81,6 +81,12 @@ class Stations extends CI_Model {
|
|||
$this->db->delete('station_profile', array('station_id' => $clean_id));
|
||||
}
|
||||
|
||||
function deletelog($id) {
|
||||
// Delete QSOs
|
||||
$this->db->where('station_id', $id);
|
||||
$this->db->delete($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
function set_active($current, $new) {
|
||||
|
||||
// Clean inputs
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<th></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -69,6 +70,9 @@
|
|||
<td>
|
||||
<a href="<?php echo site_url('station/edit')."/".$row->station_id; ?>" class="btn btn-info btn-sm"><i class="fas fa-edit-alt"></i> Edit</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo site_url('station/deletelog')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete all QSOs within this station profile?');"><i class="fas fa-trash-alt"></i> Delete log</a></td>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo site_url('station/delete')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete station profile <?php echo $row->station_profile_name; ?> this will delete all QSOs within this station profile?');"><i class="fas fa-trash-alt"></i> Delete</a></td>
|
||||
</tr>
|
||||
|
|
Ładowanie…
Reference in New Issue