Commit 6a0dc392 by Truong Ba Dieu

Fix layout devise

parent 265d4a89
.form-devise{
width: 800px;
margin: auto;
display: block;
padding: 50px;
border: 1px solid #ccc;
background-color: #EAD6D6;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
\ No newline at end of file
...@@ -7,4 +7,8 @@ ...@@ -7,4 +7,8 @@
padding-left: 76px; padding-left: 76px;
} }
} }
.form-devise{
width: auto;
padding: 20px;
}
} }
\ No newline at end of file
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/Article">
<head>
<title><%= @title || "Venshop" %></title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<!-- Place this data between the <head> tags of your website -->
<meta name="description" content="<%= @description %>" />
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="<%= @title %>">
<meta itemprop="description" content="<%= @description %>"">
<meta itemprop="image" content="<%= @image %>"">
<!-- Open Graph data -->
<meta property="og:title" content="Title Here" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://www.example.com/" />
<meta property="og:image" content="http://example.com/image.jpg" />
<meta property="og:description" content="Description Here" />
<meta property="og:site_name" content="Site Name, i.e. Moz" />
<meta property="article:published_time" content="2013-09-17T05:59:00+01:00" />
<meta property="article:modified_time" content="2013-09-16T19:08:47+01:00" />
<meta property="article:section" content="Article Section" />
<meta property="article:tag" content="Article Tag" />
<meta property="fb:admins" content="Facebook numberic ID" />
</head>
<body>
<div id="wrap">
<header>
<%= render 'layouts/navigation' %>
</header>
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<%= render 'shared/messages' %>
</div>
</div>
<%= render 'shared/search_bar' %>
<%= render_breadcrumbs :separator => ' / ' %>
<div class="row mar-top-20">
<div class="col-sm-3">
<%= render 'shared/categories' %>
</div>
<div class="col-sm-9">
<%= yield %>
</div>
</div>
</div>
<div class="cleafix"></div>
</div>
<%= render 'layouts/footer' %>
</body>
</html>
h2 .form-devise
h2
| Edit | Edit
= resource_name.to_s.humanize = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class:"form-horizontal" }) do |f|
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| .col-sm-offset-3.col-sm-9
= devise_error_messages! = devise_error_messages!
.field .form-group
= f.label :name = f.label :name, class: "control-label col-sm-3"
br .col-sm-9
= f.text_field :name, autofocus: true = f.text_field :name, autofocus: true, class: "form-control"
.field .form-group
= f.label :email = f.label :email, class: "control-label col-sm-3"
br .col-sm-9
= f.email_field :email, autofocus: true = f.email_field :email, class: "form-control"
- if devise_mapping.confirmable? && resource.pending_reconfirmation? - if devise_mapping.confirmable? && resource.pending_reconfirmation?
div div
| Currently waiting confirmation for: | Currently waiting confirmation for:
= resource.unconfirmed_email = resource.unconfirmed_email
.field .form-group
= f.label :password = f.label :password, class: "control-label col-sm-3"
.col-sm-9
= f.password_field :password, autocomplete: "off", class: "form-control"
i i
| (leave blank if you don't want to change it) | (leave blank if you don't want to change it)
br .form-group
= f.password_field :password, autocomplete: "off" = f.label :password_confirmation, class: "control-label col-sm-3"
.field .col-sm-9
= f.label :password_confirmation = f.password_field :password_confirmation, autocomplete: "off", class: "form-control"
br .form-group
= f.password_field :password_confirmation, autocomplete: "off" = f.label :current_password, class: "control-label col-sm-3"
.field .col-sm-9
= f.label :current_password = f.password_field :current_password, autocomplete: "off", class: "form-control"
i i
| (we need your current password to confirm your changes) | (we need your current password to confirm your changes)
br
= f.password_field :current_password, autocomplete: "off" .form-group
.actions .col-sm-offset-3.col-sm-9
= f.submit "Update" = f.submit "Update", class: "btn btn-primary"
h3
| Cancel my account
p
| Unhappy?
= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete
= link_to "Back", :back
h2 .form-devise
h2
| Sign up | Sign up
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class:"form-horizontal" }) do |f|
.col-sm-offset-3.col-sm-9
= devise_error_messages! = devise_error_messages!
.field .form-group
= f.label :name = f.label :name, class: "control-label col-sm-3"
br .col-sm-9
= f.text_field :name, autofocus: true = f.text_field :name, autofocus: true, class: "form-control"
.field .form-group
= f.label :email = f.label :email, class: "control-label col-sm-3"
br .col-sm-9
= f.email_field :email = f.email_field :email, class: "form-control"
.field .form-group
= f.label :password = f.label :password, class: "control-label col-sm-3"
.col-sm-9
= f.password_field :password, autocomplete: "off", class: "form-control"
- if @validatable - if @validatable
em em
| ( | (
= @minimum_password_length = @minimum_password_length
| characters minimum) | characters minimum)
- if devise_mapping.rememberable?
.form-group
.col-sm-offset-3.col-sm-9
.checkbox
label
= f.check_box :remember_me
'Remember me
.form-group
.col-sm-offset-3.col-sm-9
= f.submit "Sign up", class: "btn btn-primary"
.clearfix
br br
= f.password_field :password, autocomplete: "off" = render "users/shared/links"
.field
= f.label :password_confirmation
br
= f.password_field :password_confirmation, autocomplete: "off"
.actions
= f.submit "Sign up"
= render "users/shared/links"
h2 .form-devise
h2
| Log in | Log in
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: session_path(resource_name), html: { class:"form-horizontal" }) do |f|
.field .form-group
= f.label :email = f.label :email, class: "control-label col-sm-3"
br .col-sm-9
= f.email_field :email, autofocus: true = f.email_field :email, autofocus: true, class: "form-control"
.field .form-group
= f.label :password = f.label :password, class: "control-label col-sm-3"
br .col-sm-9
= f.password_field :password, autocomplete: "off" = f.password_field :password, autocomplete: "off", class: "form-control"
- if devise_mapping.rememberable? - if devise_mapping.rememberable?
.field .form-group
.col-sm-offset-3.col-sm-9
.checkbox
label
= f.check_box :remember_me = f.check_box :remember_me
= f.label :remember_me 'Remember me
.actions
= f.submit "Log in" .form-group
= render "users/shared/links" .col-sm-offset-3.col-sm-9
= f.submit "Log in", class: "btn btn-primary"
.clearfix
br
= render "users/shared/links"
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
- if devise_mapping.registerable? && controller_name != 'registrations' - if devise_mapping.registerable? && controller_name != 'registrations'
= link_to "Sign up", new_registration_path(resource_name) = link_to "Sign up", new_registration_path(resource_name)
br br
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' -#- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= link_to "Forgot your password?", new_password_path(resource_name) -# = link_to "Forgot your password?", new_password_path(resource_name)
br -# br
- if devise_mapping.confirmable? && controller_name != 'confirmations' -#- if devise_mapping.confirmable? && controller_name != 'confirmations'
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) -# = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
br -# br
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' -#- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) -# = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
br -# br
- if devise_mapping.omniauthable? - if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider| - resource_class.omniauth_providers.each do |provider|
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment