Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some styles to application and added a last login column to use…
…rs table
- Loading branch information
Justin Camerer
committed
May 8, 2008
1 parent
4a9f3a6
commit 2e62315
Showing
9 changed files
with
85 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
!!! | ||
%html | ||
%head | ||
= stylesheet_link_tag "main" | ||
%body | ||
- if flash[:notice] | ||
#notice | ||
= "Notice: #{flash[:notice]}" | ||
- if flash[:error] | ||
#error | ||
= "Error: #{flash[:error]}" | ||
= yield :layout | ||
%div#page | ||
%ul#nav | ||
%li= link_to "Home", "/" | ||
%li= link_to "Users", users_url | ||
- if current_user.nil? | ||
%li= link_to "Login", login_url | ||
- else | ||
%li= link_to "Account", "/user" | ||
%li= link_to "Logout", logout_url | ||
|
||
- if flash[:notice] | ||
#notice= "Notice: #{flash[:notice]}" | ||
- if flash[:error] | ||
#error= "Error: #{flash[:error]}" | ||
|
||
= yield :layout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
|
||
= link_to @user.login, :controller => 'user', :action => 'edit' | ||
%h1= @user.login | ||
|
||
%table | ||
%tr | ||
%td Email | ||
%td= @user.email | ||
%tr | ||
%td Last Login | ||
%td= @user.last_login_at | ||
|
||
|
||
= link_to "Edit", :controller => 'user', :action => 'edit' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddLastLoginAtToUsers < ActiveRecord::Migration | ||
def self.up | ||
add_column :users, :last_login_at, :datetime | ||
end | ||
|
||
def self.down | ||
remove_column :users, :last_login_at | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
body { | ||
font-size: 62.5%; | ||
font-size: 1.0em; | ||
} | ||
|
||
div#page { | ||
background-color: #eee; | ||
width: 80%; | ||
margin: 1em auto; | ||
padding: 1em; | ||
padding-top: 0; | ||
} | ||
|
||
ul#nav { | ||
padding: 0; | ||
margin: 0; | ||
margin-left: 1em; | ||
} | ||
|
||
ul#nav li { | ||
display: inline; | ||
} | ||
|
||
ul#nav li a { | ||
padding: 7px 10px; | ||
background-color: #80b9f2; | ||
color: #fff; | ||
text-decoration: none; | ||
} | ||
|
||
ul#nav li a:hover { | ||
background-color: #68ace3; | ||
} | ||
|