From 57759d277503de0e4ec015ba706664230a3a908c Mon Sep 17 00:00:00 2001 From: jekkos Date: Sat, 25 Jun 2016 01:48:43 +0200 Subject: [PATCH] Make bootstrap dialog buttons translatable (#439) Update deploy instructions in Readme (#616) Add partial views to load CI translations in javascript (#439) --- README.md | 21 +++--- application/controllers/Reports.php | 8 +- application/helpers/table_helper.php | 18 ++--- .../language/de-CH/receivings_lang.php | 2 +- application/language/en/receivings_lang.php | 2 +- application/language/es/receivings_lang.php | 2 +- application/language/fr/receivings_lang.php | 2 +- .../language/hr-HR/receivings_lang.php | 2 +- .../language/hu-HU/receivings_lang.php | 2 +- application/language/id/receivings_lang.php | 2 +- .../language/nl-BE/receivings_lang.php | 2 +- .../language/pt-BR/receivings_lang.php | 2 +- application/language/ru/receivings_lang.php | 2 +- application/language/th/receivings_lang.php | 2 +- application/language/tr/receivings_lang.php | 2 +- application/language/zh/receivings_lang.php | 2 +- application/views/giftcards/manage.php | 2 +- application/views/item_kits/manage.php | 2 +- application/views/items/manage.php | 4 +- application/views/login.php | 2 +- application/views/partial/header.php | 11 +-- application/views/partial/lang_lines.php | 17 +++++ application/views/people/manage.php | 4 +- application/views/receivings/receiving.php | 4 +- application/views/sales/register.php | 4 +- dist/bootstrap.min.css | 4 +- dist/opensourcepos.js | 75 +++++++++++++++++-- dist/opensourcepos.min.js | 20 ++--- js/manage_tables.js | 11 ++- templates/spacelab/views/login.php | 2 +- templates/spacelab/views/partial/header.php | 6 +- translations/receivings_lang.csv | 2 +- 32 files changed, 166 insertions(+), 77 deletions(-) create mode 100644 application/views/partial/lang_lines.php diff --git a/README.md b/README.md index e00d6fc09..26d83bdfa 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,13 @@ If above information is not provided in full, your issue will be tagged as pendi If missing information is not provided within a week we will close your issue. Cloud install --------------- +------------- +A quick option would be to install directly to [Digitalocean](https://m.do.co/c/ac38c262507b) using their preconfigured LAMP stack. +Create a DO account first, add a droplet with preconfigured LAMP and follow the instructions for Local Install below. You will be running a provisioned VPS within minutes. -If you just want to run a quick demo of ospos or run it permanently in the cloud, then we +Cloud install using Docker +-------------------------- +If you want to run a quick demo of ospos or run it permanently in the cloud, then we suggest using Docker cloud together with the DigitalOcean hosting platform. This way all the configuration is done automatically and the install will just work. @@ -55,17 +59,14 @@ month of uptime on the platform. A full setup will only take about 2 minutes by 3. Login to docker cloud 4. Associate your docker cloud account with your previously created digital ocean account under settings 5. Create a new node on DigitalOcean through the `Infrastructure > Nodes` tab. Fill in a name (ospos) and choose a region near to you -6. Click this link [![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/) or Create a new stack under `Applications > Stacks` and paste the [contents of docker-cloud.yml](https://github.com/jekkos/opensourcepos/blob/master/docker-cloud.yml) from the source repository in the text field and click `Create and deploy` -7. Find your website url under `Infrastructure > Nodes > > Endpoints > web` -8. Login with default username/password admin/pointofsale -9. DNS name for this server can be easily configured in the DigitalOcean control panel - -Another option would be to install directly to [Digitalocean](https://m.do.co/c/ac38c262507b) without docker using their preconfigured LAMP stack. -Just create a DO account, add a droplet with preconfigured LAMP and follow the instructions below. You will be running a fully provisioned VPS within minutes. +6. Click [![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/) +7. Othewise create a new stack under `Applications > Stacks` and paste the [contents of docker-cloud.yml](https://github.com/jekkos/opensourcepos/blob/master/docker-cloud.yml) from the source repository in the text field and hit `Create and deploy` +8. Find your website url under `Infrastructure > Nodes > > Endpoints > web` +9. Login with default username/password admin/pointofsale +10. DNS name for this server can be easily configured in the DigitalOcean control panel Local install ------------- - 1. Create/locate a new mysql database to install open source point of sale into 2. Execute the file database/database.sql to create the tables needed 3. unzip and upload Open Source Point of Sale files to web server diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index 9775abfc4..b596ffc5e 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -805,7 +805,7 @@ class Reports extends Secure_Controller 'payment_type' => $report_data['payment_type'], 'comment' => $report_data['comment'], 'edit' => anchor("sales/edit/". $report_data['sale_id'], '', - array('class'=>"modal-dlg modal-btn-delete modal-btn-submit print_hide", 'title' => $this->lang->line('sales_update')) + array('class'=>"modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('sales_update')) ) )); @@ -841,7 +841,7 @@ class Reports extends Secure_Controller 'payment_type' => $row['payment_type'], 'comment' => $row['comment'], 'edit' => anchor("sales/edit/".$row['sale_id'], '', - array('class' => "modal-dlg modal-btn-delete modal-btn-submit print_hide", 'title' => $this->lang->line('sales_update')) + array('class' => "modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('sales_update')) ) )); @@ -887,7 +887,7 @@ class Reports extends Secure_Controller 'reference' => $report_data['reference'], 'comment' => $report_data['comment'], 'edit' => anchor("receivings/edit/". $report_data['receiving_id'], '', - array('class'=>"modal-dlg modal-btn-delete modal-btn-submit print_hide", 'title' => $this->lang->line('recvs_update')) + array('class'=>"modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('recvs_update')) ) )); @@ -920,7 +920,7 @@ class Reports extends Secure_Controller 'reference' => $row['reference'], 'comment' => $row['comment'], 'edit' => anchor("receivings/edit/" . $row['receiving_id'], '', - array('class' => "modal-dlg modal-btn-delete modal-btn-submit print_hide", 'title' => $this->lang->line('recvs_update')) + array('class' => "modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('recvs_update')) ) )); diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 023de8160..8c0927e47 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -77,7 +77,7 @@ function get_sale_data_row($sale, $controller) array('title'=>$CI->lang->line('sales_show_receipt')) ); $row['edit'] = anchor($controller_name."/edit/$sale->sale_id", '', - array('class'=>"modal-dlg modal-btn-delete modal-btn-submit print_hide", 'title'=>$CI->lang->line($controller_name.'_update')) + array('class'=>"modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) ); return $row; @@ -175,9 +175,9 @@ function get_person_data_row($person, $controller) 'email' => empty($person->email) ? '' : mailto($person->email,character_limiter($person->email,22)), 'phone_number' => character_limiter($person->phone_number,13), 'messages' => empty($person->phone_number) ? '' : anchor("Messages/view/$person->person_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line('messages_sms_send'))), + array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line('messages_sms_send'))), 'edit' => anchor($controller_name."/view/$person->person_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update')) + array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) )); } @@ -217,9 +217,9 @@ function get_supplier_data_row($supplier, $controller) 'email' => empty($supplier->email) ? '' : mailto($supplier->email,character_limiter($supplier->email,22)), 'phone_number' => character_limiter($supplier->phone_number,13), 'messages' => empty($supplier->phone_number) ? '' : anchor("Messages/view/$supplier->person_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line('messages_sms_send'))), + array('class'=>"modal-dlg", 'data-btn-submit' => $this->lang->line('common_submit'), 'title'=>$CI->lang->line('messages_sms_send'))), 'edit' => anchor($controller_name."/view/$supplier->person_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update')) + array('class'=>"modal-dlg", 'data-btn-submit' => $this->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) )); } @@ -280,13 +280,13 @@ function get_item_data_row($item, $controller) 'tax_percents' => !$tax_percents ? '-' : $tax_percents, 'item_pic' => $image, 'inventory' => anchor($controller_name."/inventory/$item->item_id", '', - array('class' => "modal-dlg modal-btn-submit", 'title' => $CI->lang->line($controller_name.'_count')) + array('class' => "modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_count')) ), 'stock' => anchor($controller_name."/count_details/$item->item_id", '', array('class' => "modal-dlg", 'title' => $CI->lang->line($controller_name.'_details_count')) ), 'edit' => anchor($controller_name."/view/$item->item_id", '', - array('class' => "modal-dlg modal-btn-submit", 'title' => $CI->lang->line($controller_name.'_update')) + array('class' => "modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_update')) )); } @@ -317,7 +317,7 @@ function get_giftcard_data_row($giftcard, $controller) 'giftcard_number' => $giftcard->giftcard_number, 'value' => to_currency($giftcard->value), 'edit' => anchor($controller_name."/view/$giftcard->giftcard_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update')) + array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) )); } @@ -348,7 +348,7 @@ function get_item_kit_data_row($item_kit, $controller) 'cost_price' => to_currency($item_kit->total_cost_price), 'unit_price' => to_currency($item_kit->total_unit_price), 'edit' => anchor($controller_name."/view/$item_kit->item_kit_id", '', - array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update')) + array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) )); } diff --git a/application/language/de-CH/receivings_lang.php b/application/language/de-CH/receivings_lang.php index 69cdd3d64..dfd2bcd25 100644 --- a/application/language/de-CH/receivings_lang.php +++ b/application/language/de-CH/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Kosten"; $lang["recvs_date"] = "Eingangsdatum"; $lang["recvs_date_required"] = "Ein korrektes Datum ist erforderlich"; $lang["recvs_date_type"] = "Datum ist erforderlich"; -$lang["recvs_confirm_delete"] = "Wollen Sie diesen Eingang wirklich löschen? Rückgängig nicht möglich"; +$lang["receivings_confirm_delete"] = "Wollen Sie diesen Eingang wirklich löschen? Rückgängig nicht möglich"; $lang["recvs_delete_entire_sale"] = "Wareneingang löschen"; $lang["recvs_discount"] = "Rabatt %"; $lang["recvs_edit"] = "Ändern"; diff --git a/application/language/en/receivings_lang.php b/application/language/en/receivings_lang.php index 4ff72fb50..00a139272 100644 --- a/application/language/en/receivings_lang.php +++ b/application/language/en/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Cost"; $lang["recvs_date"] = "Receiving Date"; $lang["recvs_date_required"] = "A correct date needs to be filled in"; $lang["recvs_date_type"] = "Date field is required"; -$lang["recvs_confirm_delete"] = "Are you sure you want to delete this receiving, this action cannot be undone"; +$lang["receivings_confirm_delete"] = "Are you sure you want to delete this receiving, this action cannot be undone"; $lang["recvs_delete_entire_sale"] = "Delete entire sale"; $lang["recvs_discount"] = "Disc %"; $lang["recvs_edit"] = "Edit"; diff --git a/application/language/es/receivings_lang.php b/application/language/es/receivings_lang.php index 2d723e744..8eda00165 100644 --- a/application/language/es/receivings_lang.php +++ b/application/language/es/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Costo"; $lang["recvs_date"] = "Fecha de Recepción"; $lang["recvs_date_required"] = "Una fecha correcta debe ser ingresada"; $lang["recvs_date_type"] = "Campo Fecha es requerido"; -$lang["recvs_confirm_delete"] = "¿Seguro(a) que desea borrar este ingreso? Esta acción no se puede deshacer"; +$lang["receivings_confirm_delete"] = "¿Seguro(a) que desea borrar este ingreso? Esta acción no se puede deshacer"; $lang["recvs_delete_entire_sale"] = "Borrar venta completa"; $lang["recvs_discount"] = "Descuento %"; $lang["recvs_edit"] = "Editar"; diff --git a/application/language/fr/receivings_lang.php b/application/language/fr/receivings_lang.php index 010b8b250..65baada6e 100644 --- a/application/language/fr/receivings_lang.php +++ b/application/language/fr/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Cout"; $lang["recvs_date"] = ""; $lang["recvs_date_required"] = ""; $lang["recvs_date_type"] = ""; -$lang["recvs_confirm_delete"] = ""; +$lang["receivings_confirm_delete"] = ""; $lang["recvs_delete_entire_sale"] = "Delete entire sale"; $lang["recvs_discount"] = "Remise %"; $lang["recvs_edit"] = "Éditer"; diff --git a/application/language/hr-HR/receivings_lang.php b/application/language/hr-HR/receivings_lang.php index efe450756..72c69906a 100644 --- a/application/language/hr-HR/receivings_lang.php +++ b/application/language/hr-HR/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Cijena"; $lang["recvs_date"] = "Datum"; $lang["recvs_date_required"] = "Potrebno je unijeti ispravan datum"; $lang["recvs_date_type"] = "Datum je potreban"; -$lang["recvs_confirm_delete"] = "Želite li obrisati ovu primku? To ne ne može vratiti."; +$lang["receivings_confirm_delete"] = "Želite li obrisati ovu primku? To ne ne može vratiti."; $lang["recvs_delete_entire_sale"] = "Obrisati cijelu prodaju"; $lang["recvs_discount"] = "Rabat %"; $lang["recvs_edit"] = "Urediti"; diff --git a/application/language/hu-HU/receivings_lang.php b/application/language/hu-HU/receivings_lang.php index ebce7d478..194e4aaf3 100644 --- a/application/language/hu-HU/receivings_lang.php +++ b/application/language/hu-HU/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Költség"; $lang["recvs_date"] = "Beérkezés dátuma"; $lang["recvs_date_required"] = "Korrekt dátumot kell megadni"; $lang["recvs_date_type"] = "Dátum mező kötelező"; -$lang["recvs_confirm_delete"] = "Biztos, hogy törli az átvételt? Nem lehet visszavonni!"; +$lang["receivings_confirm_delete"] = "Biztos, hogy törli az átvételt? Nem lehet visszavonni!"; $lang["recvs_delete_entire_sale"] = "Teljes értékesités törlése"; $lang["recvs_discount"] = "Kedv. %"; $lang["recvs_edit"] = "Szerkeszt"; diff --git a/application/language/id/receivings_lang.php b/application/language/id/receivings_lang.php index 97607e368..a5da112bb 100644 --- a/application/language/id/receivings_lang.php +++ b/application/language/id/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Harga"; $lang["recvs_date"] = "Tanggal"; $lang["recvs_date_required"] = "Tanngalnya harus diisi"; $lang["recvs_date_type"] = "Model Tanggal"; -$lang["recvs_confirm_delete"] = "Konfirmasi Hapus"; +$lang["receivings_confirm_delete"] = "Konfirmasi Hapus"; $lang["recvs_delete_entire_sale"] = "Hapus Semua Penjualan"; $lang["recvs_discount"] = "Diskon %"; $lang["recvs_edit"] = "Ubah"; diff --git a/application/language/nl-BE/receivings_lang.php b/application/language/nl-BE/receivings_lang.php index 1d57eef14..aaea82796 100755 --- a/application/language/nl-BE/receivings_lang.php +++ b/application/language/nl-BE/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Kost"; $lang["recvs_date"] = "Order Datum"; $lang["recvs_date_required"] = "Er moet een correcte datum ingevuld worden"; $lang["recvs_date_type"] = "Datum is vereist"; -$lang["recvs_confirm_delete"] = "Bent u zeker dat u dit order wil verwijderen? Dit kan niet ongedaan gemaakt worden."; +$lang["receivings_confirm_delete"] = "Bent u zeker dat u dit order wil verwijderen? Dit kan niet ongedaan gemaakt worden."; $lang["recvs_delete_entire_sale"] = "Verwijder"; $lang["recvs_discount"] = "Korting %"; $lang["recvs_edit"] = "Bewerk"; diff --git a/application/language/pt-BR/receivings_lang.php b/application/language/pt-BR/receivings_lang.php index 22bb91f59..e4a50c3a5 100644 --- a/application/language/pt-BR/receivings_lang.php +++ b/application/language/pt-BR/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Custo"; $lang["recvs_date"] = "Data Recebimento"; $lang["recvs_date_required"] = "A data correta precisa ser preenchida"; $lang["recvs_date_type"] = "Campo de data é obrigatório"; -$lang["recvs_confirm_delete"] = "Tem certeza de que deseja excluir este recebimento esta ação não pode ser desfeita"; +$lang["receivings_confirm_delete"] = "Tem certeza de que deseja excluir este recebimento esta ação não pode ser desfeita"; $lang["recvs_delete_entire_sale"] = "Apagar toda a venda"; $lang["recvs_discount"] = "Desc. %"; $lang["recvs_edit"] = "Editar"; diff --git a/application/language/ru/receivings_lang.php b/application/language/ru/receivings_lang.php index 525c9f467..959ed7978 100644 --- a/application/language/ru/receivings_lang.php +++ b/application/language/ru/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "стоимость"; $lang["recvs_date"] = ""; $lang["recvs_date_required"] = ""; $lang["recvs_date_type"] = ""; -$lang["recvs_confirm_delete"] = ""; +$lang["receivings_confirm_delete"] = ""; $lang["recvs_delete_entire_sale"] = "Delete entire sale"; $lang["recvs_discount"] = "Скидка %"; $lang["recvs_edit"] = "редактировать"; diff --git a/application/language/th/receivings_lang.php b/application/language/th/receivings_lang.php index c7e24d43e..28d9c9fde 100644 --- a/application/language/th/receivings_lang.php +++ b/application/language/th/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = ""; $lang["recvs_date"] = ""; $lang["recvs_date_required"] = ""; $lang["recvs_date_type"] = ""; -$lang["recvs_confirm_delete"] = ""; +$lang["receivings_confirm_delete"] = ""; $lang["recvs_delete_entire_sale"] = ""; $lang["recvs_discount"] = "ส่วนลด %"; $lang["recvs_edit"] = "แก้ไข"; diff --git a/application/language/tr/receivings_lang.php b/application/language/tr/receivings_lang.php index 148321a1f..32674f486 100644 --- a/application/language/tr/receivings_lang.php +++ b/application/language/tr/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "Ücret"; $lang["recvs_date"] = ""; $lang["recvs_date_required"] = ""; $lang["recvs_date_type"] = ""; -$lang["recvs_confirm_delete"] = ""; +$lang["receivings_confirm_delete"] = ""; $lang["recvs_delete_entire_sale"] = "Delete entire sale"; $lang["recvs_discount"] = "İndirim %"; $lang["recvs_edit"] = "Düzenle"; diff --git a/application/language/zh/receivings_lang.php b/application/language/zh/receivings_lang.php index 11944434b..0f9ff9112 100755 --- a/application/language/zh/receivings_lang.php +++ b/application/language/zh/receivings_lang.php @@ -11,7 +11,7 @@ $lang["recvs_cost"] = "成本"; $lang["recvs_date"] = ""; $lang["recvs_date_required"] = ""; $lang["recvs_date_type"] = ""; -$lang["recvs_confirm_delete"] = ""; +$lang["receivings_confirm_delete"] = ""; $lang["recvs_delete_entire_sale"] = "Delete entire sale"; $lang["recvs_discount"] = "折古 %"; $lang["recvs_edit"] = "編輯"; diff --git a/application/views/giftcards/manage.php b/application/views/giftcards/manage.php index 51b43ce95..61b51f2f2 100644 --- a/application/views/giftcards/manage.php +++ b/application/views/giftcards/manage.php @@ -13,7 +13,7 @@ $(document).ready(function()
- diff --git a/application/views/item_kits/manage.php b/application/views/item_kits/manage.php index 78c69b843..12db8f8c5 100644 --- a/application/views/item_kits/manage.php +++ b/application/views/item_kits/manage.php @@ -24,7 +24,7 @@ $(document).ready(function()
- diff --git a/application/views/items/manage.php b/application/views/items/manage.php index a44b4d42a..b2e49ce80 100644 --- a/application/views/items/manage.php +++ b/application/views/items/manage.php @@ -58,12 +58,12 @@ $(document).ready(function()