Commit 5d879a06433df6849e8c332e65bafdd8a1948ff0

Authored by gitlabhq
1 parent 487ae906

signin page

app/assets/stylesheets/projects.css.scss
@@ -430,6 +430,7 @@ tbody tr:nth-child(2n) td, tbody tr.even td { @@ -430,6 +430,7 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
430 color:#444; 430 color:#444;
431 font-size:22px; 431 font-size:22px;
432 padding-top:5px; 432 padding-top:5px;
  433 + margin:2px;
433 } 434 }
434 } 435 }
435 436
app/controllers/application_controller.rb
@@ -8,8 +8,18 @@ class ApplicationController < ActionController::Base @@ -8,8 +8,18 @@ class ApplicationController < ActionController::Base
8 render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false 8 render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false
9 end 9 end
10 10
  11 + layout :layout_by_resource
  12 +
11 protected 13 protected
12 14
  15 + def layout_by_resource
  16 + if devise_controller?
  17 + "devise"
  18 + else
  19 + "application"
  20 + end
  21 + end
  22 +
13 def abilities 23 def abilities
14 @abilities ||= Six.new 24 @abilities ||= Six.new
15 end 25 end
app/views/devise/sessions/new.html.erb
1 -<h2>Sign in</h2> 1 +<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login-box" }) do |f| %>
  2 + <%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %>
  3 + <%= f.text_field :email, :class => "text top" %>
  4 + <%= f.password_field :password, :class => "text bottom" %>
2 5
3 -<div class="span-12 colborder">  
4 - <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>  
5 - <div><%= f.label :email %><br />  
6 - <%= f.text_field :email %></div>  
7 -  
8 - <div><%= f.label :password %><br />  
9 - <%= f.password_field :password %></div>  
10 -  
11 - <% if devise_mapping.rememberable? -%>  
12 - <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>  
13 - <% end -%>  
14 - <br/>  
15 - <div><%= f.submit "Sign in", :class => "lbutton vm" %></div>  
16 - <% end %>  
17 -</div>  
18 -<div>  
19 - <%= render :partial => "devise/shared/links" %>  
20 -</div> 6 + <% if devise_mapping.rememberable? -%>
  7 + <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
  8 + <% end -%>
  9 + <br/>
  10 + <%= f.submit "Sign in", :class => "grey-button" %>
  11 + <div class="right"> <%= render :partial => "devise/shared/links" %></div>
  12 +<% end %>
app/views/layouts/devise.html.haml 0 → 100644
@@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
  1 +!!!
  2 +%html
  3 + %head
  4 + %title
  5 + GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
  6 + = stylesheet_link_tag "application"
  7 + = javascript_include_tag "application"
  8 + = csrf_meta_tags
  9 + %link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
  10 + = javascript_tag do
  11 + REQ_URI = "#{request.env["REQUEST_URI"]}";
  12 + REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
  13 + %body.login-page
  14 + #container
  15 + = render :partial => "layouts/flash"
  16 + = yield