Merge branch 'label_generator'

This commit is contained in:
Jan Böhmer 2020-05-10 14:19:29 +02:00
commit c0f5952994
118 changed files with 10459 additions and 3205 deletions

View file

@ -17,7 +17,19 @@ fos_ck_editor:
extraPlugins: "markdown"
height: 60
toolbar: description_toolbar
label_config:
height: 100
enterMode: 2
toolbar: label_toolbar
extraPlugins: ["partdb_label", "showprotected"]
allowedContent: true
font_names: >
DejaVu Sans Mono/DejaVu Sans Mono;
DejaVu Sans/DejaVu Sans;
DejaVu Serif/DejaVu Serif;
Helvetica/Helvetica, Arial, sans-serif;
Times New Roman/Times New Roman, Times, serif;
Courier New/Courier New, Courier, monospace;
plugins:
bbcode:
@ -29,10 +41,25 @@ fos_ck_editor:
specialchar:
path: "ckeditor/plugins/specialchar"
filename: "plugin.js"
partdb_label:
path: "ckeditor/plugins/partdb_label/"
filename: "plugin.js"
showprotected:
path: "ckeditor/plugins/showprotected/"
filename: "plugin.js"
toolbars:
configs:
label_toolbar:
- [ 'Bold', 'Italic', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ]
- ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
- ["SpecialChar"]
- ["Source"]
- "/"
- ['Format', 'FontSize', 'Font']
- ['Table', 'HorizontalRule']
- ['Placeholders']
description_toolbar:
- [ 'Bold', 'Italic', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ]
- ["SpecialChar"]

View file

@ -15,3 +15,4 @@ twig:
allow_email_pw_reset: '%allow_email_pw_reset%'
locale_menu: '%locale_menu%'
attachment_manager: '@App\Services\Attachments\AttachmentManager'
label_profile_dropdown_helper: '@App\Services\LabelSystem\LabelProfileDropdownHelper'

View file

@ -291,6 +291,9 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
timetravel:
label: "perm.tools.timeTravel"
bit: 14
label_scanner:
label: "perm.tools.label_scanner"
bit: 16
groups:
label: "perm.groups"
@ -466,11 +469,33 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
edit_options:
label: "perm.self.edit_options"
bit: 2
delete_profiles:
label: "perm.self.delete_profiles"
bit: 4
alsoSet: ['create_labels']
read_profiles:
label: "perm.self.read_profiles"
bit: 10
edit_profiles:
label: "perm.self.edit_profiles"
bit: 6
alsoSet: ['read_profiles']
create_profiles:
label: "perm.self.create_profiles"
bit: 8
alsoSet: ['read_profiles', 'edit_profiles']
delete_profiles:
label: "perm.self.delete_profiles"
bit: 4
alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles']
use_twig:
label: "perm.labels.use_twig"
bit: 12
alsoSet: ['create_labels', 'edit_options']
show_history:
label: "perm.show_history"
bit: 14
alsoSet: ['read_profiles']
revert_element:
label: "perm.revert_elements"
bit: 16
alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles', 'delete_profiles']

View file

@ -3,6 +3,11 @@
# controller: App\Controller\DefaultController::index
# Redirect every url without an locale to the locale of the user/the global base locale
scan_qr:
path: /scan/{type}/{id}
controller: App\Controller\ScanController:scanQRCode
redirector:
path: /{url}
requirements:

View file

@ -35,6 +35,11 @@ services:
bool $gpdr_compliance : '%gpdr_compliance%'
bool $kernel_debug: '%kernel.debug%'
string $kernel_cache_dir: '%kernel.cache_dir%'
string $partdb_title: '%partdb_title%'
_instanceof:
App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface:
tags: ['app.label_placeholder_provider']
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
@ -163,6 +168,15 @@ services:
$code_length: 8
$code_count: 15
App\Services\LabelSystem\LabelTextReplacer:
arguments:
$providers: !tagged_iterator 'app.label_placeholder_provider'
App\Services\TranslationExtractor\PermissionExtractor:
tags:
- { name: 'translation.extractor', alias: 'permissionExtractor'}
- { name: 'translation.extractor', alias: 'permissionExtractor'}
# PartLotProvider must be invoked before all other providers, so it can override %%NAME%% placeholder
App\Services\LabelSystem\PlaceholderProviders\PartLotProvider:
tags:
- { name: 'app.label_placeholder_provider', priority: 10}