|
5 | 5 | - hide_rfc_button = @hide_rfc_button || false |
6 | 6 |
|
7 | 7 | # editor. row data-exercise-id[email protected] data-message-depleted=t( 'exercises.editor.depleted') data-message-timeout=t( 'exercises.editor.timeout', permitted_execution_time: @exercise.execution_environment.permitted_execution_time) data-message-out-of-memory=t('exercises.editor.out_of_memory', memory_limit: @exercise.execution_environment.memory_limit) data-submissions-url=submissions_path data-user-external-id=external_user_external_id data-working-times-url=working_times_exercise_path(@exercise) data-intervention-save-url=intervention_exercise_path(@exercise) data-rfc-interventions=show_rfc_interventions data-break-interventions=show_break_interventions data-tips-interventions=show_tips_interventions |
8 | | - - unless @embed_options[:hide_sidebar] |
9 | | - - additional_classes = 'sidebar-col' |
10 | | - - if @tips.blank? |
11 | | - - if @exercise.hide_file_tree |
12 | | - - additional_classes = 'sidebar-col-collapsed' |
13 | | - - else |
14 | | - - additional_classes = 'sidebar-col w-25' |
15 | | - #sidebar class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files) |
| 8 | + div id="panel-left" class="col-12 col-lg-3" |
| 9 | + - unless @embed_options[:hide_sidebar] |
| 10 | + - additional_classes = 'sidebar-col row' |
| 11 | + - if @tips.blank? |
| 12 | + - if @exercise.hide_file_tree |
| 13 | + - additional_classes = 'sidebar-col-collapsed row' |
| 14 | + - else |
| 15 | + - additional_classes = 'sidebar-col row' |
| 16 | + #sidebar class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files) |
16 | 17 |
|
17 | | - .editor-col.col.p-0#frames |
18 | | - #editor-buttons.btn-group.enforce-bottom-margin |
19 | | - = render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy')) |
20 | | - = render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button] |
21 | | - span.flex-grow-1.d-inline-flex#run-stop-button-group data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=t('shared.tooltips.shortcut', shortcut: 'ALT + r') |
22 | | - = 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')}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run] |
23 | | - = render('editor_button', icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run] |
24 | | - = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-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] |
25 | | - = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-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] |
26 | | - - unless hide_rfc_button |
27 | | - = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-container': 'body'}, icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) |
| 18 | + #resizerHorizontal.d-none.d-lg-block |
| 19 | + div.col.p-0#frames |
| 20 | + #panel-right.col |
| 21 | + #editor-buttons.btn-group.enforce-bottom-margin |
| 22 | + = render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy')) |
| 23 | + = render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button] |
| 24 | + span.flex-grow-1.overflow-hidden.d-inline-flex#run-stop-button-group data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=t('shared.tooltips.shortcut', shortcut: 'ALT + r') |
| 25 | + = 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')}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run] |
| 26 | + = render('editor_button', icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run] |
| 27 | + = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-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] |
| 28 | + = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-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] |
| 29 | + - unless hide_rfc_button |
| 30 | + = render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-container': 'body'}, icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) |
| 31 | + .panel-top |
| 32 | + - @files.each do |file| |
| 33 | + - file.read_only = true if @embed_options[:read_only] |
| 34 | + = render('editor_frame', exercise:, file:) |
28 | 35 |
|
29 | | - - @files.each do |file| |
30 | | - - file.read_only = true if @embed_options[:read_only] |
31 | | - = render('editor_frame', exercise:, file:) |
32 | | - |
33 | | - #statusbar.d-flex.justify-content-between |
34 | | - div |
35 | | - - if !@embed_options[:disable_download] && @exercise.hide_file_tree? |
36 | | - button#download.p-0.border-0.btn-link.visible.bg-body.text-primary |
37 | | - i.fa-solid.fa-arrow-down |
38 | | - = t('exercises.editor.download') |
39 | | - |
40 | | - div |
| 36 | + #statusbar.d-flex.justify-content-between |
| 37 | + div |
| 38 | + - if !@embed_options[:disable_download] && @exercise.hide_file_tree? |
| 39 | + button#download.p-0.border-0.btn-link.visible.bg-body.text-primary |
| 40 | + i.fa-solid.fa-arrow-down |
| 41 | + = t('exercises.editor.download') |
| 42 | + div |
41 | 43 | ruby: |
42 | 44 | if current_contributor.programming_group? |
43 | 45 | current_contributor.users.each do |user| |
|
53 | 55 | = t('exercises.editor.lastsaved') |
54 | 56 | span#autosave |
55 | 57 |
|
56 | | - = ' | ' |
57 | | - |
58 | | - button#start-over-active-file.p-0.border-0.btn-link.bg-body.text-primary data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise) |
59 | | - i.fa-solid.fa-circle-notch.fa-spin.d-none |
60 | | - i.fa-solid.fa-clock-rotate-left |
61 | | - = t('exercises.editor.start_over_active_file') |
| 58 | + = ' | ' |
62 | 59 |
|
63 | | - - unless @embed_options[:disable_run] && @embed_options[:disable_score] |
64 | | - .output-col-collapsed#output_sidebar = render('exercises/editor_output') |
| 60 | + button#start-over-active-file.p-0.border-0.btn-link.bg-body.text-primary data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise) |
| 61 | + i.fa-solid.fa-circle-notch.fa-spin.d-none |
| 62 | + i.fa-solid.fa-clock-rotate-left |
| 63 | + = t('exercises.editor.start_over_active_file') |
| 64 | + #resizerVertical.d-none |
| 65 | + .panel-bottom |
| 66 | + - unless @embed_options[:disable_run] && @embed_options[:disable_score] |
| 67 | + .output-col-collapsed#output_sidebar = render('exercises/editor_output') |
65 | 68 |
|
66 | 69 | - unless @embed_options[:disable_rfc] |
67 | 70 | = render 'shared/modal', |
|
0 commit comments