diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 9272346a7e..07dd7d2b88 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -86,6 +86,19 @@ $apps[$x]['permissions'][$y]['name'] = "device_line_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; + + $apps[$x]['permissions'][$y]['name'] = "device_setting_view"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "device_setting_add"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "device_setting_edit"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "device_setting_delete"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; //schema details $y = 0; //table array index @@ -270,4 +283,48 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the password."; $z++; + + $y = 3; //table array index + $z = 0; //field array index + $apps[$x]['db'][$y]['table'] = "v_device_settings"; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_devices"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "device_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_category"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_subcategory"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_name"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_value"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_enabled"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_setting_description"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; ?> diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php index 306af5968f..d5f02d92f2 100644 --- a/app/devices/app_languages.php +++ b/app/devices/app_languages.php @@ -217,6 +217,14 @@ $text['button-back']['pt-pt'] = "Voltar"; $text['button-back']['fr-fr'] = "Retour"; + $text['label-tools']['en-us'] = "Tools"; + $text['label-tools']['pt-pt'] = "Ferramentas"; + $text['label-tools']['fr-fr'] = "Outils"; + + $text['label-settings']['en-us'] = "Settings"; + $text['label-settings']['pt-pt'] = "Definições"; + $text['label-settings']['fr-fr'] = "Configurations"; + $text['confirm-delete']['en-us'] = "Do you really want to delete this?"; $text['confirm-delete']['pt-pt'] = "Deseja realmente remover isto?"; $text['confirm-delete']['fr-fr'] = "Voulez-vous vraiment supprimer cela?"; @@ -236,5 +244,53 @@ $text['message-required']['en-us'] = "Please provide: "; $text['message-required']['pt-pt'] = "Por favor indique: "; $text['message-required']['fr-fr'] = "Merci d'indiquer: "; + + $text['label-category']['en-us'] = "Category"; + $text['label-category']['pt-pt'] = "Categoria"; + $text['label-category']['fr-fr'] = "Catégorie"; + + $text['description-category']['en-us'] = "Enter the category."; + $text['description-category']['pt-pt'] = "Introduza a categoria."; + $text['description-category']['fr-fr'] = ""; + + $text['label-subcategory']['en-us'] = "Subcategory"; + $text['label-subcategory']['pt-pt'] = "Subcategoria"; + $text['label-subcategory']['fr-fr'] = "Sous-Catégorie"; + + $text['description-subcategory']['en-us'] = "Enter the subcategory."; + $text['description-subcategory']['pt-pt'] = "Introduza a subcategoria"; + $text['description-subcategory']['fr-fr'] = ""; + + $text['label-type']['en-us'] = "Type"; + $text['label-type']['pt-pt'] = "Tipo"; + $text['label-type']['fr-fr'] = "Type"; + + $text['description-type']['en-us'] = "Enter the setting type (ie. uuid, name, var, dir, etc)."; + $text['description-type']['pt-pt'] = "Introduza o tipo de definição (ex: uuid, name, var, dir, etc)."; + $text['description-type']['fr-fr'] = "Entrer le type du paramètre (ie. uuid, nom, var, dir, etc)."; + + $text['label-value']['en-us'] = "Value"; + $text['label-value']['pt-pt'] = "Valor"; + $text['label-value']['fr-fr'] = "Valeur"; + + $text['description-value']['en-us'] = "Enter the value of this setting."; + $text['description-value']['pt-pt'] = "Introduza o valor desta definição."; + $text['description-value']['fr-fr'] = ""; + + $text['label-enabled']['en-us'] = "Enabled"; + $text['label-enabled']['pt-pt'] = "Activado"; + $text['label-enabled']['fr-fr'] = "Actif"; + + $text['description-enabled']['en-us'] = "Set the status of this default setting."; + $text['description-enabled']['pt-pt'] = "Escolha o estado desta definição por omissão."; + $text['description-enabled']['fr-fr'] = "Choisir l'état de ce paramètre"; + + $text['label-description']['en-us'] = "Description"; + $text['label-description']['pt-pt'] = "Descrição"; + $text['label-description']['fr-fr'] = "Description"; + + $text['description-description']['en-us'] = "Enter a description, if desired."; + $text['description-description']['pt-pt'] = "Introduza uma descrição, caso queira."; + $text['description-description']['fr-fr'] = ""; ?> diff --git a/app/devices/devices.php b/app/devices/devices.php index dce728dcaa..cf2a7bc861 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -115,6 +115,7 @@ else { //echo th_order_by('device_username', $text['label-device_username'], $order_by, $order); //echo th_order_by('device_password', $text['label-device_password'], $order_by, $order); //echo th_order_by('device_time_zone', $text['label-device_time_zone'], $order_by, $order); + echo "".$text['label-tools']."\n"; echo th_order_by('device_description', $text['label-device_description'], $order_by, $order); echo "\n"; if (permission_exists('device_add')) { @@ -143,6 +144,9 @@ else { //echo " ".$row['device_username']." \n"; //echo " ".$row['device_password']." \n"; //echo " ".$row['device_time_zone']." \n"; + echo " \n"; + echo " ".$text['label-settings']."  \n"; + echo " \n"; echo " ".$row['device_description']." \n"; echo " \n"; if (permission_exists('device_edit')) { @@ -159,10 +163,12 @@ else { } //end if results echo "\n"; - echo "\n"; + echo "\n"; echo " \n"; echo " \n"; echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo "
   $paging_controls\n"; if (permission_exists('device_add')) {