forked from saurabh/orbit4-5
added stylesto signup
This commit is contained in:
parent
30ab17eb82
commit
2147d87dfe
|
@ -0,0 +1,100 @@
|
||||||
|
.sign-up{
|
||||||
|
margin: 150px auto 0;
|
||||||
|
position: relative;
|
||||||
|
/*text-align: center;*/
|
||||||
|
width: 600px;
|
||||||
|
}
|
||||||
|
.sign-up.facebook-form{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
margin-left: 60px;
|
||||||
|
width: 160px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.sign-up .or .right{
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-right: 60px;
|
||||||
|
width: 160px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.sign-up .facebook:hover{
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-up .role-label{
|
||||||
|
display: inline;
|
||||||
|
margin-left: 3px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-up .notify{
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notify.alert{
|
||||||
|
padding: 5px 10px 5px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notify .icon-ok{
|
||||||
|
color: green;
|
||||||
|
margin-right: 3px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notify .icon-remove{
|
||||||
|
color: red;
|
||||||
|
margin-right: 3px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-up input[type=checkbox]{
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-up .error{
|
||||||
|
border-color: #E9322D;
|
||||||
|
box-shadow: 0 0 6px #F8B987;
|
||||||
|
color: #B94A48;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line{
|
||||||
|
border-bottom: 1px solid #EDEDED;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader{
|
||||||
|
width:100px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
|
layout "authentication"
|
||||||
def new
|
def new
|
||||||
@user = User.new
|
@user = User.new
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#this class handles user login and password. User has the attributes user name, email and password which he / she can choose
|
||||||
class User
|
class User
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>RulingOrbit | <%= current_site.title %></title>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<%= javascript_include_tag "html5" %>
|
||||||
|
<![endif]-->
|
||||||
|
<%= render 'shared/meta' %>
|
||||||
|
<%= render 'shared/google_font' %>
|
||||||
|
<%= stylesheet_link_tag "basic/global" %>
|
||||||
|
<%= stylesheet_link_tag "basic" %>
|
||||||
|
<%= stylesheet_link_tag "sign_up" %>
|
||||||
|
|
||||||
|
<%= render 'shared/ie_html5_fix' %>
|
||||||
|
<%= javascript_include_tag "basic" %>
|
||||||
|
<%= yield :page_specific_css %>
|
||||||
|
<%= yield :page_specific_javascript %>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<%= csrf_meta_tag %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%= render 'layouts/orbit_bar_backend' %>
|
||||||
|
<%= yield %>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Users#create</h1>
|
|
||||||
<p>Find me in app/views/users/create.html.erb</p>
|
|
|
@ -1,3 +1,64 @@
|
||||||
|
<section id="main-wrap">
|
||||||
|
<div class="sign-up have-other-sign-in">
|
||||||
|
|
||||||
|
<% flash.each do |key, msg| %>
|
||||||
|
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="form">
|
||||||
|
<h3 class="login-logo">Sign up with Orbit</h3>
|
||||||
|
<div class="form-block option-block">
|
||||||
|
<div class="form-list clearfix">
|
||||||
|
|
||||||
|
<%= form_for @user, :html => {:class => 'content form-horizontal'} do |f| %>
|
||||||
|
|
||||||
|
<div class="control-group clear">
|
||||||
|
<label class="control-label" for="user_email"><%= t("users.user_id") %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_field :user_name, :placeholder => t("users.user_id"), :id=>"user_id",:class=>"availibility" %>
|
||||||
|
<span class="loader hide"><img src="/assets/availability-check-loader.gif" /></span>
|
||||||
|
<span class="notify not-ok hide alert alert-danger"><i class="icon-remove"></i>Not Available</span>
|
||||||
|
<span class="notify ok alert hide alert-success"><i class="icon-ok"></i>Available</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group clear">
|
||||||
|
<label class="control-label" for="user_email"><%= t("user.email")%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.email_field :email, :placeholder => t("users.email"), :id=>"user_email", :class=>"availibility" %>
|
||||||
|
<span class="loader hide"><img src="/assets/availability-check-loader.gif" /></span>
|
||||||
|
<span class="notify not-ok hide alert alert-danger"><i class="icon-remove"></i>Not Available</span>
|
||||||
|
<span class="notify ok hide alert alert-success"><i class="icon-ok"></i>Available</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group clear">
|
||||||
|
<label class="control-label" for="user_password">Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group clear">
|
||||||
|
<label class="control-label" for="user_password">Confirm Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.password_field :password, :placeholder => t(:dots), :id=>"confirm_user_password" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h3 class="line"></h3>
|
||||||
|
<div class="pull-right">
|
||||||
|
<%= f.submit t(:register), :class => 'btn btn-primary' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
<h1>Sign Up</h1>
|
<h1>Sign Up</h1>
|
||||||
|
|
||||||
<%= form_for @user do |f| %>
|
<%= form_for @user do |f| %>
|
||||||
|
@ -30,4 +91,4 @@
|
||||||
<%= f.password_field :password_confirmation %>
|
<%= f.password_field :password_confirmation %>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions"><%= f.submit %></div>
|
<div class="actions"><%= f.submit %></div>
|
||||||
<% end %>
|
<% end %> -->
|
|
@ -1,6 +1,6 @@
|
||||||
class KeywordConstraint
|
class KeywordConstraint
|
||||||
def matches?(request)
|
def matches?(request)
|
||||||
keywords = %w{admin member desktop user}
|
keywords = %w{admin member desktop user signup login}
|
||||||
keywords.all? { |k| !request.url.include?(k) }
|
keywords.all? { |k| !request.url.include?(k) }
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -45,3 +45,36 @@ en:
|
||||||
site:
|
site:
|
||||||
system_preference: System Preference
|
system_preference: System Preference
|
||||||
settings: Site Settings
|
settings: Site Settings
|
||||||
|
|
||||||
|
users:
|
||||||
|
admin_change_password: You cannot change your own password here!
|
||||||
|
avatar: Profile Picture
|
||||||
|
change_passwd: Password
|
||||||
|
setting_privilege: Privilege
|
||||||
|
email: Email
|
||||||
|
first_name: First Name
|
||||||
|
last_name: Last Name
|
||||||
|
male: Male
|
||||||
|
name: Name
|
||||||
|
valid_old_password: Current password doesn't match confirmation
|
||||||
|
new_password: New password
|
||||||
|
new_password_note: At least 6 characters
|
||||||
|
new_password_confirmation: Confirm new password
|
||||||
|
female: Female
|
||||||
|
unknown: Information Not Available
|
||||||
|
office_tel: Office Tel No.
|
||||||
|
office_tel_note: Public available
|
||||||
|
sid: ID No.
|
||||||
|
sid_note: Faculty ID No. or Student ID No.
|
||||||
|
sex: Gender
|
||||||
|
user_id: User Account
|
||||||
|
user_id_note: Should be more than 3 characters and less than 50 characters
|
||||||
|
user_id_not_null: User account cannot be null
|
||||||
|
user_id_length: User account should be more than 3 characters
|
||||||
|
user_id_error: Someone already use that user account
|
||||||
|
user_basic_id_form: Account Info.
|
||||||
|
user_basic_data: Personal Profile
|
||||||
|
|
||||||
|
dots: ●●●●●●
|
||||||
|
register: Register
|
||||||
|
registered: Registered
|
||||||
|
|
|
@ -21,3 +21,37 @@ zh_tw:
|
||||||
site:
|
site:
|
||||||
system_preference: 系統狀態
|
system_preference: 系統狀態
|
||||||
|
|
||||||
|
users:
|
||||||
|
admin_change_password: 您不能在此處修改自己的密碼!
|
||||||
|
avatar: 大頭貼照
|
||||||
|
change_passwd: 變更密碼
|
||||||
|
setting_privilege: 權限設定
|
||||||
|
email: 電子郵件
|
||||||
|
first_name: 名字
|
||||||
|
male: 男性
|
||||||
|
name: 姓名
|
||||||
|
valid_old_password: 目前的密碼不符合確認值
|
||||||
|
new_password: 新密碼
|
||||||
|
new_password_note: 至少6個字元
|
||||||
|
new_password_confirmation: 確認新密碼
|
||||||
|
female: 女性
|
||||||
|
unknown: 未知
|
||||||
|
last_name: 姓氏
|
||||||
|
office_tel: 辦公室電話
|
||||||
|
office_tel_note: 將公開於網頁
|
||||||
|
sid: 編號
|
||||||
|
sid_note: 教職員工編號或學生學號
|
||||||
|
sex: 性別
|
||||||
|
user_id: 使用者帳號
|
||||||
|
user_id_note: 需介於3個字元至50個字元之間
|
||||||
|
user_id_not_null: 使用者帳號不能是空值
|
||||||
|
user_id_length: 使用者帳號至少需要3個字元
|
||||||
|
user_id_error: 該使用者帳號已被使用
|
||||||
|
user_basic_id_form: 帳號資料
|
||||||
|
user_basic_data: 個人資料
|
||||||
|
|
||||||
|
dots: ●●●●●●
|
||||||
|
register: 註冊
|
||||||
|
registered: 已註冊
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
OrbitStore::Application.routes.draw do
|
OrbitStore::Application.routes.draw do
|
||||||
|
|
||||||
resources :users
|
|
||||||
|
|
||||||
get "/pages/edit_view" => "pages#edit_view"
|
get "/pages/edit_view" => "pages#edit_view"
|
||||||
get "/pages/preview" => "pages#preview"
|
get "/pages/preview" => "pages#preview"
|
||||||
|
|
||||||
|
@ -20,9 +18,11 @@ OrbitStore::Application.routes.draw do
|
||||||
# You can have the root of your site routed with "root"
|
# You can have the root of your site routed with "root"
|
||||||
root 'pages#home'
|
root 'pages#home'
|
||||||
|
|
||||||
locales = Site.find_by(site_active: true).in_use_locales
|
locales = Site.find_by(site_active: true).in_use_locales rescue nil
|
||||||
|
|
||||||
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
||||||
|
resources :users
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :dashboards
|
resources :dashboards
|
||||||
resources :items
|
resources :items
|
||||||
|
|
Loading…
Reference in New Issue