mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Finishing evaluation document view and fixing dropdown in show
This commit is contained in:
parent
d8d517017d
commit
3576f7f14f
@ -5,7 +5,8 @@
|
||||
# - displayAction: [true|false] default: false
|
||||
# - displayFontSmall: [true|false] default: false
|
||||
#}
|
||||
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<div
|
||||
class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
|
||||
<div class="item-row">
|
||||
<h2 class="badge-title">
|
||||
@ -111,8 +112,9 @@
|
||||
</div>
|
||||
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
<div
|
||||
class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
</div>
|
||||
@ -121,42 +123,43 @@
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row separator">
|
||||
|
||||
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
||||
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
||||
|
||||
<div class="item-col item-meta">
|
||||
{{ macro.metadata(w) }}
|
||||
</div>
|
||||
|
||||
{% if displayAction is defined and displayAction == true %}
|
||||
<ul class="item-col record_actions">
|
||||
<ul class="item-col record_actions">
|
||||
{% if displayNotification is defined and displayNotification == true %}
|
||||
<li>
|
||||
<a class="btn btn-notify btn-outline-primary" title="{{ 'notification.Notify'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id}) }}">
|
||||
|
||||
<li>
|
||||
<a class="btn btn-notify btn-outline-primary" title="{{ 'notification.Notify'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id}) }}">
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ macro.workflowButton(w) }}</li>
|
||||
<li>
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>{{ macro.workflowButton(w) }}</li>
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -164,47 +167,50 @@
|
||||
</div>
|
||||
|
||||
{#
|
||||
# This is for 'long' version of content
|
||||
# Note: this include is wrapped in a flex-table container.
|
||||
# We start by closing the flex-table so we can add more.
|
||||
# At the end we leave the last flex-table open, as it will be closed in the container.
|
||||
# This is for 'long' version of content
|
||||
# Note: this include is wrapped in a flex-table container.
|
||||
# We start by closing the flex-table so we can add more.
|
||||
# At the end we leave the last flex-table open, as it will be closed in the container.
|
||||
#}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
</div>
|
||||
|
||||
{% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<h2 class="chill-blue">{{ 'Dispositifs' }}</h2>
|
||||
|
||||
<div class="flex-table">{# new flex-table wrapper #}
|
||||
<div
|
||||
class="item-bloc colored{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<h2 class="chill-blue">{{ 'Dispositifs' }}</h2>
|
||||
<h2 class="chill-blue">{{ 'Comments'|trans }}</h2>
|
||||
|
||||
<div class="flex-table">{# new flex-table wrapper #}
|
||||
<div class="item-bloc colored{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
</div>
|
||||
<div class="flex-table">
|
||||
<div
|
||||
class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Public</h3>
|
||||
{% if w.note is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ w.note|chill_entity_render_box({'metadata': true }) }}
|
||||
</blockquote>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if w.privateComment.hasCommentForUser(app.user) %}
|
||||
<div
|
||||
class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Privé</h3>
|
||||
<blockquote class="chill-user-quote private-quote">
|
||||
{{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2 class="chill-blue">{{ 'Comments'|trans }}</h2>
|
||||
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Public</h3>
|
||||
{% if w.note is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ w.note|chill_entity_render_box({'metadata': true }) }}
|
||||
</blockquote>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if w.privateComment.hasCommentForUser(app.user) %}
|
||||
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Privé</h3>
|
||||
<blockquote class="chill-user-quote private-quote">
|
||||
{{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Here flex-table stay open ! read above #}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -118,9 +118,15 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
{% if recordAction is defined %}
|
||||
{{ recordAction }}
|
||||
{% endif %}
|
||||
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
|
||||
{% if e.comment is not empty %}
|
||||
@ -136,9 +142,9 @@
|
||||
<tr class="border-0">
|
||||
<td class="border-0">{{ d.title }}</td>
|
||||
<td class="border-0">{{ mm.mimeIcon(d.storedObject.type) }}</td>
|
||||
<td class="border-0">
|
||||
<a class="btn btn-notify btn-sm btn-outline-primary" title="{{ 'notification.Notify'|trans }} " href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'entityId': d.id}) }}"></a>
|
||||
</td>
|
||||
<td class="border-0">
|
||||
<a class="btn btn-notify btn-sm btn-outline-primary" title="{{ 'notification.Notify'|trans }} " href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'entityId': d.id}) }}"></a>
|
||||
</td>
|
||||
<td class="border-0 text-end">{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -26,7 +26,8 @@
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'itemBlocClass': ''
|
||||
'itemBlocClass': '',
|
||||
'displayNotification': true
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -43,10 +43,10 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item" title="{{ 'notification.Notify referrer'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id, 'tos': [accompanyingCourse.user.id]}) }}"></a>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id, 'tos': [accompanyingCourse.user.id]}) }}">{{ 'notification.Notify referrer'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item btn-outline-primary" title="{{ 'notification.Notify any'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}"></a>
|
||||
<a class="dropdown-item btn-outline-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}">"{{ 'notification.Notify any'|trans }}"</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
|
@ -1,8 +1,17 @@
|
||||
{% macro recordAction(document) %}
|
||||
<li>
|
||||
<a href={{ path('chill_person_accompanying_period_work_list', { 'id': accompanyingCourse.id }) }}""
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
</li>
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
<div class="item-row">
|
||||
|
||||
<table class="table table-bordered border-dark mt-4 mx-auto">
|
||||
<tr>
|
||||
<td class="text-lg-center text-bg-primary">{{ document.title }}</td>
|
||||
<td class="text-lg-center m-3">{{ mm.mimeIcon(document.storedObject.type) }}</td>
|
||||
<td class="record-actions text-lg-center"><a
|
||||
href="{{ path('chill_person_accompanying_period_work_show', { 'id': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork.id }) }}"
|
||||
class="btn btn-show" title="{{ 'See the document'|trans }}"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% if document is not null %}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% macro recordAction(work) %}
|
||||
<li>
|
||||
<a href={{ path('chill_person_accompanying_period_work_list', { 'id': accompanyingCourse.id }) }}""
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': work.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
{% if work is not null %}
|
||||
@ -12,6 +13,7 @@
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'displayNotification:':true,
|
||||
'w': work
|
||||
} %}
|
||||
{% else %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user