decidim-blogs 0.23.1 → 0.24.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/blogs/post_m_cell.rb +1 -1
- data/app/models/decidim/blogs/post.rb +12 -6
- data/app/views/decidim/blogs/admin/posts/edit.html.erb +1 -1
- data/app/views/decidim/blogs/posts/show.html.erb +7 -5
- data/config/locales/ca.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/de.yml +4 -3
- data/config/locales/en.yml +1 -0
- data/config/locales/es-MX.yml +1 -0
- data/config/locales/es-PY.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/fi-plain.yml +3 -2
- data/config/locales/fi.yml +3 -2
- data/config/locales/fr-CA.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gl.yml +17 -11
- data/config/locales/is-IS.yml +4 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/nl.yml +3 -2
- data/config/locales/pl.yml +1 -0
- data/config/locales/ro-RO.yml +1 -0
- data/config/locales/ru.yml +2 -2
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/tr-TR.yml +6 -0
- data/config/locales/uk.yml +2 -2
- data/lib/decidim/api/blogs_type.rb +29 -0
- data/{app/types/decidim/blogs → lib/decidim/api}/post_input_filter.rb +0 -0
- data/{app/types/decidim/blogs → lib/decidim/api}/post_input_sort.rb +1 -1
- data/lib/decidim/api/post_type.rb +21 -0
- data/lib/decidim/blogs.rb +1 -0
- data/lib/decidim/blogs/api.rb +10 -0
- data/lib/decidim/blogs/component.rb +2 -2
- data/lib/decidim/blogs/version.rb +1 -1
- metadata +30 -41
- data/app/types/decidim/blogs/blogs_type.rb +0 -30
- data/app/types/decidim/blogs/post_type.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da94acf2f0fd071e7d4e5d5ad8e8ef7dc86e4bb5aee03676316b5ccabbee01f4
|
4
|
+
data.tar.gz: 8c2bb8ed195df713e1266b79aed6eee8fad02945ffab2b4d122c3052dcdbdce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec78816bee899911d46bbd262dd5c078d33cce347c0869e2794fee830f0e00d62fa474da241c46f01c151ca8d9d865ba112c60fd1eec5a2382f23a08d1bf6b76
|
7
|
+
data.tar.gz: '0845037366f7a4c2d6ac00b630d3ecea9046f54c4ac96ac84494720448f6902096a158e076e68e36cfca449fbf752147f977607443d21016cfdd4decfe1803b4'
|
@@ -13,7 +13,7 @@ module Decidim
|
|
13
13
|
|
14
14
|
def endorsements_count
|
15
15
|
with_tooltip t("decidim.endorsable.endorsements") do
|
16
|
-
icon("bullhorn", class: "icon--small")
|
16
|
+
"#{icon("bullhorn", class: "icon--small")} #{model.endorsements_count}"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -26,12 +26,18 @@ module Decidim
|
|
26
26
|
|
27
27
|
scope :created_at_desc, -> { order(arel_table[:created_at].desc) }
|
28
28
|
|
29
|
-
searchable_fields(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
searchable_fields({
|
30
|
+
participatory_space: { component: :participatory_space },
|
31
|
+
A: :title,
|
32
|
+
D: :body,
|
33
|
+
datetime: :created_at
|
34
|
+
},
|
35
|
+
index_on_create: true,
|
36
|
+
index_on_update: ->(post) { post.visible? })
|
37
|
+
|
38
|
+
def visible?
|
39
|
+
participatory_space.try(:visible?) && component.try(:published?)
|
40
|
+
end
|
35
41
|
|
36
42
|
# Public: Overrides the `commentable?` Commentable concern method.
|
37
43
|
def commentable?
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= decidim_form_for(@form, html: { class: "form edit_post" }) do |f| %>
|
2
|
-
<%= render partial: "form", object: f %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".save") %>
|
@@ -16,10 +16,12 @@
|
|
16
16
|
%>
|
17
17
|
|
18
18
|
<div class="row column view-header">
|
19
|
-
|
20
|
-
<%=
|
21
|
-
|
22
|
-
|
19
|
+
<div class="m-bottom">
|
20
|
+
<%= link_to :posts, class: "small hollow" do %>
|
21
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
22
|
+
<%= t(".back") %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
23
25
|
<h2 class="heading2"><%= translated_attribute post.title %></h2>
|
24
26
|
<%= cell "decidim/author", present(post.author), from: post %>
|
25
27
|
</div>
|
@@ -46,7 +48,7 @@
|
|
46
48
|
</div>
|
47
49
|
</div>
|
48
50
|
<% end %>
|
49
|
-
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
51
|
+
<div class="columns mediumlarge-8 <%= "mediumlarge-pull-4" if show_endorsements_card? %>">
|
50
52
|
<div class="section">
|
51
53
|
<%= decidim_sanitize translated_attribute post.body %>
|
52
54
|
</div>
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/de.yml
CHANGED
@@ -29,6 +29,7 @@ de:
|
|
29
29
|
success: Beitrag wurde erfolgreich gelöscht
|
30
30
|
edit:
|
31
31
|
save: Aktualisieren
|
32
|
+
title: Post bearbeiten
|
32
33
|
index:
|
33
34
|
title: Beiträge
|
34
35
|
new:
|
@@ -50,7 +51,7 @@ de:
|
|
50
51
|
show:
|
51
52
|
back: Zurück zur Liste
|
52
53
|
comments: Kommentare
|
53
|
-
view:
|
54
|
+
view: Anzeigen
|
54
55
|
sidebar_blog:
|
55
56
|
comments: Bemerkungen
|
56
57
|
most_commented_posts: Meist kommentierte Posts
|
@@ -72,9 +73,9 @@ de:
|
|
72
73
|
blogs:
|
73
74
|
post_created:
|
74
75
|
email_intro: Der Beitrag "%{resource_title}" wurde in "%{participatory_space_title}" veröffentlicht, dem Sie folgen.
|
75
|
-
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie "%{participatory_space_title}" folgen. Sie
|
76
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie "%{participatory_space_title}" folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link.
|
76
77
|
email_subject: Neuer Beitrag in %{participatory_space_title}
|
77
|
-
notification_title: Der Beitrag <a href="%{resource_path}">%{resource_title}</a> wurde in %{participatory_space_title}
|
78
|
+
notification_title: Der Beitrag <a href="%{resource_path}">%{resource_title}</a> wurde in %{participatory_space_title} veröffentlicht
|
78
79
|
pages:
|
79
80
|
home:
|
80
81
|
statistics:
|
data/config/locales/en.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/fi-plain.yml
CHANGED
@@ -29,6 +29,7 @@ fi-pl:
|
|
29
29
|
success: Artikkeli poistettu onnistuneesti
|
30
30
|
edit:
|
31
31
|
save: Päivitä
|
32
|
+
title: Muokkaa artikkelia
|
32
33
|
index:
|
33
34
|
title: Artikkelit
|
34
35
|
new:
|
@@ -78,7 +79,7 @@ fi-pl:
|
|
78
79
|
pages:
|
79
80
|
home:
|
80
81
|
statistics:
|
81
|
-
posts_count:
|
82
|
+
posts_count: Artikkelit
|
82
83
|
participatory_processes:
|
83
84
|
statistics:
|
84
|
-
posts_count:
|
85
|
+
posts_count: Artikkelit
|
data/config/locales/fi.yml
CHANGED
@@ -29,6 +29,7 @@ fi:
|
|
29
29
|
success: Artikkelin poisto onnistui
|
30
30
|
edit:
|
31
31
|
save: Päivitä
|
32
|
+
title: Muokkaa artikkelia
|
32
33
|
index:
|
33
34
|
title: Artikkelit
|
34
35
|
new:
|
@@ -78,7 +79,7 @@ fi:
|
|
78
79
|
pages:
|
79
80
|
home:
|
80
81
|
statistics:
|
81
|
-
posts_count:
|
82
|
+
posts_count: Artikkelit
|
82
83
|
participatory_processes:
|
83
84
|
statistics:
|
84
|
-
posts_count:
|
85
|
+
posts_count: Artikkelit
|
data/config/locales/fr-CA.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/gl.yml
CHANGED
@@ -5,12 +5,12 @@ gl:
|
|
5
5
|
activerecord:
|
6
6
|
models:
|
7
7
|
decidim/blogs/post:
|
8
|
-
one:
|
8
|
+
one: Publicación
|
9
9
|
other: Publicacións
|
10
10
|
decidim:
|
11
11
|
blogs:
|
12
12
|
actions:
|
13
|
-
confirm_destroy:
|
13
|
+
confirm_destroy: Tes a certeza de querer eliminar esta publicación?
|
14
14
|
destroy: Eliminar
|
15
15
|
edit: Editar
|
16
16
|
new: Nova publicación
|
@@ -20,15 +20,16 @@ gl:
|
|
20
20
|
components:
|
21
21
|
body: Corpo
|
22
22
|
post:
|
23
|
-
name:
|
23
|
+
name: Publicación
|
24
24
|
posts:
|
25
25
|
create:
|
26
26
|
invalid: Produciuse un problema ao crear esta publicación
|
27
|
-
success:
|
27
|
+
success: Publicación creada con éxito
|
28
28
|
destroy:
|
29
|
-
success:
|
29
|
+
success: Publicación eliminada con éxito
|
30
30
|
edit:
|
31
|
-
save:
|
31
|
+
save: Actualizar
|
32
|
+
title: Editar publicación
|
32
33
|
index:
|
33
34
|
title: Publicacións
|
34
35
|
new:
|
@@ -36,7 +37,7 @@ gl:
|
|
36
37
|
title: Crear unha publicación
|
37
38
|
update:
|
38
39
|
invalid: Produciuse un erro ao gardar a publicación.
|
39
|
-
success:
|
40
|
+
success: Publicación gardada con éxito
|
40
41
|
last_activity:
|
41
42
|
new_post_at_html: "<span>Nova publicación en %{link}</span>"
|
42
43
|
models:
|
@@ -44,15 +45,17 @@ gl:
|
|
44
45
|
fields:
|
45
46
|
author: Autor
|
46
47
|
body: Corpo
|
47
|
-
created_at: Creado
|
48
|
+
created_at: Creado o
|
48
49
|
title: título
|
49
50
|
posts:
|
50
51
|
show:
|
52
|
+
back: Volver á listaxe
|
53
|
+
comments: Comentarios
|
51
54
|
view: Ver
|
52
55
|
sidebar_blog:
|
53
56
|
comments: comentarios
|
54
|
-
most_commented_posts:
|
55
|
-
read_more:
|
57
|
+
most_commented_posts: As publicacións máis comentadas
|
58
|
+
read_more: Ler máis
|
56
59
|
components:
|
57
60
|
blogs:
|
58
61
|
name: Blog
|
@@ -60,14 +63,17 @@ gl:
|
|
60
63
|
global:
|
61
64
|
announcement: Anuncio
|
62
65
|
comments_enabled: Comentarios habilitados
|
66
|
+
comments_max_length: Lonxitude máxima dos comentarios (0 para valor predefinido)
|
63
67
|
step:
|
64
68
|
announcement: Anuncio
|
65
69
|
comments_blocked: Comentarios bloqueados
|
70
|
+
endorsements_blocked: Adhesións bloqueadas
|
71
|
+
endorsements_enabled: Adhesións habilitadas
|
66
72
|
events:
|
67
73
|
blogs:
|
68
74
|
post_created:
|
69
75
|
email_intro: A publicación "%{resource_title}" publicouse en "%{participatory_space_title}" que estás seguindo.
|
70
|
-
email_outro: Recibiches esta notificación porque estás seguindo "%{participatory_space_title}". Podes deixar de seguir
|
76
|
+
email_outro: Recibiches esta notificación porque estás seguindo "%{participatory_space_title}". Podes deixar de seguir dende a ligazón anterior.
|
71
77
|
email_subject: Nova publicación publicada en %{participatory_space_title}
|
72
78
|
notification_title: A publicación <a href="%{resource_path}">%{resource_title}</a> publicouse en %{participatory_space_title}
|
73
79
|
pages:
|
data/config/locales/is-IS.yml
CHANGED
@@ -51,6 +51,10 @@ is-IS:
|
|
51
51
|
email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgist með "%{participatory_space_title}". Þú getur sleppt því frá fyrri tengilinn.
|
52
52
|
email_subject: Ný staða birt í %{participatory_space_title}
|
53
53
|
notification_title: Staða <a href="%{resource_path}">%{resource_title}</a> hefur verið birt í %{participatory_space_title}
|
54
|
+
pages:
|
55
|
+
home:
|
56
|
+
statistics:
|
57
|
+
posts_count: Innlegg
|
54
58
|
participatory_processes:
|
55
59
|
statistics:
|
56
60
|
posts_count: Innlegg
|
data/config/locales/ja.yml
CHANGED
data/config/locales/nl.yml
CHANGED
@@ -29,6 +29,7 @@ nl:
|
|
29
29
|
success: Post succesvol verwijderd
|
30
30
|
edit:
|
31
31
|
save: Bijwerken
|
32
|
+
title: Bericht bewerken
|
32
33
|
index:
|
33
34
|
title: berichten
|
34
35
|
new:
|
@@ -49,7 +50,7 @@ nl:
|
|
49
50
|
posts:
|
50
51
|
show:
|
51
52
|
back: Terug naar het overzicht
|
52
|
-
comments:
|
53
|
+
comments: Reacties
|
53
54
|
view: Bekijk
|
54
55
|
sidebar_blog:
|
55
56
|
comments: reacties
|
@@ -81,4 +82,4 @@ nl:
|
|
81
82
|
posts_count: berichten
|
82
83
|
participatory_processes:
|
83
84
|
statistics:
|
84
|
-
posts_count:
|
85
|
+
posts_count: berichten
|
data/config/locales/pl.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
data/config/locales/ru.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
si:
|
@@ -0,0 +1 @@
|
|
1
|
+
sw:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -29,6 +29,7 @@ tr:
|
|
29
29
|
success: Yayın başarıyla silindi
|
30
30
|
edit:
|
31
31
|
save: Güncelleştirme
|
32
|
+
title: Gönderiyi düzenle
|
32
33
|
index:
|
33
34
|
title: Mesajlar
|
34
35
|
new:
|
@@ -48,6 +49,8 @@ tr:
|
|
48
49
|
title: Başlık
|
49
50
|
posts:
|
50
51
|
show:
|
52
|
+
back: Listeye geri dön
|
53
|
+
comments: Yorumlar
|
51
54
|
view: Görünüm
|
52
55
|
sidebar_blog:
|
53
56
|
comments: yorumlar
|
@@ -60,9 +63,12 @@ tr:
|
|
60
63
|
global:
|
61
64
|
announcement: duyuru
|
62
65
|
comments_enabled: Yorumlar etkin
|
66
|
+
comments_max_length: Maksimum yorum uzunluğu (Varsayılan değer için 0 bırakın)
|
63
67
|
step:
|
64
68
|
announcement: duyuru
|
65
69
|
comments_blocked: Yorumlar engellendi
|
70
|
+
endorsements_blocked: Yorumlar engellendi
|
71
|
+
endorsements_enabled: Yorumlar etkin
|
66
72
|
events:
|
67
73
|
blogs:
|
68
74
|
post_created:
|
data/config/locales/uk.yml
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Blogs
|
5
|
+
class BlogsType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ComponentInterface
|
7
|
+
|
8
|
+
graphql_name "Blogs"
|
9
|
+
description "A blogs component of a participatory space."
|
10
|
+
|
11
|
+
field :posts, type: Decidim::Blogs::PostType.connection_type, description: "List all posts", connection: true, null: false do
|
12
|
+
argument :order, Decidim::Blogs::PostInputSort, "Provides several methods to order the results", required: false
|
13
|
+
argument :filter, Decidim::Blogs::PostInputFilter, "Provides several methods to filter the results", required: false
|
14
|
+
end
|
15
|
+
|
16
|
+
field :post, type: Decidim::Blogs::PostType, description: "Finds one post", null: true do
|
17
|
+
argument :id, GraphQL::Types::ID, "The ID of the post", required: true
|
18
|
+
end
|
19
|
+
|
20
|
+
def posts(filter: {}, order: {})
|
21
|
+
Decidim::Core::ComponentListBase.new(model_class: Post).call(object, { filter: filter, order: order }, context)
|
22
|
+
end
|
23
|
+
|
24
|
+
def post(id:)
|
25
|
+
Decidim::Core::ComponentFinderBase.new(model_class: Post).call(object, { id: id }, context)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
File without changes
|
@@ -9,7 +9,7 @@ module Decidim
|
|
9
9
|
graphql_name "PostSort"
|
10
10
|
description "A type used for sorting blog posts"
|
11
11
|
|
12
|
-
argument :id, String, "Sort by ID, valid values are ASC or DESC", required: false
|
12
|
+
argument :id, GraphQL::Types::String, "Sort by ID, valid values are ASC or DESC", required: false
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Blogs
|
5
|
+
# This type represents a Post.
|
6
|
+
class PostType < Decidim::Api::Types::BaseObject
|
7
|
+
implements Decidim::Comments::CommentableInterface
|
8
|
+
implements Decidim::Core::AttachableInterface
|
9
|
+
implements Decidim::Core::AuthorableInterface
|
10
|
+
implements Decidim::Core::TraceableInterface
|
11
|
+
implements Decidim::Core::EndorsableInterface
|
12
|
+
implements Decidim::Core::TimestampsInterface
|
13
|
+
|
14
|
+
description "A post"
|
15
|
+
|
16
|
+
field :id, GraphQL::Types::ID, "The internal ID of this post", null: false
|
17
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this post", null: true
|
18
|
+
field :body, Decidim::Core::TranslatedFieldType, "The body of this post", null: true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/decidim/blogs.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Blogs
|
5
|
+
autoload :PostInputSort, "decidim/api/post_input_sort"
|
6
|
+
autoload :PostInputFilter, "decidim/api/post_input_filter"
|
7
|
+
autoload :PostType, "decidim/api/post_type"
|
8
|
+
autoload :BlogsType, "decidim/api/blogs_type"
|
9
|
+
end
|
10
|
+
end
|
@@ -77,9 +77,9 @@ Decidim.register_component(:blogs) do |component|
|
|
77
77
|
|
78
78
|
params = {
|
79
79
|
component: component,
|
80
|
-
title: Decidim::Faker::Localized.sentence(5),
|
80
|
+
title: Decidim::Faker::Localized.sentence(word_count: 5),
|
81
81
|
body: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
82
|
-
Decidim::Faker::Localized.paragraph(20)
|
82
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 20)
|
83
83
|
end,
|
84
84
|
author: author
|
85
85
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-blogs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Massot Gil
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,56 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.24.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.24.0.rc2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.24.0.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.24.0.rc2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: httparty
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.17'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.17'
|
54
|
+
version: 0.24.0.rc2
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: jquery-tmpl-rails
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,56 +92,56 @@ dependencies:
|
|
106
92
|
requirements:
|
107
93
|
- - '='
|
108
94
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.
|
95
|
+
version: 0.24.0.rc2
|
110
96
|
type: :development
|
111
97
|
prerelease: false
|
112
98
|
version_requirements: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
114
100
|
- - '='
|
115
101
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.
|
102
|
+
version: 0.24.0.rc2
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
104
|
name: decidim-assemblies
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
120
106
|
requirements:
|
121
107
|
- - '='
|
122
108
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
109
|
+
version: 0.24.0.rc2
|
124
110
|
type: :development
|
125
111
|
prerelease: false
|
126
112
|
version_requirements: !ruby/object:Gem::Requirement
|
127
113
|
requirements:
|
128
114
|
- - '='
|
129
115
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.
|
116
|
+
version: 0.24.0.rc2
|
131
117
|
- !ruby/object:Gem::Dependency
|
132
118
|
name: decidim-dev
|
133
119
|
requirement: !ruby/object:Gem::Requirement
|
134
120
|
requirements:
|
135
121
|
- - '='
|
136
122
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.
|
123
|
+
version: 0.24.0.rc2
|
138
124
|
type: :development
|
139
125
|
prerelease: false
|
140
126
|
version_requirements: !ruby/object:Gem::Requirement
|
141
127
|
requirements:
|
142
128
|
- - '='
|
143
129
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.
|
130
|
+
version: 0.24.0.rc2
|
145
131
|
- !ruby/object:Gem::Dependency
|
146
132
|
name: decidim-participatory_processes
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
148
134
|
requirements:
|
149
135
|
- - '='
|
150
136
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0.
|
137
|
+
version: 0.24.0.rc2
|
152
138
|
type: :development
|
153
139
|
prerelease: false
|
154
140
|
version_requirements: !ruby/object:Gem::Requirement
|
155
141
|
requirements:
|
156
142
|
- - '='
|
157
143
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.
|
144
|
+
version: 0.24.0.rc2
|
159
145
|
description: A Blog component for decidim's participatory spaces.
|
160
146
|
email:
|
161
147
|
- isaac.mg@coditramuntana.com
|
@@ -187,10 +173,6 @@ files:
|
|
187
173
|
- app/models/decidim/blogs/post.rb
|
188
174
|
- app/permissions/decidim/blog/permissions.rb
|
189
175
|
- app/presenters/decidim/blogs/post_presenter.rb
|
190
|
-
- app/types/decidim/blogs/blogs_type.rb
|
191
|
-
- app/types/decidim/blogs/post_input_filter.rb
|
192
|
-
- app/types/decidim/blogs/post_input_sort.rb
|
193
|
-
- app/types/decidim/blogs/post_type.rb
|
194
176
|
- app/views/decidim/blogs/admin/posts/_form.html.erb
|
195
177
|
- app/views/decidim/blogs/admin/posts/edit.html.erb
|
196
178
|
- app/views/decidim/blogs/admin/posts/index.html.erb
|
@@ -253,12 +235,14 @@ files:
|
|
253
235
|
- config/locales/pt.yml
|
254
236
|
- config/locales/ro-RO.yml
|
255
237
|
- config/locales/ru.yml
|
238
|
+
- config/locales/si-LK.yml
|
256
239
|
- config/locales/sk-SK.yml
|
257
240
|
- config/locales/sk.yml
|
258
241
|
- config/locales/sl.yml
|
259
242
|
- config/locales/so-SO.yml
|
260
243
|
- config/locales/sr-CS.yml
|
261
244
|
- config/locales/sv.yml
|
245
|
+
- config/locales/sw-KE.yml
|
262
246
|
- config/locales/ti-ER.yml
|
263
247
|
- config/locales/tr-TR.yml
|
264
248
|
- config/locales/uk.yml
|
@@ -273,9 +257,14 @@ files:
|
|
273
257
|
- db/migrate/20200128094730_add_endorsements_counter_cache_to_blogs.rb
|
274
258
|
- db/migrate/20200320105910_index_foreign_keys_in_decidim_blogs_posts.rb
|
275
259
|
- db/migrate/20200827153709_add_commentable_counter_cache_to_posts.rb
|
260
|
+
- lib/decidim/api/blogs_type.rb
|
261
|
+
- lib/decidim/api/post_input_filter.rb
|
262
|
+
- lib/decidim/api/post_input_sort.rb
|
263
|
+
- lib/decidim/api/post_type.rb
|
276
264
|
- lib/decidim/blogs.rb
|
277
265
|
- lib/decidim/blogs/admin.rb
|
278
266
|
- lib/decidim/blogs/admin_engine.rb
|
267
|
+
- lib/decidim/blogs/api.rb
|
279
268
|
- lib/decidim/blogs/component.rb
|
280
269
|
- lib/decidim/blogs/engine.rb
|
281
270
|
- lib/decidim/blogs/test/factories.rb
|
@@ -284,7 +273,7 @@ homepage: https://github.com/decidim/decidim
|
|
284
273
|
licenses:
|
285
274
|
- AGPL-3.0
|
286
275
|
metadata: {}
|
287
|
-
post_install_message:
|
276
|
+
post_install_message:
|
288
277
|
rdoc_options: []
|
289
278
|
require_paths:
|
290
279
|
- lib
|
@@ -292,15 +281,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
292
281
|
requirements:
|
293
282
|
- - ">="
|
294
283
|
- !ruby/object:Gem::Version
|
295
|
-
version: '2.
|
284
|
+
version: '2.7'
|
296
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
297
286
|
requirements:
|
298
|
-
- - "
|
287
|
+
- - ">"
|
299
288
|
- !ruby/object:Gem::Version
|
300
|
-
version:
|
289
|
+
version: 1.3.1
|
301
290
|
requirements: []
|
302
|
-
rubygems_version: 3.
|
303
|
-
signing_key:
|
291
|
+
rubygems_version: 3.1.2
|
292
|
+
signing_key:
|
304
293
|
specification_version: 4
|
305
294
|
summary: Decidim blogs module
|
306
295
|
test_files: []
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Blogs
|
5
|
-
BlogsType = GraphQL::ObjectType.define do
|
6
|
-
interfaces [-> { Decidim::Core::ComponentInterface }]
|
7
|
-
|
8
|
-
name "Blogs"
|
9
|
-
description "A blogs component of a participatory space."
|
10
|
-
|
11
|
-
connection :posts,
|
12
|
-
type: PostType.connection_type,
|
13
|
-
description: "List all posts",
|
14
|
-
function: PostListHelper.new(model_class: Post)
|
15
|
-
field :post,
|
16
|
-
type: PostType,
|
17
|
-
description: "Finds one post",
|
18
|
-
function: PostFinderHelper.new(model_class: Post)
|
19
|
-
end
|
20
|
-
|
21
|
-
class PostListHelper < Decidim::Core::ComponentListBase
|
22
|
-
argument :order, PostInputSort, "Provides several methods to order the results"
|
23
|
-
argument :filter, PostInputFilter, "Provides several methods to filter the results"
|
24
|
-
end
|
25
|
-
|
26
|
-
class PostFinderHelper < Decidim::Core::ComponentFinderBase
|
27
|
-
argument :id, !types.ID, "The ID of the post"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Blogs
|
5
|
-
# This type represents a Post.
|
6
|
-
PostType = GraphQL::ObjectType.define do
|
7
|
-
interfaces [
|
8
|
-
-> { Decidim::Comments::CommentableInterface },
|
9
|
-
-> { Decidim::Core::AttachableInterface },
|
10
|
-
-> { Decidim::Core::AuthorableInterface },
|
11
|
-
-> { Decidim::Core::TraceableInterface },
|
12
|
-
-> { Decidim::Core::EndorsableInterface },
|
13
|
-
-> { Decidim::Core::TimestampsInterface }
|
14
|
-
]
|
15
|
-
|
16
|
-
name "Post"
|
17
|
-
description "A post"
|
18
|
-
|
19
|
-
field :id, !types.ID, "The internal ID of this post"
|
20
|
-
field :title, Decidim::Core::TranslatedFieldType, "The title for this post"
|
21
|
-
field :body, Decidim::Core::TranslatedFieldType, "The body of this post"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|