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
@@ -0,0 +1 @@
|
|
1
|
+
<%= render '/refinery/admin/images/form' %>
|
data/config/locales/bg.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
bg:
|
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: Изображения
|
6
|
+
description: Управление на изображения
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Изтриване на това изображение завинаги
|
10
|
+
edit: Редактиране на това изображение
|
11
|
+
form:
|
12
|
+
image: Изображение
|
13
|
+
use_current_image: Използвайте текущото изображение
|
14
|
+
or: или
|
15
|
+
replace_image: " го заменете с ново..."
|
16
|
+
current_image: Текущо изображение
|
17
|
+
maximum_image_size: Максималната големина на изображението е %{bytes} байта.
|
18
|
+
actions:
|
19
|
+
create_new_image: Добавяне на ново изображение
|
20
|
+
records:
|
21
|
+
no_images_yet: Все още няма изображения. Натиснете "Добавяне на ново изображение", за да качите ново.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Преглед като %{view_name}
|
25
|
+
list: списък
|
26
|
+
grid: решетка
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Преглед на това изображение <br/><em>(ще се отвори в нов прозорец)</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Вмъкване
|
31
|
+
resize_image: Оразмеряване на изображението?
|
32
|
+
size: Големина
|
33
|
+
insert:
|
34
|
+
existing_image: Галерия
|
35
|
+
new_image: Качване
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: изображение
|
38
|
+
refinery/image: изображение
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Трябва да укажете изображение за качване
|
42
|
-
|
43
|
+
too_big: Размерът на изображението трябва да бъде по-малък от %{size} байта
|
43
44
|
incorrect_format: 'Вашето изображение трябва да бъде JPG, PNG или GIF'
|
data/config/locales/cs.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
cs:
|
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: Obrázky
|
6
|
+
description: Spravovat obrázky
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Smazat tento obrázek
|
10
|
+
edit: Upravit tento obrázek
|
11
|
+
form:
|
12
|
+
image: Obrázek
|
13
|
+
use_current_image: Použít vybraný obrázek
|
14
|
+
or: nebo
|
15
|
+
replace_image: " nahradit jej tímto..."
|
16
|
+
current_image: Vybraný obrázek
|
17
|
+
maximum_image_size: Maximální velikost obrázku je %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Přidat nový obrázek
|
20
|
+
records:
|
21
|
+
no_images_yet: Zatím nebyl nahraný žádný obrázek.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: "Přepnout pohled na: %{view_name}"
|
25
|
+
list: seznam
|
26
|
+
grid: tabulka
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Zobrazit tento obrázek <br/><em>Otevře se novém okně</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Vložit
|
31
|
+
resize_image: Změnít velikost?
|
32
|
+
size: Velikost
|
33
|
+
insert:
|
34
|
+
existing_image: Existující obrázek
|
35
|
+
new_image: Nový obrázek
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: obrázek
|
38
|
+
refinery/image: obrázek
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Musíte zadat obrázek který chcete nahrát
|
42
|
-
|
43
|
+
too_big: Maximální velikost obrázku je %{size} MB
|
43
44
|
incorrect_format: 'Obrázek musí být ve formátu JPG, PNG nebo GIF'
|
data/config/locales/da.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
da:
|
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: Billeder
|
6
|
+
description: Vedligehold billeder
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Slet billedet
|
10
|
+
edit: Redigér billede
|
11
|
+
form:
|
12
|
+
image: Billede
|
13
|
+
use_current_image: Behold nuværende billede
|
14
|
+
or: eller
|
15
|
+
replace_image: " erstat med dette..."
|
16
|
+
current_image: Nuværende billede
|
17
|
+
maximum_image_size: Billedet må maksimalt fylde %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Tilføj et nyt billede
|
20
|
+
records:
|
21
|
+
no_images_yet: Der er ingen billeder endnu. Klik "Tilføj et nyt billede" for at oprette det første.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Skift til %{view_name}visning
|
25
|
+
list: liste
|
26
|
+
grid: gitter
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Vis billede<br/><em>(åbner i nyt vindue)</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Indsæt
|
31
|
+
resize_image: Skalér billedet?
|
32
|
+
size: Størrelse
|
33
|
+
insert:
|
34
|
+
existing_image: Arkiv
|
35
|
+
new_image: Upload
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: billede
|
38
|
+
refinery/image: billede
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Du skal angive et billede, der skal uploades
|
42
|
-
|
43
|
+
too_big: Filer må højest være på %{size} bytes
|
43
44
|
incorrect_format: 'Dit billede skal være enten JPG, PNG eller GIF format'
|
data/config/locales/de.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
de:
|
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: Verwaltet Bilder
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Dieses Bild für immer löschen
|
10
|
+
edit: Dieses Bild bearbeiten
|
11
|
+
form:
|
12
|
+
image: Bild
|
13
|
+
use_current_image: Aktuelles Bild verwenden
|
14
|
+
or: oder
|
15
|
+
replace_image: " mit diesem ersetzen..."
|
16
|
+
current_image: Aktuelles Bild
|
17
|
+
maximum_image_size: Die maximale Größe eines Bildes beträgt %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Neues Bild anlegen
|
20
|
+
records:
|
21
|
+
no_images_yet: Es sind noch keine Bilder vorhanden. Klicken Sie auf "Neues Bild anlegen", um Ihr estes Bild hinzuzufügen.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Zur %{view_name}-Ansicht wechseln
|
25
|
+
list: Listen
|
26
|
+
grid: Gitter
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Dieses Bild betrachten <br/><em>Öffnet sich in einem neuen Fenster</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Einfügen
|
31
|
+
resize_image: Bild in der Größe ändern?
|
32
|
+
size: Größe
|
33
|
+
insert:
|
34
|
+
existing_image: Vorhandenes Bild
|
35
|
+
new_image: Neues Bild
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: Bild
|
38
|
+
refinery/image: Bild
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Sie müssen ein Bild zum Hochladen angeben
|
42
|
-
|
43
|
+
too_big: Bild sollte kleiner als %{size} Megabytes sein
|
43
44
|
incorrect_format: 'Ihr Bild sollte ein JPG, PNG oder GIF sein'
|
data/config/locales/el.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
el:
|
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: Εικόνες
|
6
|
+
description: Διαχείριση Εικόνων
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Διαγραφή εικόνας
|
10
|
+
edit: Επεξεργασία εικόνας
|
11
|
+
form:
|
12
|
+
image: Εικόνα
|
13
|
+
use_current_image: Χρήση τρέχουσας εικόνας
|
14
|
+
or: or
|
15
|
+
replace_image: " αλλαγή με αυτήν..."
|
16
|
+
current_image: Τρέχουσα εικόνα
|
17
|
+
maximum_image_size: Το μέγιστο μέγεθος εικόνας είναι %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Προσθήκη νέας εικόνας
|
20
|
+
records:
|
21
|
+
no_images_yet: Δεν υπάρχουν εικόνες. Κάντε κλικ στο "Προσθήκη εικόνας" για να προσθέτε την πρώτη εικόνα.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Αλλαγή σε %{view_name} view
|
25
|
+
list: λίστα
|
26
|
+
grid: πλέγμα
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Δείτε την εικόνα <br/><em>Ανοίγει σε νέο παράθυρο</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Εισαγωγή
|
31
|
+
resize_image: Αλλαγή μεγέθους;
|
32
|
+
size: Μέγεθος
|
33
|
+
insert:
|
34
|
+
existing_image: Βιβλιοθήκη
|
35
|
+
new_image: Ανέβασμα
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: εικόνα
|
38
|
+
refinery/image: εικόνα
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Πρέπει να επιλέξετε εικόνα για ανέβασμα
|
42
|
-
|
43
|
+
too_big: Η εικόνα πρέπει να είναι μικρότερη από %{size} bytes σε μέγεθος
|
43
44
|
incorrect_format: 'Η εικόνα σας πρέπει να είναι JPG, PNG ή GIF'
|
data/config/locales/en.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
en:
|
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: Images
|
6
|
+
description: Manage images
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Remove this image forever
|
10
|
+
edit: Edit this image
|
11
|
+
form:
|
12
|
+
image: Image
|
13
|
+
use_current_image: Use current image
|
14
|
+
or: or
|
15
|
+
replace_image: " replace it with this one..."
|
16
|
+
current_image: Current Image
|
17
|
+
maximum_image_size: The maximum image size is %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Add new image
|
20
|
+
records:
|
21
|
+
no_images_yet: There are no images yet. Click "Add new image" to add your first image.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Switch to %{view_name} view
|
25
|
+
list: list
|
26
|
+
grid: grid
|
27
|
+
grid_view:
|
28
|
+
view_live_html: View this image <br/><em>Opens in a new window</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Insert
|
31
|
+
resize_image: Resize the image?
|
32
|
+
size: Size
|
33
|
+
insert:
|
34
|
+
existing_image: Library
|
35
|
+
new_image: Upload
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: image
|
38
|
+
refinery/image: image
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: You must specify an image for upload
|
42
|
-
|
43
|
+
too_big: Image should be smaller than %{size} bytes in size
|
43
44
|
incorrect_format: 'Your image must be either a JPG, PNG or GIF'
|