mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 22:46:13 +00:00
display all aside activities created for and created by user with temporary badge
This commit is contained in:
parent
601c16ac27
commit
d2ce4865c0
@ -17,7 +17,8 @@ final class AsideActivityController extends CRUDController
|
|||||||
$qb = parent::buildQueryEntities($action, $request);
|
$qb = parent::buildQueryEntities($action, $request);
|
||||||
|
|
||||||
if ('index' === $action) {
|
if ('index' === $action) {
|
||||||
$qb->andWhere($qb->expr()->eq('e.agent', ':user'));
|
$qb->where($qb->expr()->eq('e.agent', ':user'));
|
||||||
|
$qb->orWhere($qb->expr()->eq('e.createdBy', ':user'));
|
||||||
$qb->setParameter('user', $this->getUser());
|
$qb->setParameter('user', $this->getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
class="flex-table my-4 list-records">
|
class="flex-table my-4 list-records">
|
||||||
{# Sort activities according to date in descending order #}
|
{# Sort activities according to date in descending order #}
|
||||||
{% for entity in entities %}
|
{% for entity in entities %}
|
||||||
{% set t = entity.type %}
|
|
||||||
|
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
<div class="item-row main">
|
<div class="item-row main">
|
||||||
@ -29,6 +28,10 @@
|
|||||||
<b>{{ entity.type.title | localize_translatable_string }}</b>
|
<b>{{ entity.type.title | localize_translatable_string }}</b>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
<p>{{ 'Created for' | trans }}
|
||||||
|
:
|
||||||
|
{{ entity.agent }}</p>
|
||||||
|
|
||||||
{% if entity.date %}
|
{% if entity.date %}
|
||||||
<p>{{ entity.date|format_date('long') }}</p>
|
<p>{{ entity.date|format_date('long') }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -43,34 +46,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<ul class="list-content">
|
<ul class="list-content">
|
||||||
{% if entity.createdBy %}
|
<li style="list-style-type: none;">
|
||||||
<li>
|
<span class="{{ entity.createdBy is same as app.user ? 'badge bg-chill-pink' : 'badge bg-chill-yellow' }}">
|
||||||
<b>{{ 'Created by: '|trans }}{{ entity.createdBy.usernameCanonical }}</b>
|
<b>{{ 'Created by'|trans }}
|
||||||
</li>
|
:
|
||||||
{% endif %}
|
{{ entity.createdBy.usernameCanonical }}</b>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# {%
|
|
||||||
if entity.note is not empty
|
|
||||||
or entity.createdBy|length > 0
|
|
||||||
%}
|
|
||||||
<div class="item-row details">
|
|
||||||
{% if entity.note is not empty %}
|
|
||||||
<div class="item-col comment">
|
|
||||||
{{ entity.note|chill_markdown_to_html }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{% endif %} #}
|
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<ul class="list-content">
|
<ul class="list-content">
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ chill_path_add_return_path('chill_crud_aside_activity_edit', { 'id': entity.id }) }}" class="btn btn-update btn-mini "></a>
|
<a href="{{ chill_path_add_return_path('chill_crud_aside_activity_edit', { 'id': entity.id }) }}" class="btn btn-update btn-mini "></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ chill_path_add_return_path('chill_crud_aside_activity_delete', { 'id': entity.id } ) }}" class="btn btn-delete btn-mini"></a>
|
<a href="{{ chill_path_add_return_path('chill_crud_aside_activity_delete', { 'id': entity.id } ) }}" class="btn btn-delete btn-mini"></a>
|
||||||
</li>
|
</li>
|
||||||
@ -82,7 +74,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ chill_pagination(paginator) }}
|
{{ chill_pagination(paginator) }}
|
||||||
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
|
@ -62,7 +62,8 @@ Note: Note
|
|||||||
#list
|
#list
|
||||||
My aside activities: Mes activités annexes
|
My aside activities: Mes activités annexes
|
||||||
Date: Date
|
Date: Date
|
||||||
Created by: Creér par
|
Created by: Créé par
|
||||||
|
Created for: Créé pour
|
||||||
|
|
||||||
#Aside activity delete
|
#Aside activity delete
|
||||||
Delete aside activity: Supprimer une activité annexe
|
Delete aside activity: Supprimer une activité annexe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user