decidim-core 0.0.1.alpha2 → 0.0.1.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,76 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require "rails/generators/base"
|
3
|
-
require "securerandom"
|
4
|
-
|
5
|
-
module Decidim
|
6
|
-
module Generators
|
7
|
-
# Installs `decidim` to a Rails app by adding the needed lines of code
|
8
|
-
# automatically to important files in the Rails app.
|
9
|
-
#
|
10
|
-
# Remember that, for how generators work, actions are executed based on the
|
11
|
-
# definition order of the public methods.
|
12
|
-
class InstallGenerator < Rails::Generators::Base
|
13
|
-
desc "Install decidim"
|
14
|
-
source_root File.expand_path("../templates", __FILE__)
|
15
|
-
|
16
|
-
class_option :migrate, type: :boolean, default: false,
|
17
|
-
desc: "Run migrations after installing decidim"
|
18
|
-
|
19
|
-
def install
|
20
|
-
route "mount Decidim::Core::Engine => '/'"
|
21
|
-
end
|
22
|
-
|
23
|
-
def copy_migrations
|
24
|
-
rake "railties:install:migrations"
|
25
|
-
prepare_database if options[:migrate]
|
26
|
-
end
|
27
|
-
|
28
|
-
def add_seeds
|
29
|
-
append_file "db/seeds.rb", "Decidim::Core::Engine.load_seed"
|
30
|
-
end
|
31
|
-
|
32
|
-
def copy_initializer
|
33
|
-
template "initializer.rb", "config/initializers/decidim.rb"
|
34
|
-
end
|
35
|
-
|
36
|
-
def insert_into_layout
|
37
|
-
inject_into_file "app/views/layouts/application.html.erb",
|
38
|
-
before: "</head>" do
|
39
|
-
" <%= render partial: 'layouts/decidim/meta' %>\n "
|
40
|
-
end
|
41
|
-
|
42
|
-
inject_into_file "app/views/layouts/application.html.erb",
|
43
|
-
after: "<body>" do
|
44
|
-
"\n <%= render partial: 'layouts/decidim/header' %>"
|
45
|
-
end
|
46
|
-
|
47
|
-
inject_into_file "app/views/layouts/application.html.erb",
|
48
|
-
before: "</body>" do
|
49
|
-
" <%= render partial: 'layouts/decidim/footer' %>\n "
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def replace_title
|
54
|
-
gsub_file "app/views/layouts/application.html.erb",
|
55
|
-
%r{<title>(.*)</title>},
|
56
|
-
"<title><%= decidim_page_title %></title>"
|
57
|
-
end
|
58
|
-
|
59
|
-
def append_assets
|
60
|
-
append_file "app/assets/javascripts/application.js", "//= require decidim"
|
61
|
-
inject_into_file "app/assets/stylesheets/application.css",
|
62
|
-
before: "*= require_tree ." do
|
63
|
-
"*= require decidim\n "
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
def prepare_database
|
70
|
-
rake "db:drop"
|
71
|
-
rake "db:create"
|
72
|
-
rake "db:migrate"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|