Permalink
Browse files

Set up the Application Layout with flash messages and Devise links

  • Loading branch information...
1 parent 8d0b067 commit f611d573b42887cbdaddf840fd01a9d0a5881616 @fortuity committed Aug 8, 2010
@@ -0,0 +1,9 @@
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Logout', destroy_user_session_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Login', new_user_session_path) %>
+ </li>
+<% end %>
@@ -0,0 +1,9 @@
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Edit account', edit_user_registration_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Sign up', new_user_registration_path) %>
+ </li>
+<% end %>
@@ -1,14 +1,18 @@
<!DOCTYPE html>
<html>
<head>
- <title>Rails3SubdomainDevise</title>
+ <title>Rails3-Subdomain-Devise</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
<body>
-
-<%= yield %>
-
+ <ul class="hmenu">
+ <%= render 'devise/menu/registration_items' %>
+ <%= render 'devise/menu/login_items' %>
+ </ul>
+ <p style="color: green"><%= notice %></p>
+ <p style="color: red"><%= alert %></p>
+ <%= yield %>
</body>
</html>
@@ -0,0 +1,9 @@
+ul.hmenu {
+ list-style: none;
+ margin: 0 0 2em;
+ padding: 0;
+}
+
+ul.hmenu li {
+ display: inline;
+}

0 comments on commit f611d57

Please sign in to comment.