publify_core 9.2.10 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -18
- data/app/assets/javascripts/lang/ar_AR.js +17 -0
- data/app/controllers/admin/{content_controller.rb → articles_controller.rb} +24 -24
- data/app/controllers/admin/dashboard_controller.rb +3 -3
- data/app/controllers/admin/feedback_controller.rb +23 -23
- data/app/controllers/admin/pages_controller.rb +2 -2
- data/app/controllers/admin/post_types_controller.rb +10 -4
- data/app/controllers/admin/redirects_controller.rb +10 -6
- data/app/controllers/admin/resources_controller.rb +2 -2
- data/app/controllers/admin/sidebar_controller.rb +2 -2
- data/app/controllers/admin/tags_controller.rb +5 -3
- data/app/controllers/admin/themes_controller.rb +1 -2
- data/app/controllers/admin/users_controller.rb +5 -3
- data/app/controllers/articles_controller.rb +5 -5
- data/app/controllers/authors_controller.rb +2 -2
- data/app/controllers/base_controller.rb +0 -3
- data/app/controllers/feedback_controller.rb +3 -3
- data/app/controllers/tags_controller.rb +3 -3
- data/app/helpers/authors_helper.rb +1 -1
- data/app/helpers/base_helper.rb +6 -6
- data/app/models/ability.rb +1 -1
- data/app/models/archives_sidebar.rb +3 -3
- data/app/models/article.rb +13 -13
- data/app/models/blog.rb +3 -6
- data/app/models/content.rb +1 -3
- data/app/models/content_base.rb +2 -13
- data/app/models/feedback.rb +1 -2
- data/app/models/meta_sidebar.rb +1 -1
- data/app/models/note.rb +2 -2
- data/app/models/redirect.rb +0 -1
- data/app/models/sidebar.rb +1 -1
- data/app/models/static_sidebar.rb +1 -1
- data/app/models/tag.rb +7 -8
- data/app/models/tag_sidebar.rb +3 -3
- data/app/models/text_filter.rb +17 -43
- data/app/models/user.rb +2 -2
- data/app/services/title_builder.rb +4 -4
- data/app/views/admin/{content → articles}/_article_list.html.erb +3 -3
- data/app/views/admin/{content → articles}/_form.html.erb +11 -1
- data/app/views/admin/{content → articles}/index.html.erb +1 -1
- data/app/views/admin/dashboard/_drafts.html.erb +2 -2
- data/app/views/admin/dashboard/_overview.html.erb +1 -1
- data/app/views/admin/dashboard/_welcome.html.erb +4 -4
- data/app/views/admin/dashboard/index.html.erb +0 -7
- data/app/views/admin/feedback/article.html.erb +12 -6
- data/app/views/admin/feedback/edit.html.erb +14 -2
- data/app/views/admin/feedback/index.html.erb +6 -7
- data/app/views/admin/pages/_form.html.erb +13 -14
- data/app/views/admin/seo/show.html.erb +12 -1
- data/app/views/admin/shared/_menu.html.erb +5 -4
- data/app/views/admin/tags/_index_and_form.html.erb +2 -1
- data/app/views/articles/_comment_errors.html.erb +11 -1
- data/app/views/articles/read.html.erb +1 -1
- data/app/views/layouts/administration.html.erb +9 -17
- data/config/i18n-tasks.yml +8 -1
- data/config/initializers/devise.rb +1 -1
- data/config/locales/ar.yml +885 -0
- data/config/locales/da.yml +12 -12
- data/config/locales/de.yml +12 -12
- data/config/locales/en.yml +12 -12
- data/config/locales/es-MX.yml +12 -12
- data/config/locales/fr.yml +12 -12
- data/config/locales/he.yml +12 -12
- data/config/locales/it.yml +12 -12
- data/config/locales/ja.yml +13 -13
- data/config/locales/lt.yml +12 -12
- data/config/locales/{nb-NO.yml → nb.yml} +13 -13
- data/config/locales/nl.yml +13 -13
- data/config/locales/pl.yml +12 -12
- data/config/locales/pt-BR.yml +12 -12
- data/config/locales/ro.yml +12 -12
- data/config/locales/ru.yml +13 -13
- data/config/locales/sidebars.ar.yml +20 -0
- data/config/locales/{sidebars.nb-NO.yml → sidebars.nb.yml} +1 -1
- data/config/locales/zh-CN.yml +12 -12
- data/config/locales/zh-TW.yml +12 -12
- data/config/routes.rb +2 -2
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -0
- data/db/migrate/20150808052637_add_blog_ids.rb +3 -1
- data/db/migrate/20160605103918_replace_profile_id_with_string.rb +1 -0
- data/db/migrate/20160701062604_add_blog_id_to_resources.rb +2 -0
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +17 -17
- data/db/migrate/20221007091049_remove_table_sitealizer.rb +19 -0
- data/db/migrate/20221010092846_remove_page_caches_table.rb +15 -0
- data/db/migrate/20221012163214_remove_itunes_fields_from_resources.rb +14 -0
- data/db/seeds.rb +0 -4
- data/lib/publify_core/content_text_helpers.rb +11 -0
- data/lib/publify_core/lang.rb +1 -1
- data/lib/publify_core/testing_support/factories/articles.rb +55 -0
- data/lib/publify_core/testing_support/factories/blogs.rb +24 -0
- data/lib/publify_core/testing_support/factories/comments.rb +40 -0
- data/lib/publify_core/testing_support/factories/contents.rb +7 -0
- data/lib/publify_core/testing_support/factories/notes.rb +17 -0
- data/lib/publify_core/testing_support/factories/pages.rb +13 -0
- data/lib/publify_core/testing_support/factories/post_types.rb +8 -0
- data/lib/publify_core/testing_support/factories/redirects.rb +9 -0
- data/lib/publify_core/testing_support/factories/resources.rb +16 -0
- data/lib/publify_core/testing_support/factories/sequences.rb +12 -0
- data/lib/publify_core/testing_support/factories/sidebars.rb +10 -0
- data/lib/publify_core/testing_support/factories/tags.rb +9 -0
- data/lib/publify_core/testing_support/factories/trackbacks.rb +13 -0
- data/lib/publify_core/testing_support/factories/users.rb +43 -0
- data/lib/publify_core/version.rb +1 -1
- data/lib/publify_core.rb +3 -3
- data/lib/publify_textfilter_markdown.rb +8 -9
- data/lib/publify_textfilter_markdown_smartquotes.rb +20 -0
- data/lib/publify_textfilter_twitterfilter.rb +36 -18
- data/lib/sidebar_field.rb +2 -2
- data/lib/sidebar_registry.rb +0 -12
- data/lib/text_filter_plugin.rb +23 -30
- metadata +213 -105
- data/lib/publify_core/testing_support/factories.rb +0 -240
- data/lib/publify_textfilter_textile.rb +0 -24
- data/lib/tasks/i18n.rake +0 -9
- /data/app/views/admin/{content → articles}/autosave.js.erb +0 -0
- /data/app/views/admin/{content → articles}/edit.html.erb +0 -0
- /data/app/views/admin/{content → articles}/index.js.erb +0 -0
- /data/app/views/admin/{content → articles}/new.html.erb +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
<% content_for :page_heading do %>
|
2
|
-
<h2>
|
2
|
+
<h2 class="page-title">
|
3
3
|
<%= t('.feedback') %>
|
4
4
|
</h2>
|
5
5
|
<% end %>
|
@@ -19,7 +19,10 @@
|
|
19
19
|
|
20
20
|
<%= hidden_field_tag 'page', params[:page] %>
|
21
21
|
|
22
|
-
|
22
|
+
<% if @feedback.any? %>
|
23
|
+
<%= render 'button', position: 'top' %>
|
24
|
+
<% end %>
|
25
|
+
|
23
26
|
<table class='table hover'>
|
24
27
|
<thead>
|
25
28
|
<tr class='noborder'>
|
@@ -33,6 +36,7 @@
|
|
33
36
|
<th><%= t(".actions") %></th>
|
34
37
|
</tr>
|
35
38
|
</thead>
|
39
|
+
|
36
40
|
<% if @feedback.empty? %>
|
37
41
|
<tr>
|
38
42
|
<td colspan="5">
|
@@ -45,12 +49,7 @@
|
|
45
49
|
<%= render 'feedback', comment: comment %>
|
46
50
|
<% end %>
|
47
51
|
<%= display_pagination(@feedback, 7) %>
|
48
|
-
<tr>
|
49
|
-
<th><input type="checkbox" name="checkall" id="checkall" onclick="check_all(this);" /></th>
|
50
|
-
<th colspan='6'><%= t('.select_all') %></th>
|
51
|
-
</tr>
|
52
52
|
</table>
|
53
|
-
<%= render 'button', position: 'bottom' %>
|
54
53
|
<% end %>
|
55
54
|
|
56
55
|
<br class='clear' />
|
@@ -1,15 +1,3 @@
|
|
1
|
-
<% if @page.errors.any? %>
|
2
|
-
<div id="error_explanation">
|
3
|
-
<h2><%= pluralize(@page.errors.count, 'error') %> prohibited this post from being saved:</h2>
|
4
|
-
|
5
|
-
<ul>
|
6
|
-
<% @page.errors.full_messages.each do |message| %>
|
7
|
-
<li><%= message %></li>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
|
13
1
|
<%= hidden_field_tag 'user_textfilter', current_user.text_filter_name %>
|
14
2
|
|
15
3
|
<div class="row save-bar">
|
@@ -25,8 +13,19 @@
|
|
25
13
|
</div>
|
26
14
|
|
27
15
|
<div class="row">
|
28
|
-
<div class="col-md-8 col-md-offset-2"
|
29
|
-
<%=
|
16
|
+
<div class="col-md-8 col-md-offset-2" id="error-message-page">
|
17
|
+
<%= render 'shared/flash', flash: flash %>
|
18
|
+
<% if @page.errors.any? %>
|
19
|
+
<div id="error_explanation">
|
20
|
+
<h2><%= t("errors.template.header", model: 'page', count: @page.errors.count) %></h2>
|
21
|
+
<p><%= t("errors.template.body") %></p>
|
22
|
+
<ul>
|
23
|
+
<% @page.errors.full_messages.each do |message| %>
|
24
|
+
<li><%= message %></li>
|
25
|
+
<% end %>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
30
29
|
</div>
|
31
30
|
</div>
|
32
31
|
|
@@ -8,7 +8,18 @@
|
|
8
8
|
</h2>
|
9
9
|
<% end %>
|
10
10
|
|
11
|
-
<%=
|
11
|
+
<%= render 'shared/flash', flash: flash %>
|
12
|
+
<% if @setting.errors.any? %>
|
13
|
+
<div id="error_explanation">
|
14
|
+
<h2><%= t("errors.template.header", model: 'blog', count: @setting.errors.count) %></h2>
|
15
|
+
<p><%= t("errors.template.body") %></p>
|
16
|
+
<ul>
|
17
|
+
<% @setting.errors.full_messages.each do |message| %>
|
18
|
+
<li><%= message %></li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
12
23
|
|
13
24
|
<%= form_tag admin_seo_path, method: :put do %>
|
14
25
|
<%= case @section
|
@@ -10,15 +10,15 @@
|
|
10
10
|
</div>
|
11
11
|
<div class="collapse navbar-collapse" id="sidebar-top">
|
12
12
|
<ul class='nav navbar-nav'>
|
13
|
-
<% if can? :index, 'admin/
|
13
|
+
<% if can? :index, 'admin/articles' %>
|
14
14
|
<li class='dropdown'>
|
15
15
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
16
16
|
<%= t('.articles') %>
|
17
17
|
<b class="caret"></b>
|
18
18
|
</a>
|
19
19
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
20
|
-
<%= menu_item(t('.all_articles'),
|
21
|
-
<%= menu_item(t('.new_article'),
|
20
|
+
<%= menu_item(t('.all_articles'), admin_articles_path) %>
|
21
|
+
<%= menu_item(t('.new_article'), new_admin_article_path) %>
|
22
22
|
<%= menu_item(t('.feedback'), admin_feedback_index_path) %>
|
23
23
|
<%= menu_item(t('.tags'), admin_tags_path) %>
|
24
24
|
<%= menu_item(t('.article_types'), admin_post_types_path) %>
|
@@ -84,6 +84,7 @@
|
|
84
84
|
</ul>
|
85
85
|
</li>
|
86
86
|
<% end %>
|
87
|
+
<%= menu_item(t('.view_blog'), this_blog.base_url) %>
|
87
88
|
</ul>
|
88
89
|
<ul class='nav navbar-nav pull-right'>
|
89
90
|
<li class='dropdown'>
|
@@ -110,7 +111,7 @@
|
|
110
111
|
<b class="caret"></b>
|
111
112
|
</a>
|
112
113
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
113
|
-
<li><%= link_to(t('.new_article'), controller: '
|
114
|
+
<li><%= link_to(t('.new_article'), controller: 'articles', action: 'new') %></li>
|
114
115
|
<li><%= link_to(t('.new_page'), controller: 'pages', actions: 'new') %></li>
|
115
116
|
<li><%= link_to(t('.new_media'), controller: 'resources', action: 'index') %></li>
|
116
117
|
<li><%= link_to(t('.new_note'), controller: 'notes') %></li>
|
@@ -47,7 +47,8 @@
|
|
47
47
|
<%= link_to tag.display_name, edit_admin_tag_path(tag), class: 'edit' %>
|
48
48
|
<%= button_to_edit tag %>
|
49
49
|
<%= button_to_delete tag %>
|
50
|
-
<%= link_to_permalink(tag, "#{tag.contents.size} #{t(".view")}".html_safe,
|
50
|
+
<%= link_to_permalink(tag, "#{tag.contents.size} #{t(".view")}".html_safe,
|
51
|
+
style: 'btn btn-success btn-xs') %>
|
51
52
|
</td>
|
52
53
|
<td><%= tag.name %></td>
|
53
54
|
</tr>
|
@@ -1,2 +1,12 @@
|
|
1
1
|
<p><%= t('.message') %></p>
|
2
|
-
|
2
|
+
<% if @comment.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= t("errors.template.header", model: 'comment', count: @comment.errors.count) %></h2>
|
5
|
+
<p><%= t("errors.template.body") %></p>
|
6
|
+
<ul>
|
7
|
+
<% @comment.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="post"<%= onhover_show_admin_tools(:article) %>>
|
2
|
-
<%= link_to(t('.edit'), { controller: 'admin/
|
2
|
+
<%= link_to(t('.edit'), { controller: 'admin/articles', action: 'edit', id: @article.id }, { class: 'admintools', style: 'display: none', id: 'admin_article' }) %>
|
3
3
|
<% cache @article do %>
|
4
4
|
<h2><%= link_to_permalink @article, @article.title %></h2>
|
5
5
|
<%= render 'articles/article_author', article: @article %>
|
@@ -12,25 +12,17 @@
|
|
12
12
|
<body>
|
13
13
|
<%= render 'admin/shared/menu' %>
|
14
14
|
<div class='container-fluid'>
|
15
|
-
<div
|
16
|
-
|
17
|
-
<div style='margin-top:20px'>
|
18
|
-
<%= render 'shared/flash', flash: flash %>
|
19
|
-
</div>
|
20
|
-
<% if content_for?(:page_heading) %>
|
21
|
-
<div class='page-header'>
|
22
|
-
<%= yield :page_heading %>
|
23
|
-
</div>
|
24
|
-
<% end %>
|
25
|
-
<%= yield %>
|
26
|
-
</div>
|
15
|
+
<div style='margin-top:20px'>
|
16
|
+
<%= render 'shared/flash', flash: flash %>
|
27
17
|
</div>
|
28
|
-
|
29
|
-
<div class='
|
30
|
-
|
31
|
-
<%= link_to(this_blog.blog_name, this_blog.base_url) %> <%= t('.powered_by') %> Publify <%= h PublifyCore::VERSION %>
|
32
|
-
</div>
|
18
|
+
<% if content_for?(:page_heading) %>
|
19
|
+
<div class='page-header'>
|
20
|
+
<%= yield :page_heading %>
|
33
21
|
</div>
|
22
|
+
<% end %>
|
23
|
+
<%= yield %>
|
24
|
+
<footer>
|
25
|
+
<%= link_to(this_blog.blog_name, this_blog.base_url) %> <%= t('.powered_by') %> Publify <%= h PublifyCore::VERSION %>
|
34
26
|
</footer>
|
35
27
|
</div>
|
36
28
|
</body>
|
data/config/i18n-tasks.yml
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
# The "main" locale.
|
4
4
|
base_locale: en
|
5
5
|
|
6
|
+
<% rails_i18n_path = %x[bundle info --path rails-i18n].chomp %>
|
7
|
+
|
6
8
|
# Read and write translations.
|
7
9
|
data:
|
8
10
|
# Locale files or `File.find` patterns where translations are read from:
|
@@ -10,6 +12,11 @@ data:
|
|
10
12
|
- config/locales/%{locale}.yml
|
11
13
|
- config/locales/**/*.%{locale}.yml
|
12
14
|
|
15
|
+
# External locale data (e.g. gems).
|
16
|
+
# This data is not considered unused and is never written to.
|
17
|
+
external:
|
18
|
+
- "<%= rails_i18n_path %>/rails/locale/%{locale}.yml"
|
19
|
+
|
13
20
|
# Locale files to write new keys to, based on a list of key pattern => file
|
14
21
|
# rules. Matched from top to bottom:
|
15
22
|
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
@@ -41,4 +48,4 @@ ignore_unused:
|
|
41
48
|
- 'time.formats.*'
|
42
49
|
- 'layouts.default.designed_by'
|
43
50
|
- 'date.*'
|
44
|
-
- 'activerecord.
|
51
|
+
- 'activerecord.errors.models.*'
|
@@ -47,7 +47,7 @@ Devise.setup do |config|
|
|
47
47
|
# Configure which authentication keys should be case-insensitive.
|
48
48
|
# These keys will be downcased upon creating or modifying a user and when used
|
49
49
|
# to authenticate or find a user. Default is :email.
|
50
|
-
config.case_insensitive_keys = [:login]
|
50
|
+
config.case_insensitive_keys = [:login, :email]
|
51
51
|
|
52
52
|
# Configure which authentication keys should have whitespace stripped.
|
53
53
|
# These keys will have whitespace before and after removed upon creating or
|