comfortable_mexican_sofa 1.12.8 → 1.12.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/app/assets/fonts/comfy/admin/cms/lib/redactor-font.eot +0 -0
- data/app/assets/javascripts/comfy/admin/cms/base.js.coffee +46 -11
- data/app/assets/javascripts/comfy/admin/cms/lib/redactor.js +1807 -570
- data/app/assets/stylesheets/comfy/admin/cms/bootstrap_overrides.sass +6 -1
- data/app/assets/stylesheets/comfy/admin/cms/lib/redactor.css +79 -52
- data/app/controllers/comfy/admin/cms/base_controller.rb +2 -1
- data/app/controllers/comfy/admin/cms/pages_controller.rb +4 -1
- data/app/controllers/comfy/cms/base_controller.rb +5 -5
- data/app/controllers/comfy/cms/content_controller.rb +4 -0
- data/app/helpers/comfy/cms_helper.rb +72 -70
- data/app/models/comfy/cms/file.rb +0 -1
- data/app/views/comfy/admin/cms/files/_file.html.haml +1 -1
- data/app/views/comfy/admin/cms/layouts/_index_branch.html.haml +2 -1
- data/config/environments/test.rb +2 -0
- data/config/initializers/comfortable_mexican_sofa.rb +12 -0
- data/config/locales/cs.yml +2 -3
- data/config/locales/da.yml +2 -3
- data/config/locales/de.yml +2 -3
- data/config/locales/en.yml +2 -3
- data/config/locales/es.yml +2 -3
- data/config/locales/fr.yml +2 -3
- data/config/locales/it.yml +2 -3
- data/config/locales/ja.yml +2 -3
- data/config/locales/nb.yml +2 -3
- data/config/locales/nl.yml +2 -3
- data/config/locales/pl.yml +40 -41
- data/config/locales/pt-BR.yml +2 -3
- data/config/locales/ru.yml +2 -3
- data/config/locales/sv.yml +2 -3
- data/config/locales/uk.yml +2 -3
- data/config/locales/zh-CN.yml +2 -3
- data/config/locales/zh-TW.yml +16 -17
- data/db/migrate/01_create_cms.rb +18 -25
- data/db/upgrade_migrations/08_upgrade_to_1_12_0.rb +2 -2
- data/doc/preview.png +0 -0
- data/lib/comfortable_mexican_sofa.rb +1 -0
- data/lib/comfortable_mexican_sofa/access_control/admin_authentication.rb +3 -2
- data/lib/comfortable_mexican_sofa/access_control/public_authorization.rb +8 -0
- data/lib/comfortable_mexican_sofa/configuration.rb +4 -0
- data/lib/comfortable_mexican_sofa/engine.rb +5 -1
- data/lib/comfortable_mexican_sofa/fixture/file.rb +22 -22
- data/lib/comfortable_mexican_sofa/tags/asset.rb +8 -3
- data/lib/comfortable_mexican_sofa/version.rb +1 -1
- data/test/controllers/comfy/admin/cms/pages_controller_test.rb +22 -0
- data/test/controllers/comfy/cms/content_controller_test.rb +12 -0
- data/test/integration/access_control_test.rb +24 -1
- data/test/lib/fixtures/files_test.rb +29 -27
- data/test/lib/tags/asset_test.rb +42 -9
- data/test/test_helper.rb +8 -3
- metadata +5 -3
@@ -19,7 +19,7 @@
|
|
19
19
|
.content-type
|
20
20
|
= truncate(file.file_content_type)
|
21
21
|
.file-size
|
22
|
-
= number_to_human_size(file.file_file_size
|
22
|
+
= number_to_human_size(file.file_file_size)
|
23
23
|
%td
|
24
24
|
.btn-group.btn-group-sm
|
25
25
|
= link_to t('.edit'), edit_comfy_admin_cms_site_file_path(@site, file), :class => 'btn btn-default'
|
data/config/environments/test.rb
CHANGED
@@ -21,6 +21,11 @@ ComfortableMexicanSofa.configure do |config|
|
|
21
21
|
# your logic. Default module doesn't do anything.
|
22
22
|
# config.public_auth = 'ComfyPublicAuthentication'
|
23
23
|
|
24
|
+
# Module responsible for public authorization. It should have #authorize
|
25
|
+
# method that returns true or false based on params and loaded instance
|
26
|
+
# variables available for a given controller.
|
27
|
+
# config.public_authorization = 'ComfyPublicAuthorization'
|
28
|
+
|
24
29
|
# When arriving at /cms-admin you may chose to redirect to arbirtary path,
|
25
30
|
# for example '/cms-admin/users'
|
26
31
|
# config.admin_route_redirect = ''
|
@@ -119,3 +124,10 @@ ComfortableMexicanSofa::AccessControl::AdminAuthentication.password = 'password'
|
|
119
124
|
# return true
|
120
125
|
# end
|
121
126
|
# end
|
127
|
+
|
128
|
+
# Uncomment this module and `config.public_authorization` above to use custom public authorization
|
129
|
+
# module ComfyPublicAuthorization
|
130
|
+
# def authorize
|
131
|
+
# return true
|
132
|
+
# end
|
133
|
+
# end
|
data/config/locales/cs.yml
CHANGED
@@ -208,9 +208,6 @@ cs:
|
|
208
208
|
index:
|
209
209
|
title: Soubory
|
210
210
|
new_link: Nahrát nový soubor
|
211
|
-
edit: Upravit
|
212
|
-
delete: Smazat
|
213
|
-
are_you_sure: Určitě?
|
214
211
|
button: Nahrát soubory
|
215
212
|
new:
|
216
213
|
title: Nový soubor
|
@@ -226,6 +223,8 @@ cs:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Určitě?
|
228
225
|
file:
|
226
|
+
edit: Upravit
|
227
|
+
delete: Smazat
|
229
228
|
are_you_sure: Určitě?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/da.yml
CHANGED
@@ -208,9 +208,6 @@ da:
|
|
208
208
|
index:
|
209
209
|
title: Filer
|
210
210
|
new_link: Send ny fil
|
211
|
-
edit: Rediger
|
212
|
-
delete: Slet
|
213
|
-
are_you_sure: Er du sikker?
|
214
211
|
button: Send filer
|
215
212
|
new:
|
216
213
|
title: Ny fil
|
@@ -226,6 +223,8 @@ da:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Er du sikker?
|
228
225
|
file:
|
226
|
+
edit: Rediger
|
227
|
+
delete: Slet
|
229
228
|
are_you_sure: Er du sikker?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/de.yml
CHANGED
@@ -208,9 +208,6 @@ de:
|
|
208
208
|
index:
|
209
209
|
title: Datei
|
210
210
|
new_link: Neue Datei hochladen
|
211
|
-
edit: Datei bearbeiten
|
212
|
-
delete: Datei löschen
|
213
|
-
are_you_sure: Sind Sie sicher, dass Sie diese Datei löschen möchten?
|
214
211
|
button: Datei hochladen
|
215
212
|
new:
|
216
213
|
title: Datei erstellen
|
@@ -226,6 +223,8 @@ de:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Sind Sie sicher?
|
228
225
|
file:
|
226
|
+
edit: Datei bearbeiten
|
227
|
+
delete: Datei löschen
|
229
228
|
are_you_sure: Sind Sie sicher?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/en.yml
CHANGED
@@ -208,9 +208,6 @@ en:
|
|
208
208
|
index:
|
209
209
|
title: Files
|
210
210
|
new_link: Upload New File
|
211
|
-
edit: Edit
|
212
|
-
delete: Delete
|
213
|
-
are_you_sure: Are you sure?
|
214
211
|
button: Upload Files
|
215
212
|
new:
|
216
213
|
title: New File
|
@@ -226,6 +223,8 @@ en:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Are you sure?
|
228
225
|
file:
|
226
|
+
edit: Edit
|
227
|
+
delete: Delete
|
229
228
|
are_you_sure: Are you sure?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/es.yml
CHANGED
@@ -208,9 +208,6 @@ es:
|
|
208
208
|
index:
|
209
209
|
title: Archivos
|
210
210
|
new_link: Subir Nuevo Archivo
|
211
|
-
edit: Editar
|
212
|
-
delete: Borrar
|
213
|
-
are_you_sure: ¿Estás seguro?
|
214
211
|
button: Cargar Archivos
|
215
212
|
new:
|
216
213
|
title: Nuevo Archivo
|
@@ -226,6 +223,8 @@ es:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: ¿Estás seguro?
|
228
225
|
file:
|
226
|
+
edit: Editar
|
227
|
+
delete: Borrar
|
229
228
|
are_you_sure: ¿Estás seguro?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/fr.yml
CHANGED
@@ -208,9 +208,6 @@ fr:
|
|
208
208
|
index:
|
209
209
|
title: Fichiers
|
210
210
|
new_link: Nouveau fichier
|
211
|
-
edit: Modifier
|
212
|
-
delete: Supprimer
|
213
|
-
are_you_sure: Êtes-vous sûr de vouloir supprimer ce fichier ?
|
214
211
|
button: Ajouter des fichiers
|
215
212
|
new:
|
216
213
|
title: Nouveau fichier
|
@@ -226,6 +223,8 @@ fr:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Êtes-vous sûr de vouloir supprimer ce fichier ?
|
228
225
|
file:
|
226
|
+
edit: Modifier
|
227
|
+
delete: Supprimer
|
229
228
|
are_you_sure: Êtes-vous sûr de vouloir supprimer ce fichier ?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/it.yml
CHANGED
@@ -208,9 +208,6 @@ it:
|
|
208
208
|
index:
|
209
209
|
title: Files
|
210
210
|
new_link: Carica nuovo file
|
211
|
-
edit: Modifica
|
212
|
-
delete: Elimina
|
213
|
-
are_you_sure: Sei sicuro di voler eliminare questo file?
|
214
211
|
button: Carica File
|
215
212
|
new:
|
216
213
|
title: Nuovo File
|
@@ -226,6 +223,8 @@ it:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Sei sicuro?
|
228
225
|
file:
|
226
|
+
edit: Modifica
|
227
|
+
delete: Elimina
|
229
228
|
are_you_sure: Sei sicuro?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/ja.yml
CHANGED
@@ -208,9 +208,6 @@ ja:
|
|
208
208
|
index:
|
209
209
|
title: ファイル
|
210
210
|
new_link: 新規ファイルをアップロード
|
211
|
-
edit: 編集
|
212
|
-
delete: 削除
|
213
|
-
are_you_sure: よろしいですか?
|
214
211
|
button: ファイルをアップロード
|
215
212
|
new:
|
216
213
|
title: 新規ファイル
|
@@ -226,6 +223,8 @@ ja:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: よろしいですか?
|
228
225
|
file:
|
226
|
+
edit: 編集
|
227
|
+
delete: 削除
|
229
228
|
are_you_sure: よろしいですか?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/nb.yml
CHANGED
@@ -208,9 +208,6 @@ nb:
|
|
208
208
|
index:
|
209
209
|
title: Filer
|
210
210
|
new_link: Last opp ny fil
|
211
|
-
edit: Endre
|
212
|
-
delete: Fjerne
|
213
|
-
are_you_sure: Er du sikker?
|
214
211
|
button: Last opp filer
|
215
212
|
new:
|
216
213
|
title: Ny fil
|
@@ -226,6 +223,8 @@ nb:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Er du sikker?
|
228
225
|
file:
|
226
|
+
edit: Endre
|
227
|
+
delete: Fjerne
|
229
228
|
are_you_sure: Er du sikker?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/nl.yml
CHANGED
@@ -208,9 +208,6 @@ nl:
|
|
208
208
|
index:
|
209
209
|
title: Bestanden
|
210
210
|
new_link: Upload Nieuw Bestand
|
211
|
-
edit: Bewerk
|
212
|
-
delete: Verwijder
|
213
|
-
are_you_sure: Weet u het zeker?
|
214
211
|
button: Upload Bestanden
|
215
212
|
new:
|
216
213
|
title: Nieuw Bestand
|
@@ -226,6 +223,8 @@ nl:
|
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Weet u het zeker?
|
228
225
|
file:
|
226
|
+
edit: Bewerk
|
227
|
+
delete: Verwijder
|
229
228
|
are_you_sure: Weet u het zeker?
|
230
229
|
|
231
230
|
categories:
|
data/config/locales/pl.yml
CHANGED
@@ -3,7 +3,7 @@ pl:
|
|
3
3
|
activerecord:
|
4
4
|
models:
|
5
5
|
comfy/cms/site: Witryna
|
6
|
-
comfy/cms/layout:
|
6
|
+
comfy/cms/layout: Szablon
|
7
7
|
comfy/cms/page: Strona
|
8
8
|
comfy/cms/snippet: Snippet
|
9
9
|
comfy/cms/file: Plik
|
@@ -15,20 +15,20 @@ pl:
|
|
15
15
|
hostname: Nazwa hosta
|
16
16
|
path: Ścieżka
|
17
17
|
locale: Język
|
18
|
-
is_mirrored:
|
18
|
+
is_mirrored: Lustrzana
|
19
19
|
comfy/cms/layout:
|
20
20
|
identifier: Identyfikator
|
21
|
-
label:
|
22
|
-
app_layout:
|
21
|
+
label: Szablon
|
22
|
+
app_layout: Szablon aplikacji
|
23
23
|
parent_id: Rodzic
|
24
24
|
content: Zawartość
|
25
25
|
css: Style
|
26
26
|
js: Javascript
|
27
27
|
comfy/cms/page:
|
28
28
|
label: Tytuł
|
29
|
-
layout_id:
|
30
|
-
slug:
|
31
|
-
full_path:
|
29
|
+
layout_id: Szablon
|
30
|
+
slug: Przyjazna ścieżka
|
31
|
+
full_path: Pełna ścieżka
|
32
32
|
parent_id: Rodzic
|
33
33
|
target_page_id: Przekieruj do strony
|
34
34
|
content: Zawartość
|
@@ -53,25 +53,25 @@ pl:
|
|
53
53
|
cms:
|
54
54
|
base:
|
55
55
|
site_not_found: Strona nie została znaleziona
|
56
|
-
fixtures_enabled: Fikstury CMS są włączone. Wszystkie zmiany
|
56
|
+
fixtures_enabled: Fikstury CMS są włączone. Wszystkie zmiany zapisane tutaj nie będą uwzględnione.
|
57
57
|
|
58
58
|
sites: Witryny
|
59
59
|
layouts: Szablony
|
60
|
-
pages:
|
61
|
-
snippets:
|
62
|
-
files:
|
60
|
+
pages: Strony
|
61
|
+
snippets: Snippety
|
62
|
+
files: Pliki
|
63
63
|
|
64
64
|
sites:
|
65
65
|
created: Witryna została utworzona
|
66
66
|
creation_failure: Błąd przy tworzeniu witryny
|
67
|
-
updated: Witryna została
|
67
|
+
updated: Witryna została uaktualniona
|
68
68
|
update_failure: Błąd przy uaktualnianiu witryny
|
69
69
|
deleted: Witryna została usunięta
|
70
70
|
not_found: Nie znaleziono witryny
|
71
71
|
|
72
72
|
index:
|
73
73
|
title: Witryny
|
74
|
-
new_link: Utwórz
|
74
|
+
new_link: Utwórz nową witrynę
|
75
75
|
select: Wybierz witrynę
|
76
76
|
edit: Edytuj
|
77
77
|
delete: Usuń
|
@@ -82,17 +82,17 @@ pl:
|
|
82
82
|
title: Edytuj witrynę
|
83
83
|
form:
|
84
84
|
create: Utwórz witrynę
|
85
|
-
cancel:
|
85
|
+
cancel: Anuluj
|
86
86
|
update: Uaktualnij witrynę
|
87
|
-
is_mirrored:
|
87
|
+
is_mirrored: Lustrzana
|
88
88
|
|
89
89
|
layouts:
|
90
90
|
created: Szablon został utworzony
|
91
|
-
creation_failure: Błąd przy tworzeniu
|
92
|
-
updated:
|
93
|
-
update_failure: Błąd przy uaktualnianiu
|
91
|
+
creation_failure: Błąd przy tworzeniu szablonu
|
92
|
+
updated: Szablon został uaktualniony
|
93
|
+
update_failure: Błąd przy uaktualnianiu szablonu
|
94
94
|
deleted: Szablon został usunięty
|
95
|
-
not_found: Nie znaleziono
|
95
|
+
not_found: Nie znaleziono szablonu
|
96
96
|
|
97
97
|
index:
|
98
98
|
title: Szablony
|
@@ -107,16 +107,16 @@ pl:
|
|
107
107
|
edit:
|
108
108
|
title: Edytuj szablon
|
109
109
|
revision: &revision
|
110
|
-
zero: '%{count}
|
111
|
-
one: '%{count}
|
110
|
+
zero: '%{count} Wersji'
|
111
|
+
one: '%{count} Wersja'
|
112
112
|
few: '%{count} Wersje'
|
113
|
-
many: '%{count}
|
113
|
+
many: '%{count} Wersji'
|
114
114
|
other: '%{count} Wersje'
|
115
115
|
form:
|
116
|
-
select_parent_layout: Wybierz szablon
|
116
|
+
select_parent_layout: Wybierz szablon rodzica
|
117
117
|
select_app_layout: Wybierz szablon aplikacji
|
118
118
|
create: Stwórz szablon
|
119
|
-
cancel:
|
119
|
+
cancel: Anuluj
|
120
120
|
update: Uaktualnij szablon
|
121
121
|
|
122
122
|
pages:
|
@@ -126,7 +126,7 @@ pl:
|
|
126
126
|
update_failure: Błąd przy uaktualnianiu strony
|
127
127
|
deleted: Strona została usunięta
|
128
128
|
not_found: Nie znaleziono strony
|
129
|
-
layout_not_found: Brakuje
|
129
|
+
layout_not_found: Brakuje szablonu. Proszę utworzyć
|
130
130
|
|
131
131
|
index:
|
132
132
|
title: Strony
|
@@ -147,14 +147,14 @@ pl:
|
|
147
147
|
select_target_page: Bez przekierowania
|
148
148
|
preview: Podgląd
|
149
149
|
create: Utwórz stronę
|
150
|
-
cancel:
|
150
|
+
cancel: Anuluj
|
151
151
|
update: Uaktualnij stronę
|
152
152
|
is_published: Opublikowana
|
153
153
|
choose_link: Select page...
|
154
154
|
form_blocks:
|
155
155
|
no_tags: |-
|
156
156
|
Szablon nie ma zdefiniowanych tagów<br/>
|
157
|
-
|
157
|
+
Dodaj do jego treści tag strony lub pola, np. <code>{{cms:page:content}}</code>
|
158
158
|
|
159
159
|
snippets:
|
160
160
|
created: Snippet został utworzony
|
@@ -165,7 +165,7 @@ pl:
|
|
165
165
|
not_found: Nie znaleziono snippeta
|
166
166
|
|
167
167
|
index:
|
168
|
-
title:
|
168
|
+
title: Snippety
|
169
169
|
new_link: Utwórz nowy snippet
|
170
170
|
edit: Edytuj
|
171
171
|
delete: Usuń
|
@@ -178,11 +178,11 @@ pl:
|
|
178
178
|
<<: *revision
|
179
179
|
form:
|
180
180
|
create: Utwórz snippet
|
181
|
-
cancel:
|
181
|
+
cancel: Anuluj
|
182
182
|
update: Uaktualnij snippet
|
183
183
|
|
184
184
|
revisions:
|
185
|
-
reverted: Zawartość
|
185
|
+
reverted: Zawartość została przywrócona
|
186
186
|
record_not_found: Wpis nie został znaleziony
|
187
187
|
not_found: Wersja nie została znaleziona
|
188
188
|
|
@@ -192,9 +192,9 @@ pl:
|
|
192
192
|
full_path: Pełna ścieżka
|
193
193
|
slug: Ścieżka
|
194
194
|
update: Uaktualnij do tej wersji
|
195
|
-
content:
|
196
|
-
changes:
|
197
|
-
previous:
|
195
|
+
content: Pole
|
196
|
+
changes: Wersje
|
197
|
+
previous: Historyczna
|
198
198
|
current: Aktualna
|
199
199
|
|
200
200
|
files:
|
@@ -207,25 +207,24 @@ pl:
|
|
207
207
|
|
208
208
|
index:
|
209
209
|
title: Pliki
|
210
|
-
new_link:
|
211
|
-
|
212
|
-
delete: Usuń
|
213
|
-
are_you_sure: Jesteś pewien?
|
214
|
-
button: Wrzuć plik
|
210
|
+
new_link: Wgraj nowy plik
|
211
|
+
button: Wgraj plik
|
215
212
|
new:
|
216
213
|
title: Nowy plik
|
217
214
|
edit:
|
218
215
|
title: Edytuj plik
|
219
216
|
form:
|
220
217
|
current_file: Aktualny plik
|
221
|
-
create:
|
222
|
-
cancel:
|
218
|
+
create: Wgraj plik
|
219
|
+
cancel: Anuluj
|
223
220
|
update: Uaktualnij plik
|
224
221
|
delete: Usuń
|
225
222
|
are_you_sure: Jesteś pewien?
|
226
223
|
page_form:
|
227
224
|
are_you_sure: Jesteś pewien?
|
228
225
|
file:
|
226
|
+
edit: Edytuj
|
227
|
+
delete: Usuń
|
229
228
|
are_you_sure: Jesteś pewien?
|
230
229
|
|
231
230
|
categories:
|
@@ -235,7 +234,7 @@ pl:
|
|
235
234
|
done: Zrobione
|
236
235
|
all: Wszystko
|
237
236
|
add: Dodaj
|
238
|
-
add_placeholder:
|
237
|
+
add_placeholder: Dodaj Kategorię
|
239
238
|
show:
|
240
239
|
are_you_sure: Jesteś pewien?
|
241
240
|
edit:
|