decidim-meetings 0.14.4 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/app/assets/config/{admin/decidim_meetings_manifest.js → decidim_meetings_manifest.js} +1 -0
  4. data/app/assets/images/decidim/gamification/badges/attended_meetings.svg +106 -0
  5. data/app/cells/decidim/meetings/content_blocks/upcoming_events/show.erb +26 -0
  6. data/app/cells/decidim/meetings/content_blocks/upcoming_events_cell.rb +52 -0
  7. data/app/cells/decidim/meetings/meeting_activity_cell.rb +19 -0
  8. data/app/cells/decidim/meetings/meeting_cell.rb +6 -0
  9. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +1 -1
  10. data/app/cells/decidim/meetings/meeting_m/address.erb +1 -14
  11. data/app/cells/decidim/meetings/meeting_m_cell.rb +7 -3
  12. data/app/cells/decidim/meetings/meeting_s/show.erb +27 -0
  13. data/app/cells/decidim/meetings/meeting_s_cell.rb +31 -0
  14. data/app/cells/decidim/meetings/meetings_map/show.erb +33 -0
  15. data/app/cells/decidim/meetings/meetings_map_cell.rb +23 -0
  16. data/app/commands/decidim/meetings/admin/create_meeting.rb +12 -5
  17. data/app/commands/decidim/meetings/admin/update_meeting.rb +5 -2
  18. data/app/commands/decidim/meetings/join_meeting.rb +5 -0
  19. data/app/commands/decidim/meetings/leave_meeting.rb +5 -0
  20. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -0
  21. data/app/controllers/decidim/meetings/admin/registrations_controller.rb +1 -0
  22. data/app/controllers/decidim/meetings/directory/meetings_controller.rb +73 -0
  23. data/app/controllers/decidim/meetings/meetings_controller.rb +8 -6
  24. data/app/helpers/decidim/meetings/map_helper.rb +4 -3
  25. data/app/helpers/decidim/meetings/meeting_cells_helper.rb +0 -1
  26. data/app/helpers/decidim/meetings/meetings_helper.rb +1 -1
  27. data/app/mailers/decidim/meetings/admin/invite_join_meeting_mailer.rb +2 -0
  28. data/app/mailers/decidim/meetings/registration_mailer.rb +4 -2
  29. data/app/models/decidim/meetings/meeting.rb +3 -0
  30. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +6 -2
  31. data/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb +20 -0
  32. data/app/presenters/decidim/meetings/log/resource_presenter.rb +18 -0
  33. data/app/presenters/decidim/meetings/meeting_presenter.rb +40 -0
  34. data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +53 -0
  35. data/app/services/decidim/meetings/meeting_search.rb +8 -1
  36. data/app/views/decidim/meetings/admin/agenda/_form.html.erb +1 -1
  37. data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +2 -2
  38. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +3 -3
  39. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -2
  40. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +4 -4
  41. data/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -1
  42. data/app/views/decidim/meetings/directory/meetings/_meetings.html.erb +14 -0
  43. data/app/views/decidim/meetings/directory/meetings/index.html.erb +34 -0
  44. data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -0
  45. data/app/views/decidim/meetings/meeting_widgets/show.html.erb +1 -1
  46. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +2 -2
  47. data/app/views/decidim/meetings/meetings/index.html.erb +1 -33
  48. data/app/views/decidim/meetings/meetings/index.js.erb +1 -1
  49. data/app/views/decidim/meetings/meetings/show.html.erb +5 -5
  50. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +1 -1
  51. data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +1 -1
  52. data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +20 -0
  53. data/config/locales/ca.yml +37 -2
  54. data/config/locales/de.yml +37 -0
  55. data/config/locales/en.yml +37 -2
  56. data/config/locales/es-PY.yml +37 -2
  57. data/config/locales/es.yml +37 -2
  58. data/config/locales/eu.yml +37 -0
  59. data/config/locales/fi.yml +37 -2
  60. data/config/locales/fr.yml +37 -0
  61. data/config/locales/gl.yml +37 -0
  62. data/config/locales/hu.yml +37 -0
  63. data/config/locales/it.yml +37 -0
  64. data/config/locales/nl.yml +37 -0
  65. data/config/locales/pl.yml +37 -0
  66. data/config/locales/pt-BR.yml +37 -0
  67. data/config/locales/pt.yml +37 -0
  68. data/config/locales/ru.yml +1 -0
  69. data/config/locales/sv.yml +37 -0
  70. data/config/locales/uk.yml +1 -0
  71. data/db/migrate/20180809134748_add_upcoming_events_as_content_block.rb +27 -0
  72. data/lib/decidim/meetings/admin_engine.rb +0 -4
  73. data/lib/decidim/meetings/component.rb +30 -3
  74. data/lib/decidim/meetings/directory.rb +10 -0
  75. data/lib/decidim/meetings/directory_engine.rb +32 -0
  76. data/lib/decidim/meetings/engine.rb +38 -1
  77. data/lib/decidim/meetings/seeds/city.jpeg +0 -0
  78. data/lib/decidim/meetings/test/factories.rb +13 -12
  79. data/lib/decidim/meetings/version.rb +1 -1
  80. data/lib/decidim/meetings.rb +2 -1
  81. metadata +34 -14
@@ -6,8 +6,9 @@ module Decidim
6
6
  module MapHelper
7
7
  # Serialize a collection of geocoded meetings to be used by the dynamic map component
8
8
  #
9
- # geocoded_meetings - A collection of geocoded meetings
10
- def meetings_data_for_map(geocoded_meetings)
9
+ # meetings - A collection of meetings
10
+ def meetings_data_for_map(meetings)
11
+ geocoded_meetings = meetings.select(&:geocoded?)
11
12
  geocoded_meetings.map do |meeting|
12
13
  meeting.slice(:latitude, :longitude, :address).merge(title: translated_attribute(meeting.title),
13
14
  description: translated_attribute(meeting.description),
@@ -18,7 +19,7 @@ module Decidim
18
19
  icon: icon("meetings", width: 40, height: 70, remove_icon_class: true),
19
20
  location: translated_attribute(meeting.location),
20
21
  locationHints: translated_attribute(meeting.location_hints),
21
- link: meeting_path(meeting))
22
+ link: resource_locator(meeting).path)
22
23
  end
23
24
  end
24
25
  end
@@ -9,7 +9,6 @@ module Decidim
9
9
  include Decidim::Meetings::MeetingsHelper
10
10
  include Decidim::SanitizeHelper
11
11
  include Decidim::Meetings::Engine.routes.url_helpers
12
-
13
12
  def description
14
13
  decidim_sanitize meeting_description(model)
15
14
  end
@@ -16,7 +16,7 @@ module Decidim
16
16
  # Returns the meeting's description truncated.
17
17
  def meeting_description(meeting, max_length = 120)
18
18
  link = resource_locator(meeting).path
19
- description = translated_attribute(meeting.description)
19
+ description = present(meeting).description
20
20
  tail = "... #{link_to(t("read_more", scope: "decidim.meetings"), link)}".html_safe
21
21
  CGI.unescapeHTML html_truncate(description, max_length: max_length, tail: tail)
22
22
  end
@@ -8,9 +8,11 @@ module Decidim
8
8
  class InviteJoinMeetingMailer < Decidim::ApplicationMailer
9
9
  include Decidim::TranslationsHelper
10
10
  include Decidim::SanitizeHelper
11
+ include Decidim::ApplicationHelper
11
12
 
12
13
  helper Decidim::ResourceHelper
13
14
  helper Decidim::TranslationsHelper
15
+ helper Decidim::ApplicationHelper
14
16
 
15
17
  helper_method :routes
16
18
 
@@ -7,9 +7,11 @@ module Decidim
7
7
  class RegistrationMailer < Decidim::ApplicationMailer
8
8
  include Decidim::TranslationsHelper
9
9
  include ActionView::Helpers::SanitizeHelper
10
+ include Decidim::ApplicationHelper
10
11
 
11
12
  helper Decidim::ResourceHelper
12
13
  helper Decidim::TranslationsHelper
14
+ helper Decidim::ApplicationHelper
13
15
 
14
16
  def confirmation(user, meeting, registration)
15
17
  with_user(user) do
@@ -33,8 +35,8 @@ module Decidim
33
35
  calendar.event do |event|
34
36
  event.dtstart = Icalendar::Values::DateTime.new(@meeting.start_time)
35
37
  event.dtend = Icalendar::Values::DateTime.new(@meeting.end_time)
36
- event.summary = translated_attribute @meeting.title
37
- event.description = strip_tags(translated_attribute(@meeting.description))
38
+ event.summary = present(@meeting).title
39
+ event.description = strip_tags(present(@meeting).description)
38
40
  event.location = @meeting.address
39
41
  event.geo = [@meeting.latitude, @meeting.longitude]
40
42
  event.url = @locator.url
@@ -17,6 +17,7 @@ module Decidim
17
17
  include Decidim::Searchable
18
18
  include Decidim::Traceable
19
19
  include Decidim::Loggable
20
+ include Decidim::Hashtaggable
20
21
 
21
22
  belongs_to :organizer, foreign_key: "organizer_id", class_name: "Decidim::User", optional: true
22
23
  has_many :registrations, class_name: "Decidim::Meetings::Registration", foreign_key: "decidim_meeting_id", dependent: :destroy
@@ -41,6 +42,8 @@ module Decidim
41
42
  or private_meeting = ? or (private_meeting = ? and transparent = ?)", true, user, false, true, true).distinct
42
43
  }
43
44
 
45
+ scope :visible, -> { where("decidim_meetings_meetings.private_meeting != ? OR decidim_meetings_meetings.transparent = ?", true, true) }
46
+
44
47
  searchable_fields({
45
48
  scope_id: :decidim_scope_id,
46
49
  participatory_space: { component: :participatory_space },
@@ -15,6 +15,10 @@ module Decidim
15
15
  class MeetingPresenter < Decidim::Log::BasePresenter
16
16
  private
17
17
 
18
+ def resource_presenter
19
+ @resource_presenter ||= Decidim::Meetings::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
20
+ end
21
+
18
22
  def diff_fields_mapping
19
23
  {
20
24
  address: :string,
@@ -22,12 +26,12 @@ module Decidim
22
26
  attending_organizations: :string,
23
27
  closed_at: :date,
24
28
  closing_report: :i18n,
25
- description: :i18n,
29
+ description: "Decidim::Meetings::AdminLog::ValueTypes::MeetingTitleDescriptionPresenter",
26
30
  end_date: :date,
27
31
  location: :i18n,
28
32
  location_hints: :i18n,
29
33
  start_date: :date,
30
- title: :i18n,
34
+ title: "Decidim::Meetings::AdminLog::ValueTypes::MeetingTitleDescriptionPresenter",
31
35
  private_meeting: :boolean,
32
36
  transparent: :boolean,
33
37
  organizer_id: "Decidim::Meetings::AdminLog::ValueTypes::OrganizerPresenter"
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ module AdminLog
6
+ module ValueTypes
7
+ # This class presents the given value as a Decidim::Meetings::MeetingTitleBody. Check
8
+ # the `DefaultPresenter` for more info on how value presenters work.
9
+ class MeetingTitleDescriptionPresenter < Decidim::Log::ValueTypes::DefaultPresenter
10
+ def present
11
+ return unless value
12
+
13
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.translated_attribute(value))
14
+ renderer.render_without_link.html_safe
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ module Log
6
+ class ResourcePresenter < Decidim::Log::ResourcePresenter
7
+ private
8
+
9
+ # Private: Presents resource name.
10
+ #
11
+ # Returns an HTML-safe String.
12
+ def present_resource_name
13
+ Decidim::Meetings::MeetingPresenter.new(resource).title
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ #
6
+ # Decorator for meetings
7
+ #
8
+ class MeetingPresenter < SimpleDelegator
9
+ include Decidim::TranslationsHelper
10
+
11
+ def meeting
12
+ __getobj__
13
+ end
14
+
15
+ def title
16
+ return unless meeting
17
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_attribute(meeting.title))
18
+ renderer.render_without_link.html_safe
19
+ end
20
+
21
+ def html_title
22
+ return unless meeting
23
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_attribute(meeting.title))
24
+ renderer.render.html_safe
25
+ end
26
+
27
+ def description
28
+ return unless meeting
29
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_attribute(meeting.description))
30
+ renderer.render_without_link.html_safe
31
+ end
32
+
33
+ def html_description
34
+ return unless meeting
35
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_attribute(meeting.description))
36
+ renderer.render.html_safe
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Meetings
5
+ module Metrics
6
+ class MeetingsMetricManage < Decidim::MetricManage
7
+ def metric_name
8
+ "meetings"
9
+ end
10
+
11
+ def save
12
+ return @registry if @registry
13
+
14
+ @registry = []
15
+ cumulative.each do |key, cumulative_value|
16
+ next if cumulative_value.zero?
17
+ quantity_value = quantity[key] || 0
18
+ category_id, space_type, space_id = key
19
+ record = Decidim::Metric.find_or_initialize_by(day: @day.to_s, metric_type: @metric_name,
20
+ organization: @organization, decidim_category_id: category_id,
21
+ participatory_space_type: space_type, participatory_space_id: space_id)
22
+ record.assign_attributes(cumulative: cumulative_value, quantity: quantity_value)
23
+ @registry << record
24
+ end
25
+ @registry.each(&:save!)
26
+ @registry
27
+ end
28
+
29
+ private
30
+
31
+ def query
32
+ return @query if @query
33
+
34
+ spaces = Decidim.participatory_space_manifests.flat_map do |manifest|
35
+ manifest.participatory_spaces.call(@organization).public_spaces
36
+ end
37
+ components = Decidim::Component.where(participatory_space: spaces).published
38
+ @query = Decidim::Meetings::Meeting.where(component: components).joins(:component)
39
+ .left_outer_joins(:category).visible
40
+ @query = @query.where("decidim_meetings_meetings.created_at <= ?", end_time)
41
+ @query = @query.group("decidim_categorizations.decidim_category_id",
42
+ :participatory_space_type,
43
+ :participatory_space_id)
44
+ @query
45
+ end
46
+
47
+ def quantity
48
+ @quantity ||= query.where("decidim_meetings_meetings.created_at >= ?", start_time).count
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -11,7 +11,8 @@ module Decidim
11
11
  # page - The page number to paginate the results.
12
12
  # per_page - The number of proposals to return per page.
13
13
  def initialize(options = {})
14
- super(Meeting.all, options)
14
+ scope = options.fetch(:scope, Meeting.all)
15
+ super(scope, options)
15
16
  end
16
17
 
17
18
  # Handle the search_text filter
@@ -30,6 +31,12 @@ module Decidim
30
31
  end
31
32
  end
32
33
 
34
+ def search_space
35
+ return query if options[:space].blank? || options[:space] == "all"
36
+
37
+ query.joins(:component).where(decidim_components: { participatory_space_type: options[:space].classify })
38
+ end
39
+
33
40
  private
34
41
 
35
42
  # Internal: builds the needed query to search for a text in the organization's
@@ -3,7 +3,7 @@
3
3
  <h2 class="card-title">
4
4
  <div class="flex--sbc">
5
5
  <div class="grid-x align-middle">
6
- <u> <%= translated_attribute(meeting.title) %> </u> &nbsp;<%= icon "arrow-right" %>&nbsp;<%= title %>
6
+ <u> <%= present(@meeting).title %> </u> &nbsp;<%= icon "arrow-right" %>&nbsp;<%= title %>
7
7
  </div>
8
8
  </div>
9
9
  </h2>
@@ -4,5 +4,5 @@
4
4
  <%= t ".invited_you_to_join_a_meeting", invited_by: @invited_by.name, application: @user.organization.name %>
5
5
  </p>
6
6
 
7
- <p><%= link_to t(".decline", meeting_title: translated_attribute(@meeting.title)),routes.decline_invitation_meeting_registration_path(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
8
- <p><%= link_to t(".join", meeting_title: translated_attribute(@meeting.title)),routes.meeting_registration_url(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
7
+ <p><%= link_to t(".decline", meeting_title: present(@meeting).title),routes.decline_invitation_meeting_registration_path(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
8
+ <p><%= link_to t(".join", meeting_title: present(@meeting).title),routes.meeting_registration_url(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
@@ -24,9 +24,9 @@
24
24
  <div class="row column">
25
25
  <% if @form.proposals %>
26
26
  <%= form.select :proposal_ids,
27
- @form.proposals.order(title: :asc).pluck(:title, :id),
28
- { include_blank: true },
29
- { multiple: true, class: "chosen-select" } %>
27
+ @form.proposals.order(title: :asc).map{|proposal| [present(proposal).title, proposal.id]},
28
+ { include_blank: true },
29
+ { multiple: true, class: "chosen-select" } %>
30
30
  <% end %>
31
31
  </div>
32
32
  </div>
@@ -5,11 +5,11 @@
5
5
 
6
6
  <div class="card-section">
7
7
  <div class="row column">
8
- <%= form.translated :text_field, :title, autofocus: true %>
8
+ <%= form.translated :text_field, :title, autofocus: true, value: present(@meeting).title %>
9
9
  </div>
10
10
 
11
11
  <div class="row column">
12
- <%= form.translated :editor, :description %>
12
+ <%= form.translated :editor, :description, value: present(@meeting).description %>
13
13
  </div>
14
14
 
15
15
  <div class="row column">
@@ -3,12 +3,12 @@
3
3
  <h2 class="card-title"><%= title %></h2>
4
4
  </div>
5
5
  <div class="card-section">
6
- <div class="row column">
7
- <%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true %>
6
+ <div class="row column hashtags__container">
7
+ <%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, value: @meeting.present? ? present(@meeting).title : "" %>
8
8
  </div>
9
9
 
10
- <div class="row column">
11
- <%= form.translated :editor, :description, class: "js-hashtags", hashtaggable: true %>
10
+ <div class="row column hashtags__container">
11
+ <%= form.translated :editor, :description, class: "js-hashtags", hashtaggable: true, value: @meeting.present? ? present(@meeting).title : "" %>
12
12
  </div>
13
13
 
14
14
  <div class="row column">
@@ -25,7 +25,7 @@
25
25
  <% meetings.each do |meeting| %>
26
26
  <tr data-id="<%= meeting.id %>">
27
27
  <td>
28
- <%= translated_attribute(meeting.title) %><br />
28
+ <%= present(meeting).title %><br />
29
29
  </td>
30
30
  <td>
31
31
  <% if meeting.start_time %>
@@ -0,0 +1,14 @@
1
+ <% if meetings.length == 0 %>
2
+ <div class="callout warning">
3
+ <%= t "decidim.meetings.meetings.meetings.no_meetings_warning" %>
4
+ </div>
5
+ <% else %>
6
+ <%= render partial: "decidim/shared/results_per_page" %>
7
+
8
+ <div class="row small-up-1 medium-up-2 card-grid">
9
+ <% meetings.each do |meeting| %>
10
+ <%= card_for meeting %>
11
+ <% end %>
12
+ </div>
13
+ <%= decidim_paginate meetings, order_start_time: params[:order_start_time], scope_id: params[:scope_id] %>
14
+ <% end %>
@@ -0,0 +1,34 @@
1
+ <div class="wrapper">
2
+ <div class="row">
3
+ <h1 class="section-heading"><%= t(".meetings") %></h1>
4
+
5
+ <%= cell "decidim/meetings/meetings_map", search.results %>
6
+
7
+ <div class="columns mediumlarge-4 large-3">
8
+ <div class="card card--secondary show-for-mediumlarge">
9
+ <%= filter_form_for filter, meetings_directory.root_path do |form| %>
10
+ <div class="filters__section">
11
+ <div class="filters__search">
12
+ <div class="input-group">
13
+ <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search") %>
14
+ <div class="input-group-button">
15
+ <button type="submit" class="button button--muted">
16
+ <%= icon "magnifying-glass", aria_label: t(".search") %>
17
+ </button>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <%= form.collection_radio_buttons :date, [["upcoming", t(".upcoming")], ["past", t(".past")]], :first, :last, legend_title: t(".date") %>
24
+ <%= form.collection_radio_buttons :space, @meeting_spaces, :first, :last, legend_title: t(".space_type") %>
25
+ <% end %>
26
+ </div>
27
+ </div>
28
+ <div id="meetings" class="columns mediumlarge-8 large-9">
29
+ <%= render partial: "meetings" %>
30
+ </div>
31
+ </div>
32
+ </div>
33
+
34
+ <%= javascript_include_tag("decidim/filters") %>
@@ -0,0 +1,11 @@
1
+ var $meetings = $('#meetings');
2
+
3
+ $meetings.html('<%= j(render partial: "meetings").strip.html_safe %>');
4
+
5
+ var $dropdownMenu = $('.dropdown.menu', $meetings);
6
+ $dropdownMenu.foundation();
7
+
8
+ window.Decidim.currentMap = window.Decidim.loadMap(
9
+ 'map',
10
+ JSON.parse('<%= escape_javascript meetings_data_for_map(search.results).to_json.html_safe %>')
11
+ );
@@ -1,4 +1,4 @@
1
- <%= content_for(:title, translated_attribute(model.title)) %>
1
+ <%= content_for(:title, present(model).title) %>
2
2
  <%= render partial: "decidim/meetings/meetings/datetime", locals: { meeting: model } %>
3
3
  <%= decidim_sanitize meeting_description(model) %>
4
4
  <div class="address card__extra">
@@ -4,7 +4,7 @@
4
4
  <article class="card card--meeting">
5
5
  <div class="card__content">
6
6
  <%= link_to resource_locator(meeting).path, class: "card__link" do %>
7
- <h5 class="card__title"><%= translated_attribute meeting.title %></h5>
7
+ <h5 class="card__title"><%= present(meeting).title %></h5>
8
8
  <% end %>
9
9
  <div class="card__datetime">
10
10
  <div class="card__datetime__date">
@@ -14,7 +14,7 @@
14
14
  <%= meeting.start_time.strftime("%H:%M") %> - <%= meeting.end_time.strftime("%H:%M") %>
15
15
  </div>
16
16
  </div>
17
- <%= decidim_sanitize translated_attribute meeting.description %>
17
+ <%= decidim_sanitize( present(meeting).description ) %>
18
18
  </div>
19
19
  </article>
20
20
  </div>
@@ -1,38 +1,6 @@
1
1
  <%= render partial: "decidim/shared/component_announcement" %>
2
2
 
3
- <%= dynamic_map_for meetings_data_for_map(geocoded_meetings) do %>
4
- <template id="marker-popup">
5
- <div class="map-info__content">
6
- <h3>${title}</h3>
7
- <div id="bodyContent">
8
- <p>{{html description}}</p>
9
- <div class="map__date-adress">
10
- <div class="card__datetime">
11
- <div class="card__datetime__date">
12
- ${startTimeDay} <span class="card__datetime__month">${startTimeMonth} ${startTimeYear}</span>
13
- </div>
14
- <div class="card__datetime__time">${starTime}</div>
15
- </div>
16
- <div class="address card__extra">
17
- <div class="address__icon">{{html icon}}</div>
18
- <div class="address__details">
19
- <strong>{{html location}}</strong><br />
20
- <span>${address}</span><br />
21
- <span>{{html locationHints}}</span>
22
- </div>
23
- </div>
24
- </div>
25
- <div class="map-info__button">
26
- <a href="${link}" class="button button--sc">
27
- <%= t(".view_meeting") %>
28
- </a>
29
- </div>
30
- </div>
31
- </div>
32
- </template>
33
- <%= stylesheet_link_tag "decidim/map" %>
34
- <%= javascript_include_tag "decidim/map" %>
35
- <% end %>
3
+ <%= cell "decidim/meetings/meetings_map", search.results %>
36
4
 
37
5
  <div class="row">
38
6
  <div class="columns mediumlarge-4 large-3">
@@ -7,5 +7,5 @@ $dropdownMenu.foundation();
7
7
 
8
8
  window.Decidim.currentMap = window.Decidim.loadMap(
9
9
  'map',
10
- JSON.parse('<%= escape_javascript meetings_data_for_map(geocoded_meetings).to_json.html_safe %>')
10
+ JSON.parse('<%= escape_javascript meetings_data_for_map(search.results.select(&:geocoded?)).to_json.html_safe %>')
11
11
  );
@@ -1,8 +1,8 @@
1
- <% provide(:title, translated_attribute(meeting.title)) %>
1
+ <% provide(:title, present(meeting).title) %>
2
2
 
3
3
  <% add_decidim_meta_tags({
4
- title: translated_attribute(meeting.title),
5
- description: translated_attribute(meeting.description),
4
+ title: present(meeting).title,
5
+ description: present(meeting).description,
6
6
  url: meeting_url(meeting.id)
7
7
  }) %>
8
8
 
@@ -16,7 +16,7 @@ edit_link(
16
16
  %>
17
17
 
18
18
  <div class="row column view-header">
19
- <h2 class="heading2"><%= translated_attribute meeting.title %></h2>
19
+ <h2 class="heading2"><%= present(meeting).html_title %></h2>
20
20
  <% if meeting.organizer.present? %>
21
21
  <%= render partial: "decidim/shared/author_reference", locals: { author: present(meeting.organizer) } %>
22
22
  <% end %>
@@ -92,7 +92,7 @@ edit_link(
92
92
  <%= t("transparent", scope: "decidim.meetings.types") %>
93
93
  </span>
94
94
  <% end %>
95
- <p><%= decidim_sanitize translated_attribute meeting.description %></p>
95
+ <p><%= decidim_sanitize(present(meeting).html_description) %></p>
96
96
  <%= render partial: "decidim/shared/static_map", locals: { icon_name: "meetings", geolocalizable: meeting } %>
97
97
  <%= render partial: "decidim/shared/tags", locals: { resource: meeting, tags_class_extra: "tags--meeting" } %>
98
98
  </div>
@@ -1,4 +1,4 @@
1
- <p><%= t(".confirmed_html", title: translated_attribute(@meeting.title), url: @locator.url) %></p>
1
+ <p><%= t(".confirmed_html", title: present(@meeting).title, url: @locator.url) %></p>
2
2
 
3
3
  <p><%= t(".registration_code", code: @registration.code) %></p>
4
4
 
@@ -2,7 +2,7 @@
2
2
  <article class="card card--meeting">
3
3
  <div class="card__content">
4
4
  <%= link_to resource_locator(meeting).path, class: "card__link" do %>
5
- <h5 class="card__title"><%= translated_attribute meeting.title %></h5>
5
+ <h5 class="card__title"><%= present(meeting).title %></h5>
6
6
  <% end %>
7
7
  <%= render partial: "decidim/meetings/meetings/datetime", locals: { meeting: meeting } %>
8
8
  </div>
@@ -0,0 +1,20 @@
1
+ <% if meetings.any? %>
2
+ <hr class="reset mt-none mb-m" />
3
+ <section class="section" id="venues">
4
+ <h4 class="section-heading"><%= t("conference_venues", scope: "decidim.meetings") %></h4>
5
+ <div class="row">
6
+ <div class="column medium-4">
7
+ <% meetings.each do |meeting_block| %>
8
+ <% meeting_block.last.each_with_index do |meeting, index| %>
9
+ <% next if index != 0 %>
10
+ <%== cell("decidim/conferences/conference_address", meeting) %>
11
+ <% end %>
12
+ <% end %>
13
+
14
+ </div>
15
+ <div class="column medium-8">
16
+ <%= cell "decidim/meetings/meetings_map", meetings_geocoded %>
17
+ </div>
18
+ </div>
19
+ </section>
20
+ <% end %>
@@ -20,6 +20,7 @@ ca:
20
20
  end_time: Hora de finalització
21
21
  location: Ubicació
22
22
  location_hints: Detalls d'ubicació
23
+ organizer_id: Organitzador
23
24
  private_meeting: Trobada privada
24
25
  registration_terms: Termes i condicions de l'inscripció
25
26
  registrations_enabled: Inscripcions obertes
@@ -121,6 +122,18 @@ ca:
121
122
  email_outro: Has rebut aquesta notificació perquè estàs seguint la trobada "%{resource_title}". Pots deixar-la de seguir des de l'enllaç anterior.
122
123
  email_subject: En menys de 48 hores s'iniciarà la trobada "%{resource_title}".
123
124
  notification_title: La trobada <a href="%{resource_path}">%{resource_title}</a> començarà en menys de 48 hores.
125
+ gamification:
126
+ badges:
127
+ attended_meetings:
128
+ conditions:
129
+ - Inscriu-te a les reunions que vulguis assistir
130
+ description: Aquest distintiu s'aconsegueix assistint a diverses reunions presencials.
131
+ description_another: Aquest usuari ha assistit a %{score} trobades.
132
+ description_own: Has assistit a %{score} trobades.
133
+ name: Torbades a les que has assistit
134
+ next_level_in: Assisteix a més de %{score} reunions per arribar al següent nivell!
135
+ unearned_another: Aquest usuari encara no ha assistit a cap reunió.
136
+ unearned_own: Encara no has assistit a cap reunió.
124
137
  meetings:
125
138
  actions:
126
139
  agenda: Ordre del dia
@@ -284,6 +297,24 @@ ca:
284
297
  minutes:
285
298
  create: "%{user_name} ha creat l'acta de la reunió %{resource_name} a l'espai %{space_name}"
286
299
  update: "%{user_name} va ha actualitzat l'acta de la reunió %{resource_name} a l'espai %{space_name}"
300
+ conference_venues: Seus de les jornades
301
+ content_blocks:
302
+ upcoming_events:
303
+ name: Propers esdeveniments
304
+ upcoming_events: Properes reunions
305
+ view_all_events: Veure-ho tot
306
+ directory:
307
+ meetings:
308
+ index:
309
+ all: Totes
310
+ date: Data
311
+ meetings: Trobades
312
+ past: Passades
313
+ search: Cercar
314
+ space_type: Espai participatiu
315
+ upcoming: Properes
316
+ last_activity:
317
+ new_meeting_at_html: "<span>Nova trobada a %{link}</span>"
287
318
  mailer:
288
319
  invite_join_meeting_mailer:
289
320
  invite:
@@ -306,8 +337,6 @@ ca:
306
337
  filter: Filtra
307
338
  filter_by: Filtra per
308
339
  unfold: Desplegar
309
- index:
310
- view_meeting: Veure trobada
311
340
  meeting_minutes:
312
341
  meeting_minutes: Minuts de trobada
313
342
  related_information: Informació relacionada
@@ -329,6 +358,8 @@ ca:
329
358
  one: 1 espai reservat restant
330
359
  other: "%{count} inscripcions restants"
331
360
  view: Veure
361
+ meetings_map:
362
+ view_meeting: Veure trobada
332
363
  models:
333
364
  invite:
334
365
  fields:
@@ -366,6 +397,10 @@ ca:
366
397
  types:
367
398
  private_meeting: Trobada privada
368
399
  transparent: Transparent
400
+ metrics:
401
+ meetings:
402
+ object: trobades
403
+ title: Trobades
369
404
  participatory_processes:
370
405
  participatory_process_groups:
371
406
  highlighted_meetings: