padrino-admin 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +1 -1
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +4 -4
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -9
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +2 -2
- data/lib/padrino-admin/locale/admin/ja.yml +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10ff66cffdd5d7835371089b8a73b6eb42e5e85c
|
4
|
+
data.tar.gz: f3da8b3bfebc8df965b7a5b82bb7673b09ac7287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4210af693f831978fec6f41a0f76a7717dc55cc9d25a2be4e02a8ccbe065026b5eb631c639f433d068708982c53a1ebe30e954ceaa882ca146b60b703b726682
|
7
|
+
data.tar.gz: 9ae257671b3db25e8c7bfdb303ebfaa862d5ff54a2c05c8d18a707a233eb5887bf8103714c678acc7fde5d9e5a89ae846fbe466487f213f75f10682bea502f39
|
@@ -19,7 +19,7 @@ class <%= @model_name %> < ActiveRecord::Base
|
|
19
19
|
# This method is for authentication purpose.
|
20
20
|
#
|
21
21
|
def self.authenticate(email, password)
|
22
|
-
account =
|
22
|
+
account = where("lower(email) = lower(?)", email).first if email.present?
|
23
23
|
account && account.has_password?(password) ? account : nil
|
24
24
|
end
|
25
25
|
|
@@ -18,16 +18,16 @@
|
|
18
18
|
</div>
|
19
19
|
<div class="login-body modal-body">
|
20
20
|
|
21
|
-
<%%=
|
21
|
+
<%%= {:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe %>
|
22
22
|
|
23
23
|
<div class="form-group">
|
24
24
|
<label for="email" class="col-lg-2 control-label"><%%= pat('login.email') %></label>
|
25
|
-
<div class="col-lg-10"><%%= email_field_tag :email, :value => params[:email], :autofocus => true, :class => 'form-control' %></div>
|
25
|
+
<div class="col-lg-10"><%%= email_field_tag :email, :id => :email, :value => params[:email], :autofocus => true, :class => 'form-control' %></div>
|
26
26
|
</div>
|
27
27
|
|
28
28
|
<div class="form-group">
|
29
29
|
<label for="password" class="col-lg-2 control-label"><%%= pat('login.password') %></label>
|
30
|
-
<div class="col-lg-10"><%%= password_field_tag :password, :class => 'form-control' %></div>
|
30
|
+
<div class="col-lg-10"><%%= password_field_tag :password, :id => :password, :class => 'form-control' %></div>
|
31
31
|
</div>
|
32
32
|
|
33
33
|
<fieldset class="login-control-group-last control-group">
|
@@ -41,4 +41,4 @@
|
|
41
41
|
<%% end %>
|
42
42
|
<%%= javascript_include_tag 'jquery-1.9.0.min', (Padrino.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application %>
|
43
43
|
</body>
|
44
|
-
</html>
|
44
|
+
</html>
|
@@ -8,30 +8,30 @@
|
|
8
8
|
%meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'}
|
9
9
|
%meta{:name => :viewport, :content => 'width=device-width,initial-scale=1'}
|
10
10
|
%title= @title.present? ? "#{@title} | Padrino Admin" : "#{pat('login.title')} | Padrino Admin"
|
11
|
-
=favicon_tag 'favicon.ico'
|
12
|
-
=stylesheet_link_tag 'bootstrap', 'application'
|
11
|
+
= favicon_tag 'favicon.ico'
|
12
|
+
= stylesheet_link_tag 'bootstrap', 'application'
|
13
13
|
%body
|
14
14
|
= form_tag url(:sessions, :create), :class=>'login form-horizontal' do
|
15
15
|
.login-header.modal-header
|
16
16
|
.login-logo=image_tag('logo.png', :alt => "Padrino's logo", :height => 250, :width => 193)
|
17
17
|
.login-body.modal-body
|
18
|
-
=
|
18
|
+
= {:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe
|
19
19
|
|
20
20
|
.form-group
|
21
21
|
%label.col-lg-2.control-label{:for => :email}= pat('login.email')
|
22
|
-
.col-lg-10=email_field_tag :email, :value => params[:email], :autofocus => true, :class =>'form-control'
|
22
|
+
.col-lg-10= email_field_tag :email, :id => :email, :value => params[:email], :autofocus => true, :class =>'form-control'
|
23
23
|
|
24
24
|
.form-group
|
25
25
|
%label.col-lg-2.control-label{:for => :password}= pat('login.password')
|
26
|
-
.col-lg-10=password_field_tag :password, :class =>'form-control'
|
26
|
+
.col-lg-10= password_field_tag :password, :id => :password, :class =>'form-control'
|
27
27
|
|
28
28
|
%fieldset.login-control-group-last.control-group
|
29
29
|
.login-controls.controls
|
30
30
|
%label.login-bypass-label.checkbox
|
31
|
-
=check_box_tag :bypass
|
32
|
-
=pat('login.bypass')
|
31
|
+
= check_box_tag :bypass
|
32
|
+
= pat('login.bypass')
|
33
33
|
|
34
34
|
.login-footer.modal-footer
|
35
|
-
=submit_tag(pat('login.sign_in'), :class => 'btn btn-primary pull-right')
|
35
|
+
= submit_tag(pat('login.sign_in'), :class => 'btn btn-primary pull-right')
|
36
36
|
|
37
|
-
=javascript_include_tag 'jquery-1.9.0.min', (Padrino.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application
|
37
|
+
= javascript_include_tag 'jquery-1.9.0.min', (Padrino.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application
|
@@ -20,11 +20,11 @@ html lang="en" xmlns="http://www.w3.org/1999/xhtml"
|
|
20
20
|
|
21
21
|
div class='form-group'
|
22
22
|
label for="email" class='col-lg-2 control-label' = pat('login.email')
|
23
|
-
div class='col-lg-10' = email_field_tag :email, :value => params[:email], :autofocus => true, :class => 'form-control'
|
23
|
+
div class='col-lg-10' = email_field_tag :email, :id => :email, :value => params[:email], :autofocus => true, :class => 'form-control'
|
24
24
|
|
25
25
|
div class='form-group'
|
26
26
|
label for="password" class='col-lg-2 control-label' = pat('login.password')
|
27
|
-
div class='col-lg-10'
|
27
|
+
div class='col-lg-10' = password_field_tag :password, :id => :password, :class => 'form-control'
|
28
28
|
|
29
29
|
fieldset class='login-control-group-last control-group'
|
30
30
|
div class='login-controls controls'
|
@@ -7,7 +7,7 @@ ja:
|
|
7
7
|
password: "パスワード"
|
8
8
|
bypass: "ログインを省略する"
|
9
9
|
sign_in: "ログイン"
|
10
|
-
error: "
|
10
|
+
error: "メールアドレスかパスワードが間違っています。"
|
11
11
|
save: "保存"
|
12
12
|
save_and_continue: "保存して続行"
|
13
13
|
cancel: "キャンセル"
|
@@ -31,13 +31,13 @@ ja:
|
|
31
31
|
new_title: "新規 %{model}"
|
32
32
|
create_title: "%{model} の作成"
|
33
33
|
create_success: "%{model} は正常に作成されました。"
|
34
|
-
create_error: "%{model}
|
34
|
+
create_error: "%{model} を作成できませんでした。"
|
35
35
|
edit_title: "%{model} の編集"
|
36
36
|
edit_warning: "ID %{id} の %{model} が見つかりませんでした。"
|
37
37
|
update_title: "%{model} の編集"
|
38
38
|
update_success: "ID %{id} の %{model} は正常に更新されました。"
|
39
39
|
update_error: "%{model} を更新できませんでした。"
|
40
|
-
update_warning: "ID %{id} の %{model}
|
40
|
+
update_warning: "ID %{id} の %{model} が見つかりませんでした。"
|
41
41
|
delete_title: "%{model} を削除しますか?"
|
42
42
|
delete_success: "ID %{id} の %{model} は正常に削除されました。"
|
43
43
|
delete_error: "を削除することができません %{model}!"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-core
|
@@ -19,28 +19,28 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.12.
|
22
|
+
version: 0.12.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.12.
|
29
|
+
version: 0.12.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: padrino-helpers
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.12.
|
36
|
+
version: 0.12.2
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.12.
|
43
|
+
version: 0.12.2
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: therubyracer
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|