refinerycms-blog 2.0.5 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/.travis.yml +3 -9
- data/Gemfile +10 -11
- data/app/assets/images/refinery/blog/icons/add.png +0 -0
- data/app/assets/stylesheets/refinery/blog/backend.css.scss +25 -25
- data/app/assets/stylesheets/refinery/blog/frontend.css.scss +87 -76
- data/app/controllers/refinery/blog/admin/comments_controller.rb +19 -19
- data/app/controllers/refinery/blog/admin/posts_controller.rb +9 -4
- data/app/controllers/refinery/blog/categories_controller.rb +1 -1
- data/app/controllers/refinery/blog/posts_controller.rb +12 -11
- data/app/helpers/refinery/blog/controller_helper.rb +7 -7
- data/app/helpers/refinery/blog/posts_helper.rb +5 -0
- data/app/models/refinery/blog/categorization.rb +12 -0
- data/app/models/refinery/blog/category.rb +14 -4
- data/app/models/refinery/blog/comment.rb +0 -9
- data/app/models/refinery/blog/post.rb +55 -13
- data/app/views/refinery/blog/admin/_submenu.html.erb +1 -4
- data/app/views/refinery/blog/admin/categories/_category.html.erb +11 -3
- data/app/views/refinery/blog/admin/categories/_form.html.erb +10 -11
- data/app/views/refinery/blog/admin/categories/_sortable_list.html.erb +2 -4
- data/app/views/refinery/blog/admin/categories/edit.html.erb +1 -1
- data/app/views/refinery/blog/admin/categories/index.html.erb +9 -15
- data/app/views/refinery/blog/admin/categories/new.html.erb +1 -1
- data/app/views/refinery/blog/admin/comments/_comment.html.erb +4 -2
- data/app/views/refinery/blog/admin/comments/_sortable_list.html.erb +2 -4
- data/app/views/refinery/blog/admin/comments/index.html.erb +14 -23
- data/app/views/refinery/blog/admin/comments/show.html.erb +6 -4
- data/app/views/refinery/blog/admin/posts/_form.html.erb +18 -26
- data/app/views/refinery/blog/admin/posts/_post.html.erb +14 -1
- data/app/views/refinery/blog/admin/posts/_sortable_list.html.erb +2 -4
- data/app/views/refinery/blog/admin/posts/edit.html.erb +1 -1
- data/app/views/refinery/blog/admin/posts/index.html.erb +9 -15
- data/app/views/refinery/blog/admin/posts/new.html.erb +1 -1
- data/app/views/refinery/blog/admin/posts/uncategorized.html.erb +2 -2
- data/app/views/refinery/blog/admin/settings/notification_recipients.html.erb +5 -7
- data/app/views/refinery/blog/categories/show.html.erb +2 -2
- data/app/views/refinery/blog/comment_mailer/notification.html.erb +5 -0
- data/app/views/refinery/blog/posts/_comment.html.erb +1 -1
- data/app/views/refinery/blog/posts/_comments.html.erb +28 -31
- data/app/views/refinery/blog/posts/_post.html.erb +3 -3
- data/app/views/refinery/blog/posts/archive.html.erb +6 -5
- data/app/views/refinery/blog/posts/index.html.erb +3 -3
- data/app/views/refinery/blog/posts/show.html.erb +4 -6
- data/app/views/refinery/blog/posts/tagged.html.erb +4 -4
- data/app/views/refinery/blog/shared/_body_content_right.html.erb +6 -6
- data/app/views/refinery/blog/shared/_post.html.erb +11 -13
- data/app/views/refinery/blog/shared/_rss_feed.html.erb +2 -0
- data/config/initializers/url_validator.rb +15 -11
- data/config/locales/bg.yml +2 -4
- data/config/locales/cs.yml +6 -8
- data/config/locales/de.yml +27 -8
- data/config/locales/en.yml +9 -6
- data/config/locales/es.yml +2 -4
- data/config/locales/fr.yml +23 -7
- data/config/locales/it.yml +2 -4
- data/config/locales/ja.yml +16 -5
- data/config/locales/nb.yml +0 -2
- data/config/locales/nl.yml +21 -7
- data/config/locales/pl.yml +3 -5
- data/config/locales/pt-BR.yml +38 -7
- data/config/locales/ru.yml +35 -2
- data/config/locales/sk.yml +4 -6
- data/config/locales/sv.yml +2 -4
- data/config/locales/zh-CN.yml +2 -4
- data/config/routes.rb +3 -3
- data/db/migrate/20110803223522_create_blog_structure.rb +15 -14
- data/db/migrate/20110803223523_add_user_id_to_blog_posts.rb +2 -2
- data/db/migrate/20110803223526_add_cached_slugs.rb +2 -2
- data/db/migrate/20110803223527_add_custom_url_field_to_blog_posts.rb +1 -1
- data/db/migrate/20110803223528_add_custom_teaser_field_to_blog_posts.rb +1 -1
- data/db/migrate/20110803223529_add_primary_key_to_categorizations.rb +4 -4
- data/db/migrate/20120530102901_create_blog_translations.rb +17 -0
- data/db/migrate/20120531113632_delete_cached_slugs.rb +6 -0
- data/db/migrate/20120601151114_create_category_translations.rb +14 -0
- data/db/seeds.rb +2 -2
- data/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb +3 -0
- data/lib/refinery/blog.rb +1 -0
- data/lib/refinery/blog/configuration.rb +23 -0
- data/readme.md +3 -3
- data/refinerycms-blog.gemspec +8 -14
- data/spec/controllers/refinery/blog/admin/comments_controller_spec.rb +84 -0
- data/spec/controllers/refinery/blog/posts_controller_spec.rb +0 -2
- data/spec/factories/blog_posts.rb +2 -2
- data/spec/features/refinery/blog/admin/categories_spec.rb +119 -0
- data/spec/{requests → features}/refinery/blog/admin/comments_spec.rb +9 -9
- data/spec/{requests → features}/refinery/blog/admin/menu_spec.rb +2 -2
- data/spec/features/refinery/blog/admin/posts_spec.rb +338 -0
- data/spec/features/refinery/blog/categories_spec.rb +28 -0
- data/spec/{requests → features}/refinery/blog/posts_spec.rb +62 -42
- data/spec/helpers/refinery/blog/controller_helper_spec.rb +27 -0
- data/spec/helpers/refinery/blog/posts_helper_spec.rb +12 -0
- data/spec/models/refinery/blog/category_spec.rb +10 -2
- data/spec/models/refinery/blog/post_spec.rb +21 -17
- data/spec/spec_helper.rb +20 -46
- metadata +41 -38
- data/Guardfile +0 -20
- data/app/assets/images/refinerycms-blog/.gitkeep +0 -0
- data/app/assets/javascripts/refinerycms-blog/.gitkeep +0 -0
- data/app/assets/stylesheets/refinerycms-blog/.gitkeep +0 -0
- data/app/models/refinery/categorization.rb +0 -10
- data/app/views/refinery/blog/admin/comments/approve.html.erb +0 -0
- data/lib/refinery/blog/version.rb +0 -17
- data/spec/requests/refinery/blog/admin/categories_spec.rb +0 -20
- data/spec/requests/refinery/blog/admin/posts_spec.rb +0 -175
- data/spec/requests/refinery/blog/categories_spec.rb +0 -24
data/config/locales/nb.yml
CHANGED
@@ -9,8 +9,6 @@ nb:
|
|
9
9
|
form:
|
10
10
|
seo_override_title: Nettleser tittel
|
11
11
|
seo_override_title_help: Skriv inn en tittel på 5-10 ord som oppsummerer innholdet på siden.
|
12
|
-
meta_keywords_title: Meta stikkord
|
13
|
-
meta_keywords_help: Skriv inn 5-10 stikkord som relaterer til denne siden. Separer stikkordene med komma.
|
14
12
|
meta_description_title: Meta beskrivelse
|
15
13
|
meta_description_help: Skriv en kort beskrivelse på to eller tre setninger som forteller hva denne siden inneholder.
|
16
14
|
index:
|
data/config/locales/nl.yml
CHANGED
@@ -35,10 +35,8 @@ nl:
|
|
35
35
|
approve: Keur deze reactie goed
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: Geavanceerde eigenschappen
|
39
38
|
toggle_advanced_options: Klik voor toegang tot meta tag instellingen en menu opties
|
40
|
-
|
41
|
-
published_at: Publicatiedatum
|
39
|
+
published_at: Publicatiedatum
|
42
40
|
index:
|
43
41
|
no_items_yet: 'Er zijn momenteel geen blogposts. Klik op "%{create}" om uw eerste blogpost toe te voegen.'
|
44
42
|
uncategorized:
|
@@ -56,7 +54,7 @@ nl:
|
|
56
54
|
updated: 'De ontvanger(s) van notificaties is/zijn gewijzigd naar "%{recipients}"'
|
57
55
|
submenu:
|
58
56
|
categories:
|
59
|
-
title:
|
57
|
+
title: Categorieën
|
60
58
|
manage: Beheren
|
61
59
|
new: Voeg een nieuwe categorie toe
|
62
60
|
comments:
|
@@ -90,7 +88,7 @@ nl:
|
|
90
88
|
ps: 'P.S. Alle reacties worden opgeslagen in de "Blog" sectie van Refinery onder het submenu "Comments", voor als u deze reacties later wilt bekijken.'
|
91
89
|
shared:
|
92
90
|
categories:
|
93
|
-
title:
|
91
|
+
title: Categorieën
|
94
92
|
rss_feed:
|
95
93
|
title: RSS Feed
|
96
94
|
subscribe: Aanmelden
|
@@ -109,7 +107,7 @@ nl:
|
|
109
107
|
no_posts: Er zijn momenteel geen posts.
|
110
108
|
posts:
|
111
109
|
post:
|
112
|
-
|
110
|
+
filled_in: Toegevoegd aan
|
113
111
|
comment: Reactie
|
114
112
|
comments:
|
115
113
|
by: 'Gepost door %{who}'
|
@@ -124,7 +122,7 @@ nl:
|
|
124
122
|
title: Reacties
|
125
123
|
add: Plaats een reactie
|
126
124
|
other: Andere blogposts
|
127
|
-
|
125
|
+
filled_in: Toegevoegd aan
|
128
126
|
tagged: Tagged
|
129
127
|
submit: Verstuur reactie
|
130
128
|
tagged:
|
@@ -132,3 +130,19 @@ nl:
|
|
132
130
|
archive:
|
133
131
|
blog_archive_for: 'Blog archief voor %{date}'
|
134
132
|
no_blog_articles_posted: 'Er zijn geen blogposts voor %{date}. Neem regelmatig een kijkje.'
|
133
|
+
activerecord:
|
134
|
+
models:
|
135
|
+
refinery/blog/category: Categorie
|
136
|
+
refinery/blog/comment: Reactie
|
137
|
+
refinery/blog/post: Blogpost
|
138
|
+
attributes:
|
139
|
+
refinery/blog/category:
|
140
|
+
title: Titel
|
141
|
+
refinery/blog/comment:
|
142
|
+
name: Naam
|
143
|
+
email: E-mail
|
144
|
+
message: Bericht
|
145
|
+
refinery/blog/post:
|
146
|
+
title: Titel
|
147
|
+
body: Body
|
148
|
+
teaser: Teaser
|
data/config/locales/pl.yml
CHANGED
@@ -35,9 +35,7 @@ pl:
|
|
35
35
|
approve: Zaakceptuj ten komentarz
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: Opcje zaawansowane
|
39
38
|
toggle_advanced_options: 'Kliknij, aby zarządzać meta-ustawieniami'
|
40
|
-
save_as_draft: Zapisz jako szkic
|
41
39
|
published_at: Data publikacji
|
42
40
|
index:
|
43
41
|
no_items_yet: 'Na blogu nie ma jeszcze żadnych wpisów. Kliknij "%{create}" aby dodać pierwszy post.'
|
@@ -106,7 +104,7 @@ pl:
|
|
106
104
|
no_posts: Nie ma jeszcze żadnych postów.
|
107
105
|
posts:
|
108
106
|
post:
|
109
|
-
|
107
|
+
filled_in: 'kategorie:'
|
110
108
|
comment: komentarz
|
111
109
|
comments:
|
112
110
|
by: 'Autor: %{who}'
|
@@ -116,12 +114,12 @@ pl:
|
|
116
114
|
index:
|
117
115
|
no_blog_articles_yet: W tej chwili nie ma jeszcze żadnych postów. Cierpliwości:)
|
118
116
|
show:
|
119
|
-
blog_home: Blog
|
117
|
+
blog_home: Blog
|
120
118
|
comments:
|
121
119
|
title: Komentarze
|
122
120
|
add: Dodaj komentarz
|
123
121
|
other: Pozostałe wpisy
|
124
|
-
|
122
|
+
filled_in: 'kategorie:'
|
125
123
|
submit: Dodaj komentarz
|
126
124
|
archive:
|
127
125
|
blog_archive_for: 'Archiwum dla %{date}'
|
data/config/locales/pt-BR.yml
CHANGED
@@ -35,10 +35,18 @@ pt-BR:
|
|
35
35
|
approve: Aprovar este comentário
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: Opções avançadas
|
39
38
|
toggle_advanced_options: Clique aqui para acessar as configurações de meta tag e menu
|
40
|
-
save_as_draft: Salvar como rascunho
|
41
39
|
published_at: Data de publicação
|
40
|
+
custom_url: Url personalizada
|
41
|
+
custom_url_help: Cria a url para o post a partir desse texto ao invés do título.
|
42
|
+
source_url: Url da Fonte
|
43
|
+
source_url_help: Guarda a url da fonte do material do post.
|
44
|
+
source_url_title: Título da Url da Fonte
|
45
|
+
source_url_title_help: Título para a url da fonte para o post.
|
46
|
+
author: Autor
|
47
|
+
author_help: Configure qual usuário será mostrado como autor desse post.
|
48
|
+
copy_body: Copiar Corpo do Post para o Teaser
|
49
|
+
copy_body_help: Copia o corpo do post para o teaser. Deixe o teaser em branco para que o Refinery o crie automaticamente.
|
42
50
|
index:
|
43
51
|
no_items_yet: 'Ainda não há Posts no Blog. Clique em "%{create}" para adicionar o primeiro post.'
|
44
52
|
uncategorized:
|
@@ -47,6 +55,7 @@ pt-BR:
|
|
47
55
|
view_live_html: 'Ver este comentário <br/><em>(será aberto em outra janela)</em>'
|
48
56
|
edit: Editar este post
|
49
57
|
delete: Remover esse post para sempre
|
58
|
+
draft: Rascunho
|
50
59
|
settings:
|
51
60
|
notification_recipients:
|
52
61
|
value: Enviar notificações para
|
@@ -76,6 +85,7 @@ pt-BR:
|
|
76
85
|
moderation: Moderação
|
77
86
|
update_notified: Quem receberá a notificação?
|
78
87
|
comments: Comentários
|
88
|
+
teasers: Teasers
|
79
89
|
comment_mailer:
|
80
90
|
notification:
|
81
91
|
greeting: Olá
|
@@ -85,6 +95,10 @@ pt-BR:
|
|
85
95
|
from: De
|
86
96
|
email: Email
|
87
97
|
message: Mensagem
|
98
|
+
approve: Aprovar
|
99
|
+
or: " ou "
|
100
|
+
reject: Rejeitar
|
101
|
+
this_comment: " esse comentário."
|
88
102
|
closing_line: Atenciosamente
|
89
103
|
ps: 'P.S. Lembre-se que você pode ver todos os comentários em "Comentários" dentro da seção "Blog".'
|
90
104
|
shared:
|
@@ -107,6 +121,8 @@ pt-BR:
|
|
107
121
|
show:
|
108
122
|
no_posts: Não há posts aqui ainda.
|
109
123
|
posts:
|
124
|
+
post:
|
125
|
+
filled_in: Arquivado em
|
110
126
|
comment: commentário
|
111
127
|
comments:
|
112
128
|
by: 'Postado por %{who}'
|
@@ -121,18 +137,33 @@ pt-BR:
|
|
121
137
|
title: Comentários
|
122
138
|
add: Fazer um comentário
|
123
139
|
other: Outros posts
|
124
|
-
|
140
|
+
filled_in: Arquivado em
|
141
|
+
tagged: Marcado
|
125
142
|
submit: Enviar comentário
|
143
|
+
name: Nome
|
144
|
+
email: Email
|
145
|
+
message: Mensagem
|
146
|
+
by: Por
|
147
|
+
source: Fonte
|
148
|
+
tagged:
|
149
|
+
no_blog_articles_yet: Ainda não existem artigos postados. Fique sintonizado.
|
150
|
+
posts_tagged: Posts marcados
|
126
151
|
archive:
|
127
152
|
blog_archive_for: 'Arquivo do blog em %{date}'
|
128
153
|
no_blog_articles_posted: 'Não há arquivos do blog em %{date}.'
|
129
|
-
post:
|
130
|
-
filed_in: Arquivado em
|
131
154
|
activerecord:
|
155
|
+
models:
|
156
|
+
refinery/blog/category: Categoria
|
157
|
+
refinery/blog/comment: Comentário
|
158
|
+
refinery/blog/post: Blog post
|
132
159
|
attributes:
|
133
|
-
refinery/blog/
|
160
|
+
refinery/blog/category:
|
134
161
|
title: Título
|
135
|
-
body: Corpo
|
136
162
|
refinery/blog/comment:
|
137
163
|
name: Nome
|
164
|
+
email: Email
|
138
165
|
message: Mensagem
|
166
|
+
refinery/blog/post:
|
167
|
+
title: Título
|
168
|
+
body: Corpo
|
169
|
+
teaser: Teaser
|
data/config/locales/ru.yml
CHANGED
@@ -39,6 +39,14 @@ ru:
|
|
39
39
|
toggle_advanced_options: 'Нажмите, чтобы получить доступ к настройкам мета-тегов и меню'
|
40
40
|
save_as_draft: Сохранить как черновик
|
41
41
|
published_at: Дата публикации
|
42
|
+
custom_url: Переадресовывать на другой сайт или страницу
|
43
|
+
custom_url_help: Переадресовывать на другой сайт или страницу.
|
44
|
+
source_url: Источник
|
45
|
+
source_url_help: Источник сообщения.
|
46
|
+
source_url_title: Название источника сообщения
|
47
|
+
source_url_title_help: Название источника сообщения в посте.
|
48
|
+
author: Author
|
49
|
+
author_help: Установить, какой пользователь написал данное сообщение, покажет как автора.
|
42
50
|
index:
|
43
51
|
no_items_yet: 'Записи в блоге отстутствуют. Нажмите "%{create}", чтобы добавить первую запись.'
|
44
52
|
uncategorized:
|
@@ -97,6 +105,8 @@ ru:
|
|
97
105
|
other: Другие записи
|
98
106
|
created_at: 'Опубликовано %{when}'
|
99
107
|
read_more: Читать дальше
|
108
|
+
tags:
|
109
|
+
title: "Тэги"
|
100
110
|
comments:
|
101
111
|
singular: комментарий
|
102
112
|
none: нет комментариев
|
@@ -106,7 +116,7 @@ ru:
|
|
106
116
|
no_posts: Записей пока нет.
|
107
117
|
posts:
|
108
118
|
post:
|
109
|
-
|
119
|
+
filled_in: Категория
|
110
120
|
comment: комментарий
|
111
121
|
comments:
|
112
122
|
by: 'Опубликовал %{who}'
|
@@ -121,8 +131,31 @@ ru:
|
|
121
131
|
title: Комментарии
|
122
132
|
add: Написать комментарий
|
123
133
|
other: Другие записи
|
124
|
-
|
134
|
+
filled_in: Категория
|
125
135
|
submit: Отправить комментарий
|
136
|
+
tagged: Тэги
|
137
|
+
submit: Отправить коментарий
|
138
|
+
name: Имя
|
139
|
+
email: Почта
|
140
|
+
message: Сообщение
|
141
|
+
by: Автор
|
142
|
+
source: Источник
|
126
143
|
archive:
|
127
144
|
blog_archive_for: 'Архив %{date}'
|
128
145
|
no_blog_articles_posted: 'Ни одной записи за %{date} не опубликовано. Следите за новостями.'
|
146
|
+
activerecord:
|
147
|
+
models:
|
148
|
+
refinery/blog_category: Категория
|
149
|
+
refinery/blog_comment: Коментарии
|
150
|
+
refinery/blog_post: Запись в блоге
|
151
|
+
attributes:
|
152
|
+
refinery/blog_category:
|
153
|
+
title: Название
|
154
|
+
refinery/blog_comment:
|
155
|
+
name: Имя
|
156
|
+
email: Email
|
157
|
+
message: Сообщение
|
158
|
+
refinery/blog_post:
|
159
|
+
title: Название
|
160
|
+
body: Основное сообщение
|
161
|
+
teaser: Краткое описание
|
data/config/locales/sk.yml
CHANGED
@@ -35,9 +35,7 @@ sk:
|
|
35
35
|
approve: Schváliť komentár
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: Pokročilé nastavenia
|
39
38
|
toggle_advanced_options: Klikni pre prístup k nastaveniam meta tagov a menu
|
40
|
-
save_as_draft: Uložiť ako koncept
|
41
39
|
published_at: Dátum publikovania
|
42
40
|
custom_url: Vlastná url
|
43
41
|
custom_url_help: Generovať url pre blog článok z tohto textu namiesto názvu blog článku.
|
@@ -52,7 +50,7 @@ sk:
|
|
52
50
|
index:
|
53
51
|
no_items_yet: 'Nie sú žiadne blog články. Klikni na "%{create}" pre pridanie prvého.'
|
54
52
|
uncategorized:
|
55
|
-
no_items_yet: 'Nie sú žiadne
|
53
|
+
no_items_yet: 'Nie sú žiadne nezaradené články.'
|
56
54
|
post:
|
57
55
|
view_live_html: 'Zobraziť živý náhľad článku<br/><em>(otvorí sa v novom okne)</em>'
|
58
56
|
edit: Upraviť článok
|
@@ -122,11 +120,11 @@ sk:
|
|
122
120
|
no_posts: Momentálne tu nie sú žiadne články.
|
123
121
|
posts:
|
124
122
|
post:
|
125
|
-
|
123
|
+
filled_in: Zaradené do
|
126
124
|
comment: komentár
|
127
125
|
comments:
|
128
126
|
by: 'Odoslal %{who}'
|
129
|
-
time_ago: '%{time}
|
127
|
+
time_ago: 'pred %{time}'
|
130
128
|
thank_you: 'Vďaka za komentár.'
|
131
129
|
thank_you_moderated: 'Ďakujeme za Váš komentár. Vaša správa čaká na schválenie a čoskoro sa objaví.'
|
132
130
|
index:
|
@@ -137,7 +135,7 @@ sk:
|
|
137
135
|
title: Komentáre
|
138
136
|
add: Pridať komentár
|
139
137
|
other: Ďalšie články
|
140
|
-
|
138
|
+
filled_in: Zaradené do
|
141
139
|
submit: Odoslať komentár
|
142
140
|
name: Meno
|
143
141
|
email: E-mail
|
data/config/locales/sv.yml
CHANGED
@@ -35,9 +35,7 @@ sv:
|
|
35
35
|
approve: Godkänn denna kommentar
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: Avancerat
|
39
38
|
toggle_advanced_options: Klicka för att ställa in metataggar och menyinställningar
|
40
|
-
save_as_draft: Spara som utkast
|
41
39
|
published_at: Publiceringsdatum
|
42
40
|
custom_url: Anpassad URL
|
43
41
|
custom_url_help: Skapa URL för bloggposten med denna text istället för ttieln
|
@@ -120,7 +118,7 @@ sv:
|
|
120
118
|
no_posts: Det finns inga poster än.
|
121
119
|
posts:
|
122
120
|
post:
|
123
|
-
|
121
|
+
filled_in: Kategoriserat som
|
124
122
|
comment: kommentar
|
125
123
|
comments:
|
126
124
|
by: 'Postad av %{who}'
|
@@ -135,7 +133,7 @@ sv:
|
|
135
133
|
title: Kommentarer
|
136
134
|
add: Kommentera
|
137
135
|
other: Andra bloggposter
|
138
|
-
|
136
|
+
filled_in: Kategoriserat i
|
139
137
|
tagged: Taggar
|
140
138
|
submit: Skicka kommentar
|
141
139
|
name: Namn
|
data/config/locales/zh-CN.yml
CHANGED
@@ -35,9 +35,7 @@ zh-CN:
|
|
35
35
|
approve: 批准此评论
|
36
36
|
posts:
|
37
37
|
form:
|
38
|
-
advanced_options: 高级选项
|
39
38
|
toggle_advanced_options: 点击进入标签详解设置和菜单选项
|
40
|
-
save_as_draft: 保存为草稿
|
41
39
|
published_at: 发布日期
|
42
40
|
index:
|
43
41
|
no_items_yet: '目前尚未发博。 点击 "%{create}" 添加您的第一篇博文。'
|
@@ -106,7 +104,7 @@ zh-CN:
|
|
106
104
|
no_posts: 此处没有文章。
|
107
105
|
posts:
|
108
106
|
post:
|
109
|
-
|
107
|
+
filled_in: 用户体验
|
110
108
|
comment: 评论
|
111
109
|
comments:
|
112
110
|
by: '发布由 %{who}'
|
@@ -121,7 +119,7 @@ zh-CN:
|
|
121
119
|
title: 评论
|
122
120
|
add: 发表评论
|
123
121
|
other: 其他博文
|
124
|
-
|
122
|
+
filled_in: 用户体验
|
125
123
|
submit: 发送评论
|
126
124
|
archive:
|
127
125
|
blog_archive_for: '博客存档 %{date}'
|
data/config/routes.rb
CHANGED
@@ -11,7 +11,7 @@ Refinery::Core::Engine.routes.draw do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
namespace :blog, :path => '' do
|
14
|
-
namespace :admin, :path =>
|
14
|
+
namespace :admin, :path => Refinery::Core.backend_route do
|
15
15
|
scope :path => Refinery::Blog.page_url do
|
16
16
|
root :to => "posts#index"
|
17
17
|
|
@@ -30,8 +30,8 @@ Refinery::Core::Engine.routes.draw do
|
|
30
30
|
get :rejected
|
31
31
|
end
|
32
32
|
member do
|
33
|
-
|
34
|
-
|
33
|
+
post :approve
|
34
|
+
post :reject
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CreateBlogStructure < ActiveRecord::Migration
|
2
2
|
|
3
3
|
def up
|
4
|
-
create_table
|
4
|
+
create_table :refinery_blog_posts, :id => true do |t|
|
5
5
|
t.string :title
|
6
6
|
t.text :body
|
7
7
|
t.boolean :draft
|
@@ -9,9 +9,9 @@ class CreateBlogStructure < ActiveRecord::Migration
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
11
|
|
12
|
-
add_index
|
12
|
+
add_index :refinery_blog_posts, :id
|
13
13
|
|
14
|
-
create_table
|
14
|
+
create_table :refinery_blog_comments, :id => true do |t|
|
15
15
|
t.integer :blog_post_id
|
16
16
|
t.boolean :spam
|
17
17
|
t.string :name
|
@@ -21,32 +21,33 @@ class CreateBlogStructure < ActiveRecord::Migration
|
|
21
21
|
t.timestamps
|
22
22
|
end
|
23
23
|
|
24
|
-
add_index
|
24
|
+
add_index :refinery_blog_comments, :id
|
25
|
+
add_index :refinery_blog_comments, :blog_post_id
|
25
26
|
|
26
|
-
create_table
|
27
|
+
create_table :refinery_blog_categories, :id => true do |t|
|
27
28
|
t.string :title
|
28
29
|
t.timestamps
|
29
30
|
end
|
30
31
|
|
31
|
-
add_index
|
32
|
+
add_index :refinery_blog_categories, :id
|
32
33
|
|
33
|
-
create_table
|
34
|
+
create_table :refinery_blog_categories_blog_posts, :id => true do |t|
|
34
35
|
t.integer :blog_category_id
|
35
36
|
t.integer :blog_post_id
|
36
37
|
end
|
37
38
|
|
38
|
-
add_index
|
39
|
+
add_index :refinery_blog_categories_blog_posts, [:blog_category_id, :blog_post_id], :name => 'index_blog_categories_blog_posts_on_bc_and_bp'
|
39
40
|
end
|
40
41
|
|
41
42
|
def down
|
42
|
-
Refinery::UserPlugin.destroy_all({:name => "refinerycms_blog"})
|
43
|
+
Refinery::UserPlugin.destroy_all({:name => "refinerycms_blog"}) if defined?(Refinery::UserPlugin)
|
43
44
|
|
44
|
-
Refinery::Page.delete_all({:link_url => "/blog"})
|
45
|
+
Refinery::Page.delete_all({:link_url => "/blog"}) if defined?(Refinery::Page)
|
45
46
|
|
46
|
-
drop_table
|
47
|
-
drop_table
|
48
|
-
drop_table
|
49
|
-
drop_table
|
47
|
+
drop_table :refinery_blog_posts
|
48
|
+
drop_table :refinery_blog_comments
|
49
|
+
drop_table :refinery_blog_categories
|
50
|
+
drop_table :refinery_blog_categories_blog_posts
|
50
51
|
end
|
51
52
|
|
52
53
|
end
|