mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
improve activity list
This commit is contained in:
parent
9f5086e9c1
commit
982c704f6c
@ -1,43 +1,29 @@
|
|||||||
// Access to Bootstrap variables and mixins
|
// Access to Bootstrap variables and mixins
|
||||||
@import '~ChillMainAssets/module/bootstrap/shared';
|
@import '~ChillMainAssets/module/bootstrap/shared';
|
||||||
|
|
||||||
//@import '~ChillMainSass/custom/mixins/entity';
|
// activity creation first step: select type page
|
||||||
|
div.new-activity-select-type {
|
||||||
|
div.activity-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
//.chill-entity.chill-entity__activity-reason {
|
div.bloc {
|
||||||
// @include entity($chill-pink, white);
|
width: 200px;
|
||||||
//}
|
align-self: flex-end;
|
||||||
|
height: 140px;
|
||||||
.activity {
|
display: flex;
|
||||||
//color: $chill-green;
|
justify-content: center;
|
||||||
}
|
align-items: center;
|
||||||
|
|
||||||
// exceptions for flex-bloc in concerned-groups
|
|
||||||
div.flex-bloc.concerned-groups {
|
|
||||||
margin-top: 1em;
|
|
||||||
div.item-bloc {
|
|
||||||
flex-grow: 0; flex-shrink: 0; flex-basis: 25%; //4 blocs
|
|
||||||
ul.list-content {
|
|
||||||
list-style-type: none;
|
|
||||||
padding-left: 0;
|
|
||||||
li {
|
|
||||||
margin-bottom: 0.2em;
|
|
||||||
a {
|
|
||||||
color: white;
|
|
||||||
cursor: pointer;
|
|
||||||
&:hover {
|
|
||||||
color: #ffffffab;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.person div.item-bloc {
|
|
||||||
flex-basis: 33%; //3 blocs
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// exceptions for flex-table in list-records
|
// exceptions for flex-table in list-records
|
||||||
div.flex-table.list-records {
|
div.activity-list {
|
||||||
|
div.flex-table {
|
||||||
div.item-bloc {
|
div.item-bloc {
|
||||||
div.item-row.main {
|
div.item-row.main {
|
||||||
div.item-col {
|
div.item-col {
|
||||||
@ -54,10 +40,10 @@ div.flex-table.list-records {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
li.social-issues .badge-primary {
|
li.social-issues .badge-primary {
|
||||||
background-color: var(--chill-orange);
|
background-color: $orange;
|
||||||
}
|
}
|
||||||
li.social-actions .badge-primary {
|
li.social-actions .badge-primary {
|
||||||
background-color: var(--chill-green);
|
background-color: $green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,20 +99,31 @@ div.flex-table.list-records {
|
|||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
div.activity-row {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 12px;
|
|
||||||
div.bloc {
|
|
||||||
width: 200px;
|
|
||||||
align-self: flex-end;
|
|
||||||
height: 140px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// exceptions for flex-bloc in concerned-groups
|
||||||
|
div.flex-bloc.concerned-groups {
|
||||||
|
margin-top: 1em;
|
||||||
|
div.item-bloc {
|
||||||
|
flex-grow: 0; flex-shrink: 0; flex-basis: 25%; //4 blocs
|
||||||
|
ul.list-content {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 0;
|
||||||
|
li {
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
a {
|
||||||
|
color: $white;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: #ffffffab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.person div.item-bloc {
|
||||||
|
flex-basis: 33%; //3 blocs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,24 +1,13 @@
|
|||||||
{% set person_id = null %}
|
<div class="activity-list context-{{ context }}">
|
||||||
{% if person %}
|
|
||||||
{% set person_id = person.id %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% set accompanying_course_id = null %}
|
{% if activities|length == 0 %}
|
||||||
{% if accompanyingCourse %}
|
|
||||||
{% set accompanying_course_id = accompanyingCourse.id %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h2>{{ 'Activity list' |trans }}</h2>
|
|
||||||
|
|
||||||
{% if activities|length == 0 %}
|
|
||||||
<p class="chill-no-data-statement">
|
<p class="chill-no-data-statement">
|
||||||
{{ "There isn't any activities."|trans }}
|
{{ "There isn't any activities."|trans }}
|
||||||
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-create button-small"></a>
|
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-sm btn-create"></a>
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
|
||||||
|
|
||||||
<div class="flex-table list-records context-{{ context }}">
|
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<div class="flex-table">
|
||||||
{% for activity in activities %}
|
{% for activity in activities %}
|
||||||
{% set t = activity.type %}
|
{% set t = activity.type %}
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
@ -87,9 +76,7 @@
|
|||||||
|
|
||||||
{%- if t.reasonsVisible -%}
|
{%- if t.reasonsVisible -%}
|
||||||
<li>
|
<li>
|
||||||
{%- if activity.reasons is empty -%}
|
{%- if activity.reasons is not empty -%}
|
||||||
<span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span>
|
|
||||||
{%- else -%}
|
|
||||||
{% for r in activity.reasons %}
|
{% for r in activity.reasons %}
|
||||||
{{ r|chill_entity_render_box }}
|
{{ r|chill_entity_render_box }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -99,9 +86,7 @@
|
|||||||
|
|
||||||
{%- if t.socialIssuesVisible %}
|
{%- if t.socialIssuesVisible %}
|
||||||
<li class="social-issues">
|
<li class="social-issues">
|
||||||
{%- if activity.socialIssues is empty -%}
|
{%- if activity.socialIssues is not empty -%}
|
||||||
<span class="chill-no-data-statement">{{ 'No social issues associated'|trans }}</span>
|
|
||||||
{%- else -%}
|
|
||||||
{% for r in activity.socialIssues %}
|
{% for r in activity.socialIssues %}
|
||||||
{{ r|chill_entity_render_box }}
|
{{ r|chill_entity_render_box }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -111,9 +96,7 @@
|
|||||||
|
|
||||||
{%- if t.socialActionsVisible -%}
|
{%- if t.socialActionsVisible -%}
|
||||||
<li class="social-actions">
|
<li class="social-actions">
|
||||||
{%- if activity.socialActions is empty -%}
|
{%- if activity.socialActions is not empty -%}
|
||||||
<span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span>
|
|
||||||
{%- else -%}
|
|
||||||
{% for r in activity.socialActions %}
|
{% for r in activity.socialActions %}
|
||||||
<span class="badge bg-primary">{{ r.title|localize_translatable_string }}</span>
|
<span class="badge bg-primary">{{ r.title|localize_translatable_string }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -174,16 +157,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if context != 'person' %}
|
</div>
|
||||||
{# TODO set this condition in configuration #}
|
|
||||||
<ul class="record_actions">
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-create">
|
|
||||||
{{ 'Add a new activity' | trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
@ -5,5 +5,27 @@
|
|||||||
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
|
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{% set person_id = null %}
|
||||||
|
{% if person %}
|
||||||
|
{% set person_id = person.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set accompanying_course_id = null %}
|
||||||
|
{% if accompanyingCourse %}
|
||||||
|
{% set accompanying_course_id = accompanyingCourse.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h1>{{ 'Activity list' |trans }}</h1>
|
||||||
|
|
||||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse'} %}
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||||
|
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-create">
|
||||||
|
{{ 'Add a new activity' | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -21,5 +21,27 @@
|
|||||||
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
|
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
|
||||||
|
|
||||||
{% block personcontent %}
|
{% block personcontent %}
|
||||||
|
|
||||||
|
{% set person_id = null %}
|
||||||
|
{% if person %}
|
||||||
|
{% set person_id = person.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set accompanying_course_id = null %}
|
||||||
|
{% if accompanyingCourse %}
|
||||||
|
{% set accompanying_course_id = accompanyingCourse.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h1>{{ 'Activity list' |trans }}</h1>
|
||||||
|
|
||||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %}
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %}
|
||||||
|
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}"
|
||||||
|
class="btn btn-create disabled" tabindex="-1" role="button" aria-disabled="true">{{ 'Add a new activity' | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<h2 class="chill-red">{{ "Activity creation"|trans }}</h2>
|
<div class="new-activity-select-type">
|
||||||
|
<h2 class="chill-red">{{ "Activity creation"|trans }}</h2>
|
||||||
|
|
||||||
{# TODO: refaire l'html css des tuilles #}
|
{# TODO: refaire l'html css des tuilles #}
|
||||||
|
|
||||||
{% for row in data %}
|
{% for row in data %}
|
||||||
<h3>{{ row.activityTypeCategory.name|localize_translatable_string }}</h3>
|
<h3>{{ row.activityTypeCategory.name|localize_translatable_string }}</h3>
|
||||||
<div class="activity-row">
|
<div class="activity-row">
|
||||||
{% for activityType in row.activityTypes %}
|
{% for activityType in row.activityTypes %}
|
||||||
@ -25,4 +26,5 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
|
||||||
|
|
||||||
<div class="associated-persons mb-5">
|
<div class="associated-persons mb-5">
|
||||||
<h2 class="mb-3">{{ 'Associated peoples'|trans }}</h2>
|
<h2 class="mb-3">{{ 'Associated peoples'|trans }}</h2>
|
||||||
<div class="flex-table mb-3">
|
<div class="flex-table mb-3">
|
||||||
@ -119,8 +121,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block contentActivity %}
|
{% block contentActivity %}
|
||||||
<div class="activity mb-5">
|
<div class="activities mb-5">
|
||||||
{% set person = null %}
|
{% set person = null %}
|
||||||
|
|
||||||
|
{% set person_id = null %}
|
||||||
|
{% if person %}
|
||||||
|
{% set person_id = person.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set accompanying_course_id = null %}
|
||||||
|
{% if accompanyingCourse %}
|
||||||
|
{% set accompanying_course_id = accompanyingCourse.id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h2>{{ 'Activity list' |trans }}</h2>
|
||||||
|
|
||||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user