biovision-post 0.21.190513.0 → 0.26.191013.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/biovision_post_manifest.js +1 -0
- data/app/assets/images/biovision/post/icons/comment.svg +9 -0
- data/app/assets/javascripts/biovision/post/biovision-posts.js +21 -28
- data/app/assets/stylesheets/biovision/post/posts.scss +6 -0
- data/app/controllers/admin/editorial_members_controller.rb +9 -4
- data/app/controllers/admin/featured_posts_controller.rb +9 -4
- data/app/controllers/admin/post_categories_controller.rb +12 -6
- data/app/controllers/admin/post_group_categories_controller.rb +9 -4
- data/app/controllers/admin/post_group_tags_controller.rb +9 -4
- data/app/controllers/admin/post_groups_controller.rb +9 -4
- data/app/controllers/admin/post_illustrations_controller.rb +9 -4
- data/app/controllers/admin/post_images_controller.rb +9 -4
- data/app/controllers/admin/post_links_controller.rb +9 -4
- data/app/controllers/admin/post_tags_controller.rb +9 -4
- data/app/controllers/admin/post_types_controller.rb +13 -4
- data/app/controllers/admin/posts_controller.rb +6 -8
- data/app/controllers/articles_controller.rb +16 -6
- data/app/controllers/authors_controller.rb +9 -4
- data/app/controllers/blog_posts_controller.rb +16 -6
- data/app/controllers/editorial_members_controller.rb +9 -4
- data/app/controllers/featured_posts_controller.rb +6 -1
- data/app/controllers/my/posts_controller.rb +35 -38
- data/app/controllers/news_controller.rb +16 -6
- data/app/controllers/post_attachments_controller.rb +36 -0
- data/app/controllers/post_categories_controller.rb +6 -1
- data/app/controllers/post_groups_controller.rb +9 -4
- data/app/controllers/post_illustrations_controller.rb +6 -1
- data/app/controllers/post_images_controller.rb +9 -8
- data/app/controllers/post_links_controller.rb +5 -2
- data/app/controllers/post_tags_controller.rb +9 -4
- data/app/controllers/posts_controller.rb +39 -17
- data/app/helpers/biovision_posts_helper.rb +28 -27
- data/app/jobs/post_body_parser_job.rb +1 -1
- data/app/models/concerns/post_child_with_priority.rb +2 -1
- data/app/models/editorial_member.rb +10 -1
- data/app/models/post.rb +39 -11
- data/app/models/post_attachment.rb +49 -0
- data/app/models/post_category.rb +6 -0
- data/app/models/post_group_category.rb +1 -1
- data/app/models/post_illustration.rb +2 -1
- data/app/models/post_image.rb +2 -1
- data/app/models/post_type.rb +15 -0
- data/app/services/biovision/components/posts_component.rb +65 -0
- data/app/views/admin/components/links/_posts.html.erb +33 -0
- data/app/views/admin/editorial_members/index.html.erb +2 -1
- data/app/views/admin/editorial_members/show.html.erb +1 -0
- data/app/views/admin/featured_posts/index.html.erb +1 -0
- data/app/views/admin/post_categories/entity/_in_list.html.erb +10 -0
- data/app/views/admin/post_categories/show.html.erb +11 -0
- data/app/views/admin/post_groups/index.html.erb +2 -1
- data/app/views/admin/post_groups/show.html.erb +1 -0
- data/app/views/admin/post_illustrations/index.html.erb +1 -0
- data/app/views/admin/post_illustrations/show.html.erb +1 -0
- data/app/views/admin/post_images/index.html.erb +2 -1
- data/app/views/admin/post_images/show.html.erb +1 -0
- data/app/views/admin/post_tags/index.html.erb +2 -1
- data/app/views/admin/post_tags/posts.html.erb +4 -3
- data/app/views/admin/post_tags/show.html.erb +3 -2
- data/app/views/admin/post_types/authors.html.erb +1 -0
- data/app/views/admin/post_types/index.html.erb +2 -1
- data/app/views/admin/post_types/new_post.html.erb +13 -4
- data/app/views/admin/post_types/post_categories.html.erb +1 -0
- data/app/views/admin/post_types/post_tags.html.erb +4 -3
- data/app/views/admin/post_types/show.html.erb +3 -2
- data/app/views/admin/posts/entity/_in_list.html.erb +3 -3
- data/app/views/admin/posts/images.html.erb +1 -0
- data/app/views/admin/posts/index.html.erb +2 -1
- data/app/views/admin/posts/search.html.erb +10 -1
- data/app/views/admin/posts/show.html.erb +6 -7
- data/app/views/authors/show.html.erb +1 -1
- data/app/views/blog_posts/index.html.erb +4 -2
- data/app/views/editorial_members/edit.html.erb +1 -0
- data/app/views/editorial_members/new.html.erb +3 -2
- data/app/views/my/index/dashboard/_biovision_post.html.erb +5 -4
- data/app/views/my/posts/_form.html.erb +40 -194
- data/app/views/my/posts/_post.html.erb +2 -3
- data/app/views/my/posts/articles.html.erb +1 -1
- data/app/views/my/posts/blog_posts.html.erb +1 -1
- data/app/views/my/posts/index/_navigation.html.erb +3 -3
- data/app/views/my/posts/new.html.erb +9 -1
- data/app/views/my/posts/news_index.html.erb +1 -1
- data/app/views/posts/_breadcrumbs.html.erb +1 -6
- data/app/views/posts/_form.html.erb +9 -2
- data/app/views/posts/_post.html.erb +7 -11
- data/app/views/posts/_preview.html.erb +7 -1
- data/app/views/posts/edit.html.erb +9 -1
- data/app/views/posts/post_type/_category.html.erb +4 -2
- data/app/views/posts/post_type/_post_page.html.erb +7 -1
- data/app/views/posts/post_type/_posts.html.erb +11 -2
- data/app/views/posts/post_type/_tagged.html.erb +4 -4
- data/app/views/posts/rss.xml.erb +1 -1
- data/app/views/posts/show.html.erb +0 -5
- data/app/views/posts/zen.xml.erb +3 -3
- data/config/locales/posts-ru.yml +11 -1
- data/config/routes.rb +3 -0
- data/db/{migrate → amends}/20190202232323_add_spam_to_posts.rb +0 -0
- data/db/{migrate → amends}/20190224212121_add_data_to_posts.rb +0 -0
- data/db/{migrate → amends}/20190224212122_rename_post_image_source.rb +0 -0
- data/db/{migrate → amends}/20190224212123_add_uuid_to_post_images.rb +0 -0
- data/db/{migrate → amends}/20190313141414_convert_json_post_columns.rb +0 -0
- data/db/amends/20190925181818_add_search_index_to_posts.rb +24 -0
- data/db/migrate/20170930000001_create_post_types.rb +4 -13
- data/db/migrate/20170930000010_create_posts.rb +26 -3
- data/db/migrate/20190715141414_add_data_to_post_categories.rb +14 -0
- data/db/migrate/20190801161616_add_posts_component.rb +14 -0
- data/db/migrate/20190822121212_create_post_attachments.rb +20 -0
- data/db/migrate/20190914212121_convert_post_privileges.rb +56 -0
- data/lib/biovision/post/version.rb +1 -1
- metadata +18 -13
- data/app/services/post_manager.rb +0 -71
- data/app/views/admin/index/dashboard/_biovision_post.html.erb +0 -36
- data/app/views/articles/show.html.erb +0 -6
- data/app/views/blog_posts/show.html.erb +0 -6
- data/app/views/news/show.html.erb +0 -6
@@ -1,11 +1,10 @@
|
|
1
1
|
<% content_for :meta_title, t('.title', name: @entity.title) %>
|
2
2
|
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
3
4
|
<%= link_to(t('admin.posts.nav_item.text'), admin_posts_path) %>
|
4
5
|
<span><%= @entity.title %></span>
|
5
6
|
<% end %>
|
6
7
|
|
7
|
-
<% handler = PostManager.new(@entity) %>
|
8
|
-
|
9
8
|
<article>
|
10
9
|
<h1><%= @entity.title %></h1>
|
11
10
|
|
@@ -22,10 +21,10 @@
|
|
22
21
|
<ul class="actions">
|
23
22
|
<li><%= back_icon(admin_posts_path) %></li>
|
24
23
|
<% if @entity.visible? %>
|
25
|
-
<li><%= world_icon(
|
24
|
+
<li><%= world_icon(@entity.url) %></li>
|
26
25
|
<% end %>
|
27
|
-
<% if
|
28
|
-
<li><%= edit_icon(
|
26
|
+
<% if component_handler.editable?(@entity) && !@entity.locked? %>
|
27
|
+
<li><%= edit_icon(component_handler.edit_path(@entity)) %></li>
|
29
28
|
<li class="danger"><%= destroy_icon(@entity) %></li>
|
30
29
|
<% end %>
|
31
30
|
</ul>
|
@@ -51,7 +50,7 @@
|
|
51
50
|
<dt><%= t('.post_categories') %></dt>
|
52
51
|
<dd>
|
53
52
|
<ul>
|
54
|
-
<% chief =
|
53
|
+
<% chief = component_handler.allow?('chief_editor') %>
|
55
54
|
<% @entity.post_categories.each do |post_category| %>
|
56
55
|
<li>
|
57
56
|
<% if chief %>
|
@@ -130,7 +129,7 @@
|
|
130
129
|
<dt><%= t('activerecord.attributes.post.body') %></dt>
|
131
130
|
<dd>
|
132
131
|
<div class="text">
|
133
|
-
<%= raw(@entity.
|
132
|
+
<%= raw(@entity.body) %>
|
134
133
|
</div>
|
135
134
|
</dd>
|
136
135
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<section class="post-author">
|
11
11
|
<h2><%= @entity.name %></h2>
|
12
12
|
|
13
|
-
<% if
|
13
|
+
<% if component_handler.editable?(@entity) %>
|
14
14
|
<ul class="actions">
|
15
15
|
<li><%= gear_icon(admin_editorial_member_path(id: @entity.id)) %></li>
|
16
16
|
</ul>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<link rel="alternate" type="application/rss+xml" href="<%= rss_posts_path %>" />
|
4
4
|
<% end %>
|
5
5
|
<% content_for :breadcrumbs do %>
|
6
|
-
|
6
|
+
<span><%= t('blog_posts.index.nav_text') %></span>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%=
|
@@ -11,7 +11,9 @@
|
|
11
11
|
partial: 'posts/post_type/posts',
|
12
12
|
locals: {
|
13
13
|
heading: t('.heading'),
|
14
|
-
collection: @collection
|
14
|
+
collection: @collection,
|
15
|
+
path_for_new: my_new_blog_post_path,
|
16
|
+
allow_new: component_handler.allow_post_type?('blog_post')
|
15
17
|
}
|
16
18
|
)
|
17
19
|
%>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<% content_for :meta_title, t('.title') %>
|
2
2
|
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
3
4
|
<%= link_to(t('admin.editorial_members.nav_item.text'), admin_editorial_members_path) %>
|
4
5
|
<%= admin_editorial_member_link(@entity) %>
|
5
6
|
<span><%= t('.nav_text') %></span>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<% content_for :meta_title, t('.title') %>
|
2
2
|
<% content_for :breadcrumbs do %>
|
3
|
-
|
4
|
-
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
4
|
+
<%= link_to(t('admin.editorial_members.nav_item.text'), admin_editorial_members_path) %>
|
5
|
+
<span><%= t('.nav_text') %></span>
|
5
6
|
<% end %>
|
6
7
|
|
7
8
|
<article>
|
@@ -1,19 +1,20 @@
|
|
1
|
-
<%
|
1
|
+
<% handler = Biovision::Components::BaseComponent.handler('posts', current_user) %>
|
2
|
+
<% if handler.show_dashboard? %>
|
2
3
|
<section class="dashboard" id="biovision-post-my-dashboard">
|
3
4
|
<h2><%= t('.heading') %></h2>
|
4
5
|
|
5
6
|
<nav>
|
6
|
-
<% if
|
7
|
+
<% if handler.allow_post_type?('article') %>
|
7
8
|
<div>
|
8
9
|
<%= link_to(t('my.posts.new_article.nav_text'), my_new_article_path) %>
|
9
10
|
</div>
|
10
11
|
<% end %>
|
11
|
-
<% if
|
12
|
+
<% if handler.allow_post_type?('news') %>
|
12
13
|
<div>
|
13
14
|
<%= link_to(t('my.posts.new_news.nav_text'), my_new_news_path) %>
|
14
15
|
</div>
|
15
16
|
<% end %>
|
16
|
-
<% if
|
17
|
+
<% if handler.allow_post_type?('blog_post') %>
|
17
18
|
<div>
|
18
19
|
<%= link_to(t('my.posts.new_blog_post.nav_text'), my_new_blog_post_path) %>
|
19
20
|
</div>
|
@@ -11,9 +11,6 @@
|
|
11
11
|
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
12
12
|
|
13
13
|
<dl>
|
14
|
-
<dt><%= f.label :language_id %></dt>
|
15
|
-
<dd><%= f.select :language_id, languages_for_select(false) %></dd>
|
16
|
-
|
17
14
|
<dt><%= f.label :publication_time %></dt>
|
18
15
|
<dd>
|
19
16
|
<%=
|
@@ -30,39 +27,28 @@
|
|
30
27
|
<%=
|
31
28
|
f.text_field(
|
32
29
|
:title,
|
33
|
-
id:
|
34
|
-
size:
|
30
|
+
id: "#{model_name}_title",
|
31
|
+
size: nil,
|
35
32
|
maxlength: Post::TITLE_LIMIT,
|
36
|
-
required:
|
37
|
-
data:
|
33
|
+
required: true,
|
34
|
+
data: { transliterate: "#{model_name}_slug" }
|
38
35
|
)
|
39
36
|
%>
|
40
37
|
<div class="guideline"><%= t('posts.form.guidelines.title') %></div>
|
41
38
|
</dd>
|
42
39
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
f.text_field(
|
47
|
-
:slug,
|
48
|
-
id: "#{model_name}_slug",
|
49
|
-
size: nil,
|
50
|
-
maxlength: Post::SLUG_LIMIT,
|
51
|
-
required: true,
|
52
|
-
pattern: Post::SLUG_PATTERN_HTML,
|
53
|
-
title: t('posts.form.guidelines.slug')
|
54
|
-
)
|
55
|
-
%>
|
56
|
-
<div class="guideline"><%= t('posts.form.guidelines.slug') %></div>
|
57
|
-
</dd>
|
58
|
-
|
59
|
-
<% if entity.post_type.post_categories.any? %>
|
60
|
-
<dt><%= f.label :post_category_id %></dt>
|
40
|
+
<% categories = PostCategory.list_for_tree(entity.post_type_id) %>
|
41
|
+
<% if categories.any? %>
|
42
|
+
<dt><label><%= t('.categories') %></label></dt>
|
61
43
|
<dd>
|
62
44
|
<%=
|
63
|
-
|
64
|
-
:
|
65
|
-
|
45
|
+
render(
|
46
|
+
partial: 'posts/form/category_links',
|
47
|
+
locals: {
|
48
|
+
entity: entity,
|
49
|
+
collection: categories.select { |_, i| i[:parent_id].nil? },
|
50
|
+
categories: categories
|
51
|
+
}
|
66
52
|
)
|
67
53
|
%>
|
68
54
|
</dd>
|
@@ -73,9 +59,9 @@
|
|
73
59
|
<%=
|
74
60
|
f.text_area(
|
75
61
|
:lead,
|
76
|
-
id:
|
77
|
-
cols:
|
78
|
-
rows:
|
62
|
+
id: "#{model_name}_lead",
|
63
|
+
cols: 80,
|
64
|
+
rows: 3,
|
79
65
|
maxlength: Post::LEAD_LIMIT
|
80
66
|
)
|
81
67
|
%>
|
@@ -87,72 +73,15 @@
|
|
87
73
|
<%=
|
88
74
|
f.text_area(
|
89
75
|
:body,
|
90
|
-
id:
|
91
|
-
cols:
|
92
|
-
rows:
|
76
|
+
id: "#{model_name}_body",
|
77
|
+
cols: 20,
|
78
|
+
rows: 25,
|
93
79
|
required: true,
|
94
|
-
data:
|
95
|
-
|
96
|
-
|
97
|
-
</dd>
|
98
|
-
|
99
|
-
<dt><%= label_tag(:tags_string, t('posts.form.tags')) %></dt>
|
100
|
-
<dd>
|
101
|
-
<%=
|
102
|
-
text_field_tag(:tags_string, entity.tags_string)
|
103
|
-
%>
|
104
|
-
</dd>
|
105
|
-
|
106
|
-
<dt><%= f.label :time_required %></dt>
|
107
|
-
<dd>
|
108
|
-
<%=
|
109
|
-
f.number_field(
|
110
|
-
:time_required,
|
111
|
-
id: "#{model_name}_time_required",
|
112
|
-
size: nil,
|
113
|
-
in: Post::TIME_RANGE
|
114
|
-
)
|
115
|
-
%>
|
116
|
-
<div class="guideline"><%= t('posts.form.guidelines.time_required') %></div>
|
117
|
-
</dd>
|
118
|
-
|
119
|
-
<dt><%= f.label :author_name %></dt>
|
120
|
-
<dd>
|
121
|
-
<%=
|
122
|
-
f.text_field(
|
123
|
-
:author_name,
|
124
|
-
id: "#{model_name}_author_name",
|
125
|
-
size: nil,
|
126
|
-
maxlength: Post::META_LIMIT
|
127
|
-
)
|
128
|
-
%>
|
129
|
-
<div class="guideline"><%= t('posts.form.guidelines.author_name') %></div>
|
130
|
-
</dd>
|
131
|
-
|
132
|
-
<dt><%= f.label :author_title %></dt>
|
133
|
-
<dd>
|
134
|
-
<%=
|
135
|
-
f.text_field(
|
136
|
-
:author_title,
|
137
|
-
id: "#{model_name}_author_title",
|
138
|
-
size: nil,
|
139
|
-
maxlength: Post::META_LIMIT
|
140
|
-
)
|
141
|
-
%>
|
142
|
-
<div class="guideline"><%= t('posts.form.guidelines.author_title') %></div>
|
143
|
-
</dd>
|
144
|
-
|
145
|
-
<dt><%= f.label :author_url %></dt>
|
146
|
-
<dd>
|
147
|
-
<%=
|
148
|
-
f.url_field(
|
149
|
-
:author_url,
|
150
|
-
id: "#{model_name}_author_url",
|
151
|
-
size: nil,
|
152
|
-
maxlength: Post::META_LIMIT
|
80
|
+
data: {
|
81
|
+
wysiwyg: 1
|
82
|
+
}
|
153
83
|
)
|
154
84
|
%>
|
155
|
-
<div class="guideline"><%= t('posts.form.guidelines.author_url') %></div>
|
156
85
|
</dd>
|
157
86
|
|
158
87
|
<dt><%= f.label :image %></dt>
|
@@ -160,7 +89,7 @@
|
|
160
89
|
<% figure_id = "#{model_name}-image" %>
|
161
90
|
<figure role="group" class="preview" id="<%= figure_id %>">
|
162
91
|
<% if entity.image.blank? %>
|
163
|
-
<%= f.label :image, image_tag('biovision/base/placeholders/
|
92
|
+
<%= f.label :image, image_tag('biovision/base/placeholders/3x2.svg') %>
|
164
93
|
<% else %>
|
165
94
|
<%= f.label :image, image_tag(entity.image.big.url) %>
|
166
95
|
<% end %>
|
@@ -168,9 +97,9 @@
|
|
168
97
|
<%=
|
169
98
|
f.file_field(
|
170
99
|
:image,
|
171
|
-
id: "#{model_name}_image",
|
172
100
|
accept: 'image/jpeg,image/png',
|
173
|
-
data:
|
101
|
+
data: { image: figure_id },
|
102
|
+
id: "#{model_name}_image"
|
174
103
|
)
|
175
104
|
%>
|
176
105
|
</figcaption>
|
@@ -183,8 +112,8 @@
|
|
183
112
|
<%=
|
184
113
|
f.text_field(
|
185
114
|
:image_alt_text,
|
186
|
-
id:
|
187
|
-
size:
|
115
|
+
id: "#{model_name}_image_alt_text",
|
116
|
+
size: nil,
|
188
117
|
maxlength: Post::META_LIMIT
|
189
118
|
)
|
190
119
|
%>
|
@@ -196,8 +125,8 @@
|
|
196
125
|
<%=
|
197
126
|
f.text_field(
|
198
127
|
:image_name,
|
199
|
-
id:
|
200
|
-
size:
|
128
|
+
id: "#{model_name}_image_name",
|
129
|
+
size: nil,
|
201
130
|
maxlength: Post::IMAGE_NAME_LIMIT
|
202
131
|
)
|
203
132
|
%>
|
@@ -209,8 +138,8 @@
|
|
209
138
|
<%=
|
210
139
|
f.text_field(
|
211
140
|
:image_source_name,
|
212
|
-
id:
|
213
|
-
size:
|
141
|
+
id: "#{model_name}_image_source_name",
|
142
|
+
size: nil,
|
214
143
|
maxlength: Post::META_LIMIT
|
215
144
|
)
|
216
145
|
%>
|
@@ -222,94 +151,29 @@
|
|
222
151
|
<%=
|
223
152
|
f.url_field(
|
224
153
|
:image_source_link,
|
225
|
-
id:
|
226
|
-
size:
|
227
|
-
maxlength:
|
154
|
+
id: "#{model_name}_image_source_link",
|
155
|
+
size: nil,
|
156
|
+
maxlength: Post::META_LIMIT,
|
228
157
|
placeholder: t('posts.form.placeholders.image_source_link')
|
229
158
|
)
|
230
159
|
%>
|
231
160
|
<div class="guideline"><%= t('posts.form.guidelines.image_source_link') %></div>
|
232
161
|
</dd>
|
233
162
|
|
234
|
-
<dt><%= f.label :source_name %></dt>
|
235
|
-
<dd>
|
236
|
-
<%=
|
237
|
-
f.text_field(
|
238
|
-
:source_name,
|
239
|
-
id: "#{model_name}_source_name",
|
240
|
-
size: nil,
|
241
|
-
maxlength: Post::META_LIMIT
|
242
|
-
)
|
243
|
-
%>
|
244
|
-
<div class="guideline"><%= t('posts.form.guidelines.source') %></div>
|
245
|
-
</dd>
|
246
|
-
|
247
|
-
<dt><%= f.label :original_title %></dt>
|
248
|
-
<dd>
|
249
|
-
<%=
|
250
|
-
f.text_field(
|
251
|
-
:original_title,
|
252
|
-
id: "#{model_name}_original_title",
|
253
|
-
size: nil,
|
254
|
-
maxlength: Post::META_LIMIT
|
255
|
-
)
|
256
|
-
%>
|
257
|
-
<div class="guideline"><%= t('posts.form.guidelines.original_title') %></div>
|
258
|
-
</dd>
|
259
|
-
|
260
163
|
<dt><%= f.label :source_link %></dt>
|
261
164
|
<dd>
|
262
165
|
<%=
|
263
166
|
f.url_field(
|
264
167
|
:source_link,
|
265
|
-
id:
|
266
|
-
size:
|
267
|
-
maxlength:
|
168
|
+
id: "#{model_name}_source_link",
|
169
|
+
size: nil,
|
170
|
+
maxlength: Post::META_LIMIT,
|
268
171
|
placeholder: t('posts.form.placeholders.source_link')
|
269
172
|
)
|
270
173
|
%>
|
271
174
|
<div class="guideline"><%= t('posts.form.guidelines.source_link') %></div>
|
272
175
|
</dd>
|
273
176
|
|
274
|
-
<dt><%= f.label :meta_title %></dt>
|
275
|
-
<dd>
|
276
|
-
<%=
|
277
|
-
f.text_field(
|
278
|
-
:meta_title,
|
279
|
-
id: "#{model_name}_meta_title",
|
280
|
-
size: nil,
|
281
|
-
maxlength: Post::META_LIMIT
|
282
|
-
)
|
283
|
-
%>
|
284
|
-
<div class="guideline"><%= t('posts.form.guidelines.meta_title') %></div>
|
285
|
-
</dd>
|
286
|
-
|
287
|
-
<dt><%= f.label :meta_description %></dt>
|
288
|
-
<dd>
|
289
|
-
<%=
|
290
|
-
f.text_field(
|
291
|
-
:meta_description,
|
292
|
-
id: "#{model_name}_meta_description",
|
293
|
-
size: nil,
|
294
|
-
maxlength: Post::META_LIMIT
|
295
|
-
)
|
296
|
-
%>
|
297
|
-
<div class="guideline"><%= t('posts.form.guidelines.meta_description') %></div>
|
298
|
-
</dd>
|
299
|
-
|
300
|
-
<dt><%= f.label :meta_keywords %></dt>
|
301
|
-
<dd>
|
302
|
-
<%=
|
303
|
-
f.text_field(
|
304
|
-
:meta_keywords,
|
305
|
-
id: "#{model_name}_meta_keywords",
|
306
|
-
size: nil,
|
307
|
-
maxlength: Post::META_LIMIT
|
308
|
-
)
|
309
|
-
%>
|
310
|
-
<div class="guideline"><%= t('posts.form.guidelines.meta_keywords') %></div>
|
311
|
-
</dd>
|
312
|
-
|
313
177
|
<dt><%= t(:flags) %></dt>
|
314
178
|
<dd>
|
315
179
|
<ul class="flags">
|
@@ -317,25 +181,6 @@
|
|
317
181
|
<%= f.check_box :visible, id: "#{model_name}_visible" %>
|
318
182
|
<%= f.label :visible %>
|
319
183
|
</li>
|
320
|
-
<li>
|
321
|
-
<%= f.check_box :show_owner, id: "#{model_name}_show_owner" %>
|
322
|
-
<%= f.label :show_owner %>
|
323
|
-
</li>
|
324
|
-
<li>
|
325
|
-
<%= f.check_box :translation, id: "#{model_name}_translation" %>
|
326
|
-
<%= f.label :translation %>
|
327
|
-
<div>
|
328
|
-
<%= f.label :translator_name %><br/>
|
329
|
-
<%=
|
330
|
-
f.text_field(
|
331
|
-
:translator_name,
|
332
|
-
id: "#{model_name}_translator_name",
|
333
|
-
size: nil,
|
334
|
-
maxlength: Post::META_LIMIT
|
335
|
-
)
|
336
|
-
%>
|
337
|
-
</div>
|
338
|
-
</li>
|
339
184
|
<% if Gem.loaded_specs.key?('biovision-comment') %>
|
340
185
|
<li>
|
341
186
|
<%= f.check_box :allow_comments, id: :post_allow_comments %>
|
@@ -349,9 +194,10 @@
|
|
349
194
|
<%= render 'shared/forms/state_container' %>
|
350
195
|
|
351
196
|
<div class="buttons">
|
197
|
+
<%= f.hidden_field :language_id %>
|
352
198
|
<%= f.hidden_field :post_type_id if entity.id.nil? %>
|
353
199
|
<%= f.button t(:save), type: :submit, class: 'button-save' %>
|
354
200
|
</div>
|
355
201
|
<% end %>
|
356
202
|
|
357
|
-
<%= render partial: '
|
203
|
+
<%= render partial: 'shared/forms/wysiwyg' %>
|