mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 16:43:48 +00:00
Merge branch 'master' of https://git.framasoft.org/Chill-project/Chill-Main
This commit is contained in:
@@ -100,7 +100,7 @@ module.exports = function(grunt) {
|
||||
sass: {
|
||||
dist: {
|
||||
options: {
|
||||
debugInfo: true,
|
||||
debugInfo: false,
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
|
22
Resources/config/doctrine/Address.orm.yml
Normal file
22
Resources/config/doctrine/Address.orm.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
Chill\MainBundle\Entity\Address:
|
||||
type: entity
|
||||
table: chill_main_address
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
streetAddress1:
|
||||
type: string
|
||||
length: 255
|
||||
streetAddress2:
|
||||
type: string
|
||||
length: 255
|
||||
validFrom:
|
||||
type: date
|
||||
manyToOne:
|
||||
postcode:
|
||||
targetEntity: Chill\MainBundle\Entity\PostalCode
|
||||
lifecycleCallbacks: { }
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\Country:
|
||||
type: entity
|
||||
table: null
|
||||
cache:
|
||||
usage: READ_ONLY
|
||||
region: country_cache_region
|
||||
fields:
|
||||
id:
|
||||
type: integer
|
||||
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\GroupCenter:
|
||||
type: entity
|
||||
table: group_centers
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
region: acl_cache_region
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
@@ -11,5 +14,9 @@ Chill\MainBundle\Entity\GroupCenter:
|
||||
center:
|
||||
targetEntity: Chill\MainBundle\Entity\Center
|
||||
inversedBy: groupCenters
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
permissionsGroup:
|
||||
targetEntity: Chill\MainBundle\Entity\PermissionsGroup
|
||||
targetEntity: Chill\MainBundle\Entity\PermissionsGroup
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\Language:
|
||||
type: entity
|
||||
table: null
|
||||
cache:
|
||||
usage: READ_ONLY
|
||||
region: language_cache_region
|
||||
id:
|
||||
id:
|
||||
type: string
|
||||
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\PermissionsGroup:
|
||||
type: entity
|
||||
table: permission_groups
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
region: acl_cache_region
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
@@ -14,4 +17,6 @@ Chill\MainBundle\Entity\PermissionsGroup:
|
||||
manyToMany:
|
||||
roleScopes:
|
||||
targetEntity: Chill\MainBundle\Entity\RoleScope
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
|
21
Resources/config/doctrine/PostalCode.orm.yml
Normal file
21
Resources/config/doctrine/PostalCode.orm.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
Chill\MainBundle\Entity\PostalCode:
|
||||
type: entity
|
||||
table: chill_main_postal_code
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
name:
|
||||
type: string
|
||||
length: 255
|
||||
column: label
|
||||
code:
|
||||
type: string
|
||||
length: 100
|
||||
manyToOne:
|
||||
country:
|
||||
targetEntity: Chill\MainBundle\Entity\Country
|
||||
lifecycleCallbacks: { }
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\RoleScope:
|
||||
type: entity
|
||||
table: role_scopes
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
region: acl_cache_region
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
@@ -15,4 +18,7 @@ Chill\MainBundle\Entity\RoleScope:
|
||||
scope:
|
||||
targetEntity: Chill\MainBundle\Entity\Scope
|
||||
inversedBy: roleScopes
|
||||
nullable: true
|
||||
nullable: true
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\Scope:
|
||||
type: entity
|
||||
table: scopes
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
region: acl_cache_region
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
@@ -13,4 +16,6 @@ Chill\MainBundle\Entity\Scope:
|
||||
oneToMany:
|
||||
roleScopes:
|
||||
targetEntity: Chill\MainBundle\Entity\RoleScope
|
||||
mappedBy: scope
|
||||
mappedBy: scope
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\User:
|
||||
type: entity
|
||||
table: users
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
region: acl_cache_region
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
@@ -27,5 +30,7 @@ Chill\MainBundle\Entity\User:
|
||||
manyToMany:
|
||||
groupCenters:
|
||||
targetEntity: Chill\MainBundle\Entity\GroupCenter
|
||||
cache:
|
||||
usage: NONSTRICT_READ_WRITE
|
||||
|
||||
|
||||
|
@@ -50,10 +50,6 @@ chill_main_admin_central:
|
||||
defaults: { _controller: ChillMainBundle:Admin:index }
|
||||
options:
|
||||
menus:
|
||||
section:
|
||||
order: 30
|
||||
label: Admin Menu
|
||||
icons: [gears]
|
||||
admin_permissions:
|
||||
order: 0
|
||||
label: Main admin menu
|
||||
|
@@ -51,6 +51,13 @@ services:
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
chill.main.twig.delegated_block:
|
||||
class: Chill\MainBundle\Templating\DelegatedBlockRenderingTwig
|
||||
arguments:
|
||||
- "@event_dispatcher"
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
chill.main.twig.csv_cell:
|
||||
class: Chill\MainBundle\Templating\CSVCellTwig
|
||||
tags:
|
||||
@@ -127,3 +134,10 @@ services:
|
||||
- "@translator"
|
||||
tags:
|
||||
- { name: validator.constraint_validator, alias: 'role_scope_scope_presence' }
|
||||
|
||||
chill.main.form.type.postal_code_type:
|
||||
class: Chill\MainBundle\Form\Type\PostalCodeType
|
||||
arguments:
|
||||
- "@chill.main.helper.translatable_string"
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
1
Resources/fixtures/postal_code_with_error.csv
Normal file
1
Resources/fixtures/postal_code_with_error.csv
Normal file
@@ -0,0 +1 @@
|
||||
1000,BRUXELLES - (BRUXELLES),DDS,BRUXELLES,BRUXELLES,Bruxelles
|
|
66
Resources/migrations/Version20160310122322.php
Normal file
66
Resources/migrations/Version20160310122322.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
* Add postal code and addresses
|
||||
*/
|
||||
class Version20160310122322 extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('CREATE SEQUENCE chill_main_address_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE chill_main_postal_code_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE TABLE chill_main_address ('
|
||||
. 'id INT NOT NULL, '
|
||||
. 'postcode_id INT DEFAULT NULL, '
|
||||
. 'streetAddress1 VARCHAR(255) NOT NULL, '
|
||||
. 'streetAddress2 VARCHAR(255) NOT NULL, '
|
||||
. 'validFrom DATE NOT NULL, '
|
||||
. 'PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX IDX_165051F6EECBFDF1 ON chill_main_address '
|
||||
. '(postcode_id)');
|
||||
$this->addSql('CREATE TABLE chill_main_postal_code ('
|
||||
. 'id INT NOT NULL, '
|
||||
. 'country_id INT DEFAULT NULL, '
|
||||
. 'label VARCHAR(255) NOT NULL, '
|
||||
. 'code VARCHAR(100) NOT NULL, '
|
||||
. 'PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX IDX_6CA145FAF92F3E70 ON chill_main_postal_code '
|
||||
. '(country_id)');
|
||||
$this->addSql('ALTER TABLE chill_main_address ADD CONSTRAINT '
|
||||
. 'FK_165051F6EECBFDF1 '
|
||||
. 'FOREIGN KEY (postcode_id) '
|
||||
. 'REFERENCES chill_main_postal_code (id) '
|
||||
. 'NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE chill_main_postal_code ADD CONSTRAINT '
|
||||
. 'FK_6CA145FAF92F3E70 '
|
||||
. 'FOREIGN KEY (country_id) '
|
||||
. 'REFERENCES Country (id) '
|
||||
. 'NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_main_address '
|
||||
. 'DROP CONSTRAINT FK_165051F6EECBFDF1');
|
||||
$this->addSql('DROP SEQUENCE chill_main_address_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE chill_main_postal_code_id_seq CASCADE');
|
||||
$this->addSql('DROP TABLE chill_main_address');
|
||||
$this->addSql('DROP TABLE chill_main_postal_code');
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,5 +1,7 @@
|
||||
// YOUR CUSTOM SCSS
|
||||
@import 'custom/timeline';
|
||||
@import 'custom/mixins/entity';
|
||||
@import 'custom/activity';
|
||||
|
||||
html,body {
|
||||
min-height:100%;
|
||||
@@ -147,7 +149,8 @@ div.input_with_post_text input {
|
||||
}
|
||||
/* <- INPUT CLASS */
|
||||
|
||||
dl.chill_report_view_data {
|
||||
dl.chill_report_view_data,
|
||||
dl.chill_view_data {
|
||||
|
||||
dt {
|
||||
margin-top: 1.5em;
|
||||
@@ -168,3 +171,20 @@ dl.chill_report_view_data {
|
||||
.flash_message {
|
||||
margin-top: 2.5em;
|
||||
}
|
||||
|
||||
blockquote.chill-user-quote {
|
||||
border-left: 10px solid $chill-yellow;
|
||||
margin: 1.5em 10px;
|
||||
padding: 0.5em 10px;
|
||||
quotes: "\201C""\201D""\2018""\2019";
|
||||
background-color: $chill-llight-gray;
|
||||
|
||||
|
||||
p { display: inline; }
|
||||
|
||||
}
|
||||
|
||||
.chill-no-data-statement {
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
4
Resources/public/sass/custom/_activity.scss
Normal file
4
Resources/public/sass/custom/_activity.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
span.entity.entity-activity.activity-reason {
|
||||
@include entity($chill-pink, white);
|
||||
}
|
||||
|
15
Resources/public/sass/custom/mixins/entity.scss
Normal file
15
Resources/public/sass/custom/mixins/entity.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
@mixin entity($background-color, $color: white) {
|
||||
font-variant: small-caps;
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 88%;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
color: $color;
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
@@ -22,6 +22,12 @@ Edit: Modifier
|
||||
Update: Mettre à jour
|
||||
Back to the list: Retour à la liste
|
||||
|
||||
#addresses
|
||||
Street address1: Adresse ligne 1
|
||||
Street address2: Adresse ligne 2
|
||||
Postal code: Code postal
|
||||
Valid from: Valide à partir du
|
||||
|
||||
#serach
|
||||
Your search is empty. Please provide search terms.: La recherche est vide. Merci de fournir des termes de recherche.
|
||||
The domain %domain% is unknow. Please check your search.: Le domaine de recherche "%domain%" est inconnu. Merci de vérifier votre recherche.
|
||||
|
10
Resources/views/Address/macro.html.twig
Normal file
10
Resources/views/Address/macro.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{%- macro _render(address, options) -%}
|
||||
{% set options = { 'with_valid_from' : true }|merge(options|default({})) %}
|
||||
{% if address.streetAddress1 is not empty %}<span class="street street1">{{ address.streetAddress1 }}</span><br/>{% endif %}
|
||||
{% if address.streetAddress2 is not empty %}<span class="street street2">{{ address.streetAddress2 }}</span><br/>{% endif %}
|
||||
<span class="postalCode"><span class="code">{{ address.postCode.code }}</span> <span class="name">{{ address.postCode.name }}</span></span><br/>
|
||||
<span class="country">{{ address.postCode.country.name|localize_translatable_string }}</span><br/>
|
||||
{%- if options['with_valid_from'] == true -%}
|
||||
<span class="address_since">{{ 'Since %date%'|trans( { '%date%' : address.validFrom|localizeddate('long', 'none') } ) }}</span>
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
Reference in New Issue
Block a user