diff --git a/admin/survey/classes/class.Common.php b/admin/survey/classes/class.Common.php index 09b4e6dc6..a8644bdd1 100644 --- a/admin/survey/classes/class.Common.php +++ b/admin/survey/classes/class.Common.php @@ -2129,7 +2129,7 @@ class Common { } // Izpise obvestilo, da ni podatkov - static function noDataAlert() { + static function noDataAlert($location='') { global $lang; global $anketa; @@ -2137,20 +2137,43 @@ class Common { echo ''; - echo '

'.$lang['srv_data_no_data'].'

'; + if($location == 'status') { + echo '

'.$lang['srv_dashboard_no_data'].'

'; + } + else { + echo '

'.$lang['srv_data_no_data'].'

'; + } echo '
'; - echo '

'.$lang['srv_data_no_data2'].'

'; + if($location == 'status') { + echo '

'.$lang['srv_data_no_data3'].'

'; + } + else { + echo '

'.$lang['srv_data_no_data2'].'

'; + } echo '
'; - $auto = 'index.php?anketa='.$anketa.'&a=testiranje&m=testnipodatki'; - $manual = SurveyInfo::getSurveyLink() . '?preview=on&testdata=on'; - $share = 'index.php?anketa='.$anketa.'&a=vabila'; + if($location == 'status') { + $buttonA = 'index.php?anketa='.$anketa.'&a=branching'; //urejanje + $buttonB = 'index.php?anketa='.$anketa.'&a=testiranje'; //testiranje + $textA = $lang['edit2']; + $textB = $lang['srv_testiranje']; + $textC = $lang['srv_vabila']; + } + else { + $buttonA = 'index.php?anketa='.$anketa.'&a=testiranje&m=testnipodatki'; //avtomatski testni vnos + $buttonB = SurveyInfo::getSurveyLink() . '?preview=on&testdata=on'; //ročni testni vnos + $textA = $lang['srv_testiranje_vnosi2']; + $textB = $lang['srv_archive_test_data_text2a']; + $textC = $lang['srv_anketa_share']; + } + + $buttonC = 'index.php?anketa='.$anketa.'&a=vabila'; //objava echo '
'; - echo ' '; - echo ' '; - echo ' '; + echo ' '; + echo ' '; + echo ' '; echo '
'; echo ''; diff --git a/admin/survey/classes/class.SurveyStatistic.php b/admin/survey/classes/class.SurveyStatistic.php index 5ad615551..10e846046 100644 --- a/admin/survey/classes/class.SurveyStatistic.php +++ b/admin/survey/classes/class.SurveyStatistic.php @@ -812,6 +812,10 @@ class SurveyStatistic { echo '
'; $this->DisplayInfoView(); echo '
'; + + echo '
'; + Common::noDataAlert('status'); + echo '
'; } // imamo vnose, prikažemo statistiko else { diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php index 76b765e14..f2139e11e 100644 --- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php +++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php @@ -187,7 +187,6 @@ class SurveyAnalysis { if ( self::$dataFileStatus == FILE_STATUS_NO_DATA || self::$dataFileStatus == FILE_STATUS_SRV_DELETED) { if (self::$podstran != M_ANALYSIS_ARCHIVE) Common::noDataAlert(); - return false; } diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyChart.php b/admin/survey/classes/surveyAnalysis/class.SurveyChart.php index 4f60a4700..c4dc40189 100644 --- a/admin/survey/classes/surveyAnalysis/class.SurveyChart.php +++ b/admin/survey/classes/surveyAnalysis/class.SurveyChart.php @@ -347,8 +347,17 @@ class SurveyChart { echo ''; + if (self::$dataFileStatus == FILE_STATUS_NO_DATA + || self::$dataFileStatus == FILE_STATUS_NO_FILE + || self::$dataFileStatus == FILE_STATUS_SRV_DELETED){ + + $noDataAlert ="noDataAlert"; + } else { + $noDataAlert =""; + } + if (self::$isArchive != true && self::$publicChart != true) { - self::displayBottomSettings(); + self::displayBottomSettings($noDataAlert); } @@ -7104,11 +7113,12 @@ class SurveyChart { } // Nastavitve na dnu - static function displayBottomSettings(){ + + static function displayBottomSettings($noDataAlert = ""){ global $site_path; global $lang; - echo '
'; + echo '
'; echo '
'; echo ' '.$lang['srv_custom_report_comments_add'].''; diff --git a/lang/1.php b/lang/1.php index ce3a7f6a6..43954e7f6 100644 --- a/lang/1.php +++ b/lang/1.php @@ -4314,6 +4314,7 @@ $lang = array ( "srv_dashboard_paradata_date_warning" => "Shranjevanje datumov odgovarjanja na vprašanja (parapodatki) je izklopljeno. Zato nekateri statusi ne bodo prikazani.", "srv_data_no_data" => "V bazi še ni podatkov o izpolnjenih anketah!", "srv_data_no_data2" => "Pridobite realne podatke in delite anketo s svojimi respondenti ali za vpogled v strani, ki za prikaz zahtevajo podatke uporabite testne podatke. ", + "srv_data_no_data3" => "Ker v bazi še ni enot, nekaterih informacij v zavihku 'Status' ni mogoče prikazati.", "srv_data_no_data_filtred" => "Ni podatkov.", "srv_diferencial2" => "Tabela diferencial", "srv_classic" => "Klasična tabela", diff --git a/lang/2.php b/lang/2.php index bf7d5de50..15ba00d22 100644 --- a/lang/2.php +++ b/lang/2.php @@ -4293,6 +4293,7 @@ $lang = array ( "srv_dashboard_paradata_date_warning" => "Saving respondent dates (paradata) is turned off. Some statuses will not be displayed.", "srv_data_no_data" => "There are no completed surveys yet!", "srv_data_no_data2" => "Get real data and share the survey with your respondents or use test data to see the pages that require data to be displayed.", + "srv_data_no_data3" => "As there are no units in the database yet, some information cannot be displayed in the 'Status' tab.", "srv_data_no_data_filtred" => "No data", "srv_diferencial2" => "Semantic differential", "srv_classic" => "Classic table", diff --git a/public/css/admin_new.css b/public/css/admin_new.css index e0b80af4b..a171a5c70 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -27102,6 +27102,46 @@ div.no_data_alert div#buttons button::first-letter { text-transform: uppercase; } +.analysis_bottom_settings.noDataAlert { + display: none; +} + +div.dashboard_box div.no_data_alert { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} +div.dashboard_box div.no_data_alert img { + width: 100%; + margin-bottom: 16px; +} +div.dashboard_box div.no_data_alert h2 { + font-weight: 300; + font-size: 24px; + margin-block-start: 0; + margin-block-end: 0; + margin-bottom: 16px; +} +div.dashboard_box div.no_data_alert div#note { + max-width: 800px; + margin-bottom: 32px; + text-align: center; +} +div.dashboard_box div.no_data_alert div#buttons { + display: flex; + flex-direction: row; + gap: 16px; +} +div.dashboard_box div.no_data_alert div#buttons button::first-letter { + text-transform: uppercase; +} +div.dashboard_box div.no_data_alert div#buttons button { + width: fit-content; + min-width: 0; +} + #div_analiza_data:not(.anal_arch) .div_analiza_holder, #div_means_data .div_analiza_holder, #div_break_data .div_analiza_holder, diff --git a/resources/sass/admin_new/pages/survey_data/no_data.scss b/resources/sass/admin_new/pages/survey_data/no_data.scss index 7ce4b35fe..433260d84 100644 --- a/resources/sass/admin_new/pages/survey_data/no_data.scss +++ b/resources/sass/admin_new/pages/survey_data/no_data.scss @@ -34,4 +34,58 @@ div.no_data_alert { text-transform: uppercase; } } +} + +//Skrijemo bottom nastavitve v grafih + +.analysis_bottom_settings.noDataAlert { + display: none; +} + +//Status +div.dashboard_box { + + div.no_data_alert { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + + img { + width: 100%; + margin-bottom: 16px; + } + + h2 { + font-weight: $light; + font-size: 24px; + margin-block-start: 0; + margin-block-end: 0; + + margin-bottom: 16px; + } + + div#note { + max-width: 800px; + margin-bottom: 32px; + text-align: center; + } + + div#buttons { + display: flex; + flex-direction: row; + gap: 16px; + + button::first-letter { + text-transform: uppercase; + } + + button { + width: fit-content; + min-width: 0; + } + } + } + } \ No newline at end of file