casein 3.1.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.
- data/Gemfile +1 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +215 -0
- data/Rakefile +40 -0
- data/app/controllers/casein/casein_controller.rb +72 -0
- data/app/controllers/casein/password_resets_controller.rb +66 -0
- data/app/controllers/casein/user_sessions_controller.rb +40 -0
- data/app/controllers/casein/users_controller.rb +102 -0
- data/app/helpers/casein/casein_helper.rb +170 -0
- data/app/mailers/casein/casein_notification.rb +44 -0
- data/app/models/casein/user.rb +55 -0
- data/app/models/casein/user_session.rb +8 -0
- data/app/views/casein/casein/blank.html.erb +1 -0
- data/app/views/casein/casein_notification/generate_new_password.erb +12 -0
- data/app/views/casein/casein_notification/new_user_information.erb +12 -0
- data/app/views/casein/casein_notification/password_reset_instructions.erb +11 -0
- data/app/views/casein/password_resets/edit.html.erb +48 -0
- data/app/views/casein/user_sessions/new.html.erb +66 -0
- data/app/views/casein/users/index.html.erb +35 -0
- data/app/views/casein/users/new.html.erb +46 -0
- data/app/views/casein/users/show.html.erb +94 -0
- data/app/views/layouts/casein_auth.html.erb +24 -0
- data/app/views/layouts/casein_main.html.erb +61 -0
- data/config/routes.rb +19 -0
- data/lib/casein.rb +3 -0
- data/lib/casein/engine.rb +12 -0
- data/lib/generators/casein/install/USAGE +1 -0
- data/lib/generators/casein/install/install_generator.rb +37 -0
- data/lib/generators/casein/install/templates/app/helpers/casein/config_helper.rb +46 -0
- data/lib/generators/casein/install/templates/app/views/casein/layouts/_left_navigation.html.erb +2 -0
- data/lib/generators/casein/install/templates/app/views/casein/layouts/_right_navigation.html.erb +1 -0
- data/lib/generators/casein/install/templates/db/migrate/casein_create_users.rb +30 -0
- data/lib/generators/casein/install/templates/public/casein/javascripts/custom.js +3 -0
- data/lib/generators/casein/install/templates/public/casein/stylesheets/custom.css +3 -0
- data/lib/generators/casein/install/templates/public/robots.txt +5 -0
- data/lib/generators/casein/scaffold/USAGE +1 -0
- data/lib/generators/casein/scaffold/scaffold_generator.rb +97 -0
- data/lib/generators/casein/scaffold/templates/controller.rb +60 -0
- data/lib/generators/casein/scaffold/templates/migration.rb +13 -0
- data/lib/generators/casein/scaffold/templates/model.rb +3 -0
- data/lib/generators/casein/scaffold/templates/views/_form.html.erb +9 -0
- data/lib/generators/casein/scaffold/templates/views/_table.html.erb +17 -0
- data/lib/generators/casein/scaffold/templates/views/index.html.erb +11 -0
- data/lib/generators/casein/scaffold/templates/views/new.html.erb +18 -0
- data/lib/generators/casein/scaffold/templates/views/show.html.erb +18 -0
- data/lib/generators/casein/update/USAGE +1 -0
- data/lib/generators/casein/update/templates/public/casein/images/casein.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/header.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/icons/add.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/icons/delete.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/icons/table.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/alertBg.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/background.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/bottom.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/loginBoxBg.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/loginBoxBottom.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/loginBoxTop.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/loginSubmit.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/recoverSubmit.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/login/top.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/nav.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/rightNav.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/rightNavButton.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/images/visitSiteNav.png +0 -0
- data/lib/generators/casein/update/templates/public/casein/javascripts/casein.js +25 -0
- data/lib/generators/casein/update/templates/public/casein/javascripts/jquery.js +154 -0
- data/lib/generators/casein/update/templates/public/casein/javascripts/login.js +24 -0
- data/lib/generators/casein/update/templates/public/casein/javascripts/rails.js +132 -0
- data/lib/generators/casein/update/templates/public/casein/stylesheets/elements.css +307 -0
- data/lib/generators/casein/update/templates/public/casein/stylesheets/login.css +133 -0
- data/lib/generators/casein/update/templates/public/casein/stylesheets/screen.css +206 -0
- data/lib/generators/casein/update/update_generator.rb +40 -0
- data/lib/railties/tasks.rake +31 -0
- data/test/casein3_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- metadata +174 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
<%= form_for @user_session, :url => casein_user_session_path do |f| %>
|
2
|
+
|
3
|
+
<% if @user_session.errors.any? %>
|
4
|
+
<div class="error">
|
5
|
+
<p>
|
6
|
+
<% @user_session.errors.keys.each do |key| %>
|
7
|
+
<%= (key.to_s.humanize + " ") unless key == :base %>
|
8
|
+
<%= @user_session.errors[key].first %>
|
9
|
+
<% end %>
|
10
|
+
</p>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% if flash[:warning] %>
|
15
|
+
<div class="error">
|
16
|
+
<p><%= flash[:warning] %></p>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if flash[:notice] %>
|
21
|
+
<div class="notice">
|
22
|
+
<p><%= flash[:notice] %></p>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<div class="text" style="margin-bottom:10px;">
|
27
|
+
<p>
|
28
|
+
<%= f.label :login, "Login:" %>
|
29
|
+
<%= f.text_field :login, :class => "caseinTextField" %>
|
30
|
+
</p>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="text">
|
34
|
+
<p>
|
35
|
+
<%= f.label :password, "Password:" %>
|
36
|
+
<%= f.password_field :password, :class => "caseinTextField" %>
|
37
|
+
</p>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="submit_remember">
|
41
|
+
<p>
|
42
|
+
<%= f.check_box :remember_me %> Remember me
|
43
|
+
<br /><br />
|
44
|
+
<%= f.submit "Log in", :class => "caseinSubmit" %>
|
45
|
+
<input type="button" value="Forgotten password?" class="caseinSubmitBlue" onclick="toggleDiv('recover');" />
|
46
|
+
</p>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<%= form_tag casein_password_reset_url do %>
|
52
|
+
<div id="recover">
|
53
|
+
|
54
|
+
<div class="text">
|
55
|
+
<p>
|
56
|
+
<%= label_tag :recover_email, "Email:" %>
|
57
|
+
<%= text_field_tag :recover_email, params[:recover_email], :class => "caseinTextField" %>
|
58
|
+
</p>
|
59
|
+
</div>
|
60
|
+
<div class="submit_remember">
|
61
|
+
<p>
|
62
|
+
<%= submit_tag "Reset", :class => "caseinSubmit" %>
|
63
|
+
</p>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<% end %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<h2>Users</h2>
|
2
|
+
|
3
|
+
<table cellpadding="0" cellspacing="0" id="itemList" class="itemList">
|
4
|
+
<tr>
|
5
|
+
<th>Login</th>
|
6
|
+
<th>Name</th>
|
7
|
+
<th>Status</th>
|
8
|
+
<th> </th>
|
9
|
+
</tr>
|
10
|
+
|
11
|
+
<% @users.each_with_index do |user, index| %>
|
12
|
+
<tr class="<%= 'even' if index.modulo(2) == 0 %> hover">
|
13
|
+
<td><%= casein_table_cell_link user.login, casein_user_path(user) %></td>
|
14
|
+
<td><%= casein_table_cell_link user.name, casein_user_path(user) %></td>
|
15
|
+
<td><%= casein_table_cell_link casein_get_access_level_text(user.access_level), casein_user_path(user) %></td>
|
16
|
+
<td class="delete">
|
17
|
+
<% if user.is_admin? == false || Casein::User.has_more_than_one_admin %>
|
18
|
+
<% confirm_message = "Are you sure you want to delete #{user.name}?" %>
|
19
|
+
|
20
|
+
<% if user.id == @session_user.id %>
|
21
|
+
<% confirm_message += "\n\nWARNING: This is your user account. You will be logged out if you proceed." %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= link_to(casein_show_row_icon("delete"), casein_user_path(user), :method => :delete, :confirm => confirm_message) %>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</table>
|
30
|
+
|
31
|
+
<%= will_paginate @users %>
|
32
|
+
|
33
|
+
<%= content_for :sidebar do %>
|
34
|
+
<li><%= link_to "#{casein_show_icon('add')}Add a new user".html_safe, new_casein_user_path %></li>
|
35
|
+
<% end %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<h2>Add a new user</h2>
|
2
|
+
|
3
|
+
<%= form_for @casein_user do |form| %>
|
4
|
+
|
5
|
+
<div class="tfContainer">
|
6
|
+
<%= casein_text_field form, @casein_user, :login, {:size => 30} %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="tfContainer tfContainerSecond">
|
10
|
+
<%= casein_text_field form, @casein_user, :name %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="tfContainer">
|
14
|
+
<%= casein_text_field form, @casein_user, :email %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="tfContainer tfContainerSecond">
|
18
|
+
<%= casein_time_zone_select form, @casein_user, :time_zone, ActiveSupport::TimeZone.us_zones %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="tfContainer">
|
22
|
+
<%= casein_select form, @casein_user, :access_level, casein_get_access_level_array, {:casein_label => "Status"} %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="tfContainer tfContainerSecond">
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="tfContainer">
|
29
|
+
<%= casein_password_field form, @casein_user, :password, {:casein_label => "Password"} %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="tfContainer tfContainerSecond">
|
33
|
+
<%= casein_password_field form, @casein_user, :password_confirmation, {:casein_label => "Repeat password"} %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="clearer"></div>
|
37
|
+
|
38
|
+
<p class="submits">
|
39
|
+
<%= form.submit "Add new user", :class => "update" %>
|
40
|
+
</p>
|
41
|
+
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<%= content_for :sidebar do %>
|
45
|
+
<li><%= link_to "#{casein_show_icon('table')}Back to list".html_safe, casein_users_path %></li>
|
46
|
+
<% end %>
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<h2>View user</h2>
|
2
|
+
|
3
|
+
<%= form_for @casein_user do |f| %>
|
4
|
+
|
5
|
+
<div class="tfContainer">
|
6
|
+
<%= casein_text_field f, f.object, :login, {:size => 30} %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="tfContainer tfContainerSecond">
|
10
|
+
<%= casein_text_field f, f.object, :name %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="tfContainer">
|
14
|
+
<%= casein_text_field f, f.object, :email %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="tfContainer tfContainerSecond">
|
18
|
+
<%= casein_time_zone_select f, f.object, :time_zone, ActiveSupport::TimeZone.us_zones %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<% if @session_user.is_admin? && (@casein_user.is_admin? == false || Casein::User.has_more_than_one_admin) %>
|
22
|
+
<div class="tfContainer">
|
23
|
+
<%= casein_select f, f.object, :access_level, casein_get_access_level_array, {:casein_label => "Status"} %>
|
24
|
+
</div>
|
25
|
+
<div class="tfContainer tfContainerSecond">
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<div class="clearer"></div>
|
30
|
+
|
31
|
+
<p class="submits">
|
32
|
+
<%= link_to 'Cancel', casein_users_path, :class => 'cancel' %> or
|
33
|
+
<%= f.submit "Save changes", :class => "update" %>
|
34
|
+
</p>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<% if @session_user.is_admin? %>
|
38
|
+
|
39
|
+
<h2>Reset password (admin action - use carefully)</h2>
|
40
|
+
|
41
|
+
<%= form_for @casein_user, :url => reset_password_casein_user_path(@casein_user) do |f| %>
|
42
|
+
|
43
|
+
<div class="tfContainer">
|
44
|
+
<%= casein_password_field f, f.object, :password, {:casein_label => "New password"} %>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="tfContainer tfContainerSecond">
|
48
|
+
<%= casein_password_field f, f.object, :password_confirmation, {:casein_label => "Repeat password"} %>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="clearer"></div>
|
52
|
+
|
53
|
+
<p class="submits">
|
54
|
+
<%= f.submit "Reset", :class => "update" %>
|
55
|
+
</p>
|
56
|
+
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<% elsif @session_user.id == @casein_user.id %>
|
60
|
+
|
61
|
+
<h2>Change password</h2>
|
62
|
+
|
63
|
+
<%= form_for @casein_user, :url => update_password_casein_user_path(@casein_user) do |f| %>
|
64
|
+
|
65
|
+
<div class="tfContainer">
|
66
|
+
<p><%= label_tag :form_current_password, "Current password" %></p>
|
67
|
+
<p><%= password_field_tag :form_current_password, "", {:class => 'caseinTextField'} %></p>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<div class="tfContainer tfContainerSecond">
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div class="tfContainer">
|
74
|
+
<%= casein_password_field f, f.object, :password, {:casein_label => "New password"} %>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div class="tfContainer tfContainerSecond">
|
78
|
+
<%= casein_password_field f, f.object, :password_confirmation, {:casein_label => "Repeat password"} %>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div class="clearer"></div>
|
82
|
+
|
83
|
+
<p class="submits">
|
84
|
+
<%= f.submit "Change", :class => "update" %>
|
85
|
+
</p>
|
86
|
+
|
87
|
+
<% end %>
|
88
|
+
<% end %>
|
89
|
+
|
90
|
+
<%= content_for :sidebar do %>
|
91
|
+
<% if @session_user.is_admin? %>
|
92
|
+
<li><%= link_to "#{casein_show_icon('table')}Back to list".html_safe, casein_users_path %></li>
|
93
|
+
<% end %>
|
94
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
7
|
+
<title>Welcome to <%= casein_config_website_name %></title>
|
8
|
+
<%= stylesheet_link_tag "/casein/stylesheets/login" %>
|
9
|
+
<%= javascript_include_tag "/casein/javascripts/jquery", "/casein/javascripts/login", "/casein/javascripts/rails" %>
|
10
|
+
<%= csrf_meta_tag %>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div id="header">
|
14
|
+
<h1><%= image_tag(casein_config_logo, :alt => casein_config_website_name) %></h1>
|
15
|
+
</div>
|
16
|
+
<div id="content">
|
17
|
+
<%= yield %>
|
18
|
+
</div>
|
19
|
+
<div id="footer">
|
20
|
+
<p>Based on <%= link_to "Casein", "http://www.caseincms.com" %> <%= casein_get_short_version_string %> technology,
|
21
|
+
an open-source project initiated by <a href="http://www.spoiledmilk.dk">Spoiled Milk</a>.</p>
|
22
|
+
</div>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
7
|
+
<title><%= casein_generate_page_title %></title>
|
8
|
+
<%= stylesheet_link_tag casein_config_stylesheet_includes %>
|
9
|
+
<%= javascript_include_tag casein_config_javascript_includes %>
|
10
|
+
<%= csrf_meta_tag %>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div id="header">
|
14
|
+
<h1><%= link_to(image_tag(casein_config_logo, :alt => casein_config_website_name), :controller => :casein) %></h1>
|
15
|
+
<div id="dashboard">
|
16
|
+
<% if @session_user != nil %>
|
17
|
+
<ul>
|
18
|
+
<li>Hello <%= @session_user.name %></li>
|
19
|
+
<li><%= Time.zone.name %></li>
|
20
|
+
<li><%= link_to 'Profile', casein_user_path(@session_user) %></li>
|
21
|
+
<li class="lastItem"><%= link_to 'Logout', casein_user_session_path, :method => :delete %></li>
|
22
|
+
</ul>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<div id="navigation">
|
26
|
+
<ul>
|
27
|
+
<%= render :partial => '/casein/layouts/left_navigation' %>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
<div id="altNavigation">
|
31
|
+
<ul>
|
32
|
+
<% if @session_user.is_admin? %>
|
33
|
+
<li><%= link_to 'Users', casein_users_path %></li>
|
34
|
+
<% end %>
|
35
|
+
<%= render :partial => '/casein/layouts/right_navigation' %>
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div id="rightBar">
|
40
|
+
<div class="spacer"></div>
|
41
|
+
<ul>
|
42
|
+
<%= yield :sidebar %>
|
43
|
+
</ul>
|
44
|
+
</div>
|
45
|
+
<div id="content">
|
46
|
+
<div id="data">
|
47
|
+
<% if flash[:warning] %>
|
48
|
+
<div id="error">
|
49
|
+
<%= flash[:warning] %>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
<% if flash[:notice] %>
|
53
|
+
<div id="notice">
|
54
|
+
<%= flash[:notice] %>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
57
|
+
<%= yield %>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</body>
|
61
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
match "/admin" => redirect("/casein")
|
4
|
+
|
5
|
+
namespace :casein do
|
6
|
+
resources :users do
|
7
|
+
member do
|
8
|
+
put :update_password, :reset_password
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
resource :user_session
|
13
|
+
resource :password_reset, :only => [:create, :edit, :update]
|
14
|
+
|
15
|
+
get :blank, :controller => :casein
|
16
|
+
root :to => "casein#index"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
data/lib/casein.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Copies user configurable Casein files into the main project
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Casein
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
|
4
|
+
include Rails::Generators::Migration
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
|
7
|
+
def self.next_migration_number dirname
|
8
|
+
if ActiveRecord::Base.timestamped_migrations
|
9
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
10
|
+
else
|
11
|
+
"%.3d" % (current_migration_number(dirname) + 1)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def generate_files
|
16
|
+
puts "*** WARNING - Generating configuration files. Make sure you have backed up any files before overwriting them. ***"
|
17
|
+
|
18
|
+
#config helper
|
19
|
+
copy_file "app/helpers/casein/config_helper.rb", "app/helpers/casein/config_helper.rb"
|
20
|
+
|
21
|
+
#initial view partials
|
22
|
+
copy_file "app/views/casein/layouts/_left_navigation.html.erb", "app/views/casein/layouts/_left_navigation.html.erb"
|
23
|
+
copy_file "app/views/casein/layouts/_right_navigation.html.erb", "app/views/casein/layouts/_right_navigation.html.erb"
|
24
|
+
|
25
|
+
#robots.txt
|
26
|
+
puts " ** Overwrite if you haven't yet modified your robots.txt, otherwise add disallow rules for /casein and /admin manually **"
|
27
|
+
copy_file "public/robots.txt", "public/robots.txt"
|
28
|
+
|
29
|
+
#blank stylesheets and JavaScript files
|
30
|
+
copy_file "public/casein/stylesheets/custom.css", "public/casein/stylesheets/custom.css"
|
31
|
+
copy_file "public/casein/javascripts/custom.js", "public/casein/javascripts/custom.js"
|
32
|
+
|
33
|
+
#migrations
|
34
|
+
migration_template 'db/migrate/casein_create_users.rb', "db/migrate/casein_create_users.rb"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Casein
|
2
|
+
module ConfigHelper
|
3
|
+
|
4
|
+
# Text string containing the name of the website or client
|
5
|
+
# Used in text and titles throughout Casein
|
6
|
+
def casein_config_website_name
|
7
|
+
'Casein'
|
8
|
+
end
|
9
|
+
|
10
|
+
# URL to the logo used for the login screen and top banner - it should be a transparent PNG
|
11
|
+
def casein_config_logo
|
12
|
+
'/casein/images/casein.png'
|
13
|
+
end
|
14
|
+
|
15
|
+
# The server hostname where Casein will run
|
16
|
+
def casein_config_hostname
|
17
|
+
if ENV['RAILS_ENV'] == 'production'
|
18
|
+
'http://www.caseincms.com'
|
19
|
+
else
|
20
|
+
'http://localhost:3000'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# The sender email address used for notifications
|
25
|
+
def casein_config_email_from_address
|
26
|
+
'donotreply@caseincms.com'
|
27
|
+
end
|
28
|
+
|
29
|
+
# The page that the user is shown when they login or click the logo
|
30
|
+
# do not point this at casein/index!
|
31
|
+
def casein_config_dashboard_url
|
32
|
+
url_for :controller => :casein, :action => :blank
|
33
|
+
end
|
34
|
+
|
35
|
+
# A list of stylesheet files to include in the page head section
|
36
|
+
def casein_config_stylesheet_includes
|
37
|
+
%w[/casein/stylesheets/custom /casein/stylesheets/screen /casein/stylesheets/elements]
|
38
|
+
end
|
39
|
+
|
40
|
+
# A list of JavaScript files to include in the page head section
|
41
|
+
def casein_config_javascript_includes
|
42
|
+
%w[/casein/javascripts/jquery /casein/javascripts/custom /casein/javascripts/casein /casein/javascripts/rails]
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|