decidim-core 0.0.1.alpha2 → 0.0.1.alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +11 -6
- data/app/assets/config/decidim_core_manifest.js +1 -0
- data/app/assets/images/decidim/badge-ajuntament-footer.png +0 -0
- data/app/assets/images/decidim/badge-ajuntament-header.svg +60 -0
- data/app/assets/images/decidim/cc-badge.png +0 -0
- data/app/assets/images/decidim/hero-home.jpg +0 -0
- data/app/assets/images/decidim/icons.svg +1 -0
- data/app/assets/javascripts/decidim.js +12 -1
- data/app/assets/stylesheets/{decidim.css → decidim.scss} +2 -1
- data/app/assets/stylesheets/decidim/application.sass +7 -0
- data/app/assets/stylesheets/decidim/layouts/_home.scss +244 -0
- data/app/assets/stylesheets/decidim/layouts/_user.scss +24 -0
- data/app/assets/stylesheets/decidim/layouts/_view.scss +22 -0
- data/app/assets/stylesheets/decidim/modules/_address.scss +26 -0
- data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +119 -0
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +120 -0
- data/app/assets/stylesheets/decidim/modules/_callout.scss +25 -0
- data/app/assets/stylesheets/decidim/modules/_card-grid.scss +22 -0
- data/app/assets/stylesheets/decidim/modules/_cards.scss +520 -0
- data/app/assets/stylesheets/decidim/modules/_comments.scss +119 -0
- data/app/assets/stylesheets/decidim/modules/_defintion-data.scss +54 -0
- data/app/assets/stylesheets/decidim/modules/_extra.scss +43 -0
- data/app/assets/stylesheets/decidim/modules/_filters.scss +96 -0
- data/app/assets/stylesheets/decidim/modules/_flag.scss +9 -0
- data/app/assets/stylesheets/decidim/modules/_footer.scss +90 -0
- data/app/assets/stylesheets/decidim/modules/_forms.scss +30 -0
- data/app/assets/stylesheets/decidim/modules/_help.scss +14 -0
- data/app/assets/stylesheets/decidim/modules/_icons.scss +32 -0
- data/app/assets/stylesheets/decidim/modules/_layout.scss +58 -0
- data/app/assets/stylesheets/decidim/modules/_list-docs.scss +30 -0
- data/app/assets/stylesheets/decidim/modules/_main-container.scss +70 -0
- data/app/assets/stylesheets/decidim/modules/_map.scss +72 -0
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +258 -0
- data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +30 -0
- data/app/assets/stylesheets/decidim/modules/_order-by.scss +66 -0
- data/app/assets/stylesheets/decidim/modules/_owl-carousel.scss +72 -0
- data/app/assets/stylesheets/decidim/modules/_phase-nav.scss +177 -0
- data/app/assets/stylesheets/decidim/modules/_popularity.scss +74 -0
- data/app/assets/stylesheets/decidim/modules/_process-header.scss +125 -0
- data/app/assets/stylesheets/decidim/modules/_process-info.scss +44 -0
- data/app/assets/stylesheets/decidim/modules/_process-nav.scss +99 -0
- data/app/assets/stylesheets/decidim/modules/_reference.scss +6 -0
- data/app/assets/stylesheets/decidim/modules/_reveal.scss +20 -0
- data/app/assets/stylesheets/decidim/modules/_share.scss +28 -0
- data/app/assets/stylesheets/decidim/modules/_signup.scss +39 -0
- data/app/assets/stylesheets/decidim/modules/_static-pages.scss +46 -0
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +14 -0
- data/app/assets/stylesheets/decidim/modules/_tags.scss +29 -0
- data/app/assets/stylesheets/decidim/modules/_timeline.scss +189 -0
- data/app/assets/stylesheets/decidim/modules/_title-action.scss +28 -0
- data/app/assets/stylesheets/decidim/modules/_typography.scss +116 -0
- data/app/assets/stylesheets/decidim/modules/_user-form.scss +14 -0
- data/app/assets/stylesheets/decidim/modules/_video.scss +18 -0
- data/app/assets/stylesheets/decidim/utils/_fontface.scss +1 -0
- data/app/assets/stylesheets/decidim/utils/_helpers.sass +21 -0
- data/app/assets/stylesheets/decidim/utils/_keyframes.sass +13 -0
- data/app/assets/stylesheets/decidim/utils/_mixins.sass +33 -0
- data/app/assets/stylesheets/decidim/utils/_settings.scss +570 -0
- data/app/assets/stylesheets/decidim/utils/_toggle-expand.scss +8 -0
- data/app/assets/stylesheets/decidim/utils/_variables.scss +25 -0
- data/app/controllers/concerns/decidim/needs_organization.rb +31 -0
- data/app/controllers/decidim/application_controller.rb +1 -0
- data/app/controllers/decidim/devise/confirmations_controller.rb +10 -0
- data/app/controllers/decidim/devise/invitations_controller.rb +20 -0
- data/app/controllers/decidim/devise/passwords_controller.rb +10 -0
- data/app/controllers/decidim/devise/registrations_controller.rb +19 -0
- data/app/controllers/decidim/devise/sessions_controller.rb +10 -0
- data/app/helpers/decidim/application_helper.rb +3 -0
- data/app/helpers/decidim/layout_helper.rb +27 -0
- data/app/helpers/decidim/translations_helper.rb +16 -0
- data/app/mailers/decidim/decidim_devise_mailer.rb +11 -0
- data/app/middleware/decidim/current_organization.rb +28 -0
- data/app/models/decidim/organization.rb +9 -0
- data/app/models/decidim/participatory_process.rb +14 -0
- data/app/models/decidim/user.rb +28 -4
- data/app/views/decidim/devise/confirmations/new.html.erb +15 -0
- data/app/views/decidim/devise/invitations/edit.html.erb +14 -0
- data/app/views/decidim/devise/passwords/edit.html.erb +20 -0
- data/app/views/decidim/devise/passwords/new.html.erb +15 -0
- data/app/views/decidim/devise/registrations/edit.html.erb +35 -0
- data/app/views/decidim/devise/registrations/new.html.erb +23 -0
- data/app/views/decidim/devise/sessions/new.html.erb +23 -0
- data/app/views/decidim/devise/shared/_links.html.erb +25 -0
- data/app/views/decidim/home/show.html.erb +16 -4
- data/app/views/devise/mailer/confirmation_instructions.html.erb +4 -0
- data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +10 -0
- data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +11 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/layouts/decidim/_footer.html.erb +28 -2
- data/app/views/layouts/decidim/_header.html.erb +59 -2
- data/config/i18n-tasks.yml +120 -0
- data/config/initializers/devise.rb +58 -8
- data/config/locales/en.yml +35 -0
- data/config/routes.rb +12 -1
- data/db/migrate/20160919104837_create_decidim_organizations.rb +13 -0
- data/db/migrate/20160920140207_devise_invitable_add_to_decidim_users.rb +23 -0
- data/db/migrate/20160920141039_user_belongs_to_organization.rb +5 -0
- data/db/migrate/20160920141151_user_has_roles.rb +5 -0
- data/db/migrate/20161005130108_add_participatory_processes.rb +17 -0
- data/db/migrate/20161005153007_add_description_to_organizations.rb +9 -0
- data/db/migrate/20161006085629_add_confirmable_to_devise.rb +14 -0
- data/db/seeds.rb +35 -0
- data/lib/decidim/core.rb +0 -1
- data/lib/decidim/core/engine.rb +30 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/devise_failure_app.rb +36 -0
- data/lib/decidim/form_builder.rb +38 -0
- data/lib/decidim/translatable_attributes.rb +86 -0
- data/lib/devise/models/decidim_validatable.rb +67 -0
- data/lib/tasks/factory_girl.rake +16 -0
- metadata +254 -9
- data/config/locales/devise.en.yml +0 -62
- data/lib/decidim/testing_support/common_rake.rb +0 -13
- data/lib/generators/decidim/dummy_generator.rb +0 -58
- data/lib/generators/decidim/install_generator.rb +0 -76
- data/lib/generators/decidim/templates/initializer.rb +0 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<h2><%= t("devise.sessions.new.sign_in") %></h2>
|
|
2
|
+
|
|
3
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
|
4
|
+
<div class="field">
|
|
5
|
+
<%= f.email_field :email, autofocus: true %>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="field">
|
|
9
|
+
<%= f.password_field :password, autocomplete: "off" %>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<% if devise_mapping.rememberable? %>
|
|
13
|
+
<div class="field">
|
|
14
|
+
<%= f.check_box :remember_me %>
|
|
15
|
+
</div>
|
|
16
|
+
<% end %>
|
|
17
|
+
|
|
18
|
+
<div class="actions">
|
|
19
|
+
<%= f.submit t("devise.sessions.new.sign_in") %>
|
|
20
|
+
</div>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
<%= render "decidim/devise/shared/links" %>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%- if controller_name != "sessions" %>
|
|
2
|
+
<%= link_to t("devise.shared.links.sign_in"), new_session_path(resource_name) %><br />
|
|
3
|
+
<% end -%>
|
|
4
|
+
|
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != "registrations" %>
|
|
6
|
+
<%= link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name) %><br />
|
|
7
|
+
<% end -%>
|
|
8
|
+
|
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != "passwords" %>
|
|
10
|
+
<%= link_to t("devise.shared.links.forgot_your_password"), new_password_path(resource_name) %><br />
|
|
11
|
+
<% end -%>
|
|
12
|
+
|
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
|
|
14
|
+
<%= link_to t("devise.shared.links.didn_t_receive_confirmation_instructions"), new_confirmation_path(resource_name) %><br />
|
|
15
|
+
<% end -%>
|
|
16
|
+
|
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks" %>
|
|
18
|
+
<%= link_to t("devise.shared.links.didn_t_receive_unlock_instructions"), new_unlock_path(resource_name) %><br />
|
|
19
|
+
<% end -%>
|
|
20
|
+
|
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
23
|
+
<%= link_to t("devise.shared.links.sign_in_with_provider", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br />
|
|
24
|
+
<% end -%>
|
|
25
|
+
<% end -%>
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<section class="extended hero" style="background-image:url(<%= asset_url("decidim/hero-home.jpg") %>);">
|
|
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
|
+
<%= t('.welcome', organization: current_organization.name) %>
|
|
7
|
+
</h1>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="row">
|
|
11
|
+
<div class="columns small-centered small-6 medium-4 mediumlarge-3">
|
|
12
|
+
<%= link_to t('.register'), new_user_registration_path, class: "hero-cta button expanded large button--sc" %>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</section>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %></p>
|
|
2
|
+
|
|
3
|
+
<p><%= t("devise.mailer.invitation_instructions.someone_invited_you", application: Decidim.config.application_name) %></p>
|
|
4
|
+
<p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %></p>
|
|
5
|
+
|
|
6
|
+
<% if @resource.invitation_due_at %>
|
|
7
|
+
<p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %></p>
|
|
8
|
+
<% end %>
|
|
9
|
+
|
|
10
|
+
<p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %>
|
|
2
|
+
|
|
3
|
+
<%= t("devise.mailer.invitation_instructions.someone_invited_you", application: Decidim.config.application_name) %>
|
|
4
|
+
|
|
5
|
+
<%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %>
|
|
6
|
+
|
|
7
|
+
<% if @resource.invitation_due_at %>
|
|
8
|
+
<%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<%= strip_tags t("devise.mailer.invitation_instructions.ignore") %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<p><%= t('.greeting', recipient: @resource.email) %></p>
|
|
2
|
+
|
|
3
|
+
<p><%= t('.instruction') %></p>
|
|
4
|
+
|
|
5
|
+
<p><%= link_to t('.action'), edit_password_url(@resource, reset_password_token: @token, host: @resource.organization.host) %></p>
|
|
6
|
+
|
|
7
|
+
<p><%= t('.instruction_2') %></p>
|
|
8
|
+
<p><%= t('.instruction_3') %></p>
|
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
</main>
|
|
2
|
+
</div><!-- /.footer-separator -->
|
|
3
|
+
<div class="main-footer">
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div class="medium-8 large-6 large-offset-3 column main__footer__nav">
|
|
6
|
+
<ul class="footer-nav">
|
|
7
|
+
<li><a href="#"><%= t('.about') %></a></li>
|
|
8
|
+
<li><a href="#"><%= t('.terms_of_use') %></a></li>
|
|
9
|
+
<li><a href="#"><%= t('.accessibility') %></a></li>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="mini-footer">
|
|
15
|
+
<div class="row">
|
|
16
|
+
<div class="columns">
|
|
17
|
+
<a rel="license" class="cc-badge"
|
|
18
|
+
href="http://creativecommons.org/licenses/by-sa/4.0/"
|
|
19
|
+
target="_blank">
|
|
20
|
+
<%= image_tag("decidim/cc-badge.png", alt: "Creative Commons License" ) %>
|
|
21
|
+
</a>
|
|
22
|
+
<%= t('.made_with_open_source').html_safe %>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div><!--/.off-canvas-content-->
|
|
27
|
+
</div><!--/.off-canvas-wrapper-inner-->
|
|
28
|
+
</div><!--/.off-canvas-wrapper-->
|
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
1
|
+
<div class="off-canvas-wrapper">
|
|
2
|
+
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
|
|
3
|
+
<div class="off-canvas position-right" data-position="right"
|
|
4
|
+
id="offCanvas" data-off-canvas>
|
|
5
|
+
<!-- Close button -->
|
|
6
|
+
<button class="close-button"
|
|
7
|
+
aria-label="<%= t(".close_menu") %>" type="button"
|
|
8
|
+
data-close>
|
|
9
|
+
<span aria-hidden="true">×</span>
|
|
10
|
+
</button>
|
|
11
|
+
<!-- Menu -->
|
|
12
|
+
<div class="hide-for-medium" data-set="nav-holder"></div>
|
|
13
|
+
<div class="hide-for-medium usermenu-off-canvas-holder"
|
|
14
|
+
data-set="nav-login-holder"></div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="off-canvas-content" data-off-canvas-content>
|
|
17
|
+
<div class="footer-separator">
|
|
18
|
+
<!--separates the footer from the rest of the page,
|
|
19
|
+
creates a sticky footer-->
|
|
20
|
+
<!-- Topbar -->
|
|
21
|
+
<div class="title-bar">
|
|
22
|
+
<div class="row topbar">
|
|
23
|
+
<div class="logo-wrapper">
|
|
24
|
+
<a href="/">
|
|
25
|
+
<!-- Remove this, use the final SVG logo -->
|
|
26
|
+
<span><%= current_organization.name %></span>
|
|
27
|
+
<style>
|
|
28
|
+
.logo-wrapper span{ color: white; font-weight: 600;
|
|
29
|
+
display: inline-block; text-align: left;
|
|
30
|
+
padding-left: 8px; line-height: 1;
|
|
31
|
+
position: relative; }
|
|
32
|
+
.logo-wrapper span:before{ content: ""; display: block;
|
|
33
|
+
position: absolute; border-left: 4px solid white; height: 88%;
|
|
34
|
+
top: 6%; left: 0; }
|
|
35
|
+
</style>
|
|
36
|
+
<!-- /Remove-->
|
|
37
|
+
</a>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="hide-for-medium topbar__menu">
|
|
40
|
+
<button type="button" data-toggle="offCanvas">
|
|
41
|
+
<%= icon "menu", aria_label: t('.navigation'), role: "img" %>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="show-for-medium" data-set="nav-holder">
|
|
47
|
+
<nav class="navbar js-append">
|
|
48
|
+
<div class="row">
|
|
49
|
+
<ul class="main-nav">
|
|
50
|
+
<li>
|
|
51
|
+
<%= active_link_to t("menu.home", scope: "decidim"), root_path, active: :exact, class: "main-nav__link", active_class: "main-nav__link-active" %>
|
|
52
|
+
</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
</nav>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<main>
|
|
59
|
+
<%= display_flash_messages %>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
|
|
2
|
+
|
|
3
|
+
# The "main" locale.
|
|
4
|
+
base_locale: en
|
|
5
|
+
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
|
|
6
|
+
# locales: [es, fr]
|
|
7
|
+
## Reporting locale, default: en. Available: en, ru.
|
|
8
|
+
# internal_locale: en
|
|
9
|
+
|
|
10
|
+
# Read and write translations.
|
|
11
|
+
data:
|
|
12
|
+
## Translations are read from the file system. Supported format: YAML, JSON.
|
|
13
|
+
## Provide a custom adapter:
|
|
14
|
+
# adapter: I18n::Tasks::Data::FileSystem
|
|
15
|
+
|
|
16
|
+
# Locale files or `File.find` patterns where translations are read from:
|
|
17
|
+
read:
|
|
18
|
+
## Default:
|
|
19
|
+
# - config/locales/%{locale}.yml
|
|
20
|
+
## More files:
|
|
21
|
+
# - config/locales/**/*.%{locale}.yml
|
|
22
|
+
## Another gem (replace %#= with %=):
|
|
23
|
+
# - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
|
|
24
|
+
|
|
25
|
+
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
|
26
|
+
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
|
27
|
+
write:
|
|
28
|
+
## For example, write devise and simple form keys to their respective files:
|
|
29
|
+
# - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
|
|
30
|
+
## Catch-all default:
|
|
31
|
+
# - config/locales/%{locale}.yml
|
|
32
|
+
|
|
33
|
+
## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
|
|
34
|
+
# router: convervative_router
|
|
35
|
+
|
|
36
|
+
yaml:
|
|
37
|
+
write:
|
|
38
|
+
# do not wrap lines at 80 characters
|
|
39
|
+
line_width: -1
|
|
40
|
+
|
|
41
|
+
## Pretty-print JSON:
|
|
42
|
+
# json:
|
|
43
|
+
# write:
|
|
44
|
+
# indent: ' '
|
|
45
|
+
# space: ' '
|
|
46
|
+
# object_nl: "\n"
|
|
47
|
+
# array_nl: "\n"
|
|
48
|
+
|
|
49
|
+
# Find translate calls
|
|
50
|
+
search:
|
|
51
|
+
## Paths or `File.find` patterns to search in:
|
|
52
|
+
# paths:
|
|
53
|
+
# - app/
|
|
54
|
+
|
|
55
|
+
## Root directories for relative keys resolution.
|
|
56
|
+
# relative_roots:
|
|
57
|
+
# - app/controllers
|
|
58
|
+
# - app/helpers
|
|
59
|
+
# - app/mailers
|
|
60
|
+
# - app/presenters
|
|
61
|
+
# - app/views
|
|
62
|
+
|
|
63
|
+
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
|
|
64
|
+
## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
|
|
65
|
+
exclude:
|
|
66
|
+
- app/assets/images
|
|
67
|
+
- app/assets/fonts
|
|
68
|
+
|
|
69
|
+
## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
|
|
70
|
+
## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
|
|
71
|
+
# only: ["*.rb", "*.html.slim"]
|
|
72
|
+
|
|
73
|
+
## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
|
|
74
|
+
# strict: true
|
|
75
|
+
|
|
76
|
+
## Multiple scanners can be used. Their results are merged.
|
|
77
|
+
## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
|
|
78
|
+
## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
|
|
79
|
+
|
|
80
|
+
## Google Translate
|
|
81
|
+
# translation:
|
|
82
|
+
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
|
|
83
|
+
# api_key: "AbC-dEf5"
|
|
84
|
+
|
|
85
|
+
## Do not consider these keys missing:
|
|
86
|
+
ignore_missing:
|
|
87
|
+
- '{devise,simple_form}.*'
|
|
88
|
+
|
|
89
|
+
## Consider these keys used:
|
|
90
|
+
ignore_unused:
|
|
91
|
+
- '{time.formats}.*'
|
|
92
|
+
# - 'activerecord.attributes.*'
|
|
93
|
+
# - '{devise,kaminari,will_paginate}.*'
|
|
94
|
+
# - 'simple_form.{yes,no}'
|
|
95
|
+
# - 'simple_form.{placeholders,hints,labels}.*'
|
|
96
|
+
# - 'simple_form.{error_notification,required}.:'
|
|
97
|
+
|
|
98
|
+
## Exclude these keys from the `i18n-tasks eq-base' report:
|
|
99
|
+
# ignore_eq_base:
|
|
100
|
+
# all:
|
|
101
|
+
# - common.ok
|
|
102
|
+
# fr,es:
|
|
103
|
+
# - common.brand
|
|
104
|
+
|
|
105
|
+
## Ignore these keys completely:
|
|
106
|
+
# ignore:
|
|
107
|
+
# - kaminari.*
|
|
108
|
+
|
|
109
|
+
## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
|
|
110
|
+
## e.g. in case of a relative key defined in a helper method.
|
|
111
|
+
## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
|
|
112
|
+
#
|
|
113
|
+
# <%#= I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
|
|
114
|
+
# only: %w(*.html.haml *.html.slim),
|
|
115
|
+
# patterns: [['= title\b', '.page_title']] %>
|
|
116
|
+
#
|
|
117
|
+
# The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
|
|
118
|
+
#
|
|
119
|
+
# <%#= I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
|
|
120
|
+
# patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
|
3
3
|
# Many of these configuration options can be set straight in your model.
|
|
4
|
+
|
|
5
|
+
require "decidim/devise_failure_app"
|
|
6
|
+
|
|
4
7
|
Devise.setup do |config|
|
|
5
8
|
# The secret key used by Devise. Devise uses this key to generate
|
|
6
9
|
# random tokens. Changing this key will render invalid all existing
|
|
@@ -16,12 +19,12 @@ Devise.setup do |config|
|
|
|
16
19
|
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
|
17
20
|
|
|
18
21
|
# Configure the class responsible to send e-mails.
|
|
19
|
-
|
|
22
|
+
config.mailer = "Decidim::DecidimDeviseMailer"
|
|
20
23
|
|
|
21
24
|
# Configure the parent class responsible to send e-mails.
|
|
22
25
|
config.parent_mailer = "Decidim::ApplicationMailer"
|
|
23
26
|
|
|
24
|
-
config.parent_controller = "
|
|
27
|
+
config.parent_controller = "ActionController::Base"
|
|
25
28
|
|
|
26
29
|
# ==> ORM configuration
|
|
27
30
|
# Load and configure the ORM. Supports :active_record (default) and
|
|
@@ -116,6 +119,54 @@ Devise.setup do |config|
|
|
|
116
119
|
# Send a notification email when the user's password is changed
|
|
117
120
|
# config.send_password_change_notification = false
|
|
118
121
|
|
|
122
|
+
# ==> Configuration for :invitable
|
|
123
|
+
# The period the generated invitation token is valid, after
|
|
124
|
+
# this period, the invited resource won't be able to accept the invitation.
|
|
125
|
+
# When invite_for is 0 (the default), the invitation won't expire.
|
|
126
|
+
config.invite_for = 2.weeks
|
|
127
|
+
|
|
128
|
+
# Number of invitations users can send.
|
|
129
|
+
# - If invitation_limit is nil, there is no limit for invitations, users can
|
|
130
|
+
# send unlimited invitations, invitation_limit column is not used.
|
|
131
|
+
# - If invitation_limit is 0, users can't send invitations by default.
|
|
132
|
+
# - If invitation_limit n > 0, users can send n invitations.
|
|
133
|
+
# You can change invitation_limit column for some users so they can send more
|
|
134
|
+
# or less invitations, even with global invitation_limit = 0
|
|
135
|
+
# Default: nil
|
|
136
|
+
# config.invitation_limit = 5
|
|
137
|
+
|
|
138
|
+
# The key to be used to check existing users when sending an invitation
|
|
139
|
+
# and the regexp used to test it when validate_on_invite is not set.
|
|
140
|
+
# config.invite_key = {:email => /\A[^@]+@[^@]+\z/}
|
|
141
|
+
# config.invite_key = {:email => /\A[^@]+@[^@]+\z/, :username => nil}
|
|
142
|
+
|
|
143
|
+
# Flag that force a record to be valid before being actually invited
|
|
144
|
+
# Default: false
|
|
145
|
+
# config.validate_on_invite = true
|
|
146
|
+
|
|
147
|
+
# Resend invitation if user with invited status is invited again
|
|
148
|
+
# Default: true
|
|
149
|
+
# config.resend_invitation = false
|
|
150
|
+
|
|
151
|
+
# The class name of the inviting model. If this is nil,
|
|
152
|
+
# the #invited_by association is declared to be polymorphic.
|
|
153
|
+
# Default: nil
|
|
154
|
+
# config.invited_by_class_name = 'User'
|
|
155
|
+
|
|
156
|
+
# The foreign key to the inviting model (if invited_by_class_name is set)
|
|
157
|
+
# Default: :invited_by_id
|
|
158
|
+
# config.invited_by_foreign_key = :invited_by_id
|
|
159
|
+
|
|
160
|
+
# The column name used for counter_cache column. If this is nil,
|
|
161
|
+
# the #invited_by association is declared without counter_cache.
|
|
162
|
+
# Default: nil
|
|
163
|
+
# config.invited_by_counter_cache = :invitations_count
|
|
164
|
+
|
|
165
|
+
# Auto-login after the user accepts the invite. If this is false,
|
|
166
|
+
# the user will need to manually log in after accepting the invite.
|
|
167
|
+
# Default: true
|
|
168
|
+
config.allow_insecure_sign_in_after_accept = true
|
|
169
|
+
|
|
119
170
|
# ==> Configuration for :confirmable
|
|
120
171
|
# A period that the user is allowed to access the website even without
|
|
121
172
|
# confirming their account. For instance, if set to 2.days, the user will be
|
|
@@ -223,7 +274,7 @@ Devise.setup do |config|
|
|
|
223
274
|
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
|
224
275
|
# "users/sessions/new". It's turned off by default because it's slower if you
|
|
225
276
|
# are using only default views.
|
|
226
|
-
|
|
277
|
+
config.scoped_views = true
|
|
227
278
|
|
|
228
279
|
# Configure the default scope given to Warden. By default it's the first
|
|
229
280
|
# devise role declared in your routes (usually :user).
|
|
@@ -256,10 +307,9 @@ Devise.setup do |config|
|
|
|
256
307
|
# If you want to use other strategies, that are not supported by Devise, or
|
|
257
308
|
# change the failure app, you can configure them inside the config.warden block.
|
|
258
309
|
#
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# end
|
|
310
|
+
config.warden do |manager|
|
|
311
|
+
manager.failure_app = Decidim::DeviseFailureApp
|
|
312
|
+
end
|
|
263
313
|
|
|
264
314
|
# ==> Mountable engine configurations
|
|
265
315
|
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
|
@@ -269,7 +319,7 @@ Devise.setup do |config|
|
|
|
269
319
|
# mount MyEngine, at: '/my_engine'
|
|
270
320
|
#
|
|
271
321
|
# The router that invoked `devise_for`, in the example above, would be:
|
|
272
|
-
config.router_name = :decidim
|
|
322
|
+
# config.router_name = :decidim
|
|
273
323
|
#
|
|
274
324
|
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
|
275
325
|
# so you need to do it manually. For the users scope, it would be:
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
en:
|
|
3
|
+
decidim:
|
|
4
|
+
home:
|
|
5
|
+
show:
|
|
6
|
+
register: Register
|
|
7
|
+
welcome: Welcome to %{organization}!
|
|
8
|
+
menu:
|
|
9
|
+
home: Home
|
|
10
|
+
devise:
|
|
11
|
+
mailer:
|
|
12
|
+
invitation_instructions:
|
|
13
|
+
accept: Accept invitation
|
|
14
|
+
accept_until: This invitation will be due in %{due_date}.
|
|
15
|
+
hello: Hello %{email}
|
|
16
|
+
ignore: |-
|
|
17
|
+
If you don't want to accept the invitation, please ignore this email.<br />
|
|
18
|
+
Your account won't be created until you access the link above and set your password.
|
|
19
|
+
someone_invited_you: Someone has invited you to %{application}, you can accept it through the link below.
|
|
20
|
+
layouts:
|
|
21
|
+
decidim:
|
|
22
|
+
footer:
|
|
23
|
+
about: About Decidim
|
|
24
|
+
accessibility: Accessibility
|
|
25
|
+
made_with_open_source: Website made with <a target="_blank" href="https://github.com/codegram/decidim">open-source software</a>.
|
|
26
|
+
terms_of_use: Terms Of Use
|
|
27
|
+
header:
|
|
28
|
+
close_menu: Close menu
|
|
29
|
+
navigation: Navigation
|
|
30
|
+
time:
|
|
31
|
+
formats:
|
|
32
|
+
devise:
|
|
33
|
+
mailer:
|
|
34
|
+
invitation_instructions:
|
|
35
|
+
accept_until_format: "%B %d, %Y %I:%M %p"
|