Add admin UI to assign tips to exercises

This commit is contained in:
Sebastian Serth
2020-10-14 12:25:52 +02:00
parent 44ab28d6fe
commit 2678d9ecdf
14 changed files with 232 additions and 33 deletions

View File

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