Commit 5d879a06 authored by gitlabhq's avatar gitlabhq

signin page

parent 487ae906
...@@ -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 {
color:#444; color:#444;
font-size:22px; font-size:22px;
padding-top:5px; padding-top:5px;
margin:2px;
} }
} }
......
...@@ -8,8 +8,18 @@ class ApplicationController < ActionController::Base ...@@ -8,8 +8,18 @@ class ApplicationController < ActionController::Base
render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false
end end
layout :layout_by_resource
protected protected
def layout_by_resource
if devise_controller?
"devise"
else
"application"
end
end
def abilities def abilities
@abilities ||= Six.new @abilities ||= Six.new
end end
......
<h2>Sign in</h2> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login-box" }) do |f| %>
<%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %>
<div class="span-12 colborder"> <%= f.text_field :email, :class => "text top" %>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> <%= f.password_field :password, :class => "text bottom" %>
<div><%= f.label :email %><br />
<%= f.text_field :email %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<% if devise_mapping.rememberable? -%> <% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
<% end -%> <% end -%>
<br/> <br/>
<div><%= f.submit "Sign in", :class => "lbutton vm" %></div> <%= f.submit "Sign in", :class => "grey-button" %>
<% end %> <div class="right"> <%= render :partial => "devise/shared/links" %></div>
</div> <% end %>
<div>
<%= render :partial => "devise/shared/links" %>
</div>
!!!
%html
%head
%title
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
= javascript_tag do
REQ_URI = "#{request.env["REQUEST_URI"]}";
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
%body.login-page
#container
= render :partial => "layouts/flash"
= yield
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