From 9beefd6b7ffe1803a4a26f2968e8043abcabf2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Mouni=C3=A9?= <robin.mounie@gmail.com> Date: Thu, 7 Jul 2022 09:54:07 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=A9parationInterfaceSetWeek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lang/en/local_notemyprogress.php | 2 +- .../lang/fr/local_notemyprogress.php | 2 +- notemyprogress/setweeks.php | 1 + notemyprogress/templates/setweeks.mustache | 70 ++++++++++++------- 4 files changed, 48 insertions(+), 27 deletions(-) diff --git a/notemyprogress/lang/en/local_notemyprogress.php b/notemyprogress/lang/en/local_notemyprogress.php index 1a02809..97f9f1b 100644 --- a/notemyprogress/lang/en/local_notemyprogress.php +++ b/notemyprogress/lang/en/local_notemyprogress.php @@ -116,7 +116,7 @@ $string['setweeks_save_warning_title'] = "Are you sure you want to save the chan $string['setweeks_save_warning_content'] = "If you change the configuration of weeks where the course has already started, data may be lost..."; $string['setweeks_confirm_ok'] = "Save"; $string['setweeks_confirm_cancel'] = "Cancel"; -$string['setweeks_error_empty_week'] = "You cannot save changes with an empty week. Please delete it and try again."; +$string['setweeks_error_empty_week'] = "You cannot save changes with an week without content. Please delete it and try again."; $string['setweeks_new_group_title'] = "New instance of configuration"; $string['setweeks_new_group_text'] = "We have detected that your course is finished, if you wish to set up the weeks to work with new students you need to activate the button below. This will separate the data of current students from previous courses, avoiding mixing them up. "; $string['setweeks_new_group_button_label'] = "Save the configuration as a new instance"; diff --git a/notemyprogress/lang/fr/local_notemyprogress.php b/notemyprogress/lang/fr/local_notemyprogress.php index beeef18..dc056c7 100644 --- a/notemyprogress/lang/fr/local_notemyprogress.php +++ b/notemyprogress/lang/fr/local_notemyprogress.php @@ -783,7 +783,7 @@ $string['setweeks_save_warning_title'] = "Êtes-vous sûr de vouloir sauvegarder $string['setweeks_save_warning_content'] = "Si vous modifiez la configuration des semaines alors que le cours a déjà commencé, il est possible que des données soient perdues..."; $string['setweeks_confirm_ok'] = "Sauvegarder"; $string['setweeks_confirm_cancel'] = "Annuler"; -$string['setweeks_error_empty_week'] = "Impossible de sauvegarder les changements avec une semaine vide. Veuillez l'effacer et réessayer."; +$string['setweeks_error_empty_week'] = "Impossible de sauvegarder les changements avec une semaine sans sections. Veuillez l'effacer et réessayer."; $string['setweeks_new_group_title'] = "Nouvelle instance de configuration"; $string['setweeks_new_group_text'] = "Nous avons détecté que votre cours est terminé, si vous souhaitez configurer les semaines pour travailler avec de nouveaux étudiants, vous devez activer le bouton ci-dessous. Cela vous permettra de séparer les données des étudiants actuels de celles des cours précédents, en évitant de les mélanger"; $string['setweeks_new_group_button_label'] = "Enregistrer configuration comme nouvelle instance"; diff --git a/notemyprogress/setweeks.php b/notemyprogress/setweeks.php index 28089c2..7069b36 100644 --- a/notemyprogress/setweeks.php +++ b/notemyprogress/setweeks.php @@ -80,6 +80,7 @@ $content = [ "helplabel" => get_string("helplabel","local_notemyprogress"), "exitbutton" => get_string("exitbutton","local_notemyprogress"), "title_conditions" => get_string("title_conditions","local_notemyprogress"), + "nothing"=>"something", ], 'sections' => $configweeks->get_sections_without_week(), 'userid' => $USER->id, diff --git a/notemyprogress/templates/setweeks.mustache b/notemyprogress/templates/setweeks.mustache index c496251..e4eb2dc 100644 --- a/notemyprogress/templates/setweeks.mustache +++ b/notemyprogress/templates/setweeks.mustache @@ -25,21 +25,35 @@ </v-layout> <v-layout column justify-center> - <span v-text="strings.title_conditions" class="notemyprogress-sub-title text-center"></span> - <ul class="ul-setting d-flex justify-center"> - <li class="li-setting"> - <span :class="['setting-icon',{'setting-valid' : settings.has_students}]"></span> - <span v-text="strings.requirements_has_users"></span> - </li> - <li class="li-setting mr-2 ml-2"> - <span :class="['setting-icon',{'setting-valid' : settings.course_start}]"></span> - <span v-text="strings.requirements_course_start"></span> - </li> - <li class="li-setting"> - <span :class="['setting-icon',{'setting-valid' : settings.weeks}]"></span> - <span v-text="strings.requirements_has_sections"></span> - </li> - </ul> + <v-row class="justify-content-center"> + <v-col cols="12" md="4" class="d-flex"> + <v-card class="flex d-flex pl-3"> + <v-icon v-if="settings.has_students" color="green" v-text="'mdi-check-circle'"></v-icon> + <v-icon v-else color="red" v-text="'mdi-information'"></v-icon> + <v-card-text class="text-left" style="align-self: center;"> + <p class="body-2 mb-0" v-text="strings.requirements_has_users"></p> + </v-card-text> + </v-card> + </v-col> + <v-col cols="12" md="4" class="d-flex"> + <v-card class="flex d-flex pl-3"> + <v-icon v-if="settings.course_start" color="green" v-text="'mdi-check-circle'"></v-icon> + <v-icon v-else color="red" v-text="'mdi-information'"></v-icon> + <v-card-text class="text-left" style="align-self: center;"> + <p class="body-2 mb-0" v-text="strings.requirements_course_start"></p> + </v-card-text> + </v-card> + </v-col> + <v-col cols="12" md="4" class="d-flex"> + <v-card class="flex d-flex pl-3"> + <v-icon v-if="settings.weeks" color="green" v-text="'mdi-check-circle'"></v-icon> + <v-icon v-else color="red" v-text="'mdi-information'"></v-icon> + <v-card-text class="text-left" style="align-self: center;"> + <p class="body-2 mb-0" v-text="strings.requirements_has_sections"></p> + </v-card-text> + </v-card> + </v-col> + </v-row> </v-layout> <v-divider></v-divider> @@ -73,16 +87,20 @@ <v-layout mb-3 mt-3> <v-flex row justify-space-around align-center> - <strong v-text="strings.start"></strong> - <datepicker - v-if="!week.removable" - v-model="weeks_started_at" - :use-utc="false" - :disabled-dates="disabled_dates" - :format="customFormatter" - :monday-first="true"> - </datepicker> + + <strong v-text=" strings.start"></strong> + <datepicker + class="blue lighten-4" + v-if="!week.removable" + v-model="weeks_started_at" + :use-utc="false" + :disabled-dates="disabled_dates" + :format="customFormatter" + :monday-first="true"> + </datepicker> <span v-else v-text="week.weekstart"></span> + <strong v-text="nothing"></strong> + </v-flex> <v-flex row justify-space-around align-center> @@ -93,7 +111,9 @@ <v-layout justify-space-between align-center class="hours-expected-selector"> <span v-text="strings.time_dedication" class="pr-5"></span> - <v-text-field type="number" min="0" max="99" outlined v-model="raw_weeks[index].hours_dedications"></v-text-field> + <v-row> + <v-text-field type="number" min="0" max="99" outlined v-model="raw_weeks[index].hours_dedications"></v-text-field> + </v-row> </v-layout> </template> </v-flex> -- GitLab