diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed9cdebf..994d4bd61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to * [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty * [search]: Order of birthdate fields changed in advanced search to avoid confusion. * [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675) +* [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620) +* [admin]: Add crud for composition type in admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/611) ## Test releases diff --git a/docs/source/development/exports.rst b/docs/source/development/exports.rst index 2d3323ff7..3b01f9e0f 100644 --- a/docs/source/development/exports.rst +++ b/docs/source/development/exports.rst @@ -10,17 +10,17 @@ Exports ******* -Export is an important issue for the Chill software : users should be able to : +Export is an important issue within the Chill software : users should be able to : - compute statistics about their activity ; -- list "things" which make part of their activities. +- list "things" which are a part of their activities. The `main bundle`_ provides a powerful framework to build custom queries with re-usable parts across differents bundles. .. contents:: Table of content :local: -.. seealso:: +.. seealso:: `The issue where this framework was discussed `_ Provides some information about the pursued features and architecture. @@ -32,37 +32,37 @@ Concepts Some vocabulary: 3 "Export elements" ------------------------------------ -Four terms are used for this framework : +Four terms are used for this framework : -exports - provides some basic operation on the date. Two kind of exports are available : +Exports + provide some basic operation on the data. Two kinds of exports are available : - computed data : it may be "the number of people", "the number of activities", "the duration of activities", ... - - list data : it may be "the list of people", "the list of activity", ... + - list data : it may be "the list of people", "the list of activities", ... -filters - The filters make a filter on the date: it removes some information the user doesn't want to introduce in the computation done by export. In other word, filters make a filter... +Filters + The filters create a filter on the data: it removes some information the user doesn't want to introduce in the computation done by the export. - Example of filter: "people under 18 years olds", "activities between the 1st of June and the 31st December", ... + Example of a filter: "people under 18 years olds", "activities between the 1st of June and the 31st December", ... -aggregators - The aggregator aggregates the data into some group (some software use the term 'bucket'). +Aggregators + The aggregator aggregates the data into some group (some software use the term 'bucket'). - Example of aggregator : "group people by gender", "group people by nationality", "group activity by type", ... + Example of an aggregator : "group people by gender", "group people by nationality", "group activity by type", ... -formatters - The formatters format the data into a :class:`Symfony\Component\HttpFoundation\Response`, which will be returned "as is" by the controller to the web client. +Formatters + The formatters format the data into a :class:`Symfony\Component\HttpFoundation\Response`, which will be returned "as is" by the controller to the web client. - Example of formatter: "format data as CSV", "format data as ods spreadsheet", ... + Example of a formatter: "format data as CSV", "format data as an ods spreadsheet", ... Anatomy of an export --------------------- -An export may be explained as a sentence, where each part of this sentence refers to one or multiple exports element. Examples : +An export can be thought of as a sentence where each part of this sentence refers to one or multiple export elements. Examples : **Example 1**: Count the number of people having at least one activity in the last 12 month, and group them by nationality and gender, and format them in a CSV spreadsheet. -Here : +Here : - *count the number of people* is the export part - *having at least one activity* is the filter part @@ -72,10 +72,10 @@ Here : Note that : -- aggregators, filters, exports and aggregators are cross-bundle. Here the bundle *activity* provides a filter which apply on an export provided by the person bundle ; -- there may exists multiple aggregator or filter for one export. Currently, only one export is allowed. +- Aggregators, filters, exports and formatters are cross-bundle. Here the bundle *activity* provides a filter which is applied on an export provided by the person bundle ; +- Multiple aggregator or filter for one export may exist. Currently, only one export is allowed. -The result might be : +The result might be : +-----------------------+----------------+---------------------------+ | Nationality | Gender | Number of people | @@ -89,9 +89,9 @@ The result might be : | France | Female | 150 | +-----------------------+----------------+---------------------------+ -**Example 2**: Count the average duration of an activity with type "meeting", which occurs between the 1st of June and the 31st of December, group them by week, and format the data in a OpenDocument spreadsheet. +**Example 2**: Count the average duration of an activity with type "meeting", which occurs between the 1st of June and the 31st of December, group them by week, and format the data in an OpenDocument spreadsheet. -Here : +Here : - *count the average duration of an activity* is the export part - *activity with type meeting* is a filter part @@ -102,7 +102,7 @@ Here : The result might be : +-----------------------+----------------------+ -| Week | Number of activities | +| Week | Number of activities | +=======================+======================+ | 2015-10 | 10 | +-----------------------+----------------------+ @@ -116,77 +116,77 @@ The result might be : Authorization and exports ------------------------- -Exports, filters and aggregators should not make see data the user is not allowed to see. +Exports, filters and aggregators should not show data the user is not allowed to see within the application. In other words, developers are required to take care of user authorization for each export. -It should exists a special role that should be granted to users which are allowed to build exports. For more simplicity, this role should apply on center, and should not requires special circles. +There should be a specific role that grants permission to users who are allowed to build exports. For more simplicity, this role should apply on a center, and should not require special circles. -How does the magic works ? +How does the magic work ? =========================== To build an export, we rely on the capacity of the database to execute queries with aggregate (i.e. GROUP BY) and filter (i.e. WHERE) instructions. An export is an SQL query which is initiated by an export, and modified by aggregators and filters. -.. note:: +.. note:: **Example**: Count the number of people having at least one activity in the last 12 month, and group them by nationality and gender - 1. The report initiate the query + 1. The report initiates the query .. code-block:: SQL SELECT count(people.*) FROM people - 2. The filter add a where and join clause : + 2. The filter adds a where and join clause : .. code-block:: SQL - SELECT count(people.*) FROM people - RIGHT JOIN activity + SELECT count(people.*) FROM people + RIGHT JOIN activity WHERE activity.date IS BETWEEN now AND 6 month ago - 3. The aggregator "nationality" add a GROUP BY clause and a column in the SELECT statement: + 3. The aggregator "nationality" adds a GROUP BY clause and a column in the SELECT statement: .. code-block:: sql - SELECT people.nationality, count(people.*) FROM people - RIGHT JOIN activity - WHERE activity.date IS BETWEEN now AND 6 month ago + SELECT people.nationality, count(people.*) FROM people + RIGHT JOIN activity + WHERE activity.date IS BETWEEN now AND 6 month ago GROUP BY nationality - 4. The aggregator "gender" do the same job as the nationality aggregator : it adds a GROUP BY clause and a column in the SELECT statement : + 4. The aggregator "gender" does the same job as the nationality aggregator : it adds a GROUP BY clause and a column in the SELECT statement : .. code-block:: sql - SELECT people.nationality, people.gender, count(people.*) - FROM people RIGHT JOIN activity - WHERE activity.date IS BETWEEN now AND 6 month ago + SELECT people.nationality, people.gender, count(people.*) + FROM people RIGHT JOIN activity + WHERE activity.date IS BETWEEN now AND 6 month ago GROUP BY nationality, gender -Each filter, aggregator and filter may collect parameters from the user by providing a form. This form is appended to the export form. Here is an example. +Each filter, aggregator and filter may collect parameters from the user through a form. This form is appended to the export form. Here is an example. .. figure:: /_static/screenshots/development/export_form-fullpage.png - The screenshot show the export form for ``CountPeople`` (Nombre de personnes). The filter by date of birth is checked (*Filtrer par date de naissance de la personne*), which allow to show a subform, which is provided by the :class:`Chill\PersonBundle\Export\Filter\BirthdateFilter`. The other filter, which are unchecked, does not show the subform. + The screenshot shows the export form for ``CountPeople`` (Nombre de personnes). The filter by date of birth is checked (*Filtrer par date de naissance de la personne*), which triggers a subform, which is provided by the :class:`Chill\PersonBundle\Export\Filter\BirthdateFilter`. The other unchecked filter does not show the subform. - Two aggregators are also checked : by Country of birth (*Aggréger les personnes par pays de naissance*, corresponding class is :class:`Chill\PersonBundle\Export\Aggregator\CountryOfBirthAggregator`, which also open a subform. The aggregator by gender (*Aggréger les personnes par genre*) is also checked, but there is no corresponding subform. + Two aggregators are also checked : by Country of birth (*Aggréger les personnes par pays de naissance*, the corresponding class is :class:`Chill\PersonBundle\Export\Aggregator\CountryOfBirthAggregator`, which also triggers a subform. The aggregator by gender (*Aggréger les personnes par genre*) is also checked, but there is no corresponding subform. The Export Manager ------------------ -The Export manager (:class:`Chill\MainBundle\Export\ExportManager` is the central class which register all exports, aggregators, filters and formatters. +The Export manager (:class:`Chill\MainBundle\Export\ExportManager` is the central class which registers all exports, aggregators, filters and formatters. -The export manager is also responsible for orchestrating the whole export process, producing a :class:`Symfony\FrameworkBundle\HttpFoundation\Request` to each export request. +The export manager is also responsible for orchestrating the whole export process, producing a :class:`Symfony\FrameworkBundle\HttpFoundation\Request` for each export request. The export form step -------------------- -The form step allow to build a form, aggregating different parts of the module. +The form step allows you to build a form, combining different parts of the module. -The building of forms is separated between different subform, which are responsible for rendering their part of the form (aggregators, filters, and export). +The building of forms is split into different subforms, where each one is responsible for rendering their part of the form (aggregators, filters, and export). .. figure:: /_static/puml/exports/form_steps.png :scale: 40% @@ -194,12 +194,12 @@ The building of forms is separated between different subform, which are responsi The formatter form step ----------------------- -The formatter form is processed *after* the user filled the export form. It is built the same way, but receive in parameters the data entered by the user on the previous step (i.e. export form). It may then adapt it accordingly (example: show a list of columns selected in aggregators). +The formatter form is processed *after* the user filled the export form. It is built the same way, but receives the data entered by the user on the previous step as parameters (i.e. export form). It may then adapt it accordingly (example: show a list of columns selected in aggregators). Processing the export --------------------- -The export process may be explained by this schema : +The export process can be explained by this schema : .. figure:: /_static/puml/exports/processing_export.png :scale: 40% @@ -219,20 +219,20 @@ This is an example of the ``CountPerson`` export : :language: php :linenos: -* **Line 36**: the ``getType`` function return a string. This string will be used to find the aggregtors and filters which will apply to this export. -* **Line 41**: a simple description to help user to understand what your export does. +* **Line 36**: the ``getType`` function returns a string. This string will be used to find the aggregtors and filters which will apply to this export. +* **Line 41**: a simple description to help users understand what your export does. * **Line 46**: The title of the export. A summary of what your export does. -* **Line 51**: The list of roles requires to execute this export. +* **Line 51**: The list of roles required to execute this export. * **Line 56**: We initiate the query here... -* **Line 59**: We have to filter the query with centers the users checked in the form. We process the $acl variable to get all ``Center`` object in one array -* **Line 63**: We create the query, with a query builder. -* **Line 74**: We simply returns the result, but take care of hydrating the results as an array. -* **Line 103**: return the list of formatters types which are allowed to apply on this filter +* **Line 59**: We have to filter the query with centers the users checked in the form. We process the $acl variable to get all ``Center`` objects in one array +* **Line 63**: We create the query with a query builder. +* **Line 74**: We return the result, but make sure to hydrate the results as an array. +* **Line 103**: return the list of formatter types which are allowed to be applied on this filter Filters ------- -This is an example of the *filter by birthdate*. This filter ask some information in a form (`buildForm` is not empty), and this form must be validated. To performs this validations, we implement a new Interface: :class:`Chill\MainBundle\Export\ExportElementValidatedInterface`: +This is an example of the *filter by birthdate*. This filter asks some information through a form (`buildForm` is not empty), and this form must be validated. To perform this validation, we implement a new Interface: :class:`Chill\MainBundle\Export\ExportElementValidatedInterface`: .. literalinclude:: /_static/code/exports/BirthdateFilter.php :language: php diff --git a/grumphp.yml b/grumphp.yml index 8efce6109..c81830d5b 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -24,6 +24,7 @@ parameters: - "/spec/" - "/var/" - "/vendor/" + - "/tests/app" # Psalm tasks.psalm.blocking: true diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index 42981a551..1f6ca4401 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -1,11 +1,10 @@ parameters: ignoreErrors: - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 2 path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -25,209 +24,194 @@ parameters: path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityReasonAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityReasonAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityTypeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityTypeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityUserAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityUserAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\CountActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\CountActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityReasonFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityReasonFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityTypeFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityTypeFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php - - message: - """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ + count: 1 + path: src/Bundle/ChillActivityBundle/Form/ActivityType.php + + - + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php - - message: - """ - #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php @@ -237,47 +221,42 @@ parameters: path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php - - message: - """ - #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldDate\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldDate\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php - - message: - """ - #^Parameter \\$twigEngine of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldLongChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$twigEngine of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldLongChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php - - message: - """ - #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldNumber\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldNumber\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php - - message: - """ - #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldText\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldText\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php - - message: - """ - #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldTitle\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: - since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# - """ + message: """ + #^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldTitle\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\: + since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$# + """ count: 1 path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php @@ -292,182 +271,162 @@ parameters: path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 6 path: src/Bundle/ChillEventBundle/Controller/EventController.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillEventBundle/Form/EventType.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillEventBundle/Search/EventSearch.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php - - message: - """ - #^Parameter \\$role of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getReachableCenters\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$role of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getReachableCenters\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php - - message: - """ - #^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$# - """ + message: """ + #^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php - - message: - """ - #^Call to deprecated method getRegionBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Countries\\} instead\\.$# - """ + message: """ + #^Call to deprecated method getRegionBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Countries\\} instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php - - message: - """ - #^Parameter \\$role of anonymous function has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$role of anonymous function has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php - - message: - """ - #^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$# - """ + message: """ + #^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$# + """ count: 2 path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php - - message: - """ - #^Class Chill\\\\MainBundle\\\\Entity\\\\User implements deprecated interface Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\AdvancedUserInterface\\: - since Symfony 4\\.1$# - """ + message: """ + #^Class Chill\\\\MainBundle\\\\Entity\\\\User implements deprecated interface Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\AdvancedUserInterface\\: + since Symfony 4\\.1$# + """ count: 1 path: src/Bundle/ChillMainBundle/Entity/User.php - - message: - """ - #^Return type of method Chill\\\\MainBundle\\\\Entity\\\\User\\:\\:getRoles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\MainBundle\\\\Entity\\\\User\\:\\:getRoles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Entity/User.php - - message: - """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\DirectExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\MainBundle\\\\Export\\\\DirectExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Export/DirectExportInterface.php - - message: - """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Export/ExportInterface.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillMainBundle/Export/ExportManager.php - - message: - """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ModifierInterface\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ModifierInterface\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Export/ModifierInterface.php - - message: - """ - #^Class Chill\\\\MainBundle\\\\Form\\\\Event\\\\CustomizeFormEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\MainBundle\\\\Form\\\\Event\\\\CustomizeFormEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php @@ -477,74 +436,66 @@ parameters: path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php - - message: - """ - #^Parameter \\$attribute of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:userHasAccess\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$attribute of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:userHasAccess\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php - - message: - """ - #^Parameter \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCircles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCircles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelper\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelper\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelper.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelperFactory\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelperFactory\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperFactory.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelperGenerator\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelperGenerator\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php - - message: - """ - #^Class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php - - message: - """ - #^Class Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcher implements deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Class Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcher implements deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php @@ -554,65 +505,58 @@ parameters: path: src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php - - message: - """ - #^Class Chill\\\\MainBundle\\\\Templating\\\\Events\\\\DelegatedBlockRenderingEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\MainBundle\\\\Templating\\\\Events\\\\DelegatedBlockRenderingEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php - - message: - """ - #^Class Chill\\\\PersonBundle\\\\Actions\\\\ActionEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\PersonBundle\\\\Actions\\\\ActionEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Actions/ActionEvent.php - - message: - """ - #^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\: - since 1\\.1 use `getOpenedAccompanyingPeriod instead$# - """ + message: """ + #^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\: + since 1\\.1 use `getOpenedAccompanyingPeriod instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php - - message: - """ - #^Class Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\: - since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$# - """ + message: """ + #^Class Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\: + since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php - - message: - """ - #^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\: - since 1\\.1 use `getOpenedAccompanyingPeriod instead$# - """ + message: """ + #^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\: + since 1\\.1 use `getOpenedAccompanyingPeriod instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php - - message: - """ - #^Class Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\: - since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$# - """ + message: """ + #^Class Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\: + since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php @@ -622,164 +566,146 @@ parameters: path: src/Bundle/ChillPersonBundle/Entity/Person.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\AgeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\AgeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\CountPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\CountPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - message: - """ - #^Call to deprecated method execute\\(\\) of class Doctrine\\\\DBAL\\\\Statement\\: - Statement\\:\\:execute\\(\\) is deprecated, use Statement\\:\\:executeQuery\\(\\) or executeStatement\\(\\) instead$# - """ + message: """ + #^Call to deprecated method execute\\(\\) of class Doctrine\\\\DBAL\\\\Statement\\: + Statement\\:\\:execute\\(\\) is deprecated, use Statement\\:\\:executeQuery\\(\\) or executeStatement\\(\\) instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodClosingFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodClosingFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodOpeningFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodOpeningFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\BirthdateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\BirthdateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php - - message: - """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\NationalityFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\NationalityFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php @@ -789,254 +715,226 @@ parameters: path: src/Bundle/ChillPersonBundle/Form/PersonType.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php - - message: - """ - #^Class Chill\\\\PersonBundle\\\\Privacy\\\\AccompanyingPeriodPrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\PersonBundle\\\\Privacy\\\\AccompanyingPeriodPrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php - - message: - """ - #^Class Chill\\\\PersonBundle\\\\Privacy\\\\PrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\PersonBundle\\\\Privacy\\\\PrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriodACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriodACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 3 path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - message: - """ - #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - message: - """ - #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Filter\\\\ReportDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Filter\\\\ReportDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillReportBundle/Form/ReportType.php - - message: - """ - #^Parameter \\$role of method Chill\\\\ReportBundle\\\\Form\\\\ReportType\\:\\:appendScopeChoices\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$role of method Chill\\\\ReportBundle\\\\Form\\\\ReportType\\:\\:appendScopeChoices\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillReportBundle/Form/ReportType.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 1 path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - message: - """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ + message: """ + #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: + Use getReachableCircles$# + """ count: 2 path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 2 path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php - - message: - """ - #^Parameter \\$role of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:setCreateForm\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Parameter \\$role of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:setCreateForm\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php - - message: - """ - #^Class Chill\\\\TaskBundle\\\\Event\\\\TaskEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\TaskBundle\\\\Event\\\\TaskEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Event/TaskEvent.php - - message: - """ - #^Class Chill\\\\TaskBundle\\\\Event\\\\UI\\\\UIEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\TaskBundle\\\\Event\\\\UI\\\\UIEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 4 path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Form\\\\SingleTaskType\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Form\\\\SingleTaskType\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php - - message: - """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Repository\\\\SingleTaskAclAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ + message: """ + #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Repository\\\\SingleTaskAclAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: + Use CenterResolverManager and its interface CenterResolverManagerInterface$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php - - message: - """ - #^Class Chill\\\\TaskBundle\\\\Security\\\\Authorization\\\\AuthorizationEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: - since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# - """ + message: """ + #^Class Chill\\\\TaskBundle\\\\Security\\\\Authorization\\\\AuthorizationEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: + since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$# + """ count: 1 path: src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 3 path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php - - message: - """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ + message: """ + #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: + since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# + """ count: 1 path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php diff --git a/phpstan-types.neon b/phpstan-types.neon index dc3f67a73..c8a0791e0 100644 --- a/phpstan-types.neon +++ b/phpstan-types.neon @@ -25,16 +25,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Form/ActivityType.php - - - message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" - count: 3 - path: src/Bundle/ChillActivityBundle/Form/ActivityType.php - - - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" - count: 2 - path: src/Bundle/ChillActivityBundle/Form/ActivityType.php - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" count: 3 diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index ddbaf0f7f..05ce2e812 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -22,6 +22,7 @@ use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable; use Chill\MainBundle\Repository\LocationRepository; use Chill\MainBundle\Repository\UserRepositoryInterface; +use Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Privacy\PrivacyEvent; @@ -41,7 +42,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Role\Role; - use Symfony\Component\Serializer\SerializerInterface; use function array_key_exists; @@ -57,6 +57,8 @@ final class ActivityController extends AbstractController private ActivityTypeRepository $activityTypeRepository; + private CenterResolverManagerInterface $centerResolver; + private EntityManagerInterface $entityManager; private EventDispatcherInterface $eventDispatcher; @@ -86,7 +88,9 @@ final class ActivityController extends AbstractController EventDispatcherInterface $eventDispatcher, LoggerInterface $logger, SerializerInterface $serializer, - UserRepositoryInterface $userRepository + UserRepositoryInterface $userRepository, + CenterResolverManagerInterface $centerResolver + ) { $this->activityACLAwareRepository = $activityACLAwareRepository; $this->activityTypeRepository = $activityTypeRepository; @@ -101,6 +105,8 @@ final class ActivityController extends AbstractController $this->logger = $logger; $this->serializer = $serializer; $this->userRepository = $userRepository; + $this->centerResolver = $centerResolver; + } /** @@ -203,7 +209,7 @@ final class ActivityController extends AbstractController // $this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity); $form = $this->createForm(ActivityType::class, $entity, [ - 'center' => $entity->getCenter(), + 'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null, 'role' => new Role('CHILL_ACTIVITY_UPDATE'), 'activityType' => $entity->getActivityType(), 'accompanyingPeriod' => $accompanyingPeriod, @@ -431,7 +437,7 @@ final class ActivityController extends AbstractController $this->denyAccessUnlessGranted(ActivityVoter::CREATE, $entity); $form = $this->createForm(ActivityType::class, $entity, [ - 'center' => $entity->getCenter(), + 'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null, 'role' => new Role('CHILL_ACTIVITY_CREATE'), 'activityType' => $entity->getActivityType(), 'accompanyingPeriod' => $accompanyingPeriod, diff --git a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php index 39c7eab36..41aa89dcb 100644 --- a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php +++ b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php @@ -61,8 +61,6 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf ActivityVoter::DELETE => [ActivityVoter::SEE_DETAILS], ActivityVoter::SEE_DETAILS => [ActivityVoter::SEE], ActivityVoter::FULL => [ - ActivityVoter::CREATE_PERSON, - ActivityVoter::CREATE_ACCOMPANYING_COURSE, ActivityVoter::DELETE, ActivityVoter::UPDATE, ], diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index 5fa0bca35..828cb68f2 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -16,8 +16,8 @@ use Chill\DocStoreBundle\Entity\StoredObject; use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable; use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable; -use Chill\MainBundle\Entity\HasCenterInterface; -use Chill\MainBundle\Entity\HasScopeInterface; +use Chill\MainBundle\Entity\HasCentersInterface; +use Chill\MainBundle\Entity\HasScopesInterface; use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User; @@ -55,7 +55,7 @@ use Symfony\Component\Validator\Constraints as Assert; * getUserFunction="getUser", * path="scope") */ -class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCenterInterface, HasScopeInterface +class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCentersInterface, HasScopesInterface { public const SENTRECEIVED_RECEIVED = 'received'; @@ -306,13 +306,17 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac * get the center * center is extracted from person. */ - public function getCenter(): ?Center + public function getCenters(): iterable { if ($this->person instanceof Person) { - return $this->person->getCenter(); + return [$this->person->getCenter()]; } - return null; + if ($this->getAccompanyingPeriod() instanceof AccompanyingPeriod) { + return $this->getAccompanyingPeriod()->getCenters() ?? []; + } + + return []; } public function getComment(): CommentEmbeddable @@ -422,6 +426,19 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac return $this->scope; } + public function getScopes(): iterable + { + if (null !== $this->getAccompanyingPeriod()) { + return $this->getAccompanyingPeriod()->getScopes(); + } + + if (null !== $this->getPerson()) { + return [$this->scope]; + } + + return []; + } + public function getSentReceived(): string { return $this->sentReceived; diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php new file mode 100644 index 000000000..19299eb6a --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -0,0 +1,90 @@ +actionRender = $actionRender; + $this->actionRepository = $actionRepository; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('socialaction', $qb->getAllAliases(), true)) { + $qb->join('activity.socialActions', 'socialaction'); + } + + $qb->addSelect('socialaction.id AS socialaction_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('socialaction_aggregator'); + } else { + $qb->groupBy('socialaction_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value) { + if ('_header' === $value) { + return 'Social action'; + } + + $sa = $this->actionRepository->find($value); + + return $this->actionRender->renderString($sa, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialaction_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked socialaction'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php new file mode 100644 index 000000000..672076693 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -0,0 +1,90 @@ +issueRepository = $issueRepository; + $this->issueRender = $issueRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('socialissue', $qb->getAllAliases(), true)) { + $qb->join('activity.socialIssues', 'socialissue'); + } + + $qb->addSelect('socialissue.id AS socialissue_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('socialissue_aggregator'); + } else { + $qb->groupBy('socialissue_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Social issues'; + } + + $i = $this->issueRepository->find($value); + + return $this->issueRender->renderString($i, []); + }; + } + + public function getQueryKeys($data): array + { + return ['socialissue_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked socialissue'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php new file mode 100644 index 000000000..81822e801 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php @@ -0,0 +1,90 @@ +thirdPartyRepository = $thirdPartyRepository; + $this->thirdPartyRender = $thirdPartyRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('thirdparty', $qb->getAllAliases(), true)) { + $qb->join('activity.thirdParties', 'thirdparty'); + } + + $qb->addSelect('thirdparty.id AS thirdparty_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('thirdparty_aggregator'); + } else { + $qb->groupBy('thirdparty_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted thirdparty'; + } + + $tp = $this->thirdPartyRepository->find($value); + + return $this->thirdPartyRender->renderString($tp, []); + }; + } + + public function getQueryKeys($data): array + { + return ['thirdparty_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked thirdparties'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php new file mode 100644 index 000000000..55df3febd --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php @@ -0,0 +1,90 @@ +userRepository = $userRepository; + $this->userRender = $userRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('user', $qb->getAllAliases(), true)) { + $qb->join('activity.users', 'user'); + } + + $qb->addSelect('user.id AS users_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('users_aggregator'); + } else { + $qb->groupBy('users_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted users'; + } + + $u = $this->userRepository->find($value); + + return $this->userRender->renderString($u, []); + }; + } + + public function getQueryKeys($data): array + { + return ['users_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by linked users'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php new file mode 100644 index 000000000..5603b1b78 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php @@ -0,0 +1,143 @@ + 'month', + 'by week' => 'week', + 'by year' => 'year', + ]; + + private const DEFAULT_CHOICE = 'year'; + + private TranslatorInterface $translator; + + public function __construct( + TranslatorInterface $translator + ) { + $this->translator = $translator; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $order = null; + + switch ($data['frequency']) { + case 'month': + $fmt = 'MM'; + +break; + + case 'week': + $fmt = 'IW'; + +break; + + case 'year': + $fmt = 'YYYY'; $order = 'DESC'; + +break; // order DESC does not works ! + + default: + throw new RuntimeException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])); + } + + $qb->addSelect(sprintf("TO_CHAR(activity.date, '%s') AS date_aggregator", $fmt)); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('date_aggregator'); + } else { + $qb->groupBy('date_aggregator'); + } + + $orderBy = $qb->getDQLPart('orderBy'); + + if (!empty($orderBy)) { + $qb->addOrderBy('date_aggregator', $order); + } else { + $qb->orderBy('date_aggregator', $order); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('frequency', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function getLabels($key, array $values, $data) + { + return static function ($value) use ($data): string { + if ('_header' === $value) { + return 'by ' . $data['frequency']; + } + + switch ($data['frequency']) { + case 'month': + $month = DateTime::createFromFormat('!m', $value); + + return sprintf( + '%02d (%s)', + $value, + $month->format('M') + ); + + case 'week': + //return $this->translator->trans('for week') .' '. $value ; + + case 'year': + //return $this->translator->trans('in year') .' '. $value ; + + default: + return $value; + } + }; + } + + public function getQueryKeys($data): array + { + return ['date_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by date'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php new file mode 100644 index 000000000..9664060da --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php @@ -0,0 +1,92 @@ +locationTypeRepository = $locationTypeRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('location', $qb->getAllAliases(), true)) { + $qb->join('activity.location', 'location'); + } + + $qb->addSelect('IDENTITY(location.locationType) AS locationtype_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('locationtype_aggregator'); + } else { + $qb->groupBy('locationtype_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Accepted locationtype'; + } + + $lt = $this->locationTypeRepository->find($value); + + return $this->translatableStringHelper->localize( + $lt->getTitle() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['locationtype_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by locationtype'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php new file mode 100644 index 000000000..c05196375 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php @@ -0,0 +1,92 @@ +scopeRepository = $scopeRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('user', $qb->getAllAliases(), true)) { + $qb->join('activity.user', 'user'); + } + + $qb->addSelect('IDENTITY(user.mainScope) AS userscope_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('userscope_aggregator'); + } else { + $qb->groupBy('userscope_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['userscope_aggregator']; + } + + public function getTitle(): string + { + return 'Group activity by userscope'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index 83b5f71e2..d318d969a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -11,15 +11,15 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Aggregator; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityTypeRepository; -use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Closure; use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; +use function in_array; class ActivityTypeAggregator implements AggregatorInterface { @@ -37,23 +37,31 @@ class ActivityTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) { - // add select element - $qb->addSelect(sprintf('IDENTITY(activity.type) AS %s', self::KEY)); + if (!in_array('type', $qb->getAllAliases(), true)) { + $qb->join('activity.activityType', 'type'); + } - // add the "group by" part - $qb->addGroupBy(self::KEY); + $qb->addSelect(sprintf('IDENTITY(activity.activityType) AS %s', self::KEY)); + + $groupby = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy(self::KEY); + } else { + $qb->groupBy(self::KEY); + } } - public function applyOn() + public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function buildForm(FormBuilderInterface $builder) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index 312456104..39c7c52cb 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -11,29 +11,33 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Aggregator; -use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; +use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserRepository; +use Chill\MainBundle\Templating\Entity\UserRender; use Closure; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; class ActivityUserAggregator implements AggregatorInterface { public const KEY = 'activity_user_id'; + private UserRender $userRender; + private UserRepository $userRepository; public function __construct( - UserRepository $userRepository + UserRepository $userRepository, + UserRender $userRender ) { $this->userRepository = $userRepository; + $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) @@ -47,7 +51,7 @@ class ActivityUserAggregator implements AggregatorInterface public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function buildForm(FormBuilderInterface $builder) @@ -62,10 +66,12 @@ class ActivityUserAggregator implements AggregatorInterface return function ($value) { if ('_header' === $value) { - return 'activity user'; + return 'Activity user'; } - return $this->userRepository->find($value)->getUsername(); + $u = $this->userRepository->find($value); + + return $this->userRender->renderString($u, []); }; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php similarity index 95% rename from src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php rename to src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php index 19811f584..83347bf11 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php @@ -9,11 +9,11 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Aggregator; +namespace Chill\ActivityBundle\Export\Aggregator\PersonAggregators; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityReasonCategoryRepository; use Chill\ActivityBundle\Repository\ActivityReasonRepository; -use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Export\ExportElementValidatedInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -23,7 +23,6 @@ use Doctrine\ORM\QueryBuilder; use RuntimeException; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Context\ExecutionContextInterface; use function array_key_exists; @@ -47,9 +46,9 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) @@ -104,9 +103,9 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali } } - public function applyOn() + public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY_PERSON; } public function buildForm(FormBuilderInterface $builder) diff --git a/src/Bundle/ChillActivityBundle/Export/Declarations.php b/src/Bundle/ChillActivityBundle/Export/Declarations.php new file mode 100644 index 000000000..82f01bcb2 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Declarations.php @@ -0,0 +1,24 @@ +repository = $em->getRepository(Activity::class); + } + + public function buildForm(FormBuilderInterface $builder) + { + // TODO: Implement buildForm() method. + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Average activities linked to an accompanying period duration by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_avg_activity_duration' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period duration' : $value; + } + + public function getQueryKeys($data): array + { + return ['export_avg_activity_duration']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Average activity linked to an accompanying period duration'; + } + + public function getType(): string + { + return Declarations::ACTIVITY; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) + { + $qb = $this->repository->createQueryBuilder('activity') + ->join('activity.accompanyingPeriod', 'acp'); + + $qb->select('AVG(activity.durationTime) as export_avg_activity_duration'); + + return $qb; + } + + public function requiredRole(): string + { + return ActivityStatsVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_ACP, + //PersonDeclarations::ACP_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php new file mode 100644 index 000000000..02ad4a5e3 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -0,0 +1,107 @@ +repository = $em->getRepository(Activity::class); + } + + public function buildForm(FormBuilderInterface $builder) + { + // TODO: Implement buildForm() method. + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Average activities linked to an accompanying period visit duration by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_avg_activity_visit_duration' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period visit duration' : $value; + } + + public function getQueryKeys($data): array + { + return ['export_avg_activity_visit_duration']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Average activity linked to an accompanying period visit duration'; + } + + public function getType(): string + { + return Declarations::ACTIVITY; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) + { + $qb = $this->repository->createQueryBuilder('activity') + ->join('activity.accompanyingPeriod', 'acp'); + + $qb->select('AVG(activity.travelTime) as export_avg_activity_visit_duration'); + + return $qb; + } + + public function requiredRole(): string + { + return ActivityStatsVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_ACP, + //PersonDeclarations::ACP_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php new file mode 100644 index 000000000..aaf8c9463 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -0,0 +1,108 @@ +repository = $em->getRepository(Activity::class); + } + + public function buildForm(FormBuilderInterface $builder) + { + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Count activities linked to an accompanying period by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_count_activity' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + return static fn ($value) => '_header' === $value ? 'Number of activities linked to an accompanying period' : $value; + } + + public function getQueryKeys($data): array + { + return ['export_count_activity']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Count activities linked to an accompanying period'; + } + + public function getType(): string + { + return Declarations::ACTIVITY; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) + { + $qb = $this->repository->createQueryBuilder('activity') + ->join('activity.accompanyingPeriod', 'acp'); + + $qb->select('COUNT(activity.id) as export_count_activity'); + + return $qb; + } + + public function requiredRole(): string + { + return ActivityStatsVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_ACP, + //PersonDeclarations::ACP_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php new file mode 100644 index 000000000..d11a7ded0 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -0,0 +1,107 @@ +repository = $em->getRepository(Activity::class); + } + + public function buildForm(FormBuilderInterface $builder) + { + // TODO: Implement buildForm() method. + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Sum activities linked to an accompanying period duration by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_sum_activity_duration' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period duration' : $value; + } + + public function getQueryKeys($data): array + { + return ['export_sum_activity_duration']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Sum activity linked to an accompanying period duration'; + } + + public function getType(): string + { + return Declarations::ACTIVITY; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) + { + $qb = $this->repository->createQueryBuilder('activity') + ->join('activity.accompanyingPeriod', 'acp'); + + $qb->select('SUM(activity.durationTime) as export_sum_activity_duration'); + + return $qb; + } + + public function requiredRole(): string + { + return ActivityStatsVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_ACP, + //PersonDeclarations::ACP_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php new file mode 100644 index 000000000..bc67e7569 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -0,0 +1,107 @@ +repository = $em->getRepository(Activity::class); + } + + public function buildForm(FormBuilderInterface $builder) + { + // TODO: Implement buildForm() method. + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Sum activities linked to an accompanying period visit duration by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to an accompanying period'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_sum_activity_visit_duration' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period visit duration' : $value; + } + + public function getQueryKeys($data): array + { + return ['export_sum_activity_visit_duration']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Sum activity linked to an accompanying period visit duration'; + } + + public function getType(): string + { + return Declarations::ACTIVITY; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) + { + $qb = $this->repository->createQueryBuilder('activity') + ->join('activity.accompanyingPeriod', 'acp'); + + $qb->select('SUM(activity.travelTime) as export_sum_activity_visit_duration'); + + return $qb; + } + + public function requiredRole(): string + { + return ActivityStatsVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_ACP, + //PersonDeclarations::ACP_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php similarity index 65% rename from src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php rename to src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index 3824b059f..6881528f6 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -9,18 +9,20 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Export; +namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; +use Chill\MainBundle\Export\GroupedExportInterface; +use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use Doctrine\ORM\Query; use LogicException; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; -class CountActivity implements ExportInterface +class CountActivity implements ExportInterface, GroupedExportInterface { protected ActivityRepository $activityRepository; @@ -41,7 +43,12 @@ class CountActivity implements ExportInterface public function getDescription() { - return 'Count activities by various parameters.'; + return 'Count activities linked to a person by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to a person'; } public function getLabels($key, array $values, $data) @@ -50,7 +57,7 @@ class CountActivity implements ExportInterface throw new LogicException("the key {$key} is not used by this export"); } - return static fn ($value) => '_header' === $value ? 'Number of activities' : $value; + return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value; } public function getQueryKeys($data) @@ -65,24 +72,23 @@ class CountActivity implements ExportInterface public function getTitle() { - return 'Count activities'; + return 'Count activities linked to a person'; } - public function getType() + public function getType(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $centers = array_map(static fn ($el) => $el['center'], $acl); - $qb = $this - ->activityRepository - ->createQueryBuilder('activity') - ->select('COUNT(activity.id) as export_count_activity') + $qb = $this->activityRepository->createQueryBuilder('activity') ->join('activity.person', 'person'); + $qb->select('COUNT(activity.id) as export_count_activity'); + $qb ->where($qb->expr()->in('person.center', ':centers')) ->setParameter('centers', $centers); @@ -90,13 +96,17 @@ class CountActivity implements ExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers() { - return ['person', 'activity']; + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_PERSON, + //PersonDeclarations::PERSON_TYPE, + ]; } } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php similarity index 90% rename from src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php rename to src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php index a99decc6c..fd2b36e65 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php @@ -9,21 +9,23 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Export; +namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; use Chill\ActivityBundle\Entity\ActivityReason; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\FormatterInterface; +use Chill\MainBundle\Export\GroupedExportInterface; use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; +use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use DateTime; use Doctrine\DBAL\Exception\InvalidArgumentException; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -32,7 +34,7 @@ use function array_key_exists; use function count; use function in_array; -class ListActivity implements ListInterface +class ListActivity implements ListInterface, GroupedExportInterface { protected EntityManagerInterface $entityManager; @@ -94,7 +96,12 @@ class ListActivity implements ListInterface public function getDescription() { - return 'List activities'; + return 'List activities linked to a person description'; + } + + public function getGroup(): string + { + return 'Exports of activities linked to a person'; } public function getLabels($key, array $values, $data) @@ -180,12 +187,12 @@ class ListActivity implements ListInterface public function getTitle() { - return 'List activities'; + return 'List activity linked to a person'; } - public function getType() + public function getType(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) @@ -267,13 +274,17 @@ class ListActivity implements ListInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::LISTS); + return ActivityStatsVoter::LISTS; } public function supportsModifiers() { - return ['activity', 'person']; + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_PERSON, + //PersonDeclarations::PERSON_TYPE, + ]; } } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php similarity index 71% rename from src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php rename to src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index 3e6122621..eabe5a15b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -9,23 +9,26 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Export; +namespace Chill\ActivityBundle\Export\Export\LinkedToPerson; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityRepository; use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; +use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; +use Chill\MainBundle\Export\GroupedExportInterface; +use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use Doctrine\ORM\Query; use LogicException; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; /** * This export allow to compute stats on activity duration. * * The desired stat must be given in constructor. */ -class StatActivityDuration implements ExportInterface +class StatActivityDuration implements ExportInterface, GroupedExportInterface { public const SUM = 'sum'; @@ -59,17 +62,22 @@ class StatActivityDuration implements ExportInterface public function getDescription() { if (self::SUM === $this->action) { - return 'Sum activities duration by various parameters.'; + return 'Sum activities linked to a person duration by various parameters.'; } } + public function getGroup(): string + { + return 'Exports of activities linked to a person'; + } + public function getLabels($key, array $values, $data) { if ('export_stat_activity' !== $key) { throw new LogicException(sprintf('The key %s is not used by this export', $key)); } - $header = self::SUM === $this->action ? 'Sum of activities duration' : false; + $header = self::SUM === $this->action ? 'Sum activities linked to a person duration' : false; return static fn (string $value) => '_header' === $value ? $header : $value; } @@ -87,19 +95,19 @@ class StatActivityDuration implements ExportInterface public function getTitle() { if (self::SUM === $this->action) { - return 'Sum activity duration'; + return 'Sum activity linked to a person duration'; } } - public function getType() + public function getType(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { $centers = array_map( - static fn (array $el): string => $el['center'], + static fn (array $el): Center => $el['center'], $acl ); @@ -118,13 +126,17 @@ class StatActivityDuration implements ExportInterface ->setParameter(':centers', $centers); } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers() { - return ['person', 'activity']; + return [ + Declarations::ACTIVITY, + Declarations::ACTIVITY_PERSON, + //PersonDeclarations::PERSON_TYPE, + ]; } } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php new file mode 100644 index 000000000..7c3508674 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -0,0 +1,92 @@ +actionRender = $actionRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + if (!in_array('socialaction', $qb->getAllAliases(), true)) { + $qb->join('activity.socialActions', 'socialaction'); + } + + $clause = $qb->expr()->in('socialaction.id', ':socialactions'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('socialactions', $data['accepted_socialactions']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialactions', EntityType::class, [ + 'class' => SocialAction::class, + 'choice_label' => function (SocialAction $sa) { + return $this->actionRender->renderString($sa, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $actions = []; + + foreach ($data['accepted_socialactions'] as $sa) { + $actions[] = $this->actionRender->renderString($sa, []); + } + + return ['Filtered activity by linked socialaction: only %actions%', [ + '%actions%' => implode(', ou ', $actions), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked socialaction'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php new file mode 100644 index 000000000..a1b5ad1ba --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -0,0 +1,92 @@ +issueRender = $issueRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + if (!in_array('socialissue', $qb->getAllAliases(), true)) { + $qb->join('activity.socialIssues', 'socialissue'); + } + + $clause = $qb->expr()->in('socialissue.id', ':socialissues'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('socialissues', $data['accepted_socialissues']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_socialissues', EntityType::class, [ + 'class' => SocialIssue::class, + 'choice_label' => function (SocialIssue $si) { + return $this->issueRender->renderString($si, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $issues = []; + + foreach ($data['accepted_socialissues'] as $si) { + $issues[] = $this->issueRender->renderString($si, []); + } + + return ['Filtered activity by linked socialissue: only %issues%', [ + '%issues%' => implode(', ou ', $issues), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked socialissue'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php new file mode 100644 index 000000000..75e9dfa16 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php @@ -0,0 +1,92 @@ +userRender = $userRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + if (!in_array('user', $qb->getAllAliases(), true)) { + $qb->join('activity.users', 'user'); + } + + $clause = $qb->expr()->in('user.id', ':users'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('users', $data['accepted_users']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_users', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_users'] as $u) { + $users[] = $this->userRender->renderString($u, []); + } + + return ['Filtered activity by linked users: only %users%', [ + '%users%' => implode(', ou ', $users), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by linked users'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php new file mode 100644 index 000000000..63650b452 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php @@ -0,0 +1,92 @@ + true, + 'activity is not emergency' => false, + ]; + + private const DEFAULT_CHOICE = false; + + private TranslatorInterface $translator; + + public function __construct(TranslatorInterface $translator) + { + $this->translator = $translator; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + $clause = $qb->expr()->eq('activity.emergency', ':emergency'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('emergency', $data['accepted_emergency']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_emergency', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + foreach (self::CHOICES as $k => $v) { + if ($v === $data['accepted_emergency']) { + $choice = $k; + } + } + + return ['Filtered activity by emergency: only %emergency%', [ + '%emergency%' => $this->translator->trans($choice), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by emergency'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php new file mode 100644 index 000000000..def2ac84d --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php @@ -0,0 +1,93 @@ +translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('location', $qb->getAllAliases(), true)) { + $qb->join('activity.location', 'location'); + } + + $where = $qb->getDQLPart('where'); + $clause = $qb->expr()->in('location.locationType', ':locationtype'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('locationtype', $data['accepted_locationtype']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_locationtype', EntityType::class, [ + 'class' => LocationType::class, + 'choice_label' => function (LocationType $type) { + return $this->translatableStringHelper->localize($type->getTitle()); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $types = []; + + foreach ($data['accepted_locationtype'] as $type) { + $types[] = $this->translatableStringHelper->localize( + $type->getTitle() + ); + } + + return ['Filtered activity by locationtype: only %types%', [ + '%types%' => implode(', ou ', $types), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by locationtype'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php new file mode 100644 index 000000000..98cb50e89 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php @@ -0,0 +1,89 @@ + Activity::SENTRECEIVED_SENT, + 'is received' => Activity::SENTRECEIVED_RECEIVED, + ]; + + private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT; + + private TranslatorInterface $translator; + + public function __construct(TranslatorInterface $translator) + { + $this->translator = $translator; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + $clause = $qb->expr()->eq('activity.sentReceived', ':sentreceived'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('sentreceived', $data['accepted_sentreceived']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_sentreceived', ChoiceType::class, [ + 'choices' => self::CHOICES, + 'multiple' => false, + 'expanded' => true, + 'empty_data' => self::DEFAULT_CHOICE, + 'data' => self::DEFAULT_CHOICE, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $sentreceived = array_flip(self::CHOICES)[$data['accepted_sentreceived']]; + + return ['Filtered activity by sentreceived: only %sentreceived%', [ + '%sentreceived%' => $this->translator->trans($sentreceived), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by sentreceived'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php new file mode 100644 index 000000000..b8d6d1a59 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php @@ -0,0 +1,88 @@ +userRender = $userRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + + $clause = $qb->expr()->in('activity.user', ':users'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('users', $data['accepted_users']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_users', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + 'label' => 'Creators', + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_users'] as $u) { + $users[] = $this->userRender->renderString($u, []); + } + + return ['Filtered activity by user: only %users%', [ + '%users%' => implode(', ou ', $users), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by user'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php new file mode 100644 index 000000000..ba0f8cb75 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php @@ -0,0 +1,96 @@ +translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + if (!in_array('user', $qb->getAllAliases(), true)) { + $qb->join('activity.user', 'user'); + } + + $where = $qb->getDQLPart('where'); + + $clause = $qb->expr()->in('user.mainScope', ':userscope'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('userscope', $data['accepted_userscope']); + } + + public function applyOn(): string + { + return Declarations::ACTIVITY_ACP; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_userscope', EntityType::class, [ + 'class' => Scope::class, + 'choice_label' => function (Scope $s) { + return $this->translatableStringHelper->localize( + $s->getName() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $scopes = []; + + foreach ($data['accepted_userscope'] as $s) { + $scopes[] = $this->translatableStringHelper->localize( + $s->getName() + ); + } + + return ['Filtered activity by userscope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes), + ]]; + } + + public function getTitle(): string + { + return 'Filter activity by userscope'; + } +} diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index 6048a1cc0..864562cbf 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -11,12 +11,13 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; +use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Export\FilterInterface; +use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\Export\FilterType; use DateTime; use Doctrine\ORM\Query\Expr; use Doctrine\ORM\QueryBuilder; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; @@ -32,7 +33,7 @@ class ActivityDateFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } @@ -57,36 +58,22 @@ class ActivityDateFilter implements FilterInterface $qb->setParameter('date_to', $data['date_to']); } - public function applyOn() + public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function buildForm(FormBuilderInterface $builder) { - $builder->add( - 'date_from', - DateType::class, - [ + $builder + ->add('date_from', ChillDateType::class, [ 'label' => 'Activities after this date', 'data' => new DateTime(), - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', - ] - ); - - $builder->add( - 'date_to', - DateType::class, - [ + ]) + ->add('date_to', ChillDateType::class, [ 'label' => 'Activities before this date', 'data' => new DateTime(), - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', - ] - ); + ]); $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { /** @var \Symfony\Component\Form\FormInterface $filterForm */ diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php index d3f35a746..e6504ba26 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php @@ -12,8 +12,8 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Entity\ActivityType; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityTypeRepository; -use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\ExportElementValidatedInterface; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -22,7 +22,6 @@ use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Context\ExecutionContextInterface; use function count; @@ -41,15 +40,15 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter $this->activityTypeRepository = $activityTypeRepository; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) { $where = $qb->getDQLPart('where'); - $clause = $qb->expr()->in('activity.type', ':selected_activity_types'); + $clause = $qb->expr()->in('activity.activityType', ':selected_activity_types'); if ($where instanceof Expr\Andx) { $where->add($clause); @@ -61,39 +60,33 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter $qb->setParameter('selected_activity_types', $data['types']); } - public function applyOn() + public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY; } public function buildForm(FormBuilderInterface $builder) { - $builder->add( - 'types', - EntityType::class, - [ - 'class' => ActivityType::class, - 'choice_label' => fn (ActivityType $type) => $this->translatableStringHelper->localize($type->getName()), - 'multiple' => true, - 'expanded' => false, - ] - ); + $builder->add('types', EntityType::class, [ + 'class' => ActivityType::class, + 'choice_label' => fn (ActivityType $type) => $this->translatableStringHelper->localize($type->getName()), + 'group_by' => fn (ActivityType $type) => $this->translatableStringHelper->localize($type->getCategory()->getName()), + 'multiple' => true, + 'expanded' => false, + ]); } public function describeAction($data, $format = 'string') { // collect all the reasons'name used in this filter in one array $reasonsNames = array_map( - fn (ActivityType $t): string => '"' . $this->translatableStringHelper->localize($t->getName()) . '"', + fn (ActivityType $t): string => $this->translatableStringHelper->localize($t->getName()), $this->activityTypeRepository->findBy(['id' => $data['types']->toArray()]) ); - return [ - 'Filtered by activity type: only %list%', - [ - '%list%' => implode(', ', $reasonsNames), - ], - ]; + return ['Filtered by activity type: only %list%', [ + '%list%' => implode(', ou ', $reasonsNames), + ]]; } public function getTitle() diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php similarity index 93% rename from src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php rename to src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index 467471a8d..1ab5ffff4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -9,11 +9,11 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Filter; +namespace Chill\ActivityBundle\Export\Filter\PersonFilters; use Chill\ActivityBundle\Entity\ActivityReason; +use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityReasonRepository; -use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\ExportElementValidatedInterface; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -23,7 +23,6 @@ use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Context\ExecutionContextInterface; use function array_key_exists; @@ -43,9 +42,9 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt $this->activityReasonRepository = $activityReasonRepository; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) @@ -79,9 +78,9 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt $qb->setParameter('selected_activity_reasons', $data['reasons']); } - public function applyOn() + public function applyOn(): string { - return 'activity'; + return Declarations::ACTIVITY_PERSON; } public function buildForm(FormBuilderInterface $builder) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php similarity index 98% rename from src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php rename to src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php index 312486b49..8db312e35 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php @@ -9,7 +9,7 @@ declare(strict_types=1); -namespace Chill\ActivityBundle\Export\Filter; +namespace Chill\ActivityBundle\Export\Filter\PersonFilters; use Chill\ActivityBundle\Entity\ActivityReason; use Chill\ActivityBundle\Repository\ActivityReasonRepository; @@ -52,7 +52,7 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } @@ -102,7 +102,7 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt $qb->setParameter('person_having_activity_reasons', $data['reasons']); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_IMPLIED_IN; } diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 898f39e56..011243d46 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -14,17 +14,20 @@ namespace Chill\ActivityBundle\Form; use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Entity\ActivityPresence; use Chill\ActivityBundle\Entity\ActivityReason; +use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\DocStoreBundle\Form\StoredObjectType; +use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\ChillCollectionType; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\CommentType; +use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Form\Type\PrivateCommentType; use Chill\MainBundle\Form\Type\ScopePickerType; -use Chill\MainBundle\Form\Type\UserPickerType; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Templating\TranslatableStringHelper; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; @@ -50,6 +53,7 @@ use Symfony\Component\Form\FormEvents; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Role\Role; use function in_array; class ActivityType extends AbstractType @@ -109,19 +113,18 @@ class ActivityType extends AbstractType $activityType = $options['activityType']; // TODO revoir la gestion des center au niveau du form des activité. - if ($options['center']) { + if ($options['center'] instanceof Center && null !== $options['data']->getPerson()) { $builder->add('scope', ScopePickerType::class, [ 'center' => $options['center'], - 'role' => $options['role'], - // TODO make required again once scope and rights are fixed - 'required' => false, + 'role' => ActivityVoter::CREATE === (string) $options['role'] ? ActivityVoter::CREATE_PERSON : (string) $options['role'], + 'required' => true, ]); } /** @var ? \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod */ $accompanyingPeriod = null; - if ($options['accompanyingPeriod']) { + if ($options['accompanyingPeriod'] instanceof AccompanyingPeriod) { $accompanyingPeriod = $options['accompanyingPeriod']; } @@ -218,12 +221,10 @@ class ActivityType extends AbstractType ]); } - if ($activityType->isVisible('user') && $options['center']) { - $builder->add('user', UserPickerType::class, [ + if ($activityType->isVisible('user') && $options['center'] instanceof Center) { + $builder->add('user', PickUserDynamicType::class, [ 'label' => $activityType->getLabel('user'), 'required' => $activityType->isRequired('user'), - 'center' => $options['center'], - 'role' => $options['role'], ]); } @@ -442,8 +443,8 @@ class ActivityType extends AbstractType $resolver ->setRequired(['center', 'role', 'activityType', 'accompanyingPeriod']) - ->setAllowedTypes('center', ['null', 'Chill\MainBundle\Entity\Center']) - ->setAllowedTypes('role', 'Symfony\Component\Security\Core\Role\Role') + ->setAllowedTypes('center', ['null', Center::class]) + ->setAllowedTypes('role', [Role::class, 'string']) ->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class) ->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']); } diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig index 8d9ee878c..a000b0c7e 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig @@ -120,3 +120,11 @@ {{ form_end(edit_form) }} {# {{ form(delete_form) }} #} + +{% block js %} + {{ encore_entry_script_tags('mod_pickentity_type') }} +{% endblock %} + +{% block css %} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig index f55c68fcc..0514284a2 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig @@ -46,7 +46,7 @@ {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %} - {% if is_granted('CHILL_ACTIVITY_CREATE_PERSON', person) %} + {% if is_granted('CHILL_ACTIVITY_CREATE', person) %} {{ form_end(form) }} + +{% block js %} + {{ encore_entry_script_tags('mod_pickentity_type') }} +{% endblock %} + +{% block css %} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityVoter.php b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityVoter.php index 9911bf9fd..c95471771 100644 --- a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityVoter.php +++ b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityVoter.php @@ -133,7 +133,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn // change attribute CREATE if (self::CREATE === $attribute) { - $attribute = self::CREATE_PERSON; + return $this->voterHelper->voteOnAttribute(self::CREATE_PERSON, $subject->getPerson(), $token); } } elseif ($subject->getAccompanyingPeriod() instanceof AccompanyingPeriod) { if (!$this->security->isGranted(AccompanyingPeriodVoter::SEE, $subject->getAccompanyingPeriod())) { @@ -144,7 +144,8 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn if (AccompanyingPeriod::STEP_CLOSED === $subject->getAccompanyingPeriod()->getStep()) { return false; } - $attribute = self::CREATE_ACCOMPANYING_COURSE; + + return $this->voterHelper->voteOnAttribute(self::CREATE_ACCOMPANYING_COURSE, $subject->getAccompanyingPeriod(), $token); } } else { throw new RuntimeException('Could not determine context of activity.'); @@ -158,12 +159,12 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn // transform the attribute if (self::CREATE === $attribute) { - $attribute = self::CREATE_ACCOMPANYING_COURSE; + return $this->voterHelper->voteOnAttribute(self::CREATE_ACCOMPANYING_COURSE, $subject, $token); } } elseif ($subject instanceof Person) { // transform the attribute if (self::CREATE === $attribute) { - $attribute = self::CREATE_PERSON; + return $this->voterHelper->voteOnAttribute(self::CREATE_PERSON, $subject, $token); } } diff --git a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php index 55d64ef93..61bcaad3e 100644 --- a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php +++ b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php @@ -130,8 +130,10 @@ class ActivityContext implements return $this->personRender->renderString($p, []); }, 'multiple' => false, + 'required' => false, 'expanded' => true, 'label' => $options[$key . 'Label'], + 'placeholder' => $this->translator->trans('Any person selected'), ]); } } diff --git a/src/Bundle/ChillActivityBundle/config/services/export.yaml b/src/Bundle/ChillActivityBundle/config/services/export.yaml index d8aa13098..c88046c5f 100644 --- a/src/Bundle/ChillActivityBundle/config/services/export.yaml +++ b/src/Bundle/ChillActivityBundle/config/services/export.yaml @@ -3,26 +3,48 @@ services: autowire: true autoconfigure: true - chill.activity.export.count_activity: - class: Chill\ActivityBundle\Export\Export\CountActivity + ## Indicators + chill.activity.export.count_activity_linked_to_person: + class: Chill\ActivityBundle\Export\Export\LinkedToPerson\CountActivity tags: - - { name: chill.export, alias: 'count_activity' } + - { name: chill.export, alias: 'count_activity_linked_to_person' } - chill.activity.export.sum_activity_duration: - class: Chill\ActivityBundle\Export\Export\StatActivityDuration + chill.activity.export.sum_activity_duration_linked_to_person: + class: Chill\ActivityBundle\Export\Export\LinkedToPerson\StatActivityDuration tags: - - { name: chill.export, alias: 'sum_activity_duration' } + - { name: chill.export, alias: 'sum_activity_duration_linked_to_person' } - chill.activity.export.list_activity: - class: Chill\ActivityBundle\Export\Export\ListActivity + chill.activity.export.list_activity_linked_to_person: + class: Chill\ActivityBundle\Export\Export\LinkedToPerson\ListActivity tags: - - { name: chill.export, alias: 'list_activity' } + - { name: chill.export, alias: 'list_activity_linked_to_person' } - chill.activity.export.reason_filter: - class: Chill\ActivityBundle\Export\Filter\ActivityReasonFilter + chill.activity.export.count_activity_linked_to_acp: + class: Chill\ActivityBundle\Export\Export\LinkedToACP\CountActivity tags: - - { name: chill.export_filter, alias: 'activity_reason_filter' } + - { name: chill.export, alias: 'count_activity_linked_to_acp' } + chill.activity.export.sum_activity_duration_linked_to_acp: + class: Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityDuration + tags: + - { name: chill.export, alias: 'sum_activity_duration_linked_to_acp' } + + chill.activity.export.sum_activity_visit_duration_linked_to_acp: + class: Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityVisitDuration + tags: + - { name: chill.export, alias: 'sum_activity_visit_duration_linked_to_acp' } + + chill.activity.export.avg_activity_duration_linked_to_acp: + class: Chill\ActivityBundle\Export\Export\LinkedToACP\AvgActivityDuration + tags: + - { name: chill.export, alias: 'avg_activity_duration_linked_to_acp' } + + chill.activity.export.avg_activity_visit_duration_linked_to_acp: + class: Chill\ActivityBundle\Export\Export\LinkedToACP\AvgActivityVisitDuration + tags: + - { name: chill.export, alias: 'avg_activity_visit_duration_linked_to_acp' } + + ## Filters chill.activity.export.type_filter: class: Chill\ActivityBundle\Export\Filter\ActivityTypeFilter tags: @@ -33,15 +55,61 @@ services: tags: - { name: chill.export_filter, alias: 'activity_date_filter' } + chill.activity.export.reason_filter: + class: Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter + tags: + - { name: chill.export_filter, alias: 'activity_reason_filter' } + chill.activity.export.person_having_an_activity_between_date_filter: - class: Chill\ActivityBundle\Export\Filter\PersonHavingActivityBetweenDateFilter + class: Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter tags: - #0 register as a filter name: chill.export_filter alias: 'activity_person_having_ac_bw_date_filter' + chill.activity.export.locationtype_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\LocationTypeFilter + tags: + - { name: chill.export_filter, alias: 'activity_locationtype_filter' } + + chill.activity.export.byuser_filter: # TMS (M2M) + class: Chill\ActivityBundle\Export\Filter\ACPFilters\ByUserFilter + tags: + - { name: chill.export_filter, alias: 'activity_byuser_filter' } + + chill.activity.export.emergency_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\EmergencyFilter + tags: + - { name: chill.export_filter, alias: 'activity_emergency_filter' } + + chill.activity.export.sentreceived_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\SentReceivedFilter + tags: + - { name: chill.export_filter, alias: 'activity_sentreceived_filter' } + + chill.activity.export.bysocialaction_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter + tags: + - { name: chill.export_filter, alias: 'activity_bysocialaction_filter' } + + chill.activity.export.bysocialissue_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialIssueFilter + tags: + - { name: chill.export_filter, alias: 'activity_bysocialissue_filter' } + + chill.activity.export.user_filter: # Creator (M2O) + class: Chill\ActivityBundle\Export\Filter\ACPFilters\UserFilter + tags: + - { name: chill.export_filter, alias: 'activity_user_filter' } + + chill.activity.export.userscope_filter: + class: Chill\ActivityBundle\Export\Filter\ACPFilters\UserScopeFilter + tags: + - { name: chill.export_filter, alias: 'activity_userscope_filter' } + + ## Aggregators chill.activity.export.reason_aggregator: - class: Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator + class: Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator tags: - { name: chill.export_aggregator, alias: activity_reason_aggregator } @@ -54,3 +122,38 @@ services: class: Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator tags: - { name: chill.export_aggregator, alias: activity_user_aggregator } + + chill.activity.export.locationtype_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\LocationTypeAggregator + tags: + - { name: chill.export_aggregator, alias: activity_locationtype_aggregator } + + chill.activity.export.date_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\DateAggregator + tags: + - { name: chill.export_aggregator, alias: activity_date_aggregator } + + chill.activity.export.byuser_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByUserAggregator + tags: + - { name: chill.export_aggregator, alias: activity_byuser_aggregator } + + chill.activity.export.bythirdparty_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByThirdpartyAggregator + tags: + - { name: chill.export_aggregator, alias: activity_bythirdparty_aggregator } + + chill.activity.export.bysocialaction_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator + tags: + - { name: chill.export_aggregator, alias: activity_bysocialaction_aggregator } + + chill.activity.export.bysocialissue_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator + tags: + - { name: chill.export_aggregator, alias: activity_bysocialissue_aggregator } + + chill.activity.export.userscope_aggregator: + class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\UserScopeAggregator + tags: + - { name: chill.export_aggregator, alias: activity_userscope_aggregator } diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml index abfa0ea89..9f8ed3d7c 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml @@ -203,18 +203,39 @@ Are you sure you want to remove the activity about "%name%" ?: Êtes-vous sûr d The activity has been successfully removed.: L'activité a été supprimée. # exports -Count activities: Nombre d'activités -Count activities by various parameters.: Compte le nombre d'activités enregistrées en fonction de différents paramètres. -Sum activity duration: Total de la durée des activités -Sum activities duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. -List activities: Liste les activités -Number of activities: Nombre d'activités +Exports of activities linked to a person: Exports des activités liées à une personne +Number of activities linked to a person: Nombre d'activités liées à une personne +Count activities linked to a person: Nombre d'activités +Count activities linked to a person by various parameters.: Compte le nombre d'activités enregistrées et liées à une personne en fonction de différents paramètres. +Sum activity linked to a person duration: Durée des activités +Sum activities linked to a person duration: Durée des activités liés à un usager +Sum activities linked to a person duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. +List activity linked to a person: Liste les activités +List activities linked to a person: Liste des activités liés à un usager +List activities linked to a person description: Crée la liste des activités en fonction de différents paramètres. + +Exports of activities linked to an accompanying period: Exports des activités liées à un parcours +Number of activities linked to an accompanying period: Nombre d'activités liées à un parcours +Count activities linked to an accompanying period: Nombre d'activités +Count activities linked to an accompanying period by various parameters.: Compte le nombre d'activités enregistrées et liées à un parcours en fonction de différents paramètres. +Sum activity linked to an accompanying period duration: Somme de la durée des activités +Sum activities linked to an accompanying period duration: Somme de la durée des activités liées à un parcours +Sum activities linked to an accompanying period duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. +Sum activity linked to an accompanying period visit duration: Somme de la durée de déplacement des activités +Sum activities linked to an accompanying period visit duration: Somme de la durée de déplacement des activités liées à un parcours +Sum activities linked to an accompanying period visit duration by various parameters.: Additionne la durée de déplacement des activités en fonction de différents paramètres. +Average activity linked to an accompanying period duration: Moyenne de la durée des activités +Average activities linked to an accompanying period duration: Moyenne de la durée des activités liées à un parcours +Average activities linked to an accompanying period duration by various parameters.: Moyenne de la durée des activités en fonction de différents paramètres. +Average activity linked to an accompanying period visit duration: Moyenne de la durée de déplacement des activités +Average activities linked to an accompanying period visit duration: Moyenne de la durée de déplacement des activités liées à un parcours +Average activities linked to an accompanying period visit duration by various parameters.: Moyenne de la durée de déplacement des activités en fonction de différents paramètres. #filters -Filter by reason: Filtrer par sujet d'activité +Filter by reason: Filtrer les activités par sujet 'Filtered by reasons: only %list%': 'Filtré par sujet: seulement %list%' -'Filtered by activity type: only %list%': "Filtré par type d'activity: seulement %list%" -Filtered by date activity: Filtrer par date d'activité +'Filtered by activity type: only %list%': "Filtré par type d'activité: uniquement %list%" +Filtered by date activity: Filtrer les activités par date Activities after this date: Activités après cette date Activities before this date: Activités avant cette date "Filtered by date of activity: only between %date_from% and %date_to%": "Filtré par date de l'activité: uniquement entre %date_from% et %date_to%" @@ -226,18 +247,59 @@ Implied in an activity before this date: Impliqué dans une activité avant cett Filtered by person having an activity between %date_from% and %date_to% with reasons %reasons_name%: Filtré par personnes associées à une activité entre %date_from% et %date_to% avec les sujets %reasons_name% Activity reasons for those activities: Sujets de ces activités -Filter by activity type: Filtrer par type d'activité +Filter by activity type: Filtrer les activités par type + +Filter activity by locationtype: Filtrer les activités par type de localisation +'Filtered activity by locationtype: only %types%': "Filtré par type de localisation: uniquement %types%" +Accepted locationtype: Types de localisation +Filter activity by linked users: Filtrer les activités par TMS +'Filtered activity by linked users: only %users%': "Filtré par TMS: uniquement %users%" +Accepted users: TMS(s) +Filter activity by emergency: Filtrer les activités par urgence +'Filtered activity by emergency: only %emergency%': "Filtré par urgence: uniquement si %emergency%" +activity is emergency: l'activité est urgente +activity is not emergency: l'activité n'est pas urgente +Filter activity by sentreceived: Filtrer les activités par envoyé/reçu +'Filtered activity by sentreceived: only %sentreceived%': "Filtré par envoyé/reçu: uniquement %sentreceived%" +Accepted sentreceived: '' +is sent: envoyé +is received: reçu +Filter activity by linked socialaction: Filtrer les activités par action liée +'Filtered activity by linked socialaction: only %actions%': "Filtré par action liée: uniquement %actions%" +Filter activity by linked socialissue: Filtrer les activités par problématique liée +'Filtered activity by linked socialissue: only %issues%': "Filtré par problématique liée: uniquement %issues%" +Filter activity by user: Filtrer les activités par créateur +'Filtered activity by user: only %users%': "Filtré par créateur: uniquement %users%" +Creators: Créateurs +Filter activity by userscope: Filtrer les activités par service du créateur +'Filtered activity by userscope: only %scopes%': "Filtré par service du créateur: uniquement %scopes%" +Accepted userscope: Services #aggregators Activity type: Type d'activité -Activity user: Utilisateur lié à l'activity +Activity user: Utilisateur lié à l'activité By reason: Par sujet By category of reason: Par catégorie de sujet Reason's level: Niveau du sujet Group by reasons: Sujet d'activité -Aggregate by activity user: Aggréger par utilisateur lié à l'activité -Aggregate by activity type: Aggréger par type d'activité -Aggregate by activity reason: Aggréger par sujet de l'activité +Aggregate by activity user: Grouper les activités par utilisateur +Aggregate by activity type: Grouper les activités par type +Aggregate by activity reason: Grouper les activités par sujet + +Group activity by locationtype: Grouper les activités par type de localisation +Group activity by date: Grouper les activités par date +Frequency: Fréquence +by month: Par mois +by week: Par semaine +for week: Semaine +by year: Par année +in year: En +Group activity by linked users: Grouper les activités par TMS impliqué +Group activity by linked thirdparties: Grouper les activités par tiers impliqué +Accepted thirdparty: Tiers impliqué +Group activity by linked socialaction: Grouper les activités par action liée +Group activity by linked socialissue: Grouper les activités par problématique liée +Group activity by userscope: Grouper les activités par service du créateur Last activities: Les dernières activités diff --git a/src/Bundle/ChillActivityBundle/translations/messages.nl.yaml b/src/Bundle/ChillActivityBundle/translations/messages.nl.yaml index 8d7cc293a..0403e55ee 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.nl.yaml +++ b/src/Bundle/ChillActivityBundle/translations/messages.nl.yaml @@ -195,7 +195,7 @@ Number of activities: Nombre d'activités #filters Filter by reason: Filtrer par sujet d'activité 'Filtered by reasons: only %list%': 'Filtré par sujet: seulement %list%' -'Filtered by activity type: only %list%': "Filtré par type d'activity: seulement %list%" +'Filtered by activity type: only %list%': "Filtré par type d'activity: uniquement %list%" Filtered by date activity: Filtrer par date d'activité Activities after this date: Activités après cette date Activities before this date: Activités avant cette date @@ -217,9 +217,9 @@ By reason: Par sujet By category of reason: Par catégorie de sujet Reason's level: Niveau du sujet Group by reasons: Sujet d'activité -Aggregate by activity user: Aggréger par utilisateur lié à l'activité -Aggregate by activity type: Aggréger par type d'activité -Aggregate by activity reason: Aggréger par sujet de l'activité +Aggregate by activity user: Grouper par utilisateur lié à l'activité +Aggregate by activity type: Grouper par type d'activité +Aggregate by activity reason: Grouper par sujet de l'activité Last activities: Les dernières activités diff --git a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php index 9d556e6d8..0463dd643 100644 --- a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php +++ b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php @@ -32,6 +32,7 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); $loader->load('services.yml'); + $loader->load('services/exports.yaml'); $loader->load('services/controller.yml'); $loader->load('services/fixtures.yml'); $loader->load('services/form.yml'); diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php new file mode 100644 index 000000000..e0a024f45 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -0,0 +1,88 @@ +userRepository = $userRepository; + $this->userRender = $userRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.user', 'u'); + + $qb->addSelect('u.id AS agent_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('agent_aggregator'); + } else { + $qb->groupBy('agent_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Agent'; + } + + $r = $this->userRepository->find($value); + + return $this->userRender->renderString($r, []); + }; + } + + public function getQueryKeys($data): array + { + return ['agent_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by agent'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php new file mode 100644 index 000000000..76b2cb133 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -0,0 +1,91 @@ +cancelReasonRepository = $cancelReasonRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + // TODO: still needs to take into account appointments without a cancel reason somehow + $qb->join('cal.cancelReason', 'cr'); + + $qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('cancel_reason_aggregator'); + } else { + $qb->groupBy('cancel_reason_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Cancel reason'; + } + + $j = $this->cancelReasonRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['cancel_reason_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by cancel reason'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php new file mode 100644 index 000000000..0e9352198 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -0,0 +1,90 @@ +jobRepository = $jobRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.user', 'u'); + + $qb->addSelect('IDENTITY(u.userJob) as job_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('job_aggregator'); + } else { + $qb->groupBy('job_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Job'; + } + + $j = $this->jobRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['job_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by agent job'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php new file mode 100644 index 000000000..cd7e88a1e --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -0,0 +1,83 @@ +locationRepository = $locationRepository; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.location', 'l'); + $qb->addSelect('IDENTITY(cal.location) as location_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('location_aggregator'); + } else { + $qb->groupBy('location_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Location'; + } + + $l = $this->locationRepository->find($value); + + return $l->getName(); + }; + } + + public function getQueryKeys($data): array + { + return ['location_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by location'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php new file mode 100644 index 000000000..dea8eecb4 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -0,0 +1,90 @@ +locationTypeRepository = $locationTypeRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.location', 'l'); + + $qb->addSelect('IDENTITY(l.locationType) as location_type_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('location_type_aggregator'); + } else { + $qb->groupBy('location_type_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Location type'; + } + + $j = $this->locationTypeRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getTitle() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['location_type_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by location type'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php new file mode 100644 index 000000000..26329ad13 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -0,0 +1,74 @@ +addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator"); + // $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator"); + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('month_year_aggregator'); + } else { + $qb->groupBy('month_year_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // No form needed + } + + public function getLabels($key, array $values, $data): Closure + { + return static function ($value): string { + if ('_header' === $value) { + return 'by month and year'; + } + + $month = substr($value, 0, 2); + $year = substr($value, 3, 4); + + return strftime('%B %G', mktime(0, 0, 0, $month, '1', $year)); + }; + } + + public function getQueryKeys($data): array + { + return ['month_year_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by month and year'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php new file mode 100644 index 000000000..4ae3fb99c --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -0,0 +1,90 @@ +scopeRepository = $scopeRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.user', 'u'); + + $qb->addSelect('IDENTITY(u.mainScope) as scope_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('scope_aggregator'); + } else { + $qb->groupBy('scope_aggregator'); + } + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data): Closure + { + return function ($value): string { + if ('_header' === $value) { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + public function getQueryKeys($data): array + { + return ['scope_aggregator']; + } + + public function getTitle(): string + { + return 'Group appointments by agent scope'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Declarations.php b/src/Bundle/ChillCalendarBundle/Export/Declarations.php new file mode 100644 index 000000000..616d70a1a --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Declarations.php @@ -0,0 +1,20 @@ +calendarRepository = $calendarRepository; + } + + public function buildForm(FormBuilderInterface $builder) + { + // No form necessary + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Count appointments by various parameters.'; + } + + public function getGroup(): string + { + return 'Exports of calendar'; + } + + public function getLabels($key, array $values, $data): Closure + { + if ('export_result' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + $labels = array_combine($values, $values); + $labels['_header'] = $this->getTitle(); + + return static function ($value) use ($labels) { + return $labels[$value]; + }; + } + + public function getQueryKeys($data): array + { + return ['export_result']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Count appointments'; + } + + public function getType(): string + { + return Declarations::CALENDAR_TYPE; + } + + /** + * Initiate the query. + */ + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder + { + $centers = array_map(static function ($el) { + return $el['center']; + }, $acl); + + $qb = $this->calendarRepository->createQueryBuilder('cal'); + + $qb->select('COUNT(cal.id) AS export_result'); + + return $qb; + } + + public function requiredRole(): string + { + // which role should we give here? + return PersonVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::CALENDAR_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php new file mode 100644 index 000000000..491cb38b9 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php @@ -0,0 +1,110 @@ +calendarRepository = $calendarRepository; + } + + public function buildForm(FormBuilderInterface $builder): void + { + // no form needed + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Get the average of appointment duration according to various filters'; + } + + public function getGroup(): string + { + return 'Exports of calendar'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_result' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + $labels = array_combine($values, $values); + $labels['_header'] = $this->getTitle(); + + return static function ($value) use ($labels) { + return $labels[$value]; + }; + } + + public function getQueryKeys($data): array + { + return ['export_result']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Average appointment duration'; + } + + public function getType(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder + { + $qb = $this->calendarRepository->createQueryBuilder('cal'); + + $qb + ->select('AVG(cal.endDate - cal.startDate) AS export_result'); + + return $qb; + } + + public function requiredRole(): string + { + return AccompanyingPeriodVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::CALENDAR_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php new file mode 100644 index 000000000..286c73be5 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php @@ -0,0 +1,110 @@ +calendarRepository = $calendarRepository; + } + + public function buildForm(FormBuilderInterface $builder): void + { + // no form needed + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'Get the sum of appointment durations according to various filters'; + } + + public function getGroup(): string + { + return 'Exports of calendar'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_result' !== $key) { + throw new LogicException("the key {$key} is not used by this export"); + } + + $labels = array_combine($values, $values); + $labels['_header'] = $this->getTitle(); + + return static function ($value) use ($labels) { + return $labels[$value]; + }; + } + + public function getQueryKeys($data): array + { + return ['export_result']; + } + + public function getResult($qb, $data) + { + return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'Sum of appointment durations'; + } + + public function getType(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder + { + $qb = $this->calendarRepository->createQueryBuilder('cal'); + + $qb + ->select('SUM(cal.endDate - cal.startDate) AS export_result'); + + return $qb; + } + + public function requiredRole(): string + { + return AccompanyingPeriodVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::CALENDAR_TYPE, + ]; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php new file mode 100644 index 000000000..263b1e160 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -0,0 +1,87 @@ +userRender = $userRender; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $where = $qb->getDQLPart('where'); + $clause = $qb->expr()->in('cal.user', ':agents'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('agents', $data['accepted_agents']); + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_agents', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_agents'] as $r) { + $users[] = $r; + } + + return [ + 'Filtered by agent: only %agents%', [ + '%agents' => implode(', ou ', $users), + ], ]; + } + + public function getTitle(): string + { + return 'Filter appointments by agent'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php new file mode 100644 index 000000000..c3aafc192 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -0,0 +1,79 @@ +getDQLPart('where'); + + $clause = $qb->expr()->andX( + $qb->expr()->gte('cal.startDate', ':dateFrom'), + $qb->expr()->lte('cal.endDate', ':dateTo') + ); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('dateFrom', $data['date_from'], Types::DATE_MUTABLE); + // modify dateTo so that entire day is also taken into account up until the beginning of the next day. + $qb->setParameter('dateTo', $data['date_to']->modify('+1 day'), Types::DATE_MUTABLE); + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('date_from', ChillDateType::class, [ + 'data' => new DateTime(), + ]) + ->add('date_to', ChillDateType::class, [ + 'data' => new DateTime(), + ]); + } + + public function describeAction($data, $format = 'string'): array + { + return ['Filtered by appointments between %dateFrom% and %dateTo%', [ + '%dateFrom%' => $data['date_from']->format('d-m-Y'), + '%dateTo%' => $data['date_to']->format('d-m-Y'), + ]]; + } + + public function getTitle(): string + { + return 'Filter appointments between certain dates'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php new file mode 100644 index 000000000..cb3b8b2cd --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -0,0 +1,98 @@ +translator = $translator; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.user', 'u'); + + $where = $qb->getDQLPart('where'); + $clause = $qb->expr()->in('u.userJob', ':job'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('job', $data['job']); + } + + public function applyOn(): string + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('job', EntityType::class, [ + 'class' => UserJob::class, + 'choice_label' => function (UserJob $j) { + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string'): array + { + $userJobs = []; + + foreach ($data['job'] as $j) { + $userJobs[] = $this->translatableStringHelper->localize( + $j->getLabel() + ); + } + + return ['Filtered by agent job: only %jobs%', [ + '%jobs%' => implode(', ou ', $userJobs), + ]]; + } + + public function getTitle(): string + { + return 'Filter appointments by agent job'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php new file mode 100644 index 000000000..55699d79a --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -0,0 +1,98 @@ +translator = $translator; + $this->translatableStringHelper = $translatableStringHelper; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('cal.user', 'u'); + + $where = $qb->getDQLPart('where'); + $clause = $qb->expr()->in('u.mainScope', ':scope'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('scope', $data['scope']); + } + + public function applyOn() + { + return Declarations::CALENDAR_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('scope', EntityType::class, [ + 'class' => Scope::class, + 'choice_label' => function (Scope $s) { + return $this->translatableStringHelper->localize( + $s->getName() + ); + }, + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function describeAction($data, $format = 'string') + { + $scopes = []; + + foreach ($data['scope'] as $s) { + $scopes[] = $this->translatableStringHelper->localize( + $s->getName() + ); + } + + return ['Filtered by agent scope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes), + ]]; + } + + public function getTitle() + { + return 'Filter appointments by agent scope'; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Resources/config/services/exports.yaml b/src/Bundle/ChillCalendarBundle/Resources/config/services/exports.yaml new file mode 100644 index 000000000..56580dba1 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Resources/config/services/exports.yaml @@ -0,0 +1,104 @@ +services: + + ## Indicators + chill.calendar.export.count_appointments: + class: Chill\CalendarBundle\Export\Export\CountAppointments + autowire: true + autoconfigure: true + tags: + - { name: chill.export, alias: count_appointments } + + chill.calendar.export.average_duration_appointments: + class: Chill\CalendarBundle\Export\Export\StatAppointmentAvgDuration + autowire: true + autoconfigure: true + tags: + - { name: chill.export, alias: average_duration_appointments } + + chill.calendar.export.sum_duration_appointments: + class: Chill\CalendarBundle\Export\Export\StatAppointmentSumDuration + autowire: true + autoconfigure: true + tags: + - { name: chill.export, alias: sum_duration_appointments } + + ## Filters + + chill.calendar.export.agent_filter: + class: Chill\CalendarBundle\Export\Filter\AgentFilter + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: agent_filter } + + chill.calendar.export.job_filter: + class: Chill\CalendarBundle\Export\Filter\JobFilter + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: job_filter } + + chill.calendar.export.scope_filter: + class: Chill\CalendarBundle\Export\Filter\ScopeFilter + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: scope_filter } + + chill.calendar.export.between_dates_filter: + class: Chill\CalendarBundle\Export\Filter\BetweenDatesFilter + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: between_dates_filter } + + ## Aggregator + + chill.calendar.export.agent_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\AgentAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: agent_aggregator } + + chill.calendar.export.job_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\JobAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: job_aggregator } + + chill.calendar.export.scope_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\ScopeAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: scope_aggregator } + + chill.calendar.export.location_type_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: location_type_aggregator } + + chill.calendar.export.location_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\LocationAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: location_aggregator } + + chill.calendar.export.cancel_reason_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: cancel_reason_aggregator } + + chill.calendar.export.month_aggregator: + class: Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: month_aggregator } \ No newline at end of file diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml index 9efe99b79..b8b1e2e56 100644 --- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml @@ -69,3 +69,36 @@ invite: declined: Refusé pending: En attente tentative: Accepté provisoirement + +# exports +Exports of calendar: Exports des rendez-vous +Count appointments: Nombre de rendez-vous +Count appointments by various parameters.: Compte le nombre de rendez-vous en fonction de différents paramètres. + +Average appointment duration: Moyenne de la durée des rendez-vous +Get the average of appointment duration according to various filters: Calcule la moyenne des durées des rendez-vous en fonction de différents paramètres. + +Sum of appointment durations: Somme de la durée des rendez-vous +Get the sum of appointment durations according to various filters: Calcule la somme des durées des rendez-vous en fonction de différents paramètres. + +'Filtered by agent: only %agents%': "Filtré par agents: uniquement %agents%" +Filter appointments by agent: Filtrer les rendez-vous par agents +Filter appointments by agent job: Filtrer les rendez-vous par métiers des agents +'Filtered by agent job: only %jobs%': 'Filtré par métiers des agents: uniquement les %jobs%' +Filter appointments by agent scope: Filtrer les rendez-vous par services des agents +'Filtered by agent scope: only %scopes%': 'Filtré par services des agents: uniquement les services %scopes%' +Filter appointments between certain dates: Filtrer les rendez-vous par date du rendez-vous +'Filtered by appointments between %dateFrom% and %dateTo%': 'Filtré par rendez-vous entre %dateFrom% et %dateTo%' + +Group appointments by agent: Grouper les rendez-vous par agent +Group appointments by agent job: Grouper les rendez-vous par métier de l'agent +Group appointments by agent scope: Grouper les rendez-vous par service de l'agent +Group appointments by location type: Grouper les rendez-vous par type de localisation +Group appointments by location: Grouper les rendez-vous par lieu de rendez-vous +Group appointments by cancel reason: Grouper les rendez-vous par motif d'annulation +Group appointments by month and year: Grouper les rendez-vous par mois et année +Scope: Service +Job: Métier +Location type: Type de localisation +Location: Lieu de rendez-vous +by month and year: Par mois et année diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php index b57fdf4db..2982b1c83 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php @@ -188,7 +188,7 @@ class CustomFieldChoice extends AbstractCustomField $choices = []; foreach ($cf->getOptions()[self::CHOICES] as $choice) { - if (false === $choices['active']) { + if (false === $choice['active']) { continue; } $choices[$choice['slug']] = $this->translatableStringHelper diff --git a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php index b013f1a44..4f90b06fc 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\DocStoreBundle\Entity; +use Chill\MainBundle\Entity\HasScopesInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Doctrine\ORM\Mapping as ORM; @@ -18,7 +19,7 @@ use Doctrine\ORM\Mapping as ORM; * @ORM\Entity * @ORM\Table("chill_doc.accompanyingcourse_document") */ -class AccompanyingCourseDocument extends Document +class AccompanyingCourseDocument extends Document implements HasScopesInterface { /** * @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class) @@ -31,6 +32,15 @@ class AccompanyingCourseDocument extends Document return $this->course; } + public function getScopes(): iterable + { + if (null !== $this->course) { + return []; + } + + return $this->course->getScopes(); + } + public function setCourse(?AccompanyingPeriod $course): self { $this->course = $course; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index e26469573..0fd329ff8 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -16,8 +16,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; use Chill\MainBundle\Doctrine\Model\TrackCreationTrait; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait; -use Chill\MainBundle\Entity\HasScopeInterface; -use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User; use DateTimeInterface; use Doctrine\ORM\Mapping as ORM; @@ -26,7 +24,7 @@ use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\MappedSuperclass */ -class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdateInterface +class Document implements TrackCreationInterface, TrackUpdateInterface { use TrackCreationTrait; @@ -70,13 +68,6 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate */ private $object; - /** - * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") - * - * @var \Chill\MainBundle\Entity\Scope The document's center - */ - private $scope; - /** * @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate") */ @@ -122,16 +113,6 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate return $this->object; } - /** - * Get scope. - * - * @return \Chill\MainBundle\Entity\Scope - */ - public function getScope(): ?Scope - { - return $this->scope; - } - public function getTemplate(): ?DocGeneratorTemplate { return $this->template; @@ -175,13 +156,6 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate return $this; } - public function setScope($scope): self - { - $this->scope = $scope; - - return $this; - } - public function setTemplate(?DocGeneratorTemplate $template): self { $this->template = $template; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index fe888f587..b6cf5376f 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -13,6 +13,7 @@ namespace Chill\DocStoreBundle\Entity; use Chill\MainBundle\Entity\HasCenterInterface; use Chill\MainBundle\Entity\HasScopeInterface; +use Chill\MainBundle\Entity\Scope; use Chill\PersonBundle\Entity\Person; use Doctrine\ORM\Mapping as ORM; @@ -27,6 +28,13 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt */ private Person $person; + /** + * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") + * + * @var \Chill\MainBundle\Entity\Scope The document's center + */ + private $scope; + public function getCenter() { return $this->getPerson()->getCenter(); @@ -37,10 +45,22 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt return $this->person; } + public function getScope(): ?Scope + { + return $this->scope; + } + public function setPerson($person): self { $this->person = $person; return $this; } + + public function setScope($scope): self + { + $this->scope = $scope; + + return $this; + } } diff --git a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php index 64a81e9c7..c9f9365a4 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php @@ -88,10 +88,5 @@ class AccompanyingCourseDocumentType extends AbstractType $resolver->setDefaults([ 'data_class' => Document::class, ]); - - // $resolver->setRequired(['role', 'center']) - // ->setAllowedTypes('role', [ \Symfony\Component\Security\Core\Role\Role::class ]) - // ->setAllowedTypes('center', [ \Chill\MainBundle\Entity\Center::class ]) - // ; } } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php index 540390aef..2fee85a8f 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php @@ -65,7 +65,7 @@ class PersonDocumentACLAwareRepository implements PersonDocumentACLAwareReposito $this->addACL($qb, $person); foreach ($orderBy as $field => $order) { - $qb->addOrderBy($field, $order); + $qb->addOrderBy('d.' . $field, $order); } $qb->setFirstResult($offset)->setMaxResults($limit); diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/AccompanyingCourseDocumentVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/AccompanyingCourseDocumentVoter.php index 35fde9b28..e37a8deab 100644 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/AccompanyingCourseDocumentVoter.php +++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/AccompanyingCourseDocumentVoter.php @@ -106,6 +106,10 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov ) { return false; } + + if (self::CREATE === $attribute && null !== $subject->getCourse()) { + return $this->voterHelper->voteOnAttribute($attribute, $subject->getCourse(), $token); + } } return $this->voterHelper->voteOnAttribute($attribute, $subject, $token); diff --git a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php index cede2a5b8..63307a99d 100644 --- a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php @@ -35,10 +35,10 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface $menu->addChild('Events', [ 'route' => 'chill_event_admin_index', - ]) + ]) ->setAttribute('class', 'list-group-item-header') ->setExtras([ - 'order' => 6500 + 'order' => 6500, ]); $menu->addChild('Event type', [ diff --git a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php index 241003abf..e879f1d29 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php @@ -126,7 +126,7 @@ class Version20160318111334 extends AbstractMigration $this->addSql('ALTER TABLE chill_event_participation ' . 'ADD CONSTRAINT FK_4E7768AC217BBB47 ' . 'FOREIGN KEY (person_id) ' - . 'REFERENCES Person (id) ' + . 'REFERENCES chill_person_person(id) ' . 'NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_event_participation ' . 'ADD CONSTRAINT FK_4E7768ACD60322AC ' diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index 5dcd158f6..1893a64b3 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -86,6 +86,9 @@ class ExportController extends AbstractController { /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ $exportManager = $this->exportManager; + + $export = $exportManager->getExport($alias); + $key = $request->query->get('key', null); [$dataCenters, $dataExport, $dataFormatter] = $this->rebuildData($key); @@ -100,7 +103,8 @@ class ExportController extends AbstractController $viewVariables = [ 'alias' => $alias, - 'export' => $exportManager->getExport($alias), + 'export' => $export, + 'export_group' => $this->getExportGroup($export), ]; if ($formater instanceof \Chill\MainBundle\Export\Formatter\CSVListFormatter) { @@ -316,6 +320,7 @@ class ExportController extends AbstractController 'form' => $form->createView(), 'export_alias' => $alias, 'export' => $export, + 'export_group' => $this->getExportGroup($export), ]); } @@ -371,6 +376,7 @@ class ExportController extends AbstractController [ 'form' => $form->createView(), 'export' => $export, + 'export_group' => $this->getExportGroup($export), ] ); } @@ -514,10 +520,26 @@ class ExportController extends AbstractController [ 'form' => $form->createView(), 'export' => $export, + 'export_group' => $this->getExportGroup($export), ] ); } + private function getExportGroup($target): string + { + $exportManager = $this->exportManager; + + $groups = $exportManager->getExportsGrouped(true); + + foreach ($groups as $group => $array) { + foreach ($array as $alias => $export) { + if ($export === $target) { + return $group; + } + } + } + } + /** * get the next step. If $reverse === true, the previous step is returned. * diff --git a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php index fa1a29296..ffad0caeb 100644 --- a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php @@ -92,5 +92,8 @@ final class PostalCodeAPIController extends ApiController $qb->where('e.country = :country') ->setParameter('country', $request->query->get('country')); } + + $qb->andWhere('e.origin = :zero') + ->setParameter('zero', 0); } } diff --git a/src/Bundle/ChillMainBundle/Controller/UserApiController.php b/src/Bundle/ChillMainBundle/Controller/UserApiController.php index d1fd4d5bb..6acd0c4dd 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserApiController.php @@ -12,7 +12,9 @@ declare(strict_types=1); namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; +use Doctrine\ORM\QueryBuilder; use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; class UserApiController extends ApiController @@ -58,4 +60,14 @@ class UserApiController extends ApiController ['groups' => ['read']] ); } + + /** + * @param QueryBuilder $query + */ + protected function customizeQuery(string $action, Request $request, $query): void + { + if ('_index' === $action) { + $query->andWhere($query->expr()->eq('e.enabled', "'TRUE'")); + } + } } diff --git a/src/Bundle/ChillMainBundle/Controller/UserJobApiController.php b/src/Bundle/ChillMainBundle/Controller/UserJobApiController.php new file mode 100644 index 000000000..50b97809a --- /dev/null +++ b/src/Bundle/ChillMainBundle/Controller/UserJobApiController.php @@ -0,0 +1,25 @@ +andWhere($query->expr()->eq('e.active', "'TRUE'")); + } + } +} diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 7348d7648..804bde159 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -19,8 +19,10 @@ use Chill\MainBundle\Controller\LanguageController; use Chill\MainBundle\Controller\LocationController; use Chill\MainBundle\Controller\LocationTypeController; use Chill\MainBundle\Controller\UserController; +use Chill\MainBundle\Controller\UserJobApiController; use Chill\MainBundle\Controller\UserJobController; use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface; +use Chill\MainBundle\Doctrine\DQL\Extract; use Chill\MainBundle\Doctrine\DQL\GetJsonFieldByKey; use Chill\MainBundle\Doctrine\DQL\JsonAggregate; use Chill\MainBundle\Doctrine\DQL\JsonbArrayLength; @@ -30,6 +32,7 @@ use Chill\MainBundle\Doctrine\DQL\Replace; use Chill\MainBundle\Doctrine\DQL\Similarity; use Chill\MainBundle\Doctrine\DQL\STContains; use Chill\MainBundle\Doctrine\DQL\StrictWordSimilarityOPS; +use Chill\MainBundle\Doctrine\DQL\ToChar; use Chill\MainBundle\Doctrine\DQL\Unaccent; use Chill\MainBundle\Doctrine\ORM\Hydration\FlatHierarchyEntityHydrator; use Chill\MainBundle\Doctrine\Type\NativeDateIntervalType; @@ -240,6 +243,10 @@ class ChillMainExtension extends Extension implements 'ST_CONTAINS' => STContains::class, 'JSONB_ARRAY_LENGTH' => JsonbArrayLength::class, ], + 'datetime_functions' => [ + 'EXTRACT' => Extract::class, + 'TO_CHAR' => ToChar::class, + ], ], 'hydrators' => [ 'chill_flat_hierarchy_list' => FlatHierarchyEntityHydrator::class, @@ -504,6 +511,7 @@ class ChillMainExtension extends Extension implements 'name' => 'user_job', 'base_path' => '/api/1.0/main/user-job', 'base_role' => 'ROLE_USER', + 'controller' => UserJobApiController::class, 'actions' => [ '_index' => [ 'methods' => [ diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php new file mode 100644 index 000000000..7d8809582 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php @@ -0,0 +1,61 @@ + EXTRACT(field FROM interval) + */ +class Extract extends FunctionNode +{ + private string $field; + + private $value; + //private PathExpression $value; + //private FunctionNode $value; + //private DateDiffFunction $value; + + public function getSql(SqlWalker $sqlWalker) + { + return sprintf( + 'EXTRACT(%s FROM %s)', + $this->field, + $this->value->dispatch($sqlWalker) + ); + } + + public function parse(Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $parser->match(Lexer::T_IDENTIFIER); + $this->field = $parser->getLexer()->token['value']; + + $parser->match(Lexer::T_FROM); + + //$this->value = $parser->ScalarExpression(); + $this->value = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php new file mode 100644 index 000000000..51ff5a9dd --- /dev/null +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php @@ -0,0 +1,46 @@ +walkArithmeticPrimary($this->datetime), + $sqlWalker->walkArithmeticPrimary($this->fmt) + ); + } + + public function parse(Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + $this->datetime = $parser->ArithmeticExpression(); + $parser->match(Lexer::T_COMMA); + $this->fmt = $parser->StringExpression(); + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/src/Bundle/ChillMainBundle/Entity/GeographicalUnit.php b/src/Bundle/ChillMainBundle/Entity/GeographicalUnit.php new file mode 100644 index 000000000..9e119e30d --- /dev/null +++ b/src/Bundle/ChillMainBundle/Entity/GeographicalUnit.php @@ -0,0 +1,72 @@ +id; + } + + public function getLayerName(): ?string + { + return $this->layerName; + } + + public function getUnitName(): ?string + { + return $this->unitName; + } + + public function setLayerName(?string $layerName): self + { + $this->layerName = $layerName; + + return $this; + } + + public function setUnitName(?string $unitName): self + { + $this->unitName = $unitName; + + return $this; + } +} diff --git a/src/Bundle/ChillMainBundle/Export/ExportInterface.php b/src/Bundle/ChillMainBundle/Export/ExportInterface.php index 419d9b250..6319fbac9 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportInterface.php @@ -139,10 +139,8 @@ interface ExportInterface extends ExportElementInterface /** * Return the required Role to execute the Export. - * - * @return \Symfony\Component\Security\Core\Role\Role */ - public function requiredRole(); + public function requiredRole(): string; /** * Inform which ModifiersInterface (i.e. AggregatorInterface, FilterInterface) diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index f9964ea3b..9ba9bc1a8 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -550,7 +550,7 @@ class ExportManager if (null === $centers) { $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $role->getRole(), + $role ); } @@ -568,6 +568,10 @@ class ExportManager 'role' => $role->getRole(), ]); + ///// Bypasse les autorisations qui empêche d'afficher les nouveaux exports + return true; + ///// TODO supprimer le return true + return false; } } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php index a2bce1201..86c304508 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php @@ -449,7 +449,9 @@ class SpreadSheetFormatter implements FormatterInterface protected function getTitle() { - return $this->translator->trans($this->export->getTitle()); + $title = $this->translator->trans($this->export->getTitle()); + + return substr($title, 0, 30) . '…'; } protected function initializeCache($key) diff --git a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php index 1265f52c4..ac8e3e692 100644 --- a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php @@ -26,9 +26,9 @@ interface ModifierInterface extends ExportElementInterface * If null, will used the ExportInterface::requiredRole role from * the current executing export. * - * @return \Symfony\Component\Security\Core\Role\Role|null A role required to execute this ModifiersInterface + * @return string|null A role required to execute this ModifiersInterface */ - public function addRole(); + public function addRole(): ?string; /** * Alter the query initiated by the export, to add the required statements diff --git a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php index 3adca5eca..fb64ed3b1 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php @@ -59,7 +59,7 @@ class CommentType extends AbstractType $view->vars = array_replace( $view->vars, [ - 'hideLabel' => true, + 'fullWidth' => true, ] ); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 9c36d452f..c73402dd3 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -75,8 +75,6 @@ class PickCenterType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { - - $export = $this->exportManager->getExport($options['export_alias']); $centers = $this->authorizationHelper->getReachableCenters( $this->user, diff --git a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php index d4c0d1611..a96c0e353 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php @@ -46,7 +46,7 @@ class PrivateCommentType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { - $view->vars['hideLabel'] = true; + $view->vars['fullWidth'] = true; } public function configureOptions(OptionsResolver $resolver) diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php index 92a1b26c3..36c599f71 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php @@ -108,7 +108,7 @@ class ScopePickerType extends AbstractType $view->vars = array_replace( $view->vars, [ - 'hideLabel' => true, + 'fullWidth' => true, ] ); } diff --git a/src/Bundle/ChillMainBundle/Repository/CountryRepository.php b/src/Bundle/ChillMainBundle/Repository/CountryRepository.php index 81bea648d..055f41195 100644 --- a/src/Bundle/ChillMainBundle/Repository/CountryRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CountryRepository.php @@ -14,6 +14,7 @@ namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Country; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; +use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; final class CountryRepository implements ObjectRepository @@ -25,6 +26,11 @@ final class CountryRepository implements ObjectRepository $this->repository = $entityManager->getRepository(Country::class); } + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder + { + return $this->repository->createQueryBuilder($alias, $indexBy); + } + public function find($id, $lockMode = null, $lockVersion = null): ?Country { return $this->repository->find($id, $lockMode, $lockVersion); diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/index.js b/src/Bundle/ChillMainBundle/Resources/public/chill/index.js index 62bdbc240..5a688590b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/index.js @@ -46,7 +46,6 @@ require('../lib/collection/index.js'); require('../lib/breadcrumb/index.js'); require('../lib/download-report/index.js'); require('../lib/select_interactive_loading/index.js'); -require('../lib/export-list/index.js'); //require('../lib/show_hide/index.js'); //require('../lib/tabs/index.js'); diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index 7ed607535..673d5129a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -99,11 +99,14 @@ div.flex-table { div.item-bloc { flex-direction: column; - &:nth-child(even) { - background-color: $gray-200; + &:not(.no-altern) { // class to avoid even/odd - .chill-user-quote { - background-color: shade-color($gray-200, 5%) + &:nth-child(even) { + background-color: $gray-200; + + .chill-user-quote { + background-color: shade-color($gray-200, 5%) + } } } diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/export-list.scss b/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/export-list.scss deleted file mode 100644 index 25b42a822..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/export-list.scss +++ /dev/null @@ -1,20 +0,0 @@ -.container-export { - margin-left: 1rem; - margin-right: 1rem; - - .export-list { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - .export-list__element { - min-width: 18rem; - max-width: 20rem; - padding: 1rem; - margin: 1rem; - flex-grow: 1; - - border: 1px solid var(--chill-gray); - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/index.js b/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/index.js deleted file mode 100644 index 49e1a5b20..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/export-list/index.js +++ /dev/null @@ -1 +0,0 @@ -require('./export-list.scss'); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/_shared.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/_shared.scss index 21e1ceca0..c216c5cf8 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/_shared.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/_shared.scss @@ -1,14 +1,23 @@ -// Configuration +/* + * This shared file is used in Chill sass sheets and Vue sass styles to use some bootstrap/chill variables. + * Search on @import 'ChillMainAssets/module/bootstrap/shared'; + */ + +// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) @import "bootstrap/scss/functions"; -/* -* Replaced by CHILL variables -* it is necessary to keep the possibility of making a diff with original ! -* original: "bootstrap/scss/variables"; -*/ +// 2. Include any default variable overrides here @import "custom/_variables"; +// 3. Include remainder of required Bootstrap stylesheets +@import "bootstrap/scss/variables"; + +// 4. Include any default map overrides here +@import "custom/_maps"; + +// 5. Include remainder of required parts @import "bootstrap/scss/mixins"; -@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/root"; + diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss index cf36a9a54..a8d5f2f13 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss @@ -1,18 +1,8 @@ -/*! - * Bootstrap v5.0.1 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - * - * Enable / disable bootstrap assets - */ - -// Bootstrap configuration files are shared with chill entrypoint +// Some Bootstrap variables and configuration files are shared with chill entrypoint @import "shared"; -// scss-docs-start import-stack -// Layout & components -@import "bootstrap/scss/root"; +// 6. Optionally include any other parts as needed +@import "bootstrap/scss/utilities"; @import "bootstrap/scss/reboot"; @import "bootstrap/scss/type"; @import "bootstrap/scss/images"; @@ -42,14 +32,11 @@ @import "bootstrap/scss/carousel"; @import "bootstrap/scss/spinners"; @import "bootstrap/scss/offcanvas"; - -// Helpers @import "bootstrap/scss/helpers"; -// Utilities +// 7. Optionally include utilities API last to generate classes based on the Sass map in @import "bootstrap/scss/utilities/api"; -// scss-docs-end import-stack -// CHILL custom +// 8. Add additional custom code here @import "custom"; @import "custom/_debug"; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_maps.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_maps.scss new file mode 100644 index 000000000..a2f996fb9 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_maps.scss @@ -0,0 +1,69 @@ +//// CHILL OVERRIDE DEFAULT BOOTSTRAP COLORS MAP + +// 'beige' variations +$beige-100: tint-color($beige, 80%); +$beige-200: tint-color($beige, 60%); +$beige-300: tint-color($beige, 40%); +$beige-400: tint-color($beige, 20%); +$beige-500: $beige; +$beige-600: shade-color($beige, 20%); +$beige-700: shade-color($beige, 40%); +$beige-800: shade-color($beige, 60%); +$beige-900: shade-color($beige, 80%); + +$chill-blue: $blue; +$chill-green: $green; +$chill-green-dark: $green-600; +$chill-orange: $orange; +$chill-yellow: $yellow; +$chill-red: $red; +$chill-beige: $beige; +$chill-pink: $pink; +$chill-dark-gray: $gray-800; +$chill-gray: $gray-600; +$chill-l-gray: $gray-400; +$chill-ll-gray: $gray-300; +$chill-light-gray: $gray-200; +$chill-llight-gray: $gray-100; + +$colors: ( + "blue": $blue, + "green": $green, + "green-dark": $green-600, + "yellow": $yellow, + "orange": $orange, + "red": $red, + "pink": $pink, + "beige": $beige, + "white": $white, + "gray": $gray-600, + "dark": $gray-800, + "black": $black +); + +$chill-colors: ( + "chill-blue": $chill-blue, + "chill-green": $chill-green, + "chill-green-dark": $chill-green-dark, + "chill-orange": $chill-orange, + "chill-yellow": $chill-yellow, + "chill-red": $chill-red, + "chill-beige": $chill-beige, + "chill-pink": $chill-pink, + "chill-dark-gray": $chill-dark-gray, + "chill-gray": $chill-gray, + "chill-l-gray": $chill-l-gray, + "chill-ll-gray": $chill-ll-gray, + "chill-light-gray": $chill-light-gray, + "chill-llight-gray": $chill-llight-gray, +); + +// Merge the maps +$theme-colors: map-merge($theme-colors, $chill-colors); + +// Chill color classes +@each $color, $value in $chill-colors { + .#{$color} { + color: $value; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss index f9cd33f5f..26bf517ed 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss @@ -1,144 +1,32 @@ -// Variables -// -// Variables should follow the `$component-state-property-size` formula for -// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs. - -// Color system - -// scss-docs-start gray-color-variables -$white: #fff !default; -$gray-100: #f3f3f3 !default; -$gray-200: #e6e6e6 !default; -$gray-300: #dee2e6 !default; -$gray-400: #ced4da !default; -$gray-500: #b2b2b2 !default; -$gray-600: #6c757d !default; -$gray-700: #495057 !default; -$gray-800: #2c2d2f !default; -$gray-900: #212529 !default; -$black: #111 !default; -// scss-docs-end gray-color-variables - -// fusv-disable -// scss-docs-start gray-colors-map -$grays: ( - "100": $gray-100, - "200": $gray-200, /* = $chill-light-gray, $chill-gray */ - "300": $gray-300, - "400": $gray-400, - "500": $gray-500, /* = $chill-light-gray */ - "600": $gray-600, - "700": $gray-700, - "800": $gray-800, /* = $chill-dark-gray */ - "900": $gray-900 -) !default; -// scss-docs-end gray-colors-map -// fusv-enable - /* * CHILL Theme colors - * (apply chill colors, add missing colors, trust in bootstrap grey scale) */ -// scss-docs-start color-variables -$blue: #334d5c !default; -$green: #43b29d !default; -$yellow: #eec84a !default; -$orange: #e2793d !default; -$red: #df4949 !default; -$pink: #dd506d !default; -$beige: #cabb9f !default; -// scss-docs-end color-variables -// fusv-disable -$blue-100: tint-color($blue, 80%) !default; -$blue-200: tint-color($blue, 60%) !default; -$blue-300: tint-color($blue, 40%) !default; -$blue-400: tint-color($blue, 20%) !default; -$blue-500: $blue !default; -$blue-600: shade-color($blue, 20%) !default; -$blue-700: shade-color($blue, 40%) !default; -$blue-800: shade-color($blue, 60%) !default; -$blue-900: shade-color($blue, 80%) !default; +//// CHILL OVERRIDE DEFAULT BOOTSTRAP COLORS VARIABLES -$beige-100: tint-color($beige, 80%) !default; -$beige-200: tint-color($beige, 60%) !default; -$beige-300: tint-color($beige, 40%) !default; -$beige-400: tint-color($beige, 20%) !default; -$beige-500: $beige !default; -$beige-600: shade-color($beige, 20%) !default; -$beige-700: shade-color($beige, 40%) !default; -$beige-800: shade-color($beige, 60%) !default; -$beige-900: shade-color($beige, 80%) !default; +$white: #fff; +$gray-100: #f3f3f3; +$gray-200: #e6e6e6; +$gray-300: #dee2e6; +$gray-400: #ced4da; +$gray-500: #b2b2b2; +$gray-600: #6c757d; +$gray-700: #495057; +$gray-800: #2c2d2f; +$gray-900: #212529; +$black: #111; -$pink-100: tint-color($pink, 80%) !default; -$pink-200: tint-color($pink, 60%) !default; -$pink-300: tint-color($pink, 40%) !default; -$pink-400: tint-color($pink, 20%) !default; -$pink-500: $pink !default; -$pink-600: shade-color($pink, 20%) !default; -$pink-700: shade-color($pink, 40%) !default; -$pink-800: shade-color($pink, 60%) !default; -$pink-900: shade-color($pink, 80%) !default; +// override main colors +// don't use indigo, purple, teal +// add 'beige' +$blue: #334d5c; +$green: #43b29d; +$yellow: #eec84a; +$orange: #e2793d; +$red: #df4949; +$pink: #dd506d; +$beige: #cabb9f; -$red-100: tint-color($red, 80%) !default; -$red-200: tint-color($red, 60%) !default; -$red-300: tint-color($red, 40%) !default; -$red-400: tint-color($red, 20%) !default; -$red-500: $red !default; -$red-600: shade-color($red, 20%) !default; -$red-700: shade-color($red, 40%) !default; -$red-800: shade-color($red, 60%) !default; -$red-900: shade-color($red, 80%) !default; - -$orange-100: tint-color($orange, 80%) !default; -$orange-200: tint-color($orange, 60%) !default; -$orange-300: tint-color($orange, 40%) !default; -$orange-400: tint-color($orange, 20%) !default; -$orange-500: $orange !default; -$orange-600: shade-color($orange, 20%) !default; -$orange-700: shade-color($orange, 40%) !default; -$orange-800: shade-color($orange, 60%) !default; -$orange-900: shade-color($orange, 80%) !default; - -$yellow-100: tint-color($yellow, 80%) !default; -$yellow-200: tint-color($yellow, 60%) !default; -$yellow-300: tint-color($yellow, 40%) !default; -$yellow-400: tint-color($yellow, 20%) !default; -$yellow-500: $yellow !default; -$yellow-600: shade-color($yellow, 20%) !default; -$yellow-700: shade-color($yellow, 40%) !default; -$yellow-800: shade-color($yellow, 60%) !default; -$yellow-900: shade-color($yellow, 80%) !default; - -$green-100: tint-color($green, 80%) !default; -$green-200: tint-color($green, 60%) !default; -$green-300: tint-color($green, 40%) !default; -$green-400: tint-color($green, 20%) !default; -$green-500: $green !default; -$green-600: shade-color($green, 20%) !default; -$green-700: shade-color($green, 40%) !default; -$green-800: shade-color($green, 60%) !default; -$green-900: shade-color($green, 80%) !default; -// fusv-enable - -// scss-docs-start colors-map -$colors: ( - "blue": $blue, - "green": $green, - "green-dark": $green-600, - "yellow": $yellow, - "orange": $orange, - "red": $red, - "pink": $pink, - "beige": $beige, - "white": $white, - "gray": $gray-600, - "dark": $gray-800, - "black": $black -) !default; -// scss-docs-end colors-map - -// scss-docs-start theme-color-variables $primary: $blue; $secondary: $gray-500; $success: $green; @@ -149,1331 +37,29 @@ $light: $gray-100; $dark: $gray-800; $black: $black; -$chill-blue: $blue; -$chill-green: $green; -$chill-green-dark: $green-600; -$chill-orange: $orange; -$chill-yellow: $yellow; -$chill-red: $red; -$chill-beige: $beige; -$chill-pink: $pink; -$chill-dark-gray: $gray-800; -$chill-gray: $gray-600; -$chill-l-gray: $gray-400; -$chill-ll-gray: $gray-300; -$chill-light-gray: $gray-200; -$chill-llight-gray: $gray-100; -// scss-docs-end theme-color-variables -// scss-docs-start theme-colors-map -$theme-colors: ( - "primary": $primary, - "secondary": $secondary, - "success": $success, - "info": $info, - "warning": $warning, - "danger": $danger, - "light": $light, - "dark": $dark, -) !default; -// scss-docs-end theme-colors-map +//// CHILL OVERRIDE DEFAULT BOOTSTRAP VARIABLES -$chill-colors: ( - "chill-blue": $chill-blue, - "chill-green": $chill-green, - "chill-green-dark": $chill-green-dark, - "chill-orange": $chill-orange, - "chill-yellow": $chill-yellow, - "chill-red": $chill-red, - "chill-beige": $chill-beige, - "chill-pink": $chill-pink, - "chill-dark-gray": $chill-dark-gray, - "chill-gray": $chill-gray, - "chill-l-gray": $chill-l-gray, - "chill-ll-gray": $chill-ll-gray, - "chill-light-gray": $chill-light-gray, - "chill-llight-gray": $chill-llight-gray, -); +$border-radius: .25rem; //.25rem !default; +$font-family-sans-serif: 'Open Sans'; //system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; -// Merge the maps -$theme-colors: map-merge($theme-colors, $chill-colors); +$font-size-base-chill: 1rem; //$font-size-base: 1rem !default; +$h1-font-size: $font-size-base-chill * 2.0; //$font-size-base * 2.5 !default; +$h2-font-size: $font-size-base-chill * 1.5; //$font-size-base * 2 !default; +$h3-font-size: $font-size-base-chill * 1.25; //$font-size-base * 1.75 !default; +$h4-font-size: $font-size-base-chill * 1.15; //$font-size-base * 1.5 !default; +$h5-font-size: $font-size-base-chill * 1.05; //$font-size-base * 1.25 !default; -// Chill color classes -@each $color, $value in $chill-colors { - .#{$color} { - color: $value; - } -} +$headings-font-weight: 600; //500 !default; +$table-striped-bg-factor: .10; //.05 !default; +$table-active-bg-factor: .15; //.1 !default; +$table-hover-bg-factor: .125; //.075 !default; +$table-border-factor: .15; //.1 !default; +$btn-border-radius: 0; //$border-radius !default; +$btn-border-radius-sm: 0; //$border-radius-sm !default; +$btn-border-radius-lg: 0; //$border-radius-lg !default; -// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7. -// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast -$min-contrast-ratio: 4.5 !default; - -// Customize the light and dark text colors for use in our color contrast function. -$color-contrast-dark: $black !default; -$color-contrast-light: $white !default; - -// Characters which are escaped by the escape-svg function -$escaped-characters: ( - ("<", "%3c"), - (">", "%3e"), - ("#", "%23"), - ("(", "%28"), - (")", "%29"), -) !default; - -// Options -// -// Quickly modify global styling by enabling or disabling optional features. - -$enable-caret: true !default; -$enable-rounded: true !default; -$enable-shadows: false !default; -$enable-gradients: false !default; -$enable-transitions: true !default; -$enable-reduced-motion: true !default; -$enable-smooth-scroll: true !default; -$enable-grid-classes: true !default; -$enable-button-pointers: true !default; -$enable-rfs: true !default; -$enable-validation-icons: true !default; -$enable-negative-margins: false !default; -$enable-deprecation-messages: true !default; -$enable-important-utilities: true !default; - -// Prefix for :root CSS variables - -$variable-prefix: bs- !default; - -// Gradient -// -// The gradient which is added to components if `$enable-gradients` is `true` -// This gradient is also added to elements with `.bg-gradient` -// scss-docs-start variable-gradient -$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default; -// scss-docs-end variable-gradient - -// Spacing -// -// Control the default styling of most Bootstrap elements by modifying these -// variables. Mostly focused on spacing. -// You can add more entries to the $spacers map, should you need more variation. - -// scss-docs-start spacer-variables-maps -$spacer: 1rem !default; -$spacers: ( - 0: 0, - 1: $spacer / 4, - 2: $spacer / 2, - 3: $spacer, - 4: $spacer * 1.5, - 5: $spacer * 3, -) !default; - -$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default; -// scss-docs-end spacer-variables-maps - -// Position -// -// Define the edge positioning anchors of the position utilities. - -// scss-docs-start position-map -$position-values: ( - 0: 0, - 50: 50%, - 100: 100% -) !default; -// scss-docs-end position-map - -// Body -// -// Settings for the `` element. - -$body-bg: $white !default; -$body-color: $gray-900 !default; -$body-text-align: null !default; - - -// Links -// -// Style anchor elements. - -$link-color: $primary !default; -$link-decoration: underline !default; -$link-shade-percentage: 20% !default; -$link-hover-color: shift-color($link-color, $link-shade-percentage) !default; -$link-hover-decoration: null !default; - -$stretched-link-pseudo-element: after !default; -$stretched-link-z-index: 1 !default; - -// Paragraphs -// -// Style p element. - -$paragraph-margin-bottom: 1rem !default; - - -// Grid breakpoints -// -// Define the minimum dimensions at which your layout will change, -// adapting to different screen sizes, for use in media queries. - -// scss-docs-start grid-breakpoints -$grid-breakpoints: ( - xs: 0, - sm: 576px, - md: 768px, - lg: 992px, - xl: 1200px, - xxl: 1400px -) !default; -// scss-docs-end grid-breakpoints - -@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); -@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints"); - - -// Grid containers -// -// Define the maximum width of `.container` for different screen sizes. - -// scss-docs-start container-max-widths -$container-max-widths: ( - sm: 540px, - md: 720px, - lg: 960px, - xl: 1140px, - xxl: 1320px -) !default; -// scss-docs-end container-max-widths - -@include _assert-ascending($container-max-widths, "$container-max-widths"); - - -// Grid columns -// -// Set the number of columns and specify the width of the gutters. - -$grid-columns: 12 !default; -$grid-gutter-width: 1.5rem !default; -$grid-row-columns: 6 !default; - -$gutters: $spacers !default; - -// Container padding - -$container-padding-x: $grid-gutter-width / 2 !default; - - -// Components -// -// Define common padding and border radius sizes and more. - -// scss-docs-start border-variables -$border-width: 1px !default; -$border-widths: ( - 1: 1px, - 2: 2px, - 3: 3px, - 4: 4px, - 5: 5px -) !default; - -$border-color: $gray-300 !default; -// scss-docs-end border-variables - -// scss-docs-start border-radius-variables -$border-radius: .25rem !default; // <== -$border-radius-sm: .2rem !default; -$border-radius-lg: .3rem !default; -$border-radius-pill: 50rem !default; -// scss-docs-end border-radius-variables - -// scss-docs-start box-shadow-variables -$box-shadow: 0 .5rem 1rem rgba($black, .15) !default; -$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; -$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; -$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default; -// scss-docs-end box-shadow-variables - -$component-active-color: $white !default; -$component-active-bg: $primary !default; - -// scss-docs-start caret-variables -$caret-width: .3em !default; -$caret-vertical-align: $caret-width * .85 !default; -$caret-spacing: $caret-width * .85 !default; -// scss-docs-end caret-variables - -$transition-base: all .2s ease-in-out !default; -$transition-fade: opacity .15s linear !default; -// scss-docs-start collapse-transition -$transition-collapse: height .35s ease !default; -// scss-docs-end collapse-transition - -// stylelint-disable function-disallowed-list -// scss-docs-start aspect-ratios -$aspect-ratios: ( - "1x1": 100%, - "4x3": calc(3 / 4 * 100%), - "16x9": calc(9 / 16 * 100%), - "21x9": calc(9 / 21 * 100%) -) !default; -// scss-docs-end aspect-ratios -// stylelint-enable function-disallowed-list - -// Typography -// -// Font, line-height, and color for body text, headings, and more. - -// scss-docs-start font-variables -// stylelint-disable value-keyword-case -$font-family-sans-serif: 'Open Sans'; -$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; -// stylelint-enable value-keyword-case -$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default; -$font-family-code: var(--#{$variable-prefix}font-monospace) !default; - -// $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins -// $font-size-base effects the font size of the body text -$font-size-root: null !default; -$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` -$font-size-sm: $font-size-base * .875 !default; -$font-size-lg: $font-size-base * 1.25 !default; - -$font-weight-lighter: lighter !default; -$font-weight-light: 300 !default; -$font-weight-normal: 400 !default; -$font-weight-bold: 700 !default; -$font-weight-bolder: bolder !default; - -$font-weight-base: $font-weight-normal !default; - -$line-height-base: 1.5 !default; -$line-height-sm: 1.25 !default; -$line-height-lg: 2 !default; - -$h1-font-size: $font-size-base * 2.0 !default; -$h2-font-size: $font-size-base * 1.5 !default; -$h3-font-size: $font-size-base * 1.25 !default; -$h4-font-size: $font-size-base * 1.15 !default; -$h5-font-size: $font-size-base * 1.05 !default; -$h6-font-size: $font-size-base !default; -// scss-docs-end font-variables - -// scss-docs-start font-sizes -$font-sizes: ( - 1: $h1-font-size, - 2: $h2-font-size, - 3: $h3-font-size, - 4: $h4-font-size, - 5: $h5-font-size, - 6: $h6-font-size -) !default; -// scss-docs-end font-sizes - -// scss-docs-start headings-variables -$headings-margin-bottom: $spacer / 2 !default; -$headings-font-family: null !default; -$headings-font-style: null !default; -$headings-font-weight: 600 !default; -$headings-line-height: 1.2 !default; -$headings-color: null !default; -// scss-docs-end headings-variables - -// scss-docs-start display-headings -$display-font-sizes: ( - 1: 5rem, - 2: 4.5rem, - 3: 4rem, - 4: 3.5rem, - 5: 3rem, - 6: 2.5rem -) !default; - -$display-font-weight: 300 !default; -$display-line-height: $headings-line-height !default; -// scss-docs-end display-headings - -// scss-docs-start type-variables -$lead-font-size: $font-size-base * 1.25 !default; -$lead-font-weight: 300 !default; - -$small-font-size: .875em !default; - -$sub-sup-font-size: .75em !default; - -$text-muted: $gray-600 !default; - -$initialism-font-size: $small-font-size !default; - -$blockquote-margin-y: $spacer !default; -$blockquote-font-size: $font-size-base * 1.25 !default; -$blockquote-footer-color: $gray-600 !default; -$blockquote-footer-font-size: $small-font-size !default; - -$hr-margin-y: $spacer !default; -$hr-color: inherit !default; -$hr-height: $border-width !default; -$hr-opacity: .25 !default; - -$legend-margin-bottom: .5rem !default; -$legend-font-size: 1.5rem !default; -$legend-font-weight: null !default; - -$mark-padding: .2em !default; - -$dt-font-weight: $font-weight-bold !default; - -$nested-kbd-font-weight: $font-weight-bold !default; - -$list-inline-padding: .5rem !default; - -$mark-bg: #fcf8e3 !default; -// scss-docs-end type-variables - - -// Tables -// -// Customizes the `.table` component with basic values, each used across all table variations. - -// scss-docs-start table-variables -$table-cell-padding-y: .5rem !default; -$table-cell-padding-x: .5rem !default; -$table-cell-padding-y-sm: .25rem !default; -$table-cell-padding-x-sm: .25rem !default; - -$table-cell-vertical-align: top !default; - -$table-color: $body-color !default; -$table-bg: transparent !default; - -$table-th-font-weight: null !default; - -$table-striped-color: $table-color !default; -$table-striped-bg-factor: .10 !default; -$table-striped-bg: rgba($black, $table-striped-bg-factor) !default; - -$table-active-color: $table-color !default; -$table-active-bg-factor: .15 !default; -$table-active-bg: rgba($black, $table-active-bg-factor) !default; - -$table-hover-color: $table-color !default; -$table-hover-bg-factor: .125 !default; -$table-hover-bg: rgba($black, $table-hover-bg-factor) !default; - -$table-border-factor: .15 !default; -$table-border-width: $border-width !default; -$table-border-color: $border-color !default; - -$table-striped-order: odd !default; - -$table-group-separator-color: currentColor !default; - -$table-caption-color: $text-muted !default; - -$table-bg-scale: -80% !default; -// scss-docs-end table-variables - -// scss-docs-start table-loop -$table-variants: ( - "primary": shift-color($primary, $table-bg-scale), - "secondary": shift-color($secondary, $table-bg-scale), - "success": shift-color($success, $table-bg-scale), - "info": shift-color($info, $table-bg-scale), - "warning": shift-color($warning, $table-bg-scale), - "danger": shift-color($danger, $table-bg-scale), - "light": $light, - "dark": $dark, -) !default; -// scss-docs-end table-loop - - -// Buttons + Forms -// -// Shared variables that are reassigned to `$input-` and `$btn-` specific variables. - -// scss-docs-start input-btn-variables -$input-btn-padding-y: .375rem !default; -$input-btn-padding-x: .75rem !default; -$input-btn-font-family: null !default; -$input-btn-font-size: $font-size-base !default; -$input-btn-line-height: $line-height-base !default; - -$input-btn-focus-width: .25rem !default; -$input-btn-focus-color-opacity: .25 !default; -$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default; -$input-btn-focus-blur: 0 !default; -$input-btn-focus-box-shadow: 0 0 $input-btn-focus-blur $input-btn-focus-width $input-btn-focus-color !default; - -$input-btn-padding-y-sm: .25rem !default; -$input-btn-padding-x-sm: .5rem !default; -$input-btn-font-size-sm: $font-size-sm !default; - -$input-btn-padding-y-lg: .5rem !default; -$input-btn-padding-x-lg: 1rem !default; -$input-btn-font-size-lg: $font-size-lg !default; - -$input-btn-border-width: $border-width !default; -// scss-docs-end input-btn-variables - - -// Buttons -// -// For each of Bootstrap's buttons, define text, background, and border color. - -// scss-docs-start btn-variables -$btn-padding-y: $input-btn-padding-y !default; -$btn-padding-x: $input-btn-padding-x !default; -$btn-font-family: $input-btn-font-family !default; -$btn-font-size: $input-btn-font-size !default; -$btn-line-height: $input-btn-line-height !default; -$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping - -$btn-padding-y-sm: $input-btn-padding-y-sm !default; -$btn-padding-x-sm: $input-btn-padding-x-sm !default; -$btn-font-size-sm: $input-btn-font-size-sm !default; - -$btn-padding-y-lg: $input-btn-padding-y-lg !default; -$btn-padding-x-lg: $input-btn-padding-x-lg !default; -$btn-font-size-lg: $input-btn-font-size-lg !default; - -$btn-border-width: $input-btn-border-width !default; - -$btn-font-weight: $font-weight-normal !default; -$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default; -$btn-focus-width: $input-btn-focus-width !default; -$btn-focus-box-shadow: $input-btn-focus-box-shadow !default; -$btn-disabled-opacity: .65 !default; -$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default; - -$btn-link-color: $link-color !default; -$btn-link-hover-color: $link-hover-color !default; -$btn-link-disabled-color: $gray-600 !default; - -// Allows for customizing button radius independently from global border radius -$btn-border-radius: 0 !default; // $border-radius !default; (only disabled for button) -$btn-border-radius-sm: 0 !default; // $border-radius-sm !default; -$btn-border-radius-lg: 0 !default; // $border-radius-lg !default; - -$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; - -$btn-hover-bg-shade-amount: 15% !default; -$btn-hover-bg-tint-amount: 15% !default; -$btn-hover-border-shade-amount: 20% !default; -$btn-hover-border-tint-amount: 10% !default; -$btn-active-bg-shade-amount: 20% !default; -$btn-active-bg-tint-amount: 20% !default; -$btn-active-border-shade-amount: 25% !default; -$btn-active-border-tint-amount: 10% !default; -// scss-docs-end btn-variables - - -// Forms - -// scss-docs-start form-text-variables -$form-text-margin-top: .25rem !default; -$form-text-font-size: $small-font-size !default; -$form-text-font-style: null !default; -$form-text-font-weight: null !default; -$form-text-color: $text-muted !default; -// scss-docs-end form-text-variables - -// scss-docs-start form-label-variables -$form-label-margin-bottom: .5rem !default; -$form-label-font-size: null !default; -$form-label-font-style: null !default; -$form-label-font-weight: null !default; -$form-label-color: null !default; -// scss-docs-end form-label-variables - -// scss-docs-start form-input-variables -$input-padding-y: $input-btn-padding-y !default; -$input-padding-x: $input-btn-padding-x !default; -$input-font-family: $input-btn-font-family !default; -$input-font-size: $input-btn-font-size !default; -$input-font-weight: $font-weight-base !default; -$input-line-height: $input-btn-line-height !default; - -$input-padding-y-sm: $input-btn-padding-y-sm !default; -$input-padding-x-sm: $input-btn-padding-x-sm !default; -$input-font-size-sm: $input-btn-font-size-sm !default; - -$input-padding-y-lg: $input-btn-padding-y-lg !default; -$input-padding-x-lg: $input-btn-padding-x-lg !default; -$input-font-size-lg: $input-btn-font-size-lg !default; - -$input-bg: $white !default; -$input-disabled-bg: $gray-200 !default; -$input-disabled-border-color: null !default; - -$input-color: $body-color !default; -$input-border-color: $gray-400 !default; -$input-border-width: $input-btn-border-width !default; -$input-box-shadow: $box-shadow-inset !default; - -$input-border-radius: $border-radius !default; -$input-border-radius-sm: $border-radius-sm !default; -$input-border-radius-lg: $border-radius-lg !default; - -$input-focus-bg: $input-bg !default; -$input-focus-border-color: tint-color($component-active-bg, 50%) !default; -$input-focus-color: $input-color !default; -$input-focus-width: $input-btn-focus-width !default; -$input-focus-box-shadow: $input-btn-focus-box-shadow !default; - -$input-placeholder-color: $gray-600 !default; -$input-plaintext-color: $body-color !default; - -$input-height-border: $input-border-width * 2 !default; - -$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default; -$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default; -$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default; - -$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default; -$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default; -$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default; - -$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; -// scss-docs-end form-input-variables - -// scss-docs-start form-check-variables -$form-check-input-width: 1em !default; -$form-check-min-height: $font-size-base * $line-height-base !default; -$form-check-padding-start: $form-check-input-width + .5em !default; -$form-check-margin-bottom: .125rem !default; -$form-check-label-color: null !default; -$form-check-label-cursor: null !default; -$form-check-transition: null !default; - -$form-check-input-active-filter: brightness(90%) !default; - -$form-check-input-bg: $input-bg !default; -$form-check-input-border: 1px solid rgba($black, .25) !default; -$form-check-input-border-radius: .25em !default; -$form-check-radio-border-radius: 50% !default; -$form-check-input-focus-border: $input-focus-border-color !default; -$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default; - -$form-check-input-checked-color: $component-active-color !default; -$form-check-input-checked-bg-color: $component-active-bg !default; -$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default; -$form-check-input-checked-bg-image: url("data:image/svg+xml,") !default; -$form-check-radio-checked-bg-image: url("data:image/svg+xml,") !default; - -$form-check-input-indeterminate-color: $component-active-color !default; -$form-check-input-indeterminate-bg-color: $component-active-bg !default; -$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default; -$form-check-input-indeterminate-bg-image: url("data:image/svg+xml,") !default; - -$form-check-input-disabled-opacity: .5 !default; -$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default; -$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default; - -$form-check-inline-margin-end: 1rem !default; -// scss-docs-end form-check-variables - -// scss-docs-start form-switch-variables -$form-switch-color: rgba(0, 0, 0, .25) !default; -$form-switch-width: 2em !default; -$form-switch-padding-start: $form-switch-width + .5em !default; -$form-switch-bg-image: url("data:image/svg+xml,") !default; -$form-switch-border-radius: $form-switch-width !default; -$form-switch-transition: background-position .15s ease-in-out !default; - -$form-switch-focus-color: $input-focus-border-color !default; -$form-switch-focus-bg-image: url("data:image/svg+xml,") !default; - -$form-switch-checked-color: $component-active-color !default; -$form-switch-checked-bg-image: url("data:image/svg+xml,") !default; -$form-switch-checked-bg-position: right center !default; -// scss-docs-end form-switch-variables - -// scss-docs-start input-group-variables -$input-group-addon-padding-y: $input-padding-y !default; -$input-group-addon-padding-x: $input-padding-x !default; -$input-group-addon-font-weight: $input-font-weight !default; -$input-group-addon-color: $input-color !default; -$input-group-addon-bg: $gray-200 !default; -$input-group-addon-border-color: $input-border-color !default; -// scss-docs-end input-group-variables - -// scss-docs-start form-select-variables -$form-select-padding-y: $input-padding-y !default; -$form-select-padding-x: $input-padding-x !default; -$form-select-font-family: $input-font-family !default; -$form-select-font-size: $input-font-size !default; -$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image -$form-select-font-weight: $input-font-weight !default; -$form-select-line-height: $input-line-height !default; -$form-select-color: $input-color !default; -$form-select-bg: $input-bg !default; -$form-select-disabled-color: null !default; -$form-select-disabled-bg: $gray-200 !default; -$form-select-disabled-border-color: $input-disabled-border-color !default; -$form-select-bg-position: right $form-select-padding-x center !default; -$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions -$form-select-indicator-color: $gray-800 !default; -$form-select-indicator: url("data:image/svg+xml,") !default; - -$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default; -$form-select-feedback-icon-position: center right $form-select-indicator-padding !default; -$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default; - -$form-select-border-width: $input-border-width !default; -$form-select-border-color: $input-border-color !default; -$form-select-border-radius: $border-radius !default; -$form-select-box-shadow: $box-shadow-inset !default; - -$form-select-focus-border-color: $input-focus-border-color !default; -$form-select-focus-width: $input-focus-width !default; -$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default; - -$form-select-padding-y-sm: $input-padding-y-sm !default; -$form-select-padding-x-sm: $input-padding-x-sm !default; -$form-select-font-size-sm: $input-font-size-sm !default; - -$form-select-padding-y-lg: $input-padding-y-lg !default; -$form-select-padding-x-lg: $input-padding-x-lg !default; -$form-select-font-size-lg: $input-font-size-lg !default; -// scss-docs-end form-select-variables - -// scss-docs-start form-range-variables -$form-range-track-width: 100% !default; -$form-range-track-height: .5rem !default; -$form-range-track-cursor: pointer !default; -$form-range-track-bg: $gray-300 !default; -$form-range-track-border-radius: 1rem !default; -$form-range-track-box-shadow: $box-shadow-inset !default; - -$form-range-thumb-width: 1rem !default; -$form-range-thumb-height: $form-range-thumb-width !default; -$form-range-thumb-bg: $component-active-bg !default; -$form-range-thumb-border: 0 !default; -$form-range-thumb-border-radius: 1rem !default; -$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default; -$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default; -$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge -$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default; -$form-range-thumb-disabled-bg: $gray-500 !default; -$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; -// scss-docs-end form-range-variables - -// scss-docs-start form-file-variables -$form-file-button-color: $input-color !default; -$form-file-button-bg: $input-group-addon-bg !default; -$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default; -// scss-docs-end form-file-variables - -// scss-docs-start form-floating-variables -$form-floating-height: add(3.5rem, $input-height-border) !default; -$form-floating-padding-x: $input-padding-x !default; -$form-floating-padding-y: 1rem !default; -$form-floating-input-padding-t: 1.625rem !default; -$form-floating-input-padding-b: .625rem !default; -$form-floating-label-opacity: .65 !default; -$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default; -$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default; -// scss-docs-end form-floating-variables - -// Form validation - -// scss-docs-start form-feedback-variables -$form-feedback-margin-top: $form-text-margin-top !default; -$form-feedback-font-size: $form-text-font-size !default; -$form-feedback-font-style: $form-text-font-style !default; -$form-feedback-valid-color: $success !default; -$form-feedback-invalid-color: $danger !default; - -$form-feedback-icon-valid-color: $form-feedback-valid-color !default; -$form-feedback-icon-valid: url("data:image/svg+xml,") !default; -$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; -$form-feedback-icon-invalid: url("data:image/svg+xml,") !default; -// scss-docs-end form-feedback-variables - -// scss-docs-start form-validation-states -$form-validation-states: ( - "valid": ( - "color": $form-feedback-valid-color, - "icon": $form-feedback-icon-valid - ), - "invalid": ( - "color": $form-feedback-invalid-color, - "icon": $form-feedback-icon-invalid - ) -) !default; -// scss-docs-end form-validation-states - -// Z-index master list -// -// Warning: Avoid customizing these values. They're used for a bird's eye view -// of components dependent on the z-axis and are designed to all work together. - -// scss-docs-start zindex-stack -$zindex-dropdown: 1000 !default; -$zindex-sticky: 1020 !default; -$zindex-fixed: 1030 !default; -$zindex-modal-backdrop: 1040 !default; -$zindex-offcanvas: 1050 !default; -$zindex-modal: 1060 !default; -$zindex-popover: 1070 !default; -$zindex-tooltip: 1080 !default; -// scss-docs-end zindex-stack - - -// Navs - -// scss-docs-start nav-variables -$nav-link-padding-y: .5rem !default; -$nav-link-padding-x: 1rem !default; -$nav-link-font-size: null !default; -$nav-link-font-weight: null !default; -$nav-link-color: $link-color !default; -$nav-link-hover-color: $link-hover-color !default; -$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default; -$nav-link-disabled-color: $gray-600 !default; - -$nav-tabs-border-color: $gray-300 !default; -$nav-tabs-border-width: $border-width !default; -$nav-tabs-border-radius: $border-radius !default; -$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default; -$nav-tabs-link-active-color: $gray-700 !default; -$nav-tabs-link-active-bg: $body-bg !default; -$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default; - -$nav-pills-border-radius: $border-radius !default; -$nav-pills-link-active-color: $component-active-color !default; -$nav-pills-link-active-bg: $component-active-bg !default; -// scss-docs-end nav-variables - - -// Navbar - -// scss-docs-start navbar-variables -$navbar-padding-y: $spacer / 2 !default; -$navbar-padding-x: null !default; - -$navbar-nav-link-padding-x: .5rem !default; - -$navbar-brand-font-size: $font-size-lg !default; -// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link -$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default; -$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default; -$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default; -$navbar-brand-margin-end: 1rem !default; - -$navbar-toggler-padding-y: .25rem !default; -$navbar-toggler-padding-x: .75rem !default; -$navbar-toggler-font-size: $font-size-lg !default; -$navbar-toggler-border-radius: $btn-border-radius !default; -$navbar-toggler-focus-width: $btn-focus-width !default; -$navbar-toggler-transition: box-shadow .15s ease-in-out !default; -// scss-docs-end navbar-variables - -// scss-docs-start navbar-theme-variables -$navbar-dark-color: rgba($white, .55) !default; -$navbar-dark-hover-color: rgba($white, .75) !default; -$navbar-dark-active-color: $white !default; -$navbar-dark-disabled-color: rgba($white, .25) !default; -$navbar-dark-toggler-icon-bg: url("data:image/svg+xml,") !default; -$navbar-dark-toggler-border-color: rgba($white, .1) !default; - -$navbar-light-color: rgba($black, .55) !default; -$navbar-light-hover-color: rgba($black, .7) !default; -$navbar-light-active-color: rgba($black, .9) !default; -$navbar-light-disabled-color: rgba($black, .3) !default; -$navbar-light-toggler-icon-bg: url("data:image/svg+xml,") !default; -$navbar-light-toggler-border-color: rgba($black, .1) !default; - -$navbar-light-brand-color: $navbar-light-active-color !default; -$navbar-light-brand-hover-color: $navbar-light-active-color !default; -$navbar-dark-brand-color: $navbar-dark-active-color !default; -$navbar-dark-brand-hover-color: $navbar-dark-active-color !default; -// scss-docs-end navbar-theme-variables - - -// Dropdowns -// -// Dropdown menu container and contents. - -// scss-docs-start dropdown-variables -$dropdown-min-width: 10rem !default; -$dropdown-padding-x: 0 !default; -$dropdown-padding-y: .5rem !default; -$dropdown-spacer: .125rem !default; -$dropdown-font-size: $font-size-base !default; -$dropdown-color: $body-color !default; -$dropdown-bg: $white !default; -$dropdown-border-color: rgba($black, .15) !default; -$dropdown-border-radius: $border-radius !default; -$dropdown-border-width: $border-width !default; -$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default; -$dropdown-divider-bg: $dropdown-border-color !default; -$dropdown-divider-margin-y: $spacer / 2 !default; -$dropdown-box-shadow: $box-shadow !default; - -$dropdown-link-color: $gray-900 !default; -$dropdown-link-hover-color: shade-color($gray-900, 10%) !default; -$dropdown-link-hover-bg: $gray-200 !default; - -$dropdown-link-active-color: $component-active-color !default; -$dropdown-link-active-bg: $component-active-bg !default; - -$dropdown-link-disabled-color: $gray-500 !default; - -$dropdown-item-padding-y: $spacer / 4 !default; -$dropdown-item-padding-x: $spacer !default; - -$dropdown-header-color: $gray-600 !default; -$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default; -// scss-docs-end dropdown-variables - -// scss-docs-start dropdown-dark-variables -$dropdown-dark-color: $gray-300 !default; -$dropdown-dark-bg: $gray-800 !default; -$dropdown-dark-border-color: $dropdown-border-color !default; -$dropdown-dark-divider-bg: $dropdown-divider-bg !default; -$dropdown-dark-box-shadow: null !default; -$dropdown-dark-link-color: $dropdown-dark-color !default; -$dropdown-dark-link-hover-color: $white !default; -$dropdown-dark-link-hover-bg: rgba($white, .15) !default; -$dropdown-dark-link-active-color: $dropdown-link-active-color !default; -$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default; -$dropdown-dark-link-disabled-color: $gray-500 !default; -$dropdown-dark-header-color: $gray-500 !default; -// scss-docs-end dropdown-dark-variables - - -// Pagination - -// scss-docs-start pagination-variables -$pagination-padding-y: .375rem !default; -$pagination-padding-x: .75rem !default; -$pagination-padding-y-sm: .25rem !default; -$pagination-padding-x-sm: .5rem !default; -$pagination-padding-y-lg: .75rem !default; -$pagination-padding-x-lg: 1.5rem !default; - -$pagination-color: $link-color !default; -$pagination-bg: $white !default; -$pagination-border-width: $border-width !default; -$pagination-border-radius: $border-radius !default; -$pagination-margin-start: -$pagination-border-width !default; -$pagination-border-color: $gray-300 !default; - -$pagination-focus-color: $link-hover-color !default; -$pagination-focus-bg: $gray-200 !default; -$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; -$pagination-focus-outline: 0 !default; - -$pagination-hover-color: $link-hover-color !default; -$pagination-hover-bg: $gray-200 !default; -$pagination-hover-border-color: $gray-300 !default; - -$pagination-active-color: $component-active-color !default; -$pagination-active-bg: $component-active-bg !default; -$pagination-active-border-color: $pagination-active-bg !default; - -$pagination-disabled-color: $gray-600 !default; -$pagination-disabled-bg: $white !default; -$pagination-disabled-border-color: $gray-300 !default; - -$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; - -$pagination-border-radius-sm: $border-radius-sm !default; -$pagination-border-radius-lg: $border-radius-lg !default; -// scss-docs-end pagination-variables - - -// Cards - -// scss-docs-start card-variables -$card-spacer-y: $spacer !default; -$card-spacer-x: $spacer !default; -$card-title-spacer-y: $spacer / 2 !default; -$card-border-width: $border-width !default; -$card-border-radius: $border-radius !default; -$card-border-color: rgba($black, .125) !default; -$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default; -$card-cap-padding-y: $card-spacer-y / 2 !default; -$card-cap-padding-x: $card-spacer-x !default; -$card-cap-bg: rgba($black, .03) !default; -$card-cap-color: null !default; -$card-height: null !default; -$card-color: null !default; -$card-bg: $white !default; -$card-img-overlay-padding: $spacer !default; -$card-group-margin: $grid-gutter-width / 2 !default; -// scss-docs-end card-variables - -// Accordion - -// scss-docs-start accordion-variables -$accordion-padding-y: 1rem !default; -$accordion-padding-x: 1.25rem !default; -$accordion-color: $body-color !default; -$accordion-bg: $body-bg !default; -$accordion-border-width: $border-width !default; -$accordion-border-color: rgba($black, .125) !default; -$accordion-border-radius: $border-radius !default; -$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default; - -$accordion-body-padding-y: $accordion-padding-y !default; -$accordion-body-padding-x: $accordion-padding-x !default; - -$accordion-button-padding-y: $accordion-padding-y !default; -$accordion-button-padding-x: $accordion-padding-x !default; -$accordion-button-color: $accordion-color !default; -$accordion-button-bg: $accordion-bg !default; -$accordion-transition: $btn-transition, border-radius .15s ease !default; -$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default; -$accordion-button-active-color: shade-color($primary, 10%) !default; - -$accordion-button-focus-border-color: $input-focus-border-color !default; -$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default; - -$accordion-icon-width: 1.25rem !default; -$accordion-icon-color: $accordion-color !default; -$accordion-icon-active-color: $accordion-button-active-color !default; -$accordion-icon-transition: transform .2s ease-in-out !default; -$accordion-icon-transform: rotate(-180deg) !default; - -$accordion-button-icon: url("data:image/svg+xml,") !default; -$accordion-button-active-icon: url("data:image/svg+xml,") !default; -// scss-docs-end accordion-variables - -// Tooltips - -// scss-docs-start tooltip-variables -$tooltip-font-size: $font-size-sm !default; -$tooltip-max-width: 200px !default; -$tooltip-color: $white !default; -$tooltip-bg: $black !default; -$tooltip-border-radius: $border-radius !default; -$tooltip-opacity: .9 !default; -$tooltip-padding-y: $spacer / 4 !default; -$tooltip-padding-x: $spacer / 2 !default; -$tooltip-margin: 0 !default; - -$tooltip-arrow-width: .8rem !default; -$tooltip-arrow-height: .4rem !default; -$tooltip-arrow-color: $tooltip-bg !default; -// scss-docs-end tooltip-variables - -// Form tooltips must come after regular tooltips -// scss-docs-start tooltip-feedback-variables -$form-feedback-tooltip-padding-y: $tooltip-padding-y !default; -$form-feedback-tooltip-padding-x: $tooltip-padding-x !default; -$form-feedback-tooltip-font-size: $tooltip-font-size !default; -$form-feedback-tooltip-line-height: null !default; -$form-feedback-tooltip-opacity: $tooltip-opacity !default; -$form-feedback-tooltip-border-radius: $tooltip-border-radius !default; -// scss-docs-start tooltip-feedback-variables - - -// Popovers - -// scss-docs-start popover-variables -$popover-font-size: $font-size-sm !default; -$popover-bg: $white !default; -$popover-max-width: 276px !default; -$popover-border-width: $border-width !default; -$popover-border-color: rgba($black, .2) !default; -$popover-border-radius: $border-radius-lg !default; -$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default; -$popover-box-shadow: $box-shadow !default; - -$popover-header-bg: shade-color($popover-bg, 6%) !default; -$popover-header-color: $headings-color !default; -$popover-header-padding-y: .5rem !default; -$popover-header-padding-x: $spacer !default; - -$popover-body-color: $body-color !default; -$popover-body-padding-y: $spacer !default; -$popover-body-padding-x: $spacer !default; - -$popover-arrow-width: 1rem !default; -$popover-arrow-height: .5rem !default; -$popover-arrow-color: $popover-bg !default; - -$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; -// scss-docs-end popover-variables - - -// Toasts - -// scss-docs-start toast-variables -$toast-max-width: 350px !default; -$toast-padding-x: .75rem !default; -$toast-padding-y: .5rem !default; -$toast-font-size: .875rem !default; -$toast-color: null !default; -$toast-background-color: rgba($white, .85) !default; -$toast-border-width: 1px !default; -$toast-border-color: rgba(0, 0, 0, .1) !default; -$toast-border-radius: $border-radius !default; -$toast-box-shadow: $box-shadow !default; -$toast-spacing: $container-padding-x !default; - -$toast-header-color: $gray-600 !default; -$toast-header-background-color: rgba($white, .85) !default; -$toast-header-border-color: rgba(0, 0, 0, .05) !default; -// scss-docs-end toast-variables - - -// Badges - -// scss-docs-start badge-variables -$badge-font-size: .75em !default; -$badge-font-weight: $font-weight-bold !default; -$badge-color: $white !default; -$badge-padding-y: .35em !default; -$badge-padding-x: .65em !default; -$badge-border-radius: $border-radius !default; -// scss-docs-end badge-variables - - -// Modals - -// scss-docs-start modal-variables -$modal-inner-padding: $spacer !default; - -$modal-footer-margin-between: .5rem !default; - -$modal-dialog-margin: .5rem !default; -$modal-dialog-margin-y-sm-up: 1.75rem !default; - -$modal-title-line-height: $line-height-base !default; - -$modal-content-color: null !default; -$modal-content-bg: $white !default; -$modal-content-border-color: rgba($black, .2) !default; -$modal-content-border-width: $border-width !default; -$modal-content-border-radius: $border-radius-lg !default; -$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default; -$modal-content-box-shadow-xs: $box-shadow-sm !default; -$modal-content-box-shadow-sm-up: $box-shadow !default; - -$modal-backdrop-bg: $black !default; -$modal-backdrop-opacity: .5 !default; -$modal-header-border-color: $border-color !default; -$modal-footer-border-color: $modal-header-border-color !default; -$modal-header-border-width: $modal-content-border-width !default; -$modal-footer-border-width: $modal-header-border-width !default; -$modal-header-padding-y: $modal-inner-padding !default; -$modal-header-padding-x: $modal-inner-padding !default; -$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility - -$modal-sm: 300px !default; -$modal-md: 500px !default; -$modal-lg: 800px !default; -$modal-xl: 1140px !default; - -$modal-fade-transform: translate(0, -50px) !default; -$modal-show-transform: none !default; -$modal-transition: transform .3s ease-out !default; -$modal-scale-transform: scale(1.02) !default; -// scss-docs-end modal-variables - - -// Alerts -// -// Define alert colors, border radius, and padding. - -// scss-docs-start alert-variables -$alert-padding-y: $spacer !default; -$alert-padding-x: $spacer !default; -$alert-margin-bottom: 1rem !default; -$alert-border-radius: 0 !default; //$border-radius !default; -$alert-link-font-weight: $font-weight-bold !default; -$alert-border-width: 0 !default; //$border-width !default; -$alert-bg-scale: -80% !default; -$alert-border-scale: -70% !default; -$alert-color-scale: 40% !default; -$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side -// scss-docs-end alert-variables - - -// Progress bars - -// scss-docs-start progress-variables -$progress-height: 1rem !default; -$progress-font-size: $font-size-base * .75 !default; -$progress-bg: $gray-200 !default; -$progress-border-radius: $border-radius !default; -$progress-box-shadow: $box-shadow-inset !default; -$progress-bar-color: $white !default; -$progress-bar-bg: $primary !default; -$progress-bar-animation-timing: 1s linear infinite !default; -$progress-bar-transition: width .6s ease !default; -// scss-docs-end progress-variables - - -// List group - -// scss-docs-start list-group-variables -$list-group-color: $gray-900 !default; -$list-group-bg: $white !default; -$list-group-border-color: rgba($black, .125) !default; -$list-group-border-width: $border-width !default; -$list-group-border-radius: $border-radius !default; - -$list-group-item-padding-y: $spacer / 2 !default; -$list-group-item-padding-x: $spacer !default; -$list-group-item-bg-scale: -80% !default; -$list-group-item-color-scale: 40% !default; - -$list-group-hover-bg: $gray-100 !default; -$list-group-active-color: $component-active-color !default; -$list-group-active-bg: $component-active-bg !default; -$list-group-active-border-color: $list-group-active-bg !default; - -$list-group-disabled-color: $gray-600 !default; -$list-group-disabled-bg: $list-group-bg !default; - -$list-group-action-color: $gray-700 !default; -$list-group-action-hover-color: $list-group-action-color !default; - -$list-group-action-active-color: $body-color !default; -$list-group-action-active-bg: $gray-200 !default; -// scss-docs-end list-group-variables - - -// Image thumbnails - -// scss-docs-start thumbnail-variables -$thumbnail-padding: .25rem !default; -$thumbnail-bg: $body-bg !default; -$thumbnail-border-width: $border-width !default; -$thumbnail-border-color: $gray-300 !default; -$thumbnail-border-radius: $border-radius !default; -$thumbnail-box-shadow: $box-shadow-sm !default; -// scss-docs-end thumbnail-variables - - -// Figures - -// scss-docs-start figure-variables -$figure-caption-font-size: $small-font-size !default; -$figure-caption-color: $gray-600 !default; -// scss-docs-end figure-variables - - -// Breadcrumbs - -// scss-docs-start breadcrumb-variables -$breadcrumb-font-size: null !default; -$breadcrumb-padding-y: 0 !default; -$breadcrumb-padding-x: 0 !default; -$breadcrumb-item-padding-x: .5rem !default; -$breadcrumb-margin-bottom: 1rem !default; -$breadcrumb-bg: null !default; -$breadcrumb-divider-color: $gray-600 !default; -$breadcrumb-active-color: $gray-600 !default; -$breadcrumb-divider: quote("/") !default; -$breadcrumb-divider-flipped: $breadcrumb-divider !default; -$breadcrumb-border-radius: null !default; -// scss-docs-end breadcrumb-variables - -// Carousel - -// scss-docs-start carousel-variables -$carousel-control-color: $white !default; -$carousel-control-width: 15% !default; -$carousel-control-opacity: .5 !default; -$carousel-control-hover-opacity: .9 !default; -$carousel-control-transition: opacity .15s ease !default; - -$carousel-indicator-width: 30px !default; -$carousel-indicator-height: 3px !default; -$carousel-indicator-hit-area-height: 10px !default; -$carousel-indicator-spacer: 3px !default; -$carousel-indicator-opacity: .5 !default; -$carousel-indicator-active-bg: $white !default; -$carousel-indicator-active-opacity: 1 !default; -$carousel-indicator-transition: opacity .6s ease !default; - -$carousel-caption-width: 70% !default; -$carousel-caption-color: $white !default; -$carousel-caption-padding-y: 1.25rem !default; -$carousel-caption-spacer: 1.25rem !default; - -$carousel-control-icon-width: 2rem !default; - -$carousel-control-prev-icon-bg: url("data:image/svg+xml,") !default; -$carousel-control-next-icon-bg: url("data:image/svg+xml,") !default; - -$carousel-transition-duration: .6s !default; -$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`) - -$carousel-dark-indicator-active-bg: $black !default; -$carousel-dark-caption-color: $black !default; -$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default; -// scss-docs-end carousel-variables - - -// Spinners - -// scss-docs-start spinner-variables -$spinner-width: 2rem !default; -$spinner-height: $spinner-width !default; -$spinner-vertical-align: -.125em !default; -$spinner-border-width: .25em !default; -$spinner-animation-speed: .75s !default; - -$spinner-width-sm: 1rem !default; -$spinner-height-sm: $spinner-width-sm !default; -$spinner-border-width-sm: .2em !default; -// scss-docs-end spinner-variables - - -// Close - -// scss-docs-start close-variables -$btn-close-width: 1em !default; -$btn-close-height: $btn-close-width !default; -$btn-close-padding-x: .25em !default; -$btn-close-padding-y: $btn-close-padding-x !default; -$btn-close-color: $black !default; -$btn-close-bg: url("data:image/svg+xml,") !default; -$btn-close-focus-shadow: $input-btn-focus-box-shadow !default; -$btn-close-opacity: .5 !default; -$btn-close-hover-opacity: .75 !default; -$btn-close-focus-opacity: 1 !default; -$btn-close-disabled-opacity: .25 !default; -$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default; -// scss-docs-end close-variables - - -// Offcanvas - -// scss-docs-start offcanvas-variables -$offcanvas-padding-y: $modal-inner-padding !default; -$offcanvas-padding-x: $modal-inner-padding !default; -$offcanvas-horizontal-width: 400px !default; -$offcanvas-vertical-height: 30vh !default; -$offcanvas-transition-duration: .3s !default; -$offcanvas-border-color: $modal-content-border-color !default; -$offcanvas-border-width: $modal-content-border-width !default; -$offcanvas-title-line-height: $modal-title-line-height !default; -$offcanvas-bg-color: $modal-content-bg !default; -$offcanvas-color: $modal-content-color !default; -$offcanvas-box-shadow: $modal-content-box-shadow-xs !default; -// scss-docs-end offcanvas-variables - -// Code - -$code-font-size: $small-font-size !default; -$code-color: $pink !default; - -$kbd-padding-y: .2rem !default; -$kbd-padding-x: .4rem !default; -$kbd-font-size: $code-font-size !default; -$kbd-color: $white !default; -$kbd-bg: $gray-900 !default; - -$pre-color: null !default; +$alert-border-radius: 0; //$border-radius !default; +$alert-border-width: 0; //$border-width !default; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/_custom.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/_custom.scss deleted file mode 100644 index e44fdebcc..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/_custom.scss +++ /dev/null @@ -1,190 +0,0 @@ -/* - * NOTE 2021.04 - * scss/chill.scss is the main sass file for the new chill.2 - * scratch will be replaced by bootstrap, please avoid to edit in modules/scratch/_custom.scss - */ - -// YOUR CUSTOM SCSS -@import 'custom/config/colors'; -@import 'custom/config/variables'; -@import 'custom/fonts'; -@import 'custom/timeline'; -@import 'custom/mixins/entity'; -@import 'custom/report'; -@import 'custom/person'; -@import 'custom/pagination'; -@import 'custom/custom-fields'; -@import 'custom/address'; -@import 'custom/record_actions'; -@import 'custom/flash_messages'; -@import 'custom/box'; - - -html,body { - min-height:100%; - font-family: 'Open Sans'; -} - -header { - position: relative; -} - -#content_conainter { - position: relative; - min-height: calc(100% - 145px); -} - -#content_conainter:before { - bottom: 0; - content: ""; - left: 0; - opacity: 0.1; - position: absolute; - right: 0; - top: 0; - z-index: -1; - //background-image: url('./../../img/background/desert.jpg'); - background-attachment: fixed; - background-repeat: no-repeat; - background-size: cover; - background-position: center; -} - -/* CUSTOM FIELDS -> */ -.cf-title { - font-size: 2em; -} - -.cf-subtitle { - font-size: 1.5em; -} -/* <- CUSTOM FIELDS */ - -@each $len in 11, 15 { - ul.submenu.width-#{$len}-em { - min-width: #{$len}em; - } -} - -.content { - padding-top: 1em; - padding-bottom: 1em; -} - -.select2 { - width: 100%; -} - -ul.custom_fields.choice li { - list-style:none; -} - -.errors { - color: $red; -} - -.footer { - p { - font-family: 'Open Sans'; - font-weight: 300; - } - - a { - color: white; - text-decoration: underline; - } -} - -// inline time input -.time_compound { - input[type=text], select { - width: 4em; - display: inline-block; - text-align: center; - } - - .separator { - margin-left: 0.2em; - margin-right: 0.2em; - } -} - -.open_sansbold { - font-family: 'Open Sans'; - font-weight: bold; - -} - - -dd { - margin-left: 0; -} - -dt { - font-family: 'Open Sans'; - font-weight: 600; -} - - -/* INPUT CLASS -> */ -div.input_with_post_text { - display: flex; - align-items: center; -} - -div.input_with_post_text span.post_text { - flex: 1; - margin-left: 0.5em; -} -div.input_with_post_text input { - width: 70%; - display: inline-block; - flex: 2; -} -/* <- INPUT CLASS */ - -dl.chill_report_view_data, -dl.chill_view_data { - - dt { - margin-top: 1.5em; - color: $chill-blue; - } - - dd { - padding-left: 1.5em; - margin-top: 0.2em; - - ul { - padding-left: 0; - } - } - -} - -blockquote.chill-user-quote, -div.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; - - blockquote { - margin: 1.5em 10px; - padding: 0.5em 10px; - } - - blockquote:before { - color: #ccc; - content: open-quote; - font-size: 4em; - line-height: 0.1em; - margin-right: 0.25em; - vertical-align: -0.4em; - } -} - -.chill-no-data-statement { - font-style: italic; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_buttons.scss deleted file mode 100644 index 00b61968c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_buttons.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Buttons -$button-font-size : 15px !default; -$button-text-color : #000 !default; -$button-text-weight : 300 !default; -$button-padding : 8px 12px !default; -$button-background : #eee !default; -$button-margin : 5px !default; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_colors.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_colors.scss deleted file mode 100644 index 9c200db0f..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_colors.scss +++ /dev/null @@ -1,64 +0,0 @@ -// BODY -$body-background : #fff !default; - -// PLAIN TEXT -$text-color : #555 !default; - -// HEADINGS -$headings-color : #404040 !default; - -// LINKS -$link-color : #6998C9 !default; -$link-visited-color : #808080 !default; -$link-active-color : shade(red,5%) !default; -$link-hover-color : #007ED5 !default; -$link-focus-color : $link-color !default; - -$white : #fff !default; -$black : #000 !default; -$orange : #FF622C !default; -$red : #C83D3D !default; -$green : #27806f !default; -$blue : #2980b9 !default; -$yellow : #FFC82C !default; - -$light-blue : #4995C7; -$llight-blue : #72B0D9; -$dark-blue : #096EB0 !default; -$ddark-blue : #07507F !default; - -$light-green : #419484 !default; -$llight-green : #6CB3A5 !default; - -$warning-bg : $orange !default; -$caution-bg : $red !default; -$error-bg : $red !default; -$success-bg : $green !default; -$info-bg : $blue !default; - -$grey-95 : lighten($black, 5%) !default; -$grey-90 : lighten($black, 10%) !default; -$grey-85 : lighten($black, 15%) !default; -$grey-80 : lighten($black, 20%) !default; -$grey-75 : lighten($black, 25%) !default; -$grey-70 : lighten($black, 30%) !default; -$grey-65 : lighten($black, 35%) !default; -$grey-60 : lighten($black, 40%) !default; -$grey-55 : lighten($black, 45%) !default; -$grey-50 : lighten($black, 50%) !default; -$grey-45 : lighten($black, 55%) !default; -$grey-40 : lighten($black, 60%) !default; -$grey-35 : lighten($black, 65%) !default; -$grey-30 : lighten($black, 70%) !default; -$grey-25 : lighten($black, 75%) !default; -$grey-20 : lighten($black, 80%) !default; -$grey-15 : lighten($black, 85%) !default; -$grey-10 : lighten($black, 90%) !default; -$grey-5 : lighten($black, 95%) !default; - - -$dark-grey: $grey-80; //#333; -$medium-grey: $grey-50; //#999; -$light-grey: $grey-20; //#DDD; - -@import "../custom/config/colors"; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_variables.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_variables.scss deleted file mode 100644 index 09840d957..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/config/_variables.scss +++ /dev/null @@ -1,115 +0,0 @@ -// Typography -//$sans-serif: $helvetica; -//$serif: $georgia; -//$base-font-family: $sans-serif; -//$header-font-family: $base-font-family; - -// Font Sizes -$base-font-size: 1em; -$h1-font-size: $base-font-size * 2.25; -$h2-font-size: $base-font-size * 2; -$h3-font-size: $base-font-size * 1.75; -$h4-font-size: $base-font-size * 1.5; -$h5-font-size: $base-font-size * 1.25; -$h6-font-size: $base-font-size; - -// Line height -$base-line-height: 1.5; -$header-line-height: 1.25; - -// Other Sizes -$base-border-radius: 3px; -$base-spacing: $base-line-height * 1em; -$base-z-index: 0; - -// Background Color -$base-background-color: white; - -// Font Colors -$base-font-color: $dark-grey; -$base-accent-color: $blue; - -// Link Colors -$base-link-color: $base-accent-color; -$hover-link-color: darken($base-accent-color, 15); -$base-button-color: $base-link-color; -$hover-button-color: $hover-link-color; - -/* -// Flash Colors -$alert-color: $light-yellow; -$error-color: $light-red; -$notice-color: lighten($base-accent-color, 40); -$success-color: $light-green; -*/ - -// Border color -$base-border-color: $light-grey; -$base-border: 1px solid $base-border-color; - -// Footer -$footer-background: $grey-50;//-blue;// desaturate(darken($base-accent-color, 20), 30); -$footer-color: white; -$footer-link-color: transparentize($footer-color, .6); -$footer-disclaimer-color: transparentize($footer-color, .6); -$footer-vertical-padding: 0; - -// Forms -$form-border-size: 1px; -$form-border-color: $base-border-color; -$form-border-color-hover: darken($base-border-color, 10); -$form-border-color-focus: $base-accent-color; -$form-border-radius: $base-border-radius; -$form-box-shadow: inset 0 1px 3px rgba(black,0.06); -$form-box-shadow-focus: $form-box-shadow, 0 0 5px rgba(darken($form-border-color-focus, 5), 0.7); -$form-font-size: $base-font-size; -//$form-font-family: $base-font-family; - -// Navigation -$navigation-background: $dark-grey; -$navigation-color: transparentize(white, 0.3); -$navigation-color-hover: white; -$navigation-height: 60px; -$navigation-active-link-color: transparentize(white, 0.5); -$navigation-submenu-padding: 1em; -$navigation-submenu-width: 12em; -$navigation-border-radius: $base-border-radius; -$navigation-first-padding-top: 1em; -$navigation-last-padding-bottom: 0.7em; -$navigation-more-pin: '\25BE'; -$navigation-more-pin-color: $navigation-color; -$navigation-ul-submenu-top: 1.5em; -$navigation-ul-submenu-padding-left: 0; -$navigation-search-padding: .85em .6em; -$navigation-border-bottom: 1px solid darken($navigation-background, 10); - -//Table -$table-width: 100%; - -$table-head-bg-color: $orange; -$table-head-td-border: unset; -$table-head-td-text-align: center; -$table-head-td-padding: 0.3em; -$table-head-text-color: $white; - -$table-body-tr-bg-color-even: $grey-5; -$table-body-tr-bg-color-odd: unset; -$table-body-td-border: unset; -$table-body-td-text-align: left; -$table-body-td-padding: 0.3em; -$table-body-text-color: unset; - -//Tabs -$tabs-nav-margin-bottom: none; -$tabs-nav-title-bg-color: $blue; -$tabs-nav-title-text-color: $white; -$tabs-nav-title-padding: 0.5em 0.5em 0.5em 1em; -$tabs-nav-bg-color: none; -$tabs-nav-text-color: inherit; -$tabs-new-border: 3px solid transparent; -$tabs-nav-hover-border: 3px solid $orange; -$tabs-nav-hover-text-color: inherit; -$tabs-nav-font-family: unset; -$tabs-nav-padding: 0.5em 0.5em 0.5em 1.5em; - -@import "../custom/config/variables"; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon-deprecated-upcoming.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon-deprecated-upcoming.scss deleted file mode 100644 index e6d1b8cec..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon-deprecated-upcoming.scss +++ /dev/null @@ -1,411 +0,0 @@ -// The following features have been deprecated and will be removed in the next MAJOR version release - -@mixin inline-block { - display: inline-block; - - @warn "The inline-block mixin is deprecated and will be removed in the next major version release"; -} - -@mixin button ($style: simple, $base-color: #4294f0, $text-size: inherit, $padding: 7px 18px) { - - @if type-of($style) == string and type-of($base-color) == color { - @include buttonstyle($style, $base-color, $text-size, $padding); - } - - @if type-of($style) == string and type-of($base-color) == number { - $padding: $text-size; - $text-size: $base-color; - $base-color: #4294f0; - - @if $padding == inherit { - $padding: 7px 18px; - } - - @include buttonstyle($style, $base-color, $text-size, $padding); - } - - @if type-of($style) == color and type-of($base-color) == color { - $base-color: $style; - $style: simple; - @include buttonstyle($style, $base-color, $text-size, $padding); - } - - @if type-of($style) == color and type-of($base-color) == number { - $padding: $text-size; - $text-size: $base-color; - $base-color: $style; - $style: simple; - - @if $padding == inherit { - $padding: 7px 18px; - } - - @include buttonstyle($style, $base-color, $text-size, $padding); - } - - @if type-of($style) == number { - $padding: $base-color; - $text-size: $style; - $base-color: #4294f0; - $style: simple; - - @if $padding == #4294f0 { - $padding: 7px 18px; - } - - @include buttonstyle($style, $base-color, $text-size, $padding); - } - - &:disabled { - cursor: not-allowed; - opacity: 0.5; - } - - @warn "The button mixin is deprecated and will be removed in the next major version release"; -} - -// Selector Style Button -@mixin buttonstyle($type, $b-color, $t-size, $pad) { - // Grayscale button - @if $type == simple and $b-color == grayscale($b-color) { - @include simple($b-color, true, $t-size, $pad); - } - - @if $type == shiny and $b-color == grayscale($b-color) { - @include shiny($b-color, true, $t-size, $pad); - } - - @if $type == pill and $b-color == grayscale($b-color) { - @include pill($b-color, true, $t-size, $pad); - } - - @if $type == flat and $b-color == grayscale($b-color) { - @include flat($b-color, true, $t-size, $pad); - } - - // Colored button - @if $type == simple { - @include simple($b-color, false, $t-size, $pad); - } - - @else if $type == shiny { - @include shiny($b-color, false, $t-size, $pad); - } - - @else if $type == pill { - @include pill($b-color, false, $t-size, $pad); - } - - @else if $type == flat { - @include flat($b-color, false, $t-size, $pad); - } -} - -// Simple Button -@mixin simple($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) { - $color: hsl(0, 0, 100%); - $border: adjust-color($base-color, $saturation: 9%, $lightness: -14%); - $inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%); - $stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%); - $text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%); - - @if is-light($base-color) { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border: grayscale($border); - $inset-shadow: grayscale($inset-shadow); - $stop-gradient: grayscale($stop-gradient); - $text-shadow: grayscale($text-shadow); - } - - border: 1px solid $border; - border-radius: 3px; - box-shadow: inset 0 1px 0 0 $inset-shadow; - color: $color; - display: inline-block; - font-size: $textsize; - font-weight: bold; - @include linear-gradient ($base-color, $stop-gradient); - padding: $padding; - text-decoration: none; - text-shadow: 0 1px 0 $text-shadow; - background-clip: padding-box; - - &:hover:not(:disabled) { - $base-color-hover: adjust-color($base-color, $saturation: -4%, $lightness: -5%); - $inset-shadow-hover: adjust-color($base-color, $saturation: -7%, $lightness: 5%); - $stop-gradient-hover: adjust-color($base-color, $saturation: 8%, $lightness: -14%); - - @if $grayscale == true { - $base-color-hover: grayscale($base-color-hover); - $inset-shadow-hover: grayscale($inset-shadow-hover); - $stop-gradient-hover: grayscale($stop-gradient-hover); - } - - @include linear-gradient ($base-color-hover, $stop-gradient-hover); - - box-shadow: inset 0 1px 0 0 $inset-shadow-hover; - cursor: pointer; - } - - &:active:not(:disabled), - &:focus:not(:disabled) { - $border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%); - $inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%); - - @if $grayscale == true { - $border-active: grayscale($border-active); - $inset-shadow-active: grayscale($inset-shadow-active); - } - - border: 1px solid $border-active; - box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active; - } -} - -// Shiny Button -@mixin shiny($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) { - $color: hsl(0, 0, 100%); - $border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81); - $border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122); - $fourth-stop: adjust-color($base-color, $red: -79, $green: -70, $blue: -46); - $inset-shadow: adjust-color($base-color, $red: 37, $green: 29, $blue: 12); - $second-stop: adjust-color($base-color, $red: -56, $green: -50, $blue: -33); - $text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114); - $third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48); - - @if is-light($base-color) { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border: grayscale($border); - $border-bottom: grayscale($border-bottom); - $fourth-stop: grayscale($fourth-stop); - $inset-shadow: grayscale($inset-shadow); - $second-stop: grayscale($second-stop); - $text-shadow: grayscale($text-shadow); - $third-stop: grayscale($third-stop); - } - - @include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%); - - border: 1px solid $border; - border-bottom: 1px solid $border-bottom; - border-radius: 5px; - box-shadow: inset 0 1px 0 0 $inset-shadow; - color: $color; - display: inline-block; - font-size: $textsize; - font-weight: bold; - padding: $padding; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 1px $text-shadow; - - &:hover:not(:disabled) { - $first-stop-hover: adjust-color($base-color, $red: -13, $green: -15, $blue: -18); - $second-stop-hover: adjust-color($base-color, $red: -66, $green: -62, $blue: -51); - $third-stop-hover: adjust-color($base-color, $red: -93, $green: -85, $blue: -66); - $fourth-stop-hover: adjust-color($base-color, $red: -86, $green: -80, $blue: -63); - - @if $grayscale == true { - $first-stop-hover: grayscale($first-stop-hover); - $second-stop-hover: grayscale($second-stop-hover); - $third-stop-hover: grayscale($third-stop-hover); - $fourth-stop-hover: grayscale($fourth-stop-hover); - } - - @include linear-gradient(top, $first-stop-hover 0%, - $second-stop-hover 50%, - $third-stop-hover 50%, - $fourth-stop-hover 100%); - cursor: pointer; - } - - &:active:not(:disabled), - &:focus:not(:disabled) { - $inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122); - - @if $grayscale == true { - $inset-shadow-active: grayscale($inset-shadow-active); - } - - box-shadow: inset 0 0 20px 0 $inset-shadow-active; - } -} - -// Pill Button -@mixin pill($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) { - $color: hsl(0, 0, 100%); - $border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%); - $border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%); - $border-top: adjust-color($base-color, $hue: -1, $saturation: -30%, $lightness: -15%); - $inset-shadow: adjust-color($base-color, $hue: -1, $saturation: -1%, $lightness: 7%); - $stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%); - $text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%); - - @if is-light($base-color) { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border-bottom: grayscale($border-bottom); - $border-sides: grayscale($border-sides); - $border-top: grayscale($border-top); - $inset-shadow: grayscale($inset-shadow); - $stop-gradient: grayscale($stop-gradient); - $text-shadow: grayscale($text-shadow); - } - - border: 1px solid $border-top; - border-color: $border-top $border-sides $border-bottom; - border-radius: 16px; - box-shadow: inset 0 1px 0 0 $inset-shadow; - color: $color; - display: inline-block; - font-size: $textsize; - font-weight: normal; - line-height: 1; - @include linear-gradient ($base-color, $stop-gradient); - padding: $padding; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 1px $text-shadow; - background-clip: padding-box; - - &:hover:not(:disabled) { - $base-color-hover: adjust-color($base-color, $lightness: -4.5%); - $border-bottom: adjust-color($base-color, $hue: 8, $saturation: 13.5%, $lightness: -32%); - $border-sides: adjust-color($base-color, $hue: 4, $saturation: -2%, $lightness: -27%); - $border-top: adjust-color($base-color, $hue: -1, $saturation: -17%, $lightness: -21%); - $inset-shadow-hover: adjust-color($base-color, $saturation: -1%, $lightness: 3%); - $stop-gradient-hover: adjust-color($base-color, $hue: 8, $saturation: -4%, $lightness: -15.5%); - $text-shadow-hover: adjust-color($base-color, $hue: 5, $saturation: -5%, $lightness: -22%); - - @if $grayscale == true { - $base-color-hover: grayscale($base-color-hover); - $border-bottom: grayscale($border-bottom); - $border-sides: grayscale($border-sides); - $border-top: grayscale($border-top); - $inset-shadow-hover: grayscale($inset-shadow-hover); - $stop-gradient-hover: grayscale($stop-gradient-hover); - $text-shadow-hover: grayscale($text-shadow-hover); - } - - @include linear-gradient ($base-color-hover, $stop-gradient-hover); - - background-clip: padding-box; - border: 1px solid $border-top; - border-color: $border-top $border-sides $border-bottom; - box-shadow: inset 0 1px 0 0 $inset-shadow-hover; - cursor: pointer; - text-shadow: 0 -1px 1px $text-shadow-hover; - } - - &:active:not(:disabled), - &:focus:not(:disabled) { - $active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%); - $border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%); - $border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%); - $inset-shadow-active: adjust-color($base-color, $hue: 9, $saturation: 2%, $lightness: -21.5%); - $text-shadow-active: adjust-color($base-color, $hue: 5, $saturation: -12%, $lightness: -21.5%); - - @if $grayscale == true { - $active-color: grayscale($active-color); - $border-active: grayscale($border-active); - $border-bottom-active: grayscale($border-bottom-active); - $inset-shadow-active: grayscale($inset-shadow-active); - $text-shadow-active: grayscale($text-shadow-active); - } - - background: $active-color; - border: 1px solid $border-active; - border-bottom: 1px solid $border-bottom-active; - box-shadow: inset 0 0 6px 3px $inset-shadow-active; - text-shadow: 0 -1px 1px $text-shadow-active; - } -} - -// Flat Button -@mixin flat($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) { - $color: hsl(0, 0, 100%); - - @if is-light($base-color) { - $color: hsl(0, 0, 20%); - } - - background-color: $base-color; - border-radius: 3px; - border: 0; - color: $color; - display: inline-block; - font-size: $textsize; - font-weight: bold; - padding: $padding; - text-decoration: none; - background-clip: padding-box; - - &:hover:not(:disabled){ - $base-color-hover: adjust-color($base-color, $saturation: 4%, $lightness: 5%); - - @if $grayscale == true { - $base-color-hover: grayscale($base-color-hover); - } - - background-color: $base-color-hover; - cursor: pointer; - } - - &:active:not(:disabled), - &:focus:not(:disabled) { - $base-color-active: adjust-color($base-color, $saturation: -4%, $lightness: -5%); - - @if $grayscale == true { - $base-color-active: grayscale($base-color-active); - } - - background-color: $base-color-active; - cursor: pointer; - } -} - -// Flexible grid -@function flex-grid($columns, $container-columns: $fg-max-columns) { - $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; - $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; - @return percentage($width / $container-width); - - @warn "The flex-grid function is deprecated and will be removed in the next major version release"; -} - -// Flexible gutter -@function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { - $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; - @return percentage($gutter / $container-width); - - @warn "The flex-gutter function is deprecated and will be removed in the next major version release"; -} - -@function grid-width($n) { - @return $n * $gw-column + ($n - 1) * $gw-gutter; - - @warn "The grid-width function is deprecated and will be removed in the next major version release"; -} - -@function golden-ratio($value, $increment) { - @return modular-scale($increment, $value, $ratio: $golden); - - @warn "The golden-ratio function is deprecated and will be removed in the next major version release. Please use the modular-scale function, instead."; -} - -@mixin box-sizing($box) { - @include prefixer(box-sizing, $box, webkit moz spec); - - @warn "The box-sizing mixin is deprecated and will be removed in the next major version release. This property can now be used un-prefixed."; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon.scss deleted file mode 100644 index 509fcc10e..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/_bourbon.scss +++ /dev/null @@ -1,87 +0,0 @@ -// Bourbon 4.2.6 -// http://bourbon.io -// Copyright 2011-2015 thoughtbot, inc. -// MIT License - -@import "settings/prefixer"; -@import "settings/px-to-em"; -@import "settings/asset-pipeline"; - -@import "functions/assign-inputs"; -@import "functions/contains"; -@import "functions/contains-falsy"; -@import "functions/is-length"; -@import "functions/is-light"; -@import "functions/is-number"; -@import "functions/is-size"; -@import "functions/px-to-em"; -@import "functions/px-to-rem"; -@import "functions/shade"; -@import "functions/strip-units"; -@import "functions/tint"; -@import "functions/transition-property-name"; -@import "functions/unpack"; -@import "functions/modular-scale"; - -@import "helpers/convert-units"; -@import "helpers/directional-values"; -@import "helpers/font-source-declaration"; -@import "helpers/gradient-positions-parser"; -@import "helpers/linear-angle-parser"; -@import "helpers/linear-gradient-parser"; -@import "helpers/linear-positions-parser"; -@import "helpers/linear-side-corner-parser"; -@import "helpers/radial-arg-parser"; -@import "helpers/radial-positions-parser"; -@import "helpers/radial-gradient-parser"; -@import "helpers/render-gradients"; -@import "helpers/shape-size-stripper"; -@import "helpers/str-to-num"; - -@import "css3/animation"; -@import "css3/appearance"; -@import "css3/backface-visibility"; -@import "css3/background"; -@import "css3/background-image"; -@import "css3/border-image"; -@import "css3/calc"; -@import "css3/columns"; -@import "css3/filter"; -@import "css3/flex-box"; -@import "css3/font-face"; -@import "css3/font-feature-settings"; -@import "css3/hidpi-media-query"; -@import "css3/hyphens"; -@import "css3/image-rendering"; -@import "css3/keyframes"; -@import "css3/linear-gradient"; -@import "css3/perspective"; -@import "css3/placeholder"; -@import "css3/radial-gradient"; -@import "css3/selection"; -@import "css3/text-decoration"; -@import "css3/transform"; -@import "css3/transition"; -@import "css3/user-select"; - -@import "addons/border-color"; -@import "addons/border-radius"; -@import "addons/border-style"; -@import "addons/border-width"; -@import "addons/buttons"; -@import "addons/clearfix"; -@import "addons/ellipsis"; -@import "addons/font-stacks"; -@import "addons/hide-text"; -@import "addons/margin"; -@import "addons/padding"; -@import "addons/position"; -@import "addons/prefixer"; -@import "addons/retina-image"; -@import "addons/size"; -@import "addons/text-inputs"; -@import "addons/timing-functions"; -@import "addons/triangle"; -@import "addons/word-wrap"; - -@import "bourbon-deprecated-upcoming"; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-color.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-color.scss deleted file mode 100644 index 6f6ab36c4..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-color.scss +++ /dev/null @@ -1,26 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `border-color` on specific sides of a box. Use a `null` value to “skip” a side. -/// -/// @param {Arglist} $vals -/// List of arguments -/// -/// @example scss - Usage -/// .element { -/// @include border-color(#a60b55 #76cd9c null #e8ae1a); -/// } -/// -/// @example css - CSS Output -/// .element { -/// border-left-color: #e8ae1a; -/// border-right-color: #76cd9c; -/// border-top-color: #a60b55; -/// } -/// -/// @require {mixin} directional-property -/// -/// @output `border-color` - -@mixin border-color($vals...) { - @include directional-property(border, color, $vals...); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-radius.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-radius.scss deleted file mode 100644 index 1f6586335..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-radius.scss +++ /dev/null @@ -1,48 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `border-radius` on both corners on the side of a box. -/// -/// @param {Number} $radii -/// List of arguments -/// -/// @example scss - Usage -/// .element-one { -/// @include border-top-radius(5px); -/// } -/// -/// .element-two { -/// @include border-left-radius(3px); -/// } -/// -/// @example css - CSS Output -/// .element-one { -/// border-top-left-radius: 5px; -/// border-top-right-radius: 5px; -/// } -/// -/// .element-two { -/// border-bottom-left-radius: 3px; -/// border-top-left-radius: 3px; -/// } -/// -/// @output `border-radius` - -@mixin border-top-radius($radii) { - border-top-left-radius: $radii; - border-top-right-radius: $radii; -} - -@mixin border-right-radius($radii) { - border-bottom-right-radius: $radii; - border-top-right-radius: $radii; -} - -@mixin border-bottom-radius($radii) { - border-bottom-left-radius: $radii; - border-bottom-right-radius: $radii; -} - -@mixin border-left-radius($radii) { - border-bottom-left-radius: $radii; - border-top-left-radius: $radii; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-style.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-style.scss deleted file mode 100644 index d86ee79d9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-style.scss +++ /dev/null @@ -1,25 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `border-style` on specific sides of a box. Use a `null` value to “skip” a side. -/// -/// @param {Arglist} $vals -/// List of arguments -/// -/// @example scss - Usage -/// .element { -/// @include border-style(dashed null solid); -/// } -/// -/// @example css - CSS Output -/// .element { -/// border-bottom-style: solid; -/// border-top-style: dashed; -/// } -/// -/// @require {mixin} directional-property -/// -/// @output `border-style` - -@mixin border-style($vals...) { - @include directional-property(border, style, $vals...); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-width.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-width.scss deleted file mode 100644 index 0ea2d4b71..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_border-width.scss +++ /dev/null @@ -1,25 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `border-width` on specific sides of a box. Use a `null` value to “skip” a side. -/// -/// @param {Arglist} $vals -/// List of arguments -/// -/// @example scss - Usage -/// .element { -/// @include border-width(1em null 20px); -/// } -/// -/// @example css - CSS Output -/// .element { -/// border-bottom-width: 20px; -/// border-top-width: 1em; -/// } -/// -/// @require {mixin} directional-property -/// -/// @output `border-width` - -@mixin border-width($vals...) { - @include directional-property(border, width, $vals...); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_buttons.scss deleted file mode 100644 index debeabc53..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_buttons.scss +++ /dev/null @@ -1,64 +0,0 @@ -@charset "UTF-8"; - -/// Generates variables for all buttons. Please note that you must use interpolation on the variable: `#{$all-buttons}`. -/// -/// @example scss - Usage -/// #{$all-buttons} { -/// background-color: #f00; -/// } -/// -/// #{$all-buttons-focus}, -/// #{$all-buttons-hover} { -/// background-color: #0f0; -/// } -/// -/// #{$all-buttons-active} { -/// background-color: #00f; -/// } -/// -/// @example css - CSS Output -/// button, -/// input[type="button"], -/// input[type="reset"], -/// input[type="submit"] { -/// background-color: #f00; -/// } -/// -/// button:focus, -/// input[type="button"]:focus, -/// input[type="reset"]:focus, -/// input[type="submit"]:focus, -/// button:hover, -/// input[type="button"]:hover, -/// input[type="reset"]:hover, -/// input[type="submit"]:hover { -/// background-color: #0f0; -/// } -/// -/// button:active, -/// input[type="button"]:active, -/// input[type="reset"]:active, -/// input[type="submit"]:active { -/// background-color: #00f; -/// } -/// -/// @require assign-inputs -/// -/// @type List -/// -/// @todo Remove double assigned variables (Lines 59–62) in v5.0.0 - -$buttons-list: 'button', - 'input[type="button"]', - 'input[type="reset"]', - 'input[type="submit"]'; - -$all-buttons: assign-inputs($buttons-list); -$all-buttons-active: assign-inputs($buttons-list, active); -$all-buttons-focus: assign-inputs($buttons-list, focus); -$all-buttons-hover: assign-inputs($buttons-list, hover); - -$all-button-inputs: $all-buttons; -$all-button-inputs-active: $all-buttons-active; -$all-button-inputs-focus: $all-buttons-focus; -$all-button-inputs-hover: $all-buttons-hover; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_clearfix.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_clearfix.scss deleted file mode 100644 index 11313d66f..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_clearfix.scss +++ /dev/null @@ -1,25 +0,0 @@ -@charset "UTF-8"; - -/// Provides an easy way to include a clearfix for containing floats. -/// -/// @link http://cssmojo.com/latest_new_clearfix_so_far/ -/// -/// @example scss - Usage -/// .element { -/// @include clearfix; -/// } -/// -/// @example css - CSS Output -/// .element::after { -/// clear: both; -/// content: ""; -/// display: table; -/// } - -@mixin clearfix { - &::after { - clear: both; - content: ""; - display: table; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_ellipsis.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_ellipsis.scss deleted file mode 100644 index a367f651c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_ellipsis.scss +++ /dev/null @@ -1,30 +0,0 @@ -@charset "UTF-8"; - -/// Truncates text and adds an ellipsis to represent overflow. -/// -/// @param {Number} $width [100%] -/// Max-width for the string to respect before being truncated -/// -/// @example scss - Usage -/// .element { -/// @include ellipsis; -/// } -/// -/// @example css - CSS Output -/// .element { -/// display: inline-block; -/// max-width: 100%; -/// overflow: hidden; -/// text-overflow: ellipsis; -/// white-space: nowrap; -/// word-wrap: normal; -/// } - -@mixin ellipsis($width: 100%) { - display: inline-block; - max-width: $width; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - word-wrap: normal; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_font-stacks.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_font-stacks.scss deleted file mode 100644 index 57128f422..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_font-stacks.scss +++ /dev/null @@ -1,31 +0,0 @@ -@charset "UTF-8"; - -/// Georgia font stack. -/// -/// @type List - -$georgia: "Georgia", "Cambria", "Times New Roman", "Times", serif; - -/// Helvetica font stack. -/// -/// @type List - -$helvetica: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; - -/// Lucida Grande font stack. -/// -/// @type List - -$lucida-grande: "Lucida Grande", "Tahoma", "Verdana", "Arial", sans-serif; - -/// Monospace font stack. -/// -/// @type List - -$monospace: "Bitstream Vera Sans Mono", "Consolas", "Courier", monospace; - -/// Verdana font stack. -/// -/// @type List - -$verdana: "Verdana", "Geneva", sans-serif; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_hide-text.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_hide-text.scss deleted file mode 100644 index 4caf20ed5..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_hide-text.scss +++ /dev/null @@ -1,27 +0,0 @@ -/// Hides the text in an element, commonly used to show an image. Some elements will need block-level styles applied. -/// -/// @link http://zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement -/// -/// @example scss - Usage -/// .element { -/// @include hide-text; -/// } -/// -/// @example css - CSS Output -/// .element { -/// overflow: hidden; -/// text-indent: 101%; -/// white-space: nowrap; -/// } -/// -/// @todo Remove height argument in v5.0.0 - -@mixin hide-text($height: null) { - overflow: hidden; - text-indent: 101%; - white-space: nowrap; - - @if $height { - @warn "The `hide-text` mixin has changed and no longer requires a height. The height argument will no longer be accepted in v5.0.0"; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_margin.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_margin.scss deleted file mode 100644 index 674f4e5f6..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_margin.scss +++ /dev/null @@ -1,26 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `margin` on specific sides of a box. Use a `null` value to “skip” a side. -/// -/// @param {Arglist} $vals -/// List of arguments -/// -/// @example scss - Usage -/// .element { -/// @include margin(null 10px 3em 20vh); -/// } -/// -/// @example css - CSS Output -/// .element { -/// margin-bottom: 3em; -/// margin-left: 20vh; -/// margin-right: 10px; -/// } -/// -/// @require {mixin} directional-property -/// -/// @output `margin` - -@mixin margin($vals...) { - @include directional-property(margin, false, $vals...); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_padding.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_padding.scss deleted file mode 100644 index 40a5f006b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_padding.scss +++ /dev/null @@ -1,26 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for targeting `padding` on specific sides of a box. Use a `null` value to “skip” a side. -/// -/// @param {Arglist} $vals -/// List of arguments -/// -/// @example scss - Usage -/// .element { -/// @include padding(12vh null 10px 5%); -/// } -/// -/// @example css - CSS Output -/// .element { -/// padding-bottom: 10px; -/// padding-left: 5%; -/// padding-top: 12vh; -/// } -/// -/// @require {mixin} directional-property -/// -/// @output `padding` - -@mixin padding($vals...) { - @include directional-property(padding, false, $vals...); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_position.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_position.scss deleted file mode 100644 index e460f3ffd..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_position.scss +++ /dev/null @@ -1,48 +0,0 @@ -@charset "UTF-8"; - -/// Provides a quick method for setting an element’s position. Use a `null` value to “skip” a side. -/// -/// @param {Position} $position [relative] -/// A CSS position value -/// -/// @param {Arglist} $coordinates [null null null null] -/// List of values that correspond to the 4-value syntax for the edges of a box -/// -/// @example scss - Usage -/// .element { -/// @include position(absolute, 0 null null 10em); -/// } -/// -/// @example css - CSS Output -/// .element { -/// left: 10em; -/// position: absolute; -/// top: 0; -/// } -/// -/// @require {function} is-length -/// @require {function} unpack - -@mixin position($position: relative, $coordinates: null null null null) { - @if type-of($position) == list { - $coordinates: $position; - $position: relative; - } - - $coordinates: unpack($coordinates); - - $offsets: ( - top: nth($coordinates, 1), - right: nth($coordinates, 2), - bottom: nth($coordinates, 3), - left: nth($coordinates, 4) - ); - - position: $position; - - @each $offset, $value in $offsets { - @if is-length($value) { - #{$offset}: $value; - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_prefixer.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_prefixer.scss deleted file mode 100644 index 2b6f73138..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_prefixer.scss +++ /dev/null @@ -1,66 +0,0 @@ -@charset "UTF-8"; - -/// A mixin for generating vendor prefixes on non-standardized properties. -/// -/// @param {String} $property -/// Property to prefix -/// -/// @param {*} $value -/// Value to use -/// -/// @param {List} $prefixes -/// Prefixes to define -/// -/// @example scss - Usage -/// .element { -/// @include prefixer(border-radius, 10px, webkit ms spec); -/// } -/// -/// @example css - CSS Output -/// .element { -/// -webkit-border-radius: 10px; -/// -moz-border-radius: 10px; -/// border-radius: 10px; -/// } -/// -/// @require {variable} $prefix-for-webkit -/// @require {variable} $prefix-for-mozilla -/// @require {variable} $prefix-for-microsoft -/// @require {variable} $prefix-for-opera -/// @require {variable} $prefix-for-spec - -@mixin prefixer($property, $value, $prefixes) { - @each $prefix in $prefixes { - @if $prefix == webkit { - @if $prefix-for-webkit { - -webkit-#{$property}: $value; - } - } @else if $prefix == moz { - @if $prefix-for-mozilla { - -moz-#{$property}: $value; - } - } @else if $prefix == ms { - @if $prefix-for-microsoft { - -ms-#{$property}: $value; - } - } @else if $prefix == o { - @if $prefix-for-opera { - -o-#{$property}: $value; - } - } @else if $prefix == spec { - @if $prefix-for-spec { - #{$property}: $value; - } - } @else { - @warn "Unrecognized prefix: #{$prefix}"; - } - } -} - -@mixin disable-prefix-for-all() { - $prefix-for-webkit: false !global; - $prefix-for-mozilla: false !global; - $prefix-for-microsoft: false !global; - $prefix-for-opera: false !global; - $prefix-for-spec: false !global; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_retina-image.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_retina-image.scss deleted file mode 100644 index 7febbd751..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_retina-image.scss +++ /dev/null @@ -1,25 +0,0 @@ -@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) { - @if $asset-pipeline { - background-image: image-url("#{$filename}.#{$extension}"); - } @else { - background-image: url("#{$filename}.#{$extension}"); - } - - @include hidpi { - @if $asset-pipeline { - @if $retina-filename { - background-image: image-url("#{$retina-filename}.#{$extension}"); - } @else { - background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}"); - } - } @else { - @if $retina-filename { - background-image: url("#{$retina-filename}.#{$extension}"); - } @else { - background-image: url("#{$filename}#{$retina-suffix}.#{$extension}"); - } - } - - background-size: $background-size; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_size.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_size.scss deleted file mode 100644 index a2992a34c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_size.scss +++ /dev/null @@ -1,51 +0,0 @@ -@charset "UTF-8"; - -/// Sets the `width` and `height` of the element. -/// -/// @param {List} $size -/// A list of at most 2 size values. -/// -/// If there is only a single value in `$size` it is used for both width and height. All units are supported. -/// -/// @example scss - Usage -/// .first-element { -/// @include size(2em); -/// } -/// -/// .second-element { -/// @include size(auto 10em); -/// } -/// -/// @example css - CSS Output -/// .first-element { -/// width: 2em; -/// height: 2em; -/// } -/// -/// .second-element { -/// width: auto; -/// height: 10em; -/// } -/// -/// @todo Refactor in 5.0.0 to use a comma-separated argument - -@mixin size($value) { - $width: nth($value, 1); - $height: $width; - - @if length($value) > 1 { - $height: nth($value, 2); - } - - @if is-size($height) { - height: $height; - } @else { - @warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin."; - } - - @if is-size($width) { - width: $width; - } @else { - @warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin."; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_text-inputs.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_text-inputs.scss deleted file mode 100644 index 1eb7a5451..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_text-inputs.scss +++ /dev/null @@ -1,113 +0,0 @@ -@charset "UTF-8"; - -/// Generates variables for all text-based inputs. Please note that you must use interpolation on the variable: `#{$all-text-inputs}`. -/// -/// @example scss - Usage -/// #{$all-text-inputs} { -/// border: 1px solid #f00; -/// } -/// -/// #{$all-text-inputs-focus}, -/// #{$all-text-inputs-hover} { -/// border: 1px solid #0f0; -/// } -/// -/// #{$all-text-inputs-active} { -/// border: 1px solid #00f; -/// } -/// -/// @example css - CSS Output -/// input[type="color"], -/// input[type="date"], -/// input[type="datetime"], -/// input[type="datetime-local"], -/// input[type="email"], -/// input[type="month"], -/// input[type="number"], -/// input[type="password"], -/// input[type="search"], -/// input[type="tel"], -/// input[type="text"], -/// input[type="time"], -/// input[type="url"], -/// input[type="week"], -/// textarea { -/// border: 1px solid #f00; -/// } -/// -/// input[type="color"]:focus, -/// input[type="date"]:focus, -/// input[type="datetime"]:focus, -/// input[type="datetime-local"]:focus, -/// input[type="email"]:focus, -/// input[type="month"]:focus, -/// input[type="number"]:focus, -/// input[type="password"]:focus, -/// input[type="search"]:focus, -/// input[type="tel"]:focus, -/// input[type="text"]:focus, -/// input[type="time"]:focus, -/// input[type="url"]:focus, -/// input[type="week"]:focus, -/// textarea:focus, -/// input[type="color"]:hover, -/// input[type="date"]:hover, -/// input[type="datetime"]:hover, -/// input[type="datetime-local"]:hover, -/// input[type="email"]:hover, -/// input[type="month"]:hover, -/// input[type="number"]:hover, -/// input[type="password"]:hover, -/// input[type="search"]:hover, -/// input[type="tel"]:hover, -/// input[type="text"]:hover, -/// input[type="time"]:hover, -/// input[type="url"]:hover, -/// input[type="week"]:hover, -/// textarea:hover { -/// border: 1px solid #0f0; -/// } -/// -/// input[type="color"]:active, -/// input[type="date"]:active, -/// input[type="datetime"]:active, -/// input[type="datetime-local"]:active, -/// input[type="email"]:active, -/// input[type="month"]:active, -/// input[type="number"]:active, -/// input[type="password"]:active, -/// input[type="search"]:active, -/// input[type="tel"]:active, -/// input[type="text"]:active, -/// input[type="time"]:active, -/// input[type="url"]:active, -/// input[type="week"]:active, -/// textarea:active { -/// border: 1px solid #00f; -/// } -/// -/// @require assign-inputs -/// -/// @type List - -$text-inputs-list: 'input[type="color"]', - 'input[type="date"]', - 'input[type="datetime"]', - 'input[type="datetime-local"]', - 'input[type="email"]', - 'input[type="month"]', - 'input[type="number"]', - 'input[type="password"]', - 'input[type="search"]', - 'input[type="tel"]', - 'input[type="text"]', - 'input[type="time"]', - 'input[type="url"]', - 'input[type="week"]', - 'input:not([type])', - 'textarea'; - -$all-text-inputs: assign-inputs($text-inputs-list); -$all-text-inputs-active: assign-inputs($text-inputs-list, active); -$all-text-inputs-focus: assign-inputs($text-inputs-list, focus); -$all-text-inputs-hover: assign-inputs($text-inputs-list, hover); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_timing-functions.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_timing-functions.scss deleted file mode 100644 index 20e5f1d40..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_timing-functions.scss +++ /dev/null @@ -1,34 +0,0 @@ -@charset "UTF-8"; - -/// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) -/// -/// Timing functions are the same as demoed here: http://jqueryui.com/resources/demos/effect/easing.html -/// -/// @type cubic-bezier - -$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); -$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); -$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); -$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); -$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); -$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); -$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); -$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); - -$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); -$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); -$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); -$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); -$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); -$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); -$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); -$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); - -$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); -$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); -$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); -$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); -$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); -$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); -$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); -$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_triangle.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_triangle.scss deleted file mode 100644 index 8a1ed9cd0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_triangle.scss +++ /dev/null @@ -1,63 +0,0 @@ -@mixin triangle($size, $color, $direction) { - $width: nth($size, 1); - $height: nth($size, length($size)); - $foreground-color: nth($color, 1); - $background-color: if(length($color) == 2, nth($color, 2), transparent); - height: 0; - width: 0; - - @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) { - $width: $width / 2; - $height: if(length($size) > 1, $height, $height/2); - - @if $direction == up { - border-bottom: $height solid $foreground-color; - border-left: $width solid $background-color; - border-right: $width solid $background-color; - } @else if $direction == right { - border-bottom: $width solid $background-color; - border-left: $height solid $foreground-color; - border-top: $width solid $background-color; - } @else if $direction == down { - border-left: $width solid $background-color; - border-right: $width solid $background-color; - border-top: $height solid $foreground-color; - } @else if $direction == left { - border-bottom: $width solid $background-color; - border-right: $height solid $foreground-color; - border-top: $width solid $background-color; - } - } @else if ($direction == up-right) or ($direction == up-left) { - border-top: $height solid $foreground-color; - - @if $direction == up-right { - border-left: $width solid $background-color; - } @else if $direction == up-left { - border-right: $width solid $background-color; - } - } @else if ($direction == down-right) or ($direction == down-left) { - border-bottom: $height solid $foreground-color; - - @if $direction == down-right { - border-left: $width solid $background-color; - } @else if $direction == down-left { - border-right: $width solid $background-color; - } - } @else if ($direction == inset-up) { - border-color: $background-color $background-color $foreground-color; - border-style: solid; - border-width: $height $width; - } @else if ($direction == inset-down) { - border-color: $foreground-color $background-color $background-color; - border-style: solid; - border-width: $height $width; - } @else if ($direction == inset-right) { - border-color: $background-color $background-color $background-color $foreground-color; - border-style: solid; - border-width: $width $height; - } @else if ($direction == inset-left) { - border-color: $background-color $foreground-color $background-color $background-color; - border-style: solid; - border-width: $width $height; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_word-wrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_word-wrap.scss deleted file mode 100644 index 64856a925..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/addons/_word-wrap.scss +++ /dev/null @@ -1,29 +0,0 @@ -@charset "UTF-8"; - -/// Provides an easy way to change the `word-wrap` property. -/// -/// @param {String} $wrap [break-word] -/// Value for the `word-break` property. -/// -/// @example scss - Usage -/// .wrapper { -/// @include word-wrap(break-word); -/// } -/// -/// @example css - CSS Output -/// .wrapper { -/// overflow-wrap: break-word; -/// word-break: break-all; -/// word-wrap: break-word; -/// } - -@mixin word-wrap($wrap: break-word) { - overflow-wrap: $wrap; - word-wrap: $wrap; - - @if $wrap == break-word { - word-break: break-all; - } @else { - word-break: $wrap; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_animation.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_animation.scss deleted file mode 100644 index aac675f5a..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_animation.scss +++ /dev/null @@ -1,43 +0,0 @@ -// http://www.w3.org/TR/css3-animations/#the-animation-name-property- -// Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. - -@mixin animation($animations...) { - @include prefixer(animation, $animations, webkit moz spec); -} - -@mixin animation-name($names...) { - @include prefixer(animation-name, $names, webkit moz spec); -} - -@mixin animation-duration($times...) { - @include prefixer(animation-duration, $times, webkit moz spec); -} - -@mixin animation-timing-function($motions...) { - // ease | linear | ease-in | ease-out | ease-in-out - @include prefixer(animation-timing-function, $motions, webkit moz spec); -} - -@mixin animation-iteration-count($values...) { - // infinite | - @include prefixer(animation-iteration-count, $values, webkit moz spec); -} - -@mixin animation-direction($directions...) { - // normal | alternate - @include prefixer(animation-direction, $directions, webkit moz spec); -} - -@mixin animation-play-state($states...) { - // running | paused - @include prefixer(animation-play-state, $states, webkit moz spec); -} - -@mixin animation-delay($times...) { - @include prefixer(animation-delay, $times, webkit moz spec); -} - -@mixin animation-fill-mode($modes...) { - // none | forwards | backwards | both - @include prefixer(animation-fill-mode, $modes, webkit moz spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_appearance.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_appearance.scss deleted file mode 100644 index abddc0204..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_appearance.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin appearance($value) { - @include prefixer(appearance, $value, webkit moz ms o spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_backface-visibility.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_backface-visibility.scss deleted file mode 100644 index fc68e2dd0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_backface-visibility.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin backface-visibility($visibility) { - @include prefixer(backface-visibility, $visibility, webkit spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background-image.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background-image.scss deleted file mode 100644 index 6ed19ab58..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background-image.scss +++ /dev/null @@ -1,42 +0,0 @@ -//************************************************************************// -// Background-image property for adding multiple background images with -// gradients, or for stringing multiple gradients together. -//************************************************************************// - -@mixin background-image($images...) { - $webkit-images: (); - $spec-images: (); - - @each $image in $images { - $webkit-image: (); - $spec-image: (); - - @if (type-of($image) == string) { - $url-str: str-slice($image, 1, 3); - $gradient-type: str-slice($image, 1, 6); - - @if $url-str == "url" { - $webkit-image: $image; - $spec-image: $image; - } - - @else if $gradient-type == "linear" { - $gradients: _linear-gradient-parser($image); - $webkit-image: map-get($gradients, webkit-image); - $spec-image: map-get($gradients, spec-image); - } - - @else if $gradient-type == "radial" { - $gradients: _radial-gradient-parser($image); - $webkit-image: map-get($gradients, webkit-image); - $spec-image: map-get($gradients, spec-image); - } - } - - $webkit-images: append($webkit-images, $webkit-image, comma); - $spec-images: append($spec-images, $spec-image, comma); - } - - background-image: $webkit-images; - background-image: $spec-images; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background.scss deleted file mode 100644 index 019db0ed3..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_background.scss +++ /dev/null @@ -1,55 +0,0 @@ -//************************************************************************// -// Background property for adding multiple backgrounds using shorthand -// notation. -//************************************************************************// - -@mixin background($backgrounds...) { - $webkit-backgrounds: (); - $spec-backgrounds: (); - - @each $background in $backgrounds { - $webkit-background: (); - $spec-background: (); - $background-type: type-of($background); - - @if $background-type == string or $background-type == list { - $background-str: if($background-type == list, nth($background, 1), $background); - - $url-str: str-slice($background-str, 1, 3); - $gradient-type: str-slice($background-str, 1, 6); - - @if $url-str == "url" { - $webkit-background: $background; - $spec-background: $background; - } - - @else if $gradient-type == "linear" { - $gradients: _linear-gradient-parser("#{$background}"); - $webkit-background: map-get($gradients, webkit-image); - $spec-background: map-get($gradients, spec-image); - } - - @else if $gradient-type == "radial" { - $gradients: _radial-gradient-parser("#{$background}"); - $webkit-background: map-get($gradients, webkit-image); - $spec-background: map-get($gradients, spec-image); - } - - @else { - $webkit-background: $background; - $spec-background: $background; - } - } - - @else { - $webkit-background: $background; - $spec-background: $background; - } - - $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma); - $spec-backgrounds: append($spec-backgrounds, $spec-background, comma); - } - - background: $webkit-backgrounds; - background: $spec-backgrounds; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_border-image.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_border-image.scss deleted file mode 100644 index cf568ce6d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_border-image.scss +++ /dev/null @@ -1,59 +0,0 @@ -@mixin border-image($borders...) { - $webkit-borders: (); - $spec-borders: (); - - @each $border in $borders { - $webkit-border: (); - $spec-border: (); - $border-type: type-of($border); - - @if $border-type == string or list { - $border-str: if($border-type == list, nth($border, 1), $border); - - $url-str: str-slice($border-str, 1, 3); - $gradient-type: str-slice($border-str, 1, 6); - - @if $url-str == "url" { - $webkit-border: $border; - $spec-border: $border; - } - - @else if $gradient-type == "linear" { - $gradients: _linear-gradient-parser("#{$border}"); - $webkit-border: map-get($gradients, webkit-image); - $spec-border: map-get($gradients, spec-image); - } - - @else if $gradient-type == "radial" { - $gradients: _radial-gradient-parser("#{$border}"); - $webkit-border: map-get($gradients, webkit-image); - $spec-border: map-get($gradients, spec-image); - } - - @else { - $webkit-border: $border; - $spec-border: $border; - } - } - - @else { - $webkit-border: $border; - $spec-border: $border; - } - - $webkit-borders: append($webkit-borders, $webkit-border, comma); - $spec-borders: append($spec-borders, $spec-border, comma); - } - - -webkit-border-image: $webkit-borders; - border-image: $spec-borders; - border-style: solid; -} - -//Examples: -// @include border-image(url("image.png")); -// @include border-image(url("image.png") 20 stretch); -// @include border-image(linear-gradient(45deg, orange, yellow)); -// @include border-image(linear-gradient(45deg, orange, yellow) stretch); -// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); -// @include border-image(radial-gradient(top, cover, orange, yellow, orange)); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_calc.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_calc.scss deleted file mode 100644 index 0bfc738dd..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_calc.scss +++ /dev/null @@ -1,4 +0,0 @@ -@mixin calc($property, $value) { - #{$property}: -webkit-calc(#{$value}); - #{$property}: calc(#{$value}); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_columns.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_columns.scss deleted file mode 100644 index 96117670c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_columns.scss +++ /dev/null @@ -1,47 +0,0 @@ -@mixin columns($arg: auto) { - // || - @include prefixer(columns, $arg, webkit moz spec); -} - -@mixin column-count($int: auto) { - // auto || integer - @include prefixer(column-count, $int, webkit moz spec); -} - -@mixin column-gap($length: normal) { - // normal || length - @include prefixer(column-gap, $length, webkit moz spec); -} - -@mixin column-fill($arg: auto) { - // auto || length - @include prefixer(column-fill, $arg, webkit moz spec); -} - -@mixin column-rule($arg) { - // || || - @include prefixer(column-rule, $arg, webkit moz spec); -} - -@mixin column-rule-color($color) { - @include prefixer(column-rule-color, $color, webkit moz spec); -} - -@mixin column-rule-style($style: none) { - // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid - @include prefixer(column-rule-style, $style, webkit moz spec); -} - -@mixin column-rule-width ($width: none) { - @include prefixer(column-rule-width, $width, webkit moz spec); -} - -@mixin column-span($arg: none) { - // none || all - @include prefixer(column-span, $arg, webkit moz spec); -} - -@mixin column-width($length: auto) { - // auto || length - @include prefixer(column-width, $length, webkit moz spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_filter.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_filter.scss deleted file mode 100644 index b8f8ffb0e..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_filter.scss +++ /dev/null @@ -1,4 +0,0 @@ -@mixin filter($function: none) { - // [ - @include prefixer(perspective, $depth, webkit moz spec); -} - -@mixin perspective-origin($value: 50% 50%) { - @include prefixer(perspective-origin, $value, webkit moz spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_placeholder.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_placeholder.scss deleted file mode 100644 index 5682fd097..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_placeholder.scss +++ /dev/null @@ -1,8 +0,0 @@ -@mixin placeholder { - $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input"; - @each $placeholder in $placeholders { - &:#{$placeholder}-placeholder { - @content; - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_radial-gradient.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_radial-gradient.scss deleted file mode 100644 index 8da076e28..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_radial-gradient.scss +++ /dev/null @@ -1,39 +0,0 @@ -// Requires Sass 3.1+ -@mixin radial-gradient($g1, $g2, - $g3: null, $g4: null, - $g5: null, $g6: null, - $g7: null, $g8: null, - $g9: null, $g10: null, - $pos: null, - $shape-size: null, - $fallback: null) { - - $data: _radial-arg-parser($g1, $g2, $pos, $shape-size); - $g1: nth($data, 1); - $g2: nth($data, 2); - $pos: nth($data, 3); - $shape-size: nth($data, 4); - - $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; - - // Strip deprecated cover/contain for spec - $shape-size-spec: _shape-size-stripper($shape-size); - - // Set $g1 as the default fallback color - $first-color: nth($full, 1); - $fallback-color: nth($first-color, 1); - - @if (type-of($fallback) == color) or ($fallback == "transparent") { - $fallback-color: $fallback; - } - - // Add Commas and spaces - $shape-size: if($shape-size, "#{$shape-size}, ", null); - $pos: if($pos, "#{$pos}, ", null); - $pos-spec: if($pos, "at #{$pos}", null); - $shape-size-spec: if(($shape-size-spec != " ") and ($pos == null), "#{$shape-size-spec}, ", "#{$shape-size-spec} "); - - background-color: $fallback-color; - background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); - background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_selection.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_selection.scss deleted file mode 100644 index 23303ab55..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_selection.scss +++ /dev/null @@ -1,42 +0,0 @@ -@charset "UTF-8"; - -/// Outputs the spec and prefixed versions of the `::selection` pseudo-element. -/// -/// @param {Bool} $current-selector [false] -/// If set to `true`, it takes the current element into consideration. -/// -/// @example scss - Usage -/// .element { -/// @include selection(true) { -/// background-color: #ffbb52; -/// } -/// } -/// -/// @example css - CSS Output -/// .element::-moz-selection { -/// background-color: #ffbb52; -/// } -/// -/// .element::selection { -/// background-color: #ffbb52; -/// } - -@mixin selection($current-selector: false) { - @if $current-selector { - &::-moz-selection { - @content; - } - - &::selection { - @content; - } - } @else { - ::-moz-selection { - @content; - } - - ::selection { - @content; - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_text-decoration.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_text-decoration.scss deleted file mode 100644 index 9222746ce..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_text-decoration.scss +++ /dev/null @@ -1,19 +0,0 @@ -@mixin text-decoration($value) { -// || || - @include prefixer(text-decoration, $value, moz); -} - -@mixin text-decoration-line($line: none) { -// none || underline || overline || line-through - @include prefixer(text-decoration-line, $line, moz); -} - -@mixin text-decoration-style($style: solid) { -// solid || double || dotted || dashed || wavy - @include prefixer(text-decoration-style, $style, moz webkit); -} - -@mixin text-decoration-color($color: currentColor) { -// currentColor || - @include prefixer(text-decoration-color, $color, moz); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transform.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transform.scss deleted file mode 100644 index 8ee6509ff..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transform.scss +++ /dev/null @@ -1,15 +0,0 @@ -@mixin transform($property: none) { - // none | - @include prefixer(transform, $property, webkit moz ms o spec); -} - -@mixin transform-origin($axes: 50%) { - // x-axis - left | center | right | length | % - // y-axis - top | center | bottom | length | % - // z-axis - length - @include prefixer(transform-origin, $axes, webkit moz ms o spec); -} - -@mixin transform-style($style: flat) { - @include prefixer(transform-style, $style, webkit moz ms o spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transition.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transition.scss deleted file mode 100644 index 3c785ed52..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_transition.scss +++ /dev/null @@ -1,71 +0,0 @@ -// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. -// Example: @include transition (all 2s ease-in-out); -// @include transition (opacity 1s ease-in 2s, width 2s ease-out); -// @include transition-property (transform, opacity); - -@mixin transition($properties...) { - // Fix for vendor-prefix transform property - $needs-prefixes: false; - $webkit: (); - $moz: (); - $spec: (); - - // Create lists for vendor-prefixed transform - @each $list in $properties { - @if nth($list, 1) == "transform" { - $needs-prefixes: true; - $list1: -webkit-transform; - $list2: -moz-transform; - $list3: (); - - @each $var in $list { - $list3: join($list3, $var); - - @if $var != "transform" { - $list1: join($list1, $var); - $list2: join($list2, $var); - } - } - - $webkit: append($webkit, $list1); - $moz: append($moz, $list2); - $spec: append($spec, $list3); - } @else { - $webkit: append($webkit, $list, comma); - $moz: append($moz, $list, comma); - $spec: append($spec, $list, comma); - } - } - - @if $needs-prefixes { - -webkit-transition: $webkit; - -moz-transition: $moz; - transition: $spec; - } @else { - @if length($properties) >= 1 { - @include prefixer(transition, $properties, webkit moz spec); - } @else { - $properties: all 0.15s ease-out 0s; - @include prefixer(transition, $properties, webkit moz spec); - } - } -} - -@mixin transition-property($properties...) { - -webkit-transition-property: transition-property-names($properties, "webkit"); - -moz-transition-property: transition-property-names($properties, "moz"); - transition-property: transition-property-names($properties, false); -} - -@mixin transition-duration($times...) { - @include prefixer(transition-duration, $times, webkit moz spec); -} - -@mixin transition-timing-function($motions...) { - // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() - @include prefixer(transition-timing-function, $motions, webkit moz spec); -} - -@mixin transition-delay($times...) { - @include prefixer(transition-delay, $times, webkit moz spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_user-select.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_user-select.scss deleted file mode 100644 index d4e555100..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/css3/_user-select.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin user-select($value: none) { - @include prefixer(user-select, $value, webkit moz ms spec); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_assign-inputs.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_assign-inputs.scss deleted file mode 100644 index f8aba9678..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_assign-inputs.scss +++ /dev/null @@ -1,11 +0,0 @@ -@function assign-inputs($inputs, $pseudo: null) { - $list: (); - - @each $input in $inputs { - $input: unquote($input); - $input: if($pseudo, $input + ":" + $pseudo, $input); - $list: append($list, $input, comma); - } - - @return $list; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains-falsy.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains-falsy.scss deleted file mode 100644 index c096fdb92..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains-falsy.scss +++ /dev/null @@ -1,20 +0,0 @@ -@charset "UTF-8"; - -/// Checks if a list does not contains a value. -/// -/// @access private -/// -/// @param {List} $list -/// The list to check against. -/// -/// @return {Bool} - -@function contains-falsy($list) { - @each $item in $list { - @if not $item { - @return true; - } - } - - @return false; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains.scss deleted file mode 100644 index 3dec27db8..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_contains.scss +++ /dev/null @@ -1,26 +0,0 @@ -@charset "UTF-8"; - -/// Checks if a list contains a value(s). -/// -/// @access private -/// -/// @param {List} $list -/// The list to check against. -/// -/// @param {List} $values -/// A single value or list of values to check for. -/// -/// @example scss - Usage -/// contains($list, $value) -/// -/// @return {Bool} - -@function contains($list, $values...) { - @each $value in $values { - @if type-of(index($list, $value)) != "number" { - @return false; - } - } - - @return true; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-length.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-length.scss deleted file mode 100644 index 5826e789b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-length.scss +++ /dev/null @@ -1,11 +0,0 @@ -@charset "UTF-8"; - -/// Checks for a valid CSS length. -/// -/// @param {String} $value - -@function is-length($value) { - @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc" - or index(auto inherit initial 0, $value) - or (type-of($value) == "number" and not(unitless($value)))); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-light.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-light.scss deleted file mode 100644 index 92d90ac3c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-light.scss +++ /dev/null @@ -1,21 +0,0 @@ -@charset "UTF-8"; - -/// Programatically determines whether a color is light or dark. -/// -/// @link http://robots.thoughtbot.com/closer-look-color-lightness -/// -/// @param {Color (Hex)} $color -/// -/// @example scss - Usage -/// is-light($color) -/// -/// @return {Bool} - -@function is-light($hex-color) { - $-local-red: red(rgba($hex-color, 1)); - $-local-green: green(rgba($hex-color, 1)); - $-local-blue: blue(rgba($hex-color, 1)); - $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255; - - @return $-local-lightness > 0.6; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-number.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-number.scss deleted file mode 100644 index a64e0bf21..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-number.scss +++ /dev/null @@ -1,11 +0,0 @@ -@charset "UTF-8"; - -/// Checks for a valid number. -/// -/// @param {Number} $value -/// -/// @require {function} contains - -@function is-number($value) { - @return contains("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 0 1 2 3 4 5 6 7 8 9, $value); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-size.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-size.scss deleted file mode 100644 index 661789ab4..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_is-size.scss +++ /dev/null @@ -1,13 +0,0 @@ -@charset "UTF-8"; - -/// Checks for a valid CSS size. -/// -/// @param {String} $value -/// -/// @require {function} contains -/// @require {function} is-length - -@function is-size($value) { - @return is-length($value) - or contains("fill" "fit-content" "min-content" "max-content", $value); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_modular-scale.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_modular-scale.scss deleted file mode 100644 index 20fa38812..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_modular-scale.scss +++ /dev/null @@ -1,69 +0,0 @@ -// Scaling Variables -$golden: 1.618; -$minor-second: 1.067; -$major-second: 1.125; -$minor-third: 1.2; -$major-third: 1.25; -$perfect-fourth: 1.333; -$augmented-fourth: 1.414; -$perfect-fifth: 1.5; -$minor-sixth: 1.6; -$major-sixth: 1.667; -$minor-seventh: 1.778; -$major-seventh: 1.875; -$octave: 2; -$major-tenth: 2.5; -$major-eleventh: 2.667; -$major-twelfth: 3; -$double-octave: 4; - -$modular-scale-ratio: $perfect-fourth !default; -$modular-scale-base: em($em-base) !default; - -@function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) { - $v1: nth($value, 1); - $v2: nth($value, length($value)); - $value: $v1; - - // scale $v2 to just above $v1 - @while $v2 > $v1 { - $v2: ($v2 / $ratio); // will be off-by-1 - } - @while $v2 < $v1 { - $v2: ($v2 * $ratio); // will fix off-by-1 - } - - // check AFTER scaling $v2 to prevent double-counting corner-case - $double-stranded: $v2 > $v1; - - @if $increment > 0 { - @for $i from 1 through $increment { - @if $double-stranded and ($v1 * $ratio) > $v2 { - $value: $v2; - $v2: ($v2 * $ratio); - } @else { - $v1: ($v1 * $ratio); - $value: $v1; - } - } - } - - @if $increment < 0 { - // adjust $v2 to just below $v1 - @if $double-stranded { - $v2: ($v2 / $ratio); - } - - @for $i from $increment through -1 { - @if $double-stranded and ($v1 / $ratio) < $v2 { - $value: $v2; - $v2: ($v2 / $ratio); - } @else { - $v1: ($v1 / $ratio); - $value: $v1; - } - } - } - - @return $value; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-em.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-em.scss deleted file mode 100644 index ae81a44ad..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-em.scss +++ /dev/null @@ -1,13 +0,0 @@ -// Convert pixels to ems -// eg. for a relational value of 12px write em(12) when the parent is 16px -// if the parent is another value say 24px write em(12, 24) - -@function em($pxval, $base: $em-base) { - @if not unitless($pxval) { - $pxval: strip-units($pxval); - } - @if not unitless($base) { - $base: strip-units($base); - } - @return ($pxval / $base) * 1em; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-rem.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-rem.scss deleted file mode 100644 index 0ac941e76..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_px-to-rem.scss +++ /dev/null @@ -1,15 +0,0 @@ -// Convert pixels to rems -// eg. for a relational value of 12px write rem(12) -// Assumes $em-base is the font-size of - -@function rem($pxval) { - @if not unitless($pxval) { - $pxval: strip-units($pxval); - } - - $base: $em-base; - @if not unitless($base) { - $base: strip-units($base); - } - @return ($pxval / $base) * 1rem; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_shade.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_shade.scss deleted file mode 100644 index 8aaf2c6d2..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_shade.scss +++ /dev/null @@ -1,24 +0,0 @@ -@charset "UTF-8"; - -/// Mixes a color with black. -/// -/// @param {Color} $color -/// -/// @param {Number (Percentage)} $percent -/// The amount of black to be mixed in. -/// -/// @example scss - Usage -/// .element { -/// background-color: shade(#ffbb52, 60%); -/// } -/// -/// @example css - CSS Output -/// .element { -/// background-color: #664a20; -/// } -/// -/// @return {Color} - -@function shade($color, $percent) { - @return mix(#000, $color, $percent); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_strip-units.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_strip-units.scss deleted file mode 100644 index 6c5f3e810..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_strip-units.scss +++ /dev/null @@ -1,17 +0,0 @@ -@charset "UTF-8"; - -/// Strips the unit from a number. -/// -/// @param {Number (With Unit)} $value -/// -/// @example scss - Usage -/// $dimension: strip-units(10em); -/// -/// @example css - CSS Output -/// $dimension: 10; -/// -/// @return {Number (Unitless)} - -@function strip-units($value) { - @return ($value / ($value * 0 + 1)); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_tint.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_tint.scss deleted file mode 100644 index 2e3381488..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_tint.scss +++ /dev/null @@ -1,24 +0,0 @@ -@charset "UTF-8"; - -/// Mixes a color with white. -/// -/// @param {Color} $color -/// -/// @param {Number (Percentage)} $percent -/// The amount of white to be mixed in. -/// -/// @example scss - Usage -/// .element { -/// background-color: tint(#6ecaa6, 40%); -/// } -/// -/// @example css - CSS Output -/// .element { -/// background-color: #a8dfc9; -/// } -/// -/// @return {Color} - -@function tint($color, $percent) { - @return mix(#fff, $color, $percent); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_transition-property-name.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_transition-property-name.scss deleted file mode 100644 index 18348b93a..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_transition-property-name.scss +++ /dev/null @@ -1,22 +0,0 @@ -// Return vendor-prefixed property names if appropriate -// Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background -//************************************************************************// -@function transition-property-names($props, $vendor: false) { - $new-props: (); - - @each $prop in $props { - $new-props: append($new-props, transition-property-name($prop, $vendor), comma); - } - - @return $new-props; -} - -@function transition-property-name($prop, $vendor: false) { - // put other properties that need to be prefixed here aswell - @if $vendor and $prop == transform { - @return unquote('-'+$vendor+'-'+$prop); - } - @else { - @return $prop; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_unpack.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_unpack.scss deleted file mode 100644 index 4367935d5..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/functions/_unpack.scss +++ /dev/null @@ -1,27 +0,0 @@ -@charset "UTF-8"; - -/// Converts shorthand to the 4-value syntax. -/// -/// @param {List} $shorthand -/// -/// @example scss - Usage -/// .element { -/// margin: unpack(1em 2em); -/// } -/// -/// @example css - CSS Output -/// .element { -/// margin: 1em 2em 1em 2em; -/// } - -@function unpack($shorthand) { - @if length($shorthand) == 1 { - @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1); - } @else if length($shorthand) == 2 { - @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2); - } @else if length($shorthand) == 3 { - @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2); - } @else { - @return $shorthand; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_convert-units.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_convert-units.scss deleted file mode 100644 index e0a65a05c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_convert-units.scss +++ /dev/null @@ -1,21 +0,0 @@ -//************************************************************************// -// Helper function for str-to-num fn. -// Source: http://sassmeister.com/gist/9647408 -//************************************************************************// -@function _convert-units($number, $unit) { - $strings: "px", "cm", "mm", "%", "ch", "pica", "in", "em", "rem", "pt", "pc", "ex", "vw", "vh", "vmin", "vmax", "deg", "rad", "grad", "turn"; - $units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn; - $index: index($strings, $unit); - - @if not $index { - @warn "Unknown unit `#{$unit}`."; - @return false; - } - - @if type-of($number) != "number" { - @warn "`#{$number} is not a number`"; - @return false; - } - - @return $number * nth($units, $index); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_directional-values.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_directional-values.scss deleted file mode 100644 index 6ee538db4..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_directional-values.scss +++ /dev/null @@ -1,96 +0,0 @@ -@charset "UTF-8"; - -/// Directional-property mixins are shorthands for writing properties like the following -/// -/// @ignore You can also use `false` instead of `null`. -/// -/// @param {List} $vals -/// List of directional values -/// -/// @example scss - Usage -/// .element { -/// @include border-style(dotted null); -/// @include margin(null 0 10px); -/// } -/// -/// @example css - CSS Output -/// .element { -/// border-bottom-style: dotted; -/// border-top-style: dotted; -/// margin-bottom: 10px; -/// margin-left: 0; -/// margin-right: 0; -/// } -/// -/// @require {function} contains-falsy -/// -/// @return {List} - -@function collapse-directionals($vals) { - $output: null; - - $a: nth($vals, 1); - $b: if(length($vals) < 2, $a, nth($vals, 2)); - $c: if(length($vals) < 3, $a, nth($vals, 3)); - $d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4))); - - @if $a == 0 { $a: 0; } - @if $b == 0 { $b: 0; } - @if $c == 0 { $c: 0; } - @if $d == 0 { $d: 0; } - - @if $a == $b and $a == $c and $a == $d { $output: $a; } - @else if $a == $c and $b == $d { $output: $a $b; } - @else if $b == $d { $output: $a $b $c; } - @else { $output: $a $b $c $d; } - - @return $output; -} - -/// Output directional properties, for instance `margin`. -/// -/// @access private -/// -/// @param {String} $pre -/// Prefix to use -/// @param {String} $suf -/// Suffix to use -/// @param {List} $vals -/// List of values -/// -/// @require {function} collapse-directionals -/// @require {function} contains-falsy - -@mixin directional-property($pre, $suf, $vals) { - // Property Names - $top: $pre + "-top" + if($suf, "-#{$suf}", ""); - $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", ""); - $left: $pre + "-left" + if($suf, "-#{$suf}", ""); - $right: $pre + "-right" + if($suf, "-#{$suf}", ""); - $all: $pre + if($suf, "-#{$suf}", ""); - - $vals: collapse-directionals($vals); - - @if contains-falsy($vals) { - @if nth($vals, 1) { #{$top}: nth($vals, 1); } - - @if length($vals) == 1 { - @if nth($vals, 1) { #{$right}: nth($vals, 1); } - } @else { - @if nth($vals, 2) { #{$right}: nth($vals, 2); } - } - - @if length($vals) == 2 { - @if nth($vals, 1) { #{$bottom}: nth($vals, 1); } - @if nth($vals, 2) { #{$left}: nth($vals, 2); } - } @else if length($vals) == 3 { - @if nth($vals, 3) { #{$bottom}: nth($vals, 3); } - @if nth($vals, 2) { #{$left}: nth($vals, 2); } - } @else if length($vals) == 4 { - @if nth($vals, 3) { #{$bottom}: nth($vals, 3); } - @if nth($vals, 4) { #{$left}: nth($vals, 4); } - } - } @else { - #{$all}: $vals; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_font-source-declaration.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_font-source-declaration.scss deleted file mode 100644 index 7f17586c9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_font-source-declaration.scss +++ /dev/null @@ -1,43 +0,0 @@ -// Used for creating the source string for fonts using @font-face -// Reference: http://goo.gl/Ru1bKP - -@function font-url-prefixer($asset-pipeline) { - @if $asset-pipeline == true { - @return font-url; - } @else { - @return url; - } -} - -@function font-source-declaration( - $font-family, - $file-path, - $asset-pipeline, - $file-formats, - $font-url) { - - $src: (); - - $formats-map: ( - eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"), - woff2: "#{$file-path}.woff2" format("woff2"), - woff: "#{$file-path}.woff" format("woff"), - ttf: "#{$file-path}.ttf" format("truetype"), - svg: "#{$file-path}.svg##{$font-family}" format("svg") - ); - - @each $key, $values in $formats-map { - @if contains($file-formats, $key) { - $file-path: nth($values, 1); - $font-format: nth($values, 2); - - @if $asset-pipeline == true { - $src: append($src, font-url($file-path) $font-format, comma); - } @else { - $src: append($src, url($file-path) $font-format, comma); - } - } - } - - @return $src; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_gradient-positions-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_gradient-positions-parser.scss deleted file mode 100644 index 07d30b6cf..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_gradient-positions-parser.scss +++ /dev/null @@ -1,13 +0,0 @@ -@function _gradient-positions-parser($gradient-type, $gradient-positions) { - @if $gradient-positions - and ($gradient-type == linear) - and (type-of($gradient-positions) != color) { - $gradient-positions: _linear-positions-parser($gradient-positions); - } - @else if $gradient-positions - and ($gradient-type == radial) - and (type-of($gradient-positions) != color) { - $gradient-positions: _radial-positions-parser($gradient-positions); - } - @return $gradient-positions; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-angle-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-angle-parser.scss deleted file mode 100644 index e0401ed8d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-angle-parser.scss +++ /dev/null @@ -1,25 +0,0 @@ -// Private function for linear-gradient-parser -@function _linear-angle-parser($image, $first-val, $prefix, $suffix) { - $offset: null; - $unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val)); - $unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val)); - - @if ($unit-long == "grad") or - ($unit-long == "turn") { - $offset: if($unit-long == "grad", -100grad * 3, -0.75turn); - } - - @else if ($unit-short == "deg") or - ($unit-short == "rad") { - $offset: if($unit-short == "deg", -90 * 3, 1.6rad); - } - - @if $offset { - $num: _str-to-num($first-val); - - @return ( - webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix, - spec-image: $image - ); - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-gradient-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-gradient-parser.scss deleted file mode 100644 index 48a8f77f9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-gradient-parser.scss +++ /dev/null @@ -1,41 +0,0 @@ -@function _linear-gradient-parser($image) { - $image: unquote($image); - $gradients: (); - $start: str-index($image, "("); - $end: str-index($image, ","); - $first-val: str-slice($image, $start + 1, $end - 1); - - $prefix: str-slice($image, 1, $start); - $suffix: str-slice($image, $end, str-length($image)); - - $has-multiple-vals: str-index($first-val, " "); - $has-single-position: unquote(_position-flipper($first-val) + ""); - $has-angle: is-number(str-slice($first-val, 1, 1)); - - @if $has-multiple-vals { - $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals); - } - - @else if $has-single-position != "" { - $pos: unquote($has-single-position + ""); - - $gradients: ( - webkit-image: -webkit- + $image, - spec-image: $prefix + "to " + $pos + $suffix - ); - } - - @else if $has-angle { - // Rotate degree for webkit - $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix); - } - - @else { - $gradients: ( - webkit-image: -webkit- + $image, - spec-image: $image - ); - } - - @return $gradients; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-positions-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-positions-parser.scss deleted file mode 100644 index 96d6a6d45..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-positions-parser.scss +++ /dev/null @@ -1,61 +0,0 @@ -@function _linear-positions-parser($pos) { - $type: type-of(nth($pos, 1)); - $spec: null; - $degree: null; - $side: null; - $corner: null; - $length: length($pos); - // Parse Side and corner positions - @if ($length > 1) { - @if nth($pos, 1) == "to" { // Newer syntax - $side: nth($pos, 2); - - @if $length == 2 { // eg. to top - // Swap for backwards compatibility - $degree: _position-flipper(nth($pos, 2)); - } - @else if $length == 3 { // eg. to top left - $corner: nth($pos, 3); - } - } - @else if $length == 2 { // Older syntax ("top left") - $side: _position-flipper(nth($pos, 1)); - $corner: _position-flipper(nth($pos, 2)); - } - - @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - $spec: to $side $corner; - } - @else if $length == 1 { - // Swap for backwards compatibility - @if $type == string { - $degree: $pos; - $spec: to _position-flipper($pos); - } - @else { - $degree: -270 - $pos; //rotate the gradient opposite from spec - $spec: $pos; - } - } - $degree: unquote($degree + ","); - $spec: unquote($spec + ","); - @return $degree $spec; -} - -@function _position-flipper($pos) { - @return if($pos == left, right, null) - if($pos == right, left, null) - if($pos == top, bottom, null) - if($pos == bottom, top, null); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-side-corner-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-side-corner-parser.scss deleted file mode 100644 index 7a691253d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_linear-side-corner-parser.scss +++ /dev/null @@ -1,31 +0,0 @@ -// Private function for linear-gradient-parser -@function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) { - $val-1: str-slice($first-val, 1, $has-multiple-vals - 1); - $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val)); - $val-3: null; - $has-val-3: str-index($val-2, " "); - - @if $has-val-3 { - $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2)); - $val-2: str-slice($val-2, 1, $has-val-3 - 1); - } - - $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3); - $pos: unquote($pos + ""); - - // Use old spec for webkit - @if $val-1 == "to" { - @return ( - webkit-image: -webkit- + $prefix + $pos + $suffix, - spec-image: $image - ); - } - - // Bring the code up to spec - @else { - @return ( - webkit-image: -webkit- + $image, - spec-image: $prefix + "to " + $pos + $suffix - ); - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-arg-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-arg-parser.scss deleted file mode 100644 index 56c6030b7..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-arg-parser.scss +++ /dev/null @@ -1,69 +0,0 @@ -@function _radial-arg-parser($g1, $g2, $pos, $shape-size) { - @each $value in $g1, $g2 { - $first-val: nth($value, 1); - $pos-type: type-of($first-val); - $spec-at-index: null; - - // Determine if spec was passed to mixin - @if type-of($value) == list { - $spec-at-index: if(index($value, at), index($value, at), false); - } - @if $spec-at-index { - @if $spec-at-index > 1 { - @for $i from 1 through ($spec-at-index - 1) { - $shape-size: $shape-size nth($value, $i); - } - @for $i from ($spec-at-index + 1) through length($value) { - $pos: $pos nth($value, $i); - } - } - @else if $spec-at-index == 1 { - @for $i from ($spec-at-index + 1) through length($value) { - $pos: $pos nth($value, $i); - } - } - $g1: null; - } - - // If not spec calculate correct values - @else { - @if ($pos-type != color) or ($first-val != "transparent") { - @if ($pos-type == number) - or ($first-val == "center") - or ($first-val == "top") - or ($first-val == "right") - or ($first-val == "bottom") - or ($first-val == "left") { - - $pos: $value; - - @if $pos == $g1 { - $g1: null; - } - } - - @else if - ($first-val == "ellipse") - or ($first-val == "circle") - or ($first-val == "closest-side") - or ($first-val == "closest-corner") - or ($first-val == "farthest-side") - or ($first-val == "farthest-corner") - or ($first-val == "contain") - or ($first-val == "cover") { - - $shape-size: $value; - - @if $value == $g1 { - $g1: null; - } - - @else if $value == $g2 { - $g2: null; - } - } - } - } - } - @return $g1, $g2, $pos, $shape-size; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-gradient-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-gradient-parser.scss deleted file mode 100644 index 5444d8085..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-gradient-parser.scss +++ /dev/null @@ -1,50 +0,0 @@ -@function _radial-gradient-parser($image) { - $image: unquote($image); - $gradients: (); - $start: str-index($image, "("); - $end: str-index($image, ","); - $first-val: str-slice($image, $start + 1, $end - 1); - - $prefix: str-slice($image, 1, $start); - $suffix: str-slice($image, $end, str-length($image)); - - $is-spec-syntax: str-index($first-val, "at"); - - @if $is-spec-syntax and $is-spec-syntax > 1 { - $keyword: str-slice($first-val, 1, $is-spec-syntax - 2); - $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); - $pos: append($pos, $keyword, comma); - - $gradients: ( - webkit-image: -webkit- + $prefix + $pos + $suffix, - spec-image: $image - ); - } - - @else if $is-spec-syntax == 1 { - $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); - - $gradients: ( - webkit-image: -webkit- + $prefix + $pos + $suffix, - spec-image: $image - ); - } - - @else if str-index($image, "cover") or str-index($image, "contain") { - @warn "Radial-gradient needs to be updated to conform to latest spec."; - - $gradients: ( - webkit-image: null, - spec-image: $image - ); - } - - @else { - $gradients: ( - webkit-image: -webkit- + $image, - spec-image: $image - ); - } - - @return $gradients; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-positions-parser.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-positions-parser.scss deleted file mode 100644 index 3c552ad79..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_radial-positions-parser.scss +++ /dev/null @@ -1,18 +0,0 @@ -@function _radial-positions-parser($gradient-pos) { - $shape-size: nth($gradient-pos, 1); - $pos: nth($gradient-pos, 2); - $shape-size-spec: _shape-size-stripper($shape-size); - - $pre-spec: unquote(if($pos, "#{$pos}, ", null)) - unquote(if($shape-size, "#{$shape-size},", null)); - $pos-spec: if($pos, "at #{$pos}", null); - - $spec: "#{$shape-size-spec} #{$pos-spec}"; - - // Add comma - @if ($spec != " ") { - $spec: "#{$spec},"; - } - - @return $pre-spec $spec; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_render-gradients.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_render-gradients.scss deleted file mode 100644 index 576567683..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_render-gradients.scss +++ /dev/null @@ -1,26 +0,0 @@ -// User for linear and radial gradients within background-image or border-image properties - -@function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) { - $pre-spec: null; - $spec: null; - $vendor-gradients: null; - @if $gradient-type == linear { - @if $gradient-positions { - $pre-spec: nth($gradient-positions, 1); - $spec: nth($gradient-positions, 2); - } - } - @else if $gradient-type == radial { - $pre-spec: nth($gradient-positions, 1); - $spec: nth($gradient-positions, 2); - } - - @if $vendor { - $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients); - } - @else if $vendor == false { - $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})"; - $vendor-gradients: unquote($vendor-gradients); - } - @return $vendor-gradients; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_shape-size-stripper.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_shape-size-stripper.scss deleted file mode 100644 index ee5eda422..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_shape-size-stripper.scss +++ /dev/null @@ -1,10 +0,0 @@ -@function _shape-size-stripper($shape-size) { - $shape-size-spec: null; - @each $value in $shape-size { - @if ($value == "cover") or ($value == "contain") { - $value: null; - } - $shape-size-spec: "#{$shape-size-spec} #{$value}"; - } - @return $shape-size-spec; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_str-to-num.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_str-to-num.scss deleted file mode 100644 index 3ef1d873b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/helpers/_str-to-num.scss +++ /dev/null @@ -1,50 +0,0 @@ -//************************************************************************// -// Helper function for linear/radial-gradient-parsers. -// Source: http://sassmeister.com/gist/9647408 -//************************************************************************// -@function _str-to-num($string) { - // Matrices - $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; - $numbers: 0 1 2 3 4 5 6 7 8 9; - - // Result - $result: 0; - $divider: 0; - $minus: false; - - // Looping through all characters - @for $i from 1 through str-length($string) { - $character: str-slice($string, $i, $i); - $index: index($strings, $character); - - @if $character == "-" { - $minus: true; - } - - @else if $character == "." { - $divider: 1; - } - - @else { - @if not $index { - $result: if($minus, $result * -1, $result); - @return _convert-units($result, str-slice($string, $i)); - } - - $number: nth($numbers, $index); - - @if $divider == 0 { - $result: $result * 10; - } - - @else { - // Move the decimal dot to the left - $divider: $divider * 10; - $number: $number / $divider; - } - - $result: $result + $number; - } - } - @return if($minus, $result * -1, $result); -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_asset-pipeline.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_asset-pipeline.scss deleted file mode 100644 index 4c6afc5bb..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_asset-pipeline.scss +++ /dev/null @@ -1,7 +0,0 @@ -@charset "UTF-8"; - -/// A global setting to enable or disable the `$asset-pipeline` variable for all functions that accept it. -/// -/// @type Bool - -$asset-pipeline: false !default; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_prefixer.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_prefixer.scss deleted file mode 100644 index 8c390514d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_prefixer.scss +++ /dev/null @@ -1,9 +0,0 @@ -@charset "UTF-8"; - -/// Global variables to enable or disable vendor prefixes - -$prefix-for-webkit: true !default; -$prefix-for-mozilla: true !default; -$prefix-for-microsoft: true !default; -$prefix-for-opera: true !default; -$prefix-for-spec: true !default; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_px-to-em.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_px-to-em.scss deleted file mode 100644 index f2f9a3e8d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/bourbon/settings/_px-to-em.scss +++ /dev/null @@ -1 +0,0 @@ -$em-base: 16px !default; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/_grid-settings.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/_grid-settings.scss deleted file mode 100644 index 794343496..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/_grid-settings.scss +++ /dev/null @@ -1,23 +0,0 @@ -// Import gridle : -@import 'gridle/gridle'; - -// setup the grid (required) : -@include gridle_setup(( - context : 12, - gutter-width : 20px, - debug : true -)); - -// register special columns : -@include gridle_register_column("1on5", 1, 5); - -// clear each classes : -@include gridle_register_clear_each(2, left); -@include gridle_register_clear_each(12, both); - -// register states : -@include gridle_register_default_states(); -@include gridle_register_state(ipad-landscape, ( - query : "only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape)", - gutter-width : 0 -)); \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid-bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid-bootstrap.scss deleted file mode 100644 index 101ee15cd..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid-bootstrap.scss +++ /dev/null @@ -1,48 +0,0 @@ -// Import gridle : -@import 'gridle/gridle'; - - -// basic configuration : -@include gridle_setup( ( - context : 12, - gutter-width : 30px, - html-states-classes : true -) ); - -// register states : -@include gridle_register_default_mobile_first_states(); - -/* - * Optional : - * Change generation class names pattern (for example to match bootstrap naming conventions or generate with your own names) : - * Check documentation (http://gridle.org/documentation#name-pattern) for full list - * - * %- = separator sign (configurable by $gridle-class-separator) (no need to add separators if you doesn't want them) - * %state = the state name (mobile, ipad, etc...) - * %count = the column count (1, 2, 3, 4, etc...) - */ -$gridle-grid-name-pattern : ('col','%-','%state','%-','%count'); -$gridle-parent-name-pattern : ('row','%-','%state'); -$gridle-prefix-name-pattern : ('col','%-','%state','%-','offset','%-','%count'); -$gridle-push-name-pattern : ('col','%-','%state','%-','push','%-','%count'); -$gridle-pull-name-pattern : ('col','%-','%state','%-','pull','%-','%count'); -$gridle-show-name-pattern : ('visible','%-','%state'); -$gridle-hide-name-pattern : ('hidden','%-','%state'); - - -/** - * Mobile first approach : - */ -[class*="col-"] { - width:100%; // 100% by default -} - - -// Generate classes : -@include gridle_generate_classes(); - -// Max size : -.container { - margin:0 auto; - max-width:1200px; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid.scss deleted file mode 100644 index d638093c6..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/grid.scss +++ /dev/null @@ -1,24 +0,0 @@ -// Import grid settings : -@import 'grid-settings'; - -// Generate classes : -@include gridle_generate_classes(); - -// you can generate classes separately if you need : -// @include gridle_generate_classes(default); // default is the base state always registered -// @include gridle_generate_classes(mobile, (grid, push, pull)) // generate only the grid, push and pull classes for mobile -// etc... - -// generate a center custom class for all the states : -@include gridle_generate_custom_class( ('center','%-','%state') ) { - text-align:center; -} -// this will produces classes : center, center-mobile, center-tablet, center-ipad-landscape -// for separators, you can use the %- (replaced by the $gridle-class-separator option), or -, --, _, __ - -// Max size : -.container { - margin:0 auto; - max-width:960px; - @include gridle_grid_background(); -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_common-mixins.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_common-mixins.scss deleted file mode 100644 index cd8d5ada0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_common-mixins.scss +++ /dev/null @@ -1,124 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Common mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -@mixin _gridle_container_common( - $state : default -) { - @extend %gridle-simple-clearfix; - @extend %gridle-container-common; - // debug part - $debug : _gridle_get_var_value(debug, $state); - @if ($debug == true) { - #{$gridle-debug-selector} { - @extend %gridle-container-debug-common; - } - } -} -$_gridle-already-generated : (); -@mixin _gridle_grid_common() { - @extend %gridle-grid-common; - - // default values - $default-gutter-width : _gridle_get_var_value(gutter-width, default); - $default-direction : _gridle_get_var_value(direction, default); - - // loop on each states : - @each $stateName, $state in $_gridle-states - { - // selector key to be used in map - $key : "#{$stateName} #{&}"; - - // check if already generated classes - $already-generated : map-has-key($_gridle-already-generated, $key); - - // vars - $direction : _gridle_get_var_value(direction, $state); - $classes : _gridle_get_var_value(classes, $state); - $gutter-width : _gridle_get_var_value(gutter-width, $state); - $debug : _gridle_get_var_value(debug, $state); - - @if $already-generated != true and $classes and ( ($default-direction != $direction or $default-gutter-width != $gutter-width) or $stateName == default) - { - // set that we have already generated css for this selector - $_gridle-already-generated : map-set($_gridle-already-generated, $key, true) !global; - - // generate the css for this element - @include gridle_state($state) { - @if $direction != $default-direction or $stateName == default { - // content : "#{$key}"; - @if $direction == rtl { - float:right; - direction:rtl; - } @else { - float:left; - direction:ltr; - } - } - @if $gutter-width != $default-gutter-width or $stateName == default { - padding-left:$gutter-width/2; - padding-right:$gutter-width/2; - } - } - - @if $debug == true { - #{$gridle-debug-selector} { - @extend %gridle-grid-debug-common; - } - } - } - } -} -@mixin _gridle_parent_common() { - @extend %gridle-clearfix; - @extend %gridle-parent-common; -} -@mixin _gridle_push_common( - $state : default -) { - $debug : _gridle_get_var_value(debug, $state); - - // extend common : - @extend %gridle-push-pull-common; - @if $debug == true { - #{$gridle-debug-selector} { - @extend %gridle-push-pull-debug-background-common; - background-color:#f4efdf !important; - } - } -} -@mixin _gridle_pull_common( - $state : default -) { - $debug : _gridle_get_var_value(debug, $state); - - @extend %gridle-push-pull-common; - @if $debug == true { - #{$gridle-debug-selector} { - @extend %gridle-push-pull-debug-background-common; - background-color:#cfe4d5 !important; - } - } -} -@mixin _gridle_prefix_common( - $state : default -) { - $debug : _gridle_get_var_value(debug, $state); - @if $debug == true { - #{$gridle-debug-selector} { - @extend %gridle-prefix-debug-common; - } - } -} -@mixin _gridle_suffix_common( - $state : default -) { - $debug : _gridle_get_var_value(debug, $state); - @if $debug == true { - #{$gridle-debug-selector} { - @extend %gridle-suffix-debug-common; - } - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_default-states.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_default-states.scss deleted file mode 100644 index aeb007cdf..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_default-states.scss +++ /dev/null @@ -1,35 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Default states -// |------------------------------------------------------ -// |------------------------------------------------------ - -// retina -@include gridle_register_state("retina", ( - query : "(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)", - classes : false -) ); - -// tv -@include gridle_register_state("tv", ( - query : "only tv", - classes : false -) ); - -// print -@include gridle_register_state("print", ( - query : "only print", - classes : false -) ); - -// portrait -@include gridle_register_state("portrait", ( - query : "only screen and (orientation: portrait)", - classes : false -) ); - -// landscape -@include gridle_register_state("landscape", ( - query : "only screen and (orientation: landscape)", - classes : false -) ); \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_functions.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_functions.scss deleted file mode 100644 index 9e6fc0e7e..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_functions.scss +++ /dev/null @@ -1,387 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Functions -// |------------------------------------------------------ -// |------------------------------------------------------ - -/** - * Str replace - * - * @param {string} $string String that you want to replace - * @param {string} $substr String that is to be replaced by `$newsubstr` - * @param {string} $newsubstr String that replaces `$substr` - * @param {number*} $all Flag for replaceing all (1+) or not (0) - * @return {string} - */ -@function str-replace($string, $substr, $newsubstr, $all: 0) { - $position-found: str-index($string, $substr); - $processed: (); - - @while ($position-found and $position-found > 0) { - $length-substr: str-length($substr); - $processed: append($processed, str-slice($string, 0, $position-found - 1)); - $processed: append($processed, $newsubstr); - $string: str-slice($string, $position-found + $length-substr); - - $position-found: 0; - - @if ($all > 0) { - $position-found: str-index($string, $substr); - } - } - - $processed: append($processed, $string); - $string: ""; - - @each $s in $processed { - $string: #{$string}#{$s}; - } - - @return $string; -} - -/** - * Map set - * - * @param Map $map The map to use - * @param String $key The key to update - * @param Mixed $value The new value - * @return Map The new map - */ -@function map-set($map, $key, $value) { - $new: ($key: $value); - @return map-merge($map, $new); -} - - -/** - * Get the column width in percent for the global or a specific context - * - * @param int $columns The number of columns to calculate - * @param int $context : $gridle-columns-count The context to use - * @return percentage The width in percent - */ -@function gridle_get_column_width( - $columns : 1, - $stateMap-or-stateName : null -) { - @return percentage(1 / $context * $columns); -} - - -/** - * Get a state map - * - * @param string $name The name of the state to get - * @return map A state map object - */ -@function _gridle_get_state( - $stateMap-or-stateName -) { - // check if has a state named like this - @if (type-of($stateMap-or-stateName) == string - and map-has-key($_gridle_states, unquote("#{$stateMap-or-stateName}"))) - { - @return map-get($_gridle_states, unquote("#{$stateMap-or-stateName}")); - } - - // a map is passed, so it's a state himself - @if $stateMap-or-stateName - and type-of($stateMap-or-stateName) == map - { - @return map-merge($_gridle-settings, $stateMap-or-stateName); - } - - // return the default one if exist - @if map-has-key($_gridle_states, default) - { - @return map-get($_gridle_states, default); - } - - // nothing finded, return the default state - @return $_gridle-settings; -} - - -/** - * Check if a state exist : - * - * @param string $name The name of the state to check - * @return Boolean true is exist - */ -@function _gridle_has_state( - $stateName -) { - @if map-has-key($_gridle_states, unquote("#{$stateName}")) { - @return true; - } @else { - @return false; - } -} - - -/** - * Get the media queries variables : - * - * @param int $index The media query indes - * @param String $var The media query variable name - * @return String|int The variable value - */ -@function _gridle_get_state_var( - $stateName, - $var : "name" -) { - - // get the state : - $state : _gridle_get_state($stateName); - - // check ig state and if has the variable : - @if $state - and map-has-key($state,unquote("#{$var}")) - { - @return map-get($state,unquote("#{$var}")); - } - - // nothing getted : - @return null; -} - - -/** - * Get a variable - * - * @param String $varName The variable name - * @param String $stateMap-or-stateName The state name or a map state value - * @return Mixed The finded value - */ -@function _gridle_get_var_value( - $varName, - $stateMap-or-stateName : null -) { - // if is a state : - $state : null; - - // get the state (if no state find, return the default one) : - $state : _gridle_get_state($stateMap-or-stateName); - - // extend default state with given state : - $props : map-merge($_gridle-settings, $state); - - @if map-has-key($props, unquote("#{$varName}")) { - @return map-get($state, unquote("#{$varName}")); - } - - // nothing finded : - @return null; -} - - -/** - * Set a variable in a state - * @param Mixed $stateName-or-stateIndex The state name of state index - * @param String $var Variable name to assign - * @param Mixed $newValue The new value to assign - * @return List The states list (full) - */ -@function _gridle_set_state_var( - $stateName, - $var, - $newValue -) { - // get the state : - $state : _gridle_get_state($stateName); - - // check ig state and if has the variable : - @if $state - and map-has-key($state,unquote("#{$var}")) - { - // set new value in state : - $state : map-set($state, unquote("#{$var}"), $newValue); - - // set states : - $_gridle_states : map-set($_gridle_states, unquote("#{$stateName}"), $state); - - // return new state : - @return $state; - } - - // nothing getted : - @return null; -} - - -/** - * Generate a column - * - * @param String $name The column name (often count) - * @param int $columns The column count that the column will take - * @param int $context The context on witch the with will be calculed - * @param Boolean $generateClasses Set if the column has to be generated in css - */ -@function _gridle_create_column( - $name, - $columns, - $context, - $name-multiplicator : 1 // used to extend the state on custom registered columns -) { - @return ( - name : $name, - columns : $columns, - context : $context, - name-multiplicator : $name-multiplicator - ); -} - - -/** - * Generate classname - * - * @param List $parrern The pattern to use to generate classname - * @param String $state The state - * @param int $count The column count - */ -@function _gridle_classname( - $pattern, - $state : null, - $count : null -) { - - // init selector : - $sel : "."; - - // delete default : - @if unquote("#{$state}") == default { - $state : null; - } - - // add class prefix : - @if $gridle-class-prefix and $gridle-class-prefix != '' { - $sel : "#{$sel}#{$gridle-class-prefix}"; - @if $gridle-class-separator { - $sel : "#{$sel}#{$gridle-class-separator}"; - } - } - - // construct class name : - $i : 1; - @each $var in $pattern { - - // replace tokens : - @if $var == '%state' and $state { - $sel : "#{$sel}#{$state}"; - } - @if $var == '%count' and $count { - $sel : "#{$sel}#{$count}"; - } - @if $var != '%state' and $var != '%count' and $var != '%-' and $var != '-' and $var != '--' and $var != '_' and $var != '__' and $var != '%prefix' { - $sel : "#{$sel}#{$var}"; - } - - // handle separators : - @if ($var == '%-' or $var == '-' or $var == '--' or $var == '_' or $var == '__') and $i < length($pattern) { - $index : $i + 1; - $value : nth($pattern, $index); - @if $value != '%state' and $value != '%count' and $value != '%-' and $value != '-' and $value != '--' and $value != '_' and $value != '__' and $value != '%prefix' { - @if $var == '%-' { - $sel : "#{$sel}#{$gridle-class-separator}"; - } @else { - $sel : "#{$sel}#{$var}"; - } - } - @if $value == '%state' and $state { - @if $var == '%-' { - $sel : "#{$sel}#{$gridle-class-separator}"; - } @else { - $sel : "#{$sel}#{$var}"; - } - } - @if $value == '%count' and $count { - @if $var == '%-' { - $sel : "#{$sel}#{$gridle-class-separator}"; - } @else { - $sel : "#{$sel}#{$var}"; - } - } - } - - // update i : - $i : $i + 1; - } - - // return generated class : - @return $sel; -} - - -/** - * Get the media query for a particular state, or with, etc... - * - * @param Mixed $state-or-min-width The state name of the min with - * @param Mixed $max-width The max width if first param is a min width - * @return String The media query string without the @media - */ -@function _gridle_get_media_query( - $state-or-settings -) { - // check if is a string : - $state : null; - @if type-of($state-or-settings) == string - { - $state : _gridle_get_state($state-or-settings); - } - @else if $state-or-settings == null - { - $state : $_gridle-settings; - } - @else - { - $state : map-merge($_gridle-settings, $state-or-settings); - } - - // if it's some settings or a state : - @if $state { - - // get vars : - $name : map-get($state, name); - $min-width : map-get($state, min-width); - $max-width : map-get($state, max-width); - $query : map-get($state, query); - - // direct query : - @if $query - { - @return $query; - } - @else if $min-width and $max-width - { - @return "screen and (min-width: #{$min-width}) and (max-width: #{$max-width})"; - } - @else if $min-width - { - @return "screen and (min-width: #{$min-width})"; - } - @else if $max-width - { - @return "screen and (max-width: #{$max-width})"; - } - @else - { - @return null; - } - - } - @else - { - @return null; - } -} - - -/** - * Get states count - * - * @return int The number of states defined - */ -@function _gridle_get_states_count() { - @return length($_gridle_states) / length($_gridle_states_vars_pattern); -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_generate-mixins.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_generate-mixins.scss deleted file mode 100644 index d09a0e37c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_generate-mixins.scss +++ /dev/null @@ -1,624 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Generate mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - - -/** - * Generate a custom class for all the states - * - * @param list $pattern The name pattern of the class - * @param list $statesNames The states names to generate - */ -@mixin gridle_generate_custom_class( - $pattern, - $statesNames : null -) { - // manage states to generate : - $states : (); - @if $statesNames == null { - // loop on each states to generate names list : - @each $stateName, $state in $_gridle_states { - $states : append($states, $stateName); - } - } @else { - $states : $statesNames; - } - - // loop on each states : - @each $stateName in $states - { - // manage statename : - @if type-of($stateName) != string { - $stateName : map-get($stateName, name); - } - - // classes : - $classes : _gridle_get_var_value(classes, $stateName); - - // genrate the classname : - @if $classes - { - @include gridle_state($stateName, false) { - #{_gridle_classname($pattern, $stateName)} { - @content; - } - } - } - } -} - -// Generate all helpers classes -// All the classes generated are not wrapper in gridle_state -// in this mixin... Just the names are generated accordingly to the -// requested state -@mixin _gridle_generate_helper_classes ( - $state : null, - $what : null -) { - // helpers : - @if $what == null or index($what, float) or index($what, helpers) { - #{_gridle_classname($gridle-float-left-name-pattern, $state)} { - @include gridle_float(left); - } - #{_gridle_classname($gridle-float-right-name-pattern, $state)} { - @include gridle_float(right); - } - } - - @if $what == null or index($what, clear) or index($what, helpers) { - #{_gridle_classname($gridle-clear-name-pattern, $state)} { - @include gridle_clear(both); - } - #{_gridle_classname($gridle-clear-left-name-pattern, $state)} { - @include gridle_clear(left); - } - #{_gridle_classname($gridle-clear-right-name-pattern, $state)} { - @include gridle_clear(right); - } - } - - @if $what == null or index($what, no_gutter) or index($what, no_margin) or index($what, helpers) { - #{_gridle_classname($gridle-no-gutter-name-pattern, $state)}, - #{_gridle_classname($gridle-no-margin-name-pattern, $state)} { - @include gridle_no_margin(); - } - #{_gridle_classname($gridle-no-gutter-left-name-pattern, $state)}, - #{_gridle_classname($gridle-no-margin-left-name-pattern, $state)} { - @include gridle_no_margin(left); - } - #{_gridle_classname($gridle-no-gutter-right-name-pattern, $state)}, - #{_gridle_classname($gridle-no-margin-right-name-pattern, $state)} { - @include gridle_no_margin(right); - } - #{_gridle_classname($gridle-no-gutter-top-name-pattern, $state)}, - #{_gridle_classname($gridle-no-margin-top-name-pattern, $state)} { - @include gridle_no_margin(top); - } - #{_gridle_classname($gridle-no-gutter-bottom-name-pattern, $state)}, - #{_gridle_classname($gridle-no-margin-bottom-name-pattern, $state)} { - @include gridle_no_margin(bottom); - } - } - - @if $what == null or index($what, gutter) or index($what, margin) or index($what, helpers) { - #{_gridle_classname($gridle-gutter-name-pattern, $state)}, - #{_gridle_classname($gridle-margin-name-pattern, $state)} { - @include gridle_margin(left right); - } - #{_gridle_classname($gridle-gutter-left-name-pattern, $state)}, - #{_gridle_classname($gridle-margin-left-name-pattern, $state)} { - @include gridle_margin(left); - } - #{_gridle_classname($gridle-gutter-right-name-pattern, $state)}, - #{_gridle_classname($gridle-margin-right-name-pattern, $state)} { - @include gridle_margin(right); - } - #{_gridle_classname($gridle-gutter-top-name-pattern, $state)}, - #{_gridle_classname($gridle-margin-top-name-pattern, $state)} { - @include gridle_margin(top); - } - #{_gridle_classname($gridle-gutter-bottom-name-pattern, $state)}, - #{_gridle_classname($gridle-margin-bottom-name-pattern, $state)} { - @include gridle_margin(bottom); - } - } - - @if $what == null or index($what, auto_height) or index($what, helpers) { - #{_gridle_classname($gridle-auto-height-name-pattern, $state)} { - height:inherit; - } - } - - @if $what == null or index($what, centered) or index($what, helpers) { - #{_gridle_classname($gridle-centered-name-pattern, $state)} { - @include gridle_centered(null); - } - } - - @if $what == null or index($what, parent) or index($what, helpers) { - #{_gridle_classname($gridle-parent-name-pattern, $state)} { - @include _gridle_parent(); - } - } - - @if $what == null or index($what, vertical_align) or index($what, helpers) { - #{_gridle_classname($gridle-vertical-align-middle-name-pattern, $state)} { - @include _gridle_vertical_align(); - } - #{_gridle_classname($gridle-vertical-align-top-name-pattern, $state)} { - @include _gridle_vertical_align(top); - } - #{_gridle_classname($gridle-vertical-align-bottom-name-pattern, $state)} { - @include _gridle_vertical_align(bottom); - } - } - - /** - * Visible, hide, etc... - */ - @if $what == null or index($what, hide) or index($what, helpers) { - #{_gridle_classname($gridle-hide-name-pattern, $state)} { - @include gridle_hide(null); - } - } - - @if $what == null or index($what, not_visible) or index($what, helpers) { - #{_gridle_classname($gridle-not-visible-name-pattern, $state)} { - @include gridle_not_visible(null); - } - } - - @if $what == null or index($what, show) or index($what, helpers) { - #{_gridle_classname($gridle-show-name-pattern, $state)} { - @include gridle_show(null); - } - #{_gridle_classname($gridle-show-inline-name-pattern, $state)} { - @include gridle_show_inline(null); - } - } - - @if $what == null or index($what, visible) or index($what, helpers) { - #{_gridle_classname($gridle-visible-name-pattern, $state)} { - @include gridle_visible(null); - } - } - - /** - * Clear each class : - */ - @if $what == null or index($what, clear_each) or index($what, helpers) { - @each $clearName, $clearMap in $_gridle_clear_classes { - // get count : - $clearCount : map-get($clearMap, clearEach); - // what to clear : - $clearWhat : map-get($clearMap, clearWhat); - // generate the class : - #{_gridle_classname($gridle-clear-each-pattern, $state, $clearCount)} { - @include _gridle_clear_each($clearCount, $clearWhat); - } - } - } - - // debug colors : - $debug : _gridle_get_var_value(debug, $state); - @if $debug and ( $what == null or index($what, debug_colors) or index($what, helpers) ) { - // debug color classes : - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 1)} { - #{$gridle-debug-selector} { - background-color : #edeeb2; - } - } - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 2)} { - #{$gridle-debug-selector} { - background-color : #fae4a7; - } - } - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 3)} { - #{$gridle-debug-selector} { - background-color : #f5eacc; - } - } - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 4)} { - #{$gridle-debug-selector} { - background-color : #eebdb2; - } - } - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 5)} { - #{$gridle-debug-selector} { - background-color : #d4b2ee; - } - } - #{_gridle_classname($gridle-debug-color-name-pattern, $state, 6)} { - #{$gridle-debug-selector} { - background-color : #b2d8ee; - } - } - } -} - - -// generate settings json : -@mixin gridle_generate_json_settings() { - - // settings content : - $gridle-settings-states : "{"; - - // generate all classes for differents media queries : - $statesCount : length($_gridle_states); - $i : 0; - @each $stateName, $state in $_gridle_states { - - $name : $stateName; - - $gridle-settings-states : "#{$gridle-settings-states} \"#{$name}\":{"; - - @each $varName, $var in $state { - - $value : null; - @if $varName == "query" { - $value : _gridle_get_media_query($stateName); - } @else { - $value : map-get($state,$varName); - } - - @if $value == null { - $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : null,"; - } @elseif type-of($value) == bool { - $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : #{$value},"; - } @else { - $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : \"#{$value}\","; - } - } - - $gridle-settings-states : "#{$gridle-settings-states} \"_gridle\" : true"; - - @if $i >= $statesCount - 1 { - $gridle-settings-states : "#{$gridle-settings-states} }"; - } @else { - $gridle-settings-states : "#{$gridle-settings-states} },"; - } - - // update i : - $i : $i + 1; - - } - - // generate settings json : - $gridle-settings-states : "#{$gridle-settings-states}}"; - $gridle-settings : "{"; - $gridle-settings : "#{$gridle-settings} \"version\" : \"#{$_gridle-version}\""; - - // states : - $gridle-settings : "#{$gridle-settings}, \"states\" : #{$gridle-settings-states}"; - - // debug devices : - $debug_devices : $_gridle_states_debug_devices; - @if length($_gridle_states_debug_devices) <= 0 { - $debug_devices : null; - } - // $gridle-settings : "#{$gridle-settings}, \"debugDevices\" : { #{$debug_devices} }"; - - // settings : - // $gridle-settings : "#{$gridle-settings}, \"classPrefix\" : \"#{$gridle-class-prefix}\""; - $gridle-settings : "#{$gridle-settings} }"; - #gridle-settings { - content : $gridle-settings; - } -} - - -// gridle mixin : -// Generate all the classes needed for a grid -@mixin gridle_generate_classes( - $stateName : null, - $what : null, - $scope : null -) { - // if the what parameter is not null, mean that we need to generate only certain classes in a certain order : - @if $what - { - // loop on each what item to generate the corresponding classes : - @each $w in $what - { - // check if a scope exist : - @if $scope { - // wrapp grid into scope : - .#{$scope} { - @include _gridle_generate_classes($stateName, ( $w ), true); - } - } @else { - // generate classes : - @include _gridle_generate_classes($stateName, ( $w ), false); - } - } - } - @else - { - // don't have any "what" parameter so generate all the classes - // check if a scope exist : - @if $scope { - // wrapp grid into scope : - .#{$scope} { - @include _gridle_generate_classes($stateName, null, true); - } - } @else { - // generate classes : - @include _gridle_generate_classes($stateName, null, false); - } - } -} -$_gridle_generateOnlyOnce : true; // keep track of generate once classes -@mixin _gridle_generate_classes( - $stateName : null, - $what : null, - $has-parent : false -) { - - // generate these classes only once : - @if $_gridle_generateOnlyOnce - { - - // update status : - $_gridle_generateOnlyOnce : false; - - // | ------------------------ - // | Windows 8 fix - // | ------------------------ - - // Windows 8 fix for snap mode : - @media screen and (max-width: 400px) { - @-ms-viewport { width: device-width; } - } - - - // | ------------------------ - // | Container - // | ------------------------ - - // generate container class : - @if $what == null or index($what, container) or index($what, default) - { - $container-selector : (); - $container-selector : append( $container-selector, unquote("#{_gridle_classname($gridle-container-name-pattern)}"), comma); - #{$container-selector} { - @include gridle_container(); - } - } - - - // | ------------------------ - // | Parent selector - // | ------------------------ - - // parent common css : - @if $what == null or index($what, parent) or index($what, default) - { - $parentSelector : _gridle_classname($gridle-parent-name-pattern,null,null); - #{$parentSelector} { - @extend %gridle-clearfix; - @extend %gridle-parent-common; - } - } - - - // // | ------------------------ - // // | JSON Settings - // // | ------------------------ - - // // generate json settings : - @if $gridle-generate-json-settings - { - @include gridle_generate_json_settings(); - } - - } - - - // | ------------------------ - // | Set the list of states to generate - // | ------------------------ - $states : $_gridle_states; - @if $stateName and _gridle_has_state($stateName) { - $states : map-set((), $stateName, _gridle_get_state($stateName)); - } - - - // | ------------------------ - // | Store all the generated common selectors - // | ------------------------ - - // generate all selector for extends : - $grid-common-selector : (); - $push-common-selector : (); - $pull-common-selector : (); - $prefix-common-selector : (); - $suffix-common-selector : (); - - - // | ------------------------ - // | Media queries classes common selectors - // | ------------------------ - - // generate all classes for media queries : - @each $stateName, $state in $states { - - // setup vars : - $media : $stateName; - $classes : map-get($state, classes); - $context : map-get($state, context); - $name-multiplicator : map-get($state, name-multiplicator); - $generate-push-classes : _gridle_get_var_value(generate-push-classes, $state); - $generate-pull-classes : _gridle_get_var_value(generate-pull-classes, $state); - $generate-prefix-classes : _gridle_get_var_value(generate-prefix-classes, $state); - $generate-suffix-classes : _gridle_get_var_value(generate-suffix-classes, $state); - - // generate classes : - @if $classes == true and $context { - - // get specials columns : - $columnsMap : map-merge((), $_gridle_columns); - - // register each default columns : - @for $j from 0 through $context { - - // name : - $columnName : "#{$j*$name-multiplicator}"; - $columnWidth : $j * $name-multiplicator; - - // // create a column : - $col : _gridle_create_column($columnName, $columnWidth, $context, $name-multiplicator); - - // // add column in columns map : - $columnsMap : map-set($columnsMap, $columnName, $col); - } - - // loop on each columns to generate common selector : - @each $columnName, $column in $columnsMap { - - // add selector : - @if $what == null or index($what, grid) or index($what, default) { - $grid-common-selector : append( $grid-common-selector, unquote("#{_gridle_classname($gridle-grid-name-pattern, $media, $columnName)}"), comma ); - } - @if $generate-push-classes and ($what == null or index($what, push) or index($what, default)) { - $push-common-selector : append( $push-common-selector, unquote("#{_gridle_classname($gridle-push-name-pattern, $media, $columnName)}"), comma ); - } - @if $generate-pull-classes and ($what == null or index($what, pull) or index($what, default)) { - $pull-common-selector : append( $pull-common-selector, unquote("#{_gridle_classname($gridle-pull-name-pattern, $media, $columnName)}"), comma ); - } - @if $generate-prefix-classes and ($what == null or index($what, prefix) or index($what, default)) { - $prefix-common-selector : append( $prefix-common-selector, unquote("#{_gridle_classname($gridle-prefix-name-pattern, $media, $columnName)}"), comma ); - } - @if $generate-suffix-classes and ($what == null or index($what, suffix) or index($what, default)) { - $suffix-common-selector : append( $suffix-common-selector, unquote("#{_gridle_classname($gridle-suffix-name-pattern, $media, $columnName)}"), comma ); - } - } - } - } - - // common css : - @if $what == null or index($what, grid) or index($what, default) { - #{$grid-common-selector} { - @include _gridle_grid_common(); - } - } - @if $what == null or index($what, push) or index($what, default) { - #{$push-common-selector} { - @include _gridle_push_common(); - } - } - @if $what == null or index($what, pull) or index($what, default) { - #{$pull-common-selector} { - @include _gridle_pull_common(); - } - } - @if $what == null or index($what, prefix) or index($what, default) { - #{$prefix-common-selector} { - @include _gridle_prefix_common(); - } - } - @if $what == null or index($what, suffix) or index($what, default) { - #{$suffix-common-selector} { - @include _gridle_suffix_common(); - } - } - - - // | ------------------------ - // | Media queries classes - // | ------------------------ - - // generate all classes for differents media queries : - @each $stateName, $state in $states { - - // setup vars : - $classes : _gridle_get_var_value(classes, $state); - $context : _gridle_get_var_value(context, $state); - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $generate-push-classes : _gridle_get_var_value(generate-push-classes, $state); - $generate-pull-classes : _gridle_get_var_value(generate-pull-classes, $state); - $generate-prefix-classes : _gridle_get_var_value(generate-prefix-classes, $state); - $generate-suffix-classes : _gridle_get_var_value(generate-suffix-classes, $state); - $generate-helpers-classes : _gridle_get_var_value(generate-helpers-classes, $state); - - // generate all media queries grid classes : - @if $classes == true { - - // parent common css : - $parentSelector : _gridle_classname($gridle-parent-name-pattern,$stateName,null); - #{$parentSelector} { - @extend %gridle-clearfix; - @extend %gridle-parent-common; - } - - // generate all the classes : - @include gridle_state($stateName, $has-parent) { - - // get specials columns : - $columnsMap : map-merge((), $_gridle_columns); - - // register each default columns : - @for $j from 0 through $context { - - // name : - $columnName : "#{$j*$name-multiplicator}"; - $columnWidth : $j * $name-multiplicator; - - // // create a column : - $col : _gridle_create_column($columnName, $columnWidth, $context, $name-multiplicator); - - // // add column in columns map : - $columnsMap : map-set($columnsMap, $columnName, $col); - } - - // generate all classes for columns : - @each $columnName, $column in $columnsMap { - - // variables : - $columnsCount : map-get($column, columns); - $columnsContext : map-get($column, context); - $columnsNameMultiplicator : map-get($column, name-multiplicator); - - // extend context in state (for columns) : - $extendedState : map-merge($state, ( - context : $columnsContext, - name-multiplicator : $columnsNameMultiplicator // inject the name multiplicator here getted from column to handle custom registered columns - )); - - // classes : - @if $what == null or index($what, grid) or index($what, default) { - #{_gridle_classname($gridle-grid-name-pattern, $stateName, $columnName)} { - @include _gridle($columnsCount, $extendedState); - } - } - @if $generate-push-classes == true and ($what == null or index($what, push) or index($what, default)) { - #{_gridle_classname($gridle-push-name-pattern, $stateName, $columnName)} { - @include _gridle_push($columnsCount, $extendedState); - } - } - @if $generate-pull-classes == true and ($what == null or index($what, pull) or index($what, default)) { - #{_gridle_classname($gridle-pull-name-pattern, $stateName, $columnName)} { - @include _gridle_pull($columnsCount, $extendedState); - } - } - @if $generate-prefix-classes == true and ($what == null or index($what, prefix) or index($what, default)) { - #{_gridle_classname($gridle-prefix-name-pattern, $stateName, $columnName)} { - @include _gridle_prefix($columnsCount, $extendedState); - } - } - @if $generate-suffix-classes == true and ($what == null or index($what, suffix) or index($what, default)) { - #{_gridle_classname($gridle-suffix-name-pattern, $stateName, $columnName)} { - @include _gridle_suffix($columnsCount, $extendedState); - } - } - } - - // media queries helpers classes : - @if $generate-helpers-classes == true { - @include _gridle_generate_helper_classes($stateName, $what); - } - } - } - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_gridle.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_gridle.scss deleted file mode 100644 index cddbe1376..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_gridle.scss +++ /dev/null @@ -1,141 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// Gridle (.scss) -// Gridle is an one and unique grid system file that allows you to generate almost all -// grid you've ever dreamt about. -// |------------------------------------------------------ -// |------------------------------------------------------ - -// |------------------------------------------------------ -// |------------------------------------------------------ -// Copyright (c) 2014 Olivier Bossel - -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -// documentation files (the "Software"), to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all copies or substantial portions -// of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// |------------------------------------------------------ -// |------------------------------------------------------ - -// |------------------------------------------------------ -// |------------------------------------------------------ -// @created 25.03.13 -// @updated 09.06.15 -// @author Olivier Bossel -// @version 1.3.40 -// |------------------------------------------------------ -// |------------------------------------------------------ - -$_gridle-version : "1.3.40"; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Variables -// |------------------------------------------------------ -// |------------------------------------------------------ - -$_gridle_settings : (); // the default settings -$_gridle_states : (); // the variable map for each states -$_gridle_clear_classes :(); // store each automatic clear count -$_gridle_columns : (); // store the registered special columns -$_gridle_states_debug_devices : (); // save the debug states devices - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Settings -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'settings'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Silent classes -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'silent-classes'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Common mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'common-mixins'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Functions -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'functions'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Settings mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'settings-mixins'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'mixins'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Generate mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'generate-mixins'; - - - - -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Default states -// |------------------------------------------------------ -// |------------------------------------------------------ - -@import 'default-states'; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_mixins.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_mixins.scss deleted file mode 100644 index b4e440443..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_mixins.scss +++ /dev/null @@ -1,831 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -// Helper to apply multiple config for a certain state with one mixin -@mixin gridle_set( - $settings, - $state : default -) { - - // loop on each settings - @each $settingName, $settingValue in $settings - { - $sn : unquote("#{$settingName}"); - $sv : $settingValue; - - // check if setting name is a state : - @if _gridle_has_state($sn) { - // process the state - @include gridle_set($sv, $sn); - } @else { - @if $sn == container { - @include gridle_container($state); - } @else if $sn == grid { - @include gridle($sv, $state); - } @else if $sn == push { - @include gridle_push($sv, $state); - } @else if $sn == pull { - @include gridle_pull($sv, $state); - } @else if $sn == prefix { - @include gridle_prefix($sv, $state); - } @else if $sn == suffix { - @include gridle_suffix($sv, $state); - } @else if $sn == pull { - @include gridle_pull($sv, $state); - } @else if $sn == clear_each { - @include gridle_clear_each(nth($sv,1), nth($sv,2), $state); - } @else if $sn == centered { - @include gridle_centered($state); - } @else if $sn == parent { - @include gridle_parent($state); - } @else if $sn == vertical_align { - @include gridle_vertical_align($sv, $state); - } @else if $sn == hide { - @if $sv == true { - @include gridle_hide($state); - } @else { - @include gridle_show($state); - } - } @else if $sn == show { - @if $sv == true { - @include gridle_show($state); - } @else { - @include gridle_hide($state); - } - } @else if $sn == visible { - @if $sv == true { - @include gridle_visible($state); - } @else { - @include gridle_not_visible($state); - } - } @else if $sn == not_visible { - @if $sv == true { - @include gridle_not_visible($state); - } @else { - @include gridle_visible($state); - } - } @else if $sn == show_inline { - @if $sv == true { - @include gridle_show_inline($state); - } @else { - @include gridle_hide($state); - } - } @else if $sn == float { - @include gridle_float($sv, $state); - } @else if $sn == clear { - @include gridle_clear($sv, $state); - } @else if $sn == no_gutter - or $sn == no_margin { - @include gridle_no_gutter($sv, $state); - } @else if $sn == gutter - or $sn == margin { - @include gridle_gutter($sv, $state); - } @else { - // we do nothing - } - } - } -} - -// Responsive helpers mixins : -@mixin gridle_state( - $states, - $has-parent : true -) { - - // check first param if is a state : - $firstState : nth($states,1); - @if _gridle_has_state($firstState) { - - // loop on each states : - @each $state in $states - { - // variables : - $html-states-classes : _gridle_get_var_value(html-states-classes, $state); - $debug : _gridle_get_var_value(debug, $state); - $stateName : _gridle_get_var_value(name, $state); - - // check if is a state : - @if ($html-states-classes or $debug) - and $stateName { - // html class : - @if $has-parent { - html#{_gridle_classname("#{$stateName}")} & { @content; } - } @else { - html#{_gridle_classname("#{$stateName}")} { @content; } - } - } - - // get the media query : - $q : _gridle_get_media_query($state); - - // make the media query if a query exist : - @if $q { - @media #{$q} { - @content; - } - } - @else - { - @content; - } - } - - } @else { - - // variables : - $html-states-classes : _gridle_get_var_value(html-states-classes, $states); - $debug : _gridle_get_var_value(debug, $states); - $stateName : _gridle_get_var_value(name, $states); - - // check if is a state : - @if ($html-states-classes or $debug) - and $stateName { - // html class : - @if $has-parent { - html#{_gridle_classname("#{$stateName}")} & { @content; } - } @else { - html#{_gridle_classname("#{$stateName}")} { @content; } - } - } - - // get the media query : - $q : _gridle_get_media_query($states); - - // make the media query if a query exist : - @if $q { - @media #{$q} { - @content; - } - } - @else - { - @content; - } - - } -} - - - -// Container mixin : -@mixin gridle_container( - $state : default -) { - @include _gridle_container_common($state); -} - - -// Grid mixin : -// Set the width of the specified grid column : -@mixin gridle( - $columns, - $state-or-context : default, - $state : default -) { - // manage state and context : - $context : null; - @if type-of($state-or-context) == number { - $context : $state-or-context; - } @else { - $state : $state-or-context; - } - - // common : - @include _gridle_grid_common(); - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle($columns, $state, $context); - } - } @else { - @include _gridle($columns, $state, $context); - } -} -@mixin _gridle( - $columns, - $state : default, - $context : null -) { - // vars : - $name : _gridle_get_var_value(name, $state); - @if type-of($context) != number { - $context : _gridle_get_var_value(context, $state); - } - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $gutter-width : _gridle_get_var_value(gutter-width, $state); - $ie7-support : _gridle_get_var_value(ie7-support, $state); - $debug : _gridle_get_var_value(debug, $state); - $debug-show-class-names : _gridle_get_var_value(debug-show-class-names, $state); - - // manage columns - @if type-of($columns) != number and map-has-key($_gridle_columns, $columns) { - // the columns is a saved one, get the context and column value - $column : map-get($_gridle_columns, $columns); - $context : map-get($column, context); - $columns : map-get($column, columns); - } @else if type-of($columns) == number { - $columns : $columns / $name-multiplicator; - } @else { - @error "the column #{$columns} does not exist..."; - } - - // vars : - $width : percentage(1 / $context * $columns); - - // set value : - width:$width; - - // ie7 support : - @if $ie7-support == true { - *width: expression((this.parentNode.clientWidth/#{$context}*#{($columns / $name-multiplicator)} - parseInt(this.currentStyle['paddingLeft']) - parseInt(this.currentStyle['paddingRight'])) + 'px'); - } - - // debug : - @if $debug == true and $debug-show-class-names == true { - #{$gridle-debug-selector} { - &:before { - @if $name == default { - content:"grid-#{$name}-#{$columns}"; - } @else { - content:"grid-#{$name}-#{$columns}" !important; - } - } - &.parent:before { - @if $name == default { - content:"grid-parent-#{$name}-#{$columns}"; - } @else { - content:"grid-parent-#{$name}-#{$columns}" !important; - } - } - } - } -} - - -// push : -// Push the element of the count of column wanted -@mixin gridle_push( - $columns, - $state-or-context : default, - $state : default -) { - // manage state and context - $context : null; - @if type-of($state-or-context) == number { - $context : $state-or-context; - } @else { - $state : $state-or-context; - } - - // common : - @include _gridle_push_common($state); - - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_push($columns, $state, $context); - } - } @else { - @include _gridle_push($columns, $state, $context); - } -} -@mixin _gridle_push( - $columns, - $state : default, - $context : null -) { - // variables : - $name : _gridle_get_var_value(name, $state); - @if type-of($context) != number { - $context : _gridle_get_var_value(context, $state); - } - $direction : _gridle_get_var_value(direction, $state); - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $debug : _gridle_get_var_value(debug, $state); - $debug-show-class-names : _gridle_get_var_value(debug-show-class-names, $state); - - // vars : - $width : percentage(1 / $context) * ($columns / $name-multiplicator); - @if $direction == rtl { $width : $width*-1; } - left:$width; - - // debug css : - @if $debug == true and $debug-show-class-names == true { - #{$gridle-debug-selector} { - &:after { - @if $name == default { - content:"push-#{$name}-#{$columns}"; - } @else { - content:"push-#{$name}-#{$columns}" !important; - } - } - } - } - -} - - -// pull : -// Pull the element of the count of column wanted -@mixin gridle_pull( - $columns, - $state : default -) { - // common : - @include _gridle_pull_common($state); - - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_pull($columns,$state); - } - } @else { - @include _gridle_pull($columns,$state); - } -} -@mixin _gridle_pull( - $columns, - $state : default -) { - // vars : - $name : _gridle_get_var_value(name, $state); - $context : _gridle_get_var_value(context, $state); - $direction : _gridle_get_var_value(direction, $state); - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $debug : _gridle_get_var_value(debug, $state); - $debug-show-class-names : _gridle_get_var_value(debug-show-class-names, $state); - - // vars : - $width : percentage(1 / $context) * ($columns / $name-multiplicator); - @if $direction == rtl { $width : $width*-1; } - right:$width; - - // debug css : - @if $debug == true and $debug-show-class-names == true { - #{$gridle-debug-selector} { - &:after { - @if $name == default { - content:"pull-#{$name}-#{$columns}"; - } @else { - content:"pull-#{$name}-#{$columns}" !important; - } - } - } - } -} - - -// push : -// Push the element of the count of column wanted -@mixin gridle_prefix( - $columns, - $state : default -) { - // common : - @include _gridle_prefix_common($state); - - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_prefix($columns,$state); - } - } @else { - @include _gridle_prefix($columns,$state); - } -} -@mixin _gridle_prefix( - $columns, - $state : default -) { - // vars : - $name : _gridle_get_var_value(name, $state); - $context : _gridle_get_var_value(context, $state); - $direction : _gridle_get_var_value(direction, $state); - $gutter-width : _gridle_get_var_value(gutter-width, $state); - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $debug : _gridle_get_var_value(debug, $state); - $debug-show-class-names : _gridle_get_var_value(debug-show-class-names, $state); - - // vars : - $width : percentage(1 / $context) * ($columns / $name-multiplicator); - - // set value : - @if $direction == rtl { margin-right:$width; } - @else { margin-left:$width; } - - // debug css : - @if $debug == true and $debug-show-class-names == true { - #{$gridle-debug-selector} { - &:after { - @if $name == default { - content:"prefix-#{$name}-#{$columns}"; - } @else { - content:"prefix-#{$name}-#{$columns}" !important; - } - } - } - } -} - - -// pull : -// Pull the element of the count of column wanted -@mixin gridle_suffix( - $columns, - $state : default -) { - // common : - @include _gridle_suffix_common($state); - - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_suffix($columns,$state); - } - } @else { - @include _gridle_suffix($columns,$state); - } -} -@mixin _gridle_suffix( - $columns, - $state : default -) { - // vars : - $name : _gridle_get_var_value(name, $state); - $context : _gridle_get_var_value(context, $state); - $direction : _gridle_get_var_value(direction, $state); - $gutter-width : _gridle_get_var_value(gutter-width, $state); - $name-multiplicator : _gridle_get_var_value(name-multiplicator, $state); - $debug : _gridle_get_var_value(debug, $state); - $debug-show-class-names : _gridle_get_var_value(debug-show-class-names, $state); - - // vars : - $width : percentage(1 / $context) * ($columns / $name-multiplicator); - - // set value : - @if $direction == rtl { margin-left:$width; } - @else { margin-right:$width; } - - // debug css : - @if $debug == true and $debug-show-class-names == true { - #{$gridle-debug-selector} { - &:after { - @if $name == default { - content:"suffix-#{$name}-#{$columns}"; - } @else { - content:"suffix-#{$name}-#{$columns}" !important; - } - } - } - } -} - - -// grid background : -// Display the grid background debug -@mixin gridle_grid_background( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_grid_background($state); - } - } @else { - @include _gridle_grid_background($state); - } -} -@mixin _gridle_grid_background( - $state : default -) { - - // variables : - $context : _gridle_get_var_value(context, $state); - - position:relative; - z-index:9999; - &:before { - content:''; - position:absolute; - top:0; left:0; - width:100%; height:100% !important; - // vars : - $width : percentage(1 / $context); - background: linear-gradient(to right, rgba(0,0,0,.01) 50% , rgba(0,0,0,.04) 50%); /* Standard syntax */ - background-size:($width*2) 100%; - // background-position:$gridle-gutter-width/2 0; - } -} - - -/** - * Parent clear each - */ -// Grid mixin : -// Set the width of the specified grid column : -@mixin gridle_clear_each( - $clearEach, - $clearWhat : both, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_clear_each($clearEach, $clearWhat); - } - } @else { - @include _gridle_clear_each($clearEach, $clearWhat); - } -} -@mixin _gridle_clear_each( - $clearEach, - $clearWhat -) { - > *:nth-child(#{$clearEach}n+1) { - clear : $clearWhat; - } -} - - -// Grid centered : -@mixin gridle_centered( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_centered(); - } - } @else { - @include _gridle_centered(); - } -} -@mixin _gridle_centered() { - display:block !important; - float:none !important; - margin-left:auto !important; - margin-right:auto !important; - clear:both !important; -} - - -// Grid parent : -@mixin gridle_parent( - $state : default -) { - // common : - @include _gridle_parent_common(); - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_parent(); - } - } @else { - @include _gridle_parent(); - } -} -@mixin _gridle_parent() { - @include gridle_no_gutter(); -} - - -/** - * Vertical align : - */ -@mixin gridle_vertical_align( - $align : middle, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_vertical_align($align); - } - } @else { - @include _gridle_vertical_align($align); - } -} -@mixin _gridle_vertical_align( - $align : middle -) { - font-size:0; - clear:both; - - > * { - display:inline-block; - float:none !important; - vertical-align:$align; - font-size:1rem; - } -} - - -// Hide on : -// @param String $media On what state -@mixin gridle_hide( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_hide(); - } - } @else { - @include _gridle_hide(); - } -} -@mixin _gridle_hide() { - display:none; -} - - -// Not visible on : -// @param String $media What to hide (one of the 3 state classes name) -@mixin gridle_not_visible( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_not_visible(); - } - } @else { - @include _gridle_not_visible(); - } -} -@mixin _gridle_not_visible() { - visibility:hidden; -} - - -// Show on -// @param String $media What to hide (one of the 3 state classes name) -@mixin gridle_show( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_show(); - } - } @else { - @include _gridle_show(); - } -} -@mixin _gridle_show() { - display:block; -} - - -/** - * Show inline - * - * @param String $state The state name - */ -@mixin gridle_show_inline( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_show_inline(); - } - } @else { - @include _gridle_show_inline(); - } -} -@mixin _gridle_show_inline() { - display:inline-block; -} - - -// Visible on : -// @param String $media On what state -@mixin gridle_visible( - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_visible(); - } - } @else { - @include _gridle_visible(); - } -} -@mixin _gridle_visible() { - visibility:visible; -} - - -// Gridle Right : -@mixin gridle_float( - $float-direction : left, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_float($float-direction); - } - } @else { - @include _gridle_float($float-direction); - } -} -@mixin _gridle_float( - $float-direction : left -) { - float:#{$float-direction}; -} - - -// Gridle clear : -// @param String $clear-direction The direction to clear -// @param String $state The state -@mixin gridle_clear( - $clear-direction : both, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_clear($clear-direction); - } - } @else { - @include _gridle_clear($clear-direction); - } -} -@mixin _gridle_clear( - $clear-direction : both -) { - clear:#{$clear-direction}; -} - - -// Gridle no gutter : -// @param String $side The side to clear -// @param String $state The state -@mixin gridle_no_gutter( - $side : left right, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_no_gutter($side); - } - } @else { - @include _gridle_no_gutter($side); - } -} -@mixin gridle_no_margin( - $side : left right, - $state : default -) { - @include gridle_no_gutter($side, $state); -} -@mixin _gridle_no_gutter( - $side : left right -) { - @each $s in $side { - padding-#{$s} : 0; - } -} - - -// Gridle gutter : -// @param String $side The side to clear -// @param String $state The state -@mixin gridle_gutter( - $side : left right, - $state : default -) { - // check if need media query : - @if $state { - @include gridle_state($state) { - @include _gridle_gutter($side); - } - } @else { - @include _gridle_gutter($side); - } -} -// shortcut : -@mixin gridle_margin( - $side : left right, - $state : default -) { - @include gridle_gutter($side, $state); -} -@mixin _gridle_gutter( - $side : left right, - $state : default -) { - $gutter-width : _gridle_get_var_value(gutter-width, $state); - @each $s in $side { - padding-#{$s} : $gutter-width / 2; - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings-mixins.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings-mixins.scss deleted file mode 100644 index bfd2df859..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings-mixins.scss +++ /dev/null @@ -1,139 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Settings mixins -// |------------------------------------------------------ -// |------------------------------------------------------ - -/** - * Setup - */ -@mixin gridle_setup( - $settings : () -) { - $_gridle-settings : map-merge(( - name : default, - min-width : null, - max-width : null, - query : null, - classes : true, - context : 12, - gutter-width : 20px, - direction : ltr, - name-multiplicator : 1, - debug : false, - debug-show-class-names : true, - ie7-support : false, - html-states-classes : false, - generate-push-classes : true, - generate-pull-classes : true, - generate-prefix-classes : true, - generate-suffix-classes : true, - generate-helpers-classes : true - ), $settings) !global; - - // register default state : - @include gridle_register_state(default, $_gridle-settings); - -} - -// Register an state : -@mixin gridle_register_state( - $name, - $settings -) { - // settings : - $settings : map-merge($_gridle-settings, $settings); - - // set name : - $settings : map-set($settings, name, $name); - - // add state in maps : - $_gridle_states : map-set($_gridle_states, $name, $settings) !global; -} - - -/** - * Register a clear each class - */ -@mixin gridle_register_clear_each( - $count, - $clearWhat -) { - // create the clear map : - $classMap : ( - clearEach : $count, - clearWhat : $clearWhat - ); - - // append to map : - $_gridle_clear_classes : map-set($_gridle_clear_classes, $count, $classMap) !global; -} - - -/** - * Register a special class - */ -@mixin gridle_register_column( - $name, - $columns, - $context -) { - // create a column : - $col : _gridle_create_column($name, $columns, $context); - - // add column in maps : - $_gridle_columns : map-set($_gridle_columns, $name, $col) !global; -} - - -/** - * Register default states - */ -@mixin gridle_register_default_states() { - @include gridle_register_state(mobile, ( - max-width : 480px - )); - @include gridle_register_state(tablet, ( - min-width : 481px, - max-width : 1024px - )); -} - - -/** - * Register default mobile first states : - */ -@mixin gridle_register_default_mobile_first_states() { - @include gridle_register_state(xs, ( - max-width : 768px - )); - @include gridle_register_state(sm, ( - min-width : 768px - )); - @include gridle_register_state(md, ( - min-width : 992px - )); - @include gridle_register_state(lg, ( - min-width : 1200px - )); -} - - -/** - * Set the debug device (not used for now) - * - * @param String $state The state to update - * @para m String $device The device to use (iphone, etc...) - */ -@mixin gridle_set_debug_device( - $state : default, - $device : null -) { - - // check params : - @if $state and $device { - // set the state device : - $_gridle_states_debug_devices : append($_gridle_states_debug_devices, unquote("\"#{$state}\" : \"#{$device}\""), comma); - } - -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings.scss deleted file mode 100644 index 991c35154..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_settings.scss +++ /dev/null @@ -1,69 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Settings -// |------------------------------------------------------ -// |------------------------------------------------------ - -$gridle-generate-json-settings : true !default; - -$gridle-debug-selector : ".gridle-debug &, &.gridle-debug" !default; - -$gridle-class-prefix : '' !default; -$gridle-class-separator : '-' !default; - -$gridle-container-name-pattern : ('container') !default; - -$gridle-grid-name-pattern : ('grid','%-','%state','%-','%count') !default; -$gridle-push-name-pattern : ('push','%-','%state','%-','%count') !default; -$gridle-pull-name-pattern : ('pull','%-','%state','%-','%count') !default; -$gridle-prefix-name-pattern : ('prefix','%-','%state','%-','%count') !default; -$gridle-suffix-name-pattern : ('suffix','%-','%state','%-','%count') !default; - -$gridle-parent-name-pattern : ('parent','%-','%state') !default; -$gridle-centered-name-pattern : ('centered','%-','%state') !default; - -$gridle-vertical-align-middle-name-pattern : ('vertical','%-','align','%-','%state','%-','middle') !default; -$gridle-vertical-align-top-name-pattern : ('vertical','%-','align','%-','%state','%-','top') !default; -$gridle-vertical-align-bottom-name-pattern : ('vertical','%-','align','%-','%state','%-','bottom') !default; - -$gridle-hide-name-pattern : ('hide','%-','%state') !default; -$gridle-show-name-pattern : ('show','%-','%state') !default; -$gridle-show-inline-name-pattern : ('show','%-','inline','%-','%state') !default; -$gridle-not-visible-name-pattern : ('not','%-','visible','%-','%state') !default; -$gridle-visible-name-pattern : ('visible','%-','%state') !default; - -$gridle-float-left-name-pattern : ('float','%-','%state','%-','left') !default; -$gridle-float-right-name-pattern : ('float','%-','%state','%-','right') !default; - -$gridle-clear-name-pattern : ('clear','%-','%state') !default; -$gridle-clear-left-name-pattern : ('clear','%-','%state','%-','left') !default; -$gridle-clear-right-name-pattern : ('clear','%-','%state','%-','right') !default; -$gridle-clear-each-pattern : ('clear','%-','each','%-','%state','%-','%count') !default; - -$gridle-no-gutter-name-pattern : ('no','%-','gutter','%-','%state') !default; -$gridle-no-gutter-left-name-pattern : ('no','%-','gutter','%-','%state','%-','left') !default; -$gridle-no-gutter-right-name-pattern : ('no','%-','gutter','%-','%state','%-','right') !default; -$gridle-no-gutter-top-name-pattern : ('no','%-','gutter','%-','%state','%-','top') !default; -$gridle-no-gutter-bottom-name-pattern : ('no','%-','gutter','%-','%state','%-','bottom') !default; - -$gridle-no-margin-name-pattern : ('no','%-','margin','%-','%state') !default; -$gridle-no-margin-left-name-pattern : ('no','%-','margin','%-','%state','%-','left') !default; -$gridle-no-margin-right-name-pattern : ('no','%-','margin','%-','%state','%-','right') !default; -$gridle-no-margin-top-name-pattern : ('no','%-','margin','%-','%state','%-','top') !default; -$gridle-no-margin-bottom-name-pattern : ('no','%-','margin','%-','%state','%-','bottom') !default; - -$gridle-gutter-name-pattern : ('gutter','%-','%state') !default; -$gridle-gutter-left-name-pattern : ('gutter','%-','%state','%-','left') !default; -$gridle-gutter-right-name-pattern : ('gutter','%-','%state','%-','right') !default; -$gridle-gutter-top-name-pattern : ('gutter','%-','%state','%-','top') !default; -$gridle-gutter-bottom-name-pattern : ('gutter','%-','%state','%-','bottom') !default; - -$gridle-margin-name-pattern : ('margins','%-','%state') !default; -$gridle-margin-left-name-pattern : ('margin','%-','%state','%-','left') !default; -$gridle-margin-right-name-pattern : ('margin','%-','%state','%-','right') !default; -$gridle-margin-top-name-pattern : ('margin','%-','%state','%-','top') !default; -$gridle-margin-bottom-name-pattern : ('margin','%-','%state','%-','bottom') !default; - -$gridle-auto-height-name-pattern : ('auto','%-','height','%-','%state') !default; - -$gridle-debug-color-name-pattern : ('debug','%-','color','%-','%state','%-','%count') !default; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_silent-classes.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_silent-classes.scss deleted file mode 100644 index da72abc58..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/gridle/_silent-classes.scss +++ /dev/null @@ -1,106 +0,0 @@ -// |------------------------------------------------------ -// |------------------------------------------------------ -// | Silent classes -// |------------------------------------------------------ -// |------------------------------------------------------ - -%gridle-pie-clearfix { - &:after { - content: "."; - display: block; - clear: both; - visibility: hidden; - line-height: 0; - height: 0; - } - - & { - display: inline-block; - } - - html[xmlns] & { - display: block; - } - - * html & { - height: 1%; - } -} -%gridle-simple-clearfix { - &:after { - content: ""; - display: table; - clear: both; - border-spacing:0; - } -} -%gridle-clearfix { - // For modern browser - &:before, - &:after { - content:""; - display:table; - border-spacing:0; - } - &:after { - clear:both; - } - // For IE 6/7 (trigger hasLayout - & { - zoom:1; - } -} -%gridle-push-pull-debug-background-common { - background-size:50px 90%; - background-position:0 50%; - background-repeat:repeat-x; -} -%gridle-push-pull-common { - position:relative; -} -%gridle-container-common { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -%gridle-parent-common { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -%gridle-container-debug-common { - background-color:#f5f5f5; -} -%gridle-grid-debug-common { - &:before, - &:after { - content:""; - display:block; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowRkEzNzVFNTg1NjgxMUUyOUI4RjhEMzg4QzM4QjZFOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowRkEzNzVFNjg1NjgxMUUyOUI4RjhEMzg4QzM4QjZFOCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjBGQTM3NUUzODU2ODExRTI5QjhGOEQzODhDMzhCNkU4IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjBGQTM3NUU0ODU2ODExRTI5QjhGOEQzODhDMzhCNkU4Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++5+BhQAAAA9JREFUeNpiYGBgkAIIMAAAHwAbZIBtGgAAAABJRU5ErkJggg==); - margin:10px 0; - padding:5px 0; - text-align:center; - color:white; - font-size:11px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - display:block !important; - } - background-color:#daeff5; -} -%gridle-grid-common { - display:inline-block; - min-height:1px; - - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -} -%gridle-prefix-debug-common { - background-color:#dae7e9 !important; -} -%gridle-suffix-debug-common { - background-color:#dae7e9 !important; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style-bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style-bootstrap.scss deleted file mode 100644 index f2536ae07..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style-bootstrap.scss +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Bootstrap style : - */ -.row { - margin:20px 0; // adding margin to rows -} -.thumb { - background:#eee; - width:100%; height:0; - padding-bottom:56%; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style.scss deleted file mode 100644 index 6cc1f299b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/style.scss +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Imports : - */ -@import 'compass/reset'; - -/** - * Import grid settings : - * This to be able to use gridle mixins, etc... - */ -@import 'grid-settings'; - -/** - * Medias : - */ -ul#medias { - background:black; - text-align:center; - margin-bottom:30px; - - li { - display:inline-block; - height:50px; - line-height:50px; - padding:0 30px; - color:white; - font-size:16px; - cursor:pointer; - margin:0; - - &.active, - &:hover { - background:white; - color:black; - } - } - - @include gridle_state(( - max-width : 620px - )) { - display:none; - } -} - -/** - * Basic formatting : - */ -html { - font:11px/1.5 'Helvetica Neue', Verdana, sans-serif; -} -body { - @include gridle_state(mobile tablet) { - text-align:center; - } - - @include gridle_state(ipad-landscape) { - font-size:16px; - } -} - - -/** - * Gridle set sample : - */ -#myCoolItem { - @include gridle_set(( - grid : 8, - push : 2, - tablet : ( - grid : 12, - push : 0 - ), - mobile : ( - visible : false - ) - )); -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/tests.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/tests.scss deleted file mode 100644 index 970fca71b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/gridle/tests.scss +++ /dev/null @@ -1,280 +0,0 @@ -// Import grid settings : -@import 'grid-settings'; - -// standard grid mixins : -.grid-12 { - @include gridle(12); -} -.grid-1on5 { - @include gridle("1on5"); -} -.grid-12-on-100 { - @include gridle(12, 100); -} -.grid-15-on-100-on-mobile { - @include gridle(15, 100, mobile); -} -.grid-30-on-100-on-mobile-and-tablet { - @include gridle(30, 100); - @include gridle(30, 100, mobile tablet); -} - -// parent -.grid-parent { - @include gridle_parent(); -} -.grid-parent-set { - @include gridle_set(( - parent : true - )); -} - -// clear each -.clear-each-2 { - @include gridle_clear_each(2); -} -.clear-each-2-left { - @include gridle_clear_each(2, left); -} -.clear-each-2-left-mobile { - @include gridle_clear_each(2, left, mobile); -} -.clear-each-2-set { - @include gridle_set(( - clear_each : ( 2, left ) - )); -} - -// centered -.centered { - @include gridle_centered(); -} -.centered-mobile { - @include gridle_centered(mobile); -} - -// certical align -.vertical-align { - @include gridle_vertical_align(); -} -.vertical-align-bottom { - @include gridle_vertical_align(bottom); -} -.vertical-align-top-mobile { - @include gridle_vertical_align(top, mobile); -} -.vertical-align-set { - @include gridle_set(( - vertical_align : middle - )); -} - -// push -.push-6 { - @include gridle_push(6); -} -.push-12-mobile { - @include gridle_push(12, mobile); -} -.push-set { - @include gridle_set(( - push : 3 - )); -} - -// pull -.pull-6 { - @include gridle_pull(6); -} -.pull-12-mobile { - @include gridle_pull(12, mobile); -} -.pull-set { - @include gridle_set(( - pull : 3 - )); -} - -// prefix -.prefix-6 { - @include gridle_prefix(6); -} -.prefix-12-mobile { - @include gridle_prefix(12, mobile); -} -.prefix-set { - @include gridle_set(( - prefix : 3 - )); -} - -// suffix -.suffix-6 { - @include gridle_suffix(6); -} -.suffix-12-mobile { - @include gridle_suffix(12, mobile); -} -.suffix-set { - @include gridle_set(( - suffix : 3 - )); -} - -// hide -.hide { - @include gridle_hide(); -} -.hide-mobile { - @include gridle_hide(mobile); -} -.hide-set { - @include gridle_set(( - hide : true - )); -} - -// show -.show { - @include gridle_show(); -} -.show-mobile { - @include gridle_show(mobile); -} -.show-set { - @include gridle_set(( - show : false - )); -} - -// show_inline -.show_inline { - @include gridle_show_inline(); -} -.show_inline-mobile { - @include gridle_show_inline(mobile); -} -.show_inline-set { - @include gridle_set(( - show_inline : true - )); -} - -// not_visible -.not_visible { - @include gridle_not_visible(); -} -.not_visible-mobile { - @include gridle_not_visible(mobile); -} -.not_visible-set { - @include gridle_set(( - not_visible : true - )); -} - -// visible -.visible { - @include gridle_visible(); -} -.visible-mobile { - @include gridle_visible(mobile); -} -.visible-set { - @include gridle_set(( - visible : false - )); -} - -// gridle state -.gridle-state { - background: red; - - @include gridle_state(mobile tablet) { - background: pink; - } - @include gridle_state(( - query : "only print" - )) { - background: yellow; - } - @include gridle_state(( - max-width : 200px - )) { - background: green; - } -} - -// gridle set -.gridle-set { - @include gridle_set(( - grid : 6, - push : 2, - tablet : ( - grid : 8, - push : 0, - ), - clear : left, - mobile : ( - grid : 12, - push : 0, - pull : 0 - ) - )); -} -.gridle-set-multiple { - @include gridle_set(( - grid : 6 - )); - @include gridle_set(( - grid : 12 - ), mobile tablet); -} - -// float-right -.float-right { - @include gridle_float(right); -} -.float-left-mobile { - @include gridle_float(left, mobile); -} -.float-set { - @include gridle_set(( - float : right - )); -} - -// clear -.clear { - @include gridle_clear(); -} -.clear-left-mobile { - @include gridle_clear(left, mobile); -} -.clear-set { - @include gridle_set(( - clear : left - )); -} - -// gutters -.gutters { - @include gridle_gutter(); -} -.gutters-left { - @include gridle_gutter(left); -} -.gutters-side-mobile { - @include gridle_gutter(left right, mobile); -} - -// no-gutter -.no-gutter { - @include gridle_no_gutter(); -} -.no-gutter-left { - @include gridle_no_gutter(left); -} -.no-gutter-side-mobile { - @include gridle_no_gutter(left right, mobile); -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/normalize/_normalize.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/normalize/_normalize.scss deleted file mode 100644 index 5e5e3c898..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/contrib/normalize/_normalize.scss +++ /dev/null @@ -1,424 +0,0 @@ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS and IE text size adjust after device orientation change, - * without disabling user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability of focused elements when they are also in an - * active/hover state. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - box-sizing: content-box; /* 2 */ -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_address.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_address.scss deleted file mode 100644 index afe4e573f..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_address.scss +++ /dev/null @@ -1,20 +0,0 @@ -div.chill_address { - div.chill_address_address { - margin: 0.7em 0; - font-size: 98%; - font-variant: small-caps; - - p { - display: inline-block; - margin: 0 0 0 1.5em; - text-indent: -1.5em; - } - - &.chill_address_address--multiline { - p { - display: block; - } - } - - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_box.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_box.scss deleted file mode 100644 index aa539f6a1..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_box.scss +++ /dev/null @@ -1,24 +0,0 @@ -.chill__box { - font-variant: small-caps; - display: inline; - padding: .2em .6em .3em; - font-size: 0.88rem; - font-weight: bold; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; - color: white; - - &.green { - background-color: var(--chill-green); - color: white; - } - - &.red { - background-color: var(--chill-red); - color: white; - } -} - diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_custom-fields.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_custom-fields.scss deleted file mode 100644 index e71c75ea6..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_custom-fields.scss +++ /dev/null @@ -1,14 +0,0 @@ -/* the cf title will look like a `form legend h2` */ -span.cf-title { - display: block; - font-weight: 700; - border-bottom: 3px solid $light-grey; - margin-bottom: 1em; -} - -span.cf-subtitle { - display: block; - font-weight: 600; - border-bottom: 1px solid $light-grey; - margin-bottom: 1em; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_flash_messages.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_flash_messages.scss deleted file mode 100644 index 62f875dfa..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_flash_messages.scss +++ /dev/null @@ -1,14 +0,0 @@ -.flash_message { - margin-top: 2.5em; -} - -// note that other level are defined in modules/_alerts.scss - -// .alert { -// // override in modules/_alerts.scss -// @include alert($red); -// } -// -// .warning { -// @include alert($orange); -// } diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_fonts.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_fonts.scss deleted file mode 100644 index 973e7c27b..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_fonts.scss +++ /dev/null @@ -1,2 +0,0 @@ - -@import '../../../fonts/OpenSans/OpenSans'; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_pagination.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_pagination.scss deleted file mode 100644 index 0c125df04..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_pagination.scss +++ /dev/null @@ -1,32 +0,0 @@ -.pagination { - display: flex; - justify-content: center; - text-align: center; - margin-top: 1em; - - .link { - background-color: white; - display: inline-block; - } - - .link:nth-of-type(1n+2) { - border-left: 1px solid $chill-light-gray; - } - - .link.current { - font-weight: bold; - color: white; - background-color: #334d5c; - padding: 0.4em 0.8em; - } - - .link a { - display: block; - padding: 0.4em 0.8em; - } - .link a:hover { - color: white; - font-weight: bold; - background-color: $chill-green; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_person.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_person.scss deleted file mode 100644 index 6d92923a9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_person.scss +++ /dev/null @@ -1,3 +0,0 @@ -.person { - color: $chill-blue; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_record_actions.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_record_actions.scss deleted file mode 100644 index ccbc5912a..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_record_actions.scss +++ /dev/null @@ -1,58 +0,0 @@ -// Symfony records actions -/*ul.record_actions { - padding-left: 0; -} -ul.record_actions li { - display: inline-block; -}*/ - -ul.record_actions, ul.record_actions_column { - display: flex; - justify-content: flex-end; - - &.record_actions--left { - justify-content: flex-start; - } - - padding: 0.5em 0; - flex-wrap: wrap-reverse; - - li { - display: inline-block; - list-style-type: none; - margin-right: 1em; - order: 99; - - &:last-child { - margin-right: 0; - } - } - - - li.cancel { - order: 1; - margin-right: auto; - } - -} - -ul.record_actions { - flex-direction: row; -} - -ul.record_actions_column { - flex-direction: column; -} - -ul.record_actions.sticky-form-buttons { - padding-left: 1em; - padding-right: 1em; -} - -// inside table, little space between elements -td ul.record_actions, - ul.record_actions_small { - li { - margin-right: 0.2em; - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_report.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_report.scss deleted file mode 100644 index dc7e48623..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_report.scss +++ /dev/null @@ -1,3 +0,0 @@ -.report { - color: $chill-red; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_timeline.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_timeline.scss deleted file mode 100644 index b347cde75..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/_timeline.scss +++ /dev/null @@ -1,53 +0,0 @@ -/* -Chill is a software for social workers -Copyright (C) 2015 Champs Libres - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -div.timeline-item { - padding: 0.5em; - overflow: auto; - margin-bottom: 1.5em; - - &.odd { - background-color: $chill-llight-gray; - - .summary { - background-color: $white; - } - } - - &.even { - background-color: $white; - - .summary { - background-color: $chill-llight-gray; - } - } - - .summary { - margin: 1em; - overflow: auto; - } - - h3 { - margin-top: 0em; - font-size: 1em; - - &.single-line { - margin-bottom: 0em; - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_colors.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_colors.scss deleted file mode 100644 index 91e4ebae0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_colors.scss +++ /dev/null @@ -1,65 +0,0 @@ - -$chill-blue: #334d5c; -$chill-green: #43b29d; -$chill-green-dark: #328474; -$chill-yellow: #eec84a; -$chill-orange: #e2793d; -$chill-red: #df4949; -$chill-gray: #ececec; -$chill-beige: #cabb9f; -$chill-pink: #dd506d; -$chill-dark-gray: #333333; -$chill-light-gray: #b2b2b2; -$chill-llight-gray: #e6e6e6; - -$dark-grey: $chill-dark-gray; - -$color-name: "blue" "green" "green-dark" "yellow" "orange" "red" "gray" "beige" "pink" "dark-gray" "light-gray"; -$color-code: #334d5c #43b29d #328474 #eec84a #e2793d #df4949 #ececec #cabb9f #dd506d #333333 #b2b2b2; - -@for $i from 1 through length($color-name) { - .chill-#{nth($color-name, $i)} { - color: nth($color-code, $i); - } -} - -$orange: $chill-orange; -$red: $chill-red; -$green: $chill-green; -$blue: $chill-blue; -$yellow: $chill-yellow; - -$black: #111111; -$white: #ffffff; -$light-grey: $chill-light-gray; - -/* - due to a bug in sass, we must re-declare the variable in css - (use of a sass variable after -- does not work) -*/ -:root { - --chill-blue: #334d5c; - --chill-green: #43b29d; - --chill-green-dark: #328474; - --chill-yellow: #eec84a; - --chill-orange: #e2793d; - --chill-red: #df4949; - --chill-gray: #ececec; - --chill-beige: #cabb9f; - --chill-pink: #dd506d; - --chill-dark-gray: #333333; - --chill-light-gray: #b2b2b2; - --chill-llight-gray: #e6e6e6; - - --dark-grey: #333333; - - --orange: #e2793d; - --red: #df4949; - --green: #43b29d; - --blue: #334d5c; - --yellow: #eec84a; - - --black: #111111; - --white: #ffffff; - --light-grey: #b2b2b2; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_variables.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_variables.scss deleted file mode 100644 index 994a5a4e9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/config/_variables.scss +++ /dev/null @@ -1,45 +0,0 @@ -// General -$base-border-radius: 0; -$form-border-radius: 0; -$navigation-border-radius: 0; - -// Footer -$footer-vertical-padding: 10px; -$footer-background: $chill-dark-gray; -$footer-disclaimer-color: white; - -// Navigation -$navigation-background: $dark-grey; -$navigation-first-padding-top: 0; -$navigation-last-padding-bottom: 0; -$navigation-color: white; -$navigation-color-hover: white; -$navigation-search-padding: 17px 0 0; -$navigation-border-bottom: none; - -// Form -$form-border-color: $black; -$form-border-color-hover: $black; -$form-border-color-focus: $black; -$form-border-size: 1px; - -// Table -$table-head-bg-color: unset; -$table-head-text-color: $chill-blue; - -$table-body-tr-bg-color-even: $chill-llight-gray; -$table-body-tr-bg-color-odd: $white; -$table-body-td-border: 1px solid $black; -$table-body-td-text-align: left; - -// Tabs -$tabs-nav-margin-bottom: 0.2em; -$tabs-nav-bg-color: $yellow; -$tabs-nav-bg-color-light: lighten($yellow, 10%); -$tabs-nav-text-color: $blue; -$tabs-new-border: none; -$tabs-nav-hover-border: none; -$tabs-nav-hover-text-color: $blue; -$tabs-nav-font-family: 'Open Sans'; -$tabs-nav-font-weight: bold; -$tabs-nav-padding: 0.3em 0.3em 0.3em 0.6em; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/mixins/entity.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/mixins/entity.scss deleted file mode 100644 index 28cc74d06..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/mixins/entity.scss +++ /dev/null @@ -1,16 +0,0 @@ -@mixin entity($background-color, $color: white) { - font-variant: small-caps; - display: inline-block; - 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; - margin: 0.5em; -} - diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_buttons.scss deleted file mode 100644 index 7c332818d..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_buttons.scss +++ /dev/null @@ -1,175 +0,0 @@ -.sc-button { - margin-bottom: 0.5rem; - - &.bt-submit, &.bt-save, &.bt-create, &.bt-new, &.bt-duplicate, &.bt-not-duplicate { - @include button($green, $white); - } - - &.bt-reset, &.bt-delete, &.bt-remove { - @include button($red, $white); - } - - &.bt-action, &.bt-edit, &.bt-update { - @include button($orange, $white); - } - - &.bt-show, &.bt-view { - @include button($blue, $white); - } - - &:not(.change-icon) { - - // icons using font-awesome "old way" - &.bt-create::before, - &.bt-save::before, - &.bt-new::before, - &.bt-delete::before, - &.bt-remove::before, - &.bt-update::before, - &.bt-edit::before, - &.bt-cancel::before, - &.bt-view::before, - &.bt-show::before { - font: normal normal normal 14px/1 ForkAwesome; - margin-right: 0.5em; - } - - // icons using font-awesome "new svg way" - &.bt-not-duplicate::before, - &.bt-duplicate::before { - display: inline-block; - width: 1em; - margin-right: 0.5em; - vertical-align: middle; - } - - &.bt-save::before { - // add a floppy - content: ""; - } - - &.bt-create::before, &.bt-new::before { - // add a plus - content: ""; - } - - &.bt-delete::before { - // add a trash - content: ""; - } - - &.bt-remove::before { - // add a times - content: ""; - } - - &.bt-edit::before, &.bt-update::before { - // add a pencil - content: ""; - } - - &.bt-cancel::before { - // add an arrow left - content: ""; - } - - &.bt-show::before, &.bt-view::before { - content: ""; - } - - &.bt-duplicate::before { - content: url("./copy-solid.svg"); - } - - &.bt-not-duplicate::before { /* - content: url("./users-slash-solid.svg"); */ - } - } - - > i.fa { - margin-right: 0.5em; - } - - &.has-hidden, - &:empty { - > i.fa { - margin-right: 0; - } - &:not(.change-icon) { - &.bt-create::before, - &.bt-save::before, - &.bt-new::before, - &.bt-delete::before, - &.bt-remove::before, - &.bt-update::before, - &.bt-edit::before, - &.bt-cancel::before, - &.bt-view::before, - &.bt-show::before { - margin-right: 0; - } - } - } - - &.has-hidden > span.show-on-hover { - display: none; - } - - &.has-hidden:hover { - - > span.show-on-hover { - display: inline-block; - } - - > i.fa { - margin-right: 0.5em; - } - - &:not(.change-icon) { - &.bt-create::before, - &.bt-save::before, - &.bt-new::before, - &.bt-delete::before, - &.bt-remove::before, - &.bt-update::before, - &.bt-edit::before, - &.bt-cancel::before, - &.bt-view::before, - &.bt-show::before { - margin-right: 0.5em; - } - } - } - - &.button-small { - font-size: 80%; - padding: 6px 8px; - } -} - - - -// Sticky form buttons -.sticky-form-buttons { - margin-top:1em; - background-color:$chill-beige; - position:sticky; - bottom:0.5em; - text-align:center; - padding:0.5em; - border-radius: $base-border-radius; - - -} - - - -.sticky-form-buttons .margin-5 { - margin-left: 5%; - margin-right: 5%; -} - -.sticky-form-buttons .margin-10 { - margin-left: 10%; - margin-right: 10%; -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_forms.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_forms.scss deleted file mode 100644 index 0e5099ef0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_forms.scss +++ /dev/null @@ -1,28 +0,0 @@ -// For cutomizing the form elements - -textarea { - height: 12em; -} - -span.force-inline-label label { - display: inline; -} - - -.chill-form-money { - display: flex; - flex-direction: row; - justify-content: flex-end; - - span.chill-form-money__money { - align-self: center; - margin-left: 1em; - } -} - - -.chill-form__errors { - .chill-form_errors__entry.chill-form__errors__entry--warning { - color: var(--chill-green-dark); - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_navigation.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_navigation.scss deleted file mode 100644 index be28d0348..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/_navigation.scss +++ /dev/null @@ -1,88 +0,0 @@ -.navigation { - background-color: $chill-blue; - - - a.more:after { - color: $chill-dark-gray; - } - - li.nav-link2 { - a { - margin-bottom: 2px; - } - - &.lang-selection { - color: $chill-light-gray; - font-size: 0.7em; - - a.more:after { - color: $chill-light-gray; - } - } - - ul { - top: 58px; - - a { - padding-left: 0; - } - } - } - - div.nav, div.navigation-search { - float: right; - - input[type=search] { - padding: 0.2em; - float: left; - - border: none; - } - - button { - color: $chill-light-gray; - background-color: $chill-blue; - padding: 0 0 0 7px; - top: inherit; - font-size: 1.2em; - position: unset; - float: left; - } - } - - li.user-menu { - min-width: 14rem; - } - - ul.user-menu-list { - - li.user-menu__entry { - display: block; - background-color: $chill-dark-gray; - border-bottom: 1px solid #FFF; - padding-top: 0; - padding-bottom: 0; - line-height: 2; - } - - li.user-menu__entry--warning-entry { - background-color: $chill-red; - font-weight: 700; - } - } - - span.notification-counter { - display: inline-block; - padding: .25em .6em .25rem .6em; - font-size: 100%; - line-height: 1; - text-align: center; - white-space: nowrap; - - border-radius: 10rem; - background-color: $chill-red; - color: $white; - font-weight: 700; - margin-left: .5rem; - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/copy-solid.svg b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/copy-solid.svg deleted file mode 100644 index 6acdf87cd..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/copy-solid.svg +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/users-slash-solid.svg b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/users-slash-solid.svg deleted file mode 100644 index 5bd2883cc..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/custom/modules/users-slash-solid.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/index.js deleted file mode 100644 index 6396103fc..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/index.js +++ /dev/null @@ -1 +0,0 @@ -require('./scratch.scss'); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_alerts.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_alerts.scss deleted file mode 100644 index d7d4d62ab..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_alerts.scss +++ /dev/null @@ -1,7 +0,0 @@ -@mixin alert($color) { - background: transparentize($color,0.8); - color: $color; - font-weight: bold; - margin-bottom: 0.75em; - padding: 0.75em; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_buttons.scss deleted file mode 100644 index 603856e23..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/mixins/_buttons.scss +++ /dev/null @@ -1,34 +0,0 @@ -@mixin button($button-background-color, $button-text-color) { - color: $button-text-color; - background: $button-background-color; - border: medium none; - box-shadow: none; - padding: $button-padding; - text-decoration: none; - text-align: center; - display: inline-block; - vertical-align: middle; - white-space: nowrap; - line-height: normal; - @include border-top-radius($base-border-radius); - @include border-bottom-radius($base-border-radius); - - &:hover, - &:active { - background: darken($button-background-color, 5%); - color: $button-text-color; // force text color for anchor tags - text-decoration: none; // remove underline on anchor tags - } - - &:focus { - background: darken($button-background-color, 5%); - } - - &[disabled] { - background: transparentize($button-background-color,0.4); - color: darken($button-background-color, 10%); - &:hover { - box-shadow: none; - } - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_alerts.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_alerts.scss deleted file mode 100644 index 03ed6b5cd..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_alerts.scss +++ /dev/null @@ -1,15 +0,0 @@ -.success { - @include alert($green); -} - -.error { - @include alert($red); -} - -.alert { - @include alert($orange); -} - -.notice { - @include alert($blue); -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_buttons.scss deleted file mode 100644 index 9e0036de5..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_buttons.scss +++ /dev/null @@ -1,12 +0,0 @@ -.sc-button { - @include button($grey-15, $button-text-color); - - &.blue { @include button($blue, $white); } - &.green { @include button($green, $white); } - &.orange { @include button($orange, $white); } - &.red { @include button($red, $white); } - &.black { @include button($grey-90, $white); } - &.white { @include button($white, $text-color); } -} - -@import "../custom/modules/buttons"; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_content.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_content.scss deleted file mode 100644 index 49be33d38..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_content.scss +++ /dev/null @@ -1,7 +0,0 @@ -html, body { - height: 100%; -} - -.content { - min-height: 85%; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_footer.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_footer.scss deleted file mode 100644 index 1193f4c30..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_footer.scss +++ /dev/null @@ -1,65 +0,0 @@ -.footer { - background: $footer-background; - padding-top: $footer-vertical-padding; - padding-bottom: $footer-vertical-padding; - width: 100%; - - .footer-logo { - text-align: center; - margin-bottom: 2em; - - img { - height: 3em; - } - } - - .footer-links { - @include gridle_clear(both); - - margin-bottom: $base-spacing; - @include gridle(8); - @include gridle_centered(); - } - - ul { - margin-bottom: $base-spacing*2; - @include gridle (4); - list-style-type: none; - } - - li { - text-align: center; - } - - li a { - color: $footer-link-color; - - &:hover { - color: transparentize($footer-color, 0); - } - } - - li h3 { - color: $footer-color; - font-size: 1em; - font-weight: 800; - margin-bottom: .4em; - } - - hr { - @include gridle_clear(both); - border: 1px solid transparentize($footer-disclaimer-color, .3); - margin: 0 auto $base-spacing; - width: 12em; - } - - p { - @include gridle_clear(both); - color: $footer-disclaimer-color; - font-size: .9em; - line-height: 1.5em; - margin: auto; - max-width: 35em; - text-align: center; - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_forms.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_forms.scss deleted file mode 100644 index dcffddec9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_forms.scss +++ /dev/null @@ -1,156 +0,0 @@ -fieldset { - border: none; - margin: 0 0 ($base-spacing / 2) 0; - padding: $base-spacing; -} - -input,label, select { - display: block; - /* font-family: $form-font-family; - font-size: $form-font-size; */ -} - -label { - padding-top: $base-spacing / 3; - padding-bottom: $base-spacing / 3; - font-weight: bold; - margin-bottom: $base-spacing / 4; - - &.required:after { - content: "*"; - color: $red; - font-weight: 900; - } - - abbr { - display: none; - } - - // mark the label for empty placeholder - &[for$="_placeholder"] { - font-style: italic; - } -} - -.inline-choice { - white-space:nowrap; - display: inline-block; - - label { - white-space:normal; - display: inline; - line-height: 1 + ((2 * $base-spacing) / 3); - margin-right: 1em; - font-weight: normal; - } -} - -div.choice-widget-expanded { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -textarea, -//input, -#{$all-text-inputs}, -select[multiple=multiple] { - //@include box-sizing(border-box); - //@include transition(border-color); - background-color: white; - @include border-top-radius($form-border-radius); - @include border-bottom-radius($form-border-radius); - border: $form-border-size solid $form-border-color; - box-shadow: none; - //box-shadow: $form-box-shadow; - /*font-family: $form-font-family; - font-size: $form-font-size; */ - margin-bottom: $base-spacing / 4; - padding: ($base-spacing / 3) ($base-spacing / 3); - width: 100%; - - &:hover { - border-color: $form-border-color-hover; - } - - &:focus { - border-color: $form-border-color-focus; - box-shadow: $form-box-shadow-focus; - outline: none; - } -} - -textarea { - resize: vertical; -} - -input[type="search"] { - //@include appearance(none); -} - -input[type="checkbox"], -input[type="radio"] { - display: inline; - margin-right: $base-spacing / 4; -} - -input[type="file"] { - padding-bottom: $base-spacing / 2; - width: 100%; -} - -select { - margin-bottom: $base-spacing / 4; - padding-top: ($base-spacing / 5); - padding-bottom: ($base-spacing / 5); - width: 100%; -} - -form { - p { - &.tip { - font-size: .875em; - position: relative; - text-align: center; - margin-top: -.3em; - } - - &.label { - padding: 0; - //margin: 0; - //color: $text-color; - white-space: normal; - } - } - - fieldset { - border: none; - margin-bottom: 1.5em; - padding: 0; - margin: 0; - - legend { - font-size: 1.438em; - font-weight: 700; - width: 100%; - border-bottom: 3px solid #ddd; - margin-bottom: 1em; - - & + * { - -webkit-margin-top-collapse: separate; // webkit hack that makes the legend margins work like they should - } - - h2 { - margin-bottom: 0; - } - } - } - - li { - label { - display: inline-block; - } - } -} - -@import "../custom/modules/forms"; - diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_navigation.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_navigation.scss deleted file mode 100644 index 789707f6a..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_navigation.scss +++ /dev/null @@ -1,299 +0,0 @@ -.navigation { - //$navigation-nav-button-background: $base-accent-color; - //$navigation-nav-button-background-hover: lighten($navigation-background, 10); - //$navigation-nav-button-border: 1px solid lighten($navigation-nav-button-background, 20); - //$navigation-search-background: lighten($navigation-background, 5); - //$navigation-search-border: 1px solid darken($navigation-background, 5); - //$horizontal-bar-mode: $large-screen; - - background-color: $navigation-background; - border-bottom: $navigation-border-bottom; - height: $navigation-height; - //width: 100%; - z-index: 999; - - .logo-container { - height: $navigation-height; - - &:before { /* create a full-height inline block pseudo=element */ - content: ' '; - display: inline-block; - vertical-align: middle; /* vertical alignment of the inline element */ - height: 100%; - } - - img.logo { - max-width: 89%; - max-height: $navigation-height - 10px; - display: inline-block; - vertical-align: middle; - } - } - - // Nav menu - .nav { - z-index: 9999999; - height: $navigation-height; - //float: none; - } - - ul.navigation-menu { - -webkit-transform-style: preserve-3d; // stop webkit flicker - clear: both; - display: none; - margin: 0 auto; - overflow: visible; - padding: 0; - width: 100%; - z-index: 9999; - - //@include media ($horizontal-bar-mode) { - display: inline-block; - margin: 0; - padding: 0; - //} - } - - // The nav items - ul li.nav-link { - background: $navigation-background; - display: block; - line-height: $navigation-height; - overflow: hidden; - padding-right: .8em; - text-align: right; - width: 100%; - z-index: 9999; - - // @include media ($horizontal-bar-mode) { - background: transparent; - display: inline; - line-height: $navigation-height; - text-decoration: none; - width: auto; - // } - - a { - color: $navigation-color; - display: inline-block; - font-weight: 400; - - //@include media ($horizontal-bar-mode) { - padding-right: 1em; - //} - - &:hover { - color: $navigation-color-hover; - } - } - } - - .active-nav-item a { - border-bottom: 1px solid $navigation-active-link-color; - padding-bottom: 3px; - } - - // Sub menus - li.more.nav-link { - padding-right: 0; - - // @include media($large-screen) { - padding-right: $navigation-submenu-padding; - // } - - > ul > li:first-child a { - padding-top: $navigation-first-padding-top; - } - - a { - margin-right: $navigation-submenu-padding; - } - - > a { - padding-right: 0.6em; - } - - > a:after { - @include position(absolute, auto -.4em auto auto); - content: $navigation-more-pin; - color: $navigation-more-pin-color; - } - } - - li.more { - overflow: visible; - padding-right: 0; - - a { - padding-right: .8em; - } - - > a { - padding-right: 1.6em; - position: relative; - - //@include media($large-screen) { - margin-right: $navigation-submenu-padding; - //} - - &:after { - content: '›'; - font-size: 1.2em; - position: absolute; - right: $navigation-submenu-padding / 2; - } - } - - &:hover > .submenu { - display: block; - } - - //@include media($horizontal-bar-mode) { - padding-right: .8em; - position: relative; - //} - } - - ul.submenu { - display: none; - padding-left: $navigation-ul-submenu-padding-left; - //@include media($horizontal-bar-mode) { - left: -$navigation-submenu-padding; - position: absolute; - top: $navigation-ul-submenu-top; - //} - - .submenu { - //@include media($horizontal-bar-mode) { - left: $navigation-submenu-width - .2em; - top: 0; - //} - } - - li { - display: block; - padding-right: 0; - - //@include media($horizontal-bar-mode) { - line-height: $navigation-height / 1.3; - - &:first-child > a { - border-top-left-radius: $navigation-border-radius; - border-top-right-radius: $navigation-border-radius; - } - - &:last-child > a { - border-bottom-left-radius: $navigation-border-radius; - border-bottom-right-radius: $navigation-border-radius; - padding-bottom: $navigation-last-padding-bottom; - } - //} - - a { - background-color: darken($navigation-background, 3); - display: inline-block; - text-align: right; - width: 100%; - - //@include media($horizontal-bar-mode) { - background-color: $navigation-background; - padding-left: $navigation-submenu-padding; - text-align: left; - //width: $navigation-submenu-width; - //} - } - } - } - - // Elements on the far right - .navigation-search { - padding: $navigation-search-padding; - position: relative; - - input[type=search] { - //background: $navigation-search-background; - //border: $navigation-search-border; - padding: .6em .55em; - padding-right: 3.5em; - width: calc(100% - 4.5em); - //padding: .6em .8em; - //padding: 0 30px 0 10px; - font-size: .9em; - //color: $navigation-color; - //border-radius: $navigation-border-radius * 2; - margin: 0; - } - - button { - padding: 7px 12px; - position: absolute; - top: .99em; - right: 1em; - } - } - - ul li.nav-link2 { - position: relative; - padding-right: 2em; - text-align: left; - line-height: $navigation-height; - z-index: 9999; - float: left; - list-style: none; - - & div.li-content { - display: inline-block; - line-height: normal; - vertical-align: middle; - - a.more:after { - content: $navigation-more-pin; - color: $navigation-more-pin-color; - padding-left: 0.4em; - font-size: 1.2em; - } - } - - ul { - display: none; - position: absolute; - line-height: normal; - list-style: none; - background-color: #333; - padding-right: 1.5em; - padding-left: 1.5em; - width: 100%; - } - - ul { - li { - padding-top:0.7em; - padding-bottom:0.7em; - - &:first-child { - padding-top: $navigation-first-padding-top; - } - - &:last-child { - padding-bottom: $navigation-first-padding-top; - } - } - } - - &:hover ul { - display: block; - } - - a { - width: 100%; - color: $navigation-color; - font-weight: 400; - - &:hover { - color: $navigation-color-hover; - } - } - } -} - -@import "../custom/modules/navigation"; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_table.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_table.scss deleted file mode 100644 index 14389580a..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_table.scss +++ /dev/null @@ -1,33 +0,0 @@ -table { - width: $table-width; - - thead { - background-color: $table-head-bg-color; - - tr th { - border: $table-head-td-border; - text-align: $table-head-td-text-align; - padding: $table-head-td-padding; - color: $table-head-text-color; - } - } - - tbody { - tr { - td { - border: $table-body-td-border; - text-align: $table-body-td-text-align; - padding: $table-body-td-padding; - color: $table-body-text-color; - } - - &:nth-of-type(even) { - background-color: $table-body-tr-bg-color-even; - } - - &:nth-of-type(odd) { - background-color: $table-body-tr-bg-color-odd; - } - } - } -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_tabs.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_tabs.scss deleted file mode 100644 index 2f57e0ae7..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_tabs.scss +++ /dev/null @@ -1,54 +0,0 @@ -/* Tabs */ -$navigation-color: $red; -$gutter : 4; -$norm: 5; -$body-font-color: $white; -$default-color: $green; -$global-bg-color: $yellow; - -.tab-nav { - margin: 0.5em 0; - padding: 0; - - > li { - font-family: $tabs-nav-font-family; - display: inline-block; - width: 100%; - cursor: default; - @include border-top-radius($base-border-radius); - @include border-bottom-radius($base-border-radius); - margin-bottom: $tabs-nav-margin-bottom; - - &.title { - padding: $tabs-nav-title-padding; - font-weight: 900; - background-color: $tabs-nav-title-bg-color; - color: $tabs-nav-title-text-color; - } - - &.sub-menu { - padding-left: 20px; - > a { - background-color: $tabs-nav-bg-color-light; - } - } - > a { - display: block; - width: auto; - padding: $tabs-nav-padding; - margin: 0; - color: $tabs-nav-text-color; - cursor: pointer; - border: $tabs-new-border; - background-color: $tabs-nav-bg-color; - @include border-top-radius($base-border-radius); - @include border-bottom-radius($base-border-radius); - - &:hover, &:active { - border: $tabs-nav-hover-border; - color: $tabs-nav-hover-text-color; - text-decoration: none; - } - } - } -} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_typography.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_typography.scss deleted file mode 100644 index dce6d75a6..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/modules/_typography.scss +++ /dev/null @@ -1,23 +0,0 @@ -ul { - &.unstyled { - list-style: none; - padding-left: 0em; - - ul { - list-style:disc outside; - } - } -} - -a { - color: $base-link-color; - text-decoration: none; - - &:hover { - color: $hover-link-color; - } -} - -.text-right { - text-align: right; -} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/scratch.scss b/src/Bundle/ChillMainBundle/Resources/public/module/scratch/scratch.scss deleted file mode 100644 index 78f9b393c..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/module/scratch/scratch.scss +++ /dev/null @@ -1,46 +0,0 @@ -@charset "UTF-8"; - -@import "contrib/normalize/normalize"; -@import "contrib/bourbon/bourbon"; - -@import "config/colors"; -@import "config/variables"; -@import "config/buttons"; - -/* etrange pour les forms */ -* { box-sizing: inherit; } -html { box-sizing: border-box; } - -@import "mixins/buttons"; -@import "mixins/alerts"; - -@import "contrib/gridle/gridle/gridle"; - -@include gridle_setup(( - context : 12, - gutter-width : 20px, - direction : ltr, -)); - -@include gridle_register_state(mobile , ( - max-width : 400px -)); - -@include gridle_register_state(tablet, ( - min-width : 401px, - max-width : 767px, -)); - -@include gridle_generate_classes(); - -@import "modules/typography"; -@import "modules/navigation"; -@import "modules/content"; -@import "modules/footer"; -@import "modules/alerts"; -@import "modules/forms"; -@import "modules/buttons"; -@import "modules/tabs"; -@import "modules/table"; - -@import "custom"; \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/page/export/index.js b/src/Bundle/ChillMainBundle/Resources/public/page/export/index.js new file mode 100644 index 000000000..d540e5ae5 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/page/export/index.js @@ -0,0 +1,6 @@ +// old method to show/hide filters when checking checkbox +import { chill } from 'ChillMainAssets/chill/js/chill'; +window.addEventListener("DOMContentLoaded", chill.listenerDisplayCheckbox); + +// TODO should be replaced by more recent showHide library +//import { ShowHide } from 'ShowHide'; diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/download.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/download.html.twig index ef62dfd90..fa568d857 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/download.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/download.html.twig @@ -16,7 +16,7 @@ * along with this program. If not, see . #} -{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} {% block title "Download export"|trans ~ export.title|trans %} @@ -33,11 +33,24 @@ window.addEventListener("DOMContentLoaded", function(e) { {% endblock %} -{% block layout_wvm_content %} +{% block content %} +
-

{{ export.title|trans }}

-

{{ "Download export"|trans }}

- -
{{ "Waiting for your report"|trans }}...
- -{% endblock %} \ No newline at end of file +
+ + {{ export_group|trans }} +
+ +

{{ export.title|trans }}

+

{{ "Download export"|trans }}

+ +
{{ "Waiting for your report"|trans ~ '...' }}
+ +
+{% endblock content %} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/layout.html.twig index be6307822..9cf53993d 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/layout.html.twig @@ -22,19 +22,18 @@ {% block content %} -
-

{{ 'Exports list'|trans }}

- -
+
+

{{ 'Exports list'|trans }}

+ +
+ {% for group, exports in grouped_exports %}{% if group != '_' %} -

{{ group }}

- -
+

{{ group|trans }}

+
{% for export_alias, export in exports %} - {% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig index c3e188720..8aac6c253 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig @@ -16,95 +16,126 @@ * along with this program. If not, see . #} -{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} {% block title %}{{ export.title|trans }}{% endblock %} {% block js %} - + {{ encore_entry_script_tags('page_export') }} {% endblock js %} -{% block layout_wvm_content %} +{% block content %} +
-

{{ export.title|trans }}

+
+ + {{ export_group|trans }} +
-

{{ export.description|trans }}

- - {{ form_start(form) }} +

{{ export.title|trans }}

+ +

{{ export.description|trans }}

- {% if form.children.export.children.filters is defined %} - {% if form.children.export.children.filters is not empty%} -
-

{{ 'Filters'| trans }}

- {% for filter_form in form.children.export.children.filters %} -
-

- {{ form_widget(filter_form.enabled, { 'attr' : { 'style' : 'vertical-align: middle;', 'data-display-target': filter_form.vars.id } }) }} - {{ form_label(filter_form) }} -

- -
- {{ form_widget(filter_form.form) }} - {{ form_errors(filter_form) }} + {{ form_start(form) }} + + {% if form.children.export.children.filters is defined %} + {% if form.children.export.children.filters is not empty%} + +
+

{{ 'Filters'| trans }}

+ + {{ form_errors(form.children.export.children.filters) }} + +
+ {% for filter_form in form.children.export.children.filters %} +
+ + {{ form_widget(filter_form.enabled, { + 'label': filter_form.vars.label, + 'label_attr': { 'class': 'h6' }, + 'attr': { 'data-display-target': filter_form.vars.id } + }) }} + +
+ {{ form_widget(filter_form.form) }} + {{ form_errors(filter_form) }} +
+ +
+ {% endfor %}
-
- {% endfor %} - {{ form_errors(form.children.export.children.filters) }} -
- {% else %} - {# render the children, to mark the widget as 'rendered' #} - {{ form_widget(form.children.export.children.filters) }} + + + {% else %} + {# render the children, to mark the widget as 'rendered' #} + {{ form_widget(form.children.export.children.filters) }} + {% endif %} {% endif %} - {% endif %} + + {% if form.children.export.children.aggregators is defined %} + {% if form.children.export.children.aggregators is not empty %} + +
+

{{ 'Aggregators'| trans }}

- {% if form.children.export.children.aggregators is defined %} - {% if form.children.export.children.aggregators is not empty %} -
-

{{ 'Aggregators'| trans }}

- {% for aggregator_form in form.children.export.children.aggregators %} -
-

- {{ form_widget(aggregator_form.enabled, { 'attr' : { 'style' : 'vertical-align: middle;', 'data-display-target': aggregator_form.vars.id } }) }} - {{ form_label(aggregator_form) }} -

- -
- {{ form_widget(aggregator_form.form) }} - {{ form_errors(aggregator_form) }} +
+ {% for aggregator_form in form.children.export.children.aggregators %} +
+ + {{ form_widget(aggregator_form.enabled, { + 'label': aggregator_form.vars.label, + 'label_attr': { 'class': 'h6' }, + 'attr': { 'data-display-target': aggregator_form.vars.id } + }) }} + +
+ {{ form_widget(aggregator_form.form) }} + {{ form_errors(aggregator_form) }} +
+ +
+ {% endfor %}
-
- {% endfor %} -
+
+ + {% else %} + {# render the children, to mark the widget as 'rendered' #} + {{ form_widget(form.children.export.children.aggregators) }} + {% endif %} + {% endif %} + + + {% if form.children.export.children.export.children|length > 0 %} + + +
+

+ {{ 'Export parameters'|trans }} +

+ {{ form_widget(form.children.export.children.export) }} +
+ {% else %} {# render the children, to mark the widget as 'rendered' #} - {{ form_widget(form.children.export.children.aggregators) }} - {% endif %} - {% endif %} - - - {% if form.children.export.children.export.children|length > 0 %} -
-

{{ 'Export parameters'|trans }}

{{ form_widget(form.children.export.children.export) }} -
- {% else %} - {# render the children, to mark the widget as 'rendered' #} - {{ form_widget(form.children.export.children.export) }} - {% endif %} - - {% if form.children.export.children.pick_formatter is defined %} -
-

{{ 'Formatter'| trans }}

- -

{{ 'Choose the formatter'|trans }}

- + {% endif %} + + {% if form.children.export.children.pick_formatter is defined %} +
+

+ {{ 'Formatter'| trans }} +

+

+ {{ 'Choose the formatter'|trans }} +

{{ form_row(form.children.export.children.pick_formatter.children.alias, { 'label' : 'Formatter' }) }} -
- {% endif %} - -

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' }, 'label' : 'Go to formatter options' } ) }}

- {{ form_end(form) }} - -{% endblock layout_wvm_content %} + + {% endif %} + +

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' }, 'label' : 'Go to formatter options' } ) }}

+ {{ form_end(form) }} + +
+{% endblock content %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig index f00419c9d..4a2d9ab9e 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig @@ -16,35 +16,48 @@ * along with this program. If not, see . #} -{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} {% block title %}{{ export.title|trans }}{% endblock %} -{% block layout_wvm_content %} - -

{{ export.title|trans }}

- -

{{ export.description|trans }}

- - {{ form_start(form) }} - -

{{ 'Pick centers'|trans }}

- -

{{ 'The export will contains only data from the picked centers.'|trans }} - {{ 'This will eventually restrict your possibilities in filtering the data.'|trans }}

- - {{ form_widget(form.centers.c) }} - - {% if form.centers.children.g is defined %} +{% block content %} +
-

{{ 'Pick aggregated centers'|trans }}

+
+ + {{ export_group|trans }} +
- {% for f in form.centers.children.g.children %} - {{ form_row(f) }} - {% endfor %} - {% endif %} +

{{ export.title|trans }}

+ +

{{ export.description|trans }}

-

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action btn-create' }, 'label' : 'Go to export options' } ) }}

- {{ form_end(form) }} + {{ form_start(form) }} + +
+ +

{{ 'Pick centers'|trans }}

+ +

{{ 'The export will contains only data from the picked centers.'|trans }} + {{ 'This will eventually restrict your possibilities in filtering the data.'|trans }}

+ + {{ form_widget(form.centers.c) }} + + {% if form.centers.children.g is defined %} + +

{{ 'Pick aggregated centers'|trans }}

+ + {% for f in form.centers.children.g.children %} + {{ form_row(f) }} + {% endfor %} + + {% endif %} + +
+ +

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action btn-create' }, 'label' : 'Go to export options' } ) }}

+ + {{ form_end(form) }} -{% endblock layout_wvm_content %} +
+{% endblock content %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/new_formatter_step.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/new_formatter_step.html.twig index 43a5f63ec..443816611 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/new_formatter_step.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/new_formatter_step.html.twig @@ -16,39 +16,45 @@ * along with this program. If not, see . #} -{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} {% block title %}{{ export.title|trans }}{% endblock %} -{% block layout_wvm_content %} +{% block content %} +
-

{{ export.title|trans }}

- -

{{ export.description|trans }}

- - {{ form_start(form) }} -
-

{{ 'Formatter'| trans }}

+
+ + {{ export_group|trans }} +
-
- {% if form.children.formatter.children|length == 0 %} -

- {{ "No options availables. Your report is fully configured."|trans }} -

- {{ form_widget(form.children.formatter) }} - {% else %} - {# we always have to render children, to mark as rendered #} - {% for input in form.children.formatter.children %} - {{ form_row(input) }} - {% endfor %} - {% endif %} +

{{ export.title|trans }}

+ +

{{ export.description|trans }}

+ + {{ form_start(form) }} +
+

{{ 'Formatter'| trans }}

+ +
+ {% if form.children.formatter.children|length == 0 %} +

+ {{ "No options availables. Your report is fully configured."|trans }} +

+ {{ form_widget(form.children.formatter) }} + {% else %} + {# we always have to render children, to mark as rendered #} + {% for input in form.children.formatter.children %} + {{ form_row(input) }} + {% endfor %} + {% endif %} +
+
+ +
+

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action' }, 'label': 'Generate the report' } ) }}

+ {{ form_end(form) }} +
- -
-

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action' }, 'label': 'Generate the report' } ) }}

-
- - {{ form_end(form) }} - -{% endblock layout_wvm_content %} +{% endblock content %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig index e0c43629e..f4a2c3294 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig @@ -60,7 +60,7 @@ {{- form_errors(form) -}}
{%- else -%} - {% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %} + {% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %} {{- form_label(form) -}}
{{- form_widget(form, widget_attr) -}} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 5b7c695a8..1710a91b8 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -18,7 +18,7 @@ {% block form_row %} {% apply spaceless %} - {% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %} + {% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %}