diff --git a/app/controllers/frames_controller.rb b/app/controllers/frames_controller.rb index 0dc39d2c7..2f1a08f70 100644 --- a/app/controllers/frames_controller.rb +++ b/app/controllers/frames_controller.rb @@ -33,7 +33,7 @@ def update @frame = Frame.friendly.find(params[:id].to_s.downcase) respond_to do |format| if @frame.update(frame_params) - format.html { redirect_to room_path(@frame.room), notice: 'Le châssis a été mis à jour.' } + format.html { redirect_to room_path(@frame.room), notice: t(".flashes.updated") } format.json { render :show, status: :ok, location: @frame } else format.html { render :edit } @@ -47,7 +47,7 @@ def create respond_to do |format| if @frame.save - format.html { redirect_to frames_path, notice: 'Le châssis a été ajouté.' } + format.html { redirect_to frames_path, notice: t(".flashes.created") } format.json { render :show, status: :created, location: @frame } else format.html { render :new } @@ -71,7 +71,7 @@ def destroy @frame = Frame.friendly.find(params[:id].to_s.downcase) if @frame.destroy respond_to do |format| - format.html { redirect_to frames_url, notice: 'Frame a bien été supprimé.' } + format.html { redirect_to frames_url, notice: t(".flashes.destroyed") } format.json { head :no_content } end else @@ -97,7 +97,7 @@ def network @servers_per_frames = {} @frames.each do |frame| - islet = "Vue réseau" + islet = t(".title") @servers_per_frames[islet] ||= {} @servers_per_frames[islet][0] ||= {} @servers_per_frames[islet][0][frame.bay] ||= {} diff --git a/app/views/frames/_form.html.erb b/app/views/frames/_form.html.erb index f1514b205..6f0340c62 100644 --- a/app/views/frames/_form.html.erb +++ b/app/views/frames/_form.html.erb @@ -1,8 +1,16 @@ <%= form_for(@frame, html: { class: "form-horizontal", role: "form" }) do |f| %> <% if @frame.errors.any? %>
Nom | -Matériels | -Nombre de U | -Room | -Ilot | ++ <%= Frame.human_attribute_name(:name) %> + | ++ <%= Frame.human_attribute_name(:servers) %> + | ++ <%= Frame.human_attribute_name(:u) %> + | ++ <%= Frame.human_attribute_name(:room) %> + | ++ <%= Islet.model_name.human %> + | <%= frame.u %> | <%= frame.room.present? ? (link_to frame.room, frame.room) : frame.room %> | <%= frame.bay.present? ? frame.bay.islet : '' %> | -<%= link_to 'Modifier', edit_frame_path(frame), class: 'btn btn-primary' %> | +<%= link_to t("action.edit"), edit_frame_path(frame), class: 'btn btn-primary' %> | - <%= link_to 'Supprimer', + <%= link_to t("action.delete"), frame, method: :delete, - data: { confirm: 'Ce châssis ne pourra pas être supprimé tant qu\'il sera associé à au moins un serveur. Voulez-vous continuer ?' }, + data: { confirm: t(".delete_confirmation") }, class: 'btn btn-danger' %> | <% end %> diff --git a/app/views/frames/network.html.erb b/app/views/frames/network.html.erb index 76f3619c3..710201f47 100644 --- a/app/views/frames/network.html.erb +++ b/app/views/frames/network.html.erb @@ -4,14 +4,14 @@ <% view_side = 'back' %> <% settings = Frame.settings.merge({:min_height => view_side == 'back' ? 20 : 27}) %> - <% @room = "Vue réseau" %> + <% @room = t(".title") %> <%= render 'rooms/action_buttons', view_side: params[:view] if formats != [:pdf] %>
---|