decidim-core 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim.js.es6 +2 -4
  3. data/app/assets/javascripts/decidim/append_elements.js.es6 +1 -1
  4. data/app/assets/javascripts/decidim/editor.js.es6 +33 -35
  5. data/app/assets/javascripts/decidim/filters.js.es6 +9 -15
  6. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +5 -5
  7. data/app/assets/javascripts/decidim/form_filter.component.test.js +1 -1
  8. data/app/assets/javascripts/decidim/foundation.js.es6 +17 -0
  9. data/app/assets/javascripts/decidim/user_registrations.js.es6 +2 -3
  10. data/app/assets/stylesheets/decidim/_decidim.scss +9 -0
  11. data/app/assets/stylesheets/decidim/_variables.scss +5 -11
  12. data/app/assets/stylesheets/decidim/application.scss.erb +6 -0
  13. data/app/assets/stylesheets/decidim/extras/_leaflet.scss +13 -0
  14. data/app/assets/stylesheets/decidim/modules/_buttons.scss +8 -2
  15. data/app/assets/stylesheets/decidim/modules/_cards.scss +0 -2
  16. data/app/assets/stylesheets/decidim/modules/_comments.scss +33 -8
  17. data/app/assets/stylesheets/decidim/modules/{_defintion-data.scss → _definition-data.scss} +0 -0
  18. data/app/assets/stylesheets/decidim/modules/_filter-tags.scss +24 -0
  19. data/app/assets/stylesheets/decidim/modules/_layout.scss +1 -9
  20. data/app/assets/stylesheets/decidim/modules/_list-docs.scss +1 -1
  21. data/app/assets/stylesheets/decidim/modules/_margins.scss +15 -0
  22. data/app/assets/stylesheets/decidim/modules/_modules.scss +56 -0
  23. data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +25 -5
  24. data/app/assets/stylesheets/decidim/modules/_order-by.scss +1 -0
  25. data/app/assets/stylesheets/decidim/modules/_process-header.scss +2 -1
  26. data/app/assets/stylesheets/decidim/modules/_process-phase.scss +0 -4
  27. data/app/assets/stylesheets/decidim/modules/_status-labels.scss +7 -1
  28. data/app/assets/stylesheets/decidim/modules/_typography.scss +17 -0
  29. data/app/assets/stylesheets/decidim/utils/_fontface.scss +3 -3
  30. data/app/assets/stylesheets/decidim/utils/_settings.scss +10 -7
  31. data/app/commands/decidim/invite_user.rb +2 -2
  32. data/app/commands/decidim/update_account.rb +48 -0
  33. data/app/controllers/concerns/decidim/form_factory.rb +1 -1
  34. data/app/controllers/concerns/decidim/needs_authorization.rb +12 -1
  35. data/app/controllers/concerns/decidim/user_profile.rb +30 -0
  36. data/app/controllers/decidim/account_controller.rb +28 -10
  37. data/app/controllers/decidim/authorizations_controller.rb +21 -8
  38. data/app/controllers/decidim/devise/invitations_controller.rb +2 -0
  39. data/app/controllers/decidim/devise/sessions_controller.rb +1 -1
  40. data/app/controllers/decidim/own_user_groups_controller.rb +14 -0
  41. data/app/controllers/decidim/participatory_processes_controller.rb +1 -1
  42. data/app/forms/decidim/account_form.rb +41 -0
  43. data/app/helpers/decidim/aria_selected_link_to_helper.rb +26 -0
  44. data/app/helpers/decidim/attachments_helper.rb +15 -0
  45. data/app/helpers/decidim/filters_helper.rb +2 -3
  46. data/app/helpers/decidim/layout_helper.rb +29 -6
  47. data/app/helpers/decidim/resource_helper.rb +64 -0
  48. data/app/helpers/decidim/user_profile_helper.rb +23 -0
  49. data/app/mailers/decidim/decidim_devise_mailer.rb +1 -0
  50. data/app/models/decidim/abilities/everyone.rb +5 -1
  51. data/app/models/decidim/ability.rb +3 -4
  52. data/app/models/decidim/{participatory_process_attachment.rb → attachment.rb} +5 -5
  53. data/app/models/decidim/feature.rb +2 -0
  54. data/app/models/decidim/organization.rb +1 -0
  55. data/app/models/decidim/participatory_process.rb +2 -5
  56. data/app/models/decidim/resource_link.rb +28 -0
  57. data/app/models/decidim/user.rb +6 -0
  58. data/app/models/decidim/user_group.rb +10 -1
  59. data/app/services/decidim/resource_search.rb +1 -4
  60. data/app/types/decidim/session_type.rb +16 -0
  61. data/app/types/decidim/user_group_type.rb +20 -0
  62. data/app/types/decidim/user_type.rb +5 -1
  63. data/app/uploaders/decidim/attachment_uploader.rb +4 -1
  64. data/app/uploaders/decidim/avatar_uploader.rb +8 -0
  65. data/app/uploaders/decidim/banner_image_uploader.rb +1 -0
  66. data/app/uploaders/decidim/hero_image_uploader.rb +1 -0
  67. data/app/uploaders/decidim/homepage_image_uploader.rb +5 -1
  68. data/app/uploaders/decidim/image_uploader.rb +1 -1
  69. data/app/uploaders/decidim/organization_favicon_uploader.rb +17 -0
  70. data/app/uploaders/decidim/organization_logo_uploader.rb +2 -2
  71. data/app/validators/feature_validator.rb +23 -0
  72. data/app/views/decidim/account/_password_fields.html.erb +2 -0
  73. data/app/views/decidim/account/_user_groups.html.erb +0 -0
  74. data/app/views/decidim/account/show.html.erb +24 -29
  75. data/app/views/decidim/application/_attachments.html.erb +8 -0
  76. data/app/views/decidim/{participatory_processes → application}/_documents.html.erb +0 -0
  77. data/app/views/decidim/{participatory_processes → application}/_photos.html.erb +0 -0
  78. data/app/views/decidim/authorizations/first_login.html.erb +22 -0
  79. data/app/views/decidim/authorizations/index.html.erb +46 -19
  80. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
  81. data/app/views/decidim/devise/registrations/new.html.erb +1 -1
  82. data/app/views/decidim/own_user_groups/index.html.erb +24 -0
  83. data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +1 -1
  84. data/app/views/decidim/participatory_process_steps/index.html.erb +3 -1
  85. data/app/views/decidim/participatory_processes/_participatory_process.html.erb +2 -2
  86. data/app/views/decidim/participatory_processes/_promoted_process.html.erb +1 -1
  87. data/app/views/decidim/participatory_processes/index.html.erb +2 -0
  88. data/app/views/decidim/participatory_processes/show.html.erb +37 -8
  89. data/app/views/decidim/shared/_comments.html.erb +0 -0
  90. data/app/views/layouts/decidim/_application.html.erb +5 -3
  91. data/app/views/layouts/decidim/_header.html.erb +4 -4
  92. data/app/views/layouts/decidim/_logo.html.erb +29 -17
  93. data/app/views/layouts/decidim/_process_header.html.erb +15 -3
  94. data/app/views/layouts/decidim/_process_header_steps.html.erb +1 -1
  95. data/app/views/layouts/decidim/_user_menu.html.erb +3 -0
  96. data/app/views/layouts/decidim/mailer.html.erb +1 -1
  97. data/app/views/layouts/decidim/user_profile.html.erb +35 -0
  98. data/app/views/pages/home.html.erb +5 -139
  99. data/app/views/pages/home/_extended.html.erb +48 -0
  100. data/app/views/pages/home/_hero.html.erb +20 -0
  101. data/app/views/pages/home/_highlighted_processes.html.erb +37 -0
  102. data/app/views/pages/home/_statistics.html.erb +22 -0
  103. data/app/views/pages/home/_sub_hero.html.erb +11 -0
  104. data/config/i18n-tasks.yml +1 -0
  105. data/config/initializers/foundation_rails_helper.rb +2 -0
  106. data/config/locales/ca.yml +69 -33
  107. data/config/locales/en.yml +86 -29
  108. data/config/locales/es.yml +68 -32
  109. data/config/routes.rb +8 -3
  110. data/db/migrate/20161116115156_create_attachments.rb +0 -2
  111. data/db/migrate/20170113150627_create_resource_links.rb +10 -0
  112. data/db/migrate/20170123134023_make_attachments_polymorphic.rb +18 -0
  113. data/db/migrate/20170123140857_add_avatar_to_user_groups.rb +5 -0
  114. data/db/migrate/20170125135937_rename_attachable_to_attached_to.rb +11 -0
  115. data/db/migrate/20170125152026_add_weight_to_features.rb +5 -0
  116. data/db/migrate/20170126151123_add_extra_info_to_processes.rb +8 -0
  117. data/db/migrate/20170128140553_add_timestamps_to_identities.rb +5 -0
  118. data/db/migrate/20170130132833_add_favicon_to_decidim_organizations.rb +5 -0
  119. data/db/seeds.rb +38 -6
  120. data/lib/decidim/authorable.rb +32 -0
  121. data/lib/decidim/core.rb +37 -0
  122. data/lib/decidim/core/engine.rb +2 -3
  123. data/lib/decidim/core/test.rb +6 -0
  124. data/lib/decidim/core/test/factories.rb +24 -3
  125. data/lib/decidim/core/test/shared_examples/authorable.rb +31 -0
  126. data/lib/decidim/core/test/shared_examples/has_attachments.rb +29 -0
  127. data/lib/decidim/core/test/shared_examples/has_category.rb +10 -0
  128. data/lib/decidim/core/test/shared_examples/has_feature.rb +20 -0
  129. data/lib/decidim/core/test/shared_examples/has_scope.rb +10 -0
  130. data/lib/decidim/core/version.rb +1 -1
  131. data/lib/decidim/feature_manifest.rb +31 -1
  132. data/lib/decidim/features/base_controller.rb +10 -0
  133. data/lib/decidim/features/settings_manifest.rb +1 -0
  134. data/lib/decidim/has_attachment.rb +32 -0
  135. data/lib/decidim/has_attachments.rb +32 -0
  136. data/lib/decidim/has_category.rb +21 -0
  137. data/lib/decidim/has_feature.rb +20 -0
  138. data/lib/decidim/has_scope.rb +21 -0
  139. data/lib/decidim/query_extensions.rb +2 -2
  140. data/lib/decidim/resource_manifest.rb +80 -0
  141. data/lib/decidim/resourceable.rb +85 -0
  142. metadata +67 -40
  143. data/app/assets/javascripts/decidim/inline_svg.js.es6 +0 -12
  144. data/app/assets/stylesheets/decidim/application.sass +0 -12
  145. data/app/assets/stylesheets/decidim/extras/_turbolinks.scss +0 -3
  146. data/app/assets/stylesheets/decidim/modules/_popularity.scss +0 -74
  147. data/app/assets/stylesheets/decidim/utils/_variables.scss +0 -22
  148. data/app/views/decidim/account/_authorizations.html.erb +0 -52
  149. data/vendor/assets/javascripts/owl.carousel.min.js +0 -47
  150. data/vendor/assets/javascripts/svg-injector.js +0 -464
@@ -16,7 +16,7 @@
16
16
  <%= form_for(@form, as: resource_name, url: omniauth_registrations_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
17
17
  <div class="user-person">
18
18
  <div class="field">
19
- <%= f.text_field :name, help_text: t("devise.registrations.new.username_help") %>
19
+ <%= f.text_field :name, help_text: t(".username_help"), label: t(".username_help") %>
20
20
  </div>
21
21
  </div>
22
22
 
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
 
40
40
  <div class="field">
41
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
41
+ <%= f.password_field :password_confirmation %>
42
42
  </div>
43
43
 
44
44
  <div class="user-group-fields">
@@ -0,0 +1,24 @@
1
+ <div class="row column">
2
+ <section class="section">
3
+ <div class="card card--list">
4
+ <% @user_groups.each do |user_group| %>
5
+ <div class="card--list__item">
6
+ <div class="card--list__text">
7
+ <div>
8
+ <h5 class="card--list__heading">
9
+ <%= user_group.name %>
10
+ </h5>
11
+
12
+ <span class="text-small"><%= l(user_group.created_at, format: :long) %></span>
13
+
14
+ <% if user_group.verified? %>
15
+ <span class="success label"><%= t('.verified') %></span>
16
+ <% else %>
17
+ <span class="warning label"><%= t('.not_verified') %></span>
18
+ <% end %>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <% end %>
23
+ </div>
24
+ </div>
@@ -7,7 +7,7 @@
7
7
  <span class="timeline__date text-small">
8
8
  <%= participatory_process_step_dates(participatory_process_step) %>
9
9
  </span>
10
- <h6 class="timeline__title heading6"><%= t('.info') %></h6>
10
+ <h6 class="timeline__title heading6"><%= translated_attribute(participatory_process_step.title) %></h6>
11
11
  </div>
12
12
  <div class="timeline__content">
13
13
  <%= translated_attribute(participatory_process_step.description).html_safe %>
@@ -1,4 +1,6 @@
1
- <main class="wrapper steps">
1
+ <% content_for :meta_title, t(".title") %>
2
+
3
+ <main class="steps">
2
4
  <div class="row column">
3
5
  <div class="row">
4
6
  <div class="columns mediumlarge-9 large-7">
@@ -1,12 +1,12 @@
1
1
  <div class="column">
2
2
  <article class="card card--process">
3
3
  <div class="card__image-top"
4
- style="background-image:url(<%= participatory_process.banner_image.url %>)"></div>
4
+ style="background-image:url(<%= participatory_process.hero_image.url %>)"></div>
5
5
  <div class="card__content">
6
6
  <%= link_to participatory_process_path(participatory_process), class: "card__link" do %>
7
7
  <h4 class="card__title"><%= translated_attribute participatory_process.title %></h4>
8
8
  <% end %>
9
- <p class="card__desc"><%== translated_attribute(participatory_process.short_description) %></p>
9
+ <p class="card__desc"><%== html_truncate(translated_attribute(participatory_process.short_description), length: 630, separator: '...') %></p>
10
10
  </div>
11
11
  <div class="card__footer">
12
12
  <div class="card__support">
@@ -5,7 +5,7 @@
5
5
  <%= link_to participatory_process_path(promoted_process), class: "card__link" do %>
6
6
  <h2 class="card__title"><%= translated_attribute promoted_process.title %></h2>
7
7
  <% end %>
8
- <%== html_truncate(translated_attribute(promoted_process.description), length: 630, separator: ' ') %>
8
+ <%== html_truncate(translated_attribute(promoted_process.short_description), length: 630, separator: '...') %>
9
9
  <%= link_to participatory_process_path(promoted_process), class: "button secondary small hollow card__button" do %>
10
10
  <%= t(".more_info", scope: "layouts") %>
11
11
  <% end %>
@@ -1,3 +1,5 @@
1
+ <% content_for :meta_title, t(".title") %>
2
+
1
3
  <main class="wrapper">
2
4
  <% if promoted_processes.any? %>
3
5
  <section id ="highlighted-processes" class="row section">
@@ -1,3 +1,7 @@
1
+ <% content_for :meta_description, translated_attribute(current_participatory_process.short_description) %>
2
+ <% content_for :meta_title, translated_attribute(current_participatory_process.title) %>
3
+ <% content_for :meta_url, participatory_process_url(current_participatory_process) %>
4
+
1
5
  <div class="row column">
2
6
  <div class="row">
3
7
  <div class="columns medium-7 mediumlarge-8">
@@ -8,13 +12,38 @@
8
12
  <%== translated_attribute(current_participatory_process.description) %>
9
13
  </div>
10
14
  </div>
11
- </div>
12
- </div>
13
- <% if current_participatory_process.attachments.any? %>
14
- <div class="row attachments">
15
- <div class="columns large-8">
16
- <%= render partial: "documents", locals: { documents: current_participatory_process.documents } %>
17
- <%= render partial: "photos", locals: { photos: current_participatory_process.photos } %>
15
+ <div class="section columns medium-5 mediumlarge-4 large-3">
16
+ <div class="card extra definition-data">
17
+ <% if translated_attribute(current_participatory_process.scope).present? %>
18
+ <div class="definition-data__item scope">
19
+ <span class="definition-data__title"><%= t(".scope") =%></span>
20
+ <%== translated_attribute(current_participatory_process.scope) %>
21
+ </div>
22
+ <% end %>
23
+
24
+ <% if current_participatory_process.end_date.present? %>
25
+ <div class="definition-data__item end-date">
26
+ <span class="definition-data__title"><%= t(".end_date")=%></span>
27
+ <%== l(current_participatory_process.end_date, format: :long) %>
28
+ </div>
29
+ <% end %>
30
+
31
+ <% if current_participatory_process.developer_group.present? %>
32
+ <div class="definition-data__item developer-group">
33
+ <span class="definition-data__title"><%= t(".developer_group") =%></span>
34
+ <%== current_participatory_process.developer_group %>
35
+ </div>
36
+ <% end %>
37
+
38
+ <% if translated_attribute(current_participatory_process.domain).present? %>
39
+ <div class="definition-data__item domain">
40
+ <span class="definition-data__title"><%= t(".domain") =%></span>
41
+ <%== translated_attribute(current_participatory_process.domain) %>
42
+ </div>
43
+ <% end %>
44
+ </div>
18
45
  </div>
19
46
  </div>
20
- <% end %>
47
+
48
+ <%= attachments_for current_participatory_process %>
49
+ </div>
File without changes
@@ -1,13 +1,15 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html class="no-js">
3
3
  <head>
4
4
  <title><%= decidim_page_title %></title>
5
5
  <%= csrf_meta_tags %>
6
6
 
7
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
- <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
7
  <%= render partial: 'layouts/decidim/meta' %>
10
8
  <%= render partial: 'layouts/decidim/social_meta' %>
9
+
10
+ <%= favicon %>
11
+ <%= stylesheet_link_tag 'application', media: 'all' %>
12
+ <%= javascript_include_tag 'application' %>
11
13
  </head>
12
14
 
13
15
  <body>
@@ -19,9 +19,9 @@
19
19
  creates a sticky footer-->
20
20
  <!-- Topbar -->
21
21
  <div class="title-bar">
22
- <div class="row topbar">
22
+ <div class="row column topbar">
23
23
  <div class="logo-wrapper">
24
- <%= render partial: "layouts/decidim/logo" %>
24
+ <%= render partial: "layouts/decidim/logo", locals: { organization: current_organization } %>
25
25
  </div>
26
26
  <%= render partial: "layouts/decidim/language_chooser" %>
27
27
  <div class="hide-for-medium topbar__menu">
@@ -34,7 +34,7 @@
34
34
  <ul class="dropdown menu" data-dropdown-menu>
35
35
  <li class="is-dropdown-submenu-parent show-for-medium">
36
36
  <%= link_to current_user.name, decidim.account_path %>
37
- <ul class="menu is-dropdown-subeenu js-append usermenu-off-canvas">
37
+ <ul class="menu is-dropdown-submenu js-append usermenu-off-canvas">
38
38
  <%= render partial: "layouts/decidim/user_menu" %>
39
39
  </ul>
40
40
  <span data-set="nav-login-holder" class="show-for-medium">
@@ -58,7 +58,7 @@
58
58
  </div>
59
59
  <div class="show-for-medium" data-set="nav-holder">
60
60
  <nav class="navbar js-append">
61
- <div class="row">
61
+ <div class="row column">
62
62
  <ul class="main-nav">
63
63
  <li>
64
64
  <%= active_link_to t("menu.home", scope: "decidim"), decidim.root_path, active: :exact, class: "main-nav__link", class_active: "main-nav__link--active" %>
@@ -1,19 +1,31 @@
1
- <%= link_to root_path do %>
2
- <% if current_organization.logo.present? %>
3
- <%= image_tag current_organization.logo.medium.url, height: "20" %>
4
- <% else %>
5
- <!-- Remove this, use the final SVG logo -->
6
- <span><%= current_organization.name %></span>
7
- <style>
8
- .logo-wrapper span{ color: white; font-weight: 600;
9
- font-size: 1.4em;
10
- display: inline-block; text-align: left;
11
- padding-left: 8px; line-height: 1;
12
- position: relative; }
13
- .logo-wrapper span:before{ content: ""; display: block;
14
- position: absolute; border-left: 4px solid white; height: 88%;
15
- top: 6%; left: 0; }
16
- </style>
17
- <!-- /Remove-->
1
+ <% if organization %>
2
+ <%= link_to root_url(host: organization.host) do %>
3
+ <% if organization.logo.present? %>
4
+ <%= image_tag organization.logo.medium.url %>
5
+ <% else %>
6
+ <span><%= organization.name %></span>
7
+ <style>
8
+ .logo-wrapper span{
9
+ color: white;
10
+ font-weight: 600;
11
+ font-size: 1.4em;
12
+ display: inline-block;
13
+ text-align: left;
14
+ padding-left: 8px;
15
+ line-height: 1;
16
+ position: relative;
17
+ }
18
+ .logo-wrapper span:before{
19
+ content: "";
20
+ display: block;
21
+ position: absolute;
22
+ border-left: 4px solid white;
23
+ height: 88%;
24
+ top: 6%; left: 0;
25
+ }
26
+ </style>
27
+ <% end %>
18
28
  <% end %>
29
+ <% else %>
30
+ <%= Decidim.application_name %>
19
31
  <% end %>
@@ -19,9 +19,21 @@
19
19
  <% if current_participatory_process.features.any? %>
20
20
  <div class="row column">
21
21
  <div class="process-nav">
22
- <div class="row column process-nav__content">
22
+ <button class="process-nav__trigger hide-for-medium" data-toggle="process-nav-content">
23
+ <%= icon "caret-bottom", class: "icon--small process-nav__trigger__icon", aria_label: t('.unfold'), role: "img" %>
24
+ <div class="process-nav__link">
25
+ <% if self.try(:current_feature) %>
26
+ <%= feature_icon(current_feature) %>
27
+ <%= translated_attribute(current_feature.name) %>
28
+ <% else %>
29
+ <%= icon "process" %>
30
+ <%= t ".process_menu_item" %>
31
+ <% end %>
32
+ </div>
33
+ </button>
34
+ <div class="row column process-nav__content" id="process-nav-content" data-toggler=".is-active">
23
35
  <ul>
24
- <li>
36
+ <li class="<%= "is-active" if is_active_link?(decidim.participatory_process_path(current_participatory_process), :exclusive) %>">
25
37
  <%= active_link_to decidim.participatory_process_path(current_participatory_process), active: :exact, class: "process-nav__link", class_active: "is-active" do %>
26
38
  <%= icon "process" %>
27
39
  <%= t ".process_menu_item" %>
@@ -29,7 +41,7 @@
29
41
  </li>
30
42
 
31
43
  <% current_participatory_process.features.each do |feature| %>
32
- <li>
44
+ <li class="<%= "is-active" if is_active_link?(decidim.feature_path(current_participatory_process, feature), :inclusive) %>">
33
45
  <%= active_link_to decidim.feature_path(current_participatory_process, feature), class: "process-nav__link", active: :inclusive, class_active: "is-active" do %>
34
46
  <%= feature_icon(feature) %>
35
47
 
@@ -13,7 +13,7 @@
13
13
  <% past_step = false if step.active? %>
14
14
  <% end %>
15
15
  </ol>
16
- <span class="phase-current">Fase <%= participatory_process.active_step.position + 1 %> de <%= current_participatory_process.steps.count %></span>
16
+ <span class="phase-current"><%= t(".step", current: (participatory_process.active_step.position + 1), total: current_participatory_process.steps.count) %></span>
17
17
  </div>
18
18
  <div>
19
19
  <span class="phase-title"><%= translated_attribute participatory_process.active_step.title %></span>
@@ -1,2 +1,5 @@
1
1
  <li><%= link_to t(".profile"), decidim.account_path %></li>
2
+ <% if can? :read, :admin_dashboard %>
3
+ <li><%= link_to t(".admin_dashboard"), decidim_admin.root_path %></li>
4
+ <% end %>
2
5
  <li><%= link_to t(".sign_out"), decidim.destroy_user_session_path, method: :delete, class: "sign-out-link" %></li>
@@ -19,7 +19,7 @@
19
19
  <tr>
20
20
  <th class="small-12 first columns decidim-bar">
21
21
  <center class="decidim-logo">
22
- <%= link_to @organization.name, root_url(host: @organization.host) %>
22
+ <%= render partial: "layouts/decidim/logo", locals: { organization: @organization } %>
23
23
  </center>
24
24
  </th>
25
25
  <th class="expander"></th>
@@ -0,0 +1,35 @@
1
+ <%= render "layouts/decidim/application" do %>
2
+ <main class="wrapper">
3
+ <div class="row collapse">
4
+ <div class="columns">
5
+ <h1 class="heading1 user-header"><%= t("title", scope: "layouts.decidim.user_profile") %></h1>
6
+ </div>
7
+ </div>
8
+ <div class="row collapse">
9
+ <div class="main-container">
10
+ <div class="row collapse main-container--side-panel">
11
+ <div class="columns medium-4 large-3">
12
+ <div class="side-panel">
13
+ <ul class="tabs vertical side-panel__tabs" id="user-settings-tabs">
14
+ <%= user_profile_tab t("account", scope: "layouts.decidim.user_profile"), account_path %>
15
+ <% if available_authorization_handlers.any? %>
16
+ <%= user_profile_tab t("authorizations", scope: "layouts.decidim.user_profile"), authorizations_path %>
17
+ <% end %>
18
+ <% if user_groups.any? %>
19
+ <%= user_profile_tab t("user_groups", scope: "layouts.decidim.user_profile"), own_user_groups_path %>
20
+ <% end %>
21
+ </ul>
22
+ </div>
23
+ </div>
24
+ <div class="columns medium-8 large-9">
25
+ <div class="main-container__content">
26
+ <div class="tabs-content vertical" aria-hidden="false">
27
+ <%= yield %>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </main>
35
+ <% end %>
@@ -1,147 +1,13 @@
1
- <section class="extended hero" style="background-image:url(<%= current_organization.homepage_image.url %>);">
2
- <div class="hero__container">
3
- <div class="row">
4
- <div class="columns small-centered large-10">
5
- <h1 class="text-highlight heading1 hero-heading">
6
- <% if translated_attribute(current_organization.welcome_text).blank? %>
7
- <%= t('.welcome', organization: current_organization.name) %>
8
- <% else %>
9
- <%== translated_attribute current_organization.welcome_text %>
10
- <% end %>
11
- </h1>
12
- </div>
13
- </div>
14
- <div class="row">
15
- <div class="columns small-centered small-6 medium-4 mediumlarge-3">
16
- <%= link_to t('.register'), new_user_registration_path, class: "hero-cta button expanded large button--sc" %>
17
- </div>
18
- </div>
19
- </div>
20
- </section>
1
+ <%= render partial: 'pages/home/hero' %>
21
2
 
22
3
  <% if !translated_attribute(current_organization.description).blank? %>
23
- <section class="extended subhero home-section">
24
- <div class="row">
25
- <div class="columns small-centered large-10">
26
- <h2 class="heading3"><%== translated_attribute current_organization.description %></h2>
27
- <%= link_to new_user_registration_path, class: "button--sc link subhero-cta" do %>
28
- <%= t(".register") %>
29
- <%= icon "chevron-right", aria_hidden: true %>
30
- <% end %>
31
- </div>
32
- </div>
33
- </section>
4
+ <%= render partial: 'pages/home/sub_hero' %>
34
5
  <% end %>
35
6
 
36
- <section class="wrapper-home">
37
- <div class="row">
38
- <h3 class="section-heading"><%= t(".highlighted_processes") %></h3>
39
- <div class="row collapse">
40
- <div class="row small-up-1 smallmedium-up-2 mediumlarge-up-3
41
- large-up-4 card-grid">
42
- <% promoted_participatory_processes.each do |process| %>
43
- <div class="column">
44
- <article class="card card--process card--mini">
45
- <%= link_to participatory_process_path(process), class: "card__link" do %>
46
- <div class="card__image-top"
47
- style="background-image:url(<%= process.banner_image.url %>)"></div>
48
- <% end %>
49
- <div class="card__content">
50
- <%= link_to participatory_process_path(process), class: "card__link" do %>
51
- <h4 class="card__title"><%= translated_attribute process.title %></h4>
52
- <% end %>
53
- <% if process.active_step %>
54
- <span class="card--process__small">
55
- <%= t(".active_step") %>
56
- <strong><%= translated_attribute process.active_step.title %></strong>
57
- </span>
58
- <% end %>
59
- </div>
60
- </article>
61
- </div>
62
- <% end %>
63
- </div>
64
- </div>
65
- </div>
66
- <div class="row">
67
- <div class="columns small-centered small-12
68
- smallmedium-8 medium-6 large-4">
69
- <%= link_to t(".see_all_processes"), participatory_processes_path, class: "button expanded hollow button--sc home-section__cta" %>
70
- </div>
71
- </div>
72
- </section>
7
+ <%= render partial: 'pages/home/highlighted_processes' %>
73
8
 
74
- <section class="extended">
75
- <div class="wrapper-home home-section">
76
- <div class="row column text-center">
77
- <h3 class="heading2"><%t(".how_to_participate") %></h3>
78
- </div>
79
- <div class="row small-up-1 medium-up-3 home-bullets">
80
- <div class="column">
81
- <div class="home-bullet">
82
- <div class="home-bullet__icon">
83
- <%= icon "meetings" %>
84
- </div>
85
- <div class="home-bullet__desc">
86
- <h4 class="heading6"><%= t(".meetings") %></h4>
87
- <p><%= t(".meetings_explanation") %></p>
88
- </div>
89
- </div>
90
- </div>
91
- <div class="column">
92
- <div class="home-bullet">
93
- <div class="home-bullet__icon">
94
- <%= icon "debates" %>
95
- </div>
96
- <div class="home-bullet__desc">
97
- <h4 class="heading6"><%= t(".debates") %></h4>
98
- <p><%= t(".debates_explanation") %></p>
99
- </div>
100
- </div>
101
- </div>
102
- <div class="column">
103
- <div class="home-bullet">
104
- <div class="home-bullet__icon">
105
- <%= icon "proposals" %>
106
- </div>
107
- <div class="home-bullet__desc">
108
- <h4 class="heading6"><%= t(".proposals") %></h4>
109
- <p><%= t(".proposals_explanation") %></p>
110
- </div>
111
- </div>
112
- </div>
113
- </div>
114
- <div class="row">
115
- <div class="columns small-centered small-10
116
- smallmedium-8 medium-6 large-4">
117
- <%= link_to t(".more_info"), page_path("faq"), class: "button expanded hollow button--sc" %>
118
- </div>
119
- </div>
120
- </div>
121
- </section>
9
+ <%= render partial: 'pages/home/extended' %>
122
10
 
123
11
  <% if current_organization.show_statistics? %>
124
- <section class="extended" id="statistics">
125
- <div class="wrapper-home">
126
- <div class="row column text-center">
127
- <h3 class="heading2"><%= t(".stats.headline", organization: current_organization.name) %></h3>
128
- </div>
129
- <div class="row">
130
- <div class="columns small-centered mediumlarge-10 large-8">
131
- <div class="home-pam">
132
- <div class="home-pam__highlight">
133
- <div class="home-pam__data">
134
- <h4 class="home-pam__title"><%= t(".stats.users") %></h4>
135
- <span class="home-pam__number users-count"><%= users.count %></span>
136
- </div>
137
- <div class="home-pam__data">
138
- <h4 class="home-pam__title"><%= t(".stats.processes") %></h4>
139
- <span class="home-pam__number processes-count"><%= participatory_processes.count %></span>
140
- </div>
141
- </div>
142
- </div>
143
- </div>
144
- </div>
145
- </div>
146
- </section>
12
+ <%= render partial: 'pages/home/statistics' %>
147
13
  <% end %>