Added Edit option when searching a callsign
这个提交包含在:
父节点
1e0ae92806
当前提交
5600f61f53
共有 2 个文件被更改,包括 37 次插入 和 1 次删除
|
|
@ -64,6 +64,7 @@ class Logbook extends CI_Controller {
|
|||
function partial($id) {
|
||||
|
||||
$this->db->like('COL_CALL', $id);
|
||||
$this->db->limit(5);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
|
|
@ -94,6 +95,41 @@ class Logbook extends CI_Controller {
|
|||
}
|
||||
}
|
||||
|
||||
function search_result($id) {
|
||||
|
||||
$this->db->like('COL_CALL', $id);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
echo "<table class=\"partial\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td>Date</td>";
|
||||
echo "<td>Callsign</td>";
|
||||
echo "<td>RST Sent</td>";
|
||||
echo "<td>RST Recv</td>";
|
||||
echo "<td>Band</td>";
|
||||
echo "<td>Mode</td>";
|
||||
echo "<td></td>";
|
||||
echo "</tr>";
|
||||
foreach ($query->result() as $row)
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$row->COL_TIME_ON."</td>";
|
||||
echo "<td>".$row->COL_CALL."</td>";
|
||||
echo "<td>".$row->COL_RST_SENT."</td>";
|
||||
echo "<td>".$row->COL_RST_RCVD."</td>";
|
||||
echo "<td>".$row->COL_BAND."</td>";
|
||||
echo "<td>".$row->COL_MODE."</td>";
|
||||
echo "<td><a href=\"".site_url('qso/edit')."/".$row->COL_PRIMARY_KEY."\" ><img src=\"".base_url()."/images/application_edit.png\" width=\"16\" height=\"16\" alt=\"Edit\" /></a></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
} else {
|
||||
echo "Unique Callsign: ".strtoupper($id);
|
||||
}
|
||||
}
|
||||
|
||||
// Find DXCC
|
||||
function find_dxcc($callsign) {
|
||||
$this->load->model('dxcc');
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ i=0;
|
|||
$(document).ready(function(){
|
||||
$("#callsign").keyup(function(){
|
||||
if ($(this).val()) {
|
||||
$('#partial_view').load("logbook/partial/" + $(this).val()).fadeIn("slow");
|
||||
$('#partial_view').load("logbook/search_result/" + $(this).val()).fadeIn("slow");
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
正在加载…
在新工单中引用