resume short list style abstraction for accourse-work and activities (wip)

This commit is contained in:
2021-10-04 17:22:08 +02:00
parent 369a29af48
commit 3a07fa4faf
11 changed files with 160 additions and 128 deletions

View File

@@ -248,8 +248,10 @@ span.fa-holder {
}
}
///
div.accompanyingcourse-resume {
div.associated-persons {
font-size: 110%;
span.household {
display: inline-block;
border-radius: 8px;

View File

@@ -1,28 +1,49 @@
/// Display Title like a badge (with background-colored label)
h2.badge-title {
display: flex;
flex-direction: row;
width: 100%;
color: $dark;
a & {
text-decoration: none;
}
span.title_label {
border-radius: 0.35rem 0 0 0.35rem;
color: $white;
font-size: 80%;
padding: 0.5em;
padding-right: 0;
}
span.title_action {
flex-grow: 1;
margin: 0 0 0 auto;
border-radius: 0 0.35rem 0.35rem 0;
background-color: $light;
padding: 0.2em 1em;
ul.small_in_title {
margin-top: 0.5em;
font-size: 70%;
padding-left: 1rem;
}
}
}
/// AccompanyingCourse Work list Page
div.accompanying_course_work-list {
h2.title {
display: flex;
flex-direction: row;
width: 100%;
color: $dark;
//height: 40px;
h2.badge-title {
span.title_label {
border-radius: 0.35rem 0 0 0.35rem;
background-color: $social-action-label-color;
color: $white;
font-size: 80%;
padding: 0.5em;
padding-right: 0;
}
span.title_action {
flex-grow: 1;
margin: 0 0 0 auto;
border-radius: 0 0.35rem 0.35rem 0;
background-color: $light;
padding: 0.2em 0.7em;
@include badge_social_action;
&:before {
margin: 0 0.3em 0 -1.05em !important;
}
}
}
@@ -140,4 +161,3 @@ div.accompanying_course_work-list {
}
}

View File

@@ -15,7 +15,7 @@ $social-action-label-color: shade-color($orange, 34%);
///
@mixin badge_social_issue {
text-transform: capitalize !important;
//text-transform: capitalize !important;
font-weight: 500 !important;
border-left: 20px groove $social-issue-color;
&:before {
@@ -32,7 +32,7 @@ $social-action-label-color: shade-color($orange, 34%);
///
@mixin badge_social_action {
text-transform: capitalize !important;
//text-transform: capitalize !important;
font-weight: 500 !important;
border-left: 20px groove $social-action-color;
&:before {

View File

@@ -71,7 +71,7 @@
<div class="col-md-6 location mb-5">
{% if accompanyingCourse.locationStatus == 'person' %}
<h5>{{ 'This course is located by'|trans }}</h5>
<h2>{{ 'This course is located by'|trans }}</h2>
<h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4>
{% elseif accompanyingCourse.locationStatus == 'address' %}
<h4>{{ 'This course has a temporarily location'|trans }}</h4>
@@ -82,97 +82,9 @@
{% endif %}
</div>
{# DISABLED
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
<div class="associated-persons mb-5">
<h2 class="mb-3">{{ 'Associated peoples'|trans }}</h2>
<div class="flex-table mb-3">
{% for participation in accompanyingCourse.participations %}
{% if participation.enddate is null %}
<div class="item-bloc">
{{ participation.person|chill_entity_render_box({
'render': 'bloc', 'addLink': false, 'addInfo': true, 'addAltNames': false,
'customButtons': { 'before': _self.button_person(participation.person) }
}) }}
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="location mb-5">
<h2 class="mb-3">{{ 'Accompanying course location'|trans }}</h2>
{% if accompanyingCourse.locationStatus == 'person' %}
<p>{{ 'This course is located by'|trans }}
<b>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</b>
</p>
{% elseif accompanyingCourse.locationStatus == 'address' %}
<p>{{ 'This course has a temporarily location'|trans }}</p>
{% endif %}
{% if accompanyingCourse.locationStatus != 'none' %}
<div class="flex-table">
<div class="item-bloc">
{{ accompanyingCourse.location|chill_entity_render_box }}
</div>
</div>
{% endif %}
</div>
<div class="requestor mb-5">
<h2 class="mb-3">{{ 'Requestor'|trans }}</h2>
{% if accompanyingCourse.requestorPerson is not empty %}
{% set requestor = accompanyingCourse.requestorPerson %}
{% set info = true %}
{% elseif accompanyingCourse.requestor is not empty %}
{% set requestor = accompanyingCourse.requestorThirdParty %}
{% set info = false %}
{% endif %}
{% if accompanyingCourse.requestor == null %}
<p class="chill-no-data-statement">{{ 'Any requestor to this accompanying course'|trans }}</p>
{% else %}
<div class="flex-bloc row row-cols-1 g-0">
<div class="item-bloc col">
{{ requestor|chill_entity_render_box({
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': info, 'addAltNames': false
}) }}
</div>
</div>
{% endif %}
</div>
<div class="resources mb-5">
<h2 class="mb-3">{{ 'Resources'|trans }}</h2>
{% if accompanyingCourse.resources|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
{% else %}
<div class="flex-bloc row row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-xxl-4 g-0">
{% for r in accompanyingCourse.resources %}
<div class="item-bloc col">
{% if r.person %}
{{ r.person|chill_entity_render_box({
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': true, 'addAltNames': false
}) }}
{% endif %}
{% if r.thirdParty %}
{{ r.thirdParty|chill_entity_render_box({
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': false
}) }}
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
#}
<div class="mt-5"></div>
<div class="social-actions mb-5">
<h2 class="mb-3">{{ 'Social actions'|trans }}</h2>
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_by_accompanying_period.html.twig' with {'buttonText': false, 'render': 'resume' } %}
{% include 'ChillPersonBundle:AccompanyingCourseWork:recent_list_by_accompanying_period.html.twig' with {'buttonText': false } %}
</div>
{% block contentActivity %}
@@ -189,9 +101,9 @@
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<h2>{{ 'Activity list' |trans }}</h2>
<h2 class="mb-3">{{ 'Activity list' |trans }}</h2>
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
{% include 'ChillActivityBundle:Activity:recent_list.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
</div>
{% endblock %}

View File

@@ -7,7 +7,7 @@
<h1>{{ block('title') }}</h1>
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_by_accompanying_period.html.twig' with {'render': 'list'} %}
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_by_accompanying_period.html.twig' %}
<ul class="record_actions sticky-form-buttons">
<li>

View File

@@ -5,12 +5,12 @@
</p>
{% endif %}
<div class="flex-table accompanying_course_work-{{ render }}">
<div class="flex-table accompanying_course_work-list">
{% for w in works %}
<div class="item-bloc">
<div class="item-row">
<h2 class="title">
<h2 class="badge-title">
<span class="title_label">{{ 'accompanying_course_work.action'|trans }}</span>
<span class="title_action">{{ w.socialAction|chill_entity_render_string }}</span>
</h2>

View File

@@ -0,0 +1,32 @@
{% if works|length == 0 %}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}
<a class="btn btn-sm btn-create"
href="" title="TODO"></a>{# TODO link #}
</p>
{% endif %}
<div class="accompanying_course_work-list">
{% for w in works | slice(0,5) %}
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"></a>
<h2 class="badge-title">
<span class="title_label">{{ 'accompanying_course_work.action'|trans }}</span>
<span class="title_action">{{ w.socialAction|chill_entity_render_string }}
<ul class="small_in_title">
<li>
<abbr title="{{ 'accompanying_course_work.start_date'|trans }}">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</abbr>
{{ w.startDate|format_date('short') }}
</li>
<li>
<abbr title="{{ 'Last updated by'|trans }}">{{ 'Last updated by'|trans ~ ' : ' }}</abbr>
{{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('short', 'short') }}
</li>
</ul>
</span>
</h2>
{% endfor %}
</div>