aureus 0.3.6 → 1.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.
- data/Gemfile +8 -1
- data/Gemfile.lock +93 -2
- data/Rakefile +24 -6
- data/Readme.md +28 -1
- data/TODO.md +7 -0
- data/app/assets/stylesheets/aureus/base.scss +9 -4
- data/app/assets/stylesheets/aureus/content.scss +0 -24
- data/app/assets/stylesheets/aureus/form.scss +1 -16
- data/app/assets/stylesheets/aureus/index.scss +1 -0
- data/app/assets/stylesheets/aureus/navigation.scss +4 -5
- data/app/assets/stylesheets/aureus/table.scss +4 -14
- data/app/assets/stylesheets/aureus/topbar.scss +2 -2
- data/aureus.gemspec +6 -1
- data/config/initializers/formtastic.rb +82 -0
- data/config/locales/en.yml +2 -0
- data/lib/aureus/box.rb +37 -0
- data/lib/aureus/content.rb +15 -0
- data/lib/aureus/data_table.rb +139 -0
- data/lib/aureus/engine.rb +3 -1
- data/lib/aureus/helper.rb +56 -0
- data/lib/aureus/listing.rb +39 -0
- data/lib/aureus/messages.rb +23 -0
- data/lib/aureus/navigation.rb +42 -0
- data/lib/aureus/row.rb +65 -0
- data/lib/aureus/test/resource.rb +3 -0
- data/lib/aureus/test/schema.rb +8 -0
- data/lib/aureus/toolbar.rb +74 -0
- data/lib/aureus/version.rb +1 -1
- data/lib/aureus.rb +50 -1
- data/lib/generators/aureus/.DS_Store +0 -0
- data/lib/generators/aureus/devise_i18n/devise_i18n_generator.rb +20 -0
- data/lib/generators/aureus/devise_i18n/templates/devise_base.en.yml +54 -0
- data/lib/generators/aureus/devise_i18n/templates/devise_mail.en.yml +18 -0
- data/lib/generators/aureus/devise_i18n/templates/devise_ui.en.yml +54 -0
- data/lib/generators/aureus/devise_views/devise_views_generator.rb +23 -0
- data/lib/generators/aureus/devise_views/templates/devise/confirmations/new.html.haml +7 -0
- data/lib/generators/aureus/devise_views/templates/devise/mailer/confirmation_instructions.html.haml +3 -0
- data/lib/generators/aureus/devise_views/templates/devise/mailer/reset_password_instructions.html.haml +5 -0
- data/lib/generators/aureus/devise_views/templates/devise/mailer/unlock_instructions.html.haml +4 -0
- data/lib/generators/aureus/devise_views/templates/devise/passwords/edit.html.haml +9 -0
- data/lib/generators/aureus/devise_views/templates/devise/passwords/new.html.haml +7 -0
- data/lib/generators/aureus/devise_views/templates/devise/registrations/edit.html.haml +11 -0
- data/lib/generators/aureus/devise_views/templates/devise/registrations/new.html.haml +9 -0
- data/lib/generators/aureus/devise_views/templates/devise/sessions/new.html.haml +9 -0
- data/lib/generators/aureus/devise_views/templates/devise/shared/_links.html.haml +19 -0
- data/lib/generators/aureus/devise_views/templates/devise/unlocks/new.html.haml +7 -0
- data/lib/generators/aureus/views/templates/views/_form.html.haml +6 -0
- data/lib/generators/aureus/views/templates/views/_item.html.haml +6 -0
- data/lib/generators/aureus/views/templates/views/_list.html.haml +10 -0
- data/lib/generators/aureus/views/templates/views/edit.html.haml +7 -0
- data/lib/generators/aureus/views/templates/views/index.html.haml +6 -0
- data/lib/generators/aureus/views/templates/views/new.html.haml +7 -0
- data/lib/generators/aureus/views/templates/views/show.html.haml +7 -0
- data/lib/generators/aureus/views/views_generator.rb +78 -0
- data/test/html.haml +64 -0
- data/test/model.rb +3 -0
- metadata +101 -4
@@ -0,0 +1,56 @@
|
|
1
|
+
module Aureus
|
2
|
+
module Helper
|
3
|
+
|
4
|
+
def aureus_toolbar title
|
5
|
+
toolbar = Toolbar.new title
|
6
|
+
yield toolbar
|
7
|
+
toolbar.render
|
8
|
+
end
|
9
|
+
|
10
|
+
def aureus_navigation
|
11
|
+
navigation = Navigation.new
|
12
|
+
yield navigation
|
13
|
+
navigation.render
|
14
|
+
end
|
15
|
+
|
16
|
+
def aureus_messages flash
|
17
|
+
messages = Messages.new flash
|
18
|
+
messages.render
|
19
|
+
end
|
20
|
+
|
21
|
+
def aureus_content html
|
22
|
+
content = Content.new html
|
23
|
+
content.render
|
24
|
+
end
|
25
|
+
|
26
|
+
def aureus_row &block
|
27
|
+
row = Row.new &block
|
28
|
+
row.render
|
29
|
+
end
|
30
|
+
|
31
|
+
def aureus_box title, *args, &block
|
32
|
+
box = Box.new title, args, &block
|
33
|
+
box.render
|
34
|
+
end
|
35
|
+
|
36
|
+
def aureus_datatable resource
|
37
|
+
table = DataTable.new resource
|
38
|
+
yield table
|
39
|
+
table.render
|
40
|
+
end
|
41
|
+
|
42
|
+
def aureus_form *args, &block
|
43
|
+
semantic_form_for *args do |f|
|
44
|
+
capture_haml f, &block
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def aureus_listing
|
49
|
+
listing = Listing.new
|
50
|
+
yield listing
|
51
|
+
listing.render
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
class Listing < Renderable
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@entries = Array.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def entry head, body = nil, &block
|
10
|
+
init_haml_helpers
|
11
|
+
if block_given?
|
12
|
+
@entries << ListingEntry.new(head,capture_haml(&block))
|
13
|
+
else
|
14
|
+
@entries << ListingEntry.new(head,body)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def render
|
19
|
+
content_tag "table", compact_render(*@entries), :class => "simple-table"
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
class ListingEntry < Renderable
|
25
|
+
|
26
|
+
def initialize head, body
|
27
|
+
@head = head
|
28
|
+
@body = body
|
29
|
+
end
|
30
|
+
|
31
|
+
def render
|
32
|
+
content_tag "tr" do
|
33
|
+
compact content_tag("th",@head), content_tag("td",@body)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
class Messages < Renderable
|
4
|
+
|
5
|
+
def initialize flash
|
6
|
+
@flash = flash
|
7
|
+
end
|
8
|
+
|
9
|
+
def render
|
10
|
+
content_tag "div", :id => "messages" do
|
11
|
+
out = Array.new
|
12
|
+
[:notice,:error,:alert].each do |i|
|
13
|
+
if @flash[i]
|
14
|
+
out << content_tag("p", @flash[i], :class => i.to_s)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
compact *out
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
class Navigation < Renderable
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@title = ""
|
7
|
+
@buttons = Array.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def title title
|
11
|
+
@title = title
|
12
|
+
end
|
13
|
+
|
14
|
+
def button content
|
15
|
+
@buttons << NavigationButton.new(content)
|
16
|
+
end
|
17
|
+
|
18
|
+
def submit_form_button resource, text
|
19
|
+
@buttons << NavigationButton.new(content_tag("a",text,:onclick=>"triggerForm('form.#{resource.class.name.downcase}')"))
|
20
|
+
end
|
21
|
+
|
22
|
+
def render
|
23
|
+
content_tag "div", :id => "navigation" do
|
24
|
+
compact content_tag("h2", content_tag("span",@title)), content_tag("ul", compact_render(*@buttons), :id => "quicklinks")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
class NavigationButton < Renderable
|
31
|
+
|
32
|
+
def initialize content
|
33
|
+
@content = content
|
34
|
+
end
|
35
|
+
|
36
|
+
def render
|
37
|
+
content_tag "li", @content
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/lib/aureus/row.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
class Row < Renderable
|
4
|
+
|
5
|
+
def initialize &block
|
6
|
+
init_haml_helpers
|
7
|
+
@columns = Array.new
|
8
|
+
@content = capture_haml self, &block
|
9
|
+
end
|
10
|
+
|
11
|
+
def column width, &block
|
12
|
+
@columns << RowColumn.new(width,capture_haml(&block))
|
13
|
+
end
|
14
|
+
|
15
|
+
def space width
|
16
|
+
@columns << RowColumn.new(width,"")
|
17
|
+
end
|
18
|
+
|
19
|
+
def render
|
20
|
+
if @columns.empty?
|
21
|
+
content_tag "div", @content, :class => "row"
|
22
|
+
elsif @columns.length == 1
|
23
|
+
content_tag "div", @columns.first.content, :class => "row"
|
24
|
+
else
|
25
|
+
total_width = @columns.inject 0 do |sum, n|
|
26
|
+
sum += n.width
|
27
|
+
end
|
28
|
+
out = String.new.html_safe
|
29
|
+
@columns.each_with_index do |c,i|
|
30
|
+
left = 1
|
31
|
+
right = 1
|
32
|
+
width = (100.0 / total_width * c.width).round
|
33
|
+
if i == 0
|
34
|
+
left = 0
|
35
|
+
width -= 1
|
36
|
+
elsif i == @columns.length-1
|
37
|
+
right = 0
|
38
|
+
width -= 1
|
39
|
+
else
|
40
|
+
width -= 2
|
41
|
+
end
|
42
|
+
out += content_tag "div", c.content, :style => "width: #{width}%; margin_left: #{left}%; margin_right: #{right}%"
|
43
|
+
end
|
44
|
+
content_tag "div", out, :class => "row"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
class RowColumn < Renderable
|
51
|
+
|
52
|
+
attr_reader :width, :content
|
53
|
+
|
54
|
+
def initialize width, content
|
55
|
+
@width = width
|
56
|
+
@content = content
|
57
|
+
end
|
58
|
+
|
59
|
+
def render
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
class Toolbar < Renderable
|
4
|
+
|
5
|
+
def initialize title
|
6
|
+
@title = title
|
7
|
+
@left = ToolbarSection.new "left"
|
8
|
+
@right = ToolbarSection.new "right"
|
9
|
+
end
|
10
|
+
|
11
|
+
def left
|
12
|
+
yield @left
|
13
|
+
end
|
14
|
+
|
15
|
+
def right
|
16
|
+
yield @right
|
17
|
+
end
|
18
|
+
|
19
|
+
def render
|
20
|
+
content_tag "div", { :id => "aureus-toolbar" } do
|
21
|
+
compact content_tag("h1",@title), @left.render, @right.render
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
class ToolbarSection < Renderable
|
28
|
+
|
29
|
+
def initialize position
|
30
|
+
@items = Array.new
|
31
|
+
@position = position
|
32
|
+
end
|
33
|
+
|
34
|
+
def link_to text, url, *args
|
35
|
+
@items << ToolbarButton.new(text,url,args)
|
36
|
+
end
|
37
|
+
|
38
|
+
def info text
|
39
|
+
@items << ToolbarInfo.new(text)
|
40
|
+
end
|
41
|
+
|
42
|
+
def render
|
43
|
+
content_tag "ul", compact_render(*@items), :class => @position
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
class ToolbarButton < Renderable
|
49
|
+
|
50
|
+
def initialize text, url, args
|
51
|
+
@text = text
|
52
|
+
@url = url
|
53
|
+
@args = args
|
54
|
+
end
|
55
|
+
|
56
|
+
def render
|
57
|
+
content_tag "li", link_to(@text,@url,*@args)
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
class ToolbarInfo < Renderable
|
63
|
+
|
64
|
+
def initialize text
|
65
|
+
@text = text
|
66
|
+
end
|
67
|
+
|
68
|
+
def render
|
69
|
+
content_tag "li", content_tag("span",@text)
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
data/lib/aureus/version.rb
CHANGED
data/lib/aureus.rb
CHANGED
@@ -1,5 +1,54 @@
|
|
1
1
|
require "aureus/version"
|
2
|
+
require "aureus/engine"
|
3
|
+
|
4
|
+
require "formtastic"
|
5
|
+
require "haml"
|
2
6
|
|
3
7
|
module Aureus
|
4
|
-
|
8
|
+
extend ActiveSupport::Autoload
|
9
|
+
|
10
|
+
autoload :Helper
|
11
|
+
autoload :Toolbar
|
12
|
+
autoload :Navigation
|
13
|
+
autoload :Messages
|
14
|
+
autoload :Content
|
15
|
+
autoload :Row
|
16
|
+
autoload :Box
|
17
|
+
autoload :DataTable
|
18
|
+
autoload :Form
|
19
|
+
autoload :Listing
|
20
|
+
|
21
|
+
class Renderable
|
22
|
+
include ActionView::Context
|
23
|
+
include ActionView::Helpers::TagHelper
|
24
|
+
include ActionView::Helpers::CaptureHelper
|
25
|
+
include ActionView::Helpers::UrlHelper
|
26
|
+
include Haml::Helpers
|
27
|
+
|
28
|
+
def init args, *defaults
|
29
|
+
@options = defaults.extract_options!.merge args.extract_options!
|
30
|
+
end
|
31
|
+
|
32
|
+
def content_tag name, content_or_options_with_block = nil, options = nil, escape = false, &block
|
33
|
+
super name, content_or_options_with_block, options, escape, &block
|
34
|
+
end
|
35
|
+
|
36
|
+
def compact *args
|
37
|
+
out = String.new.html_safe
|
38
|
+
args.each do |i|
|
39
|
+
out += i
|
40
|
+
end
|
41
|
+
out
|
42
|
+
end
|
43
|
+
|
44
|
+
def compact_render *args
|
45
|
+
out = String.new.html_safe
|
46
|
+
args.each do |i|
|
47
|
+
out += i.render
|
48
|
+
end
|
49
|
+
out
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
5
54
|
end
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
module Generators
|
4
|
+
|
5
|
+
class DeviseI18nGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
desc "generates i18n files for the devise views"
|
8
|
+
source_root File.expand_path("../templates", __FILE__)
|
9
|
+
|
10
|
+
def generate
|
11
|
+
["devise_base.en.yml","devise_mail.en.yml","devise_ui.en.yml"].each do |f|
|
12
|
+
copy_file f, "config/locales/"+f
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
en:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
expired: has expired, please request a new one
|
5
|
+
not_found: not found
|
6
|
+
already_confirmed: was already confirmed, please try signing in
|
7
|
+
not_locked: was not locked
|
8
|
+
not_saved:
|
9
|
+
one: '1 error prohibited this %{resource} from being saved:'
|
10
|
+
other: '%{count} errors prohibited this %{resource} from being saved:'
|
11
|
+
devise:
|
12
|
+
failure:
|
13
|
+
already_authenticated: You are already signed in.
|
14
|
+
unauthenticated: You need to sign in or sign up before continuing.
|
15
|
+
unconfirmed: You have to confirm your account before continuing.
|
16
|
+
locked: Your account is locked.
|
17
|
+
invalid: Invalid email or password.
|
18
|
+
invalid_token: Invalid authentication token.
|
19
|
+
timeout: Your session expired, please sign in again to continue.
|
20
|
+
inactive: Your account was not activated yet.
|
21
|
+
sessions:
|
22
|
+
signed_in: Signed in successfully.
|
23
|
+
signed_out: Signed out successfully.
|
24
|
+
passwords:
|
25
|
+
send_instructions: You will receive an email with instructions about how to reset your password in a few minutes.
|
26
|
+
updated: Your password was changed successfully. You are now signed in.
|
27
|
+
updated_not_active: Your password was changed successfully.
|
28
|
+
send_paranoid_instructions: If your e-mail exists on our database, you will receive a password recovery link on your e-mail
|
29
|
+
confirmations:
|
30
|
+
send_instructions: You will receive an email with instructions about how to confirm your account in a few minutes.
|
31
|
+
send_paranoid_instructions: If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.
|
32
|
+
confirmed: Your account was successfully confirmed. You are now signed in.
|
33
|
+
registrations:
|
34
|
+
signed_up: Welcome! You have signed up successfully.
|
35
|
+
signed_up_but_unconfirmed: A message with a confirmation link has been sent to your email address. Please open the link to activate your account.
|
36
|
+
signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated.
|
37
|
+
signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked.
|
38
|
+
updated: You updated your account successfully.
|
39
|
+
update_needs_confirmation: You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address.
|
40
|
+
destroyed: Bye! Your account was successfully cancelled. We hope to see you again soon.
|
41
|
+
unlocks:
|
42
|
+
send_instructions: You will receive an email with instructions about how to unlock your account in a few minutes.
|
43
|
+
unlocked: Your account has been unlocked successfully. Please sign in to continue.
|
44
|
+
send_paranoid_instructions: If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.
|
45
|
+
omniauth_callbacks:
|
46
|
+
success: Successfully authorized from %{kind} account.
|
47
|
+
failure: Could not authorize you from %{kind} because %{reason}.
|
48
|
+
mailer:
|
49
|
+
confirmation_instructions:
|
50
|
+
subject: Confirmation instructions
|
51
|
+
reset_password_instructions:
|
52
|
+
subject: Reset password instructions
|
53
|
+
unlock_instructions:
|
54
|
+
subject: Unlock Instructions
|
@@ -0,0 +1,18 @@
|
|
1
|
+
en:
|
2
|
+
devise:
|
3
|
+
mail:
|
4
|
+
confirmation_instructions:
|
5
|
+
title: Welcome %{name}!
|
6
|
+
info: 'You can confirm your account through the link below:'
|
7
|
+
link: Confirm my account
|
8
|
+
reset_password_instructions:
|
9
|
+
title: Hello %{name}!
|
10
|
+
info: Someone has requested a link to change your password, and you can do this through the link below.
|
11
|
+
link: Change my password
|
12
|
+
foot1: If you didn't request this, please ignore this email.
|
13
|
+
foot2: Your password won't change until you access the link above and create a new one.
|
14
|
+
unlock_instructions:
|
15
|
+
title: Hello %{name}!
|
16
|
+
info1: Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
|
17
|
+
info2: 'Click the link below to unlock your account:'
|
18
|
+
link: Unlock my account
|
@@ -0,0 +1,54 @@
|
|
1
|
+
en:
|
2
|
+
devise:
|
3
|
+
ui:
|
4
|
+
confirmations:
|
5
|
+
new:
|
6
|
+
title: Resend confirmation instructions
|
7
|
+
email: Your Email Address
|
8
|
+
submit: Resend
|
9
|
+
passwords:
|
10
|
+
new:
|
11
|
+
title: Lost you Password?
|
12
|
+
email: Your Email Address
|
13
|
+
submit: Send
|
14
|
+
edit:
|
15
|
+
title: Change Password
|
16
|
+
password: Password
|
17
|
+
password_confirmation: Password Confirmation
|
18
|
+
submit: Change
|
19
|
+
registrations:
|
20
|
+
new:
|
21
|
+
title: Sign Up
|
22
|
+
email: Your Email
|
23
|
+
password: Password
|
24
|
+
password_confirmation: Password Confirmation
|
25
|
+
submit: Sign Up
|
26
|
+
edit:
|
27
|
+
title: Edit %{name}
|
28
|
+
email: Your Email
|
29
|
+
password: Password
|
30
|
+
password_confirmation: Password Confirmation
|
31
|
+
current_password: Current Password
|
32
|
+
submit: Update
|
33
|
+
destroy: Delete Account
|
34
|
+
destroy_confirm: Are you sure?
|
35
|
+
back: Back
|
36
|
+
sessions:
|
37
|
+
new:
|
38
|
+
title: Log In
|
39
|
+
email: Email Address
|
40
|
+
password: Password
|
41
|
+
remember_me: Remember me?
|
42
|
+
submit: Log In
|
43
|
+
unlocks:
|
44
|
+
new:
|
45
|
+
title: Resend unlock instructions
|
46
|
+
email: Email Address
|
47
|
+
submit: Resend
|
48
|
+
shared:
|
49
|
+
links:
|
50
|
+
login: Log In
|
51
|
+
signup: Sign Up
|
52
|
+
lost_password: Lost Password?
|
53
|
+
no_confirmation: No Confirmation Mail Received?
|
54
|
+
no_unlock: No Unlock Mail Received?
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Aureus
|
2
|
+
|
3
|
+
module Generators
|
4
|
+
|
5
|
+
class DeviseViewsGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
desc "generates aureus compliant devise haml views with aureus helpers"
|
8
|
+
source_root File.expand_path("../templates", __FILE__)
|
9
|
+
argument :folder, :type => :string, :default => "devise"
|
10
|
+
|
11
|
+
def generate
|
12
|
+
target = "app/views/"+folder
|
13
|
+
directory "devise", target
|
14
|
+
Dir[target+"/**/*.haml"].each do |file|
|
15
|
+
gsub_file file, "{{{folder}}}", folder, :verbose => false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= aureus_box t("devise.ui.confirmations.new.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post } do |f|
|
4
|
+
= f.input :email, :label => t("devise.ui.confirmations.new.email")
|
5
|
+
= f.action :submit, :label => t("devise.ui.confirmations.new.submit")
|
6
|
+
- b.foot do
|
7
|
+
= render :partial => "{{{folder}}}/shared/links"
|
data/lib/generators/aureus/devise_views/templates/devise/mailer/confirmation_instructions.html.haml
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
%p= t("devise.mail.confirmation_instructions.title", :name => @resource.email)
|
2
|
+
%p= t("devise.mail.confirmation_instructions.info")
|
3
|
+
%p= link_to t("devise.mail.confirmation_instructions.link"), confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
|
@@ -0,0 +1,5 @@
|
|
1
|
+
%p= t("devise.mail.reset_password_instructions.title", :name => @resource.email)
|
2
|
+
%p= t("devise.mail.reset_password_instructions.info")
|
3
|
+
%p= link_to t("devise.mail.reset_password_instructions.link"), edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
|
4
|
+
%p= t("devise.mail.reset_password_instructions.foot1")
|
5
|
+
%p= t("devise.mail.reset_password_instructions.foot2")
|
@@ -0,0 +1,4 @@
|
|
1
|
+
%p= t("devise.mail.unlock_instructions.title", :name => @resource.email)
|
2
|
+
%p= t("devise.mail.unlock_instructions.info1")
|
3
|
+
%p= t("devise.mail.unlock_instructions.info2")
|
4
|
+
%p= link_to t("devise.mail.unlock_instructions.link"), unlock_url(@resource, :unlock_token => @resource.unlock_token)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= aureus_box t("devise.ui.passwords.edit.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put } do |form|
|
4
|
+
= form.input :reset_password_token, :as => :hidden
|
5
|
+
= form.input :password, :label => t("devise.ui.passwords.edit.password")
|
6
|
+
= form.input :password_confirmation, :label => t("devise.ui.passwords.edit.password_confirmation")
|
7
|
+
= form.action :submit, :label => t("devise.ui.passwords.edit.submit")
|
8
|
+
- b.foot do
|
9
|
+
= render :partial => "{{{folder}}}/shared/links"
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= aureus_box t("devise.ui.passwords.new.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post } do |form|
|
4
|
+
= form.input :email, :label => t("devise.ui.passwords.new.email")
|
5
|
+
= form.action :submit, :label => t("devise.ui.passwords.new.submit")
|
6
|
+
- b.foot do
|
7
|
+
= render :partial => "{{{folder}}}/shared/links"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= aureus_box t("devise.ui.registrations.edit.title",:name => resource_name.to_s.humanize), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put } do |form|
|
4
|
+
= form.input :email, :label => t("devise.ui.registrations.edit.email")
|
5
|
+
= form.input :password, :label => t("devise.ui.registrations.edit.password")
|
6
|
+
= form.input :password_confirmation, :label => t("devise.ui.registrations.edit.password_confirmation")
|
7
|
+
= form.input :current_password, :label => t("devise.ui.registrations.edit.current_password")
|
8
|
+
= form.action :submit, :label => t("devise.ui.registrations.edit.submit")
|
9
|
+
- b.foot do
|
10
|
+
%p= link_to t("devise.ui.registrations.edit.destroy"), registration_path(resource_name), :confirm => t("devise.ui.registrations.edit.destroy_confirm"), :method => :delete
|
11
|
+
%p= link_to t("devise.ui.registrations.edit.back"), :back
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= aureus_box t("devise.ui.registrations.new.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => registration_path(resource_name) do |form|
|
4
|
+
= form.input :email, :label => t("devise.ui.registrations.new.email")
|
5
|
+
= form.input :password, :label => t("devise.ui.registrations.new.password")
|
6
|
+
= form.input :password_confirmation, :label => t("devise.ui.registrations.new.password_confirmation")
|
7
|
+
= form.action :submit, :label => t("devise.ui.registrations.new.submit")
|
8
|
+
- b.foot do
|
9
|
+
= render :partial => "{{{folder}}}/shared/links"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= aureus_box t("devise.ui.sessions.new.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => session_path(resource_name) do |form|
|
4
|
+
= form.input :email, :label => t("devise.ui.sessions.new.email")
|
5
|
+
= form.input :password, :label => t("devise.ui.sessions.new.password")
|
6
|
+
= form.input :remember_me, :as => :boolean, :label => t("devise.ui.sessions.new.remember_me") if devise_mapping.rememberable?
|
7
|
+
= form.action :submit, :label => t("devise.ui.sessions.new.submit")
|
8
|
+
- b.foot do
|
9
|
+
= render :partial => "{{{folder}}}/shared/links"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- if controller_name != 'sessions'
|
2
|
+
= link_to t("devise.ui.shared.links.login"), new_session_path(resource_name)
|
3
|
+
%br
|
4
|
+
|
5
|
+
- if devise_mapping.registerable? && controller_name != 'registrations'
|
6
|
+
= link_to t("devise.ui.shared.links.signup"), new_registration_path(resource_name)
|
7
|
+
%br
|
8
|
+
|
9
|
+
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
10
|
+
= link_to t("devise.ui.shared.links.lost_password"), new_password_path(resource_name)
|
11
|
+
%br
|
12
|
+
|
13
|
+
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
14
|
+
= link_to t("devise.ui.shared.links.no_confirmation"), new_confirmation_path(resource_name)
|
15
|
+
%br
|
16
|
+
|
17
|
+
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
18
|
+
= link_to t("devise.ui.shared.links.no_unlock"), new_unlock_path(resource_name)
|
19
|
+
%br
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= aureus_box t("devise.ui.unlocks.new.title"), :centered => true, :for => :form do |b|
|
2
|
+
- b.content do
|
3
|
+
= semantic_form_for resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post } do |form|
|
4
|
+
= form.input :email, :label => t("devise.ui.unlocks.new.email")
|
5
|
+
= form.action :submit, :label => t("devise.ui.unlocks.new.submit")
|
6
|
+
- b.foot do
|
7
|
+
= render :partial => "{{{folder}}}/shared/links"
|