refinerycms-images 1.0.11 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/refinery/admin/images_controller.rb +110 -0
- data/app/helpers/refinery/admin/images_helper.rb +24 -0
- data/app/models/refinery/image.rb +96 -0
- data/app/views/refinery/admin/images/_actions.html.erb +15 -0
- data/app/views/{admin → refinery/admin}/images/_existing_image.html.erb +13 -26
- data/app/views/{admin → refinery/admin}/images/_form.html.erb +11 -15
- data/app/views/{admin → refinery/admin}/images/_grid_view.html.erb +7 -5
- data/app/views/refinery/admin/images/_images.html.erb +2 -0
- data/app/views/{admin → refinery/admin}/images/_list_view.html.erb +0 -0
- data/app/views/{admin → refinery/admin}/images/_list_view_image.html.erb +7 -5
- data/app/views/refinery/admin/images/_records.html.erb +18 -0
- data/app/views/refinery/admin/images/edit.html.erb +1 -0
- data/app/views/refinery/admin/images/index.html.erb +6 -0
- data/app/views/{admin → refinery/admin}/images/insert.html.erb +10 -13
- data/app/views/refinery/admin/images/new.html.erb +1 -0
- data/config/locales/bg.yml +37 -36
- data/config/locales/cs.yml +37 -36
- data/config/locales/da.yml +37 -36
- data/config/locales/de.yml +37 -36
- data/config/locales/el.yml +37 -36
- data/config/locales/en.yml +37 -36
- data/config/locales/es.yml +38 -37
- data/config/locales/fi.yml +37 -36
- data/config/locales/fr.yml +37 -36
- data/config/locales/it.yml +47 -45
- data/config/locales/ja.yml +44 -0
- data/config/locales/ko.yml +44 -0
- data/config/locales/lt.yml +37 -36
- data/config/locales/lv.yml +37 -36
- data/config/locales/nb.yml +37 -37
- data/config/locales/nl.yml +36 -35
- data/config/locales/pl.yml +38 -37
- data/config/locales/pt-BR.yml +38 -37
- data/config/locales/rs.yml +37 -37
- data/config/locales/ru.yml +37 -36
- data/config/locales/sk.yml +37 -36
- data/config/locales/sl.yml +36 -35
- data/config/locales/sv.yml +37 -36
- data/config/locales/vi.yml +37 -36
- data/config/locales/zh-CN.yml +37 -36
- data/config/locales/zh-TW.yml +37 -36
- data/config/routes.rb +4 -7
- data/db/migrate/20100913234707_create_refinerycms_images_schema.rb +10 -18
- data/lib/generators/refinery/images/images_generator.rb +10 -0
- data/lib/generators/refinery/images/templates/config/initializers/refinery/images.rb.erb +41 -0
- data/lib/refinery/images.rb +25 -0
- data/lib/refinery/images/configuration.rb +54 -0
- data/lib/refinery/images/dragonfly.rb +54 -0
- data/lib/refinery/images/engine.rb +38 -0
- data/lib/refinery/images/validators.rb +7 -0
- data/lib/refinery/images/validators/image_size_validator.rb +19 -0
- data/lib/refinerycms-images.rb +1 -76
- data/refinerycms-images.gemspec +14 -91
- data/spec/factories/image.rb +5 -0
- data/{features/uploads → spec/fixtures}/beach.jpeg +0 -0
- data/spec/fixtures/fathead.png +0 -0
- data/spec/fixtures/image-with-dashes.jpg +0 -0
- data/spec/lib/generators/refinery/images/images_generator_spec.rb +29 -0
- data/spec/models/refinery/image_spec.rb +158 -0
- data/spec/requests/refinery/admin/images_spec.rb +103 -0
- metadata +116 -106
- data/app/controllers/admin/images_controller.rb +0 -106
- data/app/helpers/admin/images_helper.rb +0 -27
- data/app/models/image.rb +0 -116
- data/app/views/admin/images/_actions.html.erb +0 -16
- data/app/views/admin/images/_images.html.erb +0 -2
- data/app/views/admin/images/_records.html.erb +0 -18
- data/app/views/admin/images/edit.html.erb +0 -1
- data/app/views/admin/images/index.html.erb +0 -6
- data/app/views/admin/images/new.html.erb +0 -1
- data/config/locales/jp.yml +0 -43
- data/config/locales/lolcat.yml +0 -43
- data/features/manage_images.feature +0 -49
- data/features/step_definitions/image_steps.rb +0 -40
- data/features/support/factories.rb +0 -7
- data/features/support/paths.rb +0 -17
- data/features/uploads/id-rather-be-here.jpg +0 -0
- data/features/uploads/refinery_is_awesome.txt +0 -1
- data/lib/gemspec.rb +0 -38
- data/lib/generators/refinerycms_images_generator.rb +0 -8
- data/spec/models/image_spec.rb +0 -115
- data/spec/uploads/beach.jpeg +0 -0
data/config/locales/lv.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
lv:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Bildes
|
6
|
+
article: s
|
7
|
+
description: Bilžu pārvaldīšana
|
8
|
+
admin:
|
9
|
+
images:
|
10
|
+
delete: Dzēst šo bildi
|
11
|
+
edit: Labot šo bildi
|
12
|
+
form:
|
13
|
+
use_current_image: Lietot pašreizējo bildi
|
14
|
+
or: vai
|
15
|
+
replace_image: " aizstāt to ar šo..."
|
16
|
+
current_image: Pašreizējā Bilde
|
17
|
+
maximum_image_size: Maksimāli pieļaujamais bildes izmērs ir %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Augšupielādēt bildi
|
20
|
+
records:
|
21
|
+
no_images_yet: Vēl nav nevienas bildes. Spied "Augšupielādēt bildi", lai ielādētu bildi.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Pārslēgt uz %{view_name} skatu
|
25
|
+
list: saraksta
|
26
|
+
grid: režģa
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Skatīt šo bildi <br/><em>Atvērsies jaunā logā</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Ievietot
|
31
|
+
resize_image: Mainīt bildes izmērus?
|
32
|
+
size: Izmērs
|
33
|
+
insert:
|
34
|
+
existing_image: Esoša Bilde
|
35
|
+
new_image: Jauna Bilde
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: bilde
|
38
|
+
refinery/image: bilde
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Jānorāda bilde pirms augšupielādes
|
42
|
-
|
43
|
+
too_big: Bildes izmēram jābūt mazākam par %{size} megabaitiem
|
43
44
|
incorrect_format: "Bilde drīkst būt tikai sekojošos formātos: JPG, PNG vai GIF"
|
data/config/locales/nb.yml
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
nb:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Bilder
|
6
|
+
description: Behandle bilder
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Fjern dette bildet permanent
|
10
|
+
edit: Rediger dette bildet
|
11
|
+
form:
|
12
|
+
image: Bilde
|
13
|
+
use_current_image: Bruk gjeldende bilde
|
14
|
+
or: eller
|
15
|
+
replace_image: Erstatt det med dette ...
|
16
|
+
current_image: Gjeldende bilde
|
17
|
+
maximum_image_size: "Den største tillatte størrelsen på et bilde er %{bytes}."
|
18
|
+
actions:
|
19
|
+
create_new_image: Lag et nytt bilde
|
20
|
+
records:
|
21
|
+
no_images_yet: Det er ingen bilder her enda. Trykk på "Lag et nytt bilde" for å legge til ditt første bilde.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: "Endre til %{view_name} visning"
|
25
|
+
list: liste
|
26
|
+
grid: rutenett
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Vis dette bildet <br/><em>Åpner i et nytt vindu</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Sett inn
|
31
|
+
resize_image: "Endre størrelsen på bildet? <em>(Anbefales)</em>"
|
32
|
+
size: Størrelse
|
33
|
+
insert:
|
34
|
+
existing_image: Eksisterende bilde
|
35
|
+
new_image: Nytt bilde
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: bilde
|
38
|
+
refinery/image: bilde
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Du må angi bildet som skal lastet opp
|
42
|
-
|
43
|
+
too_big: Bildet må være mindre enn %{size} MB
|
43
44
|
incorrect_format: 'Bildefilen må være av filtypen JPG, PNG eller GIF'
|
44
|
-
|
data/config/locales/nl.yml
CHANGED
@@ -1,42 +1,43 @@
|
|
1
1
|
nl:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Afbeeldingen
|
6
|
+
admin:
|
7
|
+
images:
|
8
|
+
delete: Verwijder deze afbeelding permanent
|
9
|
+
edit: Bewerk deze afbeelding
|
10
|
+
form:
|
11
|
+
image: Afbeelding
|
12
|
+
use_current_image: Gebruik huidige afbeelding
|
13
|
+
or: of
|
14
|
+
replace_image: Vervang de afbeelding door deze
|
15
|
+
current_image: Huidige afbeelding
|
16
|
+
maximum_image_size: "The maximum image size is %{bytes}."
|
17
|
+
actions:
|
18
|
+
create_new_image: Upload een nieuwe afbeelding
|
19
|
+
records:
|
20
|
+
no_images_yet: Er zijn nog geen afbeeldingen. Klik op "Upload een nieuwe afbeelding" om uw eerste afbleelding toe te voegen.
|
21
|
+
index:
|
22
|
+
view:
|
23
|
+
switch_to: Bekijk de %{view_name} versie
|
24
|
+
list: lijst
|
25
|
+
grid: tabel
|
26
|
+
grid_view:
|
27
|
+
view_live_html: Bekijk deze afbeelding <br/><em>(opent een nieuw venster)</em>
|
28
|
+
existing_image:
|
29
|
+
button_text: Invoegen
|
30
|
+
resize_image: Schaal de afbeelding
|
31
|
+
size: Grootte
|
32
|
+
insert:
|
33
|
+
existing_image: Bibliotheek
|
34
|
+
new_image: Uploaden
|
34
35
|
activerecord:
|
35
36
|
models:
|
36
|
-
image: afbeelding
|
37
|
+
refinery/image: afbeelding
|
37
38
|
errors:
|
38
39
|
models:
|
39
|
-
image:
|
40
|
+
refinery/image:
|
40
41
|
blank: U moet een afbeelding kiezen om te uploaden.
|
41
|
-
|
42
|
+
too_big: Afbeeldingen mogen niet groter dan %{size} bytes zijn.
|
42
43
|
incorrect_format: Uw afbeelding moet een JPG, PNG of GIF zijn.
|
data/config/locales/pl.yml
CHANGED
@@ -1,44 +1,45 @@
|
|
1
1
|
pl:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Obrazy
|
6
|
+
description: Zarządzaj obrazami
|
7
|
+
article: masculine
|
8
|
+
admin:
|
9
|
+
images:
|
10
|
+
delete: Na zawsze usuń ten obraz
|
11
|
+
edit: Zmień ten obraz
|
12
|
+
form:
|
13
|
+
image: Obraz
|
14
|
+
use_current_image: Użyj obecnego obrazu
|
15
|
+
or: lub
|
16
|
+
replace_image: " zastąp go tym..."
|
17
|
+
current_image: Obecny obraz
|
18
|
+
maximum_image_size: Maksymalny rozmiar obrazu to %{bytes}.
|
19
|
+
actions:
|
20
|
+
create_new_image: Dodaj nowy obraz
|
21
|
+
records:
|
22
|
+
no_images_yet: Nie ma jeszcze żadnych obrazów. Kliknij "Dodaj nowy obraz" aby dodać pierwszy.
|
23
|
+
index:
|
24
|
+
view:
|
25
|
+
switch_to: Przełącz do widoku %{view_name}
|
26
|
+
list: lista
|
27
|
+
grid: siatka
|
28
|
+
grid_view:
|
29
|
+
view_live_html: Obejrzyj ten obraz <br/><em>Otwarcie w nowym oknie</em>
|
30
|
+
existing_image:
|
31
|
+
button_text: Wstaw
|
32
|
+
resize_image: Zmień rozmiar tego obrazu?
|
33
|
+
size: Rozmiar
|
34
|
+
insert:
|
35
|
+
existing_image: Istniejący obraz
|
36
|
+
new_image: Nowy obraz
|
36
37
|
activerecord:
|
37
38
|
models:
|
38
|
-
image: obraz
|
39
|
+
refinery/image: obraz
|
39
40
|
errors:
|
40
41
|
models:
|
41
|
-
image:
|
42
|
+
refinery/image:
|
42
43
|
blank: Musisz określić obraz do wgrania
|
43
|
-
|
44
|
+
too_big: Obraz powinien być mniejszy niż %{size} megabajtów
|
44
45
|
incorrect_format: 'Obraz musi być plikiem typu JPG, PNG lub GIF'
|
data/config/locales/pt-BR.yml
CHANGED
@@ -1,44 +1,45 @@
|
|
1
1
|
pt-BR:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Imagens
|
6
|
+
article: a
|
7
|
+
description: Gerenciar imagens
|
8
|
+
admin:
|
9
|
+
images:
|
10
|
+
delete: Remover esta imagem para sempre
|
11
|
+
edit: Editar esta imagem
|
12
|
+
form:
|
13
|
+
image: Imagem
|
14
|
+
use_current_image: Usar imagem atual
|
15
|
+
or: ou
|
16
|
+
replace_image: " substituir por esta..."
|
17
|
+
current_image: Imagem atual
|
18
|
+
maximum_image_size: "O tamanho máximo permitido é de %{bytes}."
|
19
|
+
actions:
|
20
|
+
create_new_image: Criar Nova Imagem
|
21
|
+
records:
|
22
|
+
no_images_yet: Ainda não existem imagens. Clique em "Criar Nova Imagem" para adicionar sua primeira imagem.
|
23
|
+
index:
|
24
|
+
view:
|
25
|
+
switch_to: Trocar para visão em %{view_name}
|
26
|
+
list: lista
|
27
|
+
grid: grade
|
28
|
+
grid_view:
|
29
|
+
view_live_html: "Ver esta imagem<br/><em>Abre em uma nova janela</em>"
|
30
|
+
existing_image:
|
31
|
+
button_text: Inserir
|
32
|
+
resize_image: "Redimencionar a imagem?"
|
33
|
+
size: Tamanho
|
34
|
+
insert:
|
35
|
+
existing_image: Do Arquivo
|
36
|
+
new_image: Nova Imagem
|
36
37
|
activerecord:
|
37
38
|
models:
|
38
|
-
image: Imagem
|
39
|
+
refinery/image: Imagem
|
39
40
|
errors:
|
40
41
|
models:
|
41
|
-
image:
|
42
|
+
refinery/image:
|
42
43
|
blank: Você deve escolher uma imagem para enviar
|
43
|
-
|
44
|
+
too_big: "Imagem deve possuir menos de %{size} bytes de tamanho"
|
44
45
|
incorrect_format: 'Sua imagem deve ser uma JPG, PNG ou GIF'
|
data/config/locales/rs.yml
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
rs:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Slike
|
6
|
+
description: Menjaj slike
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Ukloni ovu sliku zauvek
|
10
|
+
edit: Izmeni sliku
|
11
|
+
form:
|
12
|
+
image: Slika
|
13
|
+
use_current_image: Koristi trenutnu sliku
|
14
|
+
or: ili
|
15
|
+
replace_image: " zameni sa ovom..."
|
16
|
+
current_image: Trenutna slika
|
17
|
+
maximum_image_size: Maksimalna veličina slike je %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Dodaj novu sliku
|
20
|
+
records:
|
21
|
+
no_images_yet: Ne postoje slike. Klikni "Dodaj novu sliku" da dodaš.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Prebaci na %{view_name}
|
25
|
+
list: listu
|
26
|
+
grid: mrežni prikaz
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Pogledaj ovu sliku <br/><em>Otvara se u novom prozoru</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Unesi
|
31
|
+
resize_image: Promeni veličinu slike?
|
32
|
+
size: Veličina
|
33
|
+
insert:
|
34
|
+
existing_image: Trenutne slike
|
35
|
+
new_image: Upload
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: slika
|
38
|
+
refinery/image: slika
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Moraš izabrati sliku za upload
|
42
|
-
|
43
|
+
too_big: Slika bi trebalo da bude manja od %{size} megabajta
|
43
44
|
incorrect_format: 'Slika mora biti u JPG, PNG ili GIF formatu'
|
44
|
-
|