decidim-meetings 0.3.2 → 0.4.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
  SHA1:
3
- metadata.gz: c330c757c4af5ac77b71b800e9dfecaa43845fa0
4
- data.tar.gz: 263f7b2fe5528e4fe6cbe72968d18708bb33c4db
3
+ metadata.gz: 1e1935c7a65315c1f203a18c337507e81c0ee419
4
+ data.tar.gz: c07d382cb3c15ff98a223774c4ce887def22ec91
5
5
  SHA512:
6
- metadata.gz: '09b9f8e4321b70e5514c08721c926954e78a4595fd1b97a0924d73f8301e537ecf16fe978ecdc0fb5c8bf876e53509768d857388a6adce50eb7d976c9b98c337'
7
- data.tar.gz: aaa89f269b13853e5fc697a509a3b77a4440ad5e3128d1e0827a89c21dd61ca1d54cdc44a863fdbf839084119f54e016dd84411c45b97f55b17e2febb22f1c16
6
+ metadata.gz: c1947fb5ba43a959f61b98b196967ed6942ea5fad7c143cbdf566262c8329ce79726409751551bb43f0e070fa0bc092bb86bde1e8f0dd82ca93da5f5497ba580
7
+ data.tar.gz: fa2cf0e98814662052e6c935a4177f9c6a5bf4e7d4618334084ff521f91ccd25ac659600a0be5811f5b98bae25dfb1d8d4929e8d7e147a69b901a18740ff00d2
@@ -8,6 +8,7 @@ module Decidim
8
8
  include PaginateHelper
9
9
  include Decidim::MapHelper
10
10
  include Decidim::Meetings::MapHelper
11
+ include Decidim::Meetings::MeetingsHelper
11
12
  end
12
13
  end
13
14
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ # Custom helpers used in meetings views
6
+ module MeetingsHelper
7
+ include Decidim::ApplicationHelper
8
+ include Decidim::TranslationsHelper
9
+
10
+ # Public: truncates the meeting description
11
+ #
12
+ # meeting - a Decidim::Meeting instance
13
+ # max_length - a number to limit the length of the description
14
+ #
15
+ # Returns the meeting's description truncated.
16
+ def meeting_description(meeting, max_length = 120)
17
+ link = decidim_meetings.meeting_path(meeting, feature_id: meeting.feature, participatory_process_id: meeting.feature.participatory_process)
18
+ description = translated_attribute(meeting.description)
19
+ tail = "... #{link_to(t("read_more", scope: "decidim.meetings"), link)}".html_safe
20
+ CGI.unescapeHTML html_truncate(description, max_length: max_length, tail: tail)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -17,7 +17,7 @@
17
17
  <h5 class="card__title"><%= translated_attribute meeting.title %></h5>
18
18
  <% end %>
19
19
  <%= render partial: "datetime", locals: { meeting: meeting } %>
20
- <%== translated_attribute meeting.description %>
20
+ <%== meeting_description(meeting) %>
21
21
  <%= render partial: "tags", locals: { meeting: meeting } %>
22
22
  <div class="address card__extra">
23
23
  <div class="address__icon">
@@ -90,6 +90,7 @@ ca:
90
90
  map: Mapa
91
91
  start_time: Data d'inici
92
92
  title: Títol
93
+ read_more: "(Llegeix més)"
93
94
  resource_links:
94
95
  meetings_through_proposals:
95
96
  meeting_results: 'Resultats relacionats:'
@@ -51,7 +51,7 @@ en:
51
51
  index:
52
52
  title: Meetings
53
53
  new:
54
- create: Create
54
+ create: Create
55
55
  title: Create meeting
56
56
  update:
57
57
  invalid: There's been a problem updating this meeting
@@ -93,6 +93,7 @@ en:
93
93
  map: Map
94
94
  start_time: Start date
95
95
  title: Title
96
+ read_more: "(read more)"
96
97
  resource_links:
97
98
  meetings_through_proposals:
98
99
  meeting_results: 'Related results:'
@@ -90,6 +90,7 @@ es:
90
90
  map: Mapa
91
91
  start_time: Fecha de inicio
92
92
  title: Título
93
+ read_more: "(leer más)"
93
94
  resource_links:
94
95
  meetings_through_proposals:
95
96
  meeting_results: 'Resultados relacionados:'
@@ -10,7 +10,7 @@ fr:
10
10
  meeting:
11
11
  address: Adresse
12
12
  decidim_category_id: Catégorie
13
- decidim_scope_id: Domaine d'application
13
+ decidim_scope_id: Zone d'application
14
14
  description: Description
15
15
  end_time: Heure de fin
16
16
  location: Lieu
@@ -24,7 +24,7 @@ fr:
24
24
  meetings:
25
25
  actions:
26
26
  attachments: Documents liés
27
- close: Fermer
27
+ close: Clore
28
28
  confirm_destroy: Êtes-vous sûr de vouloir supprimer cette rencontre?
29
29
  destroy: Supprimer
30
30
  edit: Modifier
@@ -34,7 +34,7 @@ fr:
34
34
  admin:
35
35
  meeting_closes:
36
36
  edit:
37
- close: Fermer
37
+ close: Clore
38
38
  title: Clore la rencontre
39
39
  meetings:
40
40
  close:
@@ -64,7 +64,7 @@ fr:
64
64
  category_prompt: Sélectionner une catégorie
65
65
  date: Date
66
66
  past: Passées
67
- scopes: Domaines d'application
67
+ scopes: Zone d'application
68
68
  search: Rechercher
69
69
  upcoming: À venir
70
70
  filters_small_view:
@@ -95,5 +95,5 @@ fr:
95
95
  meeting_results: 'Résultats associés :'
96
96
  result_meetings: 'Rencontres connexes :'
97
97
  proposals_from_meeting:
98
- meeting_proposals: 'Propositions connexes :'
98
+ meeting_proposals: 'Propositions créées à cette rencontre :'
99
99
  proposal_meetings: 'Rencontre connexes :'
@@ -24,7 +24,7 @@ Decidim.register_feature(:meetings) do |feature|
24
24
  end
25
25
 
26
26
  feature.seeds do
27
- Decidim::ParticipatoryProcess.all.each do |process|
27
+ Decidim::ParticipatoryProcess.find_each do |process|
28
28
  next unless process.steps.any?
29
29
 
30
30
  feature = Decidim::Feature.create!(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-meetings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-06-19 00:00:00.000000000 Z
13
+ date: 2017-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.3.2
21
+ version: 0.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.3.2
28
+ version: 0.4.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rectify
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -116,56 +116,56 @@ dependencies:
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.3.2
119
+ version: 0.4.0
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.3.2
126
+ version: 0.4.0
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-proposals
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.3.2
133
+ version: 0.4.0
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '='
139
139
  - !ruby/object:Gem::Version
140
- version: 0.3.2
140
+ version: 0.4.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-admin
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.3.2
147
+ version: 0.4.0
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '='
153
153
  - !ruby/object:Gem::Version
154
- version: 0.3.2
154
+ version: 0.4.0
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: decidim-results
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.3.2
161
+ version: 0.4.0
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - '='
167
167
  - !ruby/object:Gem::Version
168
- version: 0.3.2
168
+ version: 0.4.0
169
169
  description: A meetings component for decidim's participatory processes.
170
170
  email:
171
171
  - josepjaume@gmail.com
@@ -193,6 +193,7 @@ files:
193
193
  - app/helpers/decidim/meetings/admin/application_helper.rb
194
194
  - app/helpers/decidim/meetings/application_helper.rb
195
195
  - app/helpers/decidim/meetings/map_helper.rb
196
+ - app/helpers/decidim/meetings/meetings_helper.rb
196
197
  - app/models/decidim/meetings/application_record.rb
197
198
  - app/models/decidim/meetings/meeting.rb
198
199
  - app/services/decidim/meetings/meeting_search.rb