diff --git a/composer.json b/composer.json index fb0d2dcd1..b5af76421 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "knplabs/knp-time-bundle": "^1.12", "symfony/intl": "4.*", "symfony/swiftmailer-bundle": "^3.5", - "league/csv": "^9.6", + "league/csv": "^9.7.1", "phpoffice/phpspreadsheet": "^1.16", "symfony/browser-kit": "^5.2", "symfony/css-selector": "^5.2", diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php index 7835a0db4..9ef67a7ac 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivityNotifications.php @@ -22,6 +22,7 @@ class LoadActivityNotifications extends AbstractFixture implements DependentFixt 'entityRef' => 'activity_gerard depardieu', 'sender' => 'center a_social', 'addressees' => [ + 'center a_social', 'center a_administrative', 'center a_direction', 'multi_center' diff --git a/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php new file mode 100644 index 000000000..1836f599b --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php @@ -0,0 +1,24 @@ +getRelatedEntityClass() == Activity::class; + } + + public function getTemplate() + { + return '@ChillActivity/Activity/showInNotification.html.twig'; + } + + public function getTemplateData(Notification $notification) + { + return ['notification' => $notification]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss index bd67b58ca..1d271abfe 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss +++ b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss @@ -1,4 +1,6 @@ -@import '~ChillMainAssets/module/bootstrap/bootstrap'; +// Access to Bootstrap variables and mixins +@import '~ChillMainAssets/module/bootstrap/shared'; + //@import '~ChillMainSass/custom/mixins/entity'; //.chill-entity.chill-entity__activity-reason { @@ -6,7 +8,7 @@ //} .activity { - color: $chill-green; + //color: $chill-green; } // exceptions for flex-bloc in concerned-groups diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig index 4985ea1f7..92b1b3ff4 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig @@ -60,7 +60,7 @@
  • - {{ item|chill_entity_render_box({'only_denomination': true}) }} + {{ item|chill_entity_render_box({'render': 'raw'}) }}
  • diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index ef82a5f4a..f7c0d12b2 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -18,57 +18,44 @@ {% else %}
    - + {% for activity in activities %} {% set t = activity.type %}
    - + {% if activity.date %}

    {{ activity.date|format_date('long') }}

    {% endif %} - +
    - {% if t.durationTimeVisible > 0 %} -

    - - {{ activity.durationTime|date('H:i') }} -

    - {% endif %} - + {% if t.durationTimeVisible > 0 %} +

    + + {{ activity.durationTime|date('H:i') }} +

    + {% endif %} {% if activity.travelTime and t.travelTimeVisible %} -

    - - {{ activity.travelTime|date('H:i') }} -

    +

    + + {{ activity.travelTime|date('H:i') }} +

    {% endif %}
    {% if context == 'person' and activity.accompanyingPeriod is not empty %} - {% endif %} - +
      @@ -77,19 +64,19 @@ {{ 'by'|trans }}{{ activity.user.usernameCanonical }} {% endif %} - +
    • {{ activity.type.name | localize_translatable_string }} - + {% if activity.attendee is not null and t.attendeeVisible %} {% if activity.attendee %} - {{ '→ ' ~ 'present'|trans|capitalize }} - {% else %} + {{ '→ ' ~ 'present'|trans|capitalize }} + {% else %} {{ '→ ' ~ 'not present'|trans|capitalize }} {% endif %} {% endif %}
    • - +
    • {{ 'location'|trans ~ ': ' }} Domicile de l'usager @@ -97,7 +84,7 @@ {% if activity.location %}{{ activity.location }}{% endif %} #}
    • - + {%- if t.reasonsVisible -%}
    • {%- if activity.reasons is empty -%} @@ -121,7 +108,7 @@ {%- endif -%}
    • {% endif %} - + {%- if t.socialActionsVisible -%} {% endif %} - +
    • @@ -159,19 +146,19 @@
    - - {% + + {% if activity.comment.comment is not empty or activity.persons|length > 0 or activity.thirdParties|length > 0 - or activity.users|length > 0 + or activity.users|length > 0 %}
    {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %}
    - + {% if activity.comment.comment is not empty %}
    {{ activity.comment|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }} @@ -179,7 +166,7 @@ {% endif %}
    {% endif %} - +
    {% endfor %}
    diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig new file mode 100644 index 000000000..5128e9a64 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig @@ -0,0 +1,4 @@ + +{{ dump(notification) }} + +Go to Activity diff --git a/src/Bundle/ChillActivityBundle/config/services.yaml b/src/Bundle/ChillActivityBundle/config/services.yaml index 411ad1b5a..86168101a 100644 --- a/src/Bundle/ChillActivityBundle/config/services.yaml +++ b/src/Bundle/ChillActivityBundle/config/services.yaml @@ -1,4 +1,4 @@ -services: +services: chill.activity.security.authorization.activity_voter: class: Chill\ActivityBundle\Security\Authorization\ActivityVoter arguments: @@ -6,7 +6,7 @@ services: tags: - { name: security.voter } - { name: chill.role } - + chill.activity.security.authorization.activity_stats_voter: class: Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter arguments: @@ -14,8 +14,8 @@ services: tags: - { name: security.voter } - { name: chill.role } - - + + chill.activity.timeline: class: Chill\ActivityBundle\Timeline\TimelineActivityProvider arguments: @@ -33,3 +33,8 @@ services: autoconfigure: true resource: '../Menu/' tags: ['chill.menu_builder'] + + Chill\ActivityBundle\Notification\: + autowire: true + autoconfigure: true + resource: '../Notification' diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig index 36ef66af3..e9f9a0270 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig @@ -108,8 +108,6 @@ {{ chill_pagination(paginator) }} {% endif %} -{% form_theme form_add_event_participation_by_person 'bootstrap_4_layout.html.twig' %} -
    {{ form_start(form_add_event_participation_by_person) }} {# @@ -137,4 +135,4 @@
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Participation/new-multiple.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Participation/new-multiple.html.twig index 2e7dd6cdb..a0551ff1a 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Participation/new-multiple.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Participation/new-multiple.html.twig @@ -3,9 +3,7 @@ {% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %} {% block title 'Participation creation'|trans %} - - {% form_theme form _self %} - + {% block _collection_row %} @@ -28,10 +26,10 @@ - + {% include 'ChillEventBundle:Participation:_ignored_participations.html.twig' with ignored_participations %} - - {{ form_start(form) }} + + {{ form_start(form) }} @@ -47,10 +45,10 @@ - {% endfor %} + {% endfor %}
    {{ form_widget(participationField.role) }} {{ form_widget(participationField.status) }}
    - + - + {{ form_end(form) }} - + {% endblock %} diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index 25b7e5860..ca28b1d14 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -1141,7 +1141,7 @@ class CRUDController extends AbstractController */ protected function getPaginatorFactory(): PaginatorFactory { - return $this->container->get('chill_main.paginator_factory'); + return $this->container->get(PaginatorFactory::class); } /** diff --git a/src/Bundle/ChillMainBundle/Controller/NotificationController.php b/src/Bundle/ChillMainBundle/Controller/NotificationController.php new file mode 100644 index 000000000..c76e19d9e --- /dev/null +++ b/src/Bundle/ChillMainBundle/Controller/NotificationController.php @@ -0,0 +1,59 @@ +security = $security; + } + + + /** + * @Route("/show", name="chill_main_notification_show") + */ + public function showAction( + NotificationRepository $notificationRepository, NotificationRenderer $notificationRenderer, + PaginatorFactory $paginatorFactory) + { + $currentUser = $this->security->getUser(); + + $notificationsNbr = $notificationRepository->countAllForAttendee(($currentUser)); + $paginator = $paginatorFactory->create($notificationsNbr); + + $notifications = $notificationRepository->findAllForAttendee( + $currentUser, + $limit=$paginator->getItemsPerPage(), + $offset= $paginator->getCurrentPage()->getFirstItemNumber()); + + $templateData = array(); + foreach ($notifications as $notification) { + $data = [ + 'template' => $notificationRenderer->getTemplate($notification), + 'template_data' => $notificationRenderer->getTemplateData($notification), + 'notification' => $notification + ]; + $templateData[] = $data; + } + + return $this->render('@ChillMain/Notification/show.html.twig', [ + 'datas' => $templateData, + 'notifications' => $notifications, + 'paginator' => $paginator, + ]); + } +} diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php b/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php new file mode 100644 index 000000000..d6f383b73 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Notification/NotificationRenderer.php @@ -0,0 +1,44 @@ +renderers[] = $accompanyingPeriodNotificationRenderer; + $this->renderers[] = $activityNotificationRenderer; + } + + private function getRenderer(Notification $notification) + { + foreach ($this->renderers as $renderer) { + if($renderer->supports($notification)) { + return $renderer; + } + } + + throw new \Exception('No renderer for '. $notification); + } + + public function getTemplate(Notification $notification) + { + return $this->getRenderer($notification)->getTemplate(); + } + + public function getTemplateData(Notification $notification) + { + return $this->getRenderer($notification)->getTemplateData($notification); + } +} diff --git a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php index 844459f8b..5ffda75dc 100644 --- a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php @@ -23,6 +23,8 @@ use Chill\MainBundle\Entity\Notification; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\Persistence\ObjectRepository; +use Chill\MainBundle\Entity\User; +use Doctrine\ORM\Query; final class NotificationRepository implements ObjectRepository { @@ -59,8 +61,54 @@ final class NotificationRepository implements ObjectRepository return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } + private function queryAllForAttendee(User $addressee, bool $countQuery=False): Query + { + $qb = $this->repository->createQueryBuilder('n'); + + $select = 'n'; + if($countQuery) { + $select = 'count(n)'; + } + + $qb + ->select($select) + ->join('n.addressees', 'a') + ->where('a = :addressee') + ->setParameter('addressee', $addressee); + + return $qb->getQuery(); + } + + /** + * @return int + */ + public function countAllForAttendee(User $addressee): int // TODO passer à attendees avec S + { + $query = $this->queryAllForAttendee($addressee, $countQuery=True); + + return $query->getSingleScalarResult(); + } + + + /** + * @return Notification[] + */ + public function findAllForAttendee(User $addressee, $limit = null, $offset = null): array // TODO passer à attendees avec S + { + $query = $this->queryAllForAttendee($addressee); + + if($limit) { + $query = $query->setMaxResults($limit); + } + + if($offset) { + $query = $query->setFirstResult($offset); + } + + return $query->getResult(); + } + public function getClassName() { return Notification::class; } - } diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss index ed432a7e4..97c5e3cc9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss @@ -1,12 +1,14 @@ -/* - * NOTE 2021.04 - * scss/chillmain.scss is the main sass file for the new chill.2 - * scratch will be replaced by bootstrap, please avoid to edit in modules/scratch/_custom.scss - * - * when possible, try to use bootstrap html class -*/ +// Access to Bootstrap variables and mixins +@import '~ChillMainAssets/module/bootstrap/shared'; -@import '~ChillMainAssets/module/bootstrap/bootstrap'; +// Chill mixins +@import './scss/mixins'; + +// Chill entity render box system +@import './scss/render_box'; + +// Chill flex responsive table/block presentation +@import './scss/flex_table'; /* * Specific rules @@ -22,6 +24,7 @@ div.banner { .id-number { font-weight: lighter; font-size: 50%; + margin-left: 0.5em; &:before { content: '(n°'; } &:after { content: ')'; } } @@ -37,165 +40,5 @@ div.banner { &:before { content: '('; } &:after { content: ')'; } } - div.members { - display: flex; - flex-direction: row; - span.badge-member { - border: 1px solid #ffffff3b; - color: #ffffff; - padding: 0.4em 0.8em; - margin-right: 0.3em; - border-radius: 8px; - &.holder { - order: -1; - } - &.child { - order: 2; - } - } - } -} - -/* -* FLEX RESPONSIVE TABLE/BLOCK PRESENTATION -*/ -div.flex-bloc, -div.flex-table { - h2, h3, h4, dl, p { - margin: 0; - } - h2, h3, h4 { - color: var(--bs-chill-blue); - } - div.item-bloc { - // We use box-shadow instead of border - // to avoid to manage border double-width - // when blocs are resized for small screen ! - // Then we can simulate border-collapse: collapse (table) - box-shadow: - 1px 0 0 0 var(--bs-dark), - 0 1px 0 0 var(--bs-dark), - 1px 1px 0 0 var(--bs-dark), /* fix the corner */ - 1px 0 0 0 var(--bs-dark) inset, - 0 1px 0 0 var(--bs-dark) inset; - } -} - -/* -* Bloc appearance -*/ -div.flex-bloc { - box-sizing: border-box; - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: stretch; - align-content: stretch; - - div.item-bloc { - flex-grow: 0; flex-shrink: 1; flex-basis: 33%; - margin: 0; - padding: 1em; - display: flex; - flex-direction: column; - - div.item-row { - flex-grow: 1; flex-shrink: 1; flex-basis: auto; - display: flex; - flex-direction: column; - - div.item-col { - &:first-child { - flex-grow: 0; flex-shrink: 0; flex-basis: auto; - } - &:last-child { - flex-grow: 1; flex-shrink: 1; flex-basis: auto; - display: flex; - - .list-content { // ul, dl, or div - } - ul.record_actions { - margin: 0; - align-self: flex-end; - flex-grow: 1; flex-shrink: 0; flex-basis: auto; - li { - margin-right: 5px; - } - } - } - } - } - } - @media only screen and (max-width: 945px) { margin: auto -0.2em; } - @media only screen and (max-width: 935px) { margin: auto -0.5em; } - @media only screen and (max-width: 920px) { margin: auto -0.9em; } - @media only screen and (max-width: 900px) { - flex-direction: column; - margin: auto 0; - } -} - -/* -* Table appearance -*/ -div.flex-table { - display: flex; - flex-direction: column; - align-items: stretch; - align-content: stretch; - - div.item-bloc { - display: flex; - flex-direction: column; - padding: 1em; - &:nth-child(even) { - background-color: #e6e6e6; - } - - div.item-row { - display: flex; - flex-direction: row; - &:not(:first-child) { - margin-top: 0.5em; - border-top: 1px dotted #0000004f; - padding-top: 0.5em; - flex-direction: column; - } - - div.item-col { - &:first-child { - flex-grow: 0; flex-shrink: 0; flex-basis: 33%; - } - &:last-child { - flex-grow: 1; flex-shrink: 1; flex-basis: auto; - display: flex; - justify-content: flex-end; - - .list-content { // ul, dl, or div - } - ul.record_actions { - margin: 0; - align-self: flex-start; - flex-grow: 1; flex-shrink: 0; flex-basis: auto; - li { - margin-right: 5px; - } - } - } - } - @media only screen and (max-width: 900px) { - flex-direction: column; - div.item-col { - &:last-child { - ul.record_actions { - align-self: flex-end; - } - } - } - } - - // neutralize - div.chill_address div.chill_address_address p { text-indent: 0; } - } - } + } diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss new file mode 100644 index 000000000..c01ebc41d --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -0,0 +1,130 @@ +/* +* FLEX RESPONSIVE TABLE/BLOCK PRESENTATION +*/ +div.flex-bloc, +div.flex-table { + h2, h3, h4, dl, p { + margin: 0; + } + h2, h3, h4 { + color: var(--bs-chill-blue); + } + div.item-bloc { + @include border-collapse; + } +} + +/* +* Bloc appearance +*/ +div.flex-bloc { + box-sizing: border-box; + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: stretch; + align-content: stretch; + + div.item-bloc { + flex-grow: 0; flex-shrink: 1; flex-basis: auto; + margin: 0; + padding: 1em; + display: flex; + flex-direction: column; + + div.item-row { + flex-grow: 1; flex-shrink: 1; flex-basis: auto; + display: flex; + flex-direction: column; + + div.item-col { + &:first-child { + flex-grow: 0; flex-shrink: 0; flex-basis: auto; + padding-bottom: 0.5em; + border-bottom: 1px dotted #0000004f; + margin-bottom: 0.5em; + } + &:last-child { + flex-grow: 1; flex-shrink: 1; flex-basis: auto; + display: flex; + + .list-content { // ul, dl, or div + } + ul.record_actions { + margin: 0; + align-self: flex-end; + flex-grow: 1; flex-shrink: 0; flex-basis: auto; + li { + margin-right: 5px; + } + } + } + } + } + } +} + +/* +* Table appearance +*/ +div.flex-table { + display: flex; + flex-direction: column; + align-items: stretch; + align-content: stretch; + + div.item-bloc { + display: flex; + flex-direction: column; + padding: 1em; + &:nth-child(even) { + background-color: $gray-200; + } + + div.item-row { + display: flex; + flex-direction: row; + &:not(:first-child) { + margin-top: 0.5em; + border-top: 1px dotted #0000004f; + padding-top: 0.5em; + flex-direction: column; + } + + div.item-col { + &:first-child { + flex-grow: 0; flex-shrink: 0; flex-basis: 33%; + } + &:last-child { + flex-grow: 1; flex-shrink: 1; flex-basis: auto; + display: flex; + justify-content: flex-end; + + .list-content { // ul, dl, or div + } + ul.record_actions { + margin: 0; + align-self: flex-start; + flex-grow: 1; flex-shrink: 0; flex-basis: auto; + li { + margin-right: 5px; + } + } + } + } + @media only screen and (max-width: 900px) { + flex-direction: column; + div.item-col { + &:last-child { + ul.record_actions { + align-self: flex-end; + } + } + } + } + + // neutralize + div.chill_address div.chill_address_address p { text-indent: 0; } + } + } +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/mixins.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/mixins.scss new file mode 100644 index 000000000..22e1d310e --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/mixins.scss @@ -0,0 +1,14 @@ + +// We use box-shadow instead of border +// to avoid to manage border double-width +// Then we can simulate border-collapse: collapse (table) + +@mixin border-collapse { + box-shadow: + 1px 0 0 0 var(--bs-dark), + 0 1px 0 0 var(--bs-dark), + 1px 1px 0 0 var(--bs-dark), /* fix the corner */ + 1px 0 0 0 var(--bs-dark) inset, + 0 1px 0 0 var(--bs-dark) inset; +} + diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss new file mode 100644 index 000000000..dd1dc12c5 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss @@ -0,0 +1,95 @@ +// generic rules +section.chill-entity { + + // display inline for render raw + // have no effect for render label, bloc ! + display: inline; + + // don't break flex cascade with section tag + div.flex-bloc & { + display: flex; + flex-grow: 1; flex-shrink: 1; flex-basis: auto; + } +} + +// specific rules +.chill-entity { + + // used for: entity-person, entity-thirdparty + &.entity-person, + &.entity-thirdparty { + + div.entity-label { + div.denomination { + &.h3 { + font-size: 1.3em; + font-weight: 700; + } + a { + text-decoration: none; + } + span.badge { + margin-left: 0.3em; + } + span.altnames, + span.id-number { + font-weight: lighter; + font-size: 50%; + margin-left: 0.5em; + } + span.id-number { + &:before { content: '(n°'; } + &:after { content: ')'; } + } + } + p.moreinfo {} + } + div.entity-bloc {} + } + + // used for addresses + &.entity-address { + + .address { + font-size: 98%; + font-variant: small-caps; + + &.multiline { + margin: 0.7em 0; + p { + display: block; + } + } + &.delimiter { + p:not(:first-child):before { + content: ' — '; + } + } + p { + display: inline-block; + margin: 0 0 0 1.5em; + text-indent: -1.5em; + + &.street { + span.streetnumber { + &::before { content: ", "; } + } + } + &.postcode { + span.code {} + span.name {} + } + &.country {} + } + } + + .noaddress { + font-style: italic; + } + + span.address-valid { + &.address-since {} + &.address-until {} + } + } +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss index 30182b1f2..cf36a9a54 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss @@ -7,17 +7,10 @@ * Enable / disable bootstrap assets */ +// Bootstrap configuration files are shared with chill entrypoint +@import "shared"; + // scss-docs-start import-stack -// Configuration -@import "bootstrap/scss/functions"; - -/* replace by CHILL variables */ -//@import "bootstrap/scss/variables"; -@import "custom/_variables"; - -@import "bootstrap/scss/mixins"; -@import "bootstrap/scss/utilities"; - // Layout & components @import "bootstrap/scss/root"; @import "bootstrap/scss/reboot"; @@ -59,3 +52,4 @@ // CHILL custom @import "custom"; +@import "custom/_debug"; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss new file mode 100644 index 000000000..61d66e53d --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss @@ -0,0 +1,19 @@ +body { + position: relative; + div.responsive { + position: fixed; + top: 0; + left: 50%; + background-color: #4a4d50; + color: white; + padding: 0.5em; + z-index: 10000; + + @media (max-width: 576px) { &::after { content: 'XS'; }} + @media (min-width: 576px) { &::after { content: 'SM'; }} + @media (min-width: 768px) { &::after { content: 'MD'; }} + @media (min-width: 992px) { &::after { content: 'LG'; }} + @media (min-width: 1200px) { &::after { content: 'XL'; }} + @media (min-width: 1400px) { &::after { content: 'XXL'; }} + } +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/shared.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/shared.scss new file mode 100644 index 000000000..21e1ceca0 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/shared.scss @@ -0,0 +1,14 @@ +// Configuration +@import "bootstrap/scss/functions"; + +/* +* Replaced by CHILL variables +* it is necessary to keep the possibility of making a diff with original ! +* original: "bootstrap/scss/variables"; +*/ +@import "custom/_variables"; + +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/utilities"; + + diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue index dea280212..72b46c3ab 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue @@ -1,23 +1,22 @@