commit for harry.tp

This commit is contained in:
Harry Bomrah 2013-11-25 20:24:56 +08:00 committed by saurabhbhatia
parent 6baec3ce6a
commit 12127a8d6c
8 changed files with 124 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,51 @@
.sign-up{
margin: 150px auto 0;
position: relative;
text-align: center;
width: 500px;
}
.sign-up .form{
background-color: #FFFFFF;
box-shadow: 0 10px 20px #CBCBCB;
margin-bottom: 20px;
padding: 15px;
}
.sign-up .login-logo{
border-bottom: 1px solid #EDEDED;
margin: 0;
padding-bottom: 15px;
}
.sign-up .option-block{
margin-top: 15px;
}
.sign-up .or{
margin-top: 15px;
margin-bottom: 15px;
}
.sign-up .or span{
margin-left: 5px;
margin-right: 5px;
}
.sign-up .or .left{
margin-top: 10px;
width: 220px;
float: left;
}
.sign-up .or .right{
margin-top: 10px;
width: 220px;
float: right;
}
.line{
border-bottom: 1px solid #EDEDED;
}
.links{
text-align: left;
}

View File

@ -0,0 +1,10 @@
class BasicInfosController < ApplicationController
layout "devise"
def index
@url = "http://fb.tp.rulingcom.com/login?callback=http://harry.tp.rulingcom.com/facebook/register_fb?user="+current_user.id.to_s rescue nil
end
def form_page
end
end

View File

@ -1,3 +1,8 @@
class RegistrationsController < Devise::RegistrationsController class RegistrationsController < Devise::RegistrationsController
layout "devise" layout "devise"
protected
def after_sign_up_path_for(resource)
basic_infos_path
end
end end

View File

@ -0,0 +1 @@
<%= stylesheet_link_tag "sign_up" %>

View File

@ -0,0 +1,18 @@
<%= stylesheet_link_tag "sign_up" %>
<section id="main-wrap">
<div class="sign-up have-other-sign-in">
<div class="form">
<h3 class="login-logo">Please select a method for Basic Info</h3>
<div class="option-block">
<a href="<%= basic_infos_form_path %>" class="btn btn-info btn-large">Form</a>
<div class="or">
<div class="line left"></div>
<span>OR</span>
<div class="line right"></div>
</div>
<a href="#" onclick="window.open('<%= @url %>','login_window','height=668,width=1124,titlebar=0,statusbar=0,location=0');return false;"><img src="assets/facebook-logo.png" /></a>
</div>
</div>
</div>
</section>

View File

@ -1,21 +1,41 @@
<h2>Sign up</h2> <%= stylesheet_link_tag "sign_up" %>
<section id="main-wrap">
<div class="sign-up have-other-sign-in">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <% flash.each do |key, msg| %>
<%= devise_error_messages! %> <%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
<% end %>
<div><%= f.label :email %><br /> <div class="form">
<%= f.email_field :email %></div> <h3 class="login-logo">Sign up with Orbit</h3>
<div class="form-block">
<div><%= f.label "Username" %><br /> <div class="form-list clearfix">
<%= f.text_field :user_id %></div>
<div><%= f.label :password %><br /> <%= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => 'content'} do |f| %>
<%= f.password_field :password %></div> <label for="user_email">User ID</label>
<div class="control-group clear">
<%= f.text_field :user_id, :placeholder => t("users.user_id"), :id=>"user_email" %>
</div>
<label for="user_password">Password</label>
<div class="control-group clear">
<%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %>
</div>
<label for="user_password">Confirm Password</label>
<div class="control-group clear">
<%= f.password_field :password, :placeholder => t(:dots), :id=>"confirm_user_password" %>
</div>
<h3 class="line"></h3>
<div class="pull-right">
<%= content_tag :button, t(:register), :type => :submit, :class => 'btn btn-primary' %>
</div>
<div class="pull-left links">
<%= render :partial => "devise/shared/links" %>
</div>
<% end %>
</div>
</div>
</div>
<div><%= f.label :password_confirmation %><br /> </div>
<%= f.password_field :password_confirmation %></div> </section>
<div><%= f.submit "Sign up" %></div>
<% end %>
<%= render :partial => "devise/shared/links" %>

View File

@ -17,7 +17,8 @@ Orbit::Application.routes.draw do
match '/purchase/:type', :to => CentralServerExchangeApp match '/purchase/:type', :to => CentralServerExchangeApp
match 'load_orbit_bar' => 'pages#load_orbit_bar' match 'load_orbit_bar' => 'pages#load_orbit_bar'
get 'basic_infos' => "basic_infos#index"
get 'basic_infos/form' => "basic_infos#form_page"
# routes for admin # routes for admin
namespace :admin do namespace :admin do
match 'user_actions' => 'user_actions#index' match 'user_actions' => 'user_actions#index'