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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim.js.es6 +2 -4
- data/app/assets/javascripts/decidim/append_elements.js.es6 +1 -1
- data/app/assets/javascripts/decidim/editor.js.es6 +33 -35
- data/app/assets/javascripts/decidim/filters.js.es6 +9 -15
- data/app/assets/javascripts/decidim/form_filter.component.js.es6 +5 -5
- data/app/assets/javascripts/decidim/form_filter.component.test.js +1 -1
- data/app/assets/javascripts/decidim/foundation.js.es6 +17 -0
- data/app/assets/javascripts/decidim/user_registrations.js.es6 +2 -3
- data/app/assets/stylesheets/decidim/_decidim.scss +9 -0
- data/app/assets/stylesheets/decidim/_variables.scss +5 -11
- data/app/assets/stylesheets/decidim/application.scss.erb +6 -0
- data/app/assets/stylesheets/decidim/extras/_leaflet.scss +13 -0
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +8 -2
- data/app/assets/stylesheets/decidim/modules/_cards.scss +0 -2
- data/app/assets/stylesheets/decidim/modules/_comments.scss +33 -8
- data/app/assets/stylesheets/decidim/modules/{_defintion-data.scss → _definition-data.scss} +0 -0
- data/app/assets/stylesheets/decidim/modules/_filter-tags.scss +24 -0
- data/app/assets/stylesheets/decidim/modules/_layout.scss +1 -9
- data/app/assets/stylesheets/decidim/modules/_list-docs.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_margins.scss +15 -0
- data/app/assets/stylesheets/decidim/modules/_modules.scss +56 -0
- data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +25 -5
- data/app/assets/stylesheets/decidim/modules/_order-by.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_process-header.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_process-phase.scss +0 -4
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +7 -1
- data/app/assets/stylesheets/decidim/modules/_typography.scss +17 -0
- data/app/assets/stylesheets/decidim/utils/_fontface.scss +3 -3
- data/app/assets/stylesheets/decidim/utils/_settings.scss +10 -7
- data/app/commands/decidim/invite_user.rb +2 -2
- data/app/commands/decidim/update_account.rb +48 -0
- data/app/controllers/concerns/decidim/form_factory.rb +1 -1
- data/app/controllers/concerns/decidim/needs_authorization.rb +12 -1
- data/app/controllers/concerns/decidim/user_profile.rb +30 -0
- data/app/controllers/decidim/account_controller.rb +28 -10
- data/app/controllers/decidim/authorizations_controller.rb +21 -8
- data/app/controllers/decidim/devise/invitations_controller.rb +2 -0
- data/app/controllers/decidim/devise/sessions_controller.rb +1 -1
- data/app/controllers/decidim/own_user_groups_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes_controller.rb +1 -1
- data/app/forms/decidim/account_form.rb +41 -0
- data/app/helpers/decidim/aria_selected_link_to_helper.rb +26 -0
- data/app/helpers/decidim/attachments_helper.rb +15 -0
- data/app/helpers/decidim/filters_helper.rb +2 -3
- data/app/helpers/decidim/layout_helper.rb +29 -6
- data/app/helpers/decidim/resource_helper.rb +64 -0
- data/app/helpers/decidim/user_profile_helper.rb +23 -0
- data/app/mailers/decidim/decidim_devise_mailer.rb +1 -0
- data/app/models/decidim/abilities/everyone.rb +5 -1
- data/app/models/decidim/ability.rb +3 -4
- data/app/models/decidim/{participatory_process_attachment.rb → attachment.rb} +5 -5
- data/app/models/decidim/feature.rb +2 -0
- data/app/models/decidim/organization.rb +1 -0
- data/app/models/decidim/participatory_process.rb +2 -5
- data/app/models/decidim/resource_link.rb +28 -0
- data/app/models/decidim/user.rb +6 -0
- data/app/models/decidim/user_group.rb +10 -1
- data/app/services/decidim/resource_search.rb +1 -4
- data/app/types/decidim/session_type.rb +16 -0
- data/app/types/decidim/user_group_type.rb +20 -0
- data/app/types/decidim/user_type.rb +5 -1
- data/app/uploaders/decidim/attachment_uploader.rb +4 -1
- data/app/uploaders/decidim/avatar_uploader.rb +8 -0
- data/app/uploaders/decidim/banner_image_uploader.rb +1 -0
- data/app/uploaders/decidim/hero_image_uploader.rb +1 -0
- data/app/uploaders/decidim/homepage_image_uploader.rb +5 -1
- data/app/uploaders/decidim/image_uploader.rb +1 -1
- data/app/uploaders/decidim/organization_favicon_uploader.rb +17 -0
- data/app/uploaders/decidim/organization_logo_uploader.rb +2 -2
- data/app/validators/feature_validator.rb +23 -0
- data/app/views/decidim/account/_password_fields.html.erb +2 -0
- data/app/views/decidim/account/_user_groups.html.erb +0 -0
- data/app/views/decidim/account/show.html.erb +24 -29
- data/app/views/decidim/application/_attachments.html.erb +8 -0
- data/app/views/decidim/{participatory_processes → application}/_documents.html.erb +0 -0
- data/app/views/decidim/{participatory_processes → application}/_photos.html.erb +0 -0
- data/app/views/decidim/authorizations/first_login.html.erb +22 -0
- data/app/views/decidim/authorizations/index.html.erb +46 -19
- data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
- data/app/views/decidim/devise/registrations/new.html.erb +1 -1
- data/app/views/decidim/own_user_groups/index.html.erb +24 -0
- data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +1 -1
- data/app/views/decidim/participatory_process_steps/index.html.erb +3 -1
- data/app/views/decidim/participatory_processes/_participatory_process.html.erb +2 -2
- data/app/views/decidim/participatory_processes/_promoted_process.html.erb +1 -1
- data/app/views/decidim/participatory_processes/index.html.erb +2 -0
- data/app/views/decidim/participatory_processes/show.html.erb +37 -8
- data/app/views/decidim/shared/_comments.html.erb +0 -0
- data/app/views/layouts/decidim/_application.html.erb +5 -3
- data/app/views/layouts/decidim/_header.html.erb +4 -4
- data/app/views/layouts/decidim/_logo.html.erb +29 -17
- data/app/views/layouts/decidim/_process_header.html.erb +15 -3
- data/app/views/layouts/decidim/_process_header_steps.html.erb +1 -1
- data/app/views/layouts/decidim/_user_menu.html.erb +3 -0
- data/app/views/layouts/decidim/mailer.html.erb +1 -1
- data/app/views/layouts/decidim/user_profile.html.erb +35 -0
- data/app/views/pages/home.html.erb +5 -139
- data/app/views/pages/home/_extended.html.erb +48 -0
- data/app/views/pages/home/_hero.html.erb +20 -0
- data/app/views/pages/home/_highlighted_processes.html.erb +37 -0
- data/app/views/pages/home/_statistics.html.erb +22 -0
- data/app/views/pages/home/_sub_hero.html.erb +11 -0
- data/config/i18n-tasks.yml +1 -0
- data/config/initializers/foundation_rails_helper.rb +2 -0
- data/config/locales/ca.yml +69 -33
- data/config/locales/en.yml +86 -29
- data/config/locales/es.yml +68 -32
- data/config/routes.rb +8 -3
- data/db/migrate/20161116115156_create_attachments.rb +0 -2
- data/db/migrate/20170113150627_create_resource_links.rb +10 -0
- data/db/migrate/20170123134023_make_attachments_polymorphic.rb +18 -0
- data/db/migrate/20170123140857_add_avatar_to_user_groups.rb +5 -0
- data/db/migrate/20170125135937_rename_attachable_to_attached_to.rb +11 -0
- data/db/migrate/20170125152026_add_weight_to_features.rb +5 -0
- data/db/migrate/20170126151123_add_extra_info_to_processes.rb +8 -0
- data/db/migrate/20170128140553_add_timestamps_to_identities.rb +5 -0
- data/db/migrate/20170130132833_add_favicon_to_decidim_organizations.rb +5 -0
- data/db/seeds.rb +38 -6
- data/lib/decidim/authorable.rb +32 -0
- data/lib/decidim/core.rb +37 -0
- data/lib/decidim/core/engine.rb +2 -3
- data/lib/decidim/core/test.rb +6 -0
- data/lib/decidim/core/test/factories.rb +24 -3
- data/lib/decidim/core/test/shared_examples/authorable.rb +31 -0
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +29 -0
- data/lib/decidim/core/test/shared_examples/has_category.rb +10 -0
- data/lib/decidim/core/test/shared_examples/has_feature.rb +20 -0
- data/lib/decidim/core/test/shared_examples/has_scope.rb +10 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/feature_manifest.rb +31 -1
- data/lib/decidim/features/base_controller.rb +10 -0
- data/lib/decidim/features/settings_manifest.rb +1 -0
- data/lib/decidim/has_attachment.rb +32 -0
- data/lib/decidim/has_attachments.rb +32 -0
- data/lib/decidim/has_category.rb +21 -0
- data/lib/decidim/has_feature.rb +20 -0
- data/lib/decidim/has_scope.rb +21 -0
- data/lib/decidim/query_extensions.rb +2 -2
- data/lib/decidim/resource_manifest.rb +80 -0
- data/lib/decidim/resourceable.rb +85 -0
- metadata +67 -40
- data/app/assets/javascripts/decidim/inline_svg.js.es6 +0 -12
- data/app/assets/stylesheets/decidim/application.sass +0 -12
- data/app/assets/stylesheets/decidim/extras/_turbolinks.scss +0 -3
- data/app/assets/stylesheets/decidim/modules/_popularity.scss +0 -74
- data/app/assets/stylesheets/decidim/utils/_variables.scss +0 -22
- data/app/views/decidim/account/_authorizations.html.erb +0 -52
- data/vendor/assets/javascripts/owl.carousel.min.js +0 -47
- data/vendor/assets/javascripts/svg-injector.js +0 -464
@@ -6,6 +6,8 @@ module Decidim
|
|
6
6
|
# steps that get enabled or disabled depending on which step is currently
|
7
7
|
# active.
|
8
8
|
class ParticipatoryProcess < ApplicationRecord
|
9
|
+
include Decidim::HasAttachments
|
10
|
+
|
9
11
|
belongs_to :organization,
|
10
12
|
foreign_key: "decidim_organization_id",
|
11
13
|
class_name: Decidim::Organization,
|
@@ -22,11 +24,6 @@ module Decidim
|
|
22
24
|
class_name: Decidim::ParticipatoryProcessStep,
|
23
25
|
dependent: :destroy,
|
24
26
|
inverse_of: :participatory_process
|
25
|
-
has_many :attachments,
|
26
|
-
foreign_key: "decidim_participatory_process_id",
|
27
|
-
class_name: Decidim::ParticipatoryProcessAttachment,
|
28
|
-
dependent: :destroy,
|
29
|
-
inverse_of: :participatory_process
|
30
27
|
has_many :categories,
|
31
28
|
foreign_key: "decidim_participatory_process_id",
|
32
29
|
class_name: Decidim::Category,
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
# A ResourceLink allows linking resources (other entities in Decidim) between
|
4
|
+
# them without them having to know each other.
|
5
|
+
#
|
6
|
+
# In order to group the relations between resources you need to specify a name.
|
7
|
+
#
|
8
|
+
# Some examples could be: proposals that have been created in a meeting or
|
9
|
+
# projects that are a result of merging diffrent proposals.
|
10
|
+
class ResourceLink < ApplicationRecord
|
11
|
+
belongs_to :from, polymorphic: true
|
12
|
+
belongs_to :to, polymorphic: true
|
13
|
+
|
14
|
+
validates :from, :to, :name, presence: true
|
15
|
+
validates :name, uniqueness: { scope: [:from, :to] }
|
16
|
+
|
17
|
+
validate :same_organization
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def same_organization
|
22
|
+
return if from.try(:organization) == to.try(:organization)
|
23
|
+
|
24
|
+
errors.add(:from, :invalid)
|
25
|
+
errors.add(:to, :invalid)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/app/models/decidim/user.rb
CHANGED
@@ -11,6 +11,8 @@ module Decidim
|
|
11
11
|
belongs_to :organization, foreign_key: "decidim_organization_id", class_name: Decidim::Organization
|
12
12
|
has_many :authorizations, foreign_key: "decidim_user_id", class_name: Decidim::Authorization, inverse_of: :user
|
13
13
|
has_many :identities, foreign_key: "decidim_user_id", class_name: Decidim::Identity
|
14
|
+
has_many :user_groups, through: :memberships, class_name: Decidim::UserGroup, foreign_key: :decidim_user_group_id
|
15
|
+
has_many :memberships, class_name: Decidim::UserGroupMembership, foreign_key: :decidim_user_id
|
14
16
|
|
15
17
|
ROLES = %w(admin moderator official).freeze
|
16
18
|
|
@@ -44,6 +46,10 @@ module Decidim
|
|
44
46
|
roles.include?(role.to_s)
|
45
47
|
end
|
46
48
|
|
49
|
+
def name
|
50
|
+
super || I18n.t("decidim.anonymous_user")
|
51
|
+
end
|
52
|
+
|
47
53
|
private
|
48
54
|
|
49
55
|
def all_roles_are_valid
|
@@ -9,10 +9,19 @@ module Decidim
|
|
9
9
|
validates :name, presence: true
|
10
10
|
validates :document_number, presence: true
|
11
11
|
validates :phone, presence: true
|
12
|
+
validates :avatar, file_size: { less_than_or_equal_to: 5.megabytes }
|
13
|
+
mount_uploader :avatar, Decidim::AvatarUploader
|
14
|
+
|
15
|
+
scope :verified, -> { where.not(verified_at: nil) }
|
12
16
|
|
13
17
|
# Public: Mark the user group as verified
|
14
18
|
def verify!
|
15
|
-
update_attribute(:
|
19
|
+
update_attribute(:verified_at, Time.current)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Public: Checks if the user group is verified.
|
23
|
+
def verified?
|
24
|
+
verified_at.present?
|
16
25
|
end
|
17
26
|
end
|
18
27
|
end
|
@@ -20,10 +20,7 @@ module Decidim
|
|
20
20
|
# raise order_start_time.inspect
|
21
21
|
raise "Missing feature" unless feature
|
22
22
|
|
23
|
-
@scope
|
24
|
-
.page(options[:page] || 1)
|
25
|
-
.per(options[:per_page] || 12)
|
26
|
-
.where(feature: feature)
|
23
|
+
@scope.where(feature: feature)
|
27
24
|
end
|
28
25
|
|
29
26
|
# Handle the category_id filter
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
# This type represents the current user session.
|
4
|
+
SessionType = GraphQL::ObjectType.define do
|
5
|
+
name "Session"
|
6
|
+
description "The current session"
|
7
|
+
|
8
|
+
field :user, UserType, "The current user" do
|
9
|
+
resolve ->(obj, _args, _ctx) { obj }
|
10
|
+
end
|
11
|
+
|
12
|
+
field :verifiedUserGroups, !types[UserGroupType], "The current user verified user groups" do
|
13
|
+
resolve ->(obj, _args, _ctx) { obj.user_groups.verified }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
# This type represents a UserGroup
|
4
|
+
UserGroupType = GraphQL::ObjectType.define do
|
5
|
+
name "UserGroup"
|
6
|
+
description "A user group"
|
7
|
+
|
8
|
+
interfaces [
|
9
|
+
Decidim::Api::AuthorInterface
|
10
|
+
]
|
11
|
+
|
12
|
+
field :id, !types.ID, "The user group's id"
|
13
|
+
|
14
|
+
field :name, !types.String, "The user group's name"
|
15
|
+
|
16
|
+
field :avatarUrl, !types.String, "The user's avatar url" do
|
17
|
+
resolve ->(obj, _args, _ctx) { obj.avatar.url }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -5,7 +5,11 @@ module Decidim
|
|
5
5
|
name "User"
|
6
6
|
description "A user"
|
7
7
|
|
8
|
-
|
8
|
+
interfaces [
|
9
|
+
Decidim::Api::AuthorInterface
|
10
|
+
]
|
11
|
+
|
12
|
+
field :name, !types.String, "The user's name"
|
9
13
|
|
10
14
|
field :avatarUrl, !types.String, "The user's avatar url" do
|
11
15
|
resolve ->(obj, _args, _ctx) { obj.avatar.url }
|
@@ -7,9 +7,11 @@ module Decidim
|
|
7
7
|
|
8
8
|
process :set_content_type_and_size_in_model
|
9
9
|
process :validate_dimensions
|
10
|
+
|
10
11
|
version :thumbnail, if: :image? do
|
11
12
|
process resize_to_fit: [nil, 237]
|
12
13
|
end
|
14
|
+
|
13
15
|
version :big, if: :image? do
|
14
16
|
process resize_to_limit: [nil, 1000]
|
15
17
|
end
|
@@ -39,7 +41,8 @@ module Decidim
|
|
39
41
|
#
|
40
42
|
# Returns a Boolean.
|
41
43
|
def image?(new_file)
|
42
|
-
new_file.content_type
|
44
|
+
content_type = model.try(:content_type) || new_file.content_type
|
45
|
+
content_type.to_s.start_with? "image"
|
43
46
|
end
|
44
47
|
|
45
48
|
# Copies the content type and file size to the model where this is mounted.
|
@@ -7,6 +7,14 @@ module Decidim
|
|
7
7
|
|
8
8
|
process :validate_dimensions
|
9
9
|
|
10
|
+
version :big do
|
11
|
+
process resize_to_fill: [500, 500]
|
12
|
+
end
|
13
|
+
|
14
|
+
version :thumb do
|
15
|
+
process resize_to_fill: [100, 100]
|
16
|
+
end
|
17
|
+
|
10
18
|
def default_url(*)
|
11
19
|
ActionController::Base.helpers.asset_path("decidim/default-avatar.svg")
|
12
20
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
# This class deals with uploading an organization's favicon.
|
4
|
+
class OrganizationFaviconUploader < ImageUploader
|
5
|
+
SIZES = {
|
6
|
+
big: 152,
|
7
|
+
medium: 64,
|
8
|
+
small: 32
|
9
|
+
}.freeze
|
10
|
+
|
11
|
+
SIZES.each do |name, size|
|
12
|
+
version name do
|
13
|
+
process resize_and_pad: [size, size]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module Decidim
|
3
|
-
# This class deals with uploading
|
3
|
+
# This class deals with uploading the organization's logo.
|
4
4
|
class OrganizationLogoUploader < ImageUploader
|
5
5
|
version :medium do
|
6
|
-
process resize_to_limit: [
|
6
|
+
process resize_to_limit: [600, 160]
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# A custom validator to make sure features are correctly assigned to a model.
|
3
|
+
#
|
4
|
+
# Adds a presence validation and checks that the manifest is the correct one.
|
5
|
+
class FeatureValidator < ActiveModel::EachValidator
|
6
|
+
# Validates the arguiments passed to the validator.
|
7
|
+
def check_validity!
|
8
|
+
raise ArgumentError, "You must include a `manifest` option with the name of the manifest to validate when validating a feature" unless options[:manifest].present?
|
9
|
+
end
|
10
|
+
|
11
|
+
# The actual validator method. It is called when ActiveRecord iterates
|
12
|
+
# over all the validators.
|
13
|
+
def validate_each(record, attribute, feature)
|
14
|
+
unless feature
|
15
|
+
record.errors[attribute] << :blank
|
16
|
+
return
|
17
|
+
end
|
18
|
+
|
19
|
+
manifest_name = options[:manifest].respond_to?(:call) ? options[:manifest].call : options[:manifest].to_s
|
20
|
+
|
21
|
+
record.errors[attribute] << :invalid if feature.manifest_name.to_s != manifest_name
|
22
|
+
end
|
23
|
+
end
|
File without changes
|
@@ -1,32 +1,27 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<div class="row collapse">
|
8
|
-
<div class="main-container">
|
9
|
-
<div class="row collapse main-container--side-panel">
|
10
|
-
<div class="columns medium-4 large-3">
|
11
|
-
<div class="side-panel">
|
12
|
-
<ul class="tabs vertical side-panel__tabs" id="user-settings-tabs"
|
13
|
-
data-tabs>
|
14
|
-
<% if handlers.any? || authorizations.any? %>
|
15
|
-
<li class="tabs-title">
|
16
|
-
<a href="#authorizations"><%= t(".authorizations") %></a>
|
17
|
-
</li>
|
18
|
-
<% end %>
|
19
|
-
</ul>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
<div class="columns medium-8 large-9">
|
23
|
-
<div class="main-container__content">
|
24
|
-
<div class="tabs-content vertical" data-tabs-content="user-settings-tabs">
|
25
|
-
<%= render partial: "authorizations" %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
1
|
+
<div class="row">
|
2
|
+
<%= form_for(@account, url: account_path, method: :put, class: "user-form") do |f| %>
|
3
|
+
<div class="columns large-4">
|
4
|
+
<%= image_tag current_user.avatar.big.url, width: "100%" %>
|
5
|
+
<%= f.file_field :avatar, label: false %>
|
6
|
+
<%= f.check_box :remove_avatar %>
|
29
7
|
</div>
|
8
|
+
|
9
|
+
<div class="columns large-8 end">
|
10
|
+
<%= f.text_field :name %>
|
11
|
+
<%= f.email_field :email %>
|
12
|
+
|
13
|
+
<% if @account.errors[:password].any? || @account.errors[:password_confirmation].any? %>
|
14
|
+
<%= render partial: "password_fields", locals: { form: f } %>
|
15
|
+
<% else %>
|
16
|
+
<p>
|
17
|
+
<a data-toggle="passwordChange" class="change-password"><%= t ".change_password" %></a>
|
18
|
+
</p>
|
19
|
+
<div id="passwordChange" class="toggle-show" data-toggler=".is-expanded">
|
20
|
+
<%= render partial: "password_fields", locals: { form: f } %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= f.submit t(".update_account"), disable_with: true %>
|
25
|
+
<% end %>
|
30
26
|
</div>
|
31
27
|
</div>
|
32
|
-
</main>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if attached_to.attachments.any? %>
|
2
|
+
<div class="row attachments">
|
3
|
+
<div class="columns large-8">
|
4
|
+
<%= render partial: "documents", locals: { documents: attached_to.documents } %>
|
5
|
+
<%= render partial: "photos", locals: { photos: attached_to.photos } %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
File without changes
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<main class="wrapper">
|
2
|
+
<div class="row collapse">
|
3
|
+
<div class="row collapse">
|
4
|
+
<div class="columns large-8 large-centered text-center">
|
5
|
+
<h1 class="heading1 page-title"><%= t(".title") %></h1>
|
6
|
+
<p class="heading5"><%= t(".verify_with_these_options") %></p>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<div class="row">
|
10
|
+
<div class="columns medium-7 large-5 medium-centered">
|
11
|
+
<div class="card">
|
12
|
+
<div class="card__content">
|
13
|
+
<% handlers.each do |handler| %>
|
14
|
+
<%= link_to t(handler.handler_name, scope: "decidim.authorizations.first_login.actions"), new_authorization_path(handler: handler.handler_name), class: "button expanded" %>
|
15
|
+
<% end %>
|
16
|
+
<p class="text-center skip"><%= t("decidim.authorizations.skip_verification", link: link_to(t("decidim.authorizations.current_participatory_processes"), participatory_processes_path).html_safe).html_safe %>.</p>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</main>
|
@@ -1,22 +1,49 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
<
|
4
|
-
<div class="
|
5
|
-
|
6
|
-
|
1
|
+
<div class="row column authorizations-list">
|
2
|
+
<% if @authorizations.any? %>
|
3
|
+
<section class="section">
|
4
|
+
<div class="card card--list">
|
5
|
+
<% @authorizations.each do |authorization| %>
|
6
|
+
<div class="card--list__item">
|
7
|
+
<div class="card--list__text">
|
8
|
+
<%= icon "lock-unlocked", class: "card--list__icon" %>
|
9
|
+
<div>
|
10
|
+
<h5 class="card--list__heading">
|
11
|
+
<%= t(authorization.name, scope: "decidim.authorization_handlers") %>
|
12
|
+
</h5>
|
13
|
+
<span class="text-small"><%= l(authorization.created_at, format: :long) %></span>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="card--list__data">
|
17
|
+
<%= link_to authorization, method: :delete, class: "card--list__data__icon", data: { confirm: t(".authorization_confirm_destroy") } do %>
|
18
|
+
<%= icon "circle-x" %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
7
23
|
</div>
|
8
|
-
|
9
|
-
|
10
|
-
<div class="
|
11
|
-
|
12
|
-
<div class="
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
24
|
+
<% end %>
|
25
|
+
<% if handlers.any? %>
|
26
|
+
<div class="card card--list">
|
27
|
+
<% handlers.each do |handler| %>
|
28
|
+
<div class="card--list__item">
|
29
|
+
<div class="card--list__text">
|
30
|
+
<a href="#">
|
31
|
+
<%= icon "lock-locked", class: "card--list__icon" %>
|
32
|
+
</a>
|
33
|
+
<div>
|
34
|
+
<h5 class="card--list__heading">
|
35
|
+
<%= link_to t(handler.handler_name, scope: "decidim.authorization_handlers"), new_authorization_path(handler: handler.handler_name) %>
|
36
|
+
</h5>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div class="card--list__data">
|
40
|
+
<%= link_to new_authorization_path(handler: handler.handler_name), class: "card--list__data__icon" do %>
|
41
|
+
<%= icon "chevron-right" %>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
17
44
|
</div>
|
18
|
-
|
45
|
+
<% end %>
|
19
46
|
</div>
|
20
|
-
</
|
21
|
-
|
22
|
-
</
|
47
|
+
</section>
|
48
|
+
<% end %>
|
49
|
+
</div>
|