Rename v5 FontAwesome icons to match v6 name

While FontAwesome provides aliases for all icons, we switch to the new names for consistency. See all changes at:
https://fontawesome.com/docs/web/setup/upgrade/whats-changed#icons-renamed-in-version-6
This commit is contained in:
Sebastian Serth
2022-08-09 13:13:41 +02:00
committed by Sebastian Serth
parent f50c0a839f
commit d93e71dc28
13 changed files with 20 additions and 20 deletions

View File

@ -227,7 +227,7 @@ $(document).on('turbolinks:load', function () {
'<div class="list-group-item d-block" data-tip-id=' + tip.id + ' data-id="">' + '<div class="list-group-item d-block" data-tip-id=' + tip.id + ' data-id="">' +
'<span class="fa fa-bars mr-3"></span>' + tip.title + '<span class="fa fa-bars mr-3"></span>' + tip.title +
'<a class="fa fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' + '<a class="fa fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' +
'<a class="fa fa-times ml-2 remove-tip" href="#""></a>' + '<a class="fa fa-xmark ml-2 remove-tip" href="#""></a>' +
'<div class="list-group nested-sortable-list"></div>' + '<div class="list-group nested-sortable-list"></div>' +
'</div>'; '</div>';
const tipList = $('#tip-list').append(template); const tipList = $('#tip-list').append(template);

View File

@ -1404,7 +1404,7 @@
buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa fa-font", bindCommand("doHeading"), group3); buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa fa-font", bindCommand("doHeading"), group3);
var group4 = makeGroup(4); var group4 = makeGroup(4);
buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa fa-undo", null, group4); buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa fa-arrow-rotate-left", null, group4);
buttons.undo.execute = function (manager) { if (manager) manager.undo(); }; buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
var redoTitle = /win/.test(nav.platform.toLowerCase()) ? var redoTitle = /win/.test(nav.platform.toLowerCase()) ?

View File

@ -31,7 +31,7 @@ module ApplicationHelper
private :label_column private :label_column
def no def no
tag.i(nil, class: 'fa fa-times') tag.i(nil, class: 'fa fa-xmark')
end end
def per_page_param def per_page_param

View File

@ -14,5 +14,5 @@
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item') li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item')
- else - else
li.nav-item = link_to(sign_in_path, class: 'nav-link') do li.nav-item = link_to(sign_in_path, class: 'nav-link') do
i.fa.fa-sign-in i.fa.fa-arrow-right-to-bracket
= t('sessions.new.link') = t('sessions.new.link')

View File

@ -10,7 +10,7 @@
#description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card') #description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card')
.card.border-success.mb-3 .card.border-success.mb-3
.card-header .card-header
i.fa.fa-info-circle.text-success i.fa.fa-circle-info.text-success
strong.text-success strong.text-success
=> t('community_solutions.help_us_out') => t('community_solutions.help_us_out')
= t('community_solutions.explanation') = t('community_solutions.explanation')

View File

@ -45,7 +45,7 @@
= " | " = " | "
button#start-over-active-file.p-0.border-0.btn-link.bg-white data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise) button#start-over-active-file.p-0.border-0.btn-link.bg-white data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise)
i.fa.fa-history i.fa.fa-clock-rotate-left
= t('exercises.editor.start_over_active_file') = t('exercises.editor.start_over_active_file')
- unless @embed_options[:disable_run] && @embed_options[:disable_score] - unless @embed_options[:disable_run] && @embed_options[:disable_score]

View File

@ -1,16 +1,16 @@
div id='sidebar-collapsed' class=(@exercise.hide_file_tree && @tips.blank? ? '' : 'd-none') div id='sidebar-collapsed' class=(@exercise.hide_file_tree && @tips.blank? ? '' : 'd-none')
= render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-plus-square', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar')) = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-square-plus', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar'))
- unless @embed_options[:disable_hints] or @tips.blank? - unless @embed_options[:disable_hints] or @tips.blank?
= render('editor_button', classes: 'btn-block btn-secondary btn mb-4', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-lightbulb', id: 'tips-collapsed', label:'', title: t('exercises.form.tips')) = render('editor_button', classes: 'btn-block btn-secondary btn mb-4', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-lightbulb', id: 'tips-collapsed', label:'', title: t('exercises.form.tips'))
//- if !@course_token.blank? //- if !@course_token.blank?
= render('editor_button', classes: 'btn-block btn-primary btn enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-search', id: 'sidebar-search-collapsed', label: '', title: t('search.search_in_forum')) = render('editor_button', classes: 'btn-block btn-primary btn enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-magnifying-glass', id: 'sidebar-search-collapsed', label: '', title: t('search.search_in_forum'))
div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exercise.hide_file_tree && @tips.blank? ? 'd-none' : '') div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exercise.hide_file_tree && @tips.blank? ? 'd-none' : '')
.position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; top: 0; height: 100%;" .position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; top: 0; height: 100%;"
.w-100 .w-100
= render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-minus-square', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar')) = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar'))
- unless @exercise.hide_file_tree - unless @exercise.hide_file_tree
div div
@ -22,10 +22,10 @@ div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exerc
div div
- if @exercise.allow_file_creation - if @exercise.allow_file_creation
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file')) = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file'))
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy') }, icon: 'far fa-trash-alt', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file')) = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy') }, icon: 'far fa-trash-can', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file'))
- unless @embed_options[:disable_download] - unless @embed_options[:disable_download]
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip'}, icon: 'fas fa-arrow-down', id: 'download', label:'', title: t('exercises.editor.download')) = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip'}, icon: 'fas fa-arrow-down', id: 'download', label:'', title: t('exercises.editor.download'))
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa fa-history', id: 'start-over', label: '', title: t('exercises.editor.start_over')) = render('editor_button', classes: 'btn-default btn-sm', data: {:'data-toggle' => 'tooltip', :'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa fa-clock-rotate-left', id: 'start-over', label: '', title: t('exercises.editor.start_over'))
.card-body.pt-0.pr-0.pl-1.pb-1 .card-body.pt-0.pr-0.pl-1.pb-1
@ -43,7 +43,7 @@ div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exerc
= text_field_tag 'search-input-text', nil, placeholder: t('search.search_in_forum'), class: 'form-control' = text_field_tag 'search-input-text', nil, placeholder: t('search.search_in_forum'), class: 'form-control'
.input-group-btn .input-group-btn
= button_tag(class: 'btn btn-primary', id: 'btn-search-col') do = button_tag(class: 'btn btn-primary', id: 'btn-search-col') do
i.fa.fa-search i.fa.fa-magnifying-glass
- if @exercise.allow_file_creation? - if @exercise.allow_file_creation?
= render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file')) = render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file'))

View File

@ -1,8 +1,8 @@
div id='output_sidebar_collapsed' div id='output_sidebar_collapsed'
= render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa fa-plus-square', id: 'toggle-sidebar-output-collapsed', label: '') = render('editor_button', classes: 'btn-block btn-outline-dark btn', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa fa-square-plus', id: 'toggle-sidebar-output-collapsed', label: '')
div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom-margin' data-message-no-output=t('exercises.implement.no_output_yet') div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom-margin' data-message-no-output=t('exercises.implement.no_output_yet')
.row .row
= render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-minus-square', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar')) = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa fa-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar'))
div.position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; bottom: 0; height: calc(100% - 3rem);" div.position-absolute.d-flex.mb-1.w-100 style="overflow: auto; left: 0; bottom: 0; height: calc(100% - 3rem);"
div.w-100 div.w-100

View File

@ -43,12 +43,12 @@ h1
.bg-light.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between .bg-light.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between
- if @show_autosaves - if @show_autosaves
span.pl-1.pb-1 span.pl-1.pb-1
i.fa.fa-info-circle.align-middle i.fa.fa-circle-info.align-middle
small.mr-5.ml-1 = t('.toggle_status_on') small.mr-5.ml-1 = t('.toggle_status_on')
= link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-dark float-right btn-sm" = link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-dark float-right btn-sm"
- else - else
span.pl-1.pb-1 span.pl-1.pb-1
i.fa.fa-info-circle.align-middle i.fa.fa-circle-info.align-middle
small.mr-5.ml-1 = t('.toggle_status_off') small.mr-5.ml-1 = t('.toggle_status_off')
= link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: "btn btn-outline-dark float-right btn-sm" = link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: "btn btn-outline-dark float-right btn-sm"
#timeline #timeline

View File

@ -3,6 +3,6 @@
span.fa.fa-bars.mr-3 span.fa.fa-bars.mr-3
= tip.to_s = tip.to_s
a.fa.fa-eye.ml-2 href=tip_path(tip) target='_blank' a.fa.fa-eye.ml-2 href=tip_path(tip) target='_blank'
a.fa.fa-times.ml-2.remove-tip href='#' a.fa.fa-xmark.ml-2.remove-tip href='#'
.list-group.nested-sortable-list class="#{exercise_tip.children.present? ? 'mt-3' : ''}" .list-group.nested-sortable-list class="#{exercise_tip.children.present? ? 'mt-3' : ''}"
= render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip) = render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip)

View File

@ -26,7 +26,7 @@ $( document ).on('turbolinks:load', function() {
$('.flash').each(function() { $('.flash').each(function() {
var container = $(this); var container = $(this);
var message = container.find('p'); var message = container.find('p');
var button = container.find('span.fa-times'); var button = container.find('span.fa-xmark');
var hide = function() { var hide = function() {
container.slideUp(function () { container.slideUp(function () {

View File

@ -5,7 +5,7 @@
.flash { .flash {
display: none; display: none;
span.fa-times { span.fa-xmark {
position: relative; position: relative;
top: -1.2em; top: -1.2em;
float: right; float: right;

View File

@ -39,7 +39,7 @@ describe ApplicationHelper do
describe '#no' do describe '#no' do
it "builds an 'i' tag" do it "builds an 'i' tag" do
expect(no).to have_css('i.fa.fa-times') expect(no).to have_css('i.fa.fa-xmark')
end end
end end