alchemy_cms 2.8.3 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/README.md +108 -25
- data/alchemy_cms.gemspec +0 -1
- data/app/assets/stylesheets/alchemy/archive.scss +2 -2
- data/app/assets/stylesheets/alchemy/base.scss +0 -37
- data/app/assets/stylesheets/alchemy/elements.scss +1 -1
- data/app/assets/stylesheets/alchemy/flash.scss +1 -1
- data/app/assets/stylesheets/alchemy/form_elements.scss +1 -1
- data/app/assets/stylesheets/alchemy/icon-font.css.scss +40 -40
- data/app/assets/stylesheets/alchemy/icons.scss +4 -32
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +4 -4
- data/app/assets/stylesheets/alchemy/menubar.css.scss +20 -12
- data/app/assets/stylesheets/alchemy/modules.scss +0 -4
- data/app/assets/stylesheets/alchemy/search.scss +1 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
- data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy-tinymce-dialog/window.css.scss +3 -3
- data/app/controllers/alchemy/admin/base_controller.rb +12 -8
- data/app/controllers/alchemy/admin/dashboard_controller.rb +10 -5
- data/app/controllers/alchemy/admin/elements_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +8 -1
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +11 -6
- data/app/controllers/alchemy/admin/resources_controller.rb +2 -2
- data/app/controllers/alchemy/admin/users_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +71 -37
- data/app/controllers/alchemy/elements_controller.rb +1 -1
- data/app/controllers/alchemy/pages_controller.rb +9 -3
- data/app/controllers/alchemy/pictures_controller.rb +1 -0
- data/app/helpers/alchemy/admin/base_helper.rb +2 -10
- data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
- data/app/helpers/alchemy/base_helper.rb +1 -1
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/app/models/alchemy/attachment.rb +3 -4
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/content.rb +3 -4
- data/app/models/alchemy/element.rb +5 -6
- data/app/models/alchemy/folded_page.rb +1 -1
- data/app/models/alchemy/language.rb +1 -1
- data/app/models/alchemy/message.rb +1 -7
- data/app/models/alchemy/page.rb +12 -10
- data/app/models/alchemy/page/{cells.rb → page_cells.rb} +2 -2
- data/app/models/alchemy/page/{elements.rb → page_elements.rb} +2 -2
- data/app/models/alchemy/page/{naming.rb → page_naming.rb} +1 -1
- data/app/models/alchemy/page/{natures.rb → page_natures.rb} +3 -3
- data/app/models/alchemy/page/{scopes.rb → page_scopes.rb} +3 -3
- data/app/models/alchemy/page/page_users.rb +33 -0
- data/app/models/alchemy/picture.rb +3 -3
- data/app/models/alchemy/site.rb +2 -2
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +10 -4
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/update.js.erb +1 -1
- data/app/views/alchemy/{user_sessions → base}/leave.html.erb +2 -2
- data/app/views/alchemy/base/permission_denied.js.erb +3 -2
- data/app/views/layouts/alchemy/admin.html.erb +6 -3
- data/config/alchemy/config.yml +1 -11
- data/config/alchemy/modules.yml +0 -12
- data/config/locales/alchemy.de.yml +3 -40
- data/config/locales/alchemy.en.yml +2 -22
- data/config/routes.rb +2 -27
- data/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -31
- data/lib/alchemy/auth_accessors.rb +54 -0
- data/lib/alchemy/capistrano.rb +5 -17
- data/lib/alchemy/engine.rb +7 -7
- data/lib/alchemy/errors.rb +6 -0
- data/lib/alchemy/essence.rb +2 -2
- data/lib/alchemy/seeder.rb +1 -1
- data/lib/alchemy/tasks/helpers.rb +83 -0
- data/lib/alchemy/test_support/auth_helpers.rb +35 -0
- data/lib/alchemy/test_support/controller_requests.rb +37 -0
- data/{spec/support → lib/alchemy/test_support}/factories.rb +7 -28
- data/{spec/support/alchemy → lib/alchemy/test_support}/integration_helpers.rb +9 -36
- data/lib/alchemy/upgrader.rb +8 -7
- data/lib/alchemy/upgrader/two_point_nine.rb +33 -0
- data/lib/alchemy/userstamp.rb +10 -0
- data/lib/alchemy/version.rb +1 -3
- data/lib/rails/templates/alchemy.rb +1 -0
- data/lib/tasks/alchemy/db.rake +5 -5
- data/spec/controllers/admin/attachments_controller_spec.rb +3 -3
- data/spec/controllers/admin/dashboard_controller_spec.rb +55 -34
- data/spec/controllers/admin/elements_controller_spec.rb +1 -1
- data/spec/controllers/admin/essence_pictures_controller_spec.rb +22 -6
- data/spec/controllers/admin/pages_controller_spec.rb +41 -58
- data/spec/controllers/admin/resources_controller_spec.rb +30 -5
- data/spec/controllers/admin/trash_controller_spec.rb +1 -1
- data/spec/controllers/attachments_controller_spec.rb +26 -44
- data/spec/controllers/base_controller_spec.rb +8 -33
- data/spec/controllers/elements_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +7 -15
- data/spec/controllers/pictures_controller_spec.rb +44 -5
- data/spec/dummy/app/controllers/application_controller.rb +9 -1
- data/spec/dummy/app/models/user.rb +14 -0
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -31
- data/spec/dummy/db/schema.rb +0 -31
- data/spec/features/admin/language_tree_feature_spec.rb +34 -0
- data/spec/features/admin/pages_controller_spec.rb +1 -1
- data/spec/features/pages_controller_spec.rb +5 -12
- data/spec/features/picture_security_spec.rb +2 -2
- data/spec/features/security_spec.rb +6 -45
- data/spec/features/translation_integration_spec.rb +11 -20
- data/spec/{support → fixtures}/80x60.png +0 -0
- data/spec/support/image with spaces.png b/data/spec/fixtures/image with → spaces.png +0 -0
- data/spec/{support → fixtures}/image.png +0 -0
- data/spec/{support → fixtures}/image2.PNG +0 -0
- data/spec/{support → fixtures}/image3.jpeg +0 -0
- data/spec/helpers/admin/base_helper_spec.rb +31 -43
- data/spec/helpers/admin/pages_helper_spec.rb +4 -2
- data/spec/helpers/base_helper_spec.rb +10 -3
- data/spec/helpers/pages_helper_spec.rb +32 -22
- data/spec/models/attachment_spec.rb +1 -1
- data/spec/models/element_spec.rb +33 -57
- data/spec/models/message_spec.rb +0 -16
- data/spec/models/page_spec.rb +62 -26
- data/spec/models/picture_spec.rb +5 -5
- data/spec/spec_helper.rb +13 -4
- data/spec/tasks/helpers_spec.rb +213 -0
- metadata +33 -75
- data/app/controllers/alchemy/passwords_controller.rb +0 -35
- data/app/controllers/alchemy/user_sessions_controller.rb +0 -67
- data/app/controllers/alchemy/users_controller.rb +0 -46
- data/app/mailers/alchemy/notifications.rb +0 -33
- data/app/models/alchemy/page/users.rb +0 -25
- data/app/models/alchemy/user.rb +0 -183
- data/app/views/alchemy/admin/users/_table.html.erb +0 -69
- data/app/views/alchemy/admin/users/_user.html.erb +0 -39
- data/app/views/alchemy/admin/users/edit.html.erb +0 -6
- data/app/views/alchemy/admin/users/index.html.erb +0 -58
- data/app/views/alchemy/admin/users/new.html.erb +0 -6
- data/app/views/alchemy/notifications/admin_user_created.de.text.erb +0 -15
- data/app/views/alchemy/notifications/admin_user_created.en.text.erb +0 -15
- data/app/views/alchemy/notifications/registered_user_created.de.text.erb +0 -13
- data/app/views/alchemy/notifications/registered_user_created.en.text.erb +0 -13
- data/app/views/alchemy/notifications/reset_password_instructions.de.text.erb +0 -8
- data/app/views/alchemy/notifications/reset_password_instructions.en.text.erb +0 -8
- data/app/views/alchemy/passwords/edit.html.erb +0 -35
- data/app/views/alchemy/passwords/new.html.erb +0 -30
- data/app/views/alchemy/user_sessions/new.html.erb +0 -48
- data/app/views/alchemy/users/new.html.erb +0 -14
- data/config/initializers/devise.rb +0 -242
- data/config/locales/devise.de.yml +0 -58
- data/config/locales/devise.en.yml +0 -60
- data/lib/rails/generators/alchemy/devise/devise_generator.rb +0 -29
- data/spec/controllers/admin/users_controller_spec.rb +0 -132
- data/spec/controllers/passwords_controller_spec.rb +0 -16
- data/spec/controllers/user_sessions_controller_spec.rb +0 -22
- data/spec/controllers/users_controller_spec.rb +0 -66
- data/spec/mailers/notifications_spec.rb +0 -67
- data/spec/models/user_spec.rb +0 -252
- data/spec/support/alchemy/controller_helpers.rb +0 -35
@@ -1,39 +0,0 @@
|
|
1
|
-
<tr class="<%= cycle('even', 'odd') %>">
|
2
|
-
<td class="icon"><%= content_tag 'span', '', :class => "icon user#{user.gender == 'female' ? ' female' : ' male'}" %></td>
|
3
|
-
<td>
|
4
|
-
<%= render_icon(user.logged_in? ? 'online' : 'offline') %>
|
5
|
-
</td>
|
6
|
-
<td class="login"><%= user.login %></td>
|
7
|
-
<td class="name"><%= user.firstname %></td>
|
8
|
-
<td><%= user.lastname %></td>
|
9
|
-
<td class="email"><%= user.email %></td>
|
10
|
-
<td><%= _t(user.language, scope: 'translations', default: _t(:unknown)) %></td>
|
11
|
-
<td><%= user.last_sign_in_at.present? ? l(user.last_sign_in_at, :format => :default) : _t(:unknown) %></td>
|
12
|
-
<td class="role"><%= user.human_roles_string %></td>
|
13
|
-
<td class="tools">
|
14
|
-
<% permitted_to?(:destroy, :alchemy_admin_users) do %>
|
15
|
-
<%= link_to_confirmation_window(
|
16
|
-
'',
|
17
|
-
_t(:confirm_to_delete_user),
|
18
|
-
alchemy.admin_user_path(user),
|
19
|
-
:title => _t(:delete_user),
|
20
|
-
:class => "icon user_delete#{user.gender == 'female' ? ' female' : ' male'}"
|
21
|
-
) %>
|
22
|
-
<% end %>
|
23
|
-
<% permitted_to?(:edit, :alchemy_admin_users) do %>
|
24
|
-
<%= link_to_overlay_window(
|
25
|
-
'',
|
26
|
-
alchemy.edit_admin_user_path(user),
|
27
|
-
{
|
28
|
-
:title => _t(:edit_user),
|
29
|
-
:overflow => true,
|
30
|
-
:size => '420x580'
|
31
|
-
},
|
32
|
-
{
|
33
|
-
:class => "icon user_edit#{user.gender == 'female' ? ' female' : ' male'}",
|
34
|
-
:title => _t(:edit_user)
|
35
|
-
}
|
36
|
-
) %>
|
37
|
-
<% end %>
|
38
|
-
</td>
|
39
|
-
</tr>
|
@@ -1,58 +0,0 @@
|
|
1
|
-
<%= toolbar(
|
2
|
-
buttons: [
|
3
|
-
{
|
4
|
-
icon: 'user_add',
|
5
|
-
label: _t(:create_user),
|
6
|
-
url: alchemy.new_admin_user_path,
|
7
|
-
title: _t(:create_user),
|
8
|
-
hotkey: 'alt-n',
|
9
|
-
overlay_options: {
|
10
|
-
title: _t(:create_user),
|
11
|
-
size: "420x580"
|
12
|
-
},
|
13
|
-
if_permitted_to: [:new, :alchemy_admin_users]
|
14
|
-
}
|
15
|
-
]
|
16
|
-
) %>
|
17
|
-
|
18
|
-
<div id="archive_all">
|
19
|
-
<%= resources_header %>
|
20
|
-
<% if @users.any? %>
|
21
|
-
|
22
|
-
<table class="list" id="user_list">
|
23
|
-
<tr>
|
24
|
-
<th class="icon"></th>
|
25
|
-
<th class="login_status"></th>
|
26
|
-
<th class="login">
|
27
|
-
<%= sortable_column(Alchemy::User.human_attribute_name('login'), column: :login) %>
|
28
|
-
</th>
|
29
|
-
<th class="name">
|
30
|
-
<%= sortable_column(Alchemy::User.human_attribute_name('firstname'), column: :firstname) %>
|
31
|
-
</th>
|
32
|
-
<th>
|
33
|
-
<%= sortable_column(Alchemy::User.human_attribute_name('lastname'), column: :lastname) %>
|
34
|
-
</th>
|
35
|
-
<th class="email">
|
36
|
-
<%= sortable_column(Alchemy::User.human_attribute_name('email'), column: :email) %>
|
37
|
-
</th>
|
38
|
-
<th><%= Alchemy::User.human_attribute_name('language') %></th>
|
39
|
-
<th>
|
40
|
-
<%= sortable_column(Alchemy::User.human_attribute_name('last_sign_in_at'), column: :last_sign_in_at) %>
|
41
|
-
</th>
|
42
|
-
<th class="role"><%= Alchemy::User.human_attribute_name('roles') %></th>
|
43
|
-
<th class="tools"></th>
|
44
|
-
</tr>
|
45
|
-
<%= render partial: 'alchemy/admin/users/user', collection: @users %>
|
46
|
-
</table>
|
47
|
-
|
48
|
-
<%= paginate @users %>
|
49
|
-
|
50
|
-
<% elsif params[:query] %>
|
51
|
-
|
52
|
-
<div class="info">
|
53
|
-
<%= render_icon('info') %>
|
54
|
-
<%= _t('No users found') %>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<% end %>
|
58
|
-
</div>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
Willkommen in Alchemy!
|
2
|
-
|
3
|
-
Um die Inhalte Ihrer Webseite zu bearbeiten klicken Sie bitte auf folgenden Link:
|
4
|
-
|
5
|
-
<%= @url %>
|
6
|
-
|
7
|
-
Ihr Benutzername lautet: <%= @user.login %>
|
8
|
-
|
9
|
-
Aus Sicherheitsgründen stellen wir Ihr Passwort hier nicht dar.
|
10
|
-
|
11
|
-
Wenn Sie Ihr Passwort vergessen haben oder dies Ihr erster Login ist, gehen Sie bitte auf:
|
12
|
-
|
13
|
-
<%= alchemy.new_password_url %>
|
14
|
-
|
15
|
-
Viel Spaß mit Alchemy!
|
@@ -1,15 +0,0 @@
|
|
1
|
-
Welcome to Alchemy!
|
2
|
-
|
3
|
-
To manage your website open a browser and go to:
|
4
|
-
|
5
|
-
<%= @url %>
|
6
|
-
|
7
|
-
Your username is: <%= @user.login %>
|
8
|
-
|
9
|
-
For security reasons we do not show your password here.
|
10
|
-
|
11
|
-
If you forgot your password or this is your first login, please goto:
|
12
|
-
|
13
|
-
<%= alchemy.new_password_url %>
|
14
|
-
|
15
|
-
Have much fun with Alchemy!
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Hallo <%= @user.name %>!
|
2
|
-
|
3
|
-
Ihnen wurde ein Benutzerkonto eingerichtet.
|
4
|
-
|
5
|
-
Ihr Benutzername lautet: <%= @user.login %>
|
6
|
-
|
7
|
-
Es wurde ein Zufallspasswort generiert. Aus Sicherheitsgründen wird dieses hier aber nicht angezeigt.
|
8
|
-
|
9
|
-
Klicken Sie bitte daher auf den folgenden Link (*), um sich ein neues Passwort zu vergeben:
|
10
|
-
|
11
|
-
<%= alchemy.new_password_url(email: @user.email) %>
|
12
|
-
|
13
|
-
*) Sollte dies nicht funktionieren, so kopieren Sie Sich bitte diesen Link und tragen Sie ihn in die Adresszeile Ihres Webbrowsers ein.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Greetings <%= @user.name %>!
|
2
|
-
|
3
|
-
A login was created for you.
|
4
|
-
|
5
|
-
Your username is: <%= @user.login %>
|
6
|
-
|
7
|
-
The password was randomly created. For security reasons it is not displayed here.
|
8
|
-
|
9
|
-
Please follow this link (*) to reset your password:
|
10
|
-
|
11
|
-
<%= alchemy.new_password_url(email: @user.email) %>
|
12
|
-
|
13
|
-
*) If this does not work, please copy the url and paste it into the address bar of your web browser.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Hallo <%= @user.fullname %>.
|
2
|
-
|
3
|
-
Sie haben angefordert Ihr Passwort zurückzusetzen. Dies kann durch anklicken des nachfolgenden Links bestätigt werden.
|
4
|
-
|
5
|
-
<%= alchemy.edit_password_url(@user, reset_password_token: @user.reset_password_token) %>
|
6
|
-
|
7
|
-
Wenn Sie diese Zurücksetzung nicht angefragt haben, dann können Sie diese E-Mail einfach ignorieren.
|
8
|
-
Ihr Passwort wird erst dann zurückgesetzt, wenn Sie den Link anklicken.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Hello <%= @user.name %>.
|
2
|
-
|
3
|
-
You has requested to change your password. Please confirm this by clicking the link below.
|
4
|
-
|
5
|
-
<%= alchemy.edit_password_url(@user, reset_password_token: @user.reset_password_token) %>
|
6
|
-
|
7
|
-
If you didn't request this, please ignore this email.
|
8
|
-
Your password won't change until you access the link above and create a new one.
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<div id="login_box">
|
2
|
-
<div id="alchemy_greeting">
|
3
|
-
<%= image_tag("alchemy/alchemy-logo.png", :style => "width: 240px; height: 70px") %>
|
4
|
-
</div>
|
5
|
-
<div class="login_signup_box">
|
6
|
-
<% if @user.errors.blank? %>
|
7
|
-
<%= render_message do %>
|
8
|
-
<h1><%= _t 'Password reset' %></h1>
|
9
|
-
<p><%= _t 'Please enter a new password' %></p>
|
10
|
-
<% end %>
|
11
|
-
<% else %>
|
12
|
-
<div id="errors" style="display: block">
|
13
|
-
<%= devise_error_messages! %>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
16
|
-
<%= form_for(:user, :url => password_path, :html => { :method => :put }) do |f| %>
|
17
|
-
<table>
|
18
|
-
<tr>
|
19
|
-
<td class="label"><%= f.label :password, _t("New password") %></td>
|
20
|
-
<td class="input"><%= f.password_field :password, :autofocus => true %></td>
|
21
|
-
</tr>
|
22
|
-
<tr>
|
23
|
-
<td class="label"><%= f.label :password_confirmation, _t("Confirm new password") %></td>
|
24
|
-
<td class="input"><%= f.password_field :password_confirmation %></td>
|
25
|
-
</tr>
|
26
|
-
<tr>
|
27
|
-
<td colspan="2" class="submit">
|
28
|
-
<%= f.hidden_field :reset_password_token %>
|
29
|
-
<%= f.button _t("Change password") %>
|
30
|
-
</td>
|
31
|
-
</tr>
|
32
|
-
</table>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
</div>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<div id="login_box">
|
2
|
-
<div id="alchemy_greeting">
|
3
|
-
<%= image_tag("alchemy/alchemy-logo.png", :style => "width: 240px; height: 70px") %>
|
4
|
-
</div>
|
5
|
-
<div class="login_signup_box">
|
6
|
-
<% if @user.errors.blank? %>
|
7
|
-
<%= render_message do %>
|
8
|
-
<h1><%= _t 'Password reset' %></h1>
|
9
|
-
<p><%= _t 'Please enter your email address' %></p>
|
10
|
-
<% end %>
|
11
|
-
<% else %>
|
12
|
-
<div id="errors" style="display: block">
|
13
|
-
<%= devise_error_messages! %>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
16
|
-
<%= form_for(:user, :url => password_path, :html => { :method => :post }) do |f| %>
|
17
|
-
<table>
|
18
|
-
<tr>
|
19
|
-
<td class="label"><%= f.label :email %></td>
|
20
|
-
<td class="input"><%= f.email_field :email, :autofocus => true %></td>
|
21
|
-
</tr>
|
22
|
-
<tr>
|
23
|
-
<td colspan="2" class="submit">
|
24
|
-
<%= f.button _t("Send reset instructions") %>
|
25
|
-
</td>
|
26
|
-
</tr>
|
27
|
-
</table>
|
28
|
-
<% end %>
|
29
|
-
</div>
|
30
|
-
</div>
|
@@ -1,48 +0,0 @@
|
|
1
|
-
<div id="login_box">
|
2
|
-
<div id="alchemy_greeting">
|
3
|
-
<%= image_tag("alchemy/alchemy-logo.png", :style => "width: 240px; height: 70px") %>
|
4
|
-
</div>
|
5
|
-
<div class="login_signup_box">
|
6
|
-
<%= form_for :user, :url => {:action => :create}, :html => { :id => "login" } do |f| %>
|
7
|
-
<%= f.error_messages %>
|
8
|
-
<table>
|
9
|
-
<tr>
|
10
|
-
<td class="label">
|
11
|
-
<%= f.label :login %>
|
12
|
-
</td>
|
13
|
-
<td class="input">
|
14
|
-
<%= f.text_field :login, :class => 'thin_border', :autofocus => true %>
|
15
|
-
</td>
|
16
|
-
</tr>
|
17
|
-
<tr>
|
18
|
-
<td class="label">
|
19
|
-
<%= f.label :password %>
|
20
|
-
</td>
|
21
|
-
<td class="input">
|
22
|
-
<%= f.password_field :password, :class => 'thin_border' %>
|
23
|
-
<p class="foot_note">
|
24
|
-
<%= link_to _t('Forgot your password?'), new_password_path %>
|
25
|
-
</p>
|
26
|
-
</td>
|
27
|
-
</tr>
|
28
|
-
<tr>
|
29
|
-
<td colspan="2" class="submit">
|
30
|
-
<%= hidden_field_tag 'user_screensize' %>
|
31
|
-
<%= f.button _t(:login), :class => 'button', :name => nil %>
|
32
|
-
</td>
|
33
|
-
</tr>
|
34
|
-
</table>
|
35
|
-
<% end %>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<%- content_for :javascripts do -%>
|
40
|
-
<script type="text/javascript" charset="utf-8">
|
41
|
-
jQuery(function($) {
|
42
|
-
$('#user_login').focus();
|
43
|
-
$('#user_screensize').val(function() {
|
44
|
-
return screen.width+'x'+screen.height;
|
45
|
-
});
|
46
|
-
});
|
47
|
-
</script>
|
48
|
-
<%- end -%>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div id="alchemy_greeting">
|
2
|
-
<%= image_tag("alchemy/alchemy-logo.png") %>
|
3
|
-
<h1><%= _t('Welcome to Alchemy') %></h1>
|
4
|
-
<p>
|
5
|
-
<%= _t("Please Signup") %>
|
6
|
-
</p>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div id="user_signup" class="login_signup_box">
|
10
|
-
<%= form_for @user, :url => alchemy.signup_path do |f| %>
|
11
|
-
<%= f.error_messages %>
|
12
|
-
<%= render :partial => 'alchemy/admin/users/table', :locals => {:f => f} %>
|
13
|
-
<% end %>
|
14
|
-
</div>
|
@@ -1,242 +0,0 @@
|
|
1
|
-
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
-
# Many of these configuration options can be set straight in your model.
|
3
|
-
Devise.setup do |config|
|
4
|
-
# ==> Mailer Configuration
|
5
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
|
-
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
7
|
-
config.mailer_sender = Alchemy::Config.get(:mailer)['mail_from']
|
8
|
-
|
9
|
-
# Configure the class responsible to send e-mails.
|
10
|
-
config.mailer = "Alchemy::Notifications"
|
11
|
-
|
12
|
-
# ==> ORM configuration
|
13
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
14
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
15
|
-
# available as additional gems.
|
16
|
-
require 'devise/orm/active_record'
|
17
|
-
|
18
|
-
config.parent_controller = "Alchemy::BaseController"
|
19
|
-
|
20
|
-
# ==> Configuration for any authentication mechanism
|
21
|
-
# Configure which keys are used when authenticating a user. The default is
|
22
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
23
|
-
# authenticating a user, both parameters are required. Remember that those
|
24
|
-
# parameters are used only when authenticating and not when retrieving from
|
25
|
-
# session. If you need permissions, you should implement that in a before filter.
|
26
|
-
# You can also supply a hash where the value is a boolean determining whether
|
27
|
-
# or not authentication should be aborted when the value is not present.
|
28
|
-
config.authentication_keys = [:login]
|
29
|
-
|
30
|
-
# Configure parameters from the request object used for authentication. Each entry
|
31
|
-
# given should be a request method and it will automatically be passed to the
|
32
|
-
# find_for_authentication method and considered in your model lookup. For instance,
|
33
|
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
34
|
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
35
|
-
# config.request_keys = []
|
36
|
-
|
37
|
-
# Configure which authentication keys should be case-insensitive.
|
38
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
39
|
-
# to authenticate or find a user. Default is :email.
|
40
|
-
config.case_insensitive_keys = [:login]
|
41
|
-
|
42
|
-
# Configure which authentication keys should have whitespace stripped.
|
43
|
-
# These keys will have whitespace before and after removed upon creating or
|
44
|
-
# modifying a user and when used to authenticate or find a user. Default is :email.
|
45
|
-
config.strip_whitespace_keys = [:login]
|
46
|
-
|
47
|
-
# Tell if authentication through request.params is enabled. True by default.
|
48
|
-
# It can be set to an array that will enable params authentication only for the
|
49
|
-
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
50
|
-
# enable it only for database (email + password) authentication.
|
51
|
-
# config.params_authenticatable = true
|
52
|
-
|
53
|
-
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
54
|
-
# It can be set to an array that will enable http authentication only for the
|
55
|
-
# given strategies, for example, `config.http_authenticatable = [:token]` will
|
56
|
-
# enable it only for token authentication.
|
57
|
-
# config.http_authenticatable = false
|
58
|
-
|
59
|
-
# If http headers should be returned for AJAX requests. True by default.
|
60
|
-
# config.http_authenticatable_on_xhr = true
|
61
|
-
|
62
|
-
# The realm used in Http Basic Authentication. "Application" by default.
|
63
|
-
# config.http_authentication_realm = "Application"
|
64
|
-
|
65
|
-
# It will change confirmation, password recovery and other workflows
|
66
|
-
# to behave the same regardless if the e-mail provided was right or wrong.
|
67
|
-
# Does not affect registerable.
|
68
|
-
# config.paranoid = true
|
69
|
-
|
70
|
-
# By default Devise will store the user in session. You can skip storage for
|
71
|
-
# :http_auth and :token_auth by adding those symbols to the array below.
|
72
|
-
# Notice that if you are skipping storage for all authentication paths, you
|
73
|
-
# may want to disable generating routes to Devise's sessions controller by
|
74
|
-
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
75
|
-
config.skip_session_storage = [:http_auth]
|
76
|
-
|
77
|
-
# ==> Configuration for :database_authenticatable
|
78
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
79
|
-
# using other encryptors, it sets how many times you want the password re-encrypted.
|
80
|
-
#
|
81
|
-
# Limiting the stretches to just one in testing will increase the performance of
|
82
|
-
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
83
|
-
# a value less than 10 in other environments.
|
84
|
-
config.stretches = Rails.env.test? ? 1 : 10
|
85
|
-
|
86
|
-
# Setup a pepper to generate the encrypted password.
|
87
|
-
config.pepper = Rails.configuration.secret_token
|
88
|
-
|
89
|
-
# ==> Configuration for :confirmable
|
90
|
-
# A period that the user is allowed to access the website even without
|
91
|
-
# confirming his account. For instance, if set to 2.days, the user will be
|
92
|
-
# able to access the website for two days without confirming his account,
|
93
|
-
# access will be blocked just in the third day. Default is 0.days, meaning
|
94
|
-
# the user cannot access the website without confirming his account.
|
95
|
-
# config.allow_unconfirmed_access_for = 2.days
|
96
|
-
|
97
|
-
# A period that the user is allowed to confirm their account before their
|
98
|
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
99
|
-
# their account within 3 days after the mail was sent, but on the fourth day
|
100
|
-
# their account can't be confirmed with the token any more.
|
101
|
-
# Default is nil, meaning there is no restriction on how long a user can take
|
102
|
-
# before confirming their account.
|
103
|
-
# config.confirm_within = 3.days
|
104
|
-
|
105
|
-
# If true, requires any email changes to be confirmed (exactly the same way as
|
106
|
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
107
|
-
# db field (see migrations). Until confirmed new email is stored in
|
108
|
-
# unconfirmed email column, and copied to email column on successful confirmation.
|
109
|
-
# config.reconfirmable = false
|
110
|
-
|
111
|
-
# Defines which key will be used when confirming an account
|
112
|
-
# config.confirmation_keys = [ :email ]
|
113
|
-
|
114
|
-
# ==> Configuration for :rememberable
|
115
|
-
# The time the user will be remembered without asking for credentials again.
|
116
|
-
# config.remember_for = 2.weeks
|
117
|
-
|
118
|
-
# If true, extends the user's remember period when remembered via cookie.
|
119
|
-
# config.extend_remember_period = false
|
120
|
-
|
121
|
-
# Options to be passed to the created cookie. For instance, you can set
|
122
|
-
# :secure => true in order to force SSL only cookies.
|
123
|
-
# config.rememberable_options = {}
|
124
|
-
|
125
|
-
# ==> Configuration for :validatable
|
126
|
-
# Range for password length. Default is 8..128.
|
127
|
-
config.password_length = 6..128
|
128
|
-
|
129
|
-
# Email regex used to validate email formats. It simply asserts that
|
130
|
-
# an one (and only one) @ exists in the given string. This is mainly
|
131
|
-
# to give user feedback and not to assert the e-mail validity.
|
132
|
-
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
133
|
-
|
134
|
-
# ==> Configuration for :timeoutable
|
135
|
-
# The time you want to timeout the user session without activity. After this
|
136
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
137
|
-
config.timeout_in = Rails.env.development? ? nil : Alchemy::Config.get(:auto_logout_time).minutes
|
138
|
-
|
139
|
-
# If true, expires auth token on session timeout.
|
140
|
-
# config.expire_auth_token_on_timeout = false
|
141
|
-
|
142
|
-
# ==> Configuration for :lockable
|
143
|
-
# Defines which strategy will be used to lock an account.
|
144
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
145
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
146
|
-
# config.lock_strategy = :failed_attempts
|
147
|
-
|
148
|
-
# Defines which key will be used when locking and unlocking an account
|
149
|
-
# config.unlock_keys = [ :email ]
|
150
|
-
|
151
|
-
# Defines which strategy will be used to unlock an account.
|
152
|
-
# :email = Sends an unlock link to the user email
|
153
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
154
|
-
# :both = Enables both strategies
|
155
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
156
|
-
# config.unlock_strategy = :both
|
157
|
-
|
158
|
-
# Number of authentication tries before locking an account if lock_strategy
|
159
|
-
# is failed attempts.
|
160
|
-
# config.maximum_attempts = 20
|
161
|
-
|
162
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
163
|
-
# config.unlock_in = 1.hour
|
164
|
-
|
165
|
-
# ==> Configuration for :recoverable
|
166
|
-
#
|
167
|
-
# Defines which key will be used when recovering the password for an account
|
168
|
-
# config.reset_password_keys = [ :email ]
|
169
|
-
|
170
|
-
# Time interval you can reset your password with a reset password key.
|
171
|
-
# Don't put a too small interval or your users won't have the time to
|
172
|
-
# change their passwords.
|
173
|
-
config.reset_password_within = 6.hours
|
174
|
-
|
175
|
-
# ==> Configuration for :encryptable
|
176
|
-
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
177
|
-
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
178
|
-
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
179
|
-
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
180
|
-
# REST_AUTH_SITE_KEY to pepper)
|
181
|
-
# config.encryptor = :authlogic_sha512
|
182
|
-
|
183
|
-
# ==> Configuration for :token_authenticatable
|
184
|
-
# Defines name of the authentication token params key
|
185
|
-
# config.token_authentication_key = :auth_token
|
186
|
-
|
187
|
-
# ==> Scopes configuration
|
188
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
189
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
190
|
-
# are using only default views.
|
191
|
-
# config.scoped_views = false
|
192
|
-
|
193
|
-
# Configure the default scope given to Warden. By default it's the first
|
194
|
-
# devise role declared in your routes (usually :user).
|
195
|
-
# config.default_scope = :user
|
196
|
-
|
197
|
-
# Set this configuration to false if you want /users/sign_out to sign out
|
198
|
-
# only the current scope. By default, Devise signs out all scopes.
|
199
|
-
# config.sign_out_all_scopes = true
|
200
|
-
|
201
|
-
# ==> Navigation configuration
|
202
|
-
# Lists the formats that should be treated as navigational. Formats like
|
203
|
-
# :html, should redirect to the sign in page when the user does not have
|
204
|
-
# access, but formats like :xml or :json, should return 401.
|
205
|
-
#
|
206
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
207
|
-
# should add them to the navigational formats lists.
|
208
|
-
#
|
209
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
210
|
-
# config.navigational_formats = ["*/*", :html]
|
211
|
-
|
212
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
213
|
-
# config.sign_out_via = :delete
|
214
|
-
|
215
|
-
# ==> OmniAuth
|
216
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
217
|
-
# up on your models and hooks.
|
218
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
219
|
-
|
220
|
-
# ==> Warden configuration
|
221
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
222
|
-
# change the failure app, you can configure them inside the config.warden block.
|
223
|
-
#
|
224
|
-
# config.warden do |manager|
|
225
|
-
# manager.intercept_401 = false
|
226
|
-
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
227
|
-
# end
|
228
|
-
|
229
|
-
# ==> Mountable engine configurations
|
230
|
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
231
|
-
# is mountable, there are some extra configurations to be taken into account.
|
232
|
-
# The following options are available, assuming the engine is mounted as:
|
233
|
-
#
|
234
|
-
# mount MyEngine, at: "/my_engine"
|
235
|
-
#
|
236
|
-
# The router that invoked `devise_for`, in the example above, would be:
|
237
|
-
# config.router_name = :my_engine
|
238
|
-
#
|
239
|
-
# When using omniauth, Devise cannot automatically set Omniauth path,
|
240
|
-
# so you need to do it manually. For the users scope, it would be:
|
241
|
-
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
242
|
-
end
|