diff --git a/app/controllers/islets_controller.rb b/app/controllers/islets_controller.rb index a75a3e213..132f77adf 100644 --- a/app/controllers/islets_controller.rb +++ b/app/controllers/islets_controller.rb @@ -54,7 +54,7 @@ def create respond_to do |format| if @islet.save - format.html { redirect_to islets_url, notice: 'Islet was successfully created.' } + format.html { redirect_to islets_url, notice: t('.flashes.created') } format.json { render :show, status: :created, location: @islet } else format.html { render :new } @@ -68,7 +68,7 @@ def create def update respond_to do |format| if @islet.update(islet_params) - format.html { redirect_to islets_url, notice: 'Islet was successfully updated.' } + format.html { redirect_to islets_url, notice: t('.flashes.updated') } format.json { render :show, status: :ok, location: @islet } else format.html { render :edit } @@ -82,7 +82,7 @@ def update def destroy if @islet.destroy respond_to do |format| - format.html { redirect_to islets_url, notice: 'Islet a bien été supprimé.' } + format.html { redirect_to islets_url, notice: t('.flashes.destroyed') } format.json { head :no_content } end else diff --git a/app/views/islets/_export_button.html.erb b/app/views/islets/_export_button.html.erb index bf0102861..1a900bebb 100644 --- a/app/views/islets/_export_button.html.erb +++ b/app/views/islets/_export_button.html.erb @@ -1,37 +1,37 @@
Site | -Salle | -Ilot | -Position | -Nombre de châssis | ++ <%= Site.model_name.human %> + | ++ <%= Room.model_name.human %> + | ++ <%= Islet.model_name.human %> + | ++ <%= Islet.human_attribute_name(:position) %> + | ++ <%= Frame.model_name.human.pluralize %> + | <%= islet.position %> | -<%= islet.frames.count.to_s + ' chassis' %> | +<%= Islet.human_attribute_name(:frames_count, count: islet.frames.count) %> | <%= render partial: "islets/export_button", locals: { islet: islet } %> - <%= link_to 'Modifier', edit_islet_path(islet), class: 'btn btn-primary' %> - <%= link_to 'Supprimer', + <%= link_to t("action.edit"), edit_islet_path(islet), class: 'btn btn-primary' %> + <%= link_to t("action.delete"), islet, method: :delete, - data: { confirm: 'Cet ilôt ne pourra pas être supprimé tant qu\'il sera associé à au moins une baie. Voulez-vous continuer ?' }, + data: { confirm: t('.delete_confirmation') }, class: 'btn btn-danger' %> | <% end %> diff --git a/app/views/islets/new.html.erb b/app/views/islets/new.html.erb index 8d4e2f97c..ec1d4d29a 100644 --- a/app/views/islets/new.html.erb +++ b/app/views/islets/new.html.erb @@ -1,16 +1,18 @@ <%= render 'layouts/breadcrumb', breadcrumb_variables: { t("inventories") => modeles_url, - 'Ilôts' => islets_path, - "Nouvel ilôt" => '' + Islet.model_name.human.pluralize => islets_path, + t(".title") => '' } %>
---|