From eb838cdb9fc22fa1595f3b25cacf75cbbc7e85cb Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Mon, 14 Mar 2016 18:40:07 +0000 Subject: [PATCH] Change table links to be glyphicons, fix tooltips sentence in sales/manage, fix sortable columns (#116) --- application/helpers/table_helper.php | 47 ++++++++++++-------------- application/language/en/sales_lang.php | 4 +-- application/views/giftcards/manage.php | 4 +-- application/views/item_kits/manage.php | 4 +-- application/views/items/manage.php | 11 +++--- application/views/people/manage.php | 4 +-- application/views/sales/manage.php | 6 ++-- application/views/suppliers/manage.php | 4 +-- translations/sales_lang.csv | 4 +-- 9 files changed, 43 insertions(+), 45 deletions(-) diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 792c25cea..1c84ad3fe 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -14,6 +14,8 @@ function get_sales_manage_table($sales, $controller) $CI->lang->line('sales_change_due'), $CI->lang->line('sales_payment'), $CI->lang->line('sales_invoice_number'), + ' ', + ' ', ' '); $table.=''; @@ -50,11 +52,11 @@ function get_sales_manage_table_data_rows($sales, $controller) if($table_data_rows == '') { - $table_data_rows .= "
".$CI->lang->line('sales_no_sales_to_display')."
"; + $table_data_rows .= "
".$CI->lang->line('sales_no_sales_to_display')."
"; } else { - $table_data_rows .= " ".$CI->lang->line('sales_total')."  ".to_currency($sum_amount_tendered)."".to_currency($sum_amount_due)."".to_currency($sum_change_due).""; + $table_data_rows .= " ".$CI->lang->line('sales_total')."  ".to_currency($sum_amount_tendered)."".to_currency($sum_amount_due)."".to_currency($sum_change_due).""; } return $table_data_rows; @@ -75,13 +77,9 @@ function get_sales_manage_sale_data_row($sale, $controller) $table_data_row.=''.to_currency( $sale['change_due'] ).''; $table_data_row.=''.$sale['payment_type'].''; $table_data_row.=''.$sale['invoice_number'].''; - $table_data_row.=''; - $table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'], $CI->lang->line('common_edit'), array('class'=>'modal-dlg modal-btn-delete modal-btn print_hide', 'title'=>$CI->lang->line('common_edit'))); - $table_data_row.='    '; - $table_data_row.=anchor($controller_name."/receipt/" . $sale['sale_id'], $CI->lang->line('sales_show_receipt'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_receipt'))); - $table_data_row.='    '; - $table_data_row.=anchor($controller_name."/invoice/" . $sale['sale_id'], $CI->lang->line('sales_show_invoice'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_invoice'))); - $table_data_row.=''; + $table_data_row.=''.anchor($controller_name."/edit/" . $sale['sale_id'], '', array('class'=>'modal-dlg modal-btn-delete modal-btn-submit', 'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/receipt/" . $sale['sale_id'], '', array('title'=>$CI->lang->line('sales_show_receipt'))).''; + $table_data_row.=''.anchor($controller_name."/invoice/" . $sale['sale_id'], '', array('title'=>$CI->lang->line('sales_show_invoice'))).''; $table_data_row.=''; return $table_data_row; @@ -173,7 +171,7 @@ function get_person_data_row($person,$controller) $table_data_row.=''.character_limiter($person->first_name,13).''; $table_data_row.=''.mailto($person->email,character_limiter($person->email,22)).''; $table_data_row.=''.character_limiter($person->phone_number,13).''; - $table_data_row.=''.anchor($controller_name."/view/$person->person_id", $CI->lang->line('common_edit'), array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/view/$person->person_id", '', array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update'))).''; $table_data_row.=''; return $table_data_row; @@ -259,7 +257,7 @@ function get_supplier_data_row($supplier,$controller) $table_data_row.=''.mailto($supplier->email,character_limiter($supplier->email,22)).''; $table_data_row.=''.character_limiter($supplier->phone_number,13).''; $table_data_row.=''.character_limiter($supplier->person_id,5).''; - $table_data_row.=''.anchor($controller_name."/view/$supplier->person_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/view/$supplier->person_id", '', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; $table_data_row.=''; return $table_data_row; @@ -282,6 +280,7 @@ function get_items_manage_table($items,$controller) $CI->lang->line('items_unit_price'), $CI->lang->line('items_quantity'), $CI->lang->line('items_tax_percents'), + $CI->lang->line('items_image'), ' ', ' ', ' ' @@ -314,7 +313,7 @@ function get_items_manage_table_data_rows($items,$controller) if($items->num_rows()==0) { - $table_data_rows.="
".$CI->lang->line('items_no_items_to_display')."
"; + $table_data_rows.="
".$CI->lang->line('items_no_items_to_display')."
"; } return $table_data_rows; @@ -347,18 +346,16 @@ function get_item_data_row($item,$controller) $image = ''; if (!empty($item->pic_id)) { - $images = glob ("uploads/item_pics/" . $item->pic_id . ".*"); + $images = glob("uploads/item_pics/" . $item->pic_id . ".*"); if (sizeof($images) > 0) { $image.=''; } } $table_data_row.='' . $image . ''; - $table_data_row.=''.anchor($controller_name."/view/$item->item_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-new modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; - - $table_data_row.=''.anchor($controller_name."/inventory/$item->item_id", $CI->lang->line('common_inv'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_count')))./*'';//inventory count - $table_data_row.=''*/'    '.anchor($controller_name."/count_details/$item->item_id", $CI->lang->line('common_det'),array('class'=>"modal-dlg",'title'=>$CI->lang->line($controller_name.'_details_count'))).'';//inventory details - + $table_data_row.=''.anchor($controller_name."/view/$item->item_id", '', array('class'=>"modal-dlg modal-btn-new modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/inventory/$item->item_id", '', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_count'))).'';//inventory count + $table_data_row.=''.anchor($controller_name."/count_details/$item->item_id", '', array('class'=>"modal-dlg",'title'=>$CI->lang->line($controller_name.'_details_count'))).'';//inventory details $table_data_row.=''; return $table_data_row; @@ -377,8 +374,7 @@ function get_giftcards_manage_table( $giftcards, $controller ) $CI->lang->line('common_first_name'), $CI->lang->line('giftcards_giftcard_number'), $CI->lang->line('giftcards_card_value'), - ' ', - ); + ' '); $table.=''; foreach($headers as $header) @@ -407,7 +403,7 @@ function get_giftcards_manage_table_data_rows( $giftcards, $controller ) if($giftcards->num_rows()==0) { - $table_data_rows.="
".$CI->lang->line('giftcards_no_giftcards_to_display')."
"; + $table_data_rows.="
".$CI->lang->line('giftcards_no_giftcards_to_display')."
"; } return $table_data_rows; @@ -424,7 +420,7 @@ function get_giftcard_data_row($giftcard,$controller) $table_data_row.=''.$giftcard->first_name.''; $table_data_row.=''.$giftcard->giftcard_number.''; $table_data_row.=''.to_currency($giftcard->value).''; - $table_data_row.=''.anchor($controller_name."/view/$giftcard->giftcard_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/view/$giftcard->giftcard_id", '', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; $table_data_row.=''; return $table_data_row; @@ -444,8 +440,7 @@ function get_item_kits_manage_table( $item_kits, $controller ) $CI->lang->line('item_kits_description'), $CI->lang->line('items_cost_price'), $CI->lang->line('items_unit_price'), - ' ', - ); + ' '); $table.=''; foreach($headers as $header) @@ -474,7 +469,7 @@ function get_item_kits_manage_table_data_rows($item_kits, $controller) if($item_kits->num_rows()==0) { - $table_data_rows .= "
".$CI->lang->line('item_kits_no_item_kits_to_display')."
"; + $table_data_rows .= "
".$CI->lang->line('item_kits_no_item_kits_to_display')."
"; } return $table_data_rows; @@ -492,7 +487,7 @@ function get_item_kit_data_row($item_kit, $controller) $table_data_row.=''.character_limiter($item_kit->description, 25).''; $table_data_row.=''.to_currency($item_kit->total_cost_price).''; $table_data_row.=''.to_currency($item_kit->total_unit_price).''; - $table_data_row.=''.anchor($controller_name."/view/$item_kit->item_kit_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; + $table_data_row.=''.anchor($controller_name."/view/$item_kit->item_kit_id", '', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).''; $table_data_row.=''; return $table_data_row; diff --git a/application/language/en/sales_lang.php b/application/language/en/sales_lang.php index c063ceba0..d33dfa05c 100644 --- a/application/language/en/sales_lang.php +++ b/application/language/en/sales_lang.php @@ -90,8 +90,8 @@ $lang["sales_sale_time"] = "Time"; $lang["sales_select_customer"] = "Select Customer (Optional)"; $lang["sales_send_invoice"] = "Send Invoice"; $lang["sales_serial"] = "Serial"; -$lang["sales_show_invoice"] = "invoice"; -$lang["sales_show_receipt"] = "receipt"; +$lang["sales_show_invoice"] = "Show Invoice"; +$lang["sales_show_receipt"] = "Show Receipt"; $lang["sales_start_typing_customer_name"] = "Start Typing customer's name..."; $lang["sales_start_typing_item_name"] = "Start Typing item's name or scan barcode..."; $lang["sales_stock_location"] = "Stock location"; diff --git a/application/views/giftcards/manage.php b/application/views/giftcards/manage.php index 58f74fffd..a8de97809 100644 --- a/application/views/giftcards/manage.php +++ b/application/views/giftcards/manage.php @@ -21,8 +21,8 @@ function init_table_sorting() sortList: [[1,0]], headers: { - 0: { sorter: false}, - 5: { sorter: false} + 0: { sorter: 'false'}, + 5: { sorter: 'false'} } }); } diff --git a/application/views/item_kits/manage.php b/application/views/item_kits/manage.php index e11f43ceb..4c959fea7 100644 --- a/application/views/item_kits/manage.php +++ b/application/views/item_kits/manage.php @@ -34,8 +34,8 @@ function init_table_sorting() sortList: [[1,0]], headers: { - 0: { sorter: false}, - 6: { sorter: false} + 0: { sorter: 'false'}, + 6: { sorter: 'false'} } }); } diff --git a/application/views/items/manage.php b/application/views/items/manage.php index 2467744e7..66af33b55 100644 --- a/application/views/items/manage.php +++ b/application/views/items/manage.php @@ -102,11 +102,12 @@ function init_table_sorting() sortList: [[1,0]], headers: { - 0: { sorter: false}, - 8: { sorter: false}, - 9: { sorter: false}, - 10: { sorter: false}, - 11: { sorter: false} + 0: { sorter: 'false'}, + 8: { sorter: 'false'}, + 9: { sorter: 'false'}, + 10: { sorter: 'false'}, + 11: { sorter: 'false'}, + 12: { sorter: 'false'} } }); } diff --git a/application/views/people/manage.php b/application/views/people/manage.php index 67a3a0fc6..c7ccdeffd 100644 --- a/application/views/people/manage.php +++ b/application/views/people/manage.php @@ -22,8 +22,8 @@ function init_table_sorting() sortList: [[1,0]], headers: { - 0: { sorter: false}, - 5: { sorter: false} + 0: { sorter: 'false'}, + 5: { sorter: 'false'} } }); diff --git a/application/views/sales/manage.php b/application/views/sales/manage.php index a6c7e6973..26e583e90 100755 --- a/application/views/sales/manage.php +++ b/application/views/sales/manage.php @@ -184,10 +184,12 @@ function init_table_sorting() dateFormat: 'config->item('dateformat')); ?>', headers: { - 0: { sorter: false}, + 0: { sorter: 'false'}, 7: { sorter: 'false'}, 8: { sorter: 'invoice_number'}, - 9: { sorter: 'false'} + 9: { sorter: 'false'}, + 10: { sorter: 'false'}, + 11: { sorter: 'false'} }, widgets: ['staticRow'] }); diff --git a/application/views/suppliers/manage.php b/application/views/suppliers/manage.php index a8251df96..2ec492a58 100644 --- a/application/views/suppliers/manage.php +++ b/application/views/suppliers/manage.php @@ -21,8 +21,8 @@ function init_table_sorting() sortList: [[1,0]], headers: { - 0: { sorter: false}, - 6: { sorter: false} + 0: { sorter: 'false'}, + 8: { sorter: 'false'} } }); diff --git a/translations/sales_lang.csv b/translations/sales_lang.csv index 5fffa4009..ac76fe768 100644 --- a/translations/sales_lang.csv +++ b/translations/sales_lang.csv @@ -89,8 +89,8 @@ sales_sale_time,Zeit,Datum,Hora,Time,Time,Time,Time,เวลา,Saat,Waktu sales_select_customer,Wähle Kunde (optional),Selecteer Klant (Optioneel),Seleccionar Cliente (Opcional),Select Customer (Optional),Choisir Client (Facultatif),選擇客戶 (Optional),Выберите клиента (необязательно),เลือกลูกค้า (Optional),Müşteri Seç (İsteğe Bağlı),Pilih Pelanggan (Opsional) sales_send_invoice,Sende Rechnung,Vestuur Factuur,Enviar Factura,Send Invoice,Send Invoice,Send Invoice,Send Invoice,ส่งใบแจ้งหนี้,Send Invoice,Send Invoice sales_serial,Seriennummer,Nummer,Serial,Serial,Serie,序號,серийный номер,Serial,Seri,Serial -sales_show_invoice,Rechnung,factuur,factura,invoice,invoice,invoice,invoice,ใบแจ้งหนี้,invoice,invoice -sales_show_receipt,Quittung,ticket,recibo,receipt,receipt,receipt,receipt,ใบเสร็จ,receipt,receipt +sales_show_invoice,Rechnung,Factuur,Factura,Show Invoice,Show Invoice,Show Invoice,Show Invoice,ใบแจ้งหนี้,Show Invoice,Show Invoice +sales_show_receipt,Quittung,Ticket,Recibo,Show Receipt,Show Receipt,Show Receipt,Show Receipt,ใบเสร็จ,Show Receipt,Show Receipt sales_start_typing_customer_name,Geben Sie den Kundennamen ein...,Typ naam klant...,Empieza a escribir el cliente...,Start Typing customer's name...,Commencez à saisir le nom du client...,開始輸入客戶的名字,Начните печатать название клиента...,เริ่มต้นพิมพ์ชื่อลูกค้า...,Müşteri Adı...,Ketik Nama Pelanggan... sales_start_typing_item_name,Geben Sie den Artikel ein oder scannen Sie ihn...,Typ naam product of barcode...,Empieza a escribir o escanea el código de barras...,Start Typing item's name or scan barcode...,Commencez à saisir le nom de l\'item ou scannez le code-barre...,開始輸入產品名或掃描條碼...,Начните печатать название товара или сканировайте штрих-кода...,เริ่มต้นพิมพ์ชื่อสินค้า หรือ สแกนบาร์โค๊ด...,Ürün adı yazın yada barkod okutun...,Ketik Nama Barang atau Scan Barcode... sales_stock_location,Lagerort,Stock locatie,Inventario,Stock location,,,,ที่เก็บ,Stok yeri,Lokasi Stock