decidim-core 0.13.1 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/config/decidim_core_manifest.js +1 -1
- data/app/assets/images/decidim/gamification/badges/invitations.svg +117 -0
- data/app/assets/javascripts/decidim.js.es6 +4 -1
- data/app/assets/javascripts/decidim/ajax_modals.js.es6 +17 -0
- data/app/assets/javascripts/decidim/conferences.js.es6 +16 -0
- data/app/assets/javascripts/decidim/input_hashtags.js.es6 +115 -0
- data/app/assets/javascripts/decidim/input_mentions.js.es6 +2 -3
- data/app/assets/javascripts/decidim/vizzs/areachart.js.es6 +226 -0
- data/app/assets/javascripts/decidim/vizzs/metrics.js.es6 +26 -0
- data/app/assets/javascripts/decidim/vizzs/orgchart.js.es6 +701 -0
- data/app/assets/javascripts/decidim/vizzs/renders.js.es6 +11 -0
- data/app/assets/stylesheets/decidim/extras/_proposal_form.scss +3 -1
- data/app/assets/stylesheets/decidim/layouts/_home.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_areachart.scss +74 -0
- data/app/assets/stylesheets/decidim/modules/_badges.scss +116 -0
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +5 -0
- data/app/assets/stylesheets/decidim/modules/_cards.scss +21 -4
- data/app/assets/stylesheets/decidim/modules/_chart-tooltip.scss +42 -0
- data/app/assets/stylesheets/decidim/modules/_collapsible-list.scss +12 -8
- data/app/assets/stylesheets/decidim/modules/_conference-nav.scss +31 -0
- data/app/assets/stylesheets/decidim/modules/_conference-programme.scss +110 -0
- data/app/assets/stylesheets/decidim/modules/_conference-speaker.scss +86 -0
- data/app/assets/stylesheets/decidim/modules/_conversation.scss +58 -0
- data/app/assets/stylesheets/decidim/modules/_help.scss +38 -0
- data/app/assets/stylesheets/decidim/modules/_hover-section.scss +29 -0
- data/app/assets/stylesheets/decidim/modules/_icons.scss +10 -4
- data/app/assets/stylesheets/decidim/modules/_input-hashtags.scss +124 -0
- data/app/assets/stylesheets/decidim/modules/_loading-spinner.scss +12 -0
- data/app/assets/stylesheets/decidim/modules/_margins.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_modules.scss +15 -0
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +9 -0
- data/app/assets/stylesheets/decidim/modules/_orgchart.scss +62 -0
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_typography.scss +9 -0
- data/app/assets/stylesheets/decidim/utils/_helpers.scss +28 -0
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +63 -0
- data/app/cells/decidim/author/withdraw.erb +1 -1
- data/app/cells/decidim/author_cell.rb +1 -1
- data/app/cells/decidim/badge/show.erb +36 -0
- data/app/cells/decidim/badge_cell.rb +53 -0
- data/app/cells/decidim/badges/show.erb +6 -0
- data/app/cells/decidim/badges_cell.rb +14 -0
- data/app/cells/decidim/card_m/header.erb +1 -1
- data/app/cells/decidim/card_m/show.erb +1 -2
- data/app/cells/decidim/card_m/top.erb +7 -0
- data/app/cells/decidim/card_m_cell.rb +14 -17
- data/app/cells/decidim/coauthorships_cell.rb +77 -0
- data/app/cells/decidim/collapsible_authors/show.erb +0 -1
- data/app/cells/decidim/collapsible_authors_cell.rb +4 -4
- data/app/cells/decidim/collapsible_list/show.erb +12 -4
- data/app/cells/decidim/collapsible_list_cell.rb +14 -12
- data/app/cells/decidim/content_blocks/footer_sub_hero/show.erb +14 -0
- data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +12 -0
- data/app/{views/decidim/pages/home/_hero.html.erb → cells/decidim/content_blocks/hero/show.erb} +4 -4
- data/app/cells/decidim/content_blocks/hero_cell.rb +25 -0
- data/app/cells/decidim/content_blocks/hero_settings_form/show.erb +7 -0
- data/app/cells/decidim/content_blocks/hero_settings_form_cell.rb +13 -0
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +24 -0
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +16 -0
- data/app/{views/decidim/pages/home/_extended.html.erb → cells/decidim/content_blocks/how_to_participate/show.erb} +10 -10
- data/app/cells/decidim/content_blocks/how_to_participate_cell.rb +9 -0
- data/app/{views/decidim/pages/home/_statistics.html.erb → cells/decidim/content_blocks/stats/show.erb} +2 -2
- data/app/cells/decidim/content_blocks/stats_cell.rb +18 -0
- data/app/{views/decidim/pages/home/_sub_hero.html.erb → cells/decidim/content_blocks/sub_hero/show.erb} +2 -2
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +17 -0
- data/app/cells/decidim/conversation/show.erb +18 -0
- data/app/cells/decidim/conversation_cell.rb +23 -0
- data/app/cells/decidim/conversation_header/show.erb +17 -0
- data/app/cells/decidim/conversation_header_cell.rb +16 -0
- data/app/cells/decidim/conversations/show.erb +45 -0
- data/app/cells/decidim/conversations_cell.rb +24 -0
- data/app/cells/decidim/follow_button/show.erb +3 -3
- data/app/cells/decidim/follow_button_cell.rb +1 -5
- data/app/cells/decidim/following_cell.rb +1 -7
- data/app/cells/decidim/message/show.erb +15 -0
- data/app/cells/decidim/message_cell.rb +23 -0
- data/app/cells/decidim/new_conversation/show.erb +19 -0
- data/app/cells/decidim/new_conversation_cell.rb +19 -0
- data/app/cells/decidim/notifications/show.erb +1 -1
- data/app/cells/decidim/profile/show.erb +27 -0
- data/app/cells/decidim/profile_cell.rb +33 -0
- data/app/cells/decidim/profile_sidebar/show.erb +57 -0
- data/app/cells/decidim/profile_sidebar_cell.rb +31 -0
- data/app/cells/decidim/tos_page_cell.rb +0 -4
- data/app/cells/decidim/user_profile/header.erb +1 -1
- data/app/controllers/concerns/decidim/action_authorization.rb +13 -38
- data/app/controllers/concerns/decidim/needs_permission.rb +15 -6
- data/app/controllers/decidim/application_controller.rb +1 -0
- data/app/controllers/decidim/authorization_modals_controller.rb +35 -0
- data/app/controllers/decidim/components/base_controller.rb +0 -1
- data/app/controllers/decidim/devise/invitations_controller.rb +2 -1
- data/app/controllers/decidim/messaging/conversations_controller.rb +2 -11
- data/app/controllers/decidim/newsletters_controller.rb +4 -6
- data/app/controllers/decidim/notifications_controller.rb +4 -0
- data/app/controllers/decidim/pages_controller.rb +3 -7
- data/app/controllers/decidim/profiles_controller.rb +17 -7
- data/app/forms/decidim/notifications_settings_form.rb +1 -1
- data/app/forms/decidim/registration_form.rb +1 -1
- data/app/helpers/decidim/action_authorization_helper.rb +51 -46
- data/app/helpers/decidim/application_helper.rb +18 -0
- data/app/helpers/decidim/card_helper.rb +1 -1
- data/app/helpers/decidim/cells_helper.rb +6 -2
- data/app/helpers/decidim/resource_helper.rb +8 -1
- data/app/helpers/decidim/searches_helper.rb +5 -4
- data/app/helpers/decidim/traceability_helper.rb +5 -1
- data/app/models/decidim/authorization.rb +2 -2
- data/app/models/decidim/content_block.rb +144 -0
- data/app/models/decidim/gamification/badge_score.rb +13 -0
- data/app/models/decidim/messaging/message.rb +1 -1
- data/app/models/decidim/messaging/receipt.rb +1 -1
- data/app/models/decidim/organization.rb +1 -5
- data/app/models/decidim/resource_permission.rb +8 -0
- data/app/models/decidim/searchable_resource.rb +1 -1
- data/app/models/decidim/user.rb +17 -1
- data/app/permissions/decidim/default_permissions.rb +4 -3
- data/app/permissions/decidim/permissions.rb +33 -1
- data/app/presenters/decidim/hashtag_presenter.rb +32 -0
- data/app/presenters/decidim/resource_locator_presenter.rb +13 -0
- data/app/presenters/decidim/user_presenter.rb +1 -1
- data/app/queries/decidim/messaging/user_conversations.rb +1 -1
- data/app/resolvers/decidim/hashtags_resolver.rb +15 -0
- data/app/services/decidim/action_authorizer.rb +9 -8
- data/app/types/decidim/core/date_time_type.rb +1 -1
- data/app/types/decidim/core/hashtag_type.rb +13 -0
- data/app/uploaders/decidim/homepage_image_uploader.rb +1 -1
- data/app/uploaders/decidim/image_uploader.rb +1 -0
- data/app/views/decidim/authorization_modals/show.html.erb +32 -0
- data/app/views/decidim/messaging/conversations/create.js.erb +1 -1
- data/app/views/decidim/messaging/conversations/index.html.erb +1 -51
- data/app/views/decidim/messaging/conversations/new.html.erb +1 -5
- data/app/views/decidim/messaging/conversations/show.html.erb +1 -9
- data/app/views/decidim/messaging/conversations/update.js.erb +1 -1
- data/app/views/decidim/notifications/index.html.erb +1 -0
- data/app/views/decidim/pages/decidim_page.html.erb +9 -0
- data/app/views/decidim/pages/home.html.erb +12 -16
- data/app/views/decidim/pages/index.html.erb +8 -0
- data/app/views/decidim/profiles/_user_follow.erb +2 -2
- data/app/views/decidim/profiles/show.html.erb +1 -37
- data/app/views/decidim/searches/_results.html.erb +1 -1
- data/app/views/decidim/shared/_author_reference.html.erb +1 -1
- data/app/views/decidim/shared/_authorization_modal.html.erb +1 -0
- data/app/views/decidim/shared/_tags.html.erb +1 -1
- data/app/views/kaminari/decidim/_page.html.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +6 -1
- data/app/views/layouts/decidim/_edit_link.html.erb +8 -0
- data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
- data/app/views/layouts/decidim/_user_menu.html.erb +2 -2
- data/app/views/layouts/decidim/_wrapper.html.erb +14 -1
- data/config/initializers/carrierwave.rb +15 -0
- data/config/locales/ca.yml +78 -30
- data/config/locales/en.yml +78 -30
- data/config/locales/es-PY.yml +78 -30
- data/config/locales/es.yml +78 -30
- data/config/locales/eu.yml +78 -30
- data/config/locales/fi.yml +262 -214
- data/config/locales/fr.yml +78 -30
- data/config/locales/gl.yml +78 -30
- data/config/locales/hu.yml +781 -0
- data/config/locales/it.yml +78 -30
- data/config/locales/nl.yml +78 -30
- data/config/locales/pl.yml +78 -30
- data/config/locales/pt-BR.yml +106 -58
- data/config/locales/pt.yml +78 -30
- data/config/locales/ru.yml +52 -32
- data/config/locales/sv.yml +183 -135
- data/config/locales/uk.yml +60 -40
- data/config/routes.rb +8 -6
- data/db/migrate/20180705091019_create_decidim_resource_permissions.rb +12 -0
- data/db/migrate/20180706104107_add_nickname_to_managed_users.rb +14 -0
- data/db/migrate/20180706111847_fix_result_follows.rb +9 -0
- data/db/migrate/20180724103814_add_content_blocks.rb +22 -0
- data/db/migrate/20180726112510_create_decidim_hashtags.rb +17 -0
- data/db/migrate/20180730071851_add_core_content_blocks.rb +28 -0
- data/db/migrate/20180802132147_rename_content_block_options_to_settings.rb +7 -0
- data/db/migrate/20180806095628_add_badge_scores.rb +11 -0
- data/db/migrate/20180808135006_add_images_to_content_blocks.rb +7 -0
- data/db/migrate/20180810092428_move_organization_fields_to_hero_content_block.rb +23 -0
- data/db/seeds.rb +10 -2
- data/lib/decidim/api/authorable_interface.rb +1 -1
- data/lib/decidim/coauthorable.rb +1 -0
- data/lib/decidim/content_block_manifest.rb +58 -0
- data/lib/decidim/content_block_registry.rb +87 -0
- data/lib/decidim/content_parsers.rb +1 -0
- data/lib/decidim/content_parsers/hashtag_parser.rb +36 -0
- data/lib/decidim/content_processor.rb +11 -0
- data/lib/decidim/content_renderers.rb +1 -0
- data/lib/decidim/content_renderers/hashtag_renderer.rb +43 -0
- data/lib/decidim/core.rb +28 -6
- data/lib/decidim/core/api.rb +1 -0
- data/lib/decidim/core/engine.rb +52 -1
- data/lib/decidim/core/test.rb +3 -0
- data/lib/decidim/core/test/factories.rb +32 -17
- data/lib/decidim/core/test/shared_examples/authorable_interface_examples.rb +10 -0
- data/lib/decidim/core/test/shared_examples/coauthorable.rb +3 -0
- data/lib/decidim/core/test/shared_examples/edit_link_shared_examples.rb +30 -0
- data/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +15 -0
- data/lib/decidim/core/test/shared_examples/publicable.rb +1 -1
- data/lib/decidim/core/test/shared_examples/railtie_examples.rb +15 -0
- data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +1 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/events/base_event.rb +2 -1
- data/lib/decidim/form_builder.rb +9 -3
- data/lib/decidim/friendly_dates.rb +1 -1
- data/lib/decidim/gamification.rb +109 -0
- data/lib/decidim/gamification/badge.rb +54 -0
- data/lib/decidim/gamification/badge_earned_event.rb +9 -0
- data/lib/decidim/gamification/badge_registry.rb +63 -0
- data/lib/decidim/gamification/badge_scorer.rb +118 -0
- data/lib/decidim/gamification/badge_status.rb +41 -0
- data/lib/decidim/gamification/base_event.rb +40 -0
- data/lib/decidim/gamification/level_up_event.rb +9 -0
- data/lib/decidim/hashtag.rb +15 -0
- data/lib/decidim/hashtaggable.rb +20 -0
- data/lib/decidim/query_extensions.rb +10 -0
- data/lib/decidim/resource_manifest.rb +10 -0
- data/lib/decidim/resourceable.rb +13 -0
- data/lib/decidim/search_resource_fields_mapper.rb +8 -3
- data/lib/decidim/searchable.rb +8 -0
- data/lib/decidim/translatable_attributes.rb +6 -18
- data/lib/decidim/view_model.rb +6 -0
- data/lib/devise/models/decidim_newsletterable.rb +1 -1
- data/vendor/assets/javascripts/d3.js +17813 -0
- metadata +125 -27
- data/app/cells/decidim/card_m/author.erb +0 -3
- data/app/cells/decidim/card_m/authors.erb +0 -9
- data/app/views/decidim/messaging/conversations/_message.html.erb +0 -14
- data/app/views/decidim/messaging/conversations/_reply.html.erb +0 -11
- data/app/views/decidim/messaging/conversations/_show.html.erb +0 -21
- data/app/views/decidim/messaging/conversations/_start.html.erb +0 -12
- data/app/views/decidim/pages/home/_footer_sub_hero.html.erb +0 -14
- data/app/views/decidim/pages/home/_highlighted_content_banner.html.erb +0 -26
- data/app/views/decidim/pages/home/_highlighted_processes.html.erb +0 -7
- data/app/views/decidim/profiles/_user.html.erb +0 -59
- data/app/views/decidim/shared/_action_authorization_modal.html.erb +0 -39
- data/app/views/layouts/decidim/_component_authorization_modals.html.erb +0 -5
@@ -38,6 +38,15 @@ module Decidim
|
|
38
38
|
collection_route("path", options)
|
39
39
|
end
|
40
40
|
|
41
|
+
# Builds the admin edit path to the resource.
|
42
|
+
#
|
43
|
+
# options - An optional hash of options to pass to the Rails router
|
44
|
+
#
|
45
|
+
# Returns a String.
|
46
|
+
def edit(options = {})
|
47
|
+
admin_route_proxy.send("edit_#{member_route_name}_path", resource, options)
|
48
|
+
end
|
49
|
+
|
41
50
|
private
|
42
51
|
|
43
52
|
# Private: Build the route to the resource.
|
@@ -74,5 +83,9 @@ module Decidim
|
|
74
83
|
def route_proxy
|
75
84
|
@route_proxy ||= EngineRouter.main_proxy(component || resource)
|
76
85
|
end
|
86
|
+
|
87
|
+
def admin_route_proxy
|
88
|
+
@admin_route_proxy ||= EngineRouter.admin_proxy(component || resource)
|
89
|
+
end
|
77
90
|
end
|
78
91
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
# A GraphQL resolver to handle `hashtags'
|
5
|
+
class HashtagsResolver
|
6
|
+
def initialize(organization, term)
|
7
|
+
@organization = organization
|
8
|
+
@term = term
|
9
|
+
end
|
10
|
+
|
11
|
+
def hashtags
|
12
|
+
Decidim::Hashtag.where(organization: @organization).where("name like ?", "#{@term}%")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -7,14 +7,16 @@ module Decidim
|
|
7
7
|
#
|
8
8
|
# Initializes the ActionAuthorizer.
|
9
9
|
#
|
10
|
-
# user
|
10
|
+
# user - The user to authorize against.
|
11
|
+
# action - The action to authenticate.
|
11
12
|
# component - The component to authenticate against.
|
12
|
-
#
|
13
|
+
# resource - The resource to authenticate against. Can be nil.
|
13
14
|
#
|
14
|
-
def initialize(user, component,
|
15
|
+
def initialize(user, action, component, resource)
|
15
16
|
@user = user
|
16
|
-
@component = component
|
17
17
|
@action = action.to_s if action
|
18
|
+
@component = resource&.component || component
|
19
|
+
@resource = resource
|
18
20
|
end
|
19
21
|
|
20
22
|
#
|
@@ -28,7 +30,7 @@ module Decidim
|
|
28
30
|
raise AuthorizationError, "Missing data" unless component && action
|
29
31
|
|
30
32
|
status_code, data = if authorization_handler_name
|
31
|
-
authorization_handler.authorize(authorization, permission_options, component)
|
33
|
+
authorization_handler.authorize(authorization, permission_options, component, resource)
|
32
34
|
else
|
33
35
|
[:ok, {}]
|
34
36
|
end
|
@@ -38,7 +40,7 @@ module Decidim
|
|
38
40
|
|
39
41
|
private
|
40
42
|
|
41
|
-
attr_reader :user, :component, :action
|
43
|
+
attr_reader :user, :component, :resource, :action
|
42
44
|
|
43
45
|
def authorization
|
44
46
|
return nil unless user && authorization_handler_name
|
@@ -62,8 +64,7 @@ module Decidim
|
|
62
64
|
|
63
65
|
def permission
|
64
66
|
return nil unless component && action
|
65
|
-
|
66
|
-
@permission ||= component.permissions&.fetch(action, nil)
|
67
|
+
@permission ||= resource&.permissions&.fetch(action, nil) || component.permissions&.fetch(action, nil)
|
67
68
|
end
|
68
69
|
|
69
70
|
class AuthorizationStatus
|
@@ -6,7 +6,7 @@ module Decidim
|
|
6
6
|
name "DateTime"
|
7
7
|
description "An ISO8601 date with time"
|
8
8
|
coerce_input ->(value, _ctx) { Time.iso8601(value) }
|
9
|
-
coerce_result ->(value, _ctx) { value.
|
9
|
+
coerce_result ->(value, _ctx) { value.to_time.iso8601 }
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Core
|
5
|
+
# This type represents a User.
|
6
|
+
HashtagType = GraphQL::ObjectType.define do
|
7
|
+
name "HashtagType"
|
8
|
+
description "hashtags list"
|
9
|
+
|
10
|
+
field :name, !types.String, "The hashtag's name"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
# This class deals with uploading hero images to
|
4
|
+
# This class deals with uploading hero images to organizations.
|
5
5
|
class HomepageImageUploader < ImageUploader
|
6
6
|
include CarrierWave::MiniMagick
|
7
7
|
|
@@ -6,6 +6,7 @@ module Decidim
|
|
6
6
|
include CarrierWave::MiniMagick
|
7
7
|
|
8
8
|
process :validate_size, :validate_dimensions
|
9
|
+
process quality: Decidim.image_uploader_quality
|
9
10
|
|
10
11
|
# CarrierWave automatically calls this method and validates the content
|
11
12
|
# type fo the temp file to match against any of these options.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<button class="close-button" data-close aria-label="Close modal"
|
2
|
+
type="button">
|
3
|
+
<span aria-hidden="true">×</span>
|
4
|
+
</button>
|
5
|
+
<div class="reveal__header <%= status.code %>-authorization">
|
6
|
+
<h3 class="reveal__title"><%= t ".#{status.code}.title" %></h3>
|
7
|
+
</div>
|
8
|
+
<p><%= t ".#{status.code}.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
9
|
+
<% if status.data[:extra_explanation] %>
|
10
|
+
<p><%= t status.data[:extra_explanation][:key], **status.data[:extra_explanation][:params] %></p>
|
11
|
+
<% end %>
|
12
|
+
<% if status.data[:fields] %>
|
13
|
+
<ul>
|
14
|
+
<% status.data[:fields].each do |field, value| %>
|
15
|
+
<li><strong><%= t ".#{status.code}.invalid_field", field: t("#{status.handler_name}.fields.#{field}", scope: "decidim.authorization_handlers"), value: value ? "(#{value})" : "" %></strong></li>
|
16
|
+
<% end %>
|
17
|
+
</ul>
|
18
|
+
<% end %>
|
19
|
+
<div class="row">
|
20
|
+
<div class="columns medium-8 medium-offset-2">
|
21
|
+
<% if status.data[:action].present? %>
|
22
|
+
<%= link_to t(".#{status.code}.#{status.data[:action]}", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers")), authorize_action_path, class: "button expanded" %>
|
23
|
+
<% else %>
|
24
|
+
<button class="button expanded" data-close><%= t ".#{status.code}.ok" %></button>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<% if status.data[:cancel] %>
|
29
|
+
<div class="text-center">
|
30
|
+
<button class="link" data-close><%= t ".#{status.code}.cancel" %></button>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$("#messages").append("<%= j(
|
1
|
+
$("#messages").append("<%= j(cell("decidim/message", conversation.messages.first).show).html_safe %>");
|
2
2
|
$(".add-message").replaceWith("<%= j(render "reply", form: form, conversation: conversation).html_safe %>");
|
@@ -1,51 +1 @@
|
|
1
|
-
|
2
|
-
<div class="row">
|
3
|
-
<div class="columns">
|
4
|
-
<div class="title-action">
|
5
|
-
<h1 class="heading1 title-action__title">
|
6
|
-
<%= t(".title") %>
|
7
|
-
</h1>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<div class="row">
|
12
|
-
<div class="columns large-8">
|
13
|
-
<% if @conversations.empty? %>
|
14
|
-
<div class="callout secondary">
|
15
|
-
<p><%= t(".no_conversations") %></p>
|
16
|
-
</div>
|
17
|
-
<% else %>
|
18
|
-
<div class="card card--list conversations">
|
19
|
-
<% @conversations.each do |conversation| %>
|
20
|
-
<%= link_to decidim.conversation_path(conversation), class: "card--list__item" do %>
|
21
|
-
<div class="card--list__titled-text">
|
22
|
-
<h6 class="card--list__heading heading6">
|
23
|
-
<%= username_list(conversation.interlocutors(current_user)) %>
|
24
|
-
</h6>
|
25
|
-
|
26
|
-
<span class="card--list__annotation">
|
27
|
-
<%= conversation.last_message.friendly_created_at %>
|
28
|
-
</span>
|
29
|
-
|
30
|
-
<span class="text-small">
|
31
|
-
<%= truncate conversation.last_message.body, length: 150 %>
|
32
|
-
</span>
|
33
|
-
|
34
|
-
<% if conversation.unread_count(current_user) > 0 %>
|
35
|
-
<span class="card--list__counter">
|
36
|
-
<span><%= conversation.unread_count(current_user) %></span>
|
37
|
-
</span>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
40
|
-
<div class="card--list__data">
|
41
|
-
<span class="card--list__data__icon">
|
42
|
-
<%= icon "chevron-right" %>
|
43
|
-
</span>
|
44
|
-
</div>
|
45
|
-
<% end %>
|
46
|
-
<% end %>
|
47
|
-
</div>
|
48
|
-
<% end %>
|
49
|
-
</div>
|
50
|
-
</div>
|
51
|
-
</main>
|
1
|
+
<%= cell "decidim/profile", current_user, context: { content_cell: "decidim/conversations" } %>
|
@@ -1,9 +1 @@
|
|
1
|
-
<%=
|
2
|
-
<div id="messages">
|
3
|
-
<% conversation.messages.each do |message| %>
|
4
|
-
<%= render "message", message: message %>
|
5
|
-
<% end %>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<%= render "reply", form: @form, conversation: conversation %>
|
9
|
-
<% end %>
|
1
|
+
<%= cell "decidim/profile", current_user, context: { content_cell: "decidim/conversation", conversation: conversation } %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$("#messages").append("<%= j(
|
1
|
+
$("#messages").append("<%= j(cell("decidim/message", message).show).html_safe %>");
|
2
2
|
$(".new_message textarea#message_body").val("");
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= cell "decidim/profile", current_user, context: { content_cell: "decidim/notifications" } %>
|
@@ -3,6 +3,15 @@
|
|
3
3
|
description: translated_attribute(page.content)
|
4
4
|
) %>
|
5
5
|
|
6
|
+
<%
|
7
|
+
edit_link(
|
8
|
+
decidim_admin.edit_static_page_path(page),
|
9
|
+
:update,
|
10
|
+
:static_page,
|
11
|
+
static_page: page
|
12
|
+
)
|
13
|
+
%>
|
14
|
+
|
6
15
|
<main class="wrapper">
|
7
16
|
<%= cell "decidim/tos_page", :announcement %>
|
8
17
|
|
@@ -1,17 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<%
|
2
|
+
edit_link(
|
3
|
+
decidim_admin.edit_organization_path,
|
4
|
+
:update,
|
5
|
+
:organization,
|
6
|
+
organization: current_organization
|
7
|
+
)
|
8
|
+
%>
|
9
|
+
|
10
|
+
<% Decidim::ContentBlock.published.for_scope(:homepage, organization: current_organization).each do |content_block| %>
|
11
|
+
<% next unless content_block.manifest %>
|
12
|
+
<%= cell content_block.manifest.cell, content_block %>
|
5
13
|
<% end %>
|
6
|
-
|
7
|
-
<%= render partial: "decidim/pages/home/highlighted_content_banner" %>
|
8
|
-
|
9
|
-
<%= render partial: "decidim/pages/home/highlighted_processes" %>
|
10
|
-
|
11
|
-
<%= render partial: "decidim/pages/home/extended" %>
|
12
|
-
|
13
|
-
<% if current_organization.show_statistics? %>
|
14
|
-
<%= render partial: "decidim/pages/home/statistics" %>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<%= render partial: "decidim/pages/home/footer_sub_hero" %>
|
@@ -11,12 +11,12 @@
|
|
11
11
|
<% end %>
|
12
12
|
<div>
|
13
13
|
<div class="author__name--container">
|
14
|
-
<%= link_to profile_user.name, profile_user.profile_path, class: "author__name"%>
|
14
|
+
<%= link_to profile_user.name, profile_user.profile_path, class: "author__name" %>
|
15
15
|
<% if profile_user.badge.present? %>
|
16
16
|
<%= icon profile_user.badge, class: "author__verified" %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
|
-
<%= link_to profile_user.nickname, profile_user.profile_path, class: "author__nickname"%>
|
19
|
+
<%= link_to profile_user.nickname, profile_user.profile_path, class: "author__nickname" %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
</div>
|
@@ -1,37 +1 @@
|
|
1
|
-
|
2
|
-
<div class="row">
|
3
|
-
<div class="columns medium-9 medium-offset-3">
|
4
|
-
<ul class="tabs" id="profile-tabs">
|
5
|
-
<% if current_user && current_user == user %>
|
6
|
-
<li class="tabs-title<%= " is-active" if active_content == "notifications" %>">
|
7
|
-
<%= aria_selected_link_to t(".notifications"), profile_notifications_path(nickname: user.nickname), aria_link_type: active_content == "notifications" %>
|
8
|
-
</li>
|
9
|
-
<% end %>
|
10
|
-
<li class="tabs-title<%= " is-active" if active_content == "following" %>">
|
11
|
-
<%= aria_selected_link_to t(".following"), profile_following_path(nickname: user.nickname), aria_link_type: active_content == "following" %>
|
12
|
-
</li>
|
13
|
-
<li class="tabs-title<%= " is-active" if active_content == "followers" %>">
|
14
|
-
<%= aria_selected_link_to t(".followers"), profile_followers_path(nickname: user.nickname), aria_link_type: active_content == "followers" %>
|
15
|
-
</li>
|
16
|
-
</ul>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
<div class="row">
|
20
|
-
<div class="columns medium-3">
|
21
|
-
<%= render partial: "user", locals: { user: user } %>
|
22
|
-
</div>
|
23
|
-
<div class="columns medium-9">
|
24
|
-
<div class="tabs-content" data-tabs-content="profile-tabs">
|
25
|
-
<div class="tabs-panel is-active">
|
26
|
-
<% if active_content == "notifications" %>
|
27
|
-
<%= cell "decidim/notifications", current_user, context: { current_user: current_user } %>
|
28
|
-
<% elsif active_content == "following" %>
|
29
|
-
<%= cell "decidim/following", user, context: { current_user: current_user } %>
|
30
|
-
<% elsif active_content == "followers" %>
|
31
|
-
<%= cell "decidim/followers", user, context: { current_user: current_user } %>
|
32
|
-
<% end %>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
</main>
|
1
|
+
<%= cell "decidim/profile", user, context: { content_cell: @content_cell } %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="row small-up-1 medium-up-2 card-grid">
|
2
2
|
<% @results.each do |result| %>
|
3
|
-
<%= card_for result.resource, context: { label: true }, show_footer_actions: false %>
|
3
|
+
<%= card_for result.resource, { context: { label: true, show_space: true }, show_footer_actions: false } %>
|
4
4
|
<% end %>
|
5
5
|
</div>
|
@@ -1 +1 @@
|
|
1
|
-
<%= card_for author, context: {extra_classes: ["author-data--small"]} %>
|
1
|
+
<%= card_for author, context: { extra_classes: ["author-data--small"] } %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="reveal" id="authorizationModal" data-reveal></div>
|
@@ -1 +1 @@
|
|
1
|
-
<%= cell "decidim/tags", resource, context: {extra_classes: [tags_class_extra]} %>
|
1
|
+
<%= cell "decidim/tags", resource, context: { extra_classes: [tags_class_extra] } %>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
per_page: number of items to fetch per page
|
8
8
|
remote: data-remote -%>
|
9
9
|
<li class="page<%= " current" if page.current? %>">
|
10
|
-
<%= link_to_unless page.current?, page, url, {remote: remote, rel: page.rel} %>
|
10
|
+
<%= link_to_unless page.current?, page, url, { remote: remote, rel: page.rel } %>
|
11
11
|
</li>
|
@@ -3,7 +3,11 @@
|
|
3
3
|
title: current_organization.name,
|
4
4
|
url: request.original_url,
|
5
5
|
twitter_handler: current_organization.twitter_handler,
|
6
|
-
image_url:
|
6
|
+
image_url: Decidim::ContentBlock.published.find_by(
|
7
|
+
organization: current_organization,
|
8
|
+
scope: :homepage,
|
9
|
+
manifest_name: :hero
|
10
|
+
).try(:images_container).try(:background_image).try(:url)
|
7
11
|
}) %>
|
8
12
|
|
9
13
|
<!DOCTYPE html>
|
@@ -23,5 +27,6 @@
|
|
23
27
|
<% end %>
|
24
28
|
|
25
29
|
<%= render partial: "decidim/shared/login_modal" %>
|
30
|
+
<%= render partial: "decidim/shared/authorization_modal" %>
|
26
31
|
</body>
|
27
32
|
</html>
|