Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
removed the login layout, made it aprt of admin, and put a logged in …
Browse files Browse the repository at this point in the history
…check on the nav bar
  • Loading branch information
Adam Dill committed Aug 24, 2008
1 parent 68315fd commit c1d8f15
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 44 deletions.
2 changes: 1 addition & 1 deletion app/controllers/account_controller.rb
@@ -1,5 +1,5 @@
class AccountController < ApplicationController
layout 'login'
layout 'admin'

# say something nice, you goof! something sweet.
def index
Expand Down
5 changes: 1 addition & 4 deletions app/views/layouts/admin.html.erb
@@ -1,8 +1,7 @@
<!-- Generated Using Ansuz CMS -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" id="bodybg">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Ansuz CMS: Admin</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Expand All @@ -23,9 +22,7 @@
<div class="wrap">
<div id="header">Ansuz CMS: Admin [ Currently Editing: <b><%= current_database %></b> ]</div> <!-- end #header -->
<div id="sidebar">
<div class="sitetree" id="sitetree">
<%= render :partial => "menu/main" %>
</div> <!-- end .sitetree and #sitetree -->
</div> <!-- end #sidebar -->
<div id="main" class="main">
<% if flash[:message] -%>
Expand Down
32 changes: 0 additions & 32 deletions app/views/layouts/login.html.erb

This file was deleted.

17 changes: 10 additions & 7 deletions app/views/menu/_main.html.erb
@@ -1,7 +1,10 @@
<h2>Admin</h2>
<ul>
<li><%= link_to_remote "Manage Pages", :update => "sitetree", :url => { :controller => 'page_admin', :action => "manage_tree" } %></li>
<li><%= link_to_remote 'Account Settings', :update => 'main', :url => { :controller => 'account', :action => 'update' } %></li>
<li><%= link_to "Logout", :controller => 'account', :action => 'logout' %></li>
</ul>

<% if logged_in? %>
<div class="sitetree" id="sitetree">
<h2>Admin</h2>
<ul>
<li><%= link_to_remote "Manage Pages", :update => "sitetree", :url => { :controller => 'page_admin', :action => "manage_tree" } %></li>
<li><%= link_to_remote 'Account Settings', :update => 'main', :url => { :controller => 'account', :action => 'update' } %></li>
<li><%= link_to "Logout", :controller => 'account', :action => 'logout' %></li>
</ul>
</div>
<% end %>

0 comments on commit c1d8f15

Please sign in to comment.