Rename v4 FontAwesome icons to match v5/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/upgrade-from-v4#icons-renamed-since-version-4
This commit is contained in:
Sebastian Serth
2022-08-09 14:03:00 +02:00
committed by Sebastian Serth
parent d93e71dc28
commit b98c37ae64
36 changed files with 122 additions and 114 deletions

View File

@ -216,7 +216,7 @@ var CodeOceanEditor = {
}, },
hideSpinner: function () { hideSpinner: function () {
$('button i.fa, button i.far, button i.fas').show(); $('button i.fa-solid, button i.fa-regular').show();
$('button i.fa-spin').hide(); $('button i.fa-spin').hide();
}, },
@ -697,7 +697,7 @@ var CodeOceanEditor = {
}, },
showSpinner: function (initiator) { showSpinner: function (initiator) {
$(initiator).find('i.fa, i.far, i.fas').hide(); $(initiator).find('i.fa-solid, i.fa-regular').hide();
$(initiator).find('i.fa-spin').show(); $(initiator).find('i.fa-spin').show();
}, },
@ -743,21 +743,21 @@ var CodeOceanEditor = {
showContainerDepletedMessage: function () { showContainerDepletedMessage: function () {
$.flash.danger({ $.flash.danger({
icon: ['fa', 'fa-clock-o'], icon: ['fa-regular', 'fa-clock'],
text: $('#editor').data('message-depleted') text: $('#editor').data('message-depleted')
}); });
}, },
showOutOfMemoryMessage: function () { showOutOfMemoryMessage: function () {
$.flash.info({ $.flash.info({
icon: ['fa', 'fa-clock-o'], icon: ['fa-regular', 'fa-clock'],
text: $('#editor').data('message-out-of-memory') text: $('#editor').data('message-out-of-memory')
}); });
}, },
showTimeoutMessage: function () { showTimeoutMessage: function () {
$.flash.info({ $.flash.info({
icon: ['fa', 'fa-clock-o'], icon: ['fa-regular', 'fa-clock'],
text: $('#editor').data('message-timeout') text: $('#editor').data('message-timeout')
}); });
}, },

View File

@ -6,7 +6,7 @@ CodeOceanEditorFlowr = {
'<div class="card-title mb-0">' + '<div class="card-title mb-0">' +
'<a class="collapsed" data-toggle="collapse" data-parent="#flowrHint" href="#{{collapseId}}" aria-expanded="false" aria-controls="{{collapseId}}">' + '<a class="collapsed" data-toggle="collapse" data-parent="#flowrHint" href="#{{collapseId}}" aria-expanded="false" aria-controls="{{collapseId}}">' +
'<div class="clearfix" role="button">' + '<div class="clearfix" role="button">' +
'<i class="fa" aria-hidden="true"></i>' + '<i class="fa-solid" aria-hidden="true"></i>' +
'<span>' + '<span>' +
'</span>' + '</span>' +
'</div>' + '</div>' +

View File

@ -172,7 +172,7 @@ $(document).on('turbolinks:load', function() {
if (collectionExercises.indexOf(exercise.id) === -1) { if (collectionExercises.indexOf(exercise.id) === -1) {
// only add exercises that are not already contained in the collection // only add exercises that are not already contained in the collection
var template = '<tr data-id="' + exercise.id + '">' + var template = '<tr data-id="' + exercise.id + '">' +
'<td><span class="fa fa-bars"></span></td>' + '<td><span class="fa-solid fa-bars"></span></td>' +
'<td>' + exercise.title + '</td>' + '<td>' + exercise.title + '</td>' +
'<td><a href="/exercises/' + exercise.id + '"><%= I18n.t('shared.show') %></td>' + '<td><a href="/exercises/' + exercise.id + '"><%= I18n.t('shared.show') %></td>' +
'<td><a class="remove-exercise" href="#"><%= I18n.t('shared.destroy') %></td></tr>'; '<td><a class="remove-exercise" href="#"><%= I18n.t('shared.destroy') %></td></tr>';

View File

@ -225,9 +225,9 @@ $(document).on('turbolinks:load', function () {
const tip = {id: id, title: title} const tip = {id: id, title: title}
const template = const template =
'<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-solid fa-bars mr-3"></span>' + tip.title +
'<a class="fa fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' + '<a class="fa-regular fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' +
'<a class="fa fa-xmark ml-2 remove-tip" href="#""></a>' + '<a class="fa-solid 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

@ -1381,37 +1381,37 @@
}; };
var group1 = makeGroup(1); var group1 = makeGroup(1);
buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa fa-bold", bindCommand("doBold"), group1); buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa-solid fa-bold", bindCommand("doBold"), group1);
buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa fa-italic", bindCommand("doItalic"), group1); buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa-solid fa-italic", bindCommand("doItalic"), group1);
var group2 = makeGroup(2); var group2 = makeGroup(2);
buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa fa-link", bindCommand(function (chunk, postProcessing) { buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa-solid fa-link", bindCommand(function (chunk, postProcessing) {
return this.doLinkOrImage(chunk, postProcessing, false); return this.doLinkOrImage(chunk, postProcessing, false);
}), group2); }), group2);
buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa fa-picture-o", bindCommand(function (chunk, postProcessing) { buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa-regular fa-image", bindCommand(function (chunk, postProcessing) {
return this.doLinkOrImage(chunk, postProcessing, true); return this.doLinkOrImage(chunk, postProcessing, true);
}), group2); }), group2);
buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa fa-quote-left", bindCommand("doBlockquote"), group2); buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa-solid fa-quote-left", bindCommand("doBlockquote"), group2);
buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa fa-code", bindCommand("doCode"), group2); buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa-solid fa-code", bindCommand("doCode"), group2);
var group3 = makeGroup(3); var group3 = makeGroup(3);
buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa fa-list-ul", bindCommand(function (chunk, postProcessing) { buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa-solid fa-list-ul", bindCommand(function (chunk, postProcessing) {
this.doList(chunk, postProcessing, false); this.doList(chunk, postProcessing, false);
}), group3); }), group3);
buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa fa-list-ol", bindCommand(function (chunk, postProcessing) { buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa-solid fa-list-ol", bindCommand(function (chunk, postProcessing) {
this.doList(chunk, postProcessing, true); this.doList(chunk, postProcessing, true);
}), group3); }), 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); buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa-solid 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-arrow-rotate-left", null, group4); buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa-solid 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()) ?
"<%= I18n.t('components.markdown_editor.redo.button_title.win', default: 'Redo (Ctrl+Y)') %>" : "<%= I18n.t('components.markdown_editor.redo.button_title.win', default: 'Redo (Ctrl+Y)') %>" :
"<%= I18n.t('components.markdown_editor.redo.button_title.other', default: 'Redo (Ctrl+Shift+Z)') %>"; // mac and other non-Windows platforms "<%= I18n.t('components.markdown_editor.redo.button_title.other', default: 'Redo (Ctrl+Shift+Z)') %>"; // mac and other non-Windows platforms
buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa fa-repeat", null, group4); buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa-solid fa-arrow-rotate-right", null, group4);
buttons.redo.execute = function (manager) { if (manager) manager.redo(); }; buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
if (helpOptions) { if (helpOptions) {
@ -1419,7 +1419,7 @@
group5.className = group5.className + " ml-auto"; group5.className = group5.className + " ml-auto";
var helpButton = document.createElement("button"); var helpButton = document.createElement("button");
var helpButtonImage = document.createElement("i"); var helpButtonImage = document.createElement("i");
helpButtonImage.className = "m-1 fa fa-info"; helpButtonImage.className = "m-1 fa-solid fa-info";
helpButton.appendChild(helpButtonImage); helpButton.appendChild(helpButtonImage);
helpButton.className = "btn btn-info btn-sm"; helpButton.className = "btn btn-info btn-sm";
helpButton.id = "wmd-help-button" + postfix; helpButton.id = "wmd-help-button" + postfix;

View File

@ -12,7 +12,7 @@ h1, h2, h3, h4, h5, h6 {
color: rgba(70, 70, 70, 1); color: rgba(70, 70, 70, 1);
} }
i.fa, i.far, i.fas { i.fa-solid, i.fa-regular, i.fa-solid {
margin-right: 0.5em; margin-right: 0.5em;
} }

View File

@ -40,11 +40,11 @@ input[type='file'] {
} }
} }
[data-toggle="collapse"] .fa:before { [data-toggle="collapse"] .fa-solid:before {
content: "\f139"; content: "\f139";
} }
[data-toggle="collapse"].collapsed .fa:before { [data-toggle="collapse"].collapsed .fa-solid:before {
content: "\f13a"; content: "\f13a";
} }

View File

@ -18,7 +18,7 @@ module ApplicationHelper
end end
def empty def empty
tag.i(nil, class: 'empty fa fa-minus') tag.i(nil, class: 'empty fa-solid fa-minus')
end end
def label_column(label) def label_column(label)
@ -31,7 +31,7 @@ module ApplicationHelper
private :label_column private :label_column
def no def no
tag.i(nil, class: 'fa fa-xmark') tag.i(nil, class: 'fa-solid fa-xmark')
end end
def per_page_param def per_page_param
@ -79,6 +79,6 @@ module ApplicationHelper
private :value_column private :value_column
def yes def yes
tag.i(nil, class: 'fa fa-check') tag.i(nil, class: 'fa-solid fa-check')
end end
end end

View File

@ -1,7 +1,7 @@
- if current_user - if current_user
li.nav-item.dropdown li.nav-item.dropdown
a.nav-link.dropdown-toggle data-toggle='dropdown' href='#' a.nav-link.dropdown-toggle data-toggle='dropdown' href='#'
i.fa.fa-user i.fa-solid.fa-user
= current_user = current_user
span.caret span.caret
ul.dropdown-menu.p-0.mt-1 role='menu' ul.dropdown-menu.p-0.mt-1 role='menu'
@ -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-arrow-right-to-bracket i.fa-solid.fa-arrow-right-to-bracket
= t('sessions.new.link') = t('sessions.new.link')

View File

@ -3,19 +3,19 @@
span.badge.badge-pill.badge-primary.float-right.score span.badge.badge-pill.badge-primary.float-right.score
h1 id="exercise-headline" h1 id="exercise-headline"
i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa fa-chevron-right' : 'fa fa-chevron-down') i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
=> @community_solution.model_name.human(count: 1) => @community_solution.model_name.human(count: 1)
= @community_solution.exercise.title = @community_solution.exercise.title
#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-circle-info.text-success i.fa-solid.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')
br br
i.fa.fa-flask.text-success i.fa-solid.fa-flask.text-success
strong.text-success strong.text-success
=> t('community_solutions.research_status') => t('community_solutions.research_status')
== t('community_solutions.research_explanation') == t('community_solutions.research_explanation')
@ -61,6 +61,6 @@
= render('exercises/editor_frame', exercise: @community_solution.exercise, file: file, own_solution: true) = render('exercises/editor_frame', exercise: @community_solution.exercise, file: file, own_solution: true)
#statusbar.visible.mt-2 style="height: 5em" #statusbar.visible.mt-2 style="height: 5em"
p.text-center p.text-center
= render('exercises/editor_button', classes: 'btn-lg btn-success ml-5 mr-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa fa-send', id: 'submit', label: t('community_solutions.change_community_solution')) = render('exercises/editor_button', classes: 'btn-lg btn-success ml-5 mr-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('community_solutions.change_community_solution'))
= render('exercises/editor_button', classes: 'btn-lg btn-secondary ml-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa fa-check', id: 'accept', label: t('community_solutions.accept_community_solution')) = render('exercises/editor_button', classes: 'btn-lg btn-secondary ml-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-check', id: 'accept', label: t('community_solutions.accept_community_solution'))
button style="display:none" id="autosave" data-url=community_solution_path(@community_solution) data-http-method='PUT' data-cause='autosave-community-solution' data-exercise-id=@community_solution.exercise.id button style="display:none" id="autosave" data-url=community_solution_path(@community_solution) data-http-method='PUT' data-cause='autosave-community-solution' data-exercise-id=@community_solution.exercise.id

View File

@ -14,9 +14,9 @@ h1 = ErrorTemplateAttribute.model_name.human(count: 2)
tr tr
td td
- if error_template_attribute.important - if error_template_attribute.important
span class="fa fa-star" aria-hidden="true" span class="fa-solid fa-star" aria-hidden="true"
- else - else
span class="fa fa-star-o" aria-hidden="true" span class="fa-regular fa-star" aria-hidden="true"
td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute) td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute)
td = error_template_attribute.description td = error_template_attribute.description
td td

View File

@ -26,9 +26,9 @@ h2.mt-4
tr tr
td td
- if attribute.important - if attribute.important
span class="fa fa-star" aria-hidden="true" span class="fa-solid fa-star" aria-hidden="true"
- else - else
span class="fa fa-star-o" aria-hidden="true" span class="fa-regular fa-star" aria-hidden="true"
td = link_to_if(policy(attribute).show?, attribute.key, attribute) td = link_to_if(policy(attribute).show?, attribute.key, attribute)
td = attribute.description td = attribute.description
td td

View File

@ -2,7 +2,7 @@ h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2)
- if Runner.management_active? - if Runner.management_active?
= button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-right mb-2', class: 'btn btn-success' }) = button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-right mb-2', class: 'btn btn-success' })
i.fa.fa-upload i.fa-solid.fa-upload
= t('execution_environments.index.synchronize_all.button') = t('execution_environments.index.synchronize_all.button')
.table-responsive .table-responsive

View File

@ -22,7 +22,7 @@
- @exercise_collection.items.order(:position).each do |item| - @exercise_collection.items.order(:position).each do |item|
tr data-id=item.exercise.id tr data-id=item.exercise.id
td td
span.fa.fa-bars span.fa-solid.fa-bars
td = item.exercise.title td = item.exercise.title
td = link_to(t('shared.show'), item.exercise, 'data-turbolinks' => "false") td = link_to(t('shared.show'), item.exercise, 'data-turbolinks' => "false")
td td

View File

@ -17,14 +17,14 @@
div id="sidebar" class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files) div id="sidebar" class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files)
div.editor-col.col.p-0 id='frames' div.editor-col.col.p-0 id='frames'
#editor-buttons.btn-group.enforce-bottom-margin #editor-buttons.btn-group.enforce-bottom-margin
= render('editor_button', disabled: true, icon: 'fa fa-ban', id: 'dummy', label: t('exercises.editor.dummy')) = render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy'))
= render('editor_button', icon: 'fa fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button] = render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button]
= render('editor_button', data: {:'data-message-failure' => t('exercises.editor.run_failure'), :'data-message-network' => t('exercises.editor.network'), :'data-message-success' => t('exercises.editor.run_success'), :'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-play', id: 'run', label: t('exercises.editor.run'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] = render('editor_button', data: {:'data-message-failure' => t('exercises.editor.run_failure'), :'data-message-network' => t('exercises.editor.network'), :'data-message-success' => t('exercises.editor.run_success'), :'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run]
= render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run] = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) unless @embed_options[:disable_run]
= render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run] = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run]
= render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score] = render('editor_button', data: {:'data-placement' => 'top', :'data-toggle' => 'tooltip', :'data-container' => 'body'}, icon: 'fa-solid fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score]
- unless hide_rfc_button - unless hide_rfc_button
= render('editor_button', icon: 'fa fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) = render('editor_button', icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip'))
- @files.each do |file| - @files.each do |file|
- file.read_only = true if @embed_options[:read_only] - file.read_only = true if @embed_options[:read_only]
@ -34,7 +34,7 @@
div div
- if !@embed_options[:disable_download] && @exercise.hide_file_tree? - if !@embed_options[:disable_download] && @exercise.hide_file_tree?
button#download.p-0.border-0.btn-link.visible.bg-white button#download.p-0.border-0.btn-link.visible.bg-white
i.fas.fa-arrow-down i.fa-solid.fa-arrow-down
= t('exercises.editor.download') = t('exercises.editor.download')
div div
@ -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-clock-rotate-left i.fa-solid.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,4 +1,4 @@
button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) disabled=local_assigns.fetch(:disabled, false) id=id title=local_assigns[:title] type='button' button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) disabled=local_assigns.fetch(:disabled, false) id=id title=local_assigns[:title] type='button'
i.fa.fa-circle-o-notch.fa-spin class=(label.blank? ? "m-0" : '') i.fa-solid.fa-circle-notch.fa-spin class=(label.blank? ? "m-0" : '')
i class=(label.present? ? icon : "#{icon} m-0") i class=(label.present? ? icon : "#{icon} m-0")
= label = label

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-square-plus', 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-solid 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-solid 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-magnifying-glass', 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-solid 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-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar')) = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa-solid 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
@ -21,11 +21,11 @@ div.h-100.col-sm-12.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exerc
.px-2 = I18n.t('exercises.editor_file_tree.file_root') .px-2 = I18n.t('exercises.editor_file_tree.file_root')
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-solid 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-can', 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: 'fa-regular 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: 'fa-solid 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-clock-rotate-left', 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-solid 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-magnifying-glass i.fa-solid.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-square-plus', 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-solid 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-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar')) = render('editor_button', classes: 'btn-block btn-outline-dark btn', icon: 'fa-solid 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
@ -60,13 +60,13 @@ div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom
br br
- if lti_outcome_service?(@exercise.id, external_user_id) - if lti_outcome_service?(@exercise.id, external_user_id)
p.text-center = render('editor_button', classes: 'btn-lg btn-success d-none', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa fa-send', id: 'submit', label: t('exercises.editor.submit')) p.text-center = render('editor_button', classes: 'btn-lg btn-success d-none', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('exercises.editor.submit'))
- if @exercise.submission_deadline.present? || @exercise.late_submission_deadline.present? - if @exercise.submission_deadline.present? || @exercise.late_submission_deadline.present?
#deadline data-submission-deadline=@exercise.submission_deadline&.rfc2822 data-late-submission-deadline=@exercise.late_submission_deadline&.rfc2822 #deadline data-submission-deadline=@exercise.submission_deadline&.rfc2822 data-late-submission-deadline=@exercise.late_submission_deadline&.rfc2822
h4 = t('exercises.editor.deadline') h4 = t('exercises.editor.deadline')
= t('exercises.editor.hints.disclaimer') = t('exercises.editor.hints.disclaimer')
- else - else
p.text-center = render('editor_button', classes: 'btn-lg btn-secondary disabled', data: {:'data-placement' => 'bottom', :'data-tooltip' => true}, icon: 'fa fa-clock-o', id: 'submit_outdated', label: t('exercises.editor.exercise_deadline_passed'), title: t('exercises.editor.tooltips.exercise_deadline_passed')) p.text-center = render('editor_button', classes: 'btn-lg btn-secondary disabled', data: {:'data-placement' => 'bottom', :'data-tooltip' => true}, icon: 'fa-regular fa-clock', id: 'submit_outdated', label: t('exercises.editor.exercise_deadline_passed'), title: t('exercises.editor.tooltips.exercise_deadline_passed'))
hr hr
div.enforce-big-top-margin div.enforce-big-top-margin
#turtlediv #turtlediv

View File

@ -1,14 +1,14 @@
- if error - if error
= button_tag type: 'button', class:'btn btn-primary pull-right export-button export-retry-button', data: {exercise_id: exercise.id} do = button_tag type: 'button', class:'btn btn-primary pull-right export-button export-retry-button', data: {exercise_id: exercise.id} do
i.fa.fa-refresh.confirm-icon i.fa-solid.fa-arrows-rotate.confirm-icon
= t('exercises.export_codeharbor.buttons.retry') = t('exercises.export_codeharbor.buttons.retry')
- else - else
- unless exported - unless exported
- if !exercise_found || update_right - if !exercise_found || update_right
= button_tag type: 'button', class:'btn btn-primary pull-right export-action export-button', data: {exercise_id: exercise.id} do = button_tag type: 'button', class:'btn btn-primary pull-right export-action export-button', data: {exercise_id: exercise.id} do
i.fa.fa-check.confirm-icon i.fa-solid.fa-check.confirm-icon
= t('exercises.export_codeharbor.buttons.export') = t('exercises.export_codeharbor.buttons.export')
= button_tag type: 'submit', class:'btn btn-secondary pull-right export-button', data: {dismiss: 'modal'} do = button_tag type: 'submit', class:'btn btn-secondary pull-right export-button', data: {dismiss: 'modal'} do
i.fa.fa-remove.abort-icon i.fa-solid.fa-xmark.abort-icon
= exported ? t('exercises.export_codeharbor.buttons.close') : t('exercises.export_codeharbor.buttons.abort') = exported ? t('exercises.export_codeharbor.buttons.close') : t('exercises.export_codeharbor.buttons.abort')

View File

@ -6,7 +6,7 @@ li.card.mt-2
- aria_expanded = f.index != 'index' ? 'false' : 'true' - aria_expanded = f.index != 'index' ? 'false' : 'true'
a class=['file-heading', collapsed_class] data-toggle="collapse" href="#collapse#{f.index}" aria-expanded="#{aria_expanded}" a class=['file-heading', collapsed_class] data-toggle="collapse" href="#collapse#{f.index}" aria-expanded="#{aria_expanded}"
div.clearfix role="button" div.clearfix role="button"
i class="fa" aria-hidden="true" i.fa-solid aria-hidden="true"
span = f.object.filepath span = f.object.filepath
.card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{f.index}" role="tabpanel" .card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{f.index}" role="tabpanel"
.card-body .card-body

View File

@ -7,7 +7,7 @@
#tips.card.mt-2 role="tab" style="display: block;" #tips.card.mt-2 role="tab" style="display: block;"
.card-header.py-2 .card-header.py-2
i.fa.fa-lightbulb i.fa-solid.fa-lightbulb
= t('exercises.implement.tips.heading') = t('exercises.implement.tips.heading')
.card-body.text-dark.bg-white.p-2 .card-body.text-dark.bg-white.p-2
= render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip, locals: { tip_prefix: '' }) = render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip, locals: { tip_prefix: '' })

View File

@ -29,7 +29,7 @@ h1
.flex-container .flex-container
button.btn.btn-secondary id='play-button' button.btn.btn-secondary id='play-button'
span.fa.fa-play span.fa-solid.fa-play
#submissions-slider.flex-item #submissions-slider.flex-item
input type='range' orient='horizontal' list='datapoints' min=0 max=all_files.length-1 value=0 style="width: 100%" input type='range' orient='horizontal' list='datapoints' min=0 max=all_files.length-1 value=0 style="width: 100%"
datalist#datapoints datalist#datapoints
@ -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-circle-info.align-middle i.fa-solid.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-circle-info.align-middle i.fa-solid.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

@ -21,7 +21,7 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
- if policy(@exercise).detailed_statistics? - if policy(@exercise).detailed_statistics?
span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id)) span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id))
- if feedback.anomaly_notification - if feedback.anomaly_notification
i class="fa fa-envelope-o" data-placement="top" data-toggle="tooltip" data-container="body" title=feedback.anomaly_notification.reason i class="fa-regular fa-envelope" data-placement="top" data-toggle="tooltip" data-container="body" title=feedback.anomaly_notification.reason
span.date = feedback.created_at span.date = feedback.created_at
.card-collapse role="tabpanel" .card-collapse role="tabpanel"
.card-body.feedback .card-body.feedback

View File

@ -11,7 +11,7 @@
span.badge.badge-pill.badge-primary.float-right.score span.badge.badge-pill.badge-primary.float-right.score
h1 id="exercise-headline" h1 id="exercise-headline"
i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa fa-chevron-right' : 'fa fa-chevron-down') i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
= @exercise.title = @exercise.title
#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')

View File

@ -48,7 +48,7 @@ ul.list-unstyled#files
.card-header role="tab" id="heading" .card-header role="tab" id="heading"
a.file-heading.collapsed data-toggle="collapse" data-parent="#files" href=".collapse#{file.id}" a.file-heading.collapsed data-toggle="collapse" data-parent="#files" href=".collapse#{file.id}"
div.clearfix role="button" div.clearfix role="button"
i class="fa" aria-hidden="true" i.fa-solid aria-hidden="true"
span = file.filepath span = file.filepath
.card-collapse.collapse class="collapse#{file.id}" role="tabpanel" .card-collapse.collapse class="collapse#{file.id}" role="tabpanel"
.card-body .card-body

View File

@ -16,7 +16,7 @@ h4.mt-4
div.w-100#chart_stacked div.w-100#chart_stacked
.d-none.badge-info.container.py-2#no_chart_data .d-none.badge-info.container.py-2#no_chart_data
i class="fa fa-info" aria-hidden="true" i class="fa-solid fa-info" aria-hidden="true"
= t('.no_data_yet') = t('.no_data_yet')
h4.mt-4 h4.mt-4
@ -27,9 +27,9 @@ h4.mt-4
thead thead
tr tr
th.text-center th.text-center
i.mr-0 class="fa fa-lightbulb-o" aria-hidden="true" title = t('request_for_comments.solved') i.mr-0 class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved')
th.text-center th.text-center
i.mr-0 class="fa fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" i.mr-0 class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center"
th.col-12 = t('activerecord.attributes.request_for_comments.question') th.col-12 = t('activerecord.attributes.request_for_comments.question')
th = t('activerecord.attributes.request_for_comments.username') th = t('activerecord.attributes.request_for_comments.username')
th.text-nowrap = t('activerecord.attributes.request_for_comments.requested_at') th.text-nowrap = t('activerecord.attributes.request_for_comments.requested_at')

View File

@ -41,7 +41,7 @@ html lang="#{I18n.locale || I18n.default_locale}"
nav.navbar.navbar-dark.bg-dark.navbar-expand-md.mb-4.py-1 role='navigation' nav.navbar.navbar-dark.bg-dark.navbar-expand-md.mb-4.py-1 role='navigation'
.container .container
.navbar-brand .navbar-brand
i.fa.fa-code i.fa-solid.fa-code
= application_name = application_name
button.navbar-toggler data-target='#navbar-collapse' data-toggle='collapse' type='button' aria-expanded='false' aria-label='Toggle navigation' button.navbar-toggler data-target='#navbar-collapse' data-toggle='collapse' type='button' aria-expanded='false' aria-label='Toggle navigation'
span.navbar-toggler-icon span.navbar-toggler-icon

View File

@ -1,9 +1,9 @@
tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment) tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment)
td.p-2 td.p-2
- if request_for_comment.solved? - if request_for_comment.solved?
span.fa.fa-check.fa-2x.text-success aria-hidden="true" span.fa-solid.fa-check.fa-2x.text-success aria-hidden="true"
- elsif request_for_comment.full_score_reached - elsif request_for_comment.full_score_reached
span.fa.fa-check.fa-2x style="color:darkgrey" aria-hidden="true" span.fa-solid.fa-check.fa-2x style="color:darkgrey" aria-hidden="true"
- else - else
= '' = ''
td.text-center = request_for_comment.comments_count td.text-center = request_for_comment.comments_count

View File

@ -18,11 +18,11 @@ h1 = RequestForComment.model_name.human(count: 2)
thead thead
tr tr
th th
i class="fa fa-lightbulb-o" aria-hidden="true" title = t('request_for_comments.solved') align="right" i class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved') align="right"
th = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise')) th = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise'))
th = t('activerecord.attributes.request_for_comments.question') th = t('activerecord.attributes.request_for_comments.question')
th th
i class="fa fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center" i class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center"
th = t('activerecord.attributes.request_for_comments.username') th = t('activerecord.attributes.request_for_comments.username')
th = t('activerecord.attributes.request_for_comments.requested_at') th = t('activerecord.attributes.request_for_comments.requested_at')
th = t('activerecord.attributes.request_for_comments.last_update') th = t('activerecord.attributes.request_for_comments.last_update')
@ -31,10 +31,10 @@ h1 = RequestForComment.model_name.human(count: 2)
tr data-id=request_for_comment.id tr data-id=request_for_comment.id
- if request_for_comment.solved? - if request_for_comment.solved?
td td
span class="fa fa-check" aria-hidden="true" span class="fa-solid fa-check" aria-hidden="true"
- elsif request_for_comment.full_score_reached - elsif request_for_comment.full_score_reached
td td
span class="fa fa-check" style="color:darkgrey" aria-hidden="true" span class="fa-solid fa-check" style="color:darkgrey" aria-hidden="true"
- else - else
td = '' td = ''
td = link_to_if(policy(request_for_comment).show?, request_for_comment.exercise.title, request_for_comment) td = link_to_if(policy(request_for_comment).show?, request_for_comment.exercise.title, request_for_comment)

View File

@ -1,7 +1,7 @@
.list-group .list-group
h4#exercise_caption.list-group-item-heading data-exercise-id="#{@request_for_comment.exercise.id}" data-rfc-id="#{@request_for_comment.id}" h4#exercise_caption.list-group-item-heading data-exercise-id="#{@request_for_comment.exercise.id}" data-rfc-id="#{@request_for_comment.id}"
- if @request_for_comment.solved? - if @request_for_comment.solved?
span.fa.fa-check aria-hidden="true" span.fa-solid.fa-check aria-hidden="true"
= link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise]) = link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise])
p.list-group-item-text p.list-group-item-text
- user = @request_for_comment.user - user = @request_for_comment.user
@ -17,7 +17,7 @@
h5 h5
= t('activerecord.attributes.exercise.description') = t('activerecord.attributes.exercise.description')
.text .text
span.fa.fa-chevron-up.collapse-button span.fa-solid.fa-chevron-up.collapse-button
= render_markdown(@request_for_comment.exercise.description) = render_markdown(@request_for_comment.exercise.description)
.question .question
@ -36,7 +36,7 @@
- if output_runs.size > 0 - if output_runs.size > 0
h5.mt-4= t('request_for_comments.runtime_output') h5.mt-4= t('request_for_comments.runtime_output')
.collapsed.testrun-output.text .collapsed.testrun-output.text
span.fa.fa-chevron-down.collapse-button span.fa-solid.fa-chevron-down.collapse-button
- output_runs.each do |testrun| - output_runs.each do |testrun|
pre= testrun.log or t('request_for_comments.no_output') pre= testrun.log or t('request_for_comments.no_output')
@ -50,7 +50,7 @@
.testrun-container .testrun-container
div class=("result #{testrun.passed ? 'passed' : 'failed'}") div class=("result #{testrun.passed ? 'passed' : 'failed'}")
.collapsed.testrun-output.text .collapsed.testrun-output.text
span.fa.fa-chevron-down.collapse-button span.fa-solid.fa-chevron-down.collapse-button
pre= testrun.log or t('request_for_comments.no_output') pre= testrun.log or t('request_for_comments.no_output')
- if @current_user.admin? && user.is_a?(ExternalUser) - if @current_user.admin? && user.is_a?(ExternalUser)
@ -72,7 +72,7 @@
= (file.path or "") + "/" + file.name + file.file_type.file_extension = (file.path or "") + "/" + file.name + file.file_type.file_extension
br/ br/
|    |   
i.fa.fa-arrow-down aria-hidden="true" i.fa-solid.fa-arrow-down aria-hidden="true"
= t('request_for_comments.click_here') = t('request_for_comments.click_here')
#commentitor.editor data-file-id="#{file.id}" data-mode="#{file.file_type.editor_mode}" data-read-only="true" #commentitor.editor data-file-id="#{file.id}" data-mode="#{file.file_type.editor_mode}" data-read-only="true"
= file.content = file.content
@ -180,7 +180,7 @@ javascript:
<div class="comment-username">' + preprocess(comment.username) + '</div> \ <div class="comment-username">' + preprocess(comment.username) + '</div> \
<div class="comment-date">' + comment.date + '</div> \ <div class="comment-date">' + comment.date + '</div> \
<div class="comment-updated' + (comment.updated ? '' : ' d-none') + '"> \ <div class="comment-updated' + (comment.updated ? '' : ' d-none') + '"> \
<i class="fa fa-pencil" aria-hidden="true"></i> \ <i class="fa-solid fa-pencil" aria-hidden="true"></i> \
#{{ t('request_for_comments.comment_edited') }} \ #{{ t('request_for_comments.comment_edited') }} \
</div> \ </div> \
</div> \ </div> \

View File

@ -2,5 +2,5 @@
// default value for fetch will always be evaluated even if it is not returned // default value for fetch will always be evaluated even if it is not returned
- href_target = local_assigns.fetch(:path, false) || send(:"new_#{model.model_name.singular}_path") - href_target = local_assigns.fetch(:path, false) || send(:"new_#{model.model_name.singular}_path")
a.btn.btn-success href=href_target a.btn.btn-success href=href_target
i.fa.fa-plus i.fa-solid.fa-plus
= t('shared.new_model', model: model.model_name.human) = t('shared.new_model', model: model.model_name.human)

View File

@ -5,7 +5,7 @@
.card-title.mb-0 .card-title.mb-0
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}" a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
.clearfix role="button" .clearfix role="button"
i.fa aria-hidden="true" i.fa-solid aria-hidden="true"
span span
= t('activerecord.models.tip.one') = t('activerecord.models.tip.one')
=< tip_prefix + index.to_s =< tip_prefix + index.to_s

View File

@ -1,8 +1,8 @@
- tip = exercise_tip.tip - tip = exercise_tip.tip
.list-group-item.d-block data-tip-id=tip.id data-id=exercise_tip.id .list-group-item.d-block data-tip-id=tip.id data-id=exercise_tip.id
span.fa.fa-bars.mr-3 span.fa-solid.fa-bars.mr-3
= tip.to_s = tip.to_s
a.fa.fa-eye.ml-2 href=tip_path(tip) target='_blank' a.fa-regular.fa-eye.ml-2 href=tip_path(tip) target='_blank'
a.fa.fa-xmark.ml-2.remove-tip href='#' a.fa-solid.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

@ -3,25 +3,25 @@
class FileTree class FileTree
def file_icon(file) def file_icon(file)
if file.file_type.audio? if file.file_type.audio?
'fa fa-file-audio-o' 'fa-regular fa-file-audio'
elsif file.file_type.image? elsif file.file_type.image?
'fa fa-file-image-o' 'fa-regular fa-file-image'
elsif file.file_type.video? elsif file.file_type.video?
'fa fa-file-video-o' 'fa-regular fa-file-video'
elsif file.read_only? elsif file.read_only?
'fa fa-lock' 'fa-solid fa-lock'
elsif file.file_type.executable? elsif file.file_type.executable?
'fa fa-file-code-o' 'fa-regular fa-file-code'
elsif file.file_type.renderable? elsif file.file_type.renderable?
'fa fa-file-text-o' 'fa-regular fa-file-text'
else else
'fa fa-file-o' 'fa-regular fa-file'
end end
end end
private :file_icon private :file_icon
def folder_icon def folder_icon
'fa fa-folder-o' 'fa-regular fa-folder'
end end
private :folder_icon private :folder_icon

View File

@ -26,7 +26,7 @@ describe ApplicationHelper do
describe '#empty' do describe '#empty' do
it "builds an 'i' tag" do it "builds an 'i' tag" do
expect(empty).to have_css('i.empty.fa.fa-minus') expect(empty).to have_css('i.empty.fa-solid.fa-minus')
end end
end end
@ -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-xmark') expect(no).to have_css('i.fa-solid.fa-xmark')
end end
end end
@ -141,7 +141,7 @@ describe ApplicationHelper do
describe '#yes' do describe '#yes' do
it "builds an 'i' tag" do it "builds an 'i' tag" do
expect(yes).to have_css('i.fa.fa-check') expect(yes).to have_css('i.fa-solid.fa-check')
end end
end end
end end

View File

@ -13,7 +13,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_mp3)) } let(:file) { build(:file, file_type: build(:dot_mp3)) }
it 'is an audio file icon' do it 'is an audio file icon' do
expect(file_icon).to include('fa-file-audio-o') expect(file_icon).to include('fa-file-audio')
expect(file_icon).to include('fa-regular')
end end
end end
@ -21,7 +22,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_jpg)) } let(:file) { build(:file, file_type: build(:dot_jpg)) }
it 'is an image file icon' do it 'is an image file icon' do
expect(file_icon).to include('fa-file-image-o') expect(file_icon).to include('fa-file-image')
expect(file_icon).to include('fa-regular')
end end
end end
@ -29,7 +31,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_mp4)) } let(:file) { build(:file, file_type: build(:dot_mp4)) }
it 'is a video file icon' do it 'is a video file icon' do
expect(file_icon).to include('fa-file-video-o') expect(file_icon).to include('fa-file-video')
expect(file_icon).to include('fa-regular')
end end
end end
end end
@ -40,6 +43,7 @@ describe FileTree do
it 'is a lock icon' do it 'is a lock icon' do
expect(file_icon).to include('fa-lock') expect(file_icon).to include('fa-lock')
expect(file_icon).to include('fa-solid')
end end
end end
@ -47,7 +51,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_py)) } let(:file) { build(:file, file_type: build(:dot_py)) }
it 'is a code file icon' do it 'is a code file icon' do
expect(file_icon).to include('fa-file-code-o') expect(file_icon).to include('fa-file-code')
expect(file_icon).to include('fa-regular')
end end
end end
@ -55,7 +60,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_svg)) } let(:file) { build(:file, file_type: build(:dot_svg)) }
it 'is a text file icon' do it 'is a text file icon' do
expect(file_icon).to include('fa-file-text-o') expect(file_icon).to include('fa-file-text')
expect(file_icon).to include('fa-regular')
end end
end end
@ -63,7 +69,8 @@ describe FileTree do
let(:file) { build(:file, file_type: build(:dot_md)) } let(:file) { build(:file, file_type: build(:dot_md)) }
it 'is a generic file icon' do it 'is a generic file icon' do
expect(file_icon).to include('fa-file-o') expect(file_icon).to include('fa-file')
expect(file_icon).to include('fa-regular')
end end
end end
end end
@ -71,7 +78,8 @@ describe FileTree do
describe '#folder_icon' do describe '#folder_icon' do
it 'is a folder icon' do it 'is a folder icon' do
expect(file_tree.send(:folder_icon)).to include('fa-folder-o') expect(file_tree.send(:folder_icon)).to include('fa-folder')
expect(file_tree.send(:folder_icon)).to include('fa-regular')
end end
end end