on-the-fly: add a 'parent' option to pass parent context. So we could now display resource.comment below the renderbox.

This commit is contained in:
2022-01-12 20:26:54 +01:00
parent c9e3960238
commit ecda740d81
7 changed files with 63 additions and 8 deletions

View File

@@ -10,6 +10,7 @@
* action string 'show', 'edit', 'create'
* buttonText string
* displayBadge boolean (default: false) replace button by badge, need to define buttonText for content
* parent object (optional) pass parent context of the targetEntity (used for course resource comment)
#}
<span class="onthefly-container"
@@ -31,6 +32,10 @@
data-display-badge="true"
{% endif %}
{% if parent is defined %}
data-parent='{{ parent|json_encode }}'
{% endif %}
></span>
{{ encore_entry_script_tags('vue_onthefly') }}