diff --git a/app/assets/javascripts/app.js b/app/assets/javascripts/app.js index ea94b5a12..f932fd84f 100644 --- a/app/assets/javascripts/app.js +++ b/app/assets/javascripts/app.js @@ -88,6 +88,8 @@ angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ui.rout $rootScope.fablabWithoutInvoices = Fablab.withoutInvoices; // Global config: if true, the phone number is required to create an account $rootScope.phoneRequired = Fablab.phoneRequired; + // Global config: if true, the events are shown in the admin calendar + $rootScope.eventsInCalendar = Fablab.eventsInCalendar; // Global function to allow the user to navigate to the previous screen (ie. $state). // If no previous $state were recorded, navigate to the home page diff --git a/app/assets/stylesheets/app.components.scss b/app/assets/stylesheets/app.components.scss index 4de6ebbc3..6a1659507 100644 --- a/app/assets/stylesheets/app.components.scss +++ b/app/assets/stylesheets/app.components.scss @@ -651,11 +651,24 @@ padding: 10px; text-transform: uppercase; } } +.calendar-legend-block { + text-align: right; + padding-right: 2em; -.calendar-legend { - border: 1px solid; - border-left: 3px solid; - border-radius: 3px; - font-size: 10px; - padding: 2px; -} \ No newline at end of file + h4 { + font-size: 12px; + font-style: italic; + } + .legends { + display: flex; + flex-direction: row-reverse; + } + .calendar-legend { + border: 1px solid; + border-left: 3px solid; + border-radius: 3px; + font-size: 10px; + padding: 2px; + margin-left: 10px; + } +} diff --git a/app/assets/stylesheets/app.layout.scss b/app/assets/stylesheets/app.layout.scss index 17aadf990..1c257746b 100644 --- a/app/assets/stylesheets/app.layout.scss +++ b/app/assets/stylesheets/app.layout.scss @@ -101,22 +101,6 @@ } } -.display-h { - display: flex; - flex-direction: row; - justify-content: space-evenly; - padding: 0; -} - -.display-v { - display: flex; - flex-direction: column; - justify-content: space-around; - align-self: baseline; - height: inherit; -} - - body.container{ padding: 0; } @@ -651,4 +635,4 @@ body.container{ position: absolute; left: -4px; } -} \ No newline at end of file +} diff --git a/app/assets/templates/admin/calendar/calendar.html.erb b/app/assets/templates/admin/calendar/calendar.html.erb index 42cbe4ea1..21366925d 100644 --- a/app/assets/templates/admin/calendar/calendar.html.erb +++ b/app/assets/templates/admin/calendar/calendar.html.erb @@ -12,15 +12,8 @@
-
-
- {{ 'admin_calendar.trainings' }}
- {{ 'admin_calendar.machines' }}
-
-
- {{ 'admin_calendar.spaces' }} - {{ 'admin_calendar.events' }} -
+
+
@@ -32,6 +25,15 @@
+
+

{{ 'admin_calendar.legend' }}

+
+ {{ 'admin_calendar.trainings' }}
+ {{ 'admin_calendar.machines' }}
+ {{ 'admin_calendar.spaces' }} + {{ 'admin_calendar.events' }} +
+
@@ -119,4 +121,4 @@
- \ No newline at end of file + diff --git a/app/views/application/index.html.erb b/app/views/application/index.html.erb index 65efb7dd1..b8885143e 100644 --- a/app/views/application/index.html.erb +++ b/app/views/application/index.html.erb @@ -21,6 +21,7 @@ Fablab.withoutOnlinePayment = ('<%= Rails.application.secrets.fablab_without_online_payments %>' === 'true'); Fablab.withoutInvoices = ('<%= Rails.application.secrets.fablab_without_invoices %>' === 'true'); Fablab.phoneRequired = ('<%= Rails.application.secrets.phone_required %>' === 'true'); + Fablab.eventsInCalendar = ('<%= Rails.application.secrets.events_in_calendar %>' === 'true'); Fablab.slotDuration = parseInt("<%= ApplicationHelper::SLOT_DURATION %>", 10); Fablab.disqusShortname = "<%= Rails.application.secrets.disqus_shortname %>"; Fablab.defaultHost = "<%= Rails.application.secrets.default_host %>"; diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index c6c0ee47a..0b1aaa437 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -86,6 +86,7 @@ en: event_in_the_past: "Unable to create a slot in the past." edit_event: "Edit the event" view_reservations: "View reservations" + legend: "legend" project_elements: # management of the projects' components diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index d7b1beb2b..2f329ba4b 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -86,6 +86,7 @@ es: event_in_the_past: "Unable to create a slot in the past." # translation_missing edit_event: "Edit the event" # translation_missing view_reservations: "Ver reservas" # translation_missing + legend: "leyenda" project_elements: # management of the projects' components diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index 32b548742..c55d89754 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -86,6 +86,7 @@ fr: event_in_the_past: "Impossible de créer un créneau dans le passé." edit_event: "Modifier l'évènement" view_reservations: "Voir les réservations" + legend: "Légende" project_elements: # gestion des éléments constituant les projets diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index ca8bdb488..487a45cf2 100755 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -86,6 +86,7 @@ pt: event_in_the_past: "Unable to create a slot in the past." # translation_missing edit_event: "Edit the event" # translation_missing view_reservations: "Ver reservas" # translation_missing + legend: "legenda" project_elements: # management of the projects' components