added logic to hide the show/hide autosaves feature for users without permission to view detailed_statistics
This commit is contained in:

committed by
Sebastian Serth

parent
184c9cba6d
commit
66d9a2b22a
@ -38,17 +38,18 @@ h1
|
|||||||
option data-submission=submission
|
option data-submission=submission
|
||||||
=index
|
=index
|
||||||
- index += 1
|
- index += 1
|
||||||
.bg-light.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between
|
- if policy(@exercise).detailed_statistics?
|
||||||
- if @show_autosaves
|
.bg-light.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between
|
||||||
span.pl-1.pb-1
|
- if @show_autosaves
|
||||||
i.fa.fa-info-circle.align-middle
|
span.pl-1.pb-1
|
||||||
small.mr-5.ml-1 = t('.toggle_status_on')
|
i.fa.fa-info-circle.align-middle
|
||||||
= link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-dark float-right btn-sm"
|
small.mr-5.ml-1 = t('.toggle_status_on')
|
||||||
- else
|
= link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-dark float-right btn-sm"
|
||||||
span.pl-1.pb-1
|
- else
|
||||||
i.fa.fa-info-circle.align-middle
|
span.pl-1.pb-1
|
||||||
small.mr-5.ml-1 = t('.toggle_status_off')
|
i.fa.fa-info-circle.align-middle
|
||||||
= link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: "btn btn-outline-dark float-right btn-sm"
|
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"
|
||||||
#timeline
|
#timeline
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table
|
table.table
|
||||||
|
Reference in New Issue
Block a user