Skip to content

Commit

Permalink
Update views after merge Connection + update icons
Browse files Browse the repository at this point in the history
  • Loading branch information
B-Rass committed Apr 24, 2024
1 parent f013692 commit f31c3d1
Show file tree
Hide file tree
Showing 139 changed files with 380 additions and 375 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ span.port_container.unreferenced_client a {
display: none !important;
}

.glyphicon{
.bi{
&.red{
color: #ee3b3b;
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/caption_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
right: 15px;
z-index: 100;

.glyphicon-info-sign {
.bi-info-circle {
font-size: 20px;
color: darkgray;
cursor: help;
Expand Down
2 changes: 1 addition & 1 deletion app/components/caption_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class CaptionComponent < ApplicationComponent
erb_template <<~ERB
<span class="caption-component">
<span class="caption-component-button glyphicon glyphicon-info-sign" aria-hidden="true"></span>
<span class="caption-component-button bi bi-info-circle" aria-hidden="true"></span>
<span class="caption-component-content"><%= content %></span>
</span>
ERB
Expand Down
2 changes: 1 addition & 1 deletion app/components/form_errors_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class FormErrorsComponent < ApplicationComponent
<div class="alert alert-danger alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
<span class="visually-hidden">Close</span>
</button>
<h4><%= t(".title", count: @object.errors.count) %></h4>
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/servers_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def slot_label(server, component)
if cards_names.present?
if cards.first.twin_card_id.present?
link_to network_frame_path(server.frame, network_frame_id: Card.find(cards.first.twin_card_id).server.frame_id) do
"<span class='glyphicon glyphicon-open' aria-hidden='true'></span>#{cards_names.join('-')}".html_safe
"<span class='bi bi-eye' aria-hidden='true'></span>#{cards_names.join('-')}".html_safe
end
else
cards_names.join('-')
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function showFilters() {
}

$(document).on("click", ".draw_connections_link", function (event) {
$(event.target).html('<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>')
$(event.target).html('<span class="bi bi-three-dots" aria-hidden="true"></span>')
})

$(document).ready(function () {
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/src/servers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ $(document).ready(function() {
var source_connected_list, source_frame;
if (drag_n_drop_activated) {
drag_n_drop_activated = false;
$('#drag-n-drop-switcher').html("<span class='glyphicon glyphicon-move' aria-hidden='true'></span> Activer le drag'n drop");
$('#drag-n-drop-switcher').html("<span class='bi bi-arrows-move' aria-hidden='true'></span> Activer le drag'n drop");
$('.frames').sortable('destroy');
return $('.servers').sortable('destroy');
} else {
drag_n_drop_activated = true;
$('#drag-n-drop-switcher').html("<span class='glyphicon glyphicon-move' aria-hidden='true'></span> Le drag'n drop est activé !");
$('#drag-n-drop-switcher').html("<span class='bi bi-arrows-move' aria-hidden='true'></span> Le drag'n drop est activé !");
$('.frames').sortable({
update: function(event, ui) {
return $.post($(this).data('update-url'), $(this).sortable('serialize'));
Expand Down
4 changes: 2 additions & 2 deletions app/views/architectures/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="container">
<div class="page-header">
<%= link_to architectures_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to @architecture, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-info-sign"></span>
<span class="bi bi-eye"></span>
<%= t("action.show") %>
<% end %>
<h1>
Expand Down
10 changes: 5 additions & 5 deletions app/views/architectures/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="container-fluid">
<div class="page-header">
<%= link_to new_architecture_path, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="bi bi-plus"></span>
<%= t(".new_architecture") %>
<% end %>
<h1>
Expand All @@ -27,12 +27,12 @@
<% table.with_column(style: "min-width: 84px; width: 84px") do |architecture| %>
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<%= link_to edit_architecture_path(architecture), class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="sr-only"><%= t("action.edit") %></span>
<span class="bi bi-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="visually-hidden"><%= t("action.edit") %></span>
<% end %>
<%= link_to architecture, method: :delete, data: { confirm: t(".delete_confirmation") }, class: 'btn btn-danger' do %>
<span class="glyphicon glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="sr-only"><%= t("action.delete") %></span>
<span class="bi bi-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="visually-hidden"><%= t("action.delete") %></span>
<% end %>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/architectures/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="container">
<div class="page-header">
<%= link_to architectures_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<h1>
Expand Down
4 changes: 2 additions & 2 deletions app/views/architectures/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="page-header">
<%= link_to architectures_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to edit_architecture_path(@architecture), class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-pencil"></span>
<span class="bi bi-pencil"></span>
<%= t("action.edit") %>
<% end %>
<h1>
Expand Down
16 changes: 8 additions & 8 deletions app/views/bays/_export_button.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-submenu pull-left">
<%= link_to bay_path(bay, format: 'pdf', view: 'front', bg: ''), target: :_blank do %>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.exports.pdf") %>
<% end %>
<ul class="dropdown-menu dropdown-menu-left">
<li>
<%= link_to bay_path(bay, format: 'pdf', view: 'front', bg: ''), target: :_blank do %>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.faces.front") %>
<% end %>
</li>
<li>
<%= link_to bay_path(bay, format: 'pdf', view: 'back', bg: ''), target: :_blank do %>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.faces.back") %>
<% end %>
</li>
<li>
<%= link_to bay_path(bay, format: 'pdf', view: 'front', bg: 'cablage'), target: :_blank do %>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.faces.front_wiring") %>
<% end %>
</li>
<li>
<%= link_to bay_path(bay, format: 'pdf', view: 'back', bg: 'cablage'), target: :_blank do %>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.faces.back_wiring") %>
<% end %>
</li>
</ul>
</li>

<li><%= link_to bay_path(bay, format: 'txt', view: '', bg: '') do %>
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span>
<span class="bi bi-file-earmark-arrow-down" aria-hidden="true"></span>
<%= t("export_button.exports.txt") %>
<% end %>
</li>

<li><%= link_to bay_path(bay, format: 'pdf', view: 'front', bg: '', debug: '1'), target: :_blank do %>
<span class="glyphicon glyphicon-print" aria-hidden="true"></span>
<span class="bi bi-printer" aria-hidden="true"></span>
<%= t("export_button.exports.print") %>
<% end %>
</li>

<li role="separator" class="divider"></li>

<li><%= link_to ports_path(room_id: bay.islet.room_id, bay_id: bay.id) do %>
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
<span class="bi bi-list-ul" aria-hidden="true"></span>
<%= t("export_button.port_list") %>
<% end %>
</li>
Expand Down
4 changes: 2 additions & 2 deletions app/views/bays/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="container">
<div class="page-header">
<%= link_to bays_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to @bay, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-info-sign"></span>
<span class="bi bi-eye"></span>
<%= t("action.show") %>
<% end %>
<h1>
Expand Down
10 changes: 5 additions & 5 deletions app/views/bays/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="container-fluid">
<div class="page-header">
<%= link_to new_bay_path, class: 'btn btn-primary btn-disabled' do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="bi bi-plus"></span>
<%= t('.new') %>
<% end %>
<h1>
Expand Down Expand Up @@ -48,12 +48,12 @@
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<%= render partial: "bays/export_button", locals: { bay: bay } %>
<%= link_to edit_bay_path(bay), class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="sr-only"><%= t("action.edit") %></span>
<span class="bi bi-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="visually-hidden"><%= t("action.edit") %></span>
<% end %>
<%= link_to bay, method: :delete, data: { confirm: t(".delete_confirmation") }, class: 'btn btn-danger' do %>
<span class="glyphicon glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="sr-only"><%= t("action.delete") %></span>
<span class="bi bi-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="visually-hidden"><%= t("action.delete") %></span>
<% end %>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/bays/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="container">
<div class="page-header">
<%= link_to bays_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<h1>
Expand Down
66 changes: 28 additions & 38 deletions app/views/cables/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,40 @@
%>

<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<%= render "pages/params_menu" %>
</div>

<div class="col-md-9">
<div class="page-header">
<h1>
<%= t(".title") %>
</h1>
</div>
<div class="page-header">
<h1><%= t(".title") %></h1>
</div>

<%= render List::DataTableComponent.new(@cables) do |table| %>
<% table.with_column(Cable.human_attribute_name(:name), sort_by: :name) do |cable| %>
<b><%= cable.name %></b>
<% end %>
<%= render List::DataTableComponent.new(@cables) do |table| %>
<% table.with_column(Cable.human_attribute_name(:name), sort_by: :name) do |cable| %>
<b><%= cable.name %></b>
<% end %>
<% table.with_column(Cable.human_attribute_name(:color), sort_by: :color) do |cable| %>
<%= cable.color %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:color), sort_by: :color) do |cable| %>
<%= cable.color %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:special_case), sort_by: :special_case) do |cable| %>
<%= cable.special_case ? t("boolean.true") : t("boolean.false") %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:special_case), sort_by: :special_case) do |cable| %>
<%= cable.special_case ? t("boolean.true") : t("boolean.false") %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:comments), sort_by: :comments) do |cable| %>
<%= cable.comments %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:comments), sort_by: :comments) do |cable| %>
<%= cable.comments %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:connections), sort_by: :connections_count) do |cable| %>
<%= cable.connections_count %>
<% end %>
<% table.with_column(Cable.human_attribute_name(:connections), sort_by: :connections_count) do |cable| %>
<%= cable.connections_count %>
<% end %>
<% table.with_column(style: "min-width: 160px; width: 160px") do |cable| %>
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<%= link_to cable, method: :delete, data: { confirm: t('action.confirm') }, class: 'btn btn-danger' do %>
<span class="glyphicon glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="sr-only"><%= t("action.delete") %></span>
<% end %>
</div>
<% table.with_column(style: "min-width: 160px; width: 160px") do |cable| %>
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<%= link_to cable, method: :delete, data: { confirm: t('action.confirm') }, class: 'btn btn-danger' do %>
<span class="bi bi-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="visually-hidden"><%= t("action.delete") %></span>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<%= paginate @cables %>
</div>
</div>
<%= paginate @cables %>
</div>
4 changes: 2 additions & 2 deletions app/views/card_types/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="container">
<div class="page-header">
<%= link_to card_types_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to @card_type, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-info-sign"></span>
<span class="bi bi-eye"></span>
<%= t(".show_card") %>
<% end %>
<h1>
Expand Down
10 changes: 5 additions & 5 deletions app/views/card_types/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="container-fluid">
<div class="page-header">
<%= link_to new_card_type_path, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="bi bi-plus"></span>
<%= t(".add_card") %>
<% end %>
<h1>
Expand All @@ -29,12 +29,12 @@
<% table.with_column(style: "min-width: 84px; width: 84px") do |card_type| %>
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<%= link_to edit_card_type_path(card_type), class: "btn btn-primary" do %>
<span class="glyphicon glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="sr-only"><%= t("action.edit") %></span>
<span class="bi bi-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.edit") %>"></span>
<span class="visually-hidden"><%= t("action.edit") %></span>
<% end %>
<%= link_to card_type_path(card_type), method: :delete, data: { confirm: t(".delete_confirmation") }, class: "btn btn-danger" do %>
<span class="glyphicon glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="sr-only"><%= t("action.delete") %></span>
<span class="bi bi-trash" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="<%= t("action.delete") %>"></span>
<span class="visually-hidden"><%= t("action.delete") %></span>
<% end %>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_types/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="container">
<div class="page-header">
<%= link_to card_types_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<h1>
Expand Down
4 changes: 2 additions & 2 deletions app/views/card_types/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="page-header">
<%= link_to card_types_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to edit_card_type_path(@card_type), class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-pencil"></span>
<span class="bi bi-pencil"></span>
<%= t("action.edit") %>
<% end %>
<h1>
Expand Down
4 changes: 2 additions & 2 deletions app/views/categories/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="container">
<div class="page-header">
<%= link_to categories_path, class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
<span class="bi bi-list-ul"></span>
<%= t("action.back") %>
<% end %>
<%= link_to @category, class: 'btn btn-primary' do %>
<span class="glyphicon glyphicon-info-sign"></span>
<span class="bi bi-eye"></span>
<%= t("action.show") %>
<% end %>
<h1>
Expand Down
Loading

0 comments on commit f31c3d1

Please sign in to comment.