lato_blog 2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +27 -0
- data/Rakefile +5 -0
- data/app/assets/config/lato_blog_manifest.js +2 -0
- data/app/assets/javascripts/lato_blog/application.js +19 -0
- data/app/assets/javascripts/lato_blog/initializers/Fields.js +56 -0
- data/app/assets/javascripts/lato_blog/initializers/Posts.js +54 -0
- data/app/assets/stylesheets/lato_blog/_helpers.scss +37 -0
- data/app/assets/stylesheets/lato_blog/application.scss +20 -0
- data/app/assets/stylesheets/lato_blog/fields/_composed.scss +7 -0
- data/app/assets/stylesheets/lato_blog/fields/_datetime.scss +0 -0
- data/app/assets/stylesheets/lato_blog/fields/_editor.scss +3 -0
- data/app/assets/stylesheets/lato_blog/fields/_fields.scss +8 -0
- data/app/assets/stylesheets/lato_blog/fields/_general.scss +9 -0
- data/app/assets/stylesheets/lato_blog/fields/_geolocalization.scss +3 -0
- data/app/assets/stylesheets/lato_blog/fields/_image.scss +3 -0
- data/app/assets/stylesheets/lato_blog/fields/_relay.scss +121 -0
- data/app/assets/stylesheets/lato_blog/fields/_text.scss +3 -0
- data/app/assets/stylesheets/lato_blog/pages/_categories.scss +18 -0
- data/app/assets/stylesheets/lato_blog/pages/_pages.scss +2 -0
- data/app/assets/stylesheets/lato_blog/pages/_posts.scss +25 -0
- data/app/assets/stylesheets/lato_blog/theme.scss.erb +12 -0
- data/app/assets/stylesheets/lato_blog/widgets/_switchlang.scss +3 -0
- data/app/assets/stylesheets/lato_blog/widgets/_widgets.scss +1 -0
- data/app/controllers/lato_blog/api/api_controller.rb +5 -0
- data/app/controllers/lato_blog/api/categories_controller.rb +51 -0
- data/app/controllers/lato_blog/api/posts_controller.rb +93 -0
- data/app/controllers/lato_blog/application_controller.rb +13 -0
- data/app/controllers/lato_blog/back/back_controller.rb +45 -0
- data/app/controllers/lato_blog/back/categories_controller.rb +141 -0
- data/app/controllers/lato_blog/back/post_fields_controller.rb +86 -0
- data/app/controllers/lato_blog/back/posts_controller.rb +340 -0
- data/app/controllers/lato_blog/doc/doc_controller.rb +16 -0
- data/app/controllers/lato_blog/doc/fields_controller.rb +19 -0
- data/app/controllers/lato_blog/doc/general_controller.rb +11 -0
- data/app/helpers/lato_blog/application_helper.rb +13 -0
- data/app/helpers/lato_blog/fields_helper.rb +100 -0
- data/app/jobs/lato_blog/application_job.rb +4 -0
- data/app/mailers/lato_blog/application_mailer.rb +6 -0
- data/app/models/lato_blog/application_record.rb +5 -0
- data/app/models/lato_blog/category.rb +119 -0
- data/app/models/lato_blog/category/entity_helpers.rb +55 -0
- data/app/models/lato_blog/category/serializer_helpers.rb +66 -0
- data/app/models/lato_blog/category_parent.rb +9 -0
- data/app/models/lato_blog/category_post.rb +35 -0
- data/app/models/lato_blog/post.rb +112 -0
- data/app/models/lato_blog/post/entity_helpers.rb +42 -0
- data/app/models/lato_blog/post/serializer_helpers.rb +85 -0
- data/app/models/lato_blog/post_field.rb +50 -0
- data/app/models/lato_blog/post_field/entity_helpers.rb +5 -0
- data/app/models/lato_blog/post_field/serializer_helpers.rb +127 -0
- data/app/models/lato_blog/post_parent.rb +20 -0
- data/app/views/lato_blog/back/back/switch_current_language.js +2 -0
- data/app/views/lato_blog/back/categories/edit.html.erb +44 -0
- data/app/views/lato_blog/back/categories/index.html.erb +18 -0
- data/app/views/lato_blog/back/categories/new.html.erb +40 -0
- data/app/views/lato_blog/back/categories/shared/_form.html.erb +38 -0
- data/app/views/lato_blog/back/categories/shared/edit/_edit_child_tree.html.erb +23 -0
- data/app/views/lato_blog/back/categories/shared/edit/_edit_child_tree_level.html.erb +7 -0
- data/app/views/lato_blog/back/categories/shared/edit/_edit_informations.html.erb +24 -0
- data/app/views/lato_blog/back/categories/shared/edit/_edit_languages.html.erb +38 -0
- data/app/views/lato_blog/back/categories/shared/new/_new_informations.html.erb +21 -0
- data/app/views/lato_blog/back/post_fields/create_relay_field.js.erb +14 -0
- data/app/views/lato_blog/back/post_fields/destroy_relay_field.js.erb +14 -0
- data/app/views/lato_blog/back/post_fields/fields/_composed.html.erb +24 -0
- data/app/views/lato_blog/back/post_fields/fields/_datetime.html.erb +17 -0
- data/app/views/lato_blog/back/post_fields/fields/_editor.html.erb +17 -0
- data/app/views/lato_blog/back/post_fields/fields/_geolocalization.html.erb +22 -0
- data/app/views/lato_blog/back/post_fields/fields/_image.html.erb +18 -0
- data/app/views/lato_blog/back/post_fields/fields/_relay.html.erb +39 -0
- data/app/views/lato_blog/back/post_fields/fields/_text.html.erb +17 -0
- data/app/views/lato_blog/back/post_fields/index.html.erb +28 -0
- data/app/views/lato_blog/back/posts/edit.html.erb +48 -0
- data/app/views/lato_blog/back/posts/index.html.erb +38 -0
- data/app/views/lato_blog/back/posts/new.html.erb +40 -0
- data/app/views/lato_blog/back/posts/shared/_fields.html.erb +13 -0
- data/app/views/lato_blog/back/posts/shared/_form.html.erb +69 -0
- data/app/views/lato_blog/back/posts/shared/edit/_edit_categories.html.erb +36 -0
- data/app/views/lato_blog/back/posts/shared/edit/_edit_informations.html.erb +26 -0
- data/app/views/lato_blog/back/posts/shared/edit/_edit_languages.html.erb +40 -0
- data/app/views/lato_blog/back/posts/shared/edit/_edit_pubblication_datetime.html.erb +24 -0
- data/app/views/lato_blog/back/posts/shared/edit/_edit_status_switch.html.erb +27 -0
- data/app/views/lato_blog/back/posts/shared/index/_index.html.erb +28 -0
- data/app/views/lato_blog/back/posts/shared/index/_index_informations.html.erb +37 -0
- data/app/views/lato_blog/back/posts/shared/index/_index_status_switch.html.erb +29 -0
- data/app/views/lato_blog/back/posts/shared/new/_new_informations.html.erb +21 -0
- data/app/views/lato_blog/doc/doc/index.html.erb +83 -0
- data/app/views/lato_blog/doc/fields/composed.html.erb +87 -0
- data/app/views/lato_blog/doc/fields/datetime.html.erb +0 -0
- data/app/views/lato_blog/doc/fields/editor.html.erb +1 -0
- data/app/views/lato_blog/doc/fields/geolocalization.html.erb +1 -0
- data/app/views/lato_blog/doc/fields/image.html.erb +70 -0
- data/app/views/lato_blog/doc/fields/relay.html.erb +87 -0
- data/app/views/lato_blog/doc/fields/text.html.erb +70 -0
- data/app/views/lato_blog/doc/general/api.html.erb +0 -0
- data/app/views/lato_blog/doc/general/installation.html.erb +49 -0
- data/app/views/lato_blog/doc/general/personalization.html.erb +0 -0
- data/app/views/lato_blog/partials/_relay_destroy_button.html.erb +5 -0
- data/app/views/lato_blog/widgets/_switchlang.html.erb +20 -0
- data/config/configs.yml +109 -0
- data/config/initializers/assets.rb +4 -0
- data/config/initializers/init_system.rb +22 -0
- data/config/languages/default.yml +87 -0
- data/config/languages/it.yml +87 -0
- data/config/routes.rb +16 -0
- data/config/routes/api.rb +11 -0
- data/config/routes/back.rb +17 -0
- data/config/routes/doc.rb +19 -0
- data/db/migrate/20170504222008_create_lato_blog_posts.rb +19 -0
- data/db/migrate/20170504223521_create_lato_blog_post_parents.rb +9 -0
- data/db/migrate/20170516063317_create_lato_blog_categories.rb +16 -0
- data/db/migrate/20170516063320_create_lato_blog_category_parents.rb +9 -0
- data/db/migrate/20170516063330_create_lato_blog_category_posts.rb +10 -0
- data/db/migrate/20170516063330_create_lato_blog_post_fields.rb +18 -0
- data/lib/lato_blog.rb +6 -0
- data/lib/lato_blog/engine.rb +15 -0
- data/lib/lato_blog/interface.rb +17 -0
- data/lib/lato_blog/interfaces/categories.rb +34 -0
- data/lib/lato_blog/interfaces/fields.rb +195 -0
- data/lib/lato_blog/interfaces/languages.rb +15 -0
- data/lib/lato_blog/interfaces/posts.rb +13 -0
- data/lib/lato_blog/version.rb +3 -0
- data/lib/tasks/lato_blog_tasks.rake +4 -0
- metadata +223 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
<%
|
2
|
+
row = cell(:elements, :row).new
|
3
|
+
form = cell(:inputs, :form).new(url: url, method: method)
|
4
|
+
%>
|
5
|
+
|
6
|
+
<%=raw form.open %>
|
7
|
+
|
8
|
+
<input type="hidden" name="parent" value="<%= @post_parent ? @post_parent.id : nil %>">
|
9
|
+
|
10
|
+
<% if method === :put %>
|
11
|
+
<input type="hidden" name="autosave" value="false" class="posts__form-autosave">
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%=raw row.open %>
|
15
|
+
|
16
|
+
<% if method === :put %>
|
17
|
+
|
18
|
+
<%=raw cell(:inputs, :text).new(name: 'post[meta_permalink]', label: LANGUAGES[:lato_blog][:forms][:permalink],
|
19
|
+
required: true, class: 'md-12', value: @post.meta_permalink) %>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%=raw cell(:inputs, :text).new(name: 'post[title]', label: LANGUAGES[:lato_blog][:forms][:title],
|
24
|
+
required: true, class: 'md-12', value: @post.title) %>
|
25
|
+
|
26
|
+
<% unless CONFIGS[:lato_blog][:post_hidden_fields].include? 'subtitle' %>
|
27
|
+
|
28
|
+
<%=raw cell(:inputs, :text).new(name: 'post[subtitle]', label: LANGUAGES[:lato_blog][:forms][:subtitle],
|
29
|
+
class: 'md-12', value: @post.subtitle) %>
|
30
|
+
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<%=raw row.close %>
|
34
|
+
|
35
|
+
<% if method === :put %>
|
36
|
+
|
37
|
+
<%=raw row.open %>
|
38
|
+
|
39
|
+
<% unless CONFIGS[:lato_blog][:post_hidden_fields].include? 'content' %>
|
40
|
+
|
41
|
+
<%=raw cell(:inputs, :editor).new(name: 'post[content]', label: LANGUAGES[:lato_blog][:forms][:content],
|
42
|
+
class: 'md-12', value: @post.content) %>
|
43
|
+
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<% unless CONFIGS[:lato_blog][:post_hidden_fields].include? 'excerpt' %>
|
47
|
+
|
48
|
+
<%=raw cell(:inputs, :textarea).new(name: 'post[excerpt]', label: LANGUAGES[:lato_blog][:forms][:excerpt],
|
49
|
+
class: 'md-12', value: @post.excerpt) %>
|
50
|
+
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<%=raw row.close %>
|
54
|
+
|
55
|
+
<%= render_post_fields(@post) %>
|
56
|
+
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<div class="text-right">
|
60
|
+
|
61
|
+
<%=raw cell(:elements, :button).new(type: 'link', label: LANGUAGES[:lato_blog][:mixed][:cancel],
|
62
|
+
style: 'danger', icon: 'ban', url: lato_blog.posts_path) %>
|
63
|
+
|
64
|
+
<%=raw cell(:elements, :button).new(type: 'submit', label: LANGUAGES[:lato_blog][:mixed][:save],
|
65
|
+
style: 'success', icon: 'check') %>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<%=raw form.close %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12 posts__edit-categories')
|
3
|
+
form = cell(:inputs, :form).new(url: lato_blog.posts_update_categories_path, method: :post, remote: true)
|
4
|
+
table = cell(:elements, :table, :container).new
|
5
|
+
table_body = cell(:elements, :table, :body).new
|
6
|
+
%>
|
7
|
+
|
8
|
+
<%=raw block.open %>
|
9
|
+
|
10
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:change_categories], size: 6) %>
|
11
|
+
|
12
|
+
<%=raw form.open %>
|
13
|
+
|
14
|
+
<input type="hidden" name="id" value="<%= @post.id %>">
|
15
|
+
|
16
|
+
<%=raw table.open %>
|
17
|
+
|
18
|
+
<%=raw table_body.open %>
|
19
|
+
|
20
|
+
<% @categories.each do |category| %>
|
21
|
+
|
22
|
+
<% checkbox = cell(:inputs, :checkbox).new(name: "categories[#{category.id}]", value: @post.categories.include?(category)) %>
|
23
|
+
<%=raw cell(:elements, :table, :row).new(labels: [
|
24
|
+
{type: 'component', value: checkbox},
|
25
|
+
category.title
|
26
|
+
]) %>
|
27
|
+
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<%=raw table_body.close %>
|
31
|
+
|
32
|
+
<%=raw table.close %>
|
33
|
+
|
34
|
+
<%=raw form.close %>
|
35
|
+
|
36
|
+
<%=raw block.close %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
3
|
+
table = cell(:elements, :table, :container).new(border: true)
|
4
|
+
table_body = cell(:elements, :table, :body).new
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:info], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw table.open %>
|
12
|
+
|
13
|
+
<%=raw table_body.open %>
|
14
|
+
|
15
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:current_language], get_current_language_title]) %>
|
16
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:current_status], @post.get_pretty_status]) %>
|
17
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:publication_date], @post.get_pretty_publication_datetime]) %>
|
18
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:creation_date], @post.get_pretty_created_at]) %>
|
19
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:update_date], @post.get_pretty_updated_at]) %>
|
20
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:superuser_creator], @post.get_superuser_creator_name]) %>
|
21
|
+
|
22
|
+
<%=raw table_body.close %>
|
23
|
+
|
24
|
+
<%=raw table.close %>
|
25
|
+
|
26
|
+
<%=raw block.close %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
3
|
+
table = cell(:elements, :table, :container).new
|
4
|
+
table_body = cell(:elements, :table, :body).new
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:languages], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw table.open %>
|
12
|
+
|
13
|
+
<%=raw table_body.open %>
|
14
|
+
|
15
|
+
<% CONFIGS[:lato_blog][:languages].values.each do |language| %>
|
16
|
+
|
17
|
+
<% if @post.meta_language === language[:identifier] %>
|
18
|
+
<%=raw cell(:elements, :table, :row).new(labels: [language[:title], @post.get_pretty_status, '']) %>
|
19
|
+
<% elsif @post.get_translation_for_language(language[:identifier]) %>
|
20
|
+
<% language_post = @post.get_translation_for_language(language[:identifier]) %>
|
21
|
+
<%=raw cell(:elements, :table, :row).new(labels: [
|
22
|
+
language[:title],
|
23
|
+
language_post.get_pretty_status,
|
24
|
+
"<a href='#{lato_blog.post_path(language_post.id)}'>#{LANGUAGES[:lato_blog][:mixed][:show]}</a>"
|
25
|
+
]) %>
|
26
|
+
<% else %>
|
27
|
+
<%=raw cell(:elements, :table, :row).new(labels: [
|
28
|
+
language[:title],
|
29
|
+
'',
|
30
|
+
"<a href='#{lato_blog.new_post_path(language: language[:identifier], parent: @post.post_parent.id)}'>#{LANGUAGES[:lato_blog][:mixed][:create]}</a>"
|
31
|
+
]) %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<%=raw table_body.close %>
|
37
|
+
|
38
|
+
<%=raw table.close %>
|
39
|
+
|
40
|
+
<%=raw block.close %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12 posts__edit-publication-datetime')
|
3
|
+
row = cell(:elements, :row).new
|
4
|
+
form = cell(:inputs, :form).new(url: lato_blog.posts_update_publication_datetime_path, method: :post, remote: true)
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:change_publication_datetime], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw form.open %>
|
12
|
+
|
13
|
+
<input type="hidden" name="id" value="<%= @post.id %>">
|
14
|
+
|
15
|
+
<%=raw row.open %>
|
16
|
+
|
17
|
+
<%=raw cell(:inputs, :datetime).new(name: 'publication_datetime', value: @post.post_parent.publication_datetime,
|
18
|
+
class: 'md-12') %>
|
19
|
+
|
20
|
+
<%=raw row.close %>
|
21
|
+
|
22
|
+
<%=raw form.close %>
|
23
|
+
|
24
|
+
<%=raw block.close %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12 posts__edit-status-switch')
|
3
|
+
row = cell(:elements, :row).new
|
4
|
+
form = cell(:inputs, :form).new(url: lato_blog.posts_update_status_path, method: :post, remote: true)
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:switch_status], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw form.open %>
|
12
|
+
|
13
|
+
<input type="hidden" name="id" value="<%= @post.id %>">
|
14
|
+
|
15
|
+
<%=raw row.open %>
|
16
|
+
|
17
|
+
<%=raw cell(:inputs, :select).new(name: 'status', options: [
|
18
|
+
{value: 'published', name: LANGUAGES[:lato_blog][:posts_status][:published]},
|
19
|
+
{value: 'drafted', name: LANGUAGES[:lato_blog][:posts_status][:drafted]},
|
20
|
+
{value: 'deleted', name: LANGUAGES[:lato_blog][:posts_status][:deleted]}
|
21
|
+
], value: @post.meta_status, class: 'md-12') %>
|
22
|
+
|
23
|
+
<%=raw row.close %>
|
24
|
+
|
25
|
+
<%=raw form.close %>
|
26
|
+
|
27
|
+
<%=raw block.close %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12 posts__index')
|
3
|
+
table = cell(:elements, :table, :container).new
|
4
|
+
table_head = cell(:elements, :table, :head).new(labels: [
|
5
|
+
LANGUAGES[:lato_blog][:forms][:title],
|
6
|
+
LANGUAGES[:lato_blog][:forms][:language],
|
7
|
+
LANGUAGES[:lato_blog][:forms][:publication]
|
8
|
+
])
|
9
|
+
table_body = cell(:elements, :table, :body).new
|
10
|
+
%>
|
11
|
+
|
12
|
+
<%=raw block.open %>
|
13
|
+
|
14
|
+
<%
|
15
|
+
title = ''
|
16
|
+
title = LANGUAGES[:lato_blog][:mixed][:published_posts] if status && status === 'published'
|
17
|
+
title = LANGUAGES[:lato_blog][:mixed][:drafted_posts] if status && status === 'drafted'
|
18
|
+
title = LANGUAGES[:lato_blog][:mixed][:deleted_posts] if status && status === 'deleted'
|
19
|
+
%>
|
20
|
+
|
21
|
+
<%=raw cell(:elements, :title).new(label: title, size: 6) %>
|
22
|
+
|
23
|
+
|
24
|
+
<%=raw cell(:widgets, :index).new(records: @widget_index_posts, index_url: lato_blog.posts_path(status: @posts_status),
|
25
|
+
head: [LANGUAGES[:lato_blog][:forms][:title], LANGUAGES[:lato_blog][:forms][:language]],
|
26
|
+
columns: ['title', 'get_pretty_language'], actions: {show: true, new: true, delete: (@posts_status === 'deleted')}, search: true, pagination: true) %>
|
27
|
+
|
28
|
+
<%=raw block.close %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
3
|
+
table = cell(:elements, :table, :container).new(border: true)
|
4
|
+
table_body = cell(:elements, :table, :body).new
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:info], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw table.open %>
|
12
|
+
|
13
|
+
<%=raw table_body.open %>
|
14
|
+
|
15
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:published_posts], informations[:published_length]]) %>
|
16
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:drafted_posts], informations[:drafted_length]]) %>
|
17
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:deleted_posts], informations[:deleted_length]]) %>
|
18
|
+
|
19
|
+
<%=raw table_body.close %>
|
20
|
+
|
21
|
+
<%=raw table.close %>
|
22
|
+
|
23
|
+
<% if @posts_status === 'deleted' %>
|
24
|
+
|
25
|
+
<div class="text-center">
|
26
|
+
<br>
|
27
|
+
<%=raw cell(:elements, :button).new(label: LANGUAGES[:lato_blog][:mixed][:empty_trash], icon: 'trash', style: 'danger',
|
28
|
+
confirmation: {
|
29
|
+
message: LANGUAGES[:lato_blog][:mixed][:empty_trash_message],
|
30
|
+
positive_response: LANGUAGES[:lato_blog][:mixed][:empty_trash_positive],
|
31
|
+
negative_response: LANGUAGES[:lato_blog][:mixed][:empty_trash_negative]
|
32
|
+
}, url: lato_blog.posts_destroy_all_deleted_path) %>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<%=raw block.close %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
3
|
+
%>
|
4
|
+
|
5
|
+
<%=raw block.open %>
|
6
|
+
|
7
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:switch_status], size: 6) %>
|
8
|
+
|
9
|
+
<%
|
10
|
+
published_button = cell(:elements, :button).new(label: LANGUAGES[:lato_blog][:mixed][:published_posts],
|
11
|
+
icon: 'thumbs-o-up', url: lato_blog.posts_path(status: 'published'))
|
12
|
+
drafted_button = cell(:elements, :button).new(label: LANGUAGES[:lato_blog][:mixed][:drafted_posts],
|
13
|
+
icon: 'user-secret', url: lato_blog.posts_path(status: 'drafted'))
|
14
|
+
deleted_button = cell(:elements, :button).new(label: LANGUAGES[:lato_blog][:mixed][:deleted_posts],
|
15
|
+
icon: 'trash', url: lato_blog.posts_path(status: 'deleted'))
|
16
|
+
|
17
|
+
buttons = []
|
18
|
+
buttons = [drafted_button, deleted_button] if status && status === 'published'
|
19
|
+
buttons = [published_button, deleted_button] if status && status === 'drafted'
|
20
|
+
buttons = [published_button, drafted_button] if status && status === 'deleted'
|
21
|
+
%>
|
22
|
+
|
23
|
+
<div class="text-center">
|
24
|
+
<% buttons.each do |button| %>
|
25
|
+
<%=raw button.show %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<%=raw block.close %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%
|
2
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
3
|
+
table = cell(:elements, :table, :container).new(border: true)
|
4
|
+
table_body = cell(:elements, :table, :body).new
|
5
|
+
%>
|
6
|
+
|
7
|
+
<%=raw block.open %>
|
8
|
+
|
9
|
+
<%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:info], size: 6) %>
|
10
|
+
|
11
|
+
<%=raw table.open %>
|
12
|
+
|
13
|
+
<%=raw table_body.open %>
|
14
|
+
|
15
|
+
<%=raw cell(:elements, :table, :row).new(labels: [LANGUAGES[:lato_blog][:mixed][:current_language], get_current_language_title]) %>
|
16
|
+
|
17
|
+
<%=raw table_body.close %>
|
18
|
+
|
19
|
+
<%=raw table.close %>
|
20
|
+
|
21
|
+
<%=raw block.close %>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<%
|
2
|
+
row = cell(:elements, :row).new
|
3
|
+
block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
|
4
|
+
code = cell(:elements, :code).new
|
5
|
+
%>
|
6
|
+
|
7
|
+
<!-- PRESENTATION -->
|
8
|
+
<%=raw row.open %>
|
9
|
+
|
10
|
+
<%=raw block.open %>
|
11
|
+
|
12
|
+
<%=raw cell(:elements, :title).new(label: 'Lato Blog Documentation') %>
|
13
|
+
|
14
|
+
<%=raw block.close %>
|
15
|
+
|
16
|
+
<%=raw row.close %>
|
17
|
+
<!-- / PRESENTATION -->
|
18
|
+
|
19
|
+
<!-- GENERAL SECTION -->
|
20
|
+
<%=raw row.open %>
|
21
|
+
|
22
|
+
<%=raw block.open %>
|
23
|
+
|
24
|
+
<%=raw cell(:elements, :title).new(label: 'General', size: 2) %>
|
25
|
+
|
26
|
+
<%=raw cell(:elements, :button).new(label: 'Installation', url: lato_blog.doc_general_installation_path) %>
|
27
|
+
<%=raw cell(:elements, :button).new(label: 'Personalization', url: lato_blog.doc_general_personalization_path) %>
|
28
|
+
<%=raw cell(:elements, :button).new(label: 'Api', url: lato_blog.doc_general_api_path) %>
|
29
|
+
|
30
|
+
<%=raw block.close %>
|
31
|
+
|
32
|
+
<%=raw row.close %>
|
33
|
+
<!-- / GENERAL SECTION -->
|
34
|
+
|
35
|
+
<!-- FIELDS SECTION -->
|
36
|
+
<%=raw row.open %>
|
37
|
+
|
38
|
+
<%=raw block.open %>
|
39
|
+
|
40
|
+
<%=raw cell(:elements, :title).new(label: 'Post fields', size: 2) %>
|
41
|
+
|
42
|
+
<p>
|
43
|
+
Post fields are a list of possible custom fields that can be added to a post object from the configuration file.
|
44
|
+
</p>
|
45
|
+
|
46
|
+
<p>
|
47
|
+
Every field should be defined on the configuration file under the "post fields" setting. <br>
|
48
|
+
Under the field options you must tell to the system which type of field it will be. You can also tell the system
|
49
|
+
the list of categories where show posts.
|
50
|
+
</p>
|
51
|
+
|
52
|
+
<p>Here there is an example of a post fields configuration:</p>
|
53
|
+
|
54
|
+
<%=raw code.open %>
|
55
|
+
|
56
|
+
post_fields:
|
57
|
+
field_key:
|
58
|
+
type: field_type
|
59
|
+
position: position_number
|
60
|
+
categories: ['category_permalink_1', 'category_permalink_2'] # not required
|
61
|
+
|
62
|
+
<%=raw code.close %>
|
63
|
+
|
64
|
+
<br>
|
65
|
+
|
66
|
+
<%=raw cell(:elements, :title).new(label: 'Base fields', size: 4) %>
|
67
|
+
|
68
|
+
<%=raw cell(:elements, :button).new(label: 'Text', url: lato_blog.doc_fields_text_path) %>
|
69
|
+
<%=raw cell(:elements, :button).new(label: 'Datetime', url: lato_blog.doc_fields_datetime_path) %>
|
70
|
+
<%=raw cell(:elements, :button).new(label: 'Editor', url: lato_blog.doc_fields_editor_path) %>
|
71
|
+
<%=raw cell(:elements, :button).new(label: 'Geolocalization', url: lato_blog.doc_fields_geolocalization_path) %>
|
72
|
+
<%=raw cell(:elements, :button).new(label: 'Image', url: lato_blog.doc_fields_image_path) %>
|
73
|
+
|
74
|
+
<br> <br>
|
75
|
+
<%=raw cell(:elements, :title).new(label: 'Group fields', size: 4) %>
|
76
|
+
|
77
|
+
<%=raw cell(:elements, :button).new(label: 'Composed', url: lato_blog.doc_fields_composed_path) %>
|
78
|
+
<%=raw cell(:elements, :button).new(label: 'Relay', url: lato_blog.doc_fields_relay_path) %>
|
79
|
+
|
80
|
+
<%=raw block.close %>
|
81
|
+
|
82
|
+
<%=raw row.close %>
|
83
|
+
<!-- / FIELDS SECTION -->
|