Ver código fonte

various style improvements

Olivier Massot 10 meses atrás
pai
commit
46697dfdb0

+ 65 - 34
components/Layout/Parameters/Table.vue

@@ -7,16 +7,6 @@ A data table for the parameters page
       <h4 v-if="title" class="align-self-center">
         {{ title }}
       </h4>
-      <div class="flex-grow-1" />
-
-      <v-btn
-        v-if="smAndUp && actions.includes(TABLE_ACTION.ADD)"
-        prepend-icon="fa fa-plus"
-        class="theme-neutral"
-        @click="emit('addClicked')"
-      >
-        {{ i18n.t('add') }}
-      </v-btn>
     </div>
 
     <v-table>
@@ -25,7 +15,7 @@ A data table for the parameters page
           <td v-for="col in columns">
             {{ col.label }}
           </td>
-          <td>{{ i18n.t('actions') }}</td>
+          <td></td>
         </tr>
       </thead>
       <tbody v-if="items">
@@ -40,22 +30,44 @@ A data table for the parameters page
             {{ item[col.property] }}
           </td>
 
-          <td class="d-flex flex-row actions-cell">
-            <slot name="actions" :item="item">
-              <v-btn
-                v-if="actions.includes(TABLE_ACTION.EDIT)"
-                :flat="true"
-                icon="fa fa-pen"
-                class="mr-3"
-                @click="emit('editClicked', item)"
-              />
-              <v-btn
-                v-if="actions.includes(TABLE_ACTION.DELETE)"
-                :flat="true"
-                icon="fas fa-trash"
-                @click="emit('deleteClicked', item)"
-              />
-            </slot>
+          <td class="d-flex flex-row justify-center actions-cell">
+            <v-menu
+              min-width="120"
+              location="end"
+              class="action-menu"
+            >
+              <template v-slot:activator="{ props }">
+                <v-btn
+                  v-if="actions.includes(TABLE_ACTION.EDIT) || actions.includes(TABLE_ACTION.DELETE)"
+                  v-bind="props"
+                  :flat="true"
+                  icon="fas fa-ellipsis-vertical"
+                />
+              </template>
+
+              <v-list>
+                <v-list-item
+                  v-if="actions.includes(TABLE_ACTION.EDIT)"
+                  @click="emit('editClicked', item)"
+                >
+                  <v-list-item-title>
+                    <v-icon>fas fa-pen</v-icon>
+                    {{ $t("edit") }}
+                  </v-list-item-title>
+                </v-list-item>
+
+                <v-list-item
+                  v-if="actions.includes(TABLE_ACTION.DELETE)"
+                  @click="emit('deleteClicked', item)"
+                  class="theme-danger"
+                >
+                  <v-list-item-title icon="fas fa-trash">
+                    <v-icon>fas fa-trash</v-icon>
+                    {{ $t("delete") }}
+                  </v-list-item-title>
+                </v-list-item>
+              </v-list>
+            </v-menu>
           </td>
         </tr>
       </tbody>
@@ -68,8 +80,7 @@ A data table for the parameters page
         </tr>
       </tbody>
     </v-table>
-
-    <div class="d-flex justify-end my-3" v-if="xs && actions.includes(TABLE_ACTION.ADD)">
+    <div v-if="actions.includes(TABLE_ACTION.ADD)" class="d-flex justify-center my-3">
       <v-btn
         prepend-icon="fa fa-plus"
         class="theme-neutral"
@@ -171,13 +182,11 @@ const columns: ComputedRef<Array<ColumnDefinition>> = computed(() => {
 .container {
   //max-width: 1000px;
   //margin: 0 auto;
+  display: inline-block;
+  min-width: 65%;
 }
 
-
-
 .v-table {
-  width: 100%;
-
   thead {
     color: rgb(var(--v-theme-neutral-strong));
     font-weight: 600;
@@ -191,6 +200,13 @@ const columns: ComputedRef<Array<ColumnDefinition>> = computed(() => {
     }
   }
 
+  :deep(tr:hover) {
+    .fa-ellipsis-vertical {
+      color: rgb(var(--v-theme-on-neutral-soft));
+      font-size: 20px;
+    }
+  }
+
   th, td {
     padding: 10px;
     text-align: left;
@@ -201,8 +217,23 @@ const columns: ComputedRef<Array<ColumnDefinition>> = computed(() => {
   }
 }
 
+.action-menu {
+  margin: 0 auto;
+
+  .v-list {
+    top: 24px;
+    padding: 0;
+  }
+
+  .v-icon {
+    opacity: 0.7;
+    font-size: 16px;
+    margin-right: 12px;
+  }
+}
+
 :deep(.actions-cell .v-icon) {
-  color: rgb(var(--v-theme-neutral-strong));
+  color: rgb(var(--v-theme-on-neutral));
   font-size: 18px;
 }
 </style>

+ 7 - 5
i18n/lang/fr.json

@@ -197,9 +197,10 @@
   "smsSenderName": "Personnaliser le nom de l'expéditeur SMS",
   "attendance": "Absences",
   "parameters_attendances_page": "Absences",
-  "attendanceBookingReason": "Motif d'absence / retard",
-  "attendanceBookingReasons": "Motifs d'absence / retard",
-  "new_attendance_booking_reason": "Nouveau motif d'absence / retard",
+  "alert_configuration": "Configuration des alertes",
+  "attendanceBookingReason": "Motif d'absence ou de retard",
+  "attendanceBookingReasons": "Motifs d'absence ou de retard",
+  "new_attendance_booking_reason": "Nouveau motif d'absence ou de retard",
   "reason": "Motif",
   "notifyAdministrationAbsence": "Prévenir l'administrateur en cas d'absences consécutives",
   "numberConsecutiveAbsences": "Nombre d'absences consécutives",
@@ -495,6 +496,7 @@
   "advanced_modification": "Administration site internet",
   "simple_modification": "Modifications simplifiées",
   "create": "Créer",
+  "edit": "Modifier",
   "help_access": "Accès aide",
   "configuration": "Configuration",
   "organization_page": "Fiche de la structure",
@@ -653,8 +655,8 @@
   "parameters_super_admin_page": "Compte super-admin",
   "super_admin_breadcrumbs": "Compte super-admin",
   "an_error_happened": "Une erreur s'est produite",
-  "your_opentalent_website": "Votre site web",
-  "your_opentalent_website_address_is": "L'adresse de votre site Opentalent est",
+  "your_website": "Votre site web",
+  "your_website_address_is": "L'adresse de votre site internet est",
   "record_a_new_subdomain": "Enregistrer un nouveau sous-domaine",
   "your_subdomains": "Vos sous-domaines",
   "other_website": "Autre site internet",

+ 5 - 1
pages/parameters/attendances.vue

@@ -2,7 +2,11 @@
   <h3>{{ $t("parameters_attendances_page")}}</h3>
 
   <LayoutContainer>
-    <div v-if="organizationProfile.isSchool">
+    <div
+      v-if="organizationProfile.isSchool"
+      class="mt-6"
+    >
+      <h4>{{ $t("alert_configuration") }}</h4>
       <UiLoadingPanel v-if="pending" />
       <UiForm
         v-else-if="parameters !== null"

+ 3 - 2
pages/parameters/intranet.vue

@@ -9,7 +9,8 @@
     >
       <v-row>
         <v-col cols="12">
-          <h3>{{ $t('teachers')}}</h3>
+          <h3 class="mb-4">{{ $t('teachers')}}</h3>
+
           <UiInputCheckbox
             v-model="parameters.createCourse"
             field="createCourse"
@@ -34,7 +35,7 @@
             label="allow_teachers_to_generate_attendance_reports"
           />
 
-          <h3>{{ $t('pupils-members')}}</h3>
+          <h3 class="mt-3 mb-4">{{ $t('pupils-members')}}</h3>
           <UiInputCheckbox
             v-model="parameters.administrationCc"
             field="administrationCc"

+ 15 - 13
pages/parameters/website.vue

@@ -11,12 +11,12 @@
       <v-row>
         <v-col cols="12">
           <h4 class="flex-grow-1 align-self-center">
-            {{ $t('your_opentalent_website') }}
+            {{ $t('your_website') }}
           </h4>
 
           <div class="section-header">
             <div class="flex-grow-1 align-self-center">
-              <span>{{ $t('your_opentalent_website_address_is') }} : </span>
+              <span>{{ $t('your_website_address_is') }} : </span>
               <strong class="ml-2">
                 <a :href="organizationProfile.website ?? '#'" target="_blank">
                   {{ organizationProfile.website }}
@@ -25,7 +25,17 @@
             </div>
           </div>
 
-          <div v-if="!organizationProfile.isCmf" class="my-6">
+          <!-- les publicationDirectors sont des entités Access -->
+          <UiInputAutocompleteAccesses
+            v-if="!parameters.desactivateOpentalentSiteWeb"
+            v-model="parameters.publicationDirectors"
+            field="publicationDirectors"
+            multiple
+            chips
+            class="my-4"
+          />
+
+          <div v-if="!organizationProfile.isCmf" class="mt-3 mb-12">
             <v-btn
               v-if="!parameters.desactivateOpentalentSiteWeb"
               color="error"
@@ -68,16 +78,7 @@
             </LazyLayoutDialog>
           </div>
 
-          <!-- les publicationDirectors sont des entités Access -->
-          <UiInputAutocompleteAccesses
-            v-model="parameters.publicationDirectors"
-            field="publicationDirectors"
-            multiple
-            chips
-            class="my-4"
-          />
-
-          <div class="mb-6">
+          <div v-if="!parameters.desactivateOpentalentSiteWeb" class="mb-6">
             <div class="section-header">
               <h4 class="flex-grow-1 align-self-center">
                 {{ $t('your_subdomains') }}
@@ -114,6 +115,7 @@
               <div>
                 <v-btn
                   :disabled="!canAddNewSubdomain"
+                  prepend-icon="fa-solid fa-plus"
                   class="my-5"
                   @click="onAddSubdomainClick"
                 >