diff --git a/docs/images/categories-page.png b/docs/images/categories-page.png
new file mode 100644
index 00000000..727bc7a0
Binary files /dev/null and b/docs/images/categories-page.png differ
diff --git a/docs/images/consents-page.png b/docs/images/consents-page.png
new file mode 100644
index 00000000..a5d363a8
Binary files /dev/null and b/docs/images/consents-page.png differ
diff --git a/docs/images/cookie-bar-page.png b/docs/images/cookie-bar-page.png
new file mode 100644
index 00000000..c4f053ac
Binary files /dev/null and b/docs/images/cookie-bar-page.png differ
diff --git a/docs/images/cookie-management.png b/docs/images/cookie-management.png
new file mode 100644
index 00000000..d920ab37
Binary files /dev/null and b/docs/images/cookie-management.png differ
diff --git a/docs/images/integration-page.png b/docs/images/integration-page.png
new file mode 100644
index 00000000..8f7651ba
Binary files /dev/null and b/docs/images/integration-page.png differ
diff --git a/docs/images/list-of-cookies-page.png b/docs/images/list-of-cookies-page.png
new file mode 100644
index 00000000..b1ce67e4
Binary files /dev/null and b/docs/images/list-of-cookies-page.png differ
diff --git a/docs/product.md b/docs/product.md
index 27f16057..ca349803 100644
--- a/docs/product.md
+++ b/docs/product.md
@@ -1,5 +1,5 @@
-
+
Product Documentation
@@ -9,6 +9,16 @@
* [Dashboard](#dashboard)
* [Users](#users)
* [Settings](#settings)
+* [Cookies](#cookies)
+ * [Categories](#categories)
+ * [Providers](#providers)
+ * [List of cookies](#list-of-cookies)
+* [Imports](#imports)
+* [Projects](#projects)
+ * [Consents](#consents)
+ * [Cookies bars](#cookie-bars)
+ * [Project cookies](#project-cookies)
+ * [Integration](#integration)
## Dashboard
@@ -36,58 +46,58 @@ In addition, each user has assigned their projects that they can see and manage.
The application provides only two roles - `admin` and `manager` with following privileges:
-| Action | Manager | Admin |
+| Resource/Active | Manager | Admin |
|-------------------------------------------------------------------|:------------------:|:------------------:|
-| **Dashboard** | | |
-| View statistics for projects that are visible by the current user | :heavy_check_mark: | :heavy_check_mark: |
-| **User account** | | |
-| Edit own data, change password | :heavy_check_mark: | :heavy_check_mark: |
-| **Users > Users** | | |
-| View the list of users | | :heavy_check_mark: |
-| Create or edit a user | | :heavy_check_mark: |
-| Delete a user | | :heavy_check_mark: |
-| **Users > New password requests** | | |
-| View the list of new password requests | | :heavy_check_mark: |
-| **Settings** | | |
-| View and edit the application settings | | :heavy_check_mark: |
-| **Cookies > Categories** | | |
-| View the list of categories | | :heavy_check_mark: |
-| Create or edit a category | | :heavy_check_mark: |
-| Delete a category | | :heavy_check_mark: |
-| **Cookies > Providers** | | |
-| View the list of providers | | :heavy_check_mark: |
-| Create or edit a provider | | :heavy_check_mark: |
-| Delete a provider | | :heavy_check_mark: |
-| **Cookies > List of cookies** | | |
-| View the list of cookies | | :heavy_check_mark: |
-| Create or edit a cookie | | :heavy_check_mark: |
-| Delete a cookie | | :heavy_check_mark: |
-| **Imports** | | |
-| View the list of executed imports | | :heavy_check_mark: |
-| Run an import | | :heavy_check_mark: |
-| **Projects** | | |
-| View the list of projects that are visible by the current user | :heavy_check_mark: | :heavy_check_mark: |
-| Create a project | | :heavy_check_mark: |
-| **Project > Consents** | | |
-| View the list of consents | :heavy_check_mark: | :heavy_check_mark: |
-| **Project > Cookie bars** | | |
-| View the list of cookie bars | :heavy_check_mark: | :heavy_check_mark: |
-| **Project > Cookies > Providers** | | |
-| View and edit project providers | :heavy_check_mark: | :heavy_check_mark: |
-| **Project > Cookies > Project cookies** | | |
-| View the list of project cookies | :heavy_check_mark: | :heavy_check_mark: |
-| Create or edit a project cookie | :heavy_check_mark: | :heavy_check_mark: |
-| Delete a project cookie | :heavy_check_mark: | :heavy_check_mark: |
-| **Project > Integration** | | |
-| View and edit cookie table templates | | :heavy_check_mark: |
-| View a cookie table integration code | :heavy_check_mark: | :heavy_check_mark: |
-| **Project > Edit project** | | |
-| View and edit a project | | :heavy_check_mark: |
-| Delete a project | | :heavy_check_mark: |
+| `Dashboard` | Manager | Admin |
+| View statistics for projects that are visible by the current user | :white_check_mark: | :white_check_mark: |
+| `User account` | Manager | Admin |
+| Edit own data, change password | :white_check_mark: | :white_check_mark: |
+| `Users > Users` | Manager | Admin |
+| View the list of users | | :white_check_mark: |
+| Create or edit a user | | :white_check_mark: |
+| Delete a user | | :white_check_mark: |
+| `Users > New password requests` | Manager | Admin |
+| View the list of new password requests | | :white_check_mark: |
+| `Settings` | Manager | Admin |
+| View and edit the application settings | | :white_check_mark: |
+| `Cookies > Categories` | Manager | Admin |
+| View the list of categories | | :white_check_mark: |
+| Create or edit a category | | :white_check_mark: |
+| Delete a category | | :white_check_mark: |
+| `Cookies > Providers` | Manager | Admin |
+| View the list of providers | | :white_check_mark: |
+| Create or edit a provider | | :white_check_mark: |
+| Delete a provider | | :white_check_mark: |
+| `Cookies > List of cookies` | Manager | Admin |
+| View the list of cookies | | :white_check_mark: |
+| Create or edit a cookie | | :white_check_mark: |
+| Delete a cookie | | :white_check_mark: |
+| `Imports` | Manager | Admin |
+| View the list of executed imports | | :white_check_mark: |
+| Run an import | | :white_check_mark: |
+| `Projects` | Manager | Admin |
+| View the list of projects that are visible by the current user | :white_check_mark: | :white_check_mark: |
+| Create a project | | :white_check_mark: |
+| `Project > Consents` | Manager | Admin |
+| View the list of consents | :white_check_mark: | :white_check_mark: |
+| `Project > Cookie bars` | Manager | Admin |
+| View the list of cookie bars | :white_check_mark: | :white_check_mark: |
+| `Project > Cookies > Providers` | Manager | Admin |
+| View and edit project providers | :white_check_mark: | :white_check_mark: |
+| `Project > Cookies > Project cookies` | Manager | Admin |
+| View the list of project cookies | :white_check_mark: | :white_check_mark: |
+| Create or edit a project cookie | :white_check_mark: | :white_check_mark: |
+| Delete a project cookie | :white_check_mark: | :white_check_mark: |
+| `Project > Integration` | Manager | Admin |
+| View and edit cookie table templates | | :white_check_mark: |
+| View a cookie table integration code | :white_check_mark: | :white_check_mark: |
+| `Project > Edit project` | Manager | Admin |
+| View and edit a project | | :white_check_mark: |
+| Delete a project | | :white_check_mark: |
-# Settings
+## Settings
The application settings page now contains only the localization for entries. In the "Translation locales" field, select the locales you use on your site.
Cookies descriptions etc. will then be administered for the selected locales.
@@ -96,3 +106,158 @@ The default locale will be used if any record is missing a given translation.
+## Cookies
+
+Cookie management is based on the fact that we have defined categories and cookie providers.
+Each provider is assigned its own cookies and the providers are then assigned to individual projects.
+
+
+
+### Categories
+
+Categories should be defined in the same way as you use them on your site. At least the same codes.
+Be sure to mark the necessary category with the "Necessary category" flag.
+
+The default installation will automatically create categories that are [defined by Google](https://policies.google.com/technologies/cookies?hl=en-US#types-of-cookies), but there is nothing stopping you from customizing them for your use.
+
+
+
+
+### Providers
+
+We could define providers as groups of cookies.
+
+For example, we have Google Analytics deployed on our website. In this case, we will have a "Google Analytics" provider and this will contain cookies that are related to the service.
+
+On a provider's edit page, we can manage also their cookies.
+
+### List of cookies
+
+Although cookies are managed through individual providers, we have listed all cookies here for clarity.
+
+
+
+## Imports
+
+Providers and cookies can be managed externally in CSV or JSON format or, for example, in an application such as Microsoft Excel or Google Sheets.
+Then you only need to run an import and the data will be transferred to the application.
+
+Here are examples of how the imported files should look like:
+
+
+ Cookie providers import in CSV format
+
+```csv
+code|name|type|link|active|projects|purpose.cs|purpose.en
+facebook_login|Facebook Login|3rd_party|https://www.facebook.com/about/privacy/|1|demo,test|"Platforma pro přihlášení skrze Facebook."|"Facebook login platform."
+# ... more rows ...
+```
+
+
+
+
+ Cookie providers import in JSON format
+
+```json5
+[
+ {
+ "code": "facebook_login",
+ "name": "Facebook login",
+ "type": "3rd_party",
+ "link": "https://www.facebook.com/about/privacy/",
+ "active": true,
+ "projects": [
+ "demo",
+ "test"
+ ],
+ "purpose": {
+ "cs": "Platforma pro přihlášení skrze Facebook.",
+ "en": "Facebook login platform."
+ }
+ }
+ // ... more providers ...
+]
+```
+
+
+
+- Allowed values for the field `type` are `1st_party` and `3rd_party`
+- Projects in CSV must be comma separated list
+- In CSV, each locale for `purpose` field must be separated column in the format `purpose.`
+
+
+ Cookies import in CSV format
+
+```csv
+name|category|provider|processingTime|active|purpose.cs|purpose.en
+c_user|security_storage|facebook_login|session|1|"Facebook ID zákazníka."|"Customer\'s Facebook ID."
+# ... more rows ...
+```
+
+
+
+
+ Cookies import in JSON format
+
+```json5
+[
+ {
+ "name": "c_user",
+ "category": "security_storage",
+ "provider": "facebook_login",
+ "processingTime": "session",
+ "active": true,
+ "purpose": {
+ "cs": "Facebook ID zákazníka.",
+ "en": "Customer\'s Facebook ID."
+ }
+ }
+ // ... more cookies ...
+]
+```
+
+
+
+- The field `category` must contain a category code
+- The field `provider` must contain a provider code
+- Allowed values for the field `processingTime` are `"session"`, `"persistent"` or a duration string
+- In CSV, each locale for `purpose` field must be separated column in the format `purpose.`
+
+If you want to import the main (1st party) provider, make sure that the project is already established. If the project doesn't exist, the provider will be created as a generic provider that can be assigned to any project.
+
+So the correct procedure is to establish your projects first and then import the data.
+
+## Projects
+
+After selecting a specific project, the user is moved to the context of the selected project where he can see consents, cookie bar settings and manage project cookies.
+
+### Consents
+
+Here is the list of all recorded consents.
+The consents are grouped according to the user identifier that the cookie bar creates and sends. After clicking on a detail, you can see the complete history of that user.
+
+
+
+### Cookie bars
+
+On this page you can find the settings of all cookie bars used.
+The uniqueness of the cookie bar is determined by the checksum that is calculated and sent by the cookie bar itself.
+
+
+
+### Project cookies
+
+Here you can manage the main (1st party) provider that is only bound to the project whose context you are currently in.
+Also, cookies that are only associated with the project are managed here.
+
+### Integration
+
+By integration, we mean the ability to easily render a table with providers, alternatively with cookies, directly on your website. For example, through a static page.
+
+You can define a template that fits exactly into the design of your website and then render it by copying and pasting it into one of your pages.
+
+We recommend leaving the creation of the template to the programmer, the template is written in the [Latte](https://latte.nette.org/) templating language and has two variables - `$providers` and `$cookies`.
+
+Their values exactly copy the response from the endpoint `/api/{version}/cookies/{project}`. You can learn more about the API in the [Development Guide](development.md).
+
+
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 00000000..2a0e7a43
Binary files /dev/null and b/src/.DS_Store differ
diff --git a/src/Application/Fixture/resources/demo.php b/src/Application/Fixture/resources/demo.php
index e8c24a82..02245e7c 100644
--- a/src/Application/Fixture/resources/demo.php
+++ b/src/Application/Fixture/resources/demo.php
@@ -185,7 +185,7 @@
'project_ids' => [
$fixtures['project']['demo']['project_id'],
],
- 'profile' => 'cs',
+ 'profile' => 'en',
'timezone' => 'Europe/Prague',
],
'manager' => [
@@ -199,7 +199,7 @@
'project_ids' => [
$fixtures['project']['demo']['project_id'],
],
- 'profile' => 'cs',
+ 'profile' => 'en',
'timezone' => 'Europe/Prague',
],
];