mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
add info message on categories management + fix existing categories slugs
This commit is contained in:
parent
894f836286
commit
fda619e422
@ -192,7 +192,7 @@ Application.Controllers.controller "AdminEventsController", ["$scope", "$state",
|
|||||||
##
|
##
|
||||||
$scope.removeElement = (model, index) ->
|
$scope.removeElement = (model, index) ->
|
||||||
if model == 'category' and getModel(model)[1].length == 1
|
if model == 'category' and getModel(model)[1].length == 1
|
||||||
growl.error(_t('at_least_one_category_is_required_unable_to_delete_the_last_one'))
|
growl.error(_t('at_least_one_category_is_required')+' '+_t('unable_to_delete_the_last_one'))
|
||||||
return false
|
return false
|
||||||
if getModel(model)[1][index].related_to > 0
|
if getModel(model)[1][index].related_to > 0
|
||||||
growl.error(_t('unable_to_delete_ELEMENT_already_in_use_NUMBER_times', {ELEMENT:model, NUMBER:getModel(model)[1][index].related_to}, "messageformat"))
|
growl.error(_t('unable_to_delete_ELEMENT_already_in_use_NUMBER_times', {ELEMENT:model, NUMBER:getModel(model)[1][index].related_to}, "messageformat"))
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<div class="m-t">
|
<div class="m-t">
|
||||||
<h3 translate>{{ 'categories' }}</h3>
|
<h3 translate>{{ 'categories' }}</h3>
|
||||||
|
<p translate>{{ 'at_least_one_category_is_required' }}</p>
|
||||||
<button type="button" class="btn btn-warning m-b m-t" ng-click="addElement('category')" translate>{{ 'add_a_category' }}</button>
|
<button type="button" class="btn btn-warning m-b m-t" ng-click="addElement('category')" translate>{{ 'add_a_category' }}</button>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -86,7 +86,8 @@ en:
|
|||||||
add_a_range: "Add a range"
|
add_a_range: "Add a range"
|
||||||
do_you_really_want_to_delete_this_ELEMENT: "Do you really want to delete this {ELEMENT, select, category{category} theme{theme} age_range{age range} other{element}}?" # messageFormat interpolation
|
do_you_really_want_to_delete_this_ELEMENT: "Do you really want to delete this {ELEMENT, select, category{category} theme{theme} age_range{age range} other{element}}?" # messageFormat interpolation
|
||||||
unable_to_delete_ELEMENT_already_in_use_NUMBER_times: "Unable to delete this {ELEMENT, select, category{category} theme{theme} age_range{age range} other{element}} because it is already associated with {NUMBER, plural, =0{no events} one{one event} other{{NUMBER} events}}." # messageFormat interpolation
|
unable_to_delete_ELEMENT_already_in_use_NUMBER_times: "Unable to delete this {ELEMENT, select, category{category} theme{theme} age_range{age range} other{element}} because it is already associated with {NUMBER, plural, =0{no events} one{one event} other{{NUMBER} events}}." # messageFormat interpolation
|
||||||
at_least_one_category_is_required_unable_to_delete_the_last_one: "At least one category is required. Unable to delete the last one."
|
at_least_one_category_is_required: "At least one category is required."
|
||||||
|
unable_to_delete_the_last_one: "Unable to delete the last one."
|
||||||
unable_to_delete_an_error_occured: "Unable to delete: an error occurred."
|
unable_to_delete_an_error_occured: "Unable to delete: an error occurred."
|
||||||
|
|
||||||
events_new:
|
events_new:
|
||||||
|
@ -69,7 +69,7 @@ fr:
|
|||||||
unable_to_delete_the_training_because_some_users_alredy_booked_it: "La formation ne peut pas être supprimée car elle a déjà été réservée par des utilisateurs."
|
unable_to_delete_the_training_because_some_users_alredy_booked_it: "La formation ne peut pas être supprimée car elle a déjà été réservée par des utilisateurs."
|
||||||
|
|
||||||
events:
|
events:
|
||||||
# gestion et suivi des stages et ateliers
|
# gestion et suivi des évènements
|
||||||
events_monitoring: "Suivi des évènements"
|
events_monitoring: "Suivi des évènements"
|
||||||
manage_filters: "Gérer les filtres"
|
manage_filters: "Gérer les filtres"
|
||||||
fablab_events: "Les évènements du Fab Lab"
|
fablab_events: "Les évènements du Fab Lab"
|
||||||
@ -86,11 +86,12 @@ fr:
|
|||||||
add_a_range: "Ajouter une tranche"
|
add_a_range: "Ajouter une tranche"
|
||||||
do_you_really_want_to_delete_this_ELEMENT: "Voulez-vous vraiment supprimer cette {ELEMENT, select, category{catégorie} theme{thématique} age_range{tranche d'âge} other{élément}} ?" # messageFormat interpolation
|
do_you_really_want_to_delete_this_ELEMENT: "Voulez-vous vraiment supprimer cette {ELEMENT, select, category{catégorie} theme{thématique} age_range{tranche d'âge} other{élément}} ?" # messageFormat interpolation
|
||||||
unable_to_delete_ELEMENT_already_in_use_NUMBER_times: "Impossible de supprimer cette {ELEMENT, select, category{catégorie} theme{thématique} age_range{tranche d'âge} other{élément}} car elle est actuellement associée à {NUMBER, plural, =0{aucun évènement} one{un évènement} other{{NUMBER} évènements}}." # messageFormat interpolation
|
unable_to_delete_ELEMENT_already_in_use_NUMBER_times: "Impossible de supprimer cette {ELEMENT, select, category{catégorie} theme{thématique} age_range{tranche d'âge} other{élément}} car elle est actuellement associée à {NUMBER, plural, =0{aucun évènement} one{un évènement} other{{NUMBER} évènements}}." # messageFormat interpolation
|
||||||
at_least_one_category_is_required_unable_to_delete_the_last_one: "Au moins une catégorie est requise. Impossible de supprimer la dernière."
|
at_least_one_category_is_required: "Au moins une catégorie est requise."
|
||||||
|
unable_to_delete_the_last_one: "Impossible de supprimer la dernière."
|
||||||
unable_to_delete_an_error_occured: "Impossible de supprimer : une erreur est survenue."
|
unable_to_delete_an_error_occured: "Impossible de supprimer : une erreur est survenue."
|
||||||
|
|
||||||
events_new:
|
events_new:
|
||||||
# ajouter un nouveau atelier/stage
|
# ajouter un nouvel évènement
|
||||||
none: "Aucune"
|
none: "Aucune"
|
||||||
every_days: "Tous les jours"
|
every_days: "Tous les jours"
|
||||||
every_week: "Chaque semaine"
|
every_week: "Chaque semaine"
|
||||||
|
@ -164,7 +164,7 @@ fr:
|
|||||||
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :"
|
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :"
|
||||||
|
|
||||||
event:
|
event:
|
||||||
# formulaire d'édition d'un événement (stage/atelier)
|
# formulaire d'édition d'un événement
|
||||||
title_is_required: "Le titre est requis."
|
title_is_required: "Le titre est requis."
|
||||||
matching_visual: "Visuel associé"
|
matching_visual: "Visuel associé"
|
||||||
choose_a_picture: "Choisir une image"
|
choose_a_picture: "Choisir une image"
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
class AddSlugsToExistingCategories < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
execute 'UPDATE categories
|
||||||
|
SET slug=name
|
||||||
|
WHERE slug IS NULL;'
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
execute 'UPDATE categories
|
||||||
|
SET slug=NULL
|
||||||
|
WHERE slug=name;'
|
||||||
|
end
|
||||||
|
end
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160630100137) do
|
ActiveRecord::Schema.define(version: 20160630140204) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
Loading…
Reference in New Issue
Block a user