Merge branch 'bootstrap5' into add-location-period

This commit is contained in:
Mathieu Jaumotte 2021-08-02 16:20:58 +02:00
commit 7665181d44
491 changed files with 4555 additions and 18370 deletions

View File

@ -52,7 +52,7 @@
"knplabs/knp-time-bundle": "^1.12", "knplabs/knp-time-bundle": "^1.12",
"symfony/intl": "4.*", "symfony/intl": "4.*",
"symfony/swiftmailer-bundle": "^3.5", "symfony/swiftmailer-bundle": "^3.5",
"league/csv": "^9.6", "league/csv": "^9.7.1",
"phpoffice/phpspreadsheet": "^1.16", "phpoffice/phpspreadsheet": "^1.16",
"symfony/browser-kit": "^5.2", "symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2", "symfony/css-selector": "^5.2",

View File

@ -0,0 +1,129 @@
// Access to Bootstrap variables and mixins
@import '~ChillMainAssets/module/bootstrap/shared';
// 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;
div.bloc {
width: 200px;
align-self: flex-end;
height: 140px;
display: flex;
justify-content: center;
align-items: center;
}
}
}
// exceptions for flex-table in list-records
div.activity-list {
div.flex-table {
div.item-bloc {
div.item-row.main {
div.item-col {
&:first-child {
flex-basis: 27%;
}
ul.list-content {
li.social-issues, li.social-actions {
.badge-primary {
font-variant: small-caps;
font-weight: bold;
font-size: 88%;
margin-bottom: 0.2em;
}
}
li.social-issues .badge-primary {
background-color: $orange;
}
li.social-actions .badge-primary {
background-color: $green;
}
}
}
}
div.item-row.details {
flex-direction: row;
& > div.item-col {
justify-content: flex-start;
align-self: center;
&:nth-child(1) {
flex-grow: 1; flex-shrink: 0; flex-basis: 30%;
}
&:nth-child(2) {
flex-grow: 0; flex-shrink: 1; flex-basis: 70%;
}
&:only-child {
flex-grow: 0; flex-shrink: 0; flex-basis: 100%;
& > div.concerned-groups {
flex-grow: 0; flex-shrink: 0; flex-basis: 100%;
display: flex;
flex-direction: column; // TODO pas fini
div.group {
flex-grow: 1; flex-shrink: 0; flex-basis: 30%;
h4 {}
ul.list-content {
li {
display: inline;
}
}
}
}
}
}
div.concerned-groups {
font-size: 85%;
h4 {
text-transform: uppercase;
}
}
}
ul.list-content {
list-style-type: none;
padding-left: 1em;
margin: 0 0;
li {
margin-bottom: 0.2em;
}
}
}
div.duration {
font-size: smaller;
padding-left: 1em;
margin-top: 1em;
}
}
}
// 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
}
}

View File

@ -0,0 +1 @@
require('./chillactivity.scss');

View File

@ -1 +0,0 @@
require('./scss/chillactivity.scss');

View File

@ -1,130 +0,0 @@
@import '~ChillMainAssets/modules/bootstrap/bootstrap';
//@import '~ChillMainSass/custom/mixins/entity';
//.chill-entity.chill-entity__activity-reason {
// @include entity($chill-pink, white);
//}
.activity {
color: $chill-green;
}
// 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
div.flex-table.list-records {
div.item-bloc {
div.item-row.main {
div.item-col {
&:first-child {
flex-basis: 27%;
}
ul.list-content {
li.social-issues, li.social-actions {
.badge-primary {
font-variant: small-caps;
font-weight: bold;
font-size: 88%;
margin-bottom: 0.2em;
}
}
li.social-issues .badge-primary {
background-color: var(--chill-orange);
}
li.social-actions .badge-primary {
background-color: var(--chill-green);
}
}
}
}
div.item-row.details {
flex-direction: row;
& > div.item-col {
justify-content: flex-start;
align-self: center;
&:nth-child(1) {
flex-grow: 1; flex-shrink: 0; flex-basis: 30%;
}
&:nth-child(2) {
flex-grow: 0; flex-shrink: 1; flex-basis: 70%;
}
&:only-child {
flex-grow: 0; flex-shrink: 0; flex-basis: 100%;
& > div.concerned-groups {
flex-grow: 0; flex-shrink: 0; flex-basis: 100%;
display: flex;
flex-direction: column; // TODO pas fini
div.group {
flex-grow: 1; flex-shrink: 0; flex-basis: 30%;
h4 {}
ul.list-content {
li {
display: inline;
}
}
}
}
}
}
div.concerned-groups {
font-size: 85%;
h4 {
text-transform: uppercase;
}
}
}
ul.list-content {
list-style-type: none;
padding-left: 1em;
margin: 0 0;
li {
margin-bottom: 0.2em;
}
}
}
div.duration {
font-size: smaller;
padding-left: 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;
}
}

View File

@ -60,7 +60,10 @@
<li> <li>
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}"> <a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
<span class="badge bg-primary"> <span class="badge bg-primary">
{{ item|chill_entity_render_box({'only_denomination': true}) }} {{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
</span> </span>
</a> </a>
</li> </li>
@ -72,7 +75,7 @@
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% if (with_display == 'row') %} {% if (with_display == 'row') %}
<div class="concerned-groups"> <div class="concerned-groups">
{% for bloc in blocs %} {% for bloc in blocs %}
@ -84,7 +87,10 @@
<li> <li>
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}"> <a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
<span class="badge bg-primary"> <span class="badge bg-primary">
{{ item|chill_entity_render_box({'only_denomination': true}) }} {{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
</span> </span>
</a> </a>
</li> </li>

View File

@ -6,20 +6,16 @@
{% block content %} {% block content %}
<div class="activity-edit"> <div class="activity-edit">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div id="activity"></div> {# <=== vue component #} <div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %} {% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) { window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
@ -32,6 +28,6 @@
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }} {{ encore_entry_link_tags('vue_activity') }}
{% endblock %} {% endblock %}

View File

@ -22,19 +22,15 @@
{% block personcontent %} {% block personcontent %}
<div class="activity-edit"> <div class="activity-edit">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div id="activity"></div> {# <=== vue component #} <div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %} {% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) { window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
@ -46,6 +42,6 @@
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }} {{ encore_entry_link_tags('vue_activity') }}
{% endblock %} {% endblock %}

View File

@ -1,197 +1,163 @@
{% 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 %} <p class="chill-no-data-statement">
{% set accompanying_course_id = accompanyingCourse.id %} {{ "There isn't any activities."|trans }}
{% endif %} <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>
<h2>{{ 'Activity list' |trans }}</h2> {% else %}
<div class="flex-table">
{% for activity in activities %}
{% set t = activity.type %}
<div class="item-bloc">
<div class="item-row main">
<div class="item-col">
{% if activities|length == 0 %} {% if activity.date %}
<p class="chill-no-data-statement"> <h3>{{ activity.date|format_date('long') }}</h3>
{{ "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>
</p>
{% else %}
<div class="flex-table list-records context-{{ context }}">
<!--
<thead>
<tr>
<th class="chill-red">{{'Date' | trans }}</th>
<th class="chill-green">{{'Duration Time' | trans }}</th>
<th class="chill-orange">{{'Reasons' | trans}}</th>
<th>{{'Type' | trans}}</th>
<th>&nbsp;</th>
</tr>
</thead>
-->
{% for activity in activities %}
{% set t = activity.type %}
<div class="item-bloc">
<div class="item-row main">
<div class="item-col">
{% if activity.date %}
<h3>{{ activity.date|format_date('long') }}</h3>
{% endif %}
<div class="duration">
{% if t.durationTimeVisible > 0 %}
<p>
<i class="fa fa-fw fa-hourglass-end"></i>
{{ activity.durationTime|date('H:i') }}
</p>
{% endif %}
{% if activity.travelTime and t.travelTimeVisible %}
<p>
<i class="fa fa-fw fa-car"></i>
{{ activity.travelTime|date('H:i') }}
</p>
{% endif %}
</div>
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
<div class="accompanyingPeriodLink" style="margin-top: 1rem">
<a
href="{{ chill_path_add_return_path(
"chill_person_accompanying_course_index",
{ 'accompanying_period_id': activity.accompanyingPeriod.id }
) }}"
>
<i class="fa fa-random"></i>
{{ activity.accompanyingPeriod.id }}
</a>
</div>
{% endif %}
</div>
<div class="item-col">
<ul class="list-content">
{% if activity.user and t.userVisible %}
<li>
<b>{{ 'by'|trans }}{{ activity.user.usernameCanonical }}</b>
</li>
{% endif %}
<li>
<b>{{ activity.type.name | localize_translatable_string }}</b>
{% if activity.attendee is not null and t.attendeeVisible %}
{% if activity.attendee %}
{{ '→ ' ~ 'present'|trans|capitalize }}
{% else %}
{{ '→ ' ~ 'not present'|trans|capitalize }}
{% endif %}
{% endif %} {% endif %}
</li>
<li>
<b>{{ 'location'|trans ~ ': ' }}</b>
Domicile de l'usager
{#
{% if activity.location %}{{ activity.location }}{% endif %}
#}
</li>
{%- if t.reasonsVisible -%}
<li>
{%- if activity.reasons is empty -%}
<span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span>
{%- else -%}
{% for r in activity.reasons %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if t.socialIssuesVisible %} <div class="duration">
<li class="social-issues"> {% if t.durationTimeVisible > 0 %}
{%- if activity.socialIssues is empty -%} <p>
<span class="chill-no-data-statement">{{ 'No social issues associated'|trans }}</span> <i class="fa fa-fw fa-hourglass-end"></i>
{%- else -%} {{ activity.durationTime|date('H:i') }}
{% for r in activity.socialIssues %} </p>
{{ r|chill_entity_render_box }} {% endif %}
{% endfor %} {% if activity.travelTime and t.travelTimeVisible %}
{%- endif -%} <p>
</li> <i class="fa fa-fw fa-car"></i>
{% endif %} {{ activity.travelTime|date('H:i') }}
</p>
{%- if t.socialActionsVisible -%} {% endif %}
<li class="social-actions"> </div>
{%- if activity.socialActions is empty -%}
<span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span>
{%- else -%}
{% for r in activity.socialActions %}
<span class="badge bg-primary">{{ r.title|localize_translatable_string }}</span>
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
</ul> <div class="accompanyingPeriodLink" style="margin-top: 1rem">
<ul class="record_actions"> <a href="{{ chill_path_add_return_path(
<li> "chill_person_accompanying_course_index",
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" class="btn btn-show "></a> { 'accompanying_period_id': activity.accompanyingPeriod.id }
</li> ) }}">
{# TOOD <i class="fa fa-random"></i>
{{ activity.accompanyingPeriod.id }}
</a>
</div>
{% endif %}
</div>
<div class="item-col">
<ul class="list-content">
{% if activity.user and t.userVisible %}
<li>
<b>{{ 'by'|trans }}{{ activity.user.usernameCanonical }}</b>
</li>
{% endif %}
<li>
<b>{{ activity.type.name | localize_translatable_string }}</b>
{% if activity.attendee is not null and t.attendeeVisible %}
{% if activity.attendee %}
{{ '→ ' ~ 'present'|trans|capitalize }}
{% else %}
{{ '→ ' ~ 'not present'|trans|capitalize }}
{% endif %}
{% endif %}
</li>
<li>
<b>{{ 'location'|trans ~ ': ' }}</b>
Domicile de l'usager
{#
{% if activity.location %}{{ activity.location }}{% endif %}
#}
</li>
{%- if t.reasonsVisible -%}
<li>
{%- if activity.reasons is not empty -%}
{% for r in activity.reasons %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if t.socialIssuesVisible %}
<li class="social-issues">
{%- if activity.socialIssues is not empty -%}
{% for r in activity.socialIssues %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if t.socialActionsVisible -%}
<li class="social-actions">
{%- if activity.socialActions is not empty -%}
{% for r in activity.socialActions %}
<span class="badge bg-primary">{{ r.title|localize_translatable_string }}</span>
{% endfor %}
{%- endif -%}
</li>
{% endif %}
</ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-show "></a>
</li>
{# TOOD
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
#} #}
<li> <li>
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" class="btn btn-update "></a> <a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
</li> class="btn btn-sm btn-update "></a>
{# TOOD </li>
{# TOOD
{% endif %} {% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
#} #}
<li> <li>
<a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete "></a> <a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
</li> class="btn btn-sm btn-delete "></a>
{# </li>
{% endif %} {#
#} {% endif %}
</ul> #}
</div> </ul>
</div> </div>
</div>
{%
if activity.comment.comment is not empty {% if activity.comment.comment is not empty
or activity.persons|length > 0 or activity.persons|length > 0
or activity.thirdParties|length > 0 or activity.thirdParties|length > 0
or activity.users|length > 0 or activity.users|length > 0
%} %}
<div class="item-row details"> <div class="item-row details">
<div class="item-col"> <div class="item-col">
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %}
</div>
{% if activity.comment.comment is not empty %}
<div class="item-col">
{{ activity.comment|chill_entity_render_box({
'disable_markdown': false,
'limit_lines': 3,
'metadata': false,
}) }}
</div>
{% endif %}
</div>
{% endif %}
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %}
</div> </div>
{% endfor %}
{% if activity.comment.comment is not empty %}
<div class="item-col comment">
{{ activity.comment|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }}
</div>
{% endif %}
</div>
{% endif %}
</div> </div>
{% endfor %} {% endif %}
</div>
{% 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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -6,32 +6,28 @@
{% block content %} {% block content %}
<div class="activity-new"> <div class="activity-new">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl"> <div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %}
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %} </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('async_upload') }} {{ encore_entry_script_tags('mod_async_upload') }}
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) { window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}'); '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
}); });
window.activity = {{ activity_json|json_encode|raw }}; window.activity = {{ activity_json|json_encode|raw }};
</script> </script>
{{ encore_entry_script_tags('vue_activity') }} {{ encore_entry_script_tags('vue_activity') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/> {{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }} {{ encore_entry_link_tags('vue_activity') }}
{% endblock %} {% endblock %}

View File

@ -6,19 +6,15 @@
{% block personcontent %} {% block personcontent %}
<div class="activity-new"> <div class="activity-new">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div id="activity"></div> {# <=== vue component #} <div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %} {% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %}
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) { window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
@ -30,6 +26,6 @@
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ encore_entry_link_tags('async_upload') }} {{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }} {{ encore_entry_link_tags('vue_activity') }}
{% endblock %} {% endblock %}

View File

@ -1,28 +1,30 @@
<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 %}
{% set person_id = null %} {% set person_id = null %}
{% if person %} {% if person %}
{% set person_id = person.id %} {% set person_id = person.id %}
{% endif %} {% endif %}
{% set accompanying_course_id = null %} {% set accompanying_course_id = null %}
{% if accompanyingCourse %} {% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %} {% set accompanying_course_id = accompanyingCourse.id %}
{% endif %} {% endif %}
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'activityType_id': activityType.id, 'accompanying_period_id': accompanying_course_id }) }}"> <a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'activityType_id': activityType.id, 'accompanying_period_id': accompanying_course_id }) }}">
<div class="bloc btn btn-primary btn-lg btn-block"> <div class="bloc btn btn-primary btn-lg btn-block">
{{ activityType.name|localize_translatable_string }} {{ activityType.name|localize_translatable_string }}
</div> </div>
</a> </a>
{% endfor %} {% endfor %}
</div> </div>
{% endfor %} {% endfor %}
</div>

View File

@ -8,12 +8,8 @@
{% block content -%} {% block content -%}
<div class="activity-show"> <div class="activity-show">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %} {% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -8,12 +8,8 @@
{% block personcontent -%} {% block personcontent -%}
<div class="activity-show"> <div class="activity-show">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %} {% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
</div>
</div>
</div> </div>
{% endblock personcontent %} {% endblock personcontent %}

View File

@ -1,10 +1,11 @@
// this file loads all assets from the Chill person bundle // this file loads all assets from the Chill person bundle
module.exports = function(encore, entries) { module.exports = function(encore, entries)
entries.push(__dirname + '/Resources/public/index.js'); {
entries.push(__dirname + '/Resources/public/chill/index.js');
encore.addAliases({ encore.addAliases({
ChillActivityAssets: __dirname + '/Resources/public' ChillActivityAssets: __dirname + '/Resources/public'
}); });
encore.addEntry('vue_activity', __dirname + '/Resources/public/vuejs/Activity/index.js'); encore.addEntry('vue_activity', __dirname + '/Resources/public/vuejs/Activity/index.js');
}; };

View File

@ -22,11 +22,11 @@
{% block title %}{{ 'Editing document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %} {% block title %}{{ 'Editing document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
{% block personcontent %} {% block personcontent %}
<h1>{{ 'Edit Document' | trans }}</h1> <h1>{{ 'Edit Document' | trans }}</h1>
{{ form_errors(form) }} {{ form_errors(form) }}
{{ form_start(form) }} {{ form_start(form) }}
{{ form_row(form.title) }} {{ form_row(form.title) }}
{{ form_row(form.date) }} {{ form_row(form.date) }}
{{ form_row(form.category) }} {{ form_row(form.category) }}
@ -49,16 +49,16 @@
</li> </li>
{% endif %} #} {% endif %} #}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script> {{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/> {{ encore_entry_link_tags('mod_async_upload') }}
{% endblock %} {% endblock %}

View File

@ -24,7 +24,7 @@
{% block title %}{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %} {% block title %}{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
{% block js %} {% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script> {{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %} {% endblock %}
{% block personcontent %} {% block personcontent %}

View File

@ -22,11 +22,11 @@
{% block personcontent %} {% block personcontent %}
<h1>{{ 'New document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1> <h1>{{ 'New document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
{{ form_errors(form) }} {{ form_errors(form) }}
{{ form_start(form) }} {{ form_start(form) }}
{{ form_row(form.title) }} {{ form_row(form.title) }}
{{ form_row(form.date) }} {{ form_row(form.date) }}
{{ form_row(form.category) }} {{ form_row(form.category) }}
@ -48,9 +48,9 @@
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script> {{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/> {{ encore_entry_link_tags('mod_async_upload') }}
{% endblock %} {% endblock %}

View File

@ -23,19 +23,19 @@
{% block title %}{{ 'Detail of document of %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %} {% block title %}{{ 'Detail of document of %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
{% block js %} {% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script> {{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %} {% endblock %}
{% block personcontent %} {% block personcontent %}
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1> <h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
<dl class="chill_view_data"> <dl class="chill_view_data">
<dt>{{ 'Title'|trans }}</dt> <dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd> <dd>{{ document.title }}</dd>
<dt>{{ 'Scope' | trans }}</dt> <dt>{{ 'Scope' | trans }}</dt>
<dd>{{ document.scope.name | localize_translatable_string }}</dd> <dd>{{ document.scope.name | localize_translatable_string }}</dd>
<dt>{{ 'Category'|trans }}</dt> <dt>{{ 'Category'|trans }}</dt>
<dd>{{ document.category.name|localize_translatable_string }}</dd> <dd>{{ document.category.name|localize_translatable_string }}</dd>
@ -58,7 +58,7 @@
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li> <li>
{{ m.download_button(document.object, document.title) }} {{ m.download_button(document.object, document.title) }}
</li> </li>

View File

@ -1,3 +1,4 @@
module.exports = function(encore) { module.exports = function(encore)
encore.addEntry('async_upload', __dirname + '/Resources/public/module/async_upload/index.js'); {
encore.addEntry('mod_async_upload', __dirname + '/Resources/public/module/async_upload/index.js');
}; };

View File

@ -0,0 +1 @@
require('./chillevent.scss');

View File

@ -1 +0,0 @@
require('./css/chillevent.css');

View File

@ -108,8 +108,6 @@
{{ chill_pagination(paginator) }} {{ chill_pagination(paginator) }}
{% endif %} {% endif %}
{% form_theme form_add_event_participation_by_person 'bootstrap_4_layout.html.twig' %}
<div class="input-group mb-3"> <div class="input-group mb-3">
{{ form_start(form_add_event_participation_by_person) }} {{ form_start(form_add_event_participation_by_person) }}
{# {#
@ -137,4 +135,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -3,9 +3,7 @@
{% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %} {% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %}
{% block title 'Participation creation'|trans %} {% block title 'Participation creation'|trans %}
{% form_theme form _self %}
{% block _collection_row %} {% block _collection_row %}
<tr> <tr>
<td> <td>
@ -28,10 +26,10 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% include 'ChillEventBundle:Participation:_ignored_participations.html.twig' with ignored_participations %} {% include 'ChillEventBundle:Participation:_ignored_participations.html.twig' with ignored_participations %}
{{ form_start(form) }} {{ form_start(form) }}
<table> <table>
<thead> <thead>
<tr> <tr>
@ -47,10 +45,10 @@
<td>{{ form_widget(participationField.role) }}</td> <td>{{ form_widget(participationField.role) }}</td>
<td>{{ form_widget(participationField.status) }}</td> <td>{{ form_widget(participationField.status) }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event__event_show', { 'event_id' : participations[0].event.id } ) }}" class="btn btn-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : participations[0].event.id } ) }}" class="btn btn-cancel">
@ -61,7 +59,7 @@
{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
// this file loads all assets from the Chill Event Bundle module.exports = function(encore, entries)
module.exports = function(encore, entries) { {
entries.push(__dirname + '/Resources/public/index.js'); entries.push(__dirname + '/Resources/public/chill/index.js');
}; };

View File

@ -1,121 +1,29 @@
// Access to Bootstrap variables and mixins
@import '~ChillMainAssets/module/bootstrap/shared';
// Chill mixins
@import './scss/mixins';
// Chill buttons
@import './scss/buttons';
// Chill forms
@import './scss/forms';
// Chill record_actions
@import './scss/record_actions';
// Chill entity render box system
@import './scss/render_box';
// Chill flex responsive table/block presentation
@import './scss/flex_table';
/* /*
* These custom styles will override bootstrap enabled stylesheets * BASE LAYOUT POSITION
*/ */
/// chill buttons
@import 'custom/_buttons';
// chill record_actions
@import 'custom/_record_actions';
/// titles
h1, h2, .h1, .h2 {
font-weight: $headings-font-weight + 200;
}
/// typography
.open_sansbold {
font-weight: bold;
}
/// forms
@mixin title_in_form {
font-size: 1.438em;
font-weight: 700;
width: 100%;
border-bottom: 3px solid $gray-200;
margin-bottom: 1em;
display: block;
}
.col-form-label {
padding-top: .5em;
padding-bottom: .5em;
font-weight: 700;
margin-bottom: .375em;
}
form {
/* avoid useless html in first level of the custom fields row loop in forms
* (better should to improve the loop)
*/
& > div.container-fluid {
& > div.row > .parent {
padding: 0;
& div.cf-fields span.cf-title {
margin: 1em -15px 0;
width: calc(100% + 30px);
@include title_in_form;
}
}
}
fieldset {
margin-top: 1em;
& > legend {
@include title_in_form;
}
}
label {
display: inline;
&.required:after {
content: " *";
color: $red;
}
}
}
/// table
table.table-bordered {
thead, thead * {
border: 0 !important;
text-align: center;
}
}
/// chill elements of design
.sticky-form-buttons {
margin-top: 4em;
background-color: $beige;
position: sticky;
bottom: 0.3em;
text-align: center;
display: flex;
padding: 0.8em 1.6em;
border-radius: 0;
}
.chill-user-quote {
border-left: 10px solid $yellow;
margin: 1.5em 10px;
padding: 0.5em 15px;
quotes: "\201C" "\201D" "\2018" "\2019";
background-color: $gray-200;
blockquote {
border-left: 0.4em solid $gray-400;
padding-left: 0.9em;
margin-left: 0.9em;
font-style: italic;
}
}
div.chill_address {
div.chill_address_address {
margin: 0.7em 0;
font-size: 98%;
font-variant: small-caps;
p {
display: inline-block;
margin: 0 0 0 1.5em;
text-indent: -1.5em;
}
}
}
/// base layout positions
body { body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -166,17 +74,17 @@ header {
border: 0; border: 0;
border-bottom: 1px solid $gray-200; border-bottom: 1px solid $gray-200;
font-size: smaller; font-size: smaller;
i { i {
float: right; } float: right; }
&:hover { &:hover {
color: $gray-500 !important; } color: $gray-500 !important; }
} }
} }
// fullwidth menu when navbar is collapsed // fullwidth menu when navbar is collapsed
@media (max-width: 767px) { @media (max-width: 767px) {
& { & {
position: relative; position: relative;
} }
button.navbar-toggler { button.navbar-toggler {
float: right; float: right;
@ -185,14 +93,14 @@ header {
float: none; float: none;
position: absolute; position: absolute;
top: 4em; top: 4em;
left: 0; left: 0;
right: 0; right: 0;
z-index: 2; z-index: 2;
padding: 1em; padding: 1em;
border-top: 1px solid shade-color($primary, 25%); border-top: 1px solid shade-color($primary, 25%);
ul.navbar-nav { ul.navbar-nav {
display: grid; display: grid;
grid-template-areas: grid-template-areas:
"sear sear sear" "sear sear sear"
"sect user lang"; "sect user lang";
li.nav-item { li.nav-item {
@ -208,7 +116,7 @@ header {
button.btn {} button.btn {}
} }
} }
&.nav-section { grid-area: sect; } &.nav-section { grid-area: sect; }
&.nav-user { grid-area: user; } &.nav-user { grid-area: user; }
&.nav-language { grid-area: lang; } &.nav-language { grid-area: lang; }
} }
@ -227,32 +135,40 @@ header {
background-color: transparent !important; background-color: transparent !important;
} }
} }
} }
} }
} }
} }
} }
} }
div.banner { div.banner {
div.header-name,
div.header-details {
div.row > div:first-child {
@media (min-width: 576px) {
//margin-left: 1.5em;
}
}
}
a { a {
text-decoration: none; text-decoration: none;
&.phone,
&.email {
color: $white;
}
}
.id-number {
font-weight: lighter;
font-size: 50%;
margin-left: 0.5em;
&:before { content: '(n°'; }
&:after { content: ')'; }
}
span.age {
margin-left: 0.5em;
&:before { content: '('; }
&:after { content: ')'; }
} }
} }
div.vertical-menu { div.vertical-menu {
border-radius: 0; border-radius: 0;
margin-top: 0.5rem; margin-top: 0.5rem;
a.list-group-item { a.list-group-item {
background-color: $chill-yellow; background-color: $chill-yellow;
border: 0; border: 0;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
@ -282,3 +198,161 @@ footer.footer {
} }
} }
} }
/*
* SPECIFIC RULES
*/
/// titles
h1, h2,
.h1, .h2 {
font-weight: $headings-font-weight + 200;
}
/// typography
.open_sansbold {
font-weight: bold;
}
/// no borders on head table
table.table-bordered {
thead, thead * {
border: 0 !important;
text-align: center;
}
}
/// comments quotes
.chill-user-quote {
border-left: 10px solid $yellow;
margin: 1.5em 10px;
padding: 0.5em 15px;
background-color: $gray-200;
color: $gray-800;
font-size: 90%;
// test a bottom right decoration (to be confirmed)
&.test {
position: relative;
&:after {
content: '';
position: absolute;
width: 0px; height: 0px;
bottom: 0; right: 0;
background: $white;
border-top: 10px solid $gray-200;
border-left: 10px solid $gray-200;
border-right: 10px solid $white;
border-bottom: 10px solid $white;
}
}
// ckeditor citation
blockquote p {
font-style: italic;
padding-left: 2em;
quotes: "" "";
position: relative;
&:before {
content: open-quote;
font-size: 400%;
color: $gray-400;
position: absolute;
top: -25px;
left: 0;
}
}
}
/// when there is no data
.custom_field_no_data,
.chill-no-data-statement {
font-style: italic;
}
//// still used ?
// move from chillmain.css, converted to sass
div#usefulbar {
background-color: $yellow;
z-index: 1000;
padding-right: 15px;
form {
margin: 0;
}
i.menu {
font-size: 2em;
}
ul {
display: flex;
justify-content: flex-end;
margin: 0;
padding-top: 5px;
padding-right: 10px;
}
li {
color: $white;
margin-left: 10px;
a {
color: $white;
text-shadow: 0px 0px 1px $gray-600;
}
i.icon-user-add {
&:before {
vertical-align: -5px;
}
}
&#search_element {
text-align: right;
div#search_form {
margin: 0;
padding: 0;
div, .field {
margin: 0;
}
button {
color: $white;
border: none;
bottom: -2px;
height: 35px;
}
}
}
}
}
div#flashMessages {
margin-top: 20px;
.flash-notice {
margin-top: 10px;
margin-bottom: 10px;
}
}
.personName {
font-variant: small-caps;
text-transform: capitalize;
}
// probably used in client chill.
// think to rename like above
input.belgian_national_number_inversed_date {
width: 7em;
margin-right: 1em;
}
input.belgian_national_number_daily_counter {
width: 4em;
margin-right: 1em;
}
input.belgian_national_number_control_digit {
width: 3em;
}
//
input.belgian_national_number {
&.inversed_date {}
&.daily_counter {}
&.control_digit {}
}

Some files were not shown because too many files have changed in this diff Show More