Skip to content

Commit d01c60f

Browse files
authored
Merge branch 'master' into sylius-1.7
2 parents cf28346 + d7c6ddd commit d01c60f

11 files changed

Lines changed: 211 additions & 11 deletions

File tree

.scrutinizer.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
build:
2+
nodes:
3+
analysis:
4+
tests:
5+
override:
6+
- php-scrutinizer-run
7+
environment:
8+
variables:
9+
COMPOSER_MEMORY_LIMIT: -1
10+
11+
filter:
12+
excluded_paths: [tests/*, spec/*]

.travis.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,45 @@ dist: trusty
44

55
sudo: false
66

7-
php:
8-
- 7.3
9-
- 7.4
10-
7+
matrix:
8+
include:
9+
# Sylius 1.4
10+
-
11+
php: 7.2
12+
env:
13+
- DEPENDENCY_VERSIONS="sylius/sylius:1.4.*"
14+
-
15+
php: 7.3
16+
env:
17+
- DEPENDENCY_VERSIONS="sylius/sylius:1.4.*"
18+
# Sylius 1.5
19+
-
20+
php: 7.2
21+
env:
22+
- DEPENDENCY_VERSIONS="sylius/sylius:1.5.*"
23+
-
24+
php: 7.3
25+
env:
26+
- DEPENDENCY_VERSIONS="sylius/sylius:1.5.*"
27+
# Sylius 1.6
28+
-
29+
php: 7.2
30+
env:
31+
- DEPENDENCY_VERSIONS="sylius/sylius:1.6.*"
32+
-
33+
php: 7.3
34+
env:
35+
- DEPENDENCY_VERSIONS="sylius/sylius:1.6.*"
36+
# Sylius 1.7
37+
-
38+
php: 7.3
39+
env:
40+
- DEPENDENCY_VERSIONS="sylius/sylius:1.7.*"
41+
-
42+
php: 7.4
43+
env:
44+
- DEPENDENCY_VERSIONS="sylius/sylius:1.7.*"
45+
1146
cache:
1247
yarn: true
1348
directories:
@@ -27,7 +62,8 @@ before_install:
2762
- mkdir -p tests/Application/public/media/image
2863

2964
install:
30-
- composer install --no-interaction --prefer-dist
65+
- composer require ${DEPENDENCY_VERSIONS} --no-update
66+
- composer update --no-interaction --prefer-dist
3167
- (cd tests/Application && yarn install)
3268

3369
before_script:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"require": {
1212
"php": "^7.3",
1313
"league/csv": "^9.1",
14-
"friendsofsymfony/ckeditor-bundle": "^2.1",
14+
"friendsofsymfony/ckeditor-bundle": "^1.1|^2.0",
1515
"stefandoorn/sitemap-plugin": "^1.0",
1616
"sylius/sylius": "^1.7"
1717
},

src/Controller/MediaController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function renderMediaAction(Request $request): Response
4242

4343
$mediaProviderResolver = $this->get('bitbag_sylius_cms_plugin.resolver.media_provider');
4444

45-
return new Response($mediaProviderResolver->resolveProvider($media)->render($media));
45+
return new Response($mediaProviderResolver->resolveProvider($media)->render($media, $request->get('template')));
4646
}
4747

4848
public function downloadMediaAction(Request $request): Response

src/MediaProvider/GenericProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public function getTemplate(): string
4747
return $this->template;
4848
}
4949

50-
public function render(MediaInterface $media, array $options = []): string
50+
public function render(MediaInterface $media, ?string $template = null, array $options = []): string
5151
{
52-
return $this->twigEngine->render($this->template, array_merge(['media' => $media], $options));
52+
return $this->twigEngine->render($template ?? $this->template, array_merge(['media' => $media], $options));
5353
}
5454

5555
public function upload(MediaInterface $media): void

src/MediaProvider/ProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ProviderInterface
1818
{
1919
public function getTemplate(): string;
2020

21-
public function render(MediaInterface $media, array $options = []): string;
21+
public function render(MediaInterface $media, ?string $template = null, array $options = []): string;
2222

2323
public function upload(MediaInterface $media): void;
2424
}

src/Resources/config/grids/admin/media.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ sylius_grid:
4040
type: update
4141
delete:
4242
type: delete
43+
bulk:
44+
delete:
45+
type: delete

src/Resources/config/routing/shop/page.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ bitbag_sylius_cms_plugin_shop_page_index_by_section_code:
3838
arguments:
3939
- $sectionCode
4040
- "expr:service('sylius.context.locale').getLocaleCode()"
41-
-
41+
4242
bitbag_sylius_cms_plugin_shop_page_index_by_section_code_no_grid:
4343
path: /pages/{sectionCode}/no-grid
4444
methods: [GET]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
bitbag_sylius_cms_plugin:
2+
ui:
3+
blocks: Blokai
4+
pages: Puslapiai
5+
content_management: Turinio valdymas
6+
cms: Turinio valdymas
7+
enabled: Įjungta
8+
blocks_header: Blokai
9+
blocks_subheader: Blokų tvarkymas
10+
pages_header: Puslapiai
11+
pages_subheader: Puslapių tvarkymas
12+
products: Produktai
13+
page_related_products: Su puslapiu susiję produktai
14+
name: Pavadinimas
15+
slug: Šliužas (nuorodos dalis)
16+
meta_keywords: Meta raktiniai žodžiai
17+
meta_description: Meta aprašymas
18+
content: Turinys
19+
faq: DUK
20+
code: Kodas
21+
contents: Turinys
22+
images: Paveikslai
23+
image: Paveikslas
24+
link: Nuoroda
25+
faq_header: DUK
26+
faq_subheader: Dažniausiai užduodamų klausimų tvarkymas
27+
frequently_asked_questions: Dažniausiai užduodami klausimai
28+
question: Klausimas
29+
answer: Atsakymas
30+
sections: Blokų grupė
31+
sections_header: Blokų grupė
32+
sections_subheader: Blokų grupių tvarkymas
33+
position: Pozicija
34+
channels: Kanalai
35+
preview: Peržiūra
36+
download: Parsisiųsti
37+
name_when_linked: Pavadinimas nuorodose
38+
description_when_linked: Aprašymas nuorodose
39+
media: Medija
40+
media_header: Medija
41+
media_subheader: Įterptinų failų valdymas
42+
type: Tipas
43+
file: Failas
44+
alt: Alternatyvusis tekstas
45+
description: Aprašymas
46+
file_provider: Failas
47+
image_provider: Paveikslas
48+
video_provider: Vaizdo įrašas
49+
read_more: Skaityti toliau
50+
breadcrumb: Pavadinimas kelyje
51+
import: Importuoti
52+
csv_file: CSV failas
53+
successfully_imported: Duomenys sėkmingai importuoti.
54+
form_was_submitted_with_errors: "Forma pateikta su klaidomis:"
55+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
bitbag_sylius_cms_plugin:
2+
block:
3+
image:
4+
mime_types: Leidžiami tik PNG ir JPEG formatų failai.
5+
not_blank: Paveikslą nurodyti privaloma.
6+
code:
7+
unique: Blokas su tokiu kodu jau egzistuoja.
8+
not_blank: Kodą įvesti privaloma.
9+
min_length: Kodo ilgis turi būti bent {{ limit }} simb.
10+
max_length: Kodas negali būti ilgesnis nei {{ limit }} simb.
11+
name:
12+
min_length: Pavadinimo ilgis turi būti bent {{ limit }} simb.
13+
max_length: Pavadinimas negali būti ilgesnis nei {{ limit }} simb.
14+
link:
15+
min_length: Nurodos ilgis turi būti bent {{ limit }} simb.
16+
max_length: Nuoroda negali būti ilgesnė nei {{ limit }} simb.
17+
content:
18+
not_blank: Turinį įvesti privaloma.
19+
min_length: Turinio ilgis turi būti bent {{ limit }} simb.
20+
page:
21+
code:
22+
unique: Puslapis su tokiu kodu jau egzistuoja.
23+
not_blank: Kodą įvesti privaloma.
24+
min_length: Kodo ilgis turi būti bent {{ limit }} simb.
25+
max_length: Kodas negali būti ilgesnis nei {{ limit }} simb.
26+
name:
27+
not_blank: Pavadinimą įvesti privaloma.
28+
min_length: Pavadinimo ilgis turi būti bent {{ limit }} simb.
29+
max_length: Pavadinimas negali būti ilgesnis nei {{ limit }} simb.
30+
slug:
31+
not_blank: Šliužą įvesti privaloma.
32+
min_length: Šliužo ilgis turi būti bent {{ limit }} simb.
33+
max_length: Šliužas negali būti ilgesnis nei {{ limit }} simb.
34+
unique: Šliužas turi būti unikalus.
35+
meta_keywords:
36+
min_length: Meta raktinių žodžių ilgis turi būti bent {{ limit }} simb.
37+
max_length: Meta raktiniai žodžiai negali būti trumpesni nei {{ limit }} simb.
38+
meta_description:
39+
min_length: Meta aprašymo ilgis turi būti bent {{ limit }} simb.
40+
max_length: Meta aprašymas negali būti ilgesnis nei {{ limit }} simb.
41+
content:
42+
not_blank: Turinį įvesti privaloma.
43+
min_length: Turinio ilgis turi būti bent {{ limit }} simb.
44+
frequently_asked_question:
45+
code:
46+
unique: DUK įrašas su tokiu kodu jau egzistuoja.
47+
not_blank: Kodą įvesti privaloma.
48+
min_length: Kodo ilgis turi būti bent {{ limit }} simb.
49+
max_length: Kodas negali būti ilgesnis nei {{ limit }} simb.
50+
position:
51+
unique: DUK įrašas su tokia pozicija jau egzistuoja.
52+
not_blank: Poziciją įvesti privaloma.
53+
question:
54+
not_blank: Klausimą įvesti privaloma.
55+
min_length: Klausimo ilgis turi būti bent {{ limit }} simb.
56+
answer:
57+
not_blank: Atsakymą įvesti privaloma.
58+
min_length: Atsakymo ilgis turi būti bent {{ limit }} simb.
59+
section:
60+
code:
61+
unique: Blokų grupė su tokiu kodu jau egzistuoja.
62+
not_blank: Kodą įvesti privaloma.
63+
min_length: Kodo ilgis turi būti bent {{ limit }} simb.
64+
max_length: Kodas negali būti ilgesnis nei {{ limit }} simb.
65+
name:
66+
not_blank: Pavadinimą įvesti privaloma.
67+
min_length: Pavadinimo ilgis turi būti bent {{ limit }} simb.
68+
max_length: Pavadinimas negali būti ilgesnis nei {{ limit }} simb.
69+
media:
70+
code:
71+
unique: Failas su tokiu kodu jau egzistuoja.
72+
not_blank: Kodą įvesti privaloma.
73+
min_length: Kodo ilgis turi būti bent {{ limit }} simb.
74+
max_length: Kodas negali būti ilgesnis nei {{ limit }} simb.
75+
file:
76+
not_blank: Failą pasirinkti privaloma.
77+
name:
78+
not_blank: Pavadinimą įvesti privaloma.
79+
min_length: Pavadinimo ilgis turi būti bent {{ limit }} simb.
80+
max_length: Pavadinimas negali būti ilgesnis nei {{ limit }} simb.
81+
content:
82+
min_length: Turinio ilgis turi būti bent {{ limit }} simb.
83+
alt:
84+
min_length: Alternatyviojo teksto ilgis turi būti bent {{ limit }} simb.
85+
max_length: Alternatyvusis tekstas negali būti ilgesnis nei {{ limit }} simb.
86+
link:
87+
min_length: Nurodos ilgis turi būti bent {{ limit }} simb.
88+
max_length: Nuoroda negali būti ilgesnė nei {{ limit }} simb.
89+
import:
90+
not_blank: Importuojamą failą pasirinkti privaloma.
91+
invalid_format: Įkeltas netinkamas failas. Pasirinkite CSV formato failą.
92+

0 commit comments

Comments
 (0)