decidim-system 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-system might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82f6d5e3f0a0d7a4a86758f8fe63862a9ac9ee65
4
- data.tar.gz: 3bd316067e87a2be366a8e95f1704e9bf5c10ca9
3
+ metadata.gz: 4f93d18c0f93f59bd9ee19e68639ecfb4b6fd869
4
+ data.tar.gz: 16d551410d03ff500ff581e9829c5c9eeb0ed5bb
5
5
  SHA512:
6
- metadata.gz: 91ecfdcd85b0f2907146a7285dd7539c0894d2f5396eae7bbf47cbbcf3f4f5e9c79e9680e56c9b914d520917d7ee7846389ab7b4af1eae558a07809d270c751b
7
- data.tar.gz: 02eb3eb788db1895eb350d6c6f4d56e4b394819a73a392f9b1142bb462ebd0f34ddb80e86da21162598451fec0842a48b59966fc8a0f1374e42e7c9331cc94c6
6
+ metadata.gz: 7222a28cbe8da7b70e89ba3c9fc5584a4142a8388210e3122c30e160bd0588bb0a2f1e2841a0c74840247e2c06e7b1c35d631c36709b73e44fd3f3120dc15dce
7
+ data.tar.gz: e098a0219be3a4571577fc9e311f3b4c09bdfcb746cfa7696e30ef451b4b875d2effb310e64d681d912eed45d829c1035fcb480a3c88e049a6e48714601f71e2
@@ -6,12 +6,12 @@ module Decidim
6
6
  class ApplicationController < ActionController::Base
7
7
  include FormFactory
8
8
  include PayloadInfo
9
+
9
10
  protect_from_forgery with: :exception, prepend: true
10
11
 
11
12
  helper Decidim::TranslationsHelper
12
13
  helper Decidim::DecidimFormHelper
13
14
  helper Decidim::ReplaceButtonsHelper
14
-
15
15
  helper Decidim::System::MenuHelper
16
16
  end
17
17
  end
@@ -7,6 +7,7 @@ module Decidim
7
7
  # and views.
8
8
  class SessionsController < ::Devise::SessionsController
9
9
  helper Decidim::DecidimFormHelper
10
+
10
11
  layout "decidim/system/login"
11
12
  end
12
13
  end
@@ -6,7 +6,7 @@ module Decidim
6
6
  module MenuHelper
7
7
  # Public: Returns the main menu presenter object
8
8
  def main_menu
9
- @main_menu ||= MenuPresenter.new(:system_menu, self)
9
+ @main_menu ||= ::Decidim::MenuPresenter.new(:system_menu, self)
10
10
  end
11
11
  end
12
12
  end
@@ -0,0 +1,11 @@
1
+ <%= display_flash_messages %>
2
+
3
+ <% if Decidim::Organization.none? %>
4
+ <div class="flash callout warning">
5
+ <% guide = link_to t(".our_getting_started_guide"),
6
+ "https://github.com/decidim/decidim/blob/master/docs/getting_started.md",
7
+ target: :blank %>
8
+
9
+ <%= t(".no_organization_warning_html", guide: guide) %>
10
+ </div>
11
+ <% end %>
@@ -29,7 +29,7 @@
29
29
  </section>
30
30
  <% end %>
31
31
 
32
- <%= display_flash_messages %>
32
+ <%= render "decidim/system/shared/notices" %>
33
33
  <%= yield %>
34
34
  </div>
35
35
  </div>
@@ -9,7 +9,7 @@
9
9
  <div class="login-form-wrapper">
10
10
  <div class="login-form">
11
11
  <h1>Decidim</h1>
12
- <%= display_flash_messages %>
12
+ <%= render "decidim/system/shared/notices" %>
13
13
  <div class="login-form-inner">
14
14
  <%= yield %>
15
15
  </div>
@@ -64,5 +64,9 @@ ca:
64
64
  update:
65
65
  error: S'ha produït un error en actualitzar aquesta organització.
66
66
  success: L'organització s'ha actualitzat correctament.
67
+ shared:
68
+ notices:
69
+ no_organization_warning_html: Has de crear una organització per començar. Assegura't de llegir %{guide} abans.
70
+ our_getting_started_guide: la guia d'introducció
67
71
  titles:
68
72
  dashboard: Tauler de control
@@ -65,5 +65,9 @@ en:
65
65
  update:
66
66
  error: There was an error when updating this organization.
67
67
  success: Organization updated successfully.
68
+ shared:
69
+ notices:
70
+ no_organization_warning_html: You must create an organization to get started. Make sure you read %{guide} before proceeding.
71
+ our_getting_started_guide: our getting started guide
68
72
  titles:
69
73
  dashboard: Dashboard
@@ -64,5 +64,9 @@ es:
64
64
  update:
65
65
  error: Se ha producido un error al actualizar esta organización.
66
66
  success: Organización actualizada correctamente.
67
+ shared:
68
+ notices:
69
+ no_organization_warning_html: Debes crear una organización para comenzar. Asegúrate de leer %{guide} antes de continuar.
70
+ our_getting_started_guide: nuestra guía de inicio
67
71
  titles:
68
72
  dashboard: Panel de control
@@ -4,25 +4,25 @@ class DeviseCreateDecidimAdmins < ActiveRecord::Migration[5.0]
4
4
  def change
5
5
  create_table :decidim_system_admins do |t|
6
6
  ## Database authenticatable
7
- t.string :email, null: false, default: ""
7
+ t.string :email, null: false, default: ""
8
8
  t.string :encrypted_password, null: false, default: ""
9
9
 
10
10
  ## Recoverable
11
- t.string :reset_password_token
11
+ t.string :reset_password_token
12
12
  t.datetime :reset_password_sent_at
13
13
 
14
14
  ## Rememberable
15
15
  t.datetime :remember_created_at
16
16
 
17
17
  ## Lockable
18
- t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
19
- t.string :unlock_token # Only if unlock strategy is :email or :both
18
+ t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
19
+ t.string :unlock_token # Only if unlock strategy is :email or :both
20
20
  t.datetime :locked_at
21
21
 
22
22
  t.timestamps null: false
23
23
  end
24
24
 
25
- add_index :decidim_system_admins, :email, unique: true
25
+ add_index :decidim_system_admins, :email, unique: true
26
26
  add_index :decidim_system_admins, :reset_password_token, unique: true
27
27
  end
28
28
  end
data/db/seeds.rb CHANGED
@@ -7,7 +7,7 @@ if !Rails.env.production? || ENV["SEED"]
7
7
  password_confirmation: "decidim123456"
8
8
  )
9
9
 
10
- Decidim::Organization.all.each do |organization|
10
+ Decidim::Organization.find_each do |organization|
11
11
  Decidim::System::CreateDefaultPages.call(organization)
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-06-19 00:00:00.000000000 Z
13
+ date: 2017-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.3.2
21
+ version: 0.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.3.2
28
+ version: 0.4.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -158,14 +158,14 @@ dependencies:
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.3.2
161
+ version: 0.4.0
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - '='
167
167
  - !ruby/object:Gem::Version
168
- version: 0.3.2
168
+ version: 0.4.0
169
169
  description: System administration to create new organization in an installation.
170
170
  email:
171
171
  - josepjaume@gmail.com
@@ -223,6 +223,7 @@ files:
223
223
  - app/views/decidim/system/organizations/index.html.erb
224
224
  - app/views/decidim/system/organizations/new.html.erb
225
225
  - app/views/decidim/system/organizations/show.html.erb
226
+ - app/views/decidim/system/shared/_notices.html.erb
226
227
  - app/views/layouts/decidim/system/_header.html.erb
227
228
  - app/views/layouts/decidim/system/_login_items.html.erb
228
229
  - app/views/layouts/decidim/system/_sidebar.html.erb