diff --git a/core/dashboard/app_config.php b/core/dashboard/app_config.php index 25075fecaf..f35483da4b 100644 --- a/core/dashboard/app_config.php +++ b/core/dashboard/app_config.php @@ -72,15 +72,30 @@ $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard path.'; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon.'; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_url'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard url.'; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon'; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_target'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon.'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard target.'; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_content'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard top content.'; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_content_details'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard top content details.'; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_chart_type'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; diff --git a/core/dashboard/app_languages.php b/core/dashboard/app_languages.php index 88674a28dd..1bdc15bb12 100644 --- a/core/dashboard/app_languages.php +++ b/core/dashboard/app_languages.php @@ -234,6 +234,84 @@ $text['label-dashboard_groups']['zh-cn'] = "团体"; $text['label-dashboard_groups']['ja-jp'] = "グループ"; $text['label-dashboard_groups']['ko-kr'] = "여러 떼"; +$text['description-dashboard_target']['en-us'] = "Specify the target of the Link."; +$text['description-dashboard_target']['en-gb'] = "Specify the target of the Link."; +$text['description-dashboard_target']['ar-eg'] = "حدد هدف الارتباط."; +$text['description-dashboard_target']['de-at'] = "Geben Sie das Ziel des Links an."; +$text['description-dashboard_target']['de-ch'] = "Geben Sie das Ziel des Links an."; +$text['description-dashboard_target']['de-de'] = "Geben Sie das Ziel des Links an."; +$text['description-dashboard_target']['el-gr'] = "Καθορίστε τον στόχο του συνδέσμου."; +$text['description-dashboard_target']['es-cl'] = "Especifique el destino del enlace."; +$text['description-dashboard_target']['es-mx'] = "Especifique el destino del enlace."; +$text['description-dashboard_target']['fr-ca'] = "Spécifiez la cible du lien."; +$text['description-dashboard_target']['fr-fr'] = "Spécifiez la cible du lien."; +$text['description-dashboard_target']['he-il'] = "ציין את היעד של הקישור."; +$text['description-dashboard_target']['it-it'] = "Specificare la destinazione del collegamento."; +$text['description-dashboard_target']['nl-nl'] = "Geef het doel van de link op."; +$text['description-dashboard_target']['pl-pl'] = "Określ cel łącza."; +$text['description-dashboard_target']['pt-br'] = "Especifique o destino do link."; +$text['description-dashboard_target']['pt-pt'] = "Especifique o destino do link."; +$text['description-dashboard_target']['ro-ro'] = "Specificați ținta Link-ului."; +$text['description-dashboard_target']['ru-ru'] = "Укажите цель ссылки."; +$text['description-dashboard_target']['sv-se'] = "Ange målet för länken."; +$text['description-dashboard_target']['uk-ua'] = "Укажіть ціль посилання."; +$text['description-dashboard_target']['tr-tr'] = "Bağlantının hedefini belirtin."; +$text['description-dashboard_target']['zh-cn'] = "指定链接的目标。"; +$text['description-dashboard_target']['ja-jp'] = "リンクのターゲットを指定します。"; +$text['description-dashboard_target']['ko-kr'] = "링크의 대상을 지정합니다."; + +$text['description-dashboard_content']['en-us'] = "Enter the content (text) to display in the top section of the widget."; +$text['description-dashboard_content']['en-gb'] = "Enter the content (text) to display in the top section of the widget."; +$text['description-dashboard_content']['ar-eg'] = "أدخل المحتوى (النص) لعرضه في القسم العلوي من الأداة."; +$text['description-dashboard_content']['de-at'] = "Geben Sie Inhalt (Text) ein, der im oberen Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content']['de-ch'] = "Geben Sie Inhalt (Text) ein, der im oberen Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content']['de-de'] = "Geben Sie Inhalt (Text) ein, der im oberen Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content']['el-gr'] = "Εισαγάγετε περιεχόμενο (κείμενο) για εμφάνιση στην επάνω ενότητα του γραφικού στοιχείου."; +$text['description-dashboard_content']['es-cl'] = "Ingrese el contenido (texto) para mostrar en la sección superior del widget."; +$text['description-dashboard_content']['es-mx'] = "Ingrese el contenido (texto) para mostrar en la sección superior del widget."; +$text['description-dashboard_content']['fr-ca'] = "Saisissez le contenu (texte) à afficher dans la section supérieure du widget."; +$text['description-dashboard_content']['fr-fr'] = "Saisissez le contenu (texte) à afficher dans la section supérieure du widget."; +$text['description-dashboard_content']['he-il'] = "הזן תוכן (טקסט) להצגה בחלק העליון של הווידג'ט."; +$text['description-dashboard_content']['it-it'] = "Inserisci il contenuto (testo) da visualizzare nella sezione superiore del widget."; +$text['description-dashboard_content']['nl-nl'] = "Voer inhoud (tekst) in die in het bovenste gedeelte van de widget moet worden weergegeven."; +$text['description-dashboard_content']['pl-pl'] = "Wprowadź treść (tekst), która będzie wyświetlana w górnej części widżetu."; +$text['description-dashboard_content']['pt-br'] = "Insira o conteúdo (texto) a ser exibido na seção superior do widget."; +$text['description-dashboard_content']['pt-pt'] = "Insira o conteúdo (texto) a ser exibido na seção superior do widget."; +$text['description-dashboard_content']['ro-ro'] = "Introduceți conținut (text) de afișat în secțiunea de sus a widget-ului."; +$text['description-dashboard_content']['ru-ru'] = "Введите контент (текст), который будет отображаться в верхней части виджета."; +$text['description-dashboard_content']['sv-se'] = "Ange innehåll (text) som ska visas i den övre delen av widgeten."; +$text['description-dashboard_content']['uk-ua'] = "Введіть вміст (текст) для відображення у верхній частині віджета."; +$text['description-dashboard_content']['tr-tr'] = "Widget'ın üst bölümünde görüntülenecek içeriği (metni) girin."; +$text['description-dashboard_content']['zh-cn'] = "输入要显示在小部件顶部的内容(文本)。"; +$text['description-dashboard_content']['ja-jp'] = "ウィジェットの上部セクションに表示するコンテンツ (テキスト) を入力します。"; +$text['description-dashboard_content']['ko-kr'] = "위젯 상단에 표시할 내용(텍스트)을 입력하세요."; + +$text['description-dashboard_content_details']['en-us'] = "Enter the content (text) to display in the bottom section of the widget."; +$text['description-dashboard_content_details']['en-gb'] = "Enter the content (text) to display in the bottom section of the widget."; +$text['description-dashboard_content_details']['ar-eg'] = "أدخل المحتوى (النص) الذي سيتم عرضه في القسم السفلي من الأداة."; +$text['description-dashboard_content_details']['de-at'] = "Geben Sie den Inhalt (Text) ein, der im unteren Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content_details']['de-ch'] = "Geben Sie den Inhalt (Text) ein, der im unteren Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content_details']['de-de'] = "Geben Sie den Inhalt (Text) ein, der im unteren Abschnitt des Widgets angezeigt werden soll."; +$text['description-dashboard_content_details']['el-gr'] = "Εισαγάγετε το περιεχόμενο (κείμενο) που θα εμφανιστεί στο κάτω τμήμα του γραφικού στοιχείου."; +$text['description-dashboard_content_details']['es-cl'] = "Ingrese el contenido (texto) para mostrar en la sección inferior del widget."; +$text['description-dashboard_content_details']['es-mx'] = "Ingrese el contenido (texto) para mostrar en la sección inferior del widget."; +$text['description-dashboard_content_details']['fr-ca'] = "Saisissez le contenu (texte) à afficher dans la section inférieure du widget."; +$text['description-dashboard_content_details']['fr-fr'] = "Saisissez le contenu (texte) à afficher dans la section inférieure du widget."; +$text['description-dashboard_content_details']['he-il'] = "הזן את התוכן (טקסט) שיוצג בחלק התחתון של הווידג'ט."; +$text['description-dashboard_content_details']['it-it'] = "Inserisci il contenuto (testo) da visualizzare nella sezione inferiore del widget."; +$text['description-dashboard_content_details']['nl-nl'] = "Voer de inhoud (tekst) in die in het onderste gedeelte van de widget moet worden weergegeven."; +$text['description-dashboard_content_details']['pl-pl'] = "Wprowadź treść (tekst), która będzie wyświetlana w dolnej części widżetu."; +$text['description-dashboard_content_details']['pt-br'] = "Insira o conteúdo (texto) a ser exibido na seção inferior do widget."; +$text['description-dashboard_content_details']['pt-pt'] = "Insira o conteúdo (texto) a ser exibido na seção inferior do widget."; +$text['description-dashboard_content_details']['ro-ro'] = "Introduceți conținutul (textul) de afișat în secțiunea de jos a widget-ului."; +$text['description-dashboard_content_details']['ru-ru'] = "Введите содержимое (текст), которое будет отображаться в нижней части виджета."; +$text['description-dashboard_content_details']['sv-se'] = "Ange innehållet (texten) som ska visas i den nedre delen av widgeten."; +$text['description-dashboard_content_details']['uk-ua'] = "Введіть вміст (текст) для відображення в нижній частині віджета."; +$text['description-dashboard_content_details']['tr-tr'] = "Widget'ın alt bölümünde görüntülenecek içeriği (metni) girin."; +$text['description-dashboard_content_details']['zh-cn'] = "输入要在小部件底部显示的内容(文本)。"; +$text['description-dashboard_content_details']['ja-jp'] = "ウィジェットの下部に表示するコンテンツ (テキスト) を入力します。"; +$text['description-dashboard_content_details']['ko-kr'] = "위젯 하단에 표시할 내용(텍스트)을 입력하세요."; + $text['description-dashboard_groups']['en-us'] = "Add the groups that have permission to this widget."; $text['description-dashboard_groups']['en-gb'] = "Add the groups that have permission to this widget."; $text['description-dashboard_groups']['ar-eg'] = "أضف المجموعات التي لديها إذن إلى هذه الأداة."; @@ -652,55 +730,55 @@ $text['description-dashboard_column_span']['ko-kr'] = "대시보드 위젯 열 $text['label-dashboard_row_span']['en-us'] = "Row Span"; $text['label-dashboard_row_span']['en-gb'] = "Row Span"; -$text['label-dashboard_row_span']['ar-eg'] = ""; -$text['label-dashboard_row_span']['de-at'] = ""; -$text['label-dashboard_row_span']['de-ch'] = ""; -$text['label-dashboard_row_span']['de-de'] = ""; -$text['label-dashboard_row_span']['el-gr'] = ""; -$text['label-dashboard_row_span']['es-cl'] = ""; -$text['label-dashboard_row_span']['es-mx'] = ""; -$text['label-dashboard_row_span']['fr-ca'] = ""; -$text['label-dashboard_row_span']['fr-fr'] = ""; -$text['label-dashboard_row_span']['he-il'] = ""; -$text['label-dashboard_row_span']['it-it'] = ""; -$text['label-dashboard_row_span']['nl-nl'] = ""; -$text['label-dashboard_row_span']['pl-pl'] = ""; -$text['label-dashboard_row_span']['pt-br'] = ""; -$text['label-dashboard_row_span']['pt-pt'] = ""; -$text['label-dashboard_row_span']['ro-ro'] = ""; -$text['label-dashboard_row_span']['ru-ru'] = ""; -$text['label-dashboard_row_span']['sv-se'] = ""; -$text['label-dashboard_row_span']['uk-ua'] = ""; -$text['label-dashboard_row_span']['tr-tr'] = ""; -$text['label-dashboard_row_span']['zh-cn'] = ""; -$text['label-dashboard_row_span']['ja-jp'] = ""; -$text['label-dashboard_row_span']['ko-kr'] = ""; +$text['label-dashboard_row_span']['ar-eg'] = "نطاق الصف"; +$text['label-dashboard_row_span']['de-at'] = "Zeilenspanne"; +$text['label-dashboard_row_span']['de-ch'] = "Zeilenspanne"; +$text['label-dashboard_row_span']['de-de'] = "Zeilenspanne"; +$text['label-dashboard_row_span']['el-gr'] = "Άνοιγμα σειράς"; +$text['label-dashboard_row_span']['es-cl'] = "Distancia entre filas"; +$text['label-dashboard_row_span']['es-mx'] = "Distancia entre filas"; +$text['label-dashboard_row_span']['fr-ca'] = "Portée des lignes"; +$text['label-dashboard_row_span']['fr-fr'] = "Portée des lignes"; +$text['label-dashboard_row_span']['he-il'] = "טווח שורה"; +$text['label-dashboard_row_span']['it-it'] = "Intervallo di riga"; +$text['label-dashboard_row_span']['nl-nl'] = "Rij-spanwijdte"; +$text['label-dashboard_row_span']['pl-pl'] = "Rozpiętość wierszy"; +$text['label-dashboard_row_span']['pt-br'] = "Expansão de linha"; +$text['label-dashboard_row_span']['pt-pt'] = "Expansão de linha"; +$text['label-dashboard_row_span']['ro-ro'] = "Row Span"; +$text['label-dashboard_row_span']['ru-ru'] = "Диапазон строк"; +$text['label-dashboard_row_span']['sv-se'] = "Radspann"; +$text['label-dashboard_row_span']['uk-ua'] = "Radspann"; +$text['label-dashboard_row_span']['tr-tr'] = "Satır Aralığı"; +$text['label-dashboard_row_span']['zh-cn'] = "行跨度"; +$text['label-dashboard_row_span']['ja-jp'] = "行スパン"; +$text['label-dashboard_row_span']['ko-kr'] = "행 범위"; $text['description-dashboard_row_span']['en-us'] = "Enter the dashboard widget row span."; $text['description-dashboard_row_span']['en-gb'] = "Enter the dashboard widget row span."; -$text['description-dashboard_row_span']['ar-eg'] = ""; -$text['description-dashboard_row_span']['de-at'] = ""; -$text['description-dashboard_row_span']['de-ch'] = ""; -$text['description-dashboard_row_span']['de-de'] = ""; -$text['description-dashboard_row_span']['el-gr'] = ""; -$text['description-dashboard_row_span']['es-cl'] = ""; -$text['description-dashboard_row_span']['es-mx'] = ""; -$text['description-dashboard_row_span']['fr-ca'] = ""; -$text['description-dashboard_row_span']['fr-fr'] = ""; -$text['description-dashboard_row_span']['he-il'] = ""; -$text['description-dashboard_row_span']['it-it'] = ""; -$text['description-dashboard_row_span']['nl-nl'] = ""; -$text['description-dashboard_row_span']['pl-pl'] = ""; -$text['description-dashboard_row_span']['pt-br'] = ""; -$text['description-dashboard_row_span']['pt-pt'] = ""; -$text['description-dashboard_row_span']['ro-ro'] = ""; -$text['description-dashboard_row_span']['ru-ru'] = ""; -$text['description-dashboard_row_span']['sv-se'] = ""; -$text['description-dashboard_row_span']['uk-ua'] = ""; -$text['description-dashboard_row_span']['tr-tr'] = ""; -$text['description-dashboard_row_span']['zh-cn'] = ""; -$text['description-dashboard_row_span']['ja-jp'] = ""; -$text['description-dashboard_row_span']['ko-kr'] = ""; +$text['description-dashboard_row_span']['ar-eg'] = "أدخل نطاق صف أداة لوحة المعلومات."; +$text['description-dashboard_row_span']['de-at'] = "Geben Sie die Zeilenspanne des Dashboard-Widgets ein."; +$text['description-dashboard_row_span']['de-ch'] = "Geben Sie die Zeilenspanne des Dashboard-Widgets ein."; +$text['description-dashboard_row_span']['de-de'] = "Geben Sie die Zeilenspanne des Dashboard-Widgets ein."; +$text['description-dashboard_row_span']['el-gr'] = "Εισαγάγετε το εύρος της γραμμής του γραφικού στοιχείου του πίνακα εργαλείων."; +$text['description-dashboard_row_span']['es-cl'] = "Ingrese el intervalo de filas del widget del panel."; +$text['description-dashboard_row_span']['es-mx'] = "Ingrese el intervalo de filas del widget del panel."; +$text['description-dashboard_row_span']['fr-ca'] = "Entrez l'étendue des lignes du widget du tableau de bord."; +$text['description-dashboard_row_span']['fr-fr'] = "Entrez l'étendue des lignes du widget du tableau de bord."; +$text['description-dashboard_row_span']['he-il'] = "הזן את טווח שורות הווידג'ט של לוח המחוונים."; +$text['description-dashboard_row_span']['it-it'] = "Inserisci l'intervallo di righe del widget del dashboard."; +$text['description-dashboard_row_span']['nl-nl'] = "Voer de rijreeks van de dashboardwidget in."; +$text['description-dashboard_row_span']['pl-pl'] = "Insira a extensão da linha do widget do painel."; +$text['description-dashboard_row_span']['pt-br'] = "Insira a extensão da linha do widget do painel."; +$text['description-dashboard_row_span']['pt-pt'] = "Insira a extensão da linha do widget do painel."; +$text['description-dashboard_row_span']['ro-ro'] = "Introduceți intervalul de rânduri widget din tabloul de bord."; +$text['description-dashboard_row_span']['ru-ru'] = "Введите диапазон строк виджета информационной панели."; +$text['description-dashboard_row_span']['sv-se'] = "Ange radspann för instrumentpanelens widget."; +$text['description-dashboard_row_span']['uk-ua'] = "Введіть діапазон рядків віджета інформаційної панелі."; +$text['description-dashboard_row_span']['tr-tr'] = "Kontrol paneli widget'ı satır aralığını girin."; +$text['description-dashboard_row_span']['zh-cn'] = "输入仪表板小部件行跨度。"; +$text['description-dashboard_row_span']['ja-jp'] = "ダッシュボード ウィジェットの行範囲を入力します。"; +$text['description-dashboard_row_span']['ko-kr'] = "대시보드 위젯 행 범위를 입력합니다."; $text['label-dashboard_details_state']['en-us'] = "Details State"; $text['label-dashboard_details_state']['en-gb'] = "Details State"; diff --git a/core/dashboard/dashboard_edit.php b/core/dashboard/dashboard_edit.php index a93c9b1e55..830323ce35 100644 --- a/core/dashboard/dashboard_edit.php +++ b/core/dashboard/dashboard_edit.php @@ -42,8 +42,12 @@ //set the defaults $dashboard_name = ''; $dashboard_path = 'core/dashboard/resources/dashboard/icon.php'; - $dashboard_url = ''; +// $dashboard_path = ''; $dashboard_icon = ''; + $dashboard_url = ''; + $dashboard_target = 'self'; + $dashboard_content = ''; + $dashboard_content_details = ''; $dashboard_heading_text_color = ''; $dashboard_heading_background_color = ''; $dashboard_number_text_color = ''; @@ -72,6 +76,9 @@ $dashboard_path = $_POST["dashboard_path"] ?? ''; $dashboard_icon = $_POST["dashboard_icon"] ?? ''; $dashboard_url = $_POST["dashboard_url"] ?? ''; + $dashboard_target = $_POST["dashboard_target"] ?? 'self'; + $dashboard_content = $_POST["dashboard_content"] ?? ''; + $dashboard_content_details = $_POST["dashboard_content_details"] ?? ''; $dashboard_groups = $_POST["dashboard_groups"] ?? ''; $dashboard_chart_type = $_POST["dashboard_chart_type"] ?? ''; $dashboard_heading_text_color = $_POST["dashboard_heading_text_color"] ?? ''; @@ -204,6 +211,9 @@ $array['dashboard'][0]['dashboard_path'] = $dashboard_path; $array['dashboard'][0]['dashboard_icon'] = $dashboard_icon; $array['dashboard'][0]['dashboard_url'] = $dashboard_url; + $array['dashboard'][0]['dashboard_target'] = $dashboard_target; + $array['dashboard'][0]['dashboard_content'] = $dashboard_content; + $array['dashboard'][0]['dashboard_content_details'] = $dashboard_content_details; $array['dashboard'][0]['dashboard_chart_type'] = $dashboard_chart_type; $array['dashboard'][0]['dashboard_heading_text_color'] = $dashboard_heading_text_color; $array['dashboard'][0]['dashboard_heading_background_color'] = $dashboard_heading_background_color; @@ -226,7 +236,7 @@ } } } -//view_array($array); + //save the data $database = new database; $database->app_name = 'dashboard'; @@ -258,6 +268,9 @@ $sql .= " dashboard_path, "; $sql .= " dashboard_icon, "; $sql .= " dashboard_url, "; + $sql .= " dashboard_target, "; + $sql .= " dashboard_content, "; + $sql .= " dashboard_content_details, "; $sql .= " dashboard_chart_type, "; $sql .= " dashboard_heading_text_color, "; $sql .= " dashboard_heading_background_color, "; @@ -280,6 +293,9 @@ $dashboard_path = $row["dashboard_path"]; $dashboard_icon = $row["dashboard_icon"]; $dashboard_url = $row["dashboard_url"]; + $dashboard_target = $row["dashboard_target"]; + $dashboard_content = $row["dashboard_content"]; + $dashboard_content_details = $row["dashboard_content_details"]; $dashboard_chart_type = $row["dashboard_chart_type"]; $dashboard_heading_text_color = $row["dashboard_heading_text_color"]; $dashboard_heading_background_color = $row["dashboard_heading_background_color"]; @@ -387,8 +403,26 @@ } } +// adjust form by type entered + echo "\n"; + //show the content - echo "
\n"; + echo "\n"; echo "\n"; echo "
\n"; @@ -423,11 +457,11 @@ echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo " "; - echo " "; - echo " "; + echo " "; + echo " "; + echo " "; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } - else { - echo " "; + + if ( + $action == "add" || + $dashboard_path == "core/dashboard/resources/dashboard/content.php" + ) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + if ( + $action == "add" || + $dashboard_path == "core/dashboard/resources/dashboard/content.php" || + $dashboard_path == "core/dashboard/resources/dashboard/icon.php" + ) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } - echo " "; - echo " "; echo "\n"; echo "\n"; echo "\n"; - if ($dashboard_path == "app/voicemails/resources/dashboard/voicemails.php" || + if ( + $action == "add" || + $dashboard_path == "app/voicemails/resources/dashboard/voicemails.php" || $dashboard_path == "app/xml_cdr/resources/dashboard/missed_calls.php" || $dashboard_path == "app/xml_cdr/resources/dashboard/recent_calls.php" || $dashboard_path == "app/system/resources/dashboard/system_status.php" || @@ -553,25 +641,16 @@ $dashboard_path == "app/call_forward/resources/dashboard/call_forward.php" || $dashboard_path == "app/ring_groups/resources/dashboard/ring_group_forward.php" || $dashboard_path == "app/extensions/resources/dashboard/caller_id.php" || - $dashboard_path == "app/maintenance/resources/dashboard/maintenance.php") { - echo "\n"; + $dashboard_path == "app/maintenance/resources/dashboard/maintenance.php" + ) { + echo "\n"; echo "\n"; echo "\n"; echo "
\n"; + echo "\n"; echo $text['label-dashboard_name'] ?? ''; echo "\n"; echo "\n"; + echo "\n"; echo " \n"; echo "
\n"; echo $text['description-dashboard_name']."\n"; @@ -439,66 +473,118 @@ echo " ".$text['label-dashboard_path']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-dashboard_path']."\n"; echo "
\n"; - echo " ".$text['label-link']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-dashboard_url'] ?? ''; - echo "\n"; - echo "
".$text['label-icon'].""; - if (file_exists($_SERVER["PROJECT_ROOT"].'/resources/fontawesome/fas_icons.php')) { - include 'resources/fontawesome/fas_icons.php'; - if (is_array($font_awesome_solid_icons) && @sizeof($font_awesome_solid_icons) != 0) { - // rebuild and sort array - foreach ($font_awesome_solid_icons as $i => $icon_class) { - $icon_label = str_replace('fa-', '', $icon_class); - $icon_label = str_replace('-', ' ', $icon_label); - $icon_label = ucwords($icon_label); - $icons[$icon_class] = $icon_label; + if ( + $action == "add" || + $dashboard_path == "core/dashboard/resources/dashboard/icon.php" + ) { + echo "
".$text['label-icon'].""; + if (file_exists($_SERVER["PROJECT_ROOT"].'/resources/fontawesome/fas_icons.php')) { + include 'resources/fontawesome/fas_icons.php'; + if (is_array($font_awesome_solid_icons) && @sizeof($font_awesome_solid_icons) != 0) { + // rebuild and sort array + foreach ($font_awesome_solid_icons as $i => $icon_class) { + $icon_label = str_replace('fa-', '', $icon_class); + $icon_label = str_replace('-', ' ', $icon_label); + $icon_label = ucwords($icon_label); + $icons[$icon_class] = $icon_label; + } + asort($icons, SORT_STRING); + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo " "; + echo "
\n"; + echo ""; } - asort($icons, SORT_STRING); - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
\n"; - echo ""; } + else { + echo " "; + } + echo "
\n"; + echo " ".$text['label-link']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_url'] ?? ''; + echo "\n"; + echo "
\n"; + echo " ".$text['label-content']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_content']."\n"; + echo "
\n"; + echo " ".$text['label-details']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_content_details']."\n"; + echo "
\n"; @@ -542,7 +628,9 @@ echo "
\n"; echo $text['label-dashboard_chart_type']."\n"; echo "\n"; echo " \n"; echo "
\n"; echo $text['description-dashboard_chart_type']."\n"; @@ -665,7 +744,7 @@ echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo $text['description-dashboard_details_state']."\n"; @@ -799,4 +858,4 @@ //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/core/dashboard/index.php b/core/dashboard/index.php index af2ab61d37..f34ec18318 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -59,7 +59,7 @@ //build a list of groups the user is a member of to be used in a SQL in if (is_array($_SESSION['user']['groups'])) { - foreach($_SESSION['user']['groups'] as $group) { + foreach ($_SESSION['user']['groups'] as $group) { $group_uuids[] = $group['group_uuid']; } } @@ -68,32 +68,35 @@ } //get the list - $sql = "select \n"; - $sql .= "dashboard_uuid, \n"; - $sql .= "dashboard_name, \n"; - $sql .= "dashboard_path, \n"; - $sql .= "dashboard_url, \n"; - $sql .= "dashboard_icon, \n"; - $sql .= "dashboard_chart_type, \n"; - $sql .= "dashboard_heading_text_color, \n"; - $sql .= "dashboard_heading_background_color, \n"; - $sql .= "dashboard_number_text_color, \n"; - $sql .= "dashboard_background_color, \n"; - $sql .= "dashboard_detail_background_color, \n"; - $sql .= "dashboard_column_span, \n"; - $sql .= "dashboard_row_span, \n"; - $sql .= "dashboard_details_state, \n"; - $sql .= "dashboard_order, \n"; - $sql .= "cast(dashboard_enabled as text), \n"; - $sql .= "dashboard_description \n"; - $sql .= "from v_dashboard as d \n"; - $sql .= "where dashboard_enabled = 'true' \n"; - $sql .= "and dashboard_uuid in (\n"; - $sql .= " select dashboard_uuid from v_dashboard_groups where group_uuid in (\n"; - $sql .= " ".$group_uuids_in." \n"; - $sql .= " )\n"; - $sql .= ")\n"; - $sql .= "order by dashboard_order asc \n"; + $sql = "select "; + $sql .= "dashboard_uuid, "; + $sql .= "dashboard_name, "; + $sql .= "dashboard_path, "; + $sql .= "dashboard_icon, "; + $sql .= "dashboard_url, "; + $sql .= "dashboard_target, "; + $sql .= "dashboard_content, "; + $sql .= "dashboard_content_details, "; + $sql .= "dashboard_chart_type, "; + $sql .= "dashboard_heading_text_color, "; + $sql .= "dashboard_heading_background_color, "; + $sql .= "dashboard_number_text_color, "; + $sql .= "dashboard_background_color, "; + $sql .= "dashboard_detail_background_color, "; + $sql .= "dashboard_column_span, "; + $sql .= "dashboard_row_span, "; + $sql .= "dashboard_details_state, "; + $sql .= "dashboard_order, "; + $sql .= "cast(dashboard_enabled as text), "; + $sql .= "dashboard_description "; + $sql .= "from v_dashboard as d "; + $sql .= "where dashboard_enabled = 'true' "; + $sql .= "and dashboard_uuid in ("; + $sql .= " select dashboard_uuid from v_dashboard_groups where group_uuid in ("; + $sql .= " ".$group_uuids_in." "; + $sql .= " )"; + $sql .= ")"; + $sql .= "order by dashboard_order asc "; $database = new database; $dashboard = $database->select($sql, $parameters ?? null, 'all'); unset($sql, $parameters); @@ -105,15 +108,17 @@ $widgets = explode(",", $_POST["widget_order"]); $dashboard_order = '0'; $x = 0; - foreach($widgets as $widget) { - foreach($dashboard as $row) { - $dashboard_name = strtolower($row['dashboard_name']); - $dashboard_name = str_replace(" ", "_", $dashboard_name); + foreach ($widgets as $widget) { + foreach ($dashboard as $row) { + $dashboard_name = trim(preg_replace("/[^a-z]/", '_', strtolower($row['dashboard_name'])),'_'); if ($widget == $dashboard_name) { $dashboard_order = $dashboard_order + 10; $array['dashboard'][$x]['dashboard_name'] = $row['dashboard_name']; - $array['dashboard'][$x]['dashboard_url'] = $row['dashboard_url']; $array['dashboard'][$x]['dashboard_icon'] = $row['dashboard_icon']; + $array['dashboard'][$x]['dashboard_url'] = $row['dashboard_url']; + $array['dashboard'][$x]['dashboard_content'] = $row['dashboard_content']; + $array['dashboard'][$x]['dashboard_content_details'] = $row['dashboard_content_details']; + $array['dashboard'][$x]['dashboard_target'] = $row['dashboard_target']; $array['dashboard'][$x]['dashboard_uuid'] = $row['dashboard_uuid']; $array['dashboard'][$x]['dashboard_order'] = $dashboard_order; $x++; @@ -236,59 +241,66 @@ div.hud_chart { /* Dashboard settings */ /* Screen smaller than 575px? 1 columns */ @@ -296,8 +308,8 @@ div.hud_chart { .widgets { grid-template-columns: repeat(1, minmax(100px, 1fr)); } .col-num { grid-column: span 1; } \n"; $x = 0; - foreach($dashboard as $row) { + foreach ($dashboard as $row) { $dashboard_name = $row['dashboard_name']; $dashboard_icon = $row['dashboard_icon'] ?? ''; $dashboard_url = $row['dashboard_url'] ?? ''; + $dashboard_target = $row['dashboard_target'] ?? ''; + $dashboard_content = $row['dashboard_content'] ?? ''; + $dashboard_content_details = $row['dashboard_content_details'] ?? ''; $dashboard_chart_type = $row['dashboard_chart_type']; $dashboard_heading_text_color = $row['dashboard_heading_text_color'] ?? $settings->get('theme', 'dashboard_heading_text_color'); $dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color'); @@ -413,8 +429,8 @@ function toggle_grid_row_end(dashboard_name) { $dashboard_row_span = 1; } - echo "
\n"; - include($row['dashboard_path']); + echo "
\n"; + include $row['dashboard_path']; echo "
\n"; $x++; } @@ -519,4 +535,4 @@ function toggle_grid_row_end(dashboard_name) { //show the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/core/dashboard/resources/dashboard/content.php b/core/dashboard/resources/dashboard/content.php new file mode 100644 index 0000000000..8035c9fb11 --- /dev/null +++ b/core/dashboard/resources/dashboard/content.php @@ -0,0 +1,26 @@ +get($_SESSION['domain']['language']['code'], 'core/dashboard'); + +//dashboard icon + echo "
\n"; + + echo "
\n"; + echo " ".escape($dashboard_name).""; + echo " ".str_replace("\r", '
', escape($dashboard_content))."
\n"; + echo "
\n"; + + if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { + echo "
".str_replace("\r", '
', escape($dashboard_content_details))."
\n"; + } + + echo ""; + echo "
\n"; + +?> \ No newline at end of file diff --git a/core/dashboard/resources/dashboard/icon.php b/core/dashboard/resources/dashboard/icon.php index 7e172cfaf2..9c84d114cc 100644 --- a/core/dashboard/resources/dashboard/icon.php +++ b/core/dashboard/resources/dashboard/icon.php @@ -11,25 +11,16 @@ //dashboard icon echo "
\n"; - echo "
\n"; - echo " ".$dashboard_name.""; // (isset($text['label-'.$dashboard_name])) ? $text['label-'.$dashboard_name] : $dashboard_name - echo " \n"; + echo "
\n"; + echo " ".escape($dashboard_name).""; + echo " \n"; echo "
\n"; if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { - echo "
"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "  \n"; - echo "
\n"; - //echo "".$text['label-view_all']."\n"; - echo "
"; - //$n++; + echo "
".str_replace("\r", '
', escape($dashboard_content_details))."
\n"; } echo ""; echo "
\n"; -?> +?> \ No newline at end of file diff --git a/resources/app_languages.php b/resources/app_languages.php index a81837cbdf..cddcd2adda 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -5481,6 +5481,83 @@ $text['label-link']['zh-cn'] = "链接"; $text['label-link']['ja-jp'] = "リンク"; $text['label-link']['ko-kr'] = "링크"; +$text['label-target']['en-us'] = "Target"; +$text['label-target']['en-gb'] = "Target"; +$text['label-target']['ar-eg'] = "هدف"; +$text['label-target']['de-at'] = "Ziel"; +$text['label-target']['de-ch'] = "Ziel"; +$text['label-target']['de-de'] = "Ziel"; +$text['label-target']['el-gr'] = "Στόχος"; +$text['label-target']['es-cl'] = "Objetivo"; +$text['label-target']['es-mx'] = "Objetivo"; +$text['label-target']['fr-ca'] = "Cible"; +$text['label-target']['fr-fr'] = "Cible"; +$text['label-target']['he-il'] = "יַעַד"; +$text['label-target']['it-it'] = "Bersaglio"; +$text['label-target']['nl-nl'] = "Doel"; +$text['label-target']['pl-pl'] = "Cel"; +$text['label-target']['pt-br'] = "Alvo"; +$text['label-target']['pt-pt'] = "Alvo"; +$text['label-target']['ro-ro'] = "Ţintă"; +$text['label-target']['ru-ru'] = "Цель"; +$text['label-target']['sv-se'] = "Mål"; +$text['label-target']['uk-ua'] = "Цільова"; +$text['label-target']['zh-cn'] = "目标"; +$text['label-target']['ja-jp'] = "目標"; +$text['label-target']['ko-kr'] = "표적"; + +$text['label-current_window_tab']['en-us'] = "Current Window/Tab"; +$text['label-current_window_tab']['en-gb'] = "Current Window/Tab"; +$text['label-current_window_tab']['ar-eg'] = "النافذة أو علامة التبويب الحالية"; +$text['label-current_window_tab']['de-at'] = "Aktuelles Fenster oder Tab"; +$text['label-current_window_tab']['de-ch'] = "Aktuelles Fenster oder Tab"; +$text['label-current_window_tab']['de-de'] = "Aktuelles Fenster oder Tab"; +$text['label-current_window_tab']['el-gr'] = "Τρέχον παράθυρο ή καρτέλα"; +$text['label-current_window_tab']['es-cl'] = "Ventana o pestaña actual"; +$text['label-current_window_tab']['es-mx'] = "Ventana o pestaña actual"; +$text['label-current_window_tab']['fr-ca'] = "Fenêtre ou onglet actuel"; +$text['label-current_window_tab']['fr-fr'] = "Fenêtre ou onglet actuel"; +$text['label-current_window_tab']['he-il'] = "חלון או כרטיסייה נוכחיים"; +$text['label-current_window_tab']['it-it'] = "Finestra o scheda corrente"; +$text['label-current_window_tab']['nl-nl'] = "Huidig ​​venster of tabblad"; +$text['label-current_window_tab']['pl-pl'] = "Bieżące okno lub karta"; +$text['label-current_window_tab']['pt-br'] = "Janela ou guia atual"; +$text['label-current_window_tab']['pt-pt'] = "Janela ou guia atual"; +$text['label-current_window_tab']['ro-ro'] = "Fereastra sau fila curentă"; +$text['label-current_window_tab']['ru-ru'] = "Текущее окно или вкладка"; +$text['label-current_window_tab']['sv-se'] = "Aktuellt fönster eller flik"; +$text['label-current_window_tab']['uk-ua'] = "Поточне вікно або вкладка"; +$text['label-current_window_tab']['tr-tr'] = "Geçerli Pencere veya Sekme"; +$text['label-current_window_tab']['zh-cn'] = "当前窗口或选项卡"; +$text['label-current_window_tab']['ja-jp'] = "現在のウィンドウまたはタブ"; +$text['label-current_window_tab']['ko-kr'] = "현재 창 또는 탭"; + +$text['label-new_window_tab']['en-us'] = "New Window/Tab"; +$text['label-new_window_tab']['en-gb'] = "New Window/Tab"; +$text['label-new_window_tab']['ar-eg'] = "نافذة أو علامة تبويب جديدة"; +$text['label-new_window_tab']['de-at'] = "Neues Fenster oder neuer Tab"; +$text['label-new_window_tab']['de-ch'] = "Neues Fenster oder neuer Tab"; +$text['label-new_window_tab']['de-de'] = "Neues Fenster oder neuer Tab"; +$text['label-new_window_tab']['el-gr'] = "Νέο παράθυρο ή καρτέλα"; +$text['label-new_window_tab']['es-cl'] = "Nueva ventana o pestaña"; +$text['label-new_window_tab']['es-mx'] = "Nueva ventana o pestaña"; +$text['label-new_window_tab']['fr-ca'] = "Nouvelle fenêtre ou onglet"; +$text['label-new_window_tab']['fr-fr'] = "Nouvelle fenêtre ou onglet"; +$text['label-new_window_tab']['he-il'] = "חלון חדש או כרטיסייה"; +$text['label-new_window_tab']['it-it'] = "Nuova finestra o scheda"; +$text['label-new_window_tab']['nl-nl'] = "Nieuw venster of tabblad"; +$text['label-new_window_tab']['pl-pl'] = "Nowe okno lub karta"; +$text['label-new_window_tab']['pt-br'] = "Nova janela ou guia"; +$text['label-new_window_tab']['pt-pt'] = "Nova janela ou guia"; +$text['label-new_window_tab']['ro-ro'] = "Fereastră sau filă nouă"; +$text['label-new_window_tab']['ru-ru'] = "Новое окно или вкладка"; +$text['label-new_window_tab']['sv-se'] = "Nytt fönster eller flik"; +$text['label-new_window_tab']['uk-ua'] = "Нове вікно або вкладка"; +$text['label-new_window_tab']['tr-tr'] = "Yeni Pencere veya Sekme"; +$text['label-new_window_tab']['zh-cn'] = "新窗口或标签页"; +$text['label-new_window_tab']['ja-jp'] = "新しいウィンドウまたはタブ"; +$text['label-new_window_tab']['ko-kr'] = "새 창 또는 탭"; + $text['label-icon']['en-us'] = "Icon"; $text['label-icon']['en-gb'] = "Icon"; $text['label-icon']['ar-eg'] = "أيقونة"; @@ -6384,4 +6461,55 @@ $text['button-hide']['zh-cn'] = "隐藏"; $text['button-hide']['ja-jp'] = "隠れる"; $text['button-hide']['ko-kr'] = "숨다"; +$text['label-content']['en-us'] = 'Content'; +$text['label-content']['en-gb'] = 'Content'; +$text['label-content']['ar-eg'] = 'محتوى'; +$text['label-content']['de-at'] = 'Inhalt'; +$text['label-content']['de-ch'] = 'Inhalt'; +$text['label-content']['de-de'] = 'Inhalt'; +$text['label-content']['el-gr'] = 'Περιεχόμενο'; +$text['label-content']['es-cl'] = 'Contenido'; +$text['label-content']['es-mx'] = 'Contenido'; +$text['label-content']['fr-ca'] = 'Contenu'; +$text['label-content']['fr-fr'] = 'Contenu'; +$text['label-content']['he-il'] = 'תוֹכֶן'; +$text['label-content']['it-it'] = 'Contenuto'; +$text['label-content']['nl-nl'] = 'Inhoud'; +$text['label-content']['pl-pl'] = 'Treść'; +$text['label-content']['pt-br'] = 'Contente'; +$text['label-content']['pt-pt'] = 'Contente'; +$text['label-content']['ro-ro'] = 'Conţinut'; +$text['label-content']['ru-ru'] = 'Содержание'; +$text['label-content']['sv-se'] = 'Innehåll'; +$text['label-content']['uk-ua'] = 'Зміст'; +$text['label-content']['tr-tr'] = 'İçerik'; +$text['label-content']['zh-cn'] = '内容'; +$text['label-content']['ja-jp'] = 'コンテンツ'; +$text['label-content']['ko-kr'] = '콘텐츠'; + +$text['label-details']['en-us'] = "Details"; +$text['label-details']['en-gb'] = "Details"; +$text['label-details']['ar-eg'] = "تفاصيل"; +$text['label-details']['de-at'] = "Details"; +$text['label-details']['de-ch'] = "Details"; +$text['label-details']['de-de'] = "Details"; +$text['label-details']['el-gr'] = "Λεπτομέριες"; +$text['label-details']['es-cl'] = "Detalles"; +$text['label-details']['es-mx'] = "Detalles"; +$text['label-details']['fr-ca'] = "Détails"; +$text['label-details']['fr-fr'] = "Détails"; +$text['label-details']['he-il'] = "פרטים"; +$text['label-details']['it-it'] = "Dettagli"; +$text['label-details']['nl-nl'] = "Details"; +$text['label-details']['pl-pl'] = "Szczegóły"; +$text['label-details']['pt-br'] = "Detalhes"; +$text['label-details']['pt-pt'] = "Detalhes"; +$text['label-details']['ro-ro'] = "Detalii"; +$text['label-details']['ru-ru'] = "Детали"; +$text['label-details']['sv-se'] = "Detaljer"; +$text['label-details']['uk-ua'] = "Деталі"; +$text['label-details']['zh-cn'] = "详细情况"; +$text['label-details']['ja-jp'] = "インフォメーション"; +$text['label-details']['ko-kr'] = "제품 정보"; + ?> \ No newline at end of file