casein 5.1.1.5 → 5.2.0.0
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/README.rdoc +23 -34
- data/app/assets/javascripts/casein/casein.js +1 -1
- data/app/assets/stylesheets/casein/{casein-bootstrap-overrides.css.scss → casein-bootstrap-overrides.scss} +0 -0
- data/app/assets/stylesheets/casein/{casein.css.scss → casein.scss} +0 -0
- data/app/assets/stylesheets/casein/login.scss +74 -0
- data/app/controllers/casein/admin_user_sessions_controller.rb +10 -6
- data/app/controllers/casein/admin_users_controller.rb +9 -9
- data/app/controllers/casein/casein_controller.rb +7 -5
- data/app/controllers/casein/password_resets_controller.rb +4 -4
- data/app/helpers/casein/casein_helper.rb +8 -8
- data/app/mailers/casein/casein_notification.rb +3 -3
- data/app/models/casein/admin_user.rb +2 -2
- data/app/views/casein/admin_user_sessions/new.html.erb +6 -6
- data/app/views/casein/admin_users/index.html.erb +1 -1
- data/app/views/casein/admin_users/new.html.erb +7 -7
- data/app/views/casein/admin_users/show.html.erb +14 -14
- data/app/views/casein/password_resets/edit.html.erb +4 -4
- data/app/views/layouts/casein_auth.html.erb +12 -6
- data/app/views/layouts/casein_main.html.erb +4 -4
- data/config/initializers/will_paginate.rb +4 -4
- data/config/routes.rb +5 -5
- data/lib/casein.rb +2 -2
- data/lib/casein/engine.rb +1 -1
- data/lib/casein/version.rb +1 -1
- data/lib/generators/casein/install/install_generator.rb +4 -2
- data/lib/generators/casein/install/templates/app/assets/javascripts/casein/auth_custom.js +2 -0
- data/lib/generators/casein/install/templates/app/assets/stylesheets/casein/auth_custom.scss +2 -0
- data/lib/generators/casein/install/templates/app/assets/stylesheets/casein/{custom.css.scss → custom.scss} +0 -0
- data/lib/generators/casein/install/templates/app/helpers/casein/config_helper.rb +11 -1
- data/lib/generators/casein/install/templates/app/views/casein/layouts/_top_navigation.html.erb +2 -2
- data/lib/generators/casein/install/templates/db/migrate/casein_create_admin_users.rb +6 -6
- data/lib/generators/casein/scaffold/scaffold_generator.rb +22 -22
- data/lib/generators/casein/scaffold/templates/controller.rb +25 -27
- data/lib/generators/casein/scaffold/templates/migration.rb +2 -2
- data/lib/generators/casein/scaffold/templates/model.rb +1 -2
- data/lib/generators/casein/scaffold/templates/views/_form.html.erb +7 -7
- data/lib/generators/casein/scaffold/templates/views/_table.html.erb +16 -16
- data/lib/generators/casein/scaffold/templates/views/index.html.erb +4 -4
- data/lib/generators/casein/scaffold/templates/views/new.html.erb +10 -10
- data/lib/generators/casein/scaffold/templates/views/show.html.erb +9 -9
- data/lib/railties/tasks.rake +2 -1
- metadata +19 -17
- data/app/assets/stylesheets/casein/login.css.scss +0 -74
@@ -11,7 +11,7 @@ module Casein
|
|
11
11
|
@pass = pass
|
12
12
|
@from_text = casein_config_website_name
|
13
13
|
|
14
|
-
mail(:
|
14
|
+
mail(to: casein_admin_user.email, from: from, subject: "[#{casein_config_website_name}] New password")
|
15
15
|
end
|
16
16
|
|
17
17
|
def new_user_information from, casein_admin_user, host, pass
|
@@ -21,7 +21,7 @@ module Casein
|
|
21
21
|
@pass = pass
|
22
22
|
@from_text = casein_config_website_name
|
23
23
|
|
24
|
-
mail(:
|
24
|
+
mail(to: casein_admin_user.email, from: from, subject: "[#{casein_config_website_name}] New user account")
|
25
25
|
end
|
26
26
|
|
27
27
|
def password_reset_instructions from, casein_admin_user, host
|
@@ -32,7 +32,7 @@ module Casein
|
|
32
32
|
@reset_password_url = edit_casein_password_reset_url + "/?token=#{casein_admin_user.perishable_token}"
|
33
33
|
@from_text = casein_config_website_name
|
34
34
|
|
35
|
-
mail(:
|
35
|
+
mail(to: casein_admin_user.email, from: from, subject: "[#{casein_config_website_name}] Password reset instructions")
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
@@ -24,11 +24,11 @@ module Casein
|
|
24
24
|
|
25
25
|
validates_presence_of :login, :name, :email
|
26
26
|
validates_uniqueness_of :login
|
27
|
-
validates_format_of :email, :
|
27
|
+
validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
28
28
|
validates_presence_of :time_zone
|
29
29
|
|
30
30
|
def self.has_more_than_one_admin
|
31
|
-
Casein::AdminUser.where(:
|
31
|
+
Casein::AdminUser.where(access_level: $CASEIN_USER_ACCESS_LEVEL_ADMIN).count > 1
|
32
32
|
end
|
33
33
|
|
34
34
|
def send_create_notification
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @admin_user_session, :
|
1
|
+
<%= form_for @admin_user_session, url: casein_admin_user_session_path do |f| %>
|
2
2
|
<% if @admin_user_session.errors.any? %>
|
3
3
|
<div id="error_messages" class="alert alert-danger">
|
4
4
|
<% @admin_user_session.errors.keys.each do |key| %>
|
@@ -20,10 +20,10 @@
|
|
20
20
|
<% end %>
|
21
21
|
|
22
22
|
<div class="form-group">
|
23
|
-
<%= f.text_field :login, :
|
23
|
+
<%= f.text_field :login, placeholder: "Username", class: "form-control input-lg" %>
|
24
24
|
</div>
|
25
25
|
<div class="form-group">
|
26
|
-
<%= f.password_field :password, :
|
26
|
+
<%= f.password_field :password, placeholder: "Password", class: "form-control input-lg" %>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<div class="form-group">
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div class="form-group">
|
38
|
-
<%= f.submit "Sign in", :
|
38
|
+
<%= f.submit "Sign in", class: "btn btn-success btn-lg btn-block" %>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div class="form-group">
|
@@ -47,10 +47,10 @@
|
|
47
47
|
<%= form_tag casein_password_reset_url do %>
|
48
48
|
<div id="recover" style="display:none;">
|
49
49
|
<div class="form-group">
|
50
|
-
<%= text_field_tag :recover_email, params[:recover_email], :
|
50
|
+
<%= text_field_tag :recover_email, params[:recover_email], placeholder: "Your email address", class: "form-control input-lg" %>
|
51
51
|
</div>
|
52
52
|
<div class="form-group">
|
53
|
-
<%= submit_tag "Reset password", :
|
53
|
+
<%= submit_tag "Reset password", class: "btn btn-primary btn-lg btn-block" %>
|
54
54
|
</div>
|
55
55
|
</div>
|
56
56
|
<% end %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% confirm_message += "\n\nWARNING: This is your user account. You will be signed out if you proceed." %>
|
24
24
|
<% end %>
|
25
25
|
|
26
|
-
<%= link_to(casein_show_row_icon("trash"), casein_admin_user_path(user), :
|
26
|
+
<%= link_to(casein_show_row_icon("trash"), casein_admin_user_path(user), method: :delete, data: { confirm: confirm_message }) %>
|
27
27
|
<% end %>
|
28
28
|
</td>
|
29
29
|
</tr>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="row">
|
6
6
|
<div class="col-lg-6">
|
7
|
-
<%= casein_text_field form, @casein_admin_user, :login, {:
|
7
|
+
<%= casein_text_field form, @casein_admin_user, :login, { size: 30, casein_label: "Username" } %>
|
8
8
|
</div>
|
9
9
|
<div class="col-lg-6">
|
10
10
|
<%= casein_text_field form, @casein_admin_user, :name %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
<div class="row">
|
25
25
|
<div class="col-lg-6">
|
26
|
-
<%= casein_select form, @casein_admin_user, :access_level, casein_get_access_level_array, {:
|
26
|
+
<%= casein_select form, @casein_admin_user, :access_level, casein_get_access_level_array, { casein_label: "Role" } %>
|
27
27
|
</div>
|
28
28
|
<div class="col-lg-6">
|
29
29
|
</div>
|
@@ -31,23 +31,23 @@
|
|
31
31
|
|
32
32
|
<div class="row">
|
33
33
|
<div class="col-lg-6">
|
34
|
-
<%= casein_password_field form, @casein_admin_user, :password, {:
|
34
|
+
<%= casein_password_field form, @casein_admin_user, :password, { casein_label: "Password" } %>
|
35
35
|
</div>
|
36
36
|
<div class="col-lg-6">
|
37
|
-
<%= casein_password_field form, @casein_admin_user, :password_confirmation, {:
|
37
|
+
<%= casein_password_field form, @casein_admin_user, :password_confirmation, { casein_label: "Repeat password" } %>
|
38
38
|
</div>
|
39
39
|
<div class="col-lg-12 password-checkbox">
|
40
40
|
<div class="checkbox">
|
41
41
|
<label>
|
42
|
-
<%= check_box_tag :generate_random_password, "1", false, {:
|
42
|
+
<%= check_box_tag :generate_random_password, "1", false, { id: 'generate-random-password-checkbox' } %> Generate random password
|
43
43
|
</label>
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
</div>
|
47
47
|
|
48
48
|
<p class="submits">
|
49
|
-
<%= link_to 'Cancel', casein_admin_users_path, :
|
50
|
-
<%= form.submit "Add new user", :
|
49
|
+
<%= link_to 'Cancel', casein_admin_users_path, class: 'btn btn-mini btn-danger' %>
|
50
|
+
<%= form.submit "Add new user", class: "btn btn-mini btn-primary" %>
|
51
51
|
</p>
|
52
52
|
|
53
53
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="row">
|
6
6
|
<div class="col-lg-6">
|
7
|
-
<%= casein_text_field f, f.object, :login, {:
|
7
|
+
<%= casein_text_field f, f.object, :login, { size: 30, casein_label: "Username" } %>
|
8
8
|
</div>
|
9
9
|
<div class="col-lg-6">
|
10
10
|
<%= casein_text_field f, f.object, :name %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% if @session_user.is_admin? && (@casein_admin_user.is_admin? == false || Casein::AdminUser.has_more_than_one_admin) %>
|
24
24
|
<div class="row">
|
25
25
|
<div class="col-lg-6">
|
26
|
-
<%= casein_select f, f.object, :access_level, casein_get_access_level_array, {:
|
26
|
+
<%= casein_select f, f.object, :access_level, casein_get_access_level_array, { casein_label: "Role" } %>
|
27
27
|
</div>
|
28
28
|
<div class="col-lg-6">
|
29
29
|
</div>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
<% end %>
|
32
32
|
|
33
33
|
<p class="submits">
|
34
|
-
<%= link_to 'Cancel', casein_admin_users_path, :
|
35
|
-
<%= f.submit "Save changes", :
|
34
|
+
<%= link_to 'Cancel', casein_admin_users_path, class: 'btn btn-mini btn-danger' %>
|
35
|
+
<%= f.submit "Save changes", class: "btn btn-mini btn-primary" %>
|
36
36
|
</p>
|
37
37
|
<% end %>
|
38
38
|
|
@@ -40,26 +40,26 @@
|
|
40
40
|
|
41
41
|
<h2>Reset password <small>(admin action — use carefully)</small></h2>
|
42
42
|
|
43
|
-
<%= form_for @casein_admin_user, :
|
43
|
+
<%= form_for @casein_admin_user, url: reset_password_casein_admin_user_path(@casein_admin_user) do |f| %>
|
44
44
|
|
45
45
|
<div class="row">
|
46
46
|
<div class="col-lg-6">
|
47
|
-
<%= casein_password_field f, f.object, :password, {:
|
47
|
+
<%= casein_password_field f, f.object, :password, { casein_label: "New password" } %>
|
48
48
|
</div>
|
49
49
|
<div class="col-lg-6">
|
50
|
-
<%= casein_password_field f, f.object, :password_confirmation, {:
|
50
|
+
<%= casein_password_field f, f.object, :password_confirmation, { casein_label: "Repeat new password" } %>
|
51
51
|
</div>
|
52
52
|
<div class="col-lg-12 password-checkbox">
|
53
53
|
<div class="checkbox">
|
54
54
|
<label>
|
55
|
-
<%= check_box_tag :generate_random_password, "1", false, {:
|
55
|
+
<%= check_box_tag :generate_random_password, "1", false, { id: 'generate-random-password-checkbox' } %> Generate random password
|
56
56
|
</label>
|
57
57
|
</div>
|
58
58
|
</div>
|
59
59
|
</div>
|
60
60
|
|
61
61
|
<p class="submits">
|
62
|
-
<%= f.submit "Reset", :
|
62
|
+
<%= f.submit "Reset", class: "btn btn-mini btn-warning" %>
|
63
63
|
</p>
|
64
64
|
|
65
65
|
<% end %>
|
@@ -68,13 +68,13 @@
|
|
68
68
|
|
69
69
|
<h2>Change password</h2>
|
70
70
|
|
71
|
-
<%= form_for @casein_admin_user, :
|
71
|
+
<%= form_for @casein_admin_user, url: update_password_casein_admin_user_path(@casein_admin_user) do |f| %>
|
72
72
|
|
73
73
|
<div class="row">
|
74
74
|
<div class="col-lg-6">
|
75
75
|
<div class="form-group">
|
76
76
|
<%= label_tag :form_current_password, "Current password" %>
|
77
|
-
<%= password_field_tag :form_current_password, "", {:
|
77
|
+
<%= password_field_tag :form_current_password, "", { class: 'form-control' } %>
|
78
78
|
</div>
|
79
79
|
</div>
|
80
80
|
<div class="col-lg-6">
|
@@ -83,15 +83,15 @@
|
|
83
83
|
|
84
84
|
<div class="row">
|
85
85
|
<div class="col-lg-6">
|
86
|
-
<%= casein_password_field f, f.object, :password, {:
|
86
|
+
<%= casein_password_field f, f.object, :password, { casein_label: "New password" } %>
|
87
87
|
</div>
|
88
88
|
<div class="col-lg-6">
|
89
|
-
<%= casein_password_field f, f.object, :password_confirmation, {:
|
89
|
+
<%= casein_password_field f, f.object, :password_confirmation, { casein_label: "Repeat new password" } %>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
93
93
|
<p class="submits">
|
94
|
-
<%= f.submit "Change", :
|
94
|
+
<%= f.submit "Change", class: "btn btn-mini btn-primary" %>
|
95
95
|
</p>
|
96
96
|
|
97
97
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @reset_user, :
|
1
|
+
<%= form_for @reset_user, url: casein_password_reset_path do |f| %>
|
2
2
|
|
3
3
|
<% if @reset_user.errors.any? %>
|
4
4
|
<div id="error_messages" class="alert alert-danger">
|
@@ -23,14 +23,14 @@
|
|
23
23
|
<%= hidden_field_tag :token, params[:token] %>
|
24
24
|
|
25
25
|
<div class="form-group">
|
26
|
-
<%= f.password_field :password, :
|
26
|
+
<%= f.password_field :password, autocomplete: :off, placeholder: "New password", class: "form-control input-lg" %>
|
27
27
|
</div>
|
28
28
|
<div class="form-group">
|
29
|
-
<%= f.password_field :password_confirmation, :
|
29
|
+
<%= f.password_field :password_confirmation, autocomplete: :off, placeholder: "Confirm password", class: "form-control input-lg" %>
|
30
30
|
</div>
|
31
31
|
|
32
32
|
<div class="form-group">
|
33
|
-
<%= f.submit "Change password", :
|
33
|
+
<%= f.submit "Change password", class: "btn btn-success btn-lg btn-block" %>
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<% end %>
|
@@ -5,22 +5,28 @@
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
|
7
7
|
<title>Welcome to <%= casein_config_website_name %></title>
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<% casein_config_auth_stylesheet_includes.each do |stylesheet| %>
|
9
|
+
<%= stylesheet_link_tag(stylesheet) %>
|
10
|
+
<% end %>
|
11
11
|
|
12
|
-
|
12
|
+
<% casein_config_auth_javascript_includes.each do |javascript| %>
|
13
|
+
<%= javascript_include_tag(javascript) %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= csrf_meta_tag %>
|
17
|
+
|
18
|
+
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
13
19
|
<!--[if lt IE 9]>
|
14
20
|
<%= javascript_include_tag("casein/html5shiv") %>
|
15
21
|
<![endif]-->
|
16
22
|
|
17
23
|
</head>
|
18
24
|
|
19
|
-
<body>
|
25
|
+
<body class="casein-login">
|
20
26
|
<div class="container-narrow">
|
21
27
|
<div class="jumbotron">
|
22
28
|
<div class="row brand">
|
23
|
-
<%= image_tag(casein_config_logo, :
|
29
|
+
<%= image_tag(casein_config_logo, alt: casein_config_website_name) %>
|
24
30
|
</div>
|
25
31
|
<%= yield %>
|
26
32
|
</div>
|
@@ -40,15 +40,15 @@
|
|
40
40
|
<li><%= link_to 'Users', casein_admin_users_path %></li>
|
41
41
|
<% end %>
|
42
42
|
|
43
|
-
<%= render :
|
44
|
-
<li class="last-item signout"><%= link_to 'Sign out', casein_admin_user_session_path, :
|
43
|
+
<%= render partial: '/casein/layouts/top_navigation' %>
|
44
|
+
<li class="last-item signout"><%= link_to 'Sign out', casein_admin_user_session_path, method: :delete %></li>
|
45
45
|
</ul>
|
46
46
|
</div>
|
47
47
|
</div>
|
48
48
|
<% end %>
|
49
49
|
|
50
50
|
<div class="container container-navbar-brand">
|
51
|
-
<%= link_to(image_tag(casein_config_logo, :
|
51
|
+
<%= link_to(image_tag(casein_config_logo, alt: casein_config_website_name), { controller: :casein }, class: "navbar-brand") %>
|
52
52
|
<div class="navbar-header">
|
53
53
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
54
54
|
<span class="icon-bar"></span>
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<div class="container">
|
62
62
|
<div id="navbar" class="navbar-collapse collapse">
|
63
63
|
<ul class="nav navbar-nav">
|
64
|
-
<%= render :
|
64
|
+
<%= render partial: '/casein/layouts/tab_navigation' %>
|
65
65
|
</ul>
|
66
66
|
</div>
|
67
67
|
</div>
|
@@ -20,20 +20,20 @@ module WillPaginate
|
|
20
20
|
protected
|
21
21
|
|
22
22
|
def html_container(html)
|
23
|
-
tag :div, tag(:ul, html, :
|
23
|
+
tag :div, tag(:ul, html, class: "pagination"), container_attributes
|
24
24
|
end
|
25
25
|
|
26
26
|
def page_number(page)
|
27
|
-
tag :li, link(page, page, :
|
27
|
+
tag :li, link(page, page, rel: rel_value(page)), class: ('active' if page == current_page)
|
28
28
|
end
|
29
29
|
|
30
30
|
def gap
|
31
|
-
tag :li, link('…'.html_safe, '#'), :
|
31
|
+
tag :li, link('…'.html_safe, '#'), class: 'disabled'
|
32
32
|
end
|
33
33
|
|
34
34
|
def previous_or_next_page(page, text, classname)
|
35
35
|
tag :li, link(text, page || '#'),
|
36
|
-
:
|
36
|
+
class: [(classname[0..3] if @options[:page_links]), (classname if @options[:page_links]), ('disabled' unless page)].join(' ')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
|
3
|
-
match "/admin" => redirect("/casein"), :
|
3
|
+
match "/admin" => redirect("/casein"), via: :get
|
4
4
|
|
5
5
|
namespace :casein do
|
6
6
|
|
@@ -10,11 +10,11 @@ Rails.application.routes.draw do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
resource :admin_user_session, :
|
14
|
-
resource :password_reset, :
|
13
|
+
resource :admin_user_session, only: [:new, :create, :destroy]
|
14
|
+
resource :password_reset, only: [:create, :edit, :update]
|
15
15
|
|
16
|
-
match "/blank" => "casein#blank", :
|
17
|
-
root :
|
16
|
+
match "/blank" => "casein#blank", via: :get
|
17
|
+
root to: "casein#index"
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
data/lib/casein.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
if defined?(Rails) && Rails::VERSION::MAJOR
|
1
|
+
if defined?(Rails) && Rails::VERSION::MAJOR >= 5
|
2
2
|
require 'casein/engine'
|
3
3
|
require 'casein/version'
|
4
4
|
require 'will_paginate'
|
5
5
|
require 'authlogic'
|
6
6
|
else
|
7
7
|
puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
8
|
-
puts("!!! WARNING
|
8
|
+
puts("!!! WARNING! This version of Casein requires Rails >= 5.x !!!")
|
9
9
|
puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
10
10
|
end
|
data/lib/casein/engine.rb
CHANGED
@@ -6,7 +6,7 @@ module Casein
|
|
6
6
|
class Engine < Rails::Engine
|
7
7
|
|
8
8
|
initializer "casein.assets.precompile" do |app|
|
9
|
-
app.config.assets.precompile += %w(casein/login.css casein/casein.css casein/casein.js casein/html5shiv.js casein/custom.css casein/custom.js casein/*.png)
|
9
|
+
app.config.assets.precompile += %w(casein/login.css casein/casein.css casein/casein.js casein/html5shiv.js casein/custom.css casein/custom.js casein/auth_custom.css casein/auth_custom.js casein/*.png)
|
10
10
|
end
|
11
11
|
|
12
12
|
rake_tasks do
|
data/lib/casein/version.rb
CHANGED
@@ -27,9 +27,11 @@ module Casein
|
|
27
27
|
copy_file "public/robots.txt", "public/robots.txt"
|
28
28
|
|
29
29
|
#blank stylesheets and JavaScript files
|
30
|
-
copy_file "app/assets/stylesheets/casein/custom.
|
30
|
+
copy_file "app/assets/stylesheets/casein/custom.scss", "app/assets/stylesheets/casein/custom.scss"
|
31
31
|
copy_file "app/assets/javascripts/casein/custom.js", "app/assets/javascripts/casein/custom.js"
|
32
|
-
|
32
|
+
copy_file "app/assets/stylesheets/casein/auth_custom.scss", "app/assets/stylesheets/casein/auth_custom.scss"
|
33
|
+
copy_file "app/assets/javascripts/casein/auth_custom.js", "app/assets/javascripts/casein/auth_custom.js"
|
34
|
+
|
33
35
|
#migrations
|
34
36
|
migration_template 'db/migrate/casein_create_admin_users.rb', "db/migrate/casein_create_admin_users.rb"
|
35
37
|
end
|
File without changes
|
@@ -28,7 +28,7 @@ module Casein
|
|
28
28
|
# The initial page the user is shown after they sign in or click the logo. Probably this should be set to the first tab.
|
29
29
|
# Do not point this at casein/index!
|
30
30
|
def casein_config_dashboard_url
|
31
|
-
url_for :
|
31
|
+
url_for controller: :casein, action: :blank
|
32
32
|
end
|
33
33
|
|
34
34
|
# A list of stylesheets to include. Do not remove the core casein/casein, but you can change the load order, if required.
|
@@ -40,6 +40,16 @@ module Casein
|
|
40
40
|
def casein_config_javascript_includes
|
41
41
|
%w[casein/casein casein/custom]
|
42
42
|
end
|
43
|
+
|
44
|
+
# A list of stylesheets to include in the authentication layout. Do not remove the core casein/login, but you can change the load order, if required.
|
45
|
+
def casein_config_auth_stylesheet_includes
|
46
|
+
%w[casein/login casein/auth_custom]
|
47
|
+
end
|
48
|
+
|
49
|
+
# A list of JavaScript files to includein the authentication layout. Do not remove the core casein/casein, but you can change the load order, if required.
|
50
|
+
def casein_config_auth_javascript_includes
|
51
|
+
%w[casein/casein casein/auth_custom]
|
52
|
+
end
|
43
53
|
|
44
54
|
end
|
45
55
|
end
|