decidim-debates 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c5154f69ad0a0b6a244b3bb0a6b0a7b83fb665ca2ef34cb8702507ba55ee58c
4
- data.tar.gz: 9cab95324efb5840cadf2c3d984c7384665c2b88a12d31dd383cda7bbbb48fa8
3
+ metadata.gz: 72a1803a58c725073343620f86a646c1d2ef91f7e20b40fa5c9c6daeee8c3cb5
4
+ data.tar.gz: 29591d95a7f004f169d0a9cbc08c263f5f2d19299f203ac844d4fd941d3476b7
5
5
  SHA512:
6
- metadata.gz: a150b2f6a3246d9d0e5f4402e1bde76a0e80a9bf00b1e7525b3b5bdf3745fd54697a5ff38bb67538a6636425480022b4b818c097979a1132db1062bd17f61a3b
7
- data.tar.gz: eae4e679cbc8ce32b06ff317e4e7a14fac1b11b48732d2e78f39e6b8b1ad46e695e7c6fe9d4e6430ffb3ea3e287537c0c9de6b3c0fc182862c46b4201d0a79a3
6
+ metadata.gz: c606a1b8e63ea4458e0ba0d203f3e918448c101b70abf86e6a1434a5c7bfd1d779bea19dd3ab05cf361ddbd6af69f17848df3cd1c14b424d61bed35c4e7aec8e
7
+ data.tar.gz: 7053f5592a9f005c5096bb6b6410d0afc0bc3caad20fe381d732e78b9dda879f102582f8f389df1a05342081159e7d97753a0ca9608b0efc225aff78d35fbe70
@@ -28,6 +28,7 @@ module Decidim
28
28
  def debate_date
29
29
  return unless start_date && end_date
30
30
  return render(:multiple_dates) if spans_multiple_dates?
31
+
31
32
  render(:single_date)
32
33
  end
33
34
 
@@ -41,11 +42,13 @@ module Decidim
41
42
 
42
43
  def start_date
43
44
  return unless model.start_time
45
+
44
46
  model.start_time.to_date
45
47
  end
46
48
 
47
49
  def end_date
48
50
  return unless model.end_time
51
+
49
52
  model.end_time.to_date
50
53
  end
51
54
  end
@@ -29,6 +29,7 @@ module Decidim
29
29
 
30
30
  def category
31
31
  return unless current_component
32
+
32
33
  @category ||= current_component.categories.find_by(id: decidim_category_id)
33
34
  end
34
35
  end
@@ -72,6 +72,7 @@ module Decidim
72
72
  # Public: Overrides the `accepts_new_comments?` Commentable concern method.
73
73
  def accepts_new_comments?
74
74
  return false unless open?
75
+
75
76
  commentable? && !comments_blocked?
76
77
  end
77
78
 
@@ -90,14 +91,10 @@ module Decidim
90
91
  self.class.name
91
92
  end
92
93
 
93
- # Public: Overrides the `notifiable?` Notifiable concern method.
94
- def notifiable?(_context)
95
- false
96
- end
97
-
98
94
  # Public: Override Commentable concern method `users_to_notify_on_comment_created`
99
95
  def users_to_notify_on_comment_created
100
96
  return Decidim::User.where(id: followers).or(Decidim::User.where(id: component.participatory_space.admins)).distinct if official?
97
+
101
98
  followers
102
99
  end
103
100
 
@@ -14,6 +14,7 @@ module Decidim
14
14
  @registry = []
15
15
  cumulative.each do |key, cumulative_value|
16
16
  next if cumulative_value.zero?
17
+
17
18
  quantity_value = quantity[key] || 0
18
19
  category_id, space_type, space_id = key
19
20
  record = Decidim::Metric.find_or_initialize_by(day: @day.to_s, metric_type: @metric_name,
@@ -22,7 +22,7 @@
22
22
  <% debates.each do |debate| %>
23
23
  <tr data-id="<%= debate.id %>">
24
24
  <td>
25
- <%= link_to translated_attribute(debate.title), resource_locator(debate).path, target: :blank %><br />
25
+ <%= link_to translated_attribute(debate.title), resource_locator(debate).path, target: :blank %><br>
26
26
  </td>
27
27
  <td>
28
28
  <% if debate.start_time %>
@@ -38,7 +38,7 @@ edit_link(
38
38
  </div>
39
39
  </div>
40
40
  <%= resource_reference(debate) %>
41
- <%= render partial: "share", locals: { debate: debate } %>
41
+ <%= render partial: "decidim/shared/share_modal" %>
42
42
  </div>
43
43
  <div class="columns mediumlarge-8 mediumlarge-pull-4">
44
44
  <div class="section">
@@ -64,9 +64,6 @@ edit_link(
64
64
 
65
65
  <%= comments_for debate %>
66
66
 
67
- <%= javascript_include_tag "decidim/proposals/social_share" %>
68
- <%= stylesheet_link_tag "decidim/proposals/social_share" %>
69
-
70
67
  <%=
71
68
  render partial: "decidim/shared/flag_modal", locals: {
72
69
  reportable: debate,
@@ -104,10 +104,6 @@ ar:
104
104
  create: إنشاء
105
105
  select_a_category: الرجاء تحديد الفئة
106
106
  title: نقاش جديد
107
- share:
108
- close_window: أغلق النافذة
109
- share: شارك
110
- share_link: مشاركة الرابط
111
107
  last_activity:
112
108
  new_debate_at_html: "<span>مناقشة جديدة في %{link}</span>"
113
109
  models:
@@ -96,10 +96,6 @@ ca:
96
96
  create: Crear
97
97
  select_a_category: Si us plau, selecciona una categoria
98
98
  title: Nou debat
99
- share:
100
- close_window: Tanca la finestra
101
- share: Compartir
102
- share_link: Comparteix l'enllaç
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nou debat a %{link}</span>"
105
101
  models:
@@ -100,10 +100,6 @@ cs:
100
100
  create: Vytvořit
101
101
  select_a_category: Vyberte kategorii
102
102
  title: Nová debata
103
- share:
104
- close_window: Zavřete okno
105
- share: Podíl
106
- share_link: Sdílet odkaz
107
103
  last_activity:
108
104
  new_debate_at_html: "<span>Nová diskuse na %{link}</span>"
109
105
  models:
@@ -96,10 +96,6 @@ de:
96
96
  create: Erstellen
97
97
  select_a_category: Bitte wählen sie eine Kategorie
98
98
  title: Neue Debatte
99
- share:
100
- close_window: Fenster schließen
101
- share: Teilen
102
- share_link: Link teilen
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Neue Debatte bei %{link}</span>"
105
101
  models:
@@ -97,10 +97,6 @@ en:
97
97
  create: Create
98
98
  select_a_category: Please select a category
99
99
  title: New debate
100
- share:
101
- close_window: Close window
102
- share: Share
103
- share_link: Share link
104
100
  last_activity:
105
101
  new_debate_at_html: "<span>New debate at %{link}</span>"
106
102
  models:
@@ -96,10 +96,6 @@ es-MX:
96
96
  create: Crear
97
97
  select_a_category: Por favor, selecciona una categoría
98
98
  title: Nuevo debate
99
- share:
100
- close_window: Cerrar ventana
101
- share: Compartir
102
- share_link: Compartir enlace
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nuevo debate en %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ es-PY:
96
96
  create: Crear
97
97
  select_a_category: Por favor, selecciona una categoría
98
98
  title: Nuevo debate
99
- share:
100
- close_window: Cerrar ventana
101
- share: Compartir
102
- share_link: Compartir enlace
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nuevo debate en %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ es:
96
96
  create: Crear
97
97
  select_a_category: Por favor, selecciona una categoría
98
98
  title: Nuevo debate
99
- share:
100
- close_window: Cerrar la ventana
101
- share: Compartir
102
- share_link: Compartir enlace
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nuevo debate en %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ eu:
96
96
  create: Sortu
97
97
  select_a_category: Hautatu kategoria bat
98
98
  title: Berri eztabaida
99
- share:
100
- close_window: Itxi leihoa
101
- share: Share
102
- share_link: Partekatu esteka
103
99
  last_activity:
104
100
  new_debate_at_html: "<span> %{link}</span>eztabaida berria"
105
101
  models:
@@ -96,10 +96,6 @@ fi-pl:
96
96
  create: Luo
97
97
  select_a_category: Valitse aihepiiri
98
98
  title: Uusi keskustelu
99
- share:
100
- close_window: Sulje ikkuna
101
- share: Jaa
102
- share_link: Jaa linkki
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Uusi keskustelu osoitteessa %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ fi:
96
96
  create: Luo
97
97
  select_a_category: Valitse aihepiiri
98
98
  title: Uusi keskustelu
99
- share:
100
- close_window: Sulje ikkuna
101
- share: Jaa
102
- share_link: Jaa linkki
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Uusi keskustelu osoitteessa %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ fr:
96
96
  create: Créer
97
97
  select_a_category: Veuillez sélectionner une catégorie
98
98
  title: Nouveau débat
99
- share:
100
- close_window: Fermer la fenêtre
101
- share: Partager
102
- share_link: Lien de partage
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nouveau débat à %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ gl:
96
96
  create: Crear
97
97
  select_a_category: Selecciona unha categoría
98
98
  title: Novo debate
99
- share:
100
- close_window: Pechar ventá
101
- share: Comparte
102
- share_link: Compartir a ligazón
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Novo debate en %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ hu:
96
96
  create: Létrehozás
97
97
  select_a_category: Válassz kategóriát
98
98
  title: Új vita
99
- share:
100
- close_window: Ablak bezárása
101
- share: Megosztás
102
- share_link: Link megosztása
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Új vita %{link}</span>"
105
101
  models:
@@ -94,10 +94,6 @@ id:
94
94
  create: Membuat
95
95
  select_a_category: Silakan pilih kategori
96
96
  title: Debat baru
97
- share:
98
- close_window: Tutup jendela
99
- share: Bagikan
100
- share_link: Membagikan tautan
101
97
  last_activity:
102
98
  new_debate_at_html: "<span>Debat baru di %{link}</span>"
103
99
  models:
@@ -96,10 +96,6 @@ it:
96
96
  create: Creare
97
97
  select_a_category: Si prega di selezionare una categoria
98
98
  title: Nuovo dibattito
99
- share:
100
- close_window: Chiudi la finestra
101
- share: Condividere
102
- share_link: Condividi il link
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nuovo dibattito al %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ nl:
96
96
  create: Aanmaken
97
97
  select_a_category: Selecteer een categorie
98
98
  title: Nieuw debat
99
- share:
100
- close_window: Sluit venster
101
- share: Delen
102
- share_link: Link delen
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Nieuw debat op %{link}</span>"
105
101
  models:
@@ -100,10 +100,6 @@ pl:
100
100
  create: Stwórz
101
101
  select_a_category: Proszę wybierz kategorie
102
102
  title: Nowa debata
103
- share:
104
- close_window: Zamknij okno
105
- share: Dzielić
106
- share_link: Udostępnij link
107
103
  last_activity:
108
104
  new_debate_at_html: "<span>Nowa debata na %{link}</span>"
109
105
  models:
@@ -96,10 +96,6 @@ pt-BR:
96
96
  create: Criar
97
97
  select_a_category: Selecione uma categoria
98
98
  title: Novo debate
99
- share:
100
- close_window: Fechar janela
101
- share: Compartilhar
102
- share_link: Compartilhar link
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Novo debate em %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ pt:
96
96
  create: Crio
97
97
  select_a_category: Por favor, selecione uma categoria
98
98
  title: Novo debate
99
- share:
100
- close_window: Janela fechada
101
- share: Compartilhar
102
- share_link: Compartilhar link
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Novo debate em %{link}</span>"
105
101
  models:
@@ -100,10 +100,6 @@ ru:
100
100
  create: Создать
101
101
  select_a_category: Пожалуйста, выберите категорию
102
102
  title: Начать новое обсуждение
103
- share:
104
- close_window: Закрыть окно
105
- share: Поделиться
106
- share_link: Поделиться ссылкой
107
103
  models:
108
104
  debate:
109
105
  fields:
@@ -96,10 +96,6 @@ sv:
96
96
  create: Skapa
97
97
  select_a_category: Välj en kategori
98
98
  title: Ny debatt
99
- share:
100
- close_window: Stäng fönster
101
- share: Dela
102
- share_link: Dela länk
103
99
  last_activity:
104
100
  new_debate_at_html: "<span>Ny debatt i %{link}</span>"
105
101
  models:
@@ -96,10 +96,6 @@ tr:
96
96
  create: yaratmak
97
97
  select_a_category: Lütfen bir kategori seçin
98
98
  title: Yeni tartışma
99
- share:
100
- close_window: Pencereyi kapat
101
- share: Pay
102
- share_link: Linki paylaş
103
99
  last_activity:
104
100
  new_debate_at_html: "<span> %{link}</span>yeni tartışma"
105
101
  models:
@@ -100,10 +100,6 @@ uk:
100
100
  create: Започаткувати
101
101
  select_a_category: Будь ласка, виберіть категорію
102
102
  title: Додати обговорення
103
- share:
104
- close_window: Закрити вікно
105
- share: Поділитися
106
- share_link: Поділитись посиланням
107
103
  models:
108
104
  debate:
109
105
  fields:
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-debates version.
5
5
  module Debates
6
6
  def self.version
7
- "0.18.1"
7
+ "0.19.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-debates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -19,42 +19,42 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.18.1
22
+ version: 0.19.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.18.1
29
+ version: 0.19.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: decidim-core
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 0.18.1
36
+ version: 0.19.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - '='
42
42
  - !ruby/object:Gem::Version
43
- version: 0.18.1
43
+ version: 0.19.0
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: kaminari
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '1.0'
50
+ version: '1.1'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '1.0'
57
+ version: '1.1'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: searchlight
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -75,28 +75,28 @@ dependencies:
75
75
  requirements:
76
76
  - - '='
77
77
  - !ruby/object:Gem::Version
78
- version: 0.18.1
78
+ version: 0.19.0
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - '='
84
84
  - !ruby/object:Gem::Version
85
- version: 0.18.1
85
+ version: 0.19.0
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: decidim-dev
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - '='
91
91
  - !ruby/object:Gem::Version
92
- version: 0.18.1
92
+ version: 0.19.0
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - '='
98
98
  - !ruby/object:Gem::Version
99
- version: 0.18.1
99
+ version: 0.19.0
100
100
  description: A debates component for decidim's participatory spaces.
101
101
  email:
102
102
  - josepjaume@gmail.com
@@ -156,7 +156,6 @@ files:
156
156
  - app/views/decidim/debates/debates/_debates.html.erb
157
157
  - app/views/decidim/debates/debates/_filters.html.erb
158
158
  - app/views/decidim/debates/debates/_filters_small_view.html.erb
159
- - app/views/decidim/debates/debates/_share.html.erb
160
159
  - app/views/decidim/debates/debates/index.html.erb
161
160
  - app/views/decidim/debates/debates/index.js.erb
162
161
  - app/views/decidim/debates/debates/new.html.erb
@@ -1,33 +0,0 @@
1
- <div class="text-center">
2
- <button class="link text-center" data-open="processShare">
3
- <%= t(".share") %>
4
- <%= icon "share", class: "icon--after" %>
5
- </button>
6
- </div>
7
- <div class="reveal" id="processShare" data-reveal>
8
- <div class="reveal__header">
9
- <h3 class="reveal__title"><%= t(".share") %>:</h3>
10
- <button class="close-button" data-close aria-label="<%= t(".close_window") %>" type="button">
11
- <span aria-hidden="true">&times;</span>
12
- </button>
13
- </div>
14
- <div class="button-group text-center">
15
- <%= social_share_button_tag(content_for(:meta_title),
16
- url: content_for(:meta_url),
17
- image: content_for(:meta_image_url),
18
- desc: content_for(:meta_description),
19
- via: content_for(:twitter_handler)) %>
20
- <a class="button secondary" data-open="urlShare">
21
- <%= icon "link-intact" %>
22
- </a>
23
- </div>
24
- </div>
25
- <div class="reveal" id="urlShare" data-reveal>
26
- <div class="reveal__header">
27
- <h3 class="reveal__title"><%= t(".share_link") %>:</h3>
28
- <button class="close-button" data-close aria-label="<%= t(".close_window") %>" type="button">
29
- <span aria-hidden="true">&times;</span>
30
- </button>
31
- </div>
32
- <input type="text" value="<%= "#{content_for(:meta_url)}" %>" readonly />
33
- </div>