decidim-core 0.11.2 → 0.12.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/notifications.js.es6 +8 -6
- data/app/assets/javascripts/decidim/user_registrations.js.es6 +25 -1
- data/app/assets/stylesheets/decidim/application.scss.erb +4 -0
- data/app/assets/stylesheets/decidim/layouts/_home.scss +79 -0
- data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_cards.scss +82 -38
- data/app/assets/stylesheets/decidim/modules/_collapsible-list.scss +16 -0
- data/app/assets/stylesheets/decidim/modules/_definition-data.scss +27 -0
- data/app/assets/stylesheets/decidim/modules/_fingerprint.scss +8 -0
- data/app/assets/stylesheets/decidim/modules/_horizontal-tabs.scss +51 -0
- data/app/assets/stylesheets/decidim/modules/_inline-filters.scss +5 -3
- data/app/assets/stylesheets/decidim/modules/_margins.scss +6 -4
- data/app/assets/stylesheets/decidim/modules/_modules.scss +3 -0
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +113 -7
- data/app/assets/stylesheets/decidim/modules/_signup.scss +22 -5
- data/app/assets/stylesheets/decidim/modules/_toggle.scss +9 -0
- data/app/assets/stylesheets/decidim/modules/_typography.scss +5 -1
- data/app/assets/stylesheets/decidim/utils/_helpers.scss +42 -0
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +6 -0
- data/app/assets/stylesheets/decidim/utils/_settings.scss +3 -2
- data/app/cells/decidim/announcement/show.erb +11 -0
- data/app/cells/decidim/announcement_cell.rb +32 -0
- data/app/cells/decidim/author/comments.erb +6 -0
- data/app/cells/decidim/author/contact.erb +3 -0
- data/app/cells/decidim/author/date.erb +5 -0
- data/app/cells/decidim/author/flag.erb +5 -0
- data/app/cells/decidim/author/profile.erb +9 -0
- data/app/cells/decidim/{profile → author}/profile_inline.erb +1 -1
- data/app/cells/decidim/author/show.erb +18 -0
- data/app/cells/decidim/author/withdraw.erb +6 -0
- data/app/cells/decidim/author_cell.rb +109 -0
- data/app/cells/decidim/card/show.erb +18 -16
- data/app/cells/decidim/card_cell.rb +17 -4
- data/app/cells/decidim/card_m/author.erb +3 -0
- data/app/cells/decidim/card_m/badge.erb +1 -0
- data/app/cells/decidim/card_m/comments_counter.erb +3 -0
- data/app/cells/decidim/card_m/data.erb +0 -0
- data/app/cells/decidim/card_m/footer.erb +0 -0
- data/app/cells/decidim/card_m/header.erb +17 -0
- data/app/cells/decidim/card_m/image.erb +5 -0
- data/app/cells/decidim/card_m/label.erb +3 -0
- data/app/cells/decidim/card_m/show.erb +24 -0
- data/app/cells/decidim/card_m/status.erb +9 -0
- data/app/cells/decidim/card_m/tags.erb +0 -0
- data/app/cells/decidim/card_m_cell.rb +136 -0
- data/app/cells/decidim/collapsible_list/show.erb +20 -0
- data/app/cells/decidim/collapsible_list_cell.rb +66 -0
- data/app/cells/decidim/fingerprint/show.erb +22 -0
- data/app/cells/decidim/fingerprint_cell.rb +17 -0
- data/app/cells/decidim/follow_button/show.erb +34 -0
- data/app/cells/decidim/follow_button_cell.rb +40 -0
- data/app/cells/decidim/followers/show.erb +9 -0
- data/app/cells/decidim/followers_cell.rb +18 -0
- data/app/cells/decidim/following/show.erb +9 -0
- data/app/cells/decidim/following_cell.rb +24 -0
- data/app/cells/decidim/notifications/show.erb +48 -0
- data/app/cells/decidim/notifications_cell.rb +21 -0
- data/app/cells/decidim/progress_bar/show.erb +17 -0
- data/app/cells/decidim/progress_bar_cell.rb +68 -0
- data/app/cells/decidim/tags/category.erb +1 -0
- data/app/cells/decidim/tags/scope.erb +1 -0
- data/app/cells/decidim/tags/show.erb +5 -0
- data/app/cells/decidim/tags_cell.rb +62 -0
- data/app/cells/decidim/tos_page/announcement.erb +2 -0
- data/app/cells/decidim/tos_page/refuse_btn_modal.erb +23 -0
- data/app/cells/decidim/tos_page/sticky_form.erb +29 -0
- data/app/cells/decidim/tos_page_cell.rb +39 -0
- data/app/cells/decidim/user_profile/footer.erb +5 -0
- data/app/cells/decidim/user_profile/header.erb +20 -0
- data/app/cells/decidim/user_profile_cell.rb +26 -0
- data/app/commands/decidim/create_omniauth_registration.rb +1 -1
- data/app/commands/decidim/create_registration.rb +2 -1
- data/app/commands/decidim/search.rb +45 -0
- data/app/controllers/concerns/decidim/devise_controllers.rb +15 -12
- data/app/controllers/concerns/decidim/http_caching_disabler.rb +21 -0
- data/app/controllers/concerns/decidim/impersonate_users.rb +1 -6
- data/app/controllers/concerns/decidim/locale_switcher.rb +1 -1
- data/app/controllers/concerns/decidim/needs_permission.rb +70 -0
- data/app/controllers/concerns/decidim/needs_tos_accepted.rb +42 -0
- data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -7
- data/app/controllers/concerns/decidim/user_profile.rb +3 -1
- data/app/controllers/decidim/account_controller.rb +4 -4
- data/app/controllers/decidim/application_controller.rb +17 -8
- data/app/controllers/decidim/components/base_controller.rb +14 -9
- data/app/controllers/decidim/cookie_policy_controller.rb +0 -2
- data/app/controllers/decidim/devise/confirmations_controller.rb +13 -0
- data/app/controllers/decidim/devise/invitations_controller.rb +3 -1
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +9 -3
- data/app/controllers/decidim/devise/passwords_controller.rb +1 -1
- data/app/controllers/decidim/devise/registrations_controller.rb +1 -7
- data/app/controllers/decidim/doorkeeper/authorizations_controller.rb +0 -2
- data/app/controllers/decidim/doorkeeper/credentials_controller.rb +0 -1
- data/app/controllers/decidim/errors_controller.rb +0 -2
- data/app/controllers/decidim/follows_controller.rb +4 -2
- data/app/controllers/decidim/locales_controller.rb +1 -1
- data/app/controllers/decidim/messaging/conversations_controller.rb +5 -5
- data/app/controllers/decidim/newsletters_controller.rb +0 -2
- data/app/controllers/decidim/notifications_controller.rb +3 -19
- data/app/controllers/decidim/notifications_settings_controller.rb +2 -2
- data/app/controllers/decidim/pages_controller.rb +12 -10
- data/app/controllers/decidim/profiles_controller.rb +10 -4
- data/app/controllers/decidim/reports_controller.rb +14 -1
- data/app/controllers/decidim/scopes_controller.rb +3 -3
- data/app/controllers/decidim/searches_controller.rb +39 -0
- data/app/controllers/decidim/static_map_controller.rb +0 -2
- data/app/controllers/decidim/tos_controller.rb +20 -0
- data/app/controllers/decidim/widgets_controller.rb +0 -1
- data/app/forms/decidim/follow_form.rb +1 -0
- data/app/forms/decidim/registration_form.rb +2 -1
- data/app/helpers/decidim/card_helper.rb +2 -0
- data/app/helpers/decidim/cells_paginate_helper.rb +16 -0
- data/app/helpers/decidim/cta_button_helper.rb +1 -1
- data/app/helpers/decidim/decidim_form_helper.rb +4 -0
- data/app/helpers/decidim/icon_helper.rb +2 -0
- data/app/helpers/decidim/resource_helper.rb +1 -2
- data/app/helpers/decidim/scopes_helper.rb +17 -10
- data/app/helpers/decidim/searches_helper.rb +16 -0
- data/app/helpers/decidim/tooltip_helper.rb +12 -0
- data/app/models/decidim/organization.rb +10 -0
- data/app/models/decidim/permission_action.rb +40 -0
- data/app/models/decidim/searchable_resource.rb +37 -0
- data/app/models/decidim/static_page.rb +4 -0
- data/app/models/decidim/user.rb +39 -3
- data/app/permissions/decidim/default_permissions.rb +61 -0
- data/app/permissions/decidim/permissions.rb +106 -0
- data/app/permissions/decidim/user_manager_permissions.rb +24 -0
- data/app/presenters/decidim/admin_log/organization_presenter.rb +2 -1
- data/app/presenters/decidim/home_stats_presenter.rb +2 -8
- data/app/presenters/decidim/user_presenter.rb +8 -0
- data/app/services/decidim/traceability.rb +6 -9
- data/app/types/decidim/core/user_type.rb +1 -1
- data/app/views/decidim/devise/invitations/edit.html.erb +56 -10
- data/app/views/decidim/devise/registrations/new.html.erb +36 -14
- data/app/views/decidim/devise/shared/_newsletter_modal.html.erb +25 -0
- data/app/views/decidim/follows/update_button.js.erb +2 -2
- data/app/views/decidim/messaging/conversations/_message.html.erb +1 -1
- data/app/views/{pages → decidim/pages}/decidim_page.html.erb +5 -0
- data/app/views/decidim/pages/home.html.erb +17 -0
- data/app/views/{pages → decidim/pages}/home/_extended.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_footer_sub_hero.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_hero.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_highlighted_content_banner.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_highlighted_processes.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_statistics.html.erb +0 -0
- data/app/views/{pages → decidim/pages}/home/_sub_hero.html.erb +0 -0
- data/app/views/decidim/profiles/_followers.html.erb +5 -0
- data/app/views/decidim/profiles/_following.html.erb +5 -0
- data/app/views/decidim/profiles/_notifications.html.erb +0 -0
- data/app/views/decidim/profiles/_user.html.erb +59 -0
- data/app/views/decidim/profiles/_user_follow.erb +32 -0
- data/app/views/decidim/profiles/show.html.erb +32 -59
- data/app/views/decidim/searches/_count.html.erb +1 -0
- data/app/views/decidim/searches/_filters.html.erb +20 -0
- data/app/views/decidim/searches/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/searches/_results.html.erb +5 -0
- data/app/views/decidim/searches/index.html.erb +20 -0
- data/app/views/decidim/searches/index.js.erb +5 -0
- data/app/views/decidim/shared/_address_details.html.erb +7 -9
- data/app/views/decidim/shared/_announcement.html.erb +1 -6
- data/app/views/decidim/shared/_author_reference.html.erb +1 -1
- data/app/views/decidim/shared/_follow_button.html.erb +1 -34
- data/app/views/decidim/shared/_static_map.html.erb +3 -1
- data/app/views/decidim/shared/_tags.html.erb +1 -11
- data/app/views/kaminari/decidim/_paginator.html.erb +16 -15
- data/app/views/layouts/decidim/_head.html.erb +1 -0
- data/app/views/layouts/decidim/_topbar_search.html.erb +8 -0
- data/app/views/layouts/decidim/_user_menu.html.erb +2 -2
- data/app/views/layouts/decidim/_wrapper.html.erb +3 -2
- data/config/initializers/devise.rb +1 -1
- data/config/initializers/rack_attack.rb +28 -0
- data/config/locales/ca.yml +136 -55
- data/config/locales/en.yml +135 -54
- data/config/locales/es.yml +136 -55
- data/config/locales/eu.yml +136 -54
- data/config/locales/fi.yml +135 -54
- data/config/locales/fr.yml +136 -54
- data/config/locales/gl.yml +136 -54
- data/config/locales/it.yml +136 -54
- data/config/locales/nl.yml +136 -54
- data/config/locales/pl.yml +144 -54
- data/config/locales/pt-BR.yml +136 -54
- data/config/locales/pt.yml +136 -54
- data/config/locales/ru.yml +150 -60
- data/config/locales/sv.yml +136 -54
- data/config/locales/uk.yml +146 -57
- data/config/routes.rb +11 -1
- data/db/migrate/20180209122819_create_decidim_searchable_resource.rb +21 -0
- data/db/migrate/20180508111640_add_tos_version_to_organization.rb +19 -0
- data/db/migrate/20180508111710_add_accepted_tos_version_field_to_users.rb +25 -0
- data/db/seeds.rb +33 -26
- data/lib/decidim/component_manifest.rb +35 -27
- data/lib/decidim/content_processor.rb +21 -3
- data/lib/decidim/core.rb +27 -16
- data/lib/decidim/core/engine.rb +8 -19
- data/lib/decidim/core/test.rb +2 -0
- data/lib/decidim/core/test/factories.rb +34 -4
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +15 -0
- data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +27 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/events/base_event.rb +5 -1
- data/lib/decidim/fingerprint_calculator.rb +42 -0
- data/lib/decidim/fingerprintable.rb +63 -0
- data/lib/decidim/form_builder.rb +1 -0
- data/lib/decidim/manifest_registry.rb +4 -10
- data/lib/decidim/participable.rb +4 -0
- data/lib/decidim/participatory_space_manifest.rb +36 -0
- data/lib/decidim/participatory_space_resourceable.rb +11 -0
- data/lib/decidim/resource_manifest.rb +10 -11
- data/lib/decidim/resourceable.rb +3 -2
- data/lib/decidim/search_resource_fields_mapper.rb +93 -0
- data/lib/decidim/searchable.rb +85 -0
- data/lib/decidim/settings_manifest.rb +3 -2
- data/lib/decidim/traceable.rb +2 -0
- data/lib/decidim/view_model.rb +9 -0
- data/lib/tasks/decidim_tasks.rake +79 -1
- metadata +149 -76
- data/app/assets/stylesheets/decidim/extras/_register_form.scss +0 -9
- data/app/cells/decidim/author_box/show.erb +0 -10
- data/app/cells/decidim/author_box_cell.rb +0 -21
- data/app/cells/decidim/profile/show.erb +0 -13
- data/app/cells/decidim/profile_cell.rb +0 -17
- data/app/controllers/concerns/decidim/needs_authorization.rb +0 -46
- data/app/models/decidim/abilities/admin_ability.rb +0 -29
- data/app/models/decidim/abilities/base_ability.rb +0 -56
- data/app/models/decidim/abilities/everyone_ability.rb +0 -25
- data/app/models/decidim/abilities/participatory_process_admin_ability.rb +0 -28
- data/app/models/decidim/abilities/participatory_process_collaborator_ability.rb +0 -28
- data/app/models/decidim/abilities/participatory_process_moderator_ability.rb +0 -15
- data/app/models/decidim/abilities/user_manager_ability.rb +0 -35
- data/app/views/decidim/notifications/_notification.html.erb +0 -20
- data/app/views/decidim/notifications/index.html.erb +0 -36
- data/app/views/decidim/shared/_author.html.erb +0 -21
- data/app/views/pages/home.html.erb +0 -17
- data/db/migrate/20180613080638_rename_missing_features_to_components.rb +0 -15
- data/lib/decidim/abilities.rb +0 -7
- data/lib/decidim/abilities/participatory_process_role_ability.rb +0 -60
- data/lib/decidim/page_finder.rb +0 -49
@@ -1,5 +1,9 @@
|
|
1
1
|
<% add_decidim_page_title(t(".sign_up")) %>
|
2
2
|
|
3
|
+
<% content_for :devise_links do %>
|
4
|
+
<%= render "decidim/devise/shared/links" %>
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<main class="wrapper">
|
4
8
|
<div class="row collapse">
|
5
9
|
<div class="row collapse">
|
@@ -17,13 +21,13 @@
|
|
17
21
|
|
18
22
|
<div class="row">
|
19
23
|
<div class="columns large-6 medium-10 medium-centered">
|
20
|
-
<div class="card">
|
21
|
-
<div class="card__content">
|
22
|
-
<%= decidim_form_for(@form, as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
|
23
|
-
<%= invisible_captcha %>
|
24
24
|
|
25
|
+
<%= decidim_form_for(@form, as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user", id: "register-form" }) do |f| %>
|
26
|
+
<%= invisible_captcha %>
|
27
|
+
<div class="card">
|
28
|
+
<div class="card__content">
|
25
29
|
<fieldset class="text-center">
|
26
|
-
<legend
|
30
|
+
<legend><%= t(".sign_up_as.legend") %></legend>
|
27
31
|
<%= f.collection_radio_buttons :sign_up_as, [["user", t(".sign_up_as.user")], ["user_group", t(".sign_up_as.user_group") ]], :first, :last %>
|
28
32
|
</fieldset>
|
29
33
|
|
@@ -64,30 +68,48 @@
|
|
64
68
|
<%= f.text_field :user_group_phone %>
|
65
69
|
</div>
|
66
70
|
</div>
|
71
|
+
</div>
|
72
|
+
</div>
|
67
73
|
|
68
|
-
|
74
|
+
<div class="card" id="card__tos">
|
75
|
+
<div class="card__content">
|
76
|
+
<legend><%= t(".tos_title") %></legend>
|
77
|
+
|
78
|
+
<p class="tos-text">
|
69
79
|
<%= strip_tags(translated_attribute(terms_and_conditions_page.content)) %>
|
70
80
|
</p>
|
71
81
|
|
72
|
-
<
|
73
|
-
|
74
|
-
|
75
|
-
|
82
|
+
<div class="field">
|
83
|
+
<%= f.check_box :tos_agreement, label: t(".tos_agreement", link: link_to(t(".terms"), page_path("terms-and-conditions"))) %>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div class="card" id="card__newsletter">
|
89
|
+
<div class="card__content">
|
90
|
+
<legend><%= t(".newsletter_title") %></legend>
|
76
91
|
|
92
|
+
<fieldset>
|
77
93
|
<div class="field">
|
78
|
-
<%= f.check_box :
|
94
|
+
<%= f.check_box :newsletter, label: t(".newsletter"), checked: @form.newsletter %>
|
79
95
|
</div>
|
80
96
|
</fieldset>
|
97
|
+
</div>
|
98
|
+
</div>
|
81
99
|
|
100
|
+
<div class="card">
|
101
|
+
<div class="card__content">
|
82
102
|
<div class="actions">
|
83
103
|
<%= f.submit t("devise.registrations.new.sign_up"), class: "button expanded" %>
|
84
104
|
</div>
|
85
|
-
|
86
|
-
|
105
|
+
<%= yield :devise_links %>
|
106
|
+
</div>
|
87
107
|
</div>
|
88
|
-
|
108
|
+
<% end %>
|
89
109
|
</div>
|
90
110
|
</div>
|
111
|
+
|
91
112
|
<%= render "decidim/devise/shared/omniauth_buttons" %>
|
92
113
|
</div>
|
93
114
|
</main>
|
115
|
+
<%= render "decidim/devise/shared/newsletter_modal" %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="reveal" id="sign-up-newsletter-modal" data-reveal>
|
2
|
+
<div class="reveal__header">
|
3
|
+
<h3 class="reveal__title"><%= t(".title") %></h3>
|
4
|
+
<button class="close-button" data-close aria-label="Close modal"
|
5
|
+
type="button">
|
6
|
+
<span aria-hidden="true">×</span>
|
7
|
+
</button>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="row">
|
11
|
+
<div class="columns medium-10 medium-centered">
|
12
|
+
<p><%= t(".notice") %></p>
|
13
|
+
</div>
|
14
|
+
<div class="columns medium-10 medium-centered">
|
15
|
+
<div class="row">
|
16
|
+
<div class="columns medium-6">
|
17
|
+
<button type="buton" class="check-newsletter clear button secondary expanded" data-check=false><%= t(".buttons.uncheck") %></button>
|
18
|
+
</div>
|
19
|
+
<div class="columns medium-6">
|
20
|
+
<button type="buton" class="check-newsletter button expanded" data-check=true><%= t(".buttons.check") %></button>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var $followResource = $("
|
1
|
+
var $followResource = $("#<%= dom_id(resource, :follow) %>");
|
2
2
|
|
3
|
-
morphdom($followResource[0], "<%= j(
|
3
|
+
morphdom($followResource[0], "<%= j((cell "decidim/follow_button", resource, inline: @inline, context: { current_user: current_user }).to_s.strip.html_safe) %>");
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<article class="message">
|
2
2
|
<div class="message__header">
|
3
3
|
<div class="card__author author-data author-data--small">
|
4
|
-
<%=
|
4
|
+
<%= cell "decidim/author", present(message.sender), context: {extra_classes: ["author-data--small"]} %>
|
5
5
|
|
6
6
|
<time datetime="<%= message.created_at.utc %>">
|
7
7
|
<%= message.friendly_created_at %>
|
@@ -4,9 +4,12 @@
|
|
4
4
|
) %>
|
5
5
|
|
6
6
|
<main class="wrapper">
|
7
|
+
<%= cell "decidim/tos_page", :announcement %>
|
8
|
+
|
7
9
|
<div class="row column">
|
8
10
|
<h1 class="heading1 page-title"><%= translated_attribute page.title %></h1>
|
9
11
|
</div>
|
12
|
+
|
10
13
|
<div class="row">
|
11
14
|
<div class="columns large-8">
|
12
15
|
<div class="static__content">
|
@@ -14,4 +17,6 @@
|
|
14
17
|
</div>
|
15
18
|
</div>
|
16
19
|
</div>
|
20
|
+
|
21
|
+
<%= cell "decidim/tos_page", :sticky_form %>
|
17
22
|
</main>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= render partial: "decidim/pages/home/hero" %>
|
2
|
+
|
3
|
+
<% if !translated_attribute(current_organization.description).blank? %>
|
4
|
+
<%= render partial: "decidim/pages/home/sub_hero" %>
|
5
|
+
<% 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" %>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<% present(user) do |profile_user| %>
|
2
|
+
<div class="card">
|
3
|
+
<%= image_tag profile_user.avatar_url(:big), class: "card__image card__image--larger" %>
|
4
|
+
<div class="card__content">
|
5
|
+
<h5>
|
6
|
+
<div><strong><%= profile_user.name %></strong></div>
|
7
|
+
<span class="text-small"><%= user.nickname %></span>
|
8
|
+
<% if !current_user || (current_user && current_user != user) %>
|
9
|
+
<span class="user-contact_link">
|
10
|
+
<%= link_to_current_or_new_conversation_with(user) %>
|
11
|
+
</span>
|
12
|
+
<% end %>
|
13
|
+
</h5>
|
14
|
+
<p><%= profile_user.about %></p>
|
15
|
+
<% if profile_user.personal_url.present? %>
|
16
|
+
<%= link_to html_truncate(profile_user.personal_url.gsub(%r{https?\:\/\/}, ""), length: 30), profile_user.personal_url %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<% if profile_user.badge.present? %>
|
20
|
+
<div class="badge-card__content">
|
21
|
+
<span>
|
22
|
+
<%= icon profile_user.badge, class: "author__verified" %>
|
23
|
+
</span>
|
24
|
+
<span>
|
25
|
+
<%= translated_attribute(profile_user.officialized_as).presence || t("decidim.profiles.default_officialization_text") %>
|
26
|
+
</span>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
<%= render_hook(:user_profile_bottom) %>
|
30
|
+
<div class="card__footer card__footer--transparent">
|
31
|
+
<div class="flex--cc p-s text-center">
|
32
|
+
<div class="mr-s">
|
33
|
+
<%= link_to profile_followers_path(nickname: user.nickname) do %>
|
34
|
+
<%= t("decidim.profiles.show.followers") %>
|
35
|
+
<h1 class="heading1"><%= profile_user.followers_count %></h1>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
38
|
+
<div class="ml-s">
|
39
|
+
<%= link_to profile_following_path(nickname: user.nickname) do %>
|
40
|
+
<%= t("decidim.profiles.show.following") %>
|
41
|
+
<h1 class="heading1"><%= profile_user.following_count %></h1>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<% if current_user && current_user != user %>
|
49
|
+
<%= render partial: "decidim/shared/follow_button", locals: { followable: user } %>
|
50
|
+
<% elsif current_user == user %>
|
51
|
+
<div class="text-center">
|
52
|
+
<%= link_to decidim.account_path, class: "button" do %>
|
53
|
+
<span>
|
54
|
+
<%= t(".edit_profile") %>
|
55
|
+
</span>
|
56
|
+
<% end %>
|
57
|
+
</div>
|
58
|
+
<% end %>
|
59
|
+
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% present(user) do |profile_user| %>
|
2
|
+
<div class="column">
|
3
|
+
<article class="card card--member">
|
4
|
+
<div class="card__content">
|
5
|
+
<div class="card__header collapse">
|
6
|
+
<div class="author-data author-data--big">
|
7
|
+
<div class="author-data__main">
|
8
|
+
<div class="author author--flex">
|
9
|
+
<%= link_to profile_user.profile_path, class: "author__avatar" do %>
|
10
|
+
<%= image_tag profile_user.avatar_url(:thumb) %>
|
11
|
+
<% end %>
|
12
|
+
<div>
|
13
|
+
<div class="author__name--container">
|
14
|
+
<%= link_to profile_user.name, profile_user.profile_path, class: "author__name"%>
|
15
|
+
<% if profile_user.badge.present? %>
|
16
|
+
<%= icon profile_user.badge, class: "author__verified" %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<%= link_to profile_user.nickname, profile_user.profile_path, class: "author__nickname"%>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="card__text card--picture-offset">
|
26
|
+
<p><%= html_truncate profile_user.about.to_s, length: 80 %></p>
|
27
|
+
<%= render partial: "decidim/shared/follow_button.html", locals: { followable: user } %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</article>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
@@ -1,64 +1,37 @@
|
|
1
|
-
<% add_decidim_page_title(user.nickname) %>
|
2
|
-
|
3
1
|
<main class="wrapper">
|
4
|
-
|
5
|
-
<div class="
|
6
|
-
<
|
7
|
-
|
8
|
-
<
|
9
|
-
<%=
|
10
|
-
</
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</span>
|
20
|
-
<% end %>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<% if current_user && current_user != user %>
|
24
|
-
<%= render partial: "decidim/shared/follow_button", locals: { followable: user } %>
|
25
|
-
<% end %>
|
26
|
-
</h1>
|
27
|
-
|
28
|
-
</div>
|
29
|
-
</div>
|
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>
|
30
17
|
</div>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<% if profile_user.officialized? %>
|
47
|
-
<div class="row">
|
48
|
-
<div class="mediumlarge-6 large-6">
|
49
|
-
<div class="card">
|
50
|
-
<div class="badge-card__content">
|
51
|
-
<span>
|
52
|
-
<%= icon "verified-badge" %>
|
53
|
-
</span>
|
54
|
-
|
55
|
-
<span>
|
56
|
-
<%= translated_attribute(profile_user.officialized_as).presence || t("decidim.profiles.default_officialization_text") %>
|
57
|
-
</span>
|
58
|
-
</div>
|
59
|
-
</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 %>
|
60
33
|
</div>
|
61
34
|
</div>
|
62
|
-
|
63
|
-
|
35
|
+
</div>
|
36
|
+
</div>
|
64
37
|
</main>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= t("decidim.search.results_found_for_term", count: @results.count, term: term) %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= filter_form_for filter do |form| %>
|
2
|
+
<div class="filters-controls">
|
3
|
+
<div class="filters__section">
|
4
|
+
<div class="filters__search">
|
5
|
+
<div class="input-group">
|
6
|
+
<%= form.search_field :term, label: false, class: "input-group-field", placeholder: t(".search") %>
|
7
|
+
<div class="input-group-button">
|
8
|
+
<button type="submit" class="button button--muted">
|
9
|
+
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
10
|
+
</button>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%= form.collection_radio_buttons :resource_type,searchable_resources_as_options(t("all", scope: "decidim.search.filter")), :first, :last, legend_title: t("component", scope: "decidim.search.filter") %>
|
17
|
+
|
18
|
+
<%= scopes_picker_filter form, :decidim_scope_id %>
|
19
|
+
</div>
|
20
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="filters-controls hide-for-mediumlarge">
|
2
|
+
<button data-open="filter-box" class="filters-controls__trigger">
|
3
|
+
<%= t ".filter" %>
|
4
|
+
<%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
|
5
|
+
</button>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="reveal" id="filter-box" data-reveal>
|
9
|
+
<div class="reveal__header">
|
10
|
+
<h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
|
11
|
+
<button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
|
12
|
+
<span aria-hidden="true">×</span>
|
13
|
+
</button>
|
14
|
+
</div>
|
15
|
+
<div class="filters">
|
16
|
+
<%= render partial: "filters" %>
|
17
|
+
</div>
|
18
|
+
</div>
|