Compare commits

...

111 Commits

Author SHA1 Message Date
Marc Ducobu
8c635c24af Fix test error when no periods 2021-07-23 12:11:58 +02:00
Marc Ducobu
9d478c0f01 Removing var_dump 2021-07-23 10:18:41 +02:00
Marc Ducobu
4646795c2c Automatic styling correction 2021-07-23 10:18:04 +02:00
Marc Ducobu
18369a6c0a Merge branch 'notifications3' into 'master'
Notifications3

See merge request Chill-Projet/chill-bundles!89
2021-07-22 17:44:37 +00:00
Marc Ducobu
0fd9485de5 Avoid creation of services/notification.yaml 2021-07-22 18:15:57 +02:00
c8f139528a Merge branch 'behaviour/do-not-create-accompanying-course-on-person-creation' into 'master'
Remove creation of AccompanyingPeriod on person creation

See merge request Chill-Projet/chill-bundles!100
2021-07-22 15:36:37 +00:00
8030792eb6 Remove creation of AccompanyingPeriod on person creation 2021-07-22 15:36:36 +00:00
Marc Ducobu
50a4df3d0f Notification with paginitation 2021-07-22 17:32:20 +02:00
Marc Ducobu
0907ae1602 Rmq Julien & Pol 2021-07-22 17:32:20 +02:00
Marc Ducobu
673a4761e9 Adding feature for AccompanyingPeriodNotif 2021-07-22 17:32:20 +02:00
Marc Ducobu
282db51f06 Display notification using services (draft) 2021-07-22 17:32:20 +02:00
Marc Ducobu
bdf691a063 Add findAllForAttendee method in NotificationRepository 2021-07-22 17:32:20 +02:00
Marc Ducobu
18ab10dd45 Add center a_social to an activityNotif feature 2021-07-22 17:32:20 +02:00
65198937c0 Merge branch 'tests/fix-tests-after-bootstrap' into 'master'
Fix tests after introduction of bootstrap

See merge request Chill-Projet/chill-bundles!111
2021-07-22 15:20:45 +00:00
2699d48533 Fix tests after introduction of bootstrap 2021-07-22 15:20:45 +00:00
08e396195c Merge branch 'vue_generale' into bootstrap5_replacing_scratch 2021-07-15 15:27:04 +02:00
ab0863a275 new setting margins and breakpoints for person banner 2021-07-15 15:21:33 +02:00
82c79a17dd many corrections in twig templates 2021-07-14 21:01:46 +02:00
d35553a1e2 content bloc: fix margins and breakpoints 2021-07-14 18:16:33 +02:00
030e71d276 activity, content position 2021-07-14 15:51:07 +02:00
4fc3d813c4 bootstrap adapt for activity vue socialIssues component 2021-07-14 15:24:17 +02:00
5f012165d1 fix spinner in addAddresss 2021-07-14 15:23:42 +02:00
61bd5d8ae8 fix spinner in addAddresss 2021-07-14 15:21:38 +02:00
07c464c112 rename vue subfolder _components in components 2021-07-14 14:50:39 +02:00
70a4c34865 move vue AddAddress inside Address component 2021-07-14 14:46:44 +02:00
5a47ebed42 Merge branch 'fix_addresses_issues' into bootstrap5_replacing_scratch 2021-07-14 14:01:08 +02:00
80eb5519bc adapt AddAddress modal to bootstrap: position, responsive, form 2021-07-14 13:36:49 +02:00
50f3ec9064 adapt vue modals styles to bootstrap 2021-07-13 15:35:48 +02:00
bdf0ec63d2 person templates responsive breakpoints in content 2021-07-13 14:07:23 +02:00
15f439b43d divers styles: colors var, table thead,... 2021-07-13 14:07:23 +02:00
30af99f4f0 fix chill theme colors behaviours: chill classes, special buttons variants 2021-07-13 14:07:23 +02:00
c413166866 batch replace .bt- in task scss 2021-07-13 14:07:23 +02:00
3c4c5e29a3 remove ChillMainSass webpack alias (scratch reference) 2021-07-13 14:07:23 +02:00
0224224744 bootstrap tables in vue_accourse 2021-07-13 14:07:23 +02:00
a9a59895b4 rename vue_ entrypoints in webpack 2021-07-13 14:07:23 +02:00
8a859f7885 add margin-top in content (uniformize contexts) 2021-07-13 14:07:23 +02:00
2244c58ec2 better logic: move person layout template in views/Person folder
like others contexts :
* accompanyingCourse
* household
2021-07-13 14:05:36 +02:00
c1ede921ff better twig extends path syntax 2021-07-12 10:32:48 +02:00
17ff80c39c accompanyingCourse, household and person use uniq menu template 2021-07-12 10:23:23 +02:00
f4f747d8d1 put person banner in included file 2021-07-12 10:21:08 +02:00
a740ad29ea replace sc-button + bt- in js and php files 2021-07-08 15:56:00 +02:00
ccee105efb batch replace grid- (scratch) by col- (bootstrap)
hand replace
* push- by offset-
* no-gutter by g-0

add breakpoints md- and sm-
2021-07-08 15:44:32 +02:00
b10012f4da minor swing 2021-07-08 15:03:59 +02:00
4937fd00fc fix form label display inline (with bootstrap5 theme) 2021-07-08 15:03:00 +02:00
0b329a9c9b modify lightly bootstrap5 form theme 2021-07-08 14:52:46 +02:00
4cfc43aaa6 rename collection html classes 2021-07-08 14:49:53 +02:00
1c45770929 wip 2021-07-08 12:27:50 +02:00
198c815052 add classes to person_addresses template 2021-07-08 12:00:59 +02:00
a995adcf0d remove debug discret class 2021-07-08 12:00:07 +02:00
bccda15307 cleaning record_actions scss 2021-07-08 11:59:27 +02:00
75c3df50e0 disable scratch webpack compilation 2021-07-08 11:58:22 +02:00
ce8207ea65 adapt person details page with bootstrap grid 2021-07-08 11:38:19 +02:00
0f6ad3670a add flashbag twig display condition + improve class consistency (main_search) 2021-07-08 11:12:31 +02:00
02a752f20b repair commit "load banner accompanying course everywhere" 2021-07-08 10:20:17 +02:00
1bbce2bb81 person details page: one edit button at bottom of page, fix regression 2021-07-07 19:38:29 +02:00
ca43933163 Merge branch 'fix-vue-warnings' into bootstrap5_replacing_scratch 2021-07-07 19:27:40 +02:00
1392365257 fix most of vue warnings for accompanyingCourse component 2021-07-07 19:27:22 +02:00
3653d7e0b8 fix missing dom selector in stickynav vue 2021-07-07 18:58:11 +02:00
3970bb2644 badge settings in banners 2021-07-07 18:31:05 +02:00
9a1272d350 enabling symfony twig form_theme for bootstrap5
bootstrap5 templates are not supported in symfony 4
see twig.yaml comment and configuration while waiting to upgrade !!
2021-07-07 12:32:40 +02:00
36419cf5f0 fix button colors 2021-07-06 14:17:39 +02:00
c96f407e6a Merge branch 'bootstrap5_replacing_scratch_mat' into bootstrap5_replacing_scratch 2021-07-06 13:50:17 +02:00
690688f5e1 fix buttons classes 2021-07-06 13:49:12 +02:00
4668f657ab button correction if only icon, not text 2021-07-06 13:34:47 +02:00
49253abfb8 custom _record_actions styles 2021-07-06 12:21:52 +02:00
c2122d62c6 button cancel, set icon with before 2021-07-06 12:10:37 +02:00
ca17ca4984 adding forkawesome ::before content unicode 2021-07-06 11:06:32 +02:00
a5d749b882 batch replace sc-button by btn btn-... 2021-07-05 21:55:24 +02:00
53c021b06e Merge branch 'quickfix' into bootstrap5_replacing_scratch_mat 2021-07-05 21:25:33 +02:00
b6e8c64211 fix bootstrap5 + vue modal content scrollable overflow 2021-07-05 21:23:55 +02:00
342fd3e297 batch rename sc-button cancel 2021-07-05 21:22:05 +02:00
05a1f7d041 batch rename class sc-button (scratch) by btn (bootstrap) 2021-07-05 19:02:09 +02:00
2e2eeae4f2 chill colors and buttons with bootstrap5 2021-07-05 18:53:03 +02:00
nobohan
842dfcc69f address: edit household addresses 2021-07-05 17:23:37 +02:00
nobohan
67c31e781d address: back to the page when the address is filled 2021-07-05 15:07:21 +02:00
f32ffc572d badge-pill classes changed to rounded-pill 2021-07-05 12:37:16 +02:00
a44b26da6c badge classes updated from badge-... to bg-... 2021-07-05 12:29:52 +02:00
d016f9be86 fix bootstrap5 + vue modal content scrollable overflow 2021-07-04 14:26:00 +02:00
c36aa22ab2 arrange collapsed header menu 2021-07-03 20:57:28 +02:00
e77c886e3f banner and vertical-menu integration 2021-07-03 17:56:07 +02:00
4ca1618480 bt5, main layout, responsive header 2021-07-03 14:03:30 +02:00
8e8cdfce0a bootstrap5, main layout settings 2021-07-02 18:42:26 +02:00
3694eb5bf2 fix bootstrap import duplicate 2021-07-01 18:49:15 +02:00
e44342ab87 bootstrap5: report variables v4+chill changes in variables v5
--- indigo, purple, teal, cyan
+++ green-dark, beige
2021-07-01 18:25:38 +02:00
a236873919 bootstrap5: swap variables v4+chill 2021-07-01 18:25:38 +02:00
a13766e7d7 wip.. 2021-07-01 18:25:38 +02:00
bc240a6754 bootstrap style in form fields, bootstrap integration for select2 2021-07-01 18:25:35 +02:00
50727fc4b0 bootstrap styles in forms fields 2021-07-01 18:24:48 +02:00
b327a3fbfa fix homepage content cols 2021-07-01 18:24:48 +02:00
2916babe1c bootstrap content with vertical right person menu 2021-07-01 18:24:46 +02:00
fe2f107ddc bootstrap content with vertical right person menu 2021-07-01 18:20:11 +02:00
3da8f89d3c bootstrap footer and homepage 2021-07-01 18:08:00 +02:00
19326ee750 wip.. navbar bootstrap 2021-07-01 18:07:57 +02:00
e0ae5d56f0 import chill colors in bootstrap custom theme 2021-07-01 18:05:25 +02:00
0878767c17 replace class container by container-fluid (full width in bootstrap) 2021-07-01 18:05:25 +02:00
f0232228a3 improve details row for household banner 2021-07-01 17:47:17 +02:00
fc63955205 improve banners render : context person, with common improvements on accompanyingcourse and household context 2021-07-01 16:13:07 +02:00
a78de0f96c improve accompanyingcourse work timeline design 2021-07-01 10:41:13 +02:00
270c0accc5 Merge branch 'parcours/origin-de-la-demande' into 'master'
parcours - origin de la demande

See merge request Chill-Projet/chill-bundles!107
2021-07-01 08:37:46 +00:00
fd94f27eee hide console log, remove unused api endpoint method 2021-07-01 10:30:39 +02:00
f7e3be38a7 Merge branch '51-referent-parcours' into 'master'
parcours référent

See merge request Chill-Projet/chill-bundles!106
2021-07-01 07:48:08 +00:00
5861a86289 cleaning dirty git trace 2021-06-30 19:22:26 +02:00
68c0f9b7d7 accompanyingcourse: lesser space between form fieldsets 2021-06-30 19:02:25 +02:00
52288f7260 fix typo + change component position 2021-06-30 18:44:38 +02:00
2fe1605385 vue accompanyingCourse, adding an origin sub-component 2021-06-30 17:07:48 +02:00
d8256b0ac5 swagger person: adding origin routes 2021-06-30 14:59:27 +02:00
b5760e82ea swagger person: just sorting yaml tree items 2021-06-30 14:58:24 +02:00
d3ac8d8ceb vue accompanyingcourse: ending referrer subcomponent 2021-06-30 11:59:54 +02:00
196f709065 activity, revert detail, cfr. https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/94#note_614231268 2021-06-30 10:18:57 +02:00
6a8c96cdae referrer get users: preparation 2021-06-30 09:52:15 +02:00
3e83891744 prepare new originDemand sub-component 2021-06-30 09:52:15 +02:00
313 changed files with 5899 additions and 3745 deletions

3
package.json.txt Normal file
View File

@@ -0,0 +1,3 @@
add npm/yarn dependency in package.json :
"select2-bootstrap-theme": "0.1.0-beta.10",

View File

@@ -22,6 +22,7 @@ class LoadActivityNotifications extends AbstractFixture implements DependentFixt
'entityRef' => 'activity_gerard depardieu', 'entityRef' => 'activity_gerard depardieu',
'sender' => 'center a_social', 'sender' => 'center a_social',
'addressees' => [ 'addressees' => [
'center a_social',
'center a_administrative', 'center a_administrative',
'center a_direction', 'center a_direction',
'multi_center' 'multi_center'

View File

@@ -282,7 +282,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
return $this->socialIssues; return $this->socialIssues;
} }
public function addSocialIssue(?SocialIssue $socialIssue): self public function addSocialIssue(SocialIssue $socialIssue): self
{ {
if (!$this->socialIssues->contains($socialIssue)) { if (!$this->socialIssues->contains($socialIssue)) {
$this->socialIssues[] = $socialIssue; $this->socialIssues[] = $socialIssue;
@@ -303,7 +303,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
return $this->socialActions; return $this->socialActions;
} }
public function addSocialAction(?SocialAction $socialAction): self public function addSocialAction(SocialAction $socialAction): self
{ {
if (!$this->socialActions->contains($socialAction)) { if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction; $this->socialActions[] = $socialAction;

View File

@@ -0,0 +1,24 @@
<?php
namespace Chill\ActivityBundle\Notification;
use Chill\MainBundle\Entity\Notification;
use Chill\ActivityBundle\Entity\Activity;
final class ActivityNotificationRenderer
{
public function supports(Notification $notification, array $options = []): bool
{
return $notification->getRelatedEntityClass() == Activity::class;
}
public function getTemplate()
{
return '@ChillActivity/Activity/showInNotification.html.twig';
}
public function getTemplateData(Notification $notification)
{
return ['notification' => $notification];
}
}

View File

@@ -1,9 +1,9 @@
@import '~ChillMainSass/custom/config/colors'; @import '~ChillMainAssets/modules/bootstrap/bootstrap';
@import '~ChillMainSass/custom/mixins/entity'; //@import '~ChillMainSass/custom/mixins/entity';
.chill-entity.chill-entity__activity-reason { //.chill-entity.chill-entity__activity-reason {
@include entity($chill-pink, white); // @include entity($chill-pink, white);
} //}
.activity { .activity {
color: $chill-green; color: $chill-green;

View File

@@ -65,7 +65,7 @@ export default {
addPersons: { addPersons: {
key: 'activity', key: 'activity',
options: { options: {
type: ['person', 'thirdparty'], // TODO add 'user' type: ['person', 'thirdparty', 'user'], // TODO add 'user'
priority: null, priority: null,
uniq: false, uniq: false,
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<li> <li>
<span class="badge badge-primary" :title="person.text"> <span class="badge bg-primary" :title="person.text">
<span class="chill_denomination"> <span class="chill_denomination">
{{ textCutted }} {{ textCutted }}
</span> </span>

View File

@@ -1,11 +1,11 @@
<template> <template>
<teleport to="#social-issues-acc"> <teleport to="#social-issues-acc">
<div class="container"> <div class="mb-3 row">
<div class="grid-4 clear"> <div class="col-4">
<label>{{ $t('activity.social_issues') }}</label> <label class="col-form-label">{{ $t('activity.social_issues') }}</label>
</div> </div>
<div class="grid-8"> <div class="col-8">
<check-social-issue <check-social-issue
v-for="issue in socialIssuesList" v-for="issue in socialIssuesList"
@@ -41,11 +41,11 @@
</div> </div>
</div> </div>
<div class="container"> <div class="mb-3 row">
<div class="grid-4 clear"> <div class="col-4">
<label>{{ $t('activity.social_actions') }}</label> <label class="col-form-label">{{ $t('activity.social_actions') }}</label>
</div> </div>
<div class="grid-8"> <div class="col-8">
<div v-if="actionIsLoading === true"> <div v-if="actionIsLoading === true">
<i class="chill-green fa fa-circle-o-notch fa-spin fa-lg"></i> <i class="chill-green fa fa-circle-o-notch fa-spin fa-lg"></i>

View File

@@ -1,18 +1,20 @@
<template> <template>
<span class="inline-choice"> <span class="inline-choice">
<div class="form-check">
<input
type="checkbox" <input class="form-check-input"
v-model="selected" type="checkbox"
name="action" v-model="selected"
v-bind:id="action.id" name="action"
v-bind:value="action" v-bind:id="action.id"
/> v-bind:value="action"
<label class="inline" v-bind:for="action.id"> />
{{ action.text }} <label class="form-check-label" v-bind:for="action.id">
</label> {{ action.text }}
</label>
</span><br>
</div>
</span>
</template> </template>
<script> <script>

View File

@@ -1,18 +1,20 @@
<template> <template>
<span class="inline-choice"> <span class="inline-choice">
<div class="form-check">
<input <input class="form-check-input"
type="checkbox" type="checkbox"
v-model="selected" v-model="selected"
name="issue" name="issue"
v-bind:id="issue.id" v-bind:id="issue.id"
v-bind:value="issue" v-bind:value="issue"
/> />
<label class="inline" v-bind:for="issue.id"> <label class="form-check-label" v-bind:for="issue.id">
{{ issue.text }} {{ issue.text }}
</label> </label>
</span><br> </div>
</span>
</template> </template>
<script> <script>

View File

@@ -59,7 +59,7 @@
{% for item in bloc.items %} {% for item in bloc.items %}
<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 badge-primary"> <span class="badge bg-primary">
{{ item|chill_entity_render_box({'only_denomination': true}) }} {{ item|chill_entity_render_box({'only_denomination': true}) }}
</span> </span>
</a> </a>
@@ -83,7 +83,7 @@
{% for item in bloc.items %} {% for item in bloc.items %}
<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 badge-primary"> <span class="badge bg-primary">
{{ item|chill_entity_render_box({'only_denomination': true}) }} {{ item|chill_entity_render_box({'only_denomination': true}) }}
</span> </span>
</a> </a>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %} {% set activeRouteKey = 'chill_activity_activity_list' %}
{% set person = activity.person %} {% set person = activity.person %}

View File

@@ -1,8 +1,5 @@
<h1>{{ "Update activity"|trans ~ ' :' }} <h1>{{ "Update activity"|trans }}</h1>
<span style="font-size: 70%; text-transform: lowercase; margin-left: 1em;"> <h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
{{ entity.type.name|localize_translatable_string }}
</span>
</h1>
{{ form_start(edit_form) }} {{ form_start(edit_form) }}
{{ form_errors(edit_form) }} {{ form_errors(edit_form) }}
@@ -94,12 +91,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="sc-button bt-cancel"> <a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-cancel">
{{ 'Cancel'|trans }} {{ 'Cancel'|trans }}
</a> </a>
</li> </li>
<li> <li>
<button class="sc-button bt-update" type="submit">{{ 'Save'|trans }}</button> <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(edit_form) }} {{ form_end(edit_form) }}

View File

@@ -5,8 +5,16 @@
{% block title 'Update activity'|trans %} {% block title 'Update activity'|trans %}
{% block content %} {% block content %}
<div id="activity"></div> {# <=== vue component #} <div class="activity-edit">
{% include 'ChillActivityBundle:Activity:edit.html.twig' %} <div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}

View File

@@ -14,15 +14,23 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %} {% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Update activity'|trans %} {% block title 'Update activity'|trans %}
{% block personcontent %} {% block personcontent %}
<div id="activity"></div> {# <=== vue component #} <div class="activity-edit">
{% include 'ChillActivityBundle:Activity:edit.html.twig' %} <div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}

View File

@@ -13,7 +13,7 @@
{% if activities|length == 0 %} {% 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="sc-button bt-create button-small"></a> <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> </p>
{% else %} {% else %}
@@ -128,7 +128,7 @@
<span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span> <span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span>
{%- else -%} {%- else -%}
{% for r in activity.socialActions %} {% for r in activity.socialActions %}
<span class="badge badge-primary">{{ r.title|localize_translatable_string }}</span> <span class="badge bg-primary">{{ r.title|localize_translatable_string }}</span>
{% endfor %} {% endfor %}
{%- endif -%} {%- endif -%}
</li> </li>
@@ -138,20 +138,20 @@
</ul> </ul>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" class="sc-button bt-show "></a> <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>
</li> </li>
{# TOOD {# 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="sc-button bt-update "></a> <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>
</li> </li>
{# TOOD {# 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="sc-button bt-delete "></a> <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>
</li> </li>
{# {#
{% endif %} {% endif %}
@@ -189,7 +189,7 @@
{# TODO set this condition in configuration #} {# TODO set this condition in configuration #}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="sc-button bt-create"> <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 }} {{ 'Add a new activity' | trans }}
</a> </a>
</li> </li>

View File

@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %} {% set activeRouteKey = 'chill_activity_activity_list' %}

View File

@@ -1,8 +1,5 @@
<h1>{{ "Activity creation"|trans ~ ' :' }} <h1>{{ "Activity creation"|trans ~ ' :' }}</h1>
<span style="font-size: 70%; text-transform: lowercase; margin-left: 1em;"> <h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
{{ entity.type.name|localize_translatable_string }}
</span>
</h1>
{{ form_start(form) }} {{ form_start(form) }}
{{ form_errors(form) }} {{ form_errors(form) }}
@@ -86,7 +83,7 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a <a
class="sc-button bt-cancel" class="btn btn-cancel"
{%- if context == 'person' -%} {%- if context == 'person' -%}
href="{{ chill_return_path_or('chill_activity_activity_list', { 'person_id': person.id } )}}" href="{{ chill_return_path_or('chill_activity_activity_list', { 'person_id': person.id } )}}"
{%- else -%} {%- else -%}
@@ -97,7 +94,7 @@
</a> </a>
</li> </li>
<li> <li>
<button class="sc-button bt-create" type="submit"> <button class="btn btn-create" type="submit">
{{ 'Create'|trans }} {{ 'Create'|trans }}
</button> </button>
</li> </li>

View File

@@ -5,8 +5,16 @@
{% block title 'Activity creation' |trans %} {% block title 'Activity creation' |trans %}
{% block content %} {% block content %}
<div id="activity"></div> {# <=== vue component #} <div class="activity-new">
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %} <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>
</div>
</div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}

View File

@@ -1,12 +1,20 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %} {% set activeRouteKey = 'chill_activity_activity_new' %}
{% block title 'Activity creation' |trans %} {% block title 'Activity creation' |trans %}
{% block personcontent %} {% block personcontent %}
<div id="activity"></div> {# <=== vue component #} <div class="activity-new">
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %} <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': 'person'} %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block js %} {% block js %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %} {% set activeRouteKey = 'chill_activity_activity_new' %}

View File

@@ -4,7 +4,7 @@
<h1> <h1>
{{ "Activity"|trans }} {{ "Activity"|trans }}
{%- if t.emergencyVisible and entity.emergency -%} {%- if t.emergencyVisible and entity.emergency -%}
<span class="badge badge-secondary"> <span class="badge bg-secondary">
{{- 'Emergency'|trans -}} {{- 'Emergency'|trans -}}
</span> </span>
{%- endif -%} {%- endif -%}
@@ -109,25 +109,28 @@
{% set accompanying_course_id = accompanyingCourse.id %} {% set accompanying_course_id = accompanyingCourse.id %}
{% endif %} {% endif %}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}"> <a class="btn btn-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"> <a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
</li> </li>
{# TODO {# TODO
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %} {% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
#} #}
<li> <li>
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="sc-button bt-delete"> <a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete">
{{ 'Delete'|trans }} {{ 'Delete'|trans }}
</a> </a>
</li> </li>
{# {#
{% endif %} {% endif %}
#} #}

View File

@@ -7,5 +7,13 @@
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
{% block content -%} {% block content -%}
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %} <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'} %}
</div>
</div>
</div>
{% endblock content %} {% endblock content %}

View File

@@ -0,0 +1,4 @@
{{ dump(notification) }}
<a href="{{ path('chill_activity_activity_show', {'id': notification.relatedEntityId }) }}">Go to Activity</a>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %} {% set activeRouteKey = 'chill_activity_activity_list' %}
@@ -7,5 +7,13 @@
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
{% block personcontent -%} {% block personcontent -%}
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %} <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'} %}
</div>
</div>
</div>
{% endblock personcontent %} {% endblock personcontent %}

View File

@@ -25,7 +25,7 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_presence_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_crud_activity_presence_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -36,7 +36,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_presence_new') }}" class="sc-button bt-create"> <a href="{{ path('chill_crud_activity_presence_new') }}" class="btn btn-create">
{{ 'Create a new activity presence'|trans }} {{ 'Create a new activity presence'|trans }}
</a> </a>
</li> </li>

View File

@@ -26,10 +26,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button orange' } } ) }} {{ form_row(edit_form.submit, { 'attr': { 'class' : 'btn btn-chill-orange' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -33,10 +33,10 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a> <a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -47,7 +47,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activityreason_new') }}" class="sc-button bt-new"> <a href="{{ path('chill_activity_activityreason_new') }}" class="btn btn-new">
{{ 'Create a new activity reason'|trans }} {{ 'Create a new activity reason'|trans }}
</a> </a>
</li> </li>

View File

@@ -26,10 +26,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' } } ) }} {{ form_row(form.submit, { 'attr': { 'class' : 'btn btn-new' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -40,12 +40,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel"> <a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"> <a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
</li> </li>

View File

@@ -25,12 +25,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel"> <a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_row(edit_form.submit, { 'attr': { 'class': 'sc-button bt-edit' } } ) }} {{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-edit' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -34,10 +34,10 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a> <a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -48,7 +48,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activityreasoncategory_new') }}" class="sc-button bt-new"> <a href="{{ path('chill_activity_activityreasoncategory_new') }}" class="btn btn-new">
{{ 'Create a new activity category reason'|trans }} {{ 'Create a new activity category reason'|trans }}
</a> </a>
</li> </li>

View File

@@ -25,10 +25,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr': { 'class' : 'sc-button bt-new' } } ) }} {{ form_widget(form.submit, { 'attr': { 'class' : 'btn btn-new' } } ) }}
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@@ -39,12 +39,12 @@
</table> </table>
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel"> <a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"> <a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
</li> </li>

View File

@@ -41,7 +41,7 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_type_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_crud_activity_type_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -52,7 +52,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_type_new') }}" class="sc-button bt-create"> <a href="{{ path('chill_crud_activity_type_new') }}" class="btn btn-create">
{{ 'Create a new activity type'|trans }} {{ 'Create a new activity type'|trans }}
</a> </a>
</li> </li>

View File

@@ -25,7 +25,7 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_type_category_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_crud_activity_type_category_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -36,7 +36,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_crud_activity_type_category_new') }}" class="sc-button bt-create"> <a href="{{ path('chill_crud_activity_type_category_new') }}" class="btn btn-create">
{{ 'Create a new activity type category'|trans }} {{ 'Create a new activity type category'|trans }}
</a> </a>
</li> </li>

View File

@@ -29,13 +29,13 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activity_show', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="sc-button bt-view"> <a href="{{ path('chill_activity_activity_show', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="btn btn-view">
{{ 'Show the activity'|trans }} {{ 'Show the activity'|trans }}
</a> </a>
</li> </li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li> <li>
<a href="{{ path('chill_activity_activity_edit', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="sc-button bt-edit"> <a href="{{ path('chill_activity_activity_edit', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="btn btn-edit">
{{ 'Edit the activity'|trans }} {{ 'Edit the activity'|trans }}
</a> </a>
</li> </li>

View File

@@ -1,4 +1,4 @@
services: services:
chill.activity.security.authorization.activity_voter: chill.activity.security.authorization.activity_voter:
class: Chill\ActivityBundle\Security\Authorization\ActivityVoter class: Chill\ActivityBundle\Security\Authorization\ActivityVoter
arguments: arguments:
@@ -6,7 +6,7 @@ services:
tags: tags:
- { name: security.voter } - { name: security.voter }
- { name: chill.role } - { name: chill.role }
chill.activity.security.authorization.activity_stats_voter: chill.activity.security.authorization.activity_stats_voter:
class: Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter class: Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter
arguments: arguments:
@@ -14,8 +14,8 @@ services:
tags: tags:
- { name: security.voter } - { name: security.voter }
- { name: chill.role } - { name: chill.role }
chill.activity.timeline: chill.activity.timeline:
class: Chill\ActivityBundle\Timeline\TimelineActivityProvider class: Chill\ActivityBundle\Timeline\TimelineActivityProvider
arguments: arguments:
@@ -33,3 +33,8 @@ services:
autoconfigure: true autoconfigure: true
resource: '../Menu/' resource: '../Menu/'
tags: ['chill.menu_builder'] tags: ['chill.menu_builder']
Chill\ActivityBundle\Notification\:
autowire: true
autoconfigure: true
resource: '../Notification'

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = element.person %} {% set person = element.person %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'Edit Charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'Edit Charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -18,12 +18,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Edit' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Edit' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'New Charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'New Charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -18,12 +18,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Create' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Create' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = element.person %} {% set person = element.person %}
@@ -39,13 +39,13 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), element) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), element) %}
<li> <li>
<a href="{{ path('chill_budget_charge_edit', { 'id': element.id } ) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_budget_charge_edit', { 'id': element.id } ) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'Budget for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'Budget for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -68,17 +68,17 @@
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::SHOW'), f) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::SHOW'), f) %}
<li> <li>
<a href="{{ path('chill_budget_' ~ family ~ '_view', { 'id': f.id } ) }}" class="sc-button bt-show"></a> <a href="{{ path('chill_budget_' ~ family ~ '_view', { 'id': f.id } ) }}" class="btn btn-show"></a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), f) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), f) %}
<li> <li>
<a href="{{ path('chill_budget_' ~ family ~'_edit', { 'id': f.id } ) }}" class="sc-button bt-edit"></a> <a href="{{ path('chill_budget_' ~ family ~'_edit', { 'id': f.id } ) }}" class="btn btn-edit"></a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::DELETE'), f) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::DELETE'), f) %}
<li> <li>
<a href="{{ path('chill_budget_' ~ family ~ '_delete', { 'id': f.id } ) }}" class="sc-button bt-delete"></a> <a href="{{ path('chill_budget_' ~ family ~ '_delete', { 'id': f.id } ) }}" class="btn btn-delete"></a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@@ -161,10 +161,10 @@
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::CREATE'), person) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::CREATE'), person) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="sc-button bt-create" href="{{ path('chill_budget_resource_new', { 'id': person.id} ) }}">{{ 'Create new resource'|trans }}</a> <a class="btn btn-create" href="{{ path('chill_budget_resource_new', { 'id': person.id} ) }}">{{ 'Create new resource'|trans }}</a>
</li> </li>
<li> <li>
<a class="sc-button bt-create" href="{{ path('chill_budget_charge_new', { 'id': person.id} ) }}">{{ 'Create new charge'|trans }}</a> <a class="btn btn-create" href="{{ path('chill_budget_charge_new', { 'id': person.id} ) }}">{{ 'Create new charge'|trans }}</a>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}
@@ -215,10 +215,10 @@
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::CREATE'), person) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::CREATE'), person) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="sc-button bt-create" href="{{ path('chill_budget_resource_new', { 'id': person.id} ) }}">{{ 'Create new resource'|trans }}</a> <a class="btn btn-create" href="{{ path('chill_budget_resource_new', { 'id': person.id} ) }}">{{ 'Create new resource'|trans }}</a>
</li> </li>
<li> <li>
<a class="sc-button bt-create" href="{{ path('chill_budget_charge_new', { 'id': person.id} ) }}">{{ 'Create new charge'|trans }}</a> <a class="btn btn-create" href="{{ path('chill_budget_charge_new', { 'id': person.id} ) }}">{{ 'Create new charge'|trans }}</a>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = element.person %} {% set person = element.person %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'Edit Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'Edit Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -17,12 +17,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Edit' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Edit' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'New Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'New Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -17,12 +17,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Create' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Create' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = element.person %} {% set person = element.person %}
@@ -39,13 +39,13 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), element) %} {% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), element) %}
<li> <li>
<a href="{{ path('chill_budget_resource_edit', { 'id': element.id } ) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_budget_resource_edit', { 'id': element.id } ) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@@ -36,12 +36,12 @@
{{ form_row(option) }} {{ form_row(option) }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{{ form_row(edit_form.submit, {'attr': { 'class': 'sc-button btn-update' } } ) }} {{ form_row(edit_form.submit, {'attr': { 'class': 'btn btn-update' } } ) }}
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('customfieldsgroup_show', { 'id': entity.customFieldsGroup.id }) }}" class="sc-button btn-reset"> <a href="{{ path('customfieldsgroup_show', { 'id': entity.customFieldsGroup.id }) }}" class="btn btn-reset">
{{ 'Back to the group'|trans }} {{ 'Back to the group'|trans }}
</a> </a>
</li> </li>

View File

@@ -37,17 +37,17 @@
{{ form_row(option) }} {{ form_row(option) }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{{ form_row(form.submit, {'attr': { 'class': 'sc-button btn-create' } } ) }} {{ form_row(form.submit, {'attr': { 'class': 'btn btn-create' } } ) }}
{{ form_end(form) }} {{ form_end(form) }}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
{% if entity.customFieldsGroup is not null %} {% if entity.customFieldsGroup is not null %}
<a href="{{ path('customfieldsgroup_show', { 'id': entity.customFieldsGroup.id }) }}" class="sc-button btn-reset"> <a href="{{ path('customfieldsgroup_show', { 'id': entity.customFieldsGroup.id }) }}" class="btn btn-reset">
{{ 'Back to the group'|trans }} {{ 'Back to the group'|trans }}
</a> </a>
{% else %} {% else %}
<a href="{{ path('customfieldsgroup') }}" class="sc-button btn-reset"> <a href="{{ path('customfieldsgroup') }}" class="btn btn-reset">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
{% endif %} {% endif %}

View File

@@ -27,17 +27,17 @@
{% if edit_form.options is defined %} {% if edit_form.options is defined %}
{{ form_row(edit_form.options) }} {{ form_row(edit_form.options) }}
{% endif %} {% endif %}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'sc-button bt-edit' } } ) }} {{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-edit' } } ) }}
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('customfieldsgroup') }}" class="sc-button bt-cancel"> <a href="{{ path('customfieldsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('customfieldsgroup_show', { 'id' : entity.id }) }}" class="sc-button bt-cancel"> <a href="{{ path('customfieldsgroup_show', { 'id' : entity.id }) }}" class="btn btn-cancel">
{{ 'show'|trans|capitalize }} {{ 'show'|trans|capitalize }}
</a> </a>
</li> </li>

View File

@@ -40,17 +40,17 @@
<i class="fa fa-star"></i> <i class="fa fa-star"></i>
{%- else -%} {%- else -%}
{{ form_start(make_default_forms[entity.id]) }} {{ form_start(make_default_forms[entity.id]) }}
{{ form_widget(make_default_forms[entity.id].submit, { 'attr' : { 'class' : 'sc-button bt-action' } } ) }} {{ form_widget(make_default_forms[entity.id].submit, { 'attr' : { 'class' : 'btn btn-action' } } ) }}
{{ form_end(make_default_forms[entity.id]) }} {{ form_end(make_default_forms[entity.id]) }}
{%- endif -%} {%- endif -%}
</td> </td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}" class="sc-button">{{ 'show'|trans|capitalize }}</a> <a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}" class="btn btn-show">{{ 'show'|trans|capitalize }}</a>
</li> </li>
<li> <li>
<a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}" class="sc-button btn-edit">{{ 'edit'|trans|capitalize }}</a> <a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans|capitalize }}</a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -60,7 +60,7 @@
</table> </table>
<p> <p>
<a href="{{ path('customfieldsgroup_new') }}" class="sc-button bt-create"> <a href="{{ path('customfieldsgroup_new') }}" class="btn btn-create">
{{ 'Create a new group'|trans }} {{ 'Create a new group'|trans }}
</a> </a>
</p> </p>

View File

@@ -23,8 +23,8 @@
{{ form_row(form.name) }} {{ form_row(form.name) }}
{{ form_row(form.entity) }} {{ form_row(form.entity) }}
<p> <p>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' } } ) }}
<a href="{{ path('customfieldsgroup') }}" class="sc-button bt-cancel"> <a href="{{ path('customfieldsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</p> </p>

View File

@@ -52,12 +52,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('customfieldsgroup') }}" class="sc-button bt-cancel"> <a href="{{ path('customfieldsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"> <a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
</li> </li>
@@ -90,27 +90,27 @@
{%- endif -%} {%- endif -%}
</td> </td>
<td style="text-align:center"> <td style="text-align:center">
<a href="{{ path('customfield_edit', { 'id' : field.id }) }}" class="sc-button bt-edit">{{ 'edit'|trans|capitalize }}</a> <a href="{{ path('customfield_edit', { 'id' : field.id }) }}" class="btn btn-edit">{{ 'edit'|trans|capitalize }}</a>
</td> </td>
</tr> </tr>
{%- endfor -%} {%- endfor -%}
</tbody> </tbody>
</table> </table>
{{ form_start(create_field_form) }} {{ form_start(create_field_form) }}
<div class="grid-4"> <div class="col-4">
{{ form_widget(create_field_form.type) }} {{ form_widget(create_field_form.type) }}
</div> </div>
{{ form_widget(create_field_form.submit, { 'attr': { 'class': 'sc-button bt-create' }, 'label': 'Add a new field' } ) }} {{ form_widget(create_field_form.submit, { 'attr': { 'class': 'btn btn-create' }, 'label': 'Add a new field' } ) }}
{{ form_end(create_field_form) }} {{ form_end(create_field_form) }}
{%- else -%} {%- else -%}
<p> <p>
{{ 'Any field is currently associated with this group'|trans }} {{ 'Any field is currently associated with this group'|trans }}
</p> </p>
{{ form_start(create_field_form) }} {{ form_start(create_field_form) }}
<div class="grid-4"> <div class="col-4">
{{ form_widget(create_field_form.type) }} {{ form_widget(create_field_form.type) }}
</div> </div>
{{ form_widget(create_field_form.submit, { 'attr': { 'class': 'sc-button bt-create' }, 'label': 'Create a new field' } ) }} {{ form_widget(create_field_form.submit, { 'attr': { 'class': 'btn btn-create' }, 'label': 'Create a new field' } ) }}
{{ form_end(create_field_form) }} {{ form_end(create_field_form) }}
{%- endif -%} {%- endif -%}
{% endblock %} {% endblock %}

View File

@@ -1 +1,7 @@
{% if text is not empty %}{{ text|nl2br }}{% else %}<span class="custom_fields_text empty">{{ 'None'|trans }}</span>{% endif %} {% if text is not empty %}
{% apply markdown_to_html %}
{{ text|raw }}
{% endapply %}
{% else %}
<span class="custom_fields_text empty">{{ 'None'|trans }}</span>
{% endif %}

View File

@@ -65,7 +65,7 @@
} }
function initializeCFChoiceOptionsChoices(div_id) { function initializeCFChoiceOptionsChoices(div_id) {
var add_element_link = $('<a id="' + div_id + '_add_element_link"" href="#" class="sc-button bt-submit">{{ 'Add an element'|trans }}</a>'); var add_element_link = $('<a id="' + div_id + '_add_element_link"" href="#" class="btn btn-submit">{{ 'Add an element'|trans }}</a>');
var div = $('#' + div_id); var div = $('#' + div_id);
div.append(add_element_link); div.append(add_element_link);
div.data('index', div.find('td').length); div.data('index', div.find('td').length);

View File

@@ -280,10 +280,10 @@ var insertRemoveButton = (zone, zoneData) => {
labelCancel = 'Restaurer' labelCancel = 'Restaurer'
; ;
removeButton.classList.add('sc-button', 'bt-delete'); removeButton.classList.add('btn', 'btn-delete');
removeButton.textContent = labelRemove; removeButton.textContent = labelRemove;
cancelButton.classList.add('sc-button'); cancelButton.classList.add('btn', 'btn-cancel');
cancelButton.textContent = labelCancel; cancelButton.textContent = labelCancel;
removeButton.addEventListener('click', (e) => { removeButton.addEventListener('click', (e) => {
@@ -355,7 +355,7 @@ var insertDownloadButton = (zone, zoneData) => {
newButton.dataset.labelPreparing = labelPreparing; newButton.dataset.labelPreparing = labelPreparing;
newButton.dataset.labelReady = labelReady; newButton.dataset.labelReady = labelReady;
newButton.dataset.tempUrlGetGenerator = tempUrlGenerator + '?' + tempUrlGeneratorParams.toString(); newButton.dataset.tempUrlGetGenerator = tempUrlGenerator + '?' + tempUrlGeneratorParams.toString();
newButton.classList.add('sc-button', 'bt-download', 'dz-bt-below-dropzone'); newButton.classList.add('btn', 'btn-download', 'dz-bt-below-dropzone');
newButton.textContent = labelQuietButton; newButton.textContent = labelQuietButton;
addBelowButton(newButton, zone, zoneData); addBelowButton(newButton, zone, zoneData);

View File

@@ -17,5 +17,5 @@
<form method="post" action="{{ path('document_category_delete', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"> <form method="post" action="{{ path('document_category_delete', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}">
<input type="hidden" name="_method" value="DELETE"> <input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ document_category.bundleId ~ document_category.idInsideBundle) }}"> <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ document_category.bundleId ~ document_category.idInsideBundle) }}">
<button class="sc-button bt-delete">{{ 'Delete' | trans }}</button> <button class="btn btn-delete">{{ 'Delete' | trans }}</button>
</form> </form>

View File

@@ -16,5 +16,5 @@
#} #}
{{ form_start(form) }} {{ form_start(form) }}
{{ form_widget(form) }} {{ form_widget(form) }}
<button class="sc-button bt-edit">{{ button_label|default('Save') }}</button> <button class="btn btn-edit">{{ button_label|default('Save') }}</button>
{{ form_end(form) }} {{ form_end(form) }}

View File

@@ -29,12 +29,12 @@
{{ form_widget(form) }} {{ form_widget(form) }}
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('document_category_index') }}" class="sc-button bt-cancel"> <a href="{{ path('document_category_index') }}" class="btn btn-cancel">
{{ 'Back to the category list' | trans }} {{ 'Back to the category list' | trans }}
</a> </a>
</li> </li>
<li> <li>
<button class="sc-button bt-edit">{{ button_label|default('Edit')|trans }}</button> <button class="btn btn-edit">{{ button_label|default('Edit')|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@@ -41,9 +41,9 @@
<td> <td>
<a href="{{ path('document_category_show', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" <a href="{{ path('document_category_show', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-show" title="{{ 'show' | trans }}"></a> class="btn btn-show" title="{{ 'show' | trans }}"></a>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" <a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-edit" title="{{ 'edit' | trans }}"></a> class="btn btn-edit" title="{{ 'edit' | trans }}"></a>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -56,7 +56,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('document_category_new') }}" class="sc-button bt-create">{{ 'Create new category' | trans }}</a> <a href="{{ path('document_category_new') }}" class="btn btn-create">{{ 'Create new category' | trans }}</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@@ -29,12 +29,12 @@
{{ form_widget(form) }} {{ form_widget(form) }}
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('document_category_index') }}" class="sc-button bt-cancel"> <a href="{{ path('document_category_index') }}" class="btn btn-cancel">
{{ 'Back to the category list' | trans }} {{ 'Back to the category list' | trans }}
</a> </a>
</li> </li>
<li> <li>
<button class="sc-button bt-new">{{ button_label|default('New')|trans }}</button> <button class="btn btn-new">{{ button_label|default('New')|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@@ -45,11 +45,11 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('document_category_index') }}" <a href="{{ path('document_category_index') }}"
class="sc-button bt-cancel">{{ 'Back to the category list' | trans }}</a> class="btn btn-cancel">{{ 'Back to the category list' | trans }}</a>
</li> </li>
<li> <li>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" <a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-edit">{{ 'Edit' | trans }}</a> class="btn btn-edit">{{ 'Edit' | trans }}</a>
</li> </li>
<li> <li>
{{ include('ChillDocStoreBundle:DocumentCategory:_delete_form.html.twig') }} {{ include('ChillDocStoreBundle:DocumentCategory:_delete_form.html.twig') }}

View File

@@ -2,7 +2,7 @@
{% if storedObject is null %} {% if storedObject is null %}
<!-- No document to download --> <!-- No document to download -->
{% else %} {% else %}
<a class="sc-button bt-download" <a class="btn btn-download"
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}" data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}" data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
data-download-button data-download-button

View File

@@ -1,5 +1,5 @@
<form method="post" action="{{ path('person_document_delete', {'id': document.id, 'person': person.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> <form method="post" action="{{ path('person_document_delete', {'id': document.id, 'person': person.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_method" value="DELETE"> <input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ document.id) }}"> <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ document.id) }}">
<button class="sc-button bt-delete">{{ 'Delete' | trans }}</button> <button class="btn btn-delete">{{ 'Delete' | trans }}</button>
</form> </form>

View File

@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
@@ -36,12 +36,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="sc-button bt-cancel"> <a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="edit"> <li class="edit">
<button class="sc-button bt-edit">{{ 'Edit'|trans }}</button> <button class="btn btn-edit">{{ 'Edit'|trans }}</button>
</li> </li>
{# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} {# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %}
<li class="delete"> <li class="delete">

View File

@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
@@ -52,12 +52,12 @@
{{ m.download_button(document.object, document.title) }} {{ m.download_button(document.object, document.title) }}
</li> </li>
<li> <li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="sc-button bt-show"></a> <a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %} {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li> <li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="sc-button bt-update"></a> <a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@@ -74,7 +74,7 @@
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} {% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
<ul class="record_actions"> <ul class="record_actions">
<li class="create"> <li class="create">
<a href="{{ path('person_document_new', {'person': person.id}) }}" class="sc-button bt-create"> <a href="{{ path('person_document_new', {'person': person.id}) }}" class="btn btn-create">
{{ 'Create new document' | trans }} {{ 'Create new document' | trans }}
</a> </a>
</li> </li>

View File

@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
@@ -36,12 +36,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="sc-button bt-cancel"> <a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="create"> <li class="create">
<button class="sc-button bt-create">{{ 'Create'|trans }}</button> <button class="btn btn-create">{{ 'Create'|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
@@ -54,7 +54,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="sc-button bt-cancel"> <a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
@@ -65,7 +65,7 @@
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %} {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li> <li>
<a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="sc-button bt-edit"> <a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="btn btn-edit">
{{ 'Edit' | trans }} {{ 'Edit' | trans }}
</a> </a>
</li> </li>

View File

@@ -20,12 +20,12 @@
{% set returnPath = app.request.get('return_path') %} {% set returnPath = app.request.get('return_path') %}
{% set returnLabel = app.request.get('return_label') %} {% set returnLabel = app.request.get('return_label') %}
<a href="{{ returnPath |default( path('chill_event_list_most_recent') ) }}" class="sc-button bt-cancel"> <a href="{{ returnPath |default( path('chill_event_list_most_recent') ) }}" class="btn btn-cancel">
{{ returnLabel |default('Back to the most recent events'|trans) }} {{ returnLabel |default('Back to the most recent events'|trans) }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'sc-button bt-update' } }) }} {{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'btn btn-update' } }) }}
</li> </li>
</ul> </ul>

View File

@@ -25,12 +25,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
{# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #} {# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #}
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button black"> <a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="btn btn-dark">
{{ 'See'|trans }} {{ 'See'|trans }}
</a> </a>
{# {% endif %} #} {# {% endif %} #}
{% if is_granted('CHILL_EVENT_UPDATE', event) %} {% if is_granted('CHILL_EVENT_UPDATE', event) %}
<a href="{{ path('chill_event__event_edit', { 'event_id' : event.id } ) }}" class="sc-button bt-update"> <a href="{{ path('chill_event__event_edit', { 'event_id' : event.id } ) }}" class="btn btn-update">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
{% endif %} {% endif %}
@@ -46,13 +46,13 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event__event_new_pickcenter') }}" class="sc-button bt-create" > <a href="{{ path('chill_event__event_new_pickcenter') }}" class="btn btn-create" >
{{ 'New event'|trans }} {{ 'New event'|trans }}
</a> </a>
</li> </li>
{% if preview == true and events|length < total %} {% if preview == true and events|length < total %}
<li> <li>
<a href="{{ path('chill_main_search', { "name": search_name, "q" : pattern }) }}" class="sc-button btn-next"> <a href="{{ path('chill_main_search', { "name": search_name, "q" : pattern }) }}" class="btn btn-next">
{{ 'See all results'|trans }} {{ 'See all results'|trans }}
</a> </a>
</li> </li>

View File

@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
#} #}
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_event__list_by_person' %} {% set activeRouteKey = 'chill_event__list_by_person' %}
{% set currentPerson = person.firstName ~ ' ' ~ person.lastName %} {% set currentPerson = person.firstName ~ ' ' ~ person.lastName %}
@@ -24,7 +24,7 @@
{% block personcontent %} {% block personcontent %}
<h2>{{ 'Events participation' |trans }}</h2> <h2>{{ 'Events participation' |trans }}</h2>
<table class="events"> <table class="table table-striped table-bordered mt-3 events">
<thead> <thead>
<tr> <tr>
<th class="chill-green">{{ 'Date'|trans }}</th> <th class="chill-green">{{ 'Date'|trans }}</th>
@@ -44,53 +44,58 @@
<td>{{ participation.role.name|localize_translatable_string }}</td> <td>{{ participation.role.name|localize_translatable_string }}</td>
<td>{{ participation.status.name|localize_translatable_string }}</td> <td>{{ participation.status.name|localize_translatable_string }}</td>
<td> <td>
<ul class="record_actions"> <ul class="list-inline">
<li>
{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %} {% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
{% set returnLabel = 'Back to %person% events'|trans({ '%person%' : currentPerson } ) %} {% set returnLabel = 'Back to %person% events'|trans({ '%person%' : currentPerson } ) %}
{% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %} {% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %}
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel } ) }}" <li class="list-inline-item">
class="sc-button bt-show" title="{{ 'See details of the event'|trans }}"></a> <a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel } ) }}"
{% endif %} class="btn btn-primary btn-sm" title="{{ 'See details of the event'|trans }}"><i class="fa fa-fw fa-eye"></i></a>
</li>
{% endif %}
{% if is_granted('CHILL_EVENT_UPDATE', participation.event) {% if is_granted('CHILL_EVENT_UPDATE', participation.event)
and is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} and is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
<div class="bt-dropdown"> <li class="list-inline-item">
<a href="" class="sc-button bt-update"></a> <div class="btn dropdown-toggle">
<div class="bt-dropdown-content"> <a href="" class="btn btn-warning btn-sm"><i class="fa fa-fw fa-pencil"></i></a>
<div class="dropdown-menu">
<a href="{{ path('chill_event__event_edit', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="sc-button bt-update">
{{ 'Edit the event'|trans }}
</a>
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="sc-button bt-update">
{{ 'Edit the participation'|trans }}
</a>
</div>
</div>
{% else %}
{% if is_granted('CHILL_EVENT_UPDATE', participation.event) %}
<a href="{{ path('chill_event__event_edit', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}" <a href="{{ path('chill_event__event_edit', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="sc-button bt-update"> class="btn btn-warning btn-sm">
{{ 'Edit the event'|trans }} {{ 'Edit the event'|trans }}
</a> </a>
{% endif %}
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}" <a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="sc-button bt-update"> class="btn btn-warning btn-sm">
{{ 'Edit the participation'|trans }} {{ 'Edit the participation'|trans }}
</a> </a>
{% endif %}
{% endif %}
</div>
</div>
</li> </li>
{% else %}
<li class="list-inline-item">
{% if is_granted('CHILL_EVENT_UPDATE', participation.event) %}
<a href="{{ path('chill_event__event_edit', { 'event_id' : participation.event.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="btn btn-warning btn-sm">
{{ 'Edit the event'|trans }}
</a>
{% endif %}
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id, 'return_path' : currentPath, 'return_label' : returnLabel }) }}"
class="btn btn-warning btn-sm">
{{ 'Edit the participation'|trans }}
</a>
{% endif %}
</li>
{% endif %}
</ul> </ul>
</td> </td>
</tr> </tr>
@@ -103,12 +108,33 @@
{{ chill_pagination(paginator) }} {{ chill_pagination(paginator) }}
{% endif %} {% endif %}
<div style="margin-bottom: 1.5em; margin-top: 2.5em;"> {% form_theme form_add_event_participation_by_person 'bootstrap_4_layout.html.twig' %}
{{ form_start(form_add_event_participation_by_person) }}
{{ form_widget(form_add_event_participation_by_person.event_id, { 'attr' : { 'style' : 'width: 25em; display:inline-block; ' } } ) }} <div class="input-group mb-3">
{{ form_widget(form_add_event_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }} {{ form_start(form_add_event_participation_by_person) }}
{{ form_rest(form_add_event_participation_by_person) }} {#
{{ form_end(form_add_event_participation_by_person) }} <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2">
#}
{{ form_widget(form_add_event_participation_by_person.event_id, { 'attr' : { 'class' : 'form-control' } } ) }}
<div class="input-group-append input-group-btn">
{#
<button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button>
#}
{{ form_widget(form_add_event_participation_by_person.submit, { 'attr' : { 'class' : 'btn btn-success' } } ) }}
</div>
{{ form_rest(form_add_event_participation_by_person) }}
{{ form_end(form_add_event_participation_by_person) }}
</div>
{#
{{ form(form_add_event_participation_by_person) }}
#}
<div class="input-group mb-3">
<input class="form-control" placeholder="Recipient's username">
<div class="input-group-append">
<button class="btn btn-success">Button</button>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -16,12 +16,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_list_most_recent') }}" class="sc-button bt-cancel"> <a href="{{ path('chill_event_list_most_recent') }}" class="btn btn-cancel">
{{ 'Back to the most recent events'|trans }} {{ 'Back to the most recent events'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-create' } }) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } }) }}
</li> </li>
</ul> </ul>

View File

@@ -12,12 +12,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_list_most_recent') }}" class="sc-button bt-cancel"> <a href="{{ path('chill_event_list_most_recent') }}" class="btn btn-cancel">
{{ 'Back to the most recent events'|trans }} {{ 'Back to the most recent events'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button green' } }) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } }) }}
</li> </li>
</ul> </ul>

View File

@@ -40,26 +40,26 @@
{% if returnPath and returnLabel %} {% if returnPath and returnLabel %}
<li class="cancel"> <li class="cancel">
<a href="{{ returnPath }}" class="sc-button bt-cancel">{{ returnLabel }}</a> <a href="{{ returnPath }}" class="btn btn-cancel">{{ returnLabel }}</a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event__event_edit', { <a href="{{ path('chill_event__event_edit', {
'event_id': event.id, 'event_id': event.id,
'return_path': app.request.getRequestUri, 'return_path': app.request.getRequestUri,
'return_label': 'Back to details of the event'|trans 'return_label': 'Back to details of the event'|trans
}) }}" class="sc-button bt-edit">{{ 'Edit'|trans }} }) }}" class="btn btn-edit">{{ 'Edit'|trans }}
</a> </a>
</li> </li>
{% else %} {% else %}
<li> <li>
<a href="{{ path('chill_event__event_edit', {'event_id': event.id }) }}" class="sc-button bt-edit"> <a href="{{ path('chill_event__event_edit', {'event_id': event.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}
</a> </a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
<a href="{{ path('chill_event__event_delete', {'event_id' : event.id } ) }}" <a href="{{ path('chill_event__event_delete', {'event_id' : event.id } ) }}"
class="sc-button bt-delete">{{ 'Delete event'|trans }}</a> class="btn btn-delete">{{ 'Delete event'|trans }}</a>
</li> </li>
</ul> </ul>
@@ -94,11 +94,11 @@
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
<li> <li>
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id } ) }}" <a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id } ) }}"
class="sc-button bt-edit" title="{{ 'Edit'|trans }}"></a> class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event_participation_delete', {'participation_id' : participation.id } ) }}" <a href="{{ path('chill_event_participation_delete', {'participation_id' : participation.id } ) }}"
class="sc-button bt-delete" title="{{ 'Delete'|trans }}"></a> class="btn btn-delete" title="{{ 'Delete'|trans }}"></a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@@ -113,12 +113,12 @@
<ul class="record_actions"> <ul class="record_actions">
{% if count > 0 %} {% if count > 0 %}
<li><a href="{{ path('chill_event_participation_edit_multiple', { 'event_id' : event.id } ) }}" class="sc-button bt-edit">{{ 'Edit all the participations'|trans }}</a></li> <li><a href="{{ path('chill_event_participation_edit_multiple', { 'event_id' : event.id } ) }}" class="btn btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
{% endif %} {% endif %}
</ul> </ul>
<div style="margin-bottom: 10em;"> <div style="margin-bottom: 10em;">
<div class="grid-8"> <div class="col-8">
{{ form_start(form_add_participation_by_person) }} {{ form_start(form_add_participation_by_person) }}
<div class="input-group"> <div class="input-group">
{{ form_widget(form_add_participation_by_person.person_id, { 'attr' : { {{ form_widget(form_add_participation_by_person.person_id, { 'attr' : {
@@ -126,19 +126,19 @@
'style': 'min-width: 15em; max-width: 18em; display: inline-block;' 'style': 'min-width: 15em; max-width: 18em; display: inline-block;'
}} ) }} }} ) }}
<div class="input-group-append"> <div class="input-group-append">
{{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }} {{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
</div> </div>
</div> </div>
{{ form_rest(form_add_participation_by_person) }} {{ form_rest(form_add_participation_by_person) }}
{{ form_end(form_add_participation_by_person) }} {{ form_end(form_add_participation_by_person) }}
</div> </div>
<div class="grid-4"> <div class="col-4">
{{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }} {{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }}
<div class="input-group"> <div class="input-group">
{{ form_widget(form_export.format, { 'attr' : { 'class': 'custom-select' } }) }} {{ form_widget(form_export.format, { 'attr' : { 'class': 'custom-select' } }) }}
<div class="input-group-append"> <div class="input-group-append">
{{ form_widget(form_export.submit, { 'attr' : { 'class': 'sc-button bt-save' } }) }} {{ form_widget(form_export.submit, { 'attr' : { 'class': 'btn btn-save' } }) }}
</div> </div>
<a class="bt-"></a> <a class="bt-"></a>
</div> </div>

View File

@@ -10,10 +10,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_eventtype_admin') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }} {{ form_row(edit_form.submit, { 'attr': { 'class' : 'btn btn-edit' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -22,10 +22,10 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_eventtype_admin_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a> <a href="{{ path('chill_eventtype_admin_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -36,7 +36,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_eventtype_admin_new') }}" class="sc-button bt-new">{{ 'Create a new type'|trans }}</a> <a href="{{ path('chill_eventtype_admin_new') }}" class="btn btn-new">{{ 'Create a new type'|trans }}</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@@ -10,10 +10,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_eventtype_admin') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }} {{ form_row(form.submit, { 'attr': { 'class' : 'btn btn-new' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -23,14 +23,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_eventtype_admin') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
<a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }} {{ form_row(delete_form.submit, { 'attr': { 'class' : 'btn btn-delete' }}) }}
{{ form_end(delete_form) }} {{ form_end(delete_form) }}
</li> </li>
</ul> </ul>

View File

@@ -49,12 +49,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="btn btn-cancel">
{{ 'Back to the event'|trans }} {{ 'Back to the event'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-edit' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-edit' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -32,12 +32,12 @@
{% set returnPath = app.request.get('return_path') %} {% set returnPath = app.request.get('return_path') %}
{% set returnLabel = app.request.get('return_label') %} {% set returnLabel = app.request.get('return_label') %}
<a href="{{ returnPath |default( path('chill_event__event_show', { 'event_id' : participation.event.id } )) }}" class="sc-button bt-cancel"> <a href="{{ returnPath |default( path('chill_event__event_show', { 'event_id' : participation.event.id } )) }}" class="btn btn-cancel">
{{ returnLabel |default('Back to the event'|trans) }} {{ returnLabel |default('Back to the event'|trans) }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-edit' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-edit' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -52,14 +52,13 @@
</table> </table>
<ul class="record_actions"> <ul class="record_actions">
<li> <li class="cancel">
<a href="{{ path('chill_event__event_show', { 'event_id' : participations[0].event.id } ) }}" class="sc-button btn-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : participations[0].event.id } ) }}" class="btn btn-cancel">
<i class="fa fa-arrow-left"></i>
{{ 'Back to the event'|trans }} {{ 'Back to the event'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -33,13 +33,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button btn-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="btn btn-cancel">
<i class="fa fa-arrow-left"></i>
{{ 'Back to the event'|trans }} {{ 'Back to the event'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }} {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
</li> </li>
</ul> </ul>

View File

@@ -10,10 +10,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_role') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }} {{ form_row(edit_form.submit, { 'attr': { 'class' : 'btn btn-edit' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -24,10 +24,10 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event_admin_role_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a> <a href="{{ path('chill_event_admin_role_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -38,7 +38,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event_admin_role_new') }}" class="sc-button bt-new">{{ 'Create a new role'|trans }}</a> <a href="{{ path('chill_event_admin_role_new') }}" class="btn btn-new">{{ 'Create a new role'|trans }}</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@@ -11,10 +11,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_role') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }} {{ form_row(form.submit, { 'attr': { 'class' : 'btn btn-new' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -27,14 +27,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_role') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }} {{ form_row(delete_form.submit, { 'attr': { 'class' : 'btn btn-delete' }}) }}
{{ form_end(delete_form) }} {{ form_end(delete_form) }}
</li> </li>
</ul> </ul>

View File

@@ -11,10 +11,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_status') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }} {{ form_row(edit_form.submit, { 'attr': { 'class' : 'btn btn-edit' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -24,10 +24,10 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event_admin_status_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a> <a href="{{ path('chill_event_admin_status_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a> <a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li> </li>
</ul> </ul>
</td> </td>
@@ -38,7 +38,7 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li> <li>
<a href="{{ path('chill_event_admin_status_new') }}" class="sc-button bt-new">{{ 'Create a new status'|trans }}</a> <a href="{{ path('chill_event_admin_status_new') }}" class="btn btn-new">{{ 'Create a new status'|trans }}</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@@ -11,10 +11,10 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_status') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }} {{ form_row(form.submit, { 'attr': { 'class' : 'btn btn-new' }}) }}
</li> </li>
</ul> </ul>

View File

@@ -27,14 +27,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_event_admin_status') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }} {{ form_row(delete_form.submit, { 'attr': { 'class' : 'btn btn-delete' }}) }}
{{ form_end(delete_form) }} {{ form_end(delete_form) }}
</li> </li>
</ul> </ul>

View File

@@ -42,7 +42,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event__event_show', { 'event_id': event.id} ) }}" class="sc-button bt-view"> <a href="{{ path('chill_event__event_show', { 'event_id': event.id} ) }}" class="btn btn-view">
{{ 'Show the event'|trans }} {{ 'Show the event'|trans }}
</a> </a>
</li> </li>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = familyMember.person %} {% set person = familyMember.person %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'Edit family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'Edit family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -26,12 +26,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-edit' }, 'label': 'Edit' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-edit' }, 'label': 'Edit' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'Family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'Family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -65,17 +65,17 @@
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::SHOW'), f) %} {% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::SHOW'), f) %}
<li> <li>
<a href="{{ path('chill_family_members_family_members_view', { 'id': f.id } ) }}" class="sc-button bt-show"></a> <a href="{{ path('chill_family_members_family_members_view', { 'id': f.id } ) }}" class="btn btn-show"></a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::UPDATE'), f) %} {% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::UPDATE'), f) %}
<li> <li>
<a href="{{ path('chill_family_members_family_members_edit', { 'id': f.id } ) }}" class="sc-button bt-edit"></a> <a href="{{ path('chill_family_members_family_members_edit', { 'id': f.id } ) }}" class="btn btn-edit"></a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::DELETE'), f) %} {% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::DELETE'), f) %}
<li> <li>
<a href="{{ path('chill_family_members_family_members_delete', { 'id': f.id } ) }}" class="sc-button bt-delete"></a> <a href="{{ path('chill_family_members_family_members_delete', { 'id': f.id } ) }}" class="btn btn-delete"></a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@@ -116,7 +116,7 @@
{% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::CREATE'), person) %} {% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::CREATE'), person) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="sc-button bt-create" href="{{ path('chill_family_members_family_members_new', { 'id': person.id} ) }}">{{ 'Create new family membership'|trans }}</a> <a class="btn btn-create" href="{{ path('chill_family_members_family_members_new', { 'id': person.id} ) }}">{{ 'Create new family membership'|trans }}</a>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set title = 'New family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% set title = 'New family members for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
@@ -26,12 +26,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
<li> <li>
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Create' } ) }} {{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Create' } ) }}
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = '' %} {% set activeRouteKey = '' %}
{% set person = familyMember.person %} {% set person = familyMember.person %}
@@ -73,13 +73,13 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path("chill_family_members_family_members_index", { 'id': person.id } ) }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
{% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::UPDATE'), familyMember) %} {% if is_granted(constant('Chill\\AMLI\\FamilyMembersBundle\\Security\\Voter\\FamilyMemberVoter::UPDATE'), familyMember) %}
<li> <li>
<a href="{{ path('chill_family_members_family_members_edit', { 'id': familyMember.id } ) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('chill_family_members_family_members_edit', { 'id': familyMember.id } ) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@@ -0,0 +1,59 @@
<?php
namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Chill\MainBundle\Repository\NotificationRepository;
use Chill\MainBundle\Notification\NotificationRenderer;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Routing\Annotation\Route;
use Chill\MainBundle\Pagination\PaginatorFactory;
/**
* @Route("/{_locale}/notification")
*/
class NotificationController extends AbstractController
{
private $security;
public function __construct(Security $security)
{
$this->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,
]);
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Chill\MainBundle\Notification;
use Chill\MainBundle\Entity\Notification;
use Chill\PersonBundle\Notification\AccompanyingPeriodNotificationRenderer;
use Chill\ActivityBundle\Notification\ActivityNotificationRenderer;
final class NotificationRenderer
{
private array $renderers;
public function __construct(
AccompanyingPeriodNotificationRenderer $accompanyingPeriodNotificationRenderer,
ActivityNotificationRenderer $activityNotificationRenderer)
{
// TODO configure automatically
// TODO CREER UNE INTERFACE POUR ETRE SUR QUE LES RENDERERS SONT OK
$this->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);
}
}

View File

@@ -23,6 +23,8 @@ use Chill\MainBundle\Entity\Notification;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository; use Doctrine\Persistence\ObjectRepository;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Query;
final class NotificationRepository implements ObjectRepository final class NotificationRepository implements ObjectRepository
{ {
@@ -59,8 +61,54 @@ final class NotificationRepository implements ObjectRepository
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); 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() { public function getClassName() {
return Notification::class; return Notification::class;
} }
} }

View File

@@ -1,27 +1,25 @@
div.chill-collection { div.chill-collection {
ul.chill-collection__list { padding: 1em;
list-style: none;
padding: 0;
margin-bottom: 1.5rem;
li.chill-collection__list__entry:nth-child(2n) {
background-color: var(--chill-light-gray);
padding: 0.5rem 0;
}
// all entries, except the last one
li.chill-collection__list__entry:nth-last-child(1n+2) {
margin-bottom: 1rem;
}
button.chill-collection__list__remove-entry {
margin-left: 0.5rem;
}
}
button.chill-collection__button--add {
}
}
ul.list-entry {
list-style: none;
padding: 0;
margin-bottom: 1.5rem;
li.entry {
padding: 1em;
border: 1px solid var(--bs-chill-light-gray);
&:nth-child(even) {
background-color: var(--bs-chill-light-gray);
}
}
button.remove-entry {
margin-left: 0.5rem;
}
}
button.add-entry {
}
}

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