This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructured (but NOT refactored) the views and layouts and partials …
…for page
- Loading branch information
Adam Dill
committed
Aug 24, 2008
1 parent
c1d8f15
commit feb9cee
Showing
10 changed files
with
54 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
<% if @page.display_title %> | ||
<h1><%= @page.full_title %></h1> | ||
<h2><%= @page.full_title %></h2> | ||
<% end %> | ||
<%= @page.page_body %> | ||
|
||
<br/><br/> | ||
<div id="page_controls"><%= page_controls(@page) %></div> | ||
|
||
<div id="page_controls"><%= page_controls(@page) %></div> |
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,2 +1,4 @@ | ||
<% if @page.display_title %><h1><%= @page.full_title %></h1><% end %> | ||
<%= @page.page_body %> | ||
<% if @page.display_title %> | ||
<h2><%= @page.full_title %></h2> | ||
<% end %> | ||
<%= @page.page_body %> |
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,28 +1,29 @@ | ||
<!-- 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: <%= @page.title if @page%></title> | ||
<title>Ansuz CMS: <%= @page.title if @page -%></title> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="Content-Script-Type" content="text/javascript" /> | ||
<meta name="description" content="Ansuz Content Management System" /> | ||
<meta name="keywords" content="Ansuz Content Management System" /> | ||
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon" /> | ||
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" /> | ||
<%= stylesheet_link_tag 'yui-reset-fonts' %> | ||
<%= stylesheet_link_tag 'base' %> | ||
<%= stylesheet_link_tag 'sprite' %> | ||
<%= javascript_include_tag :defaults %> | ||
<%= stylesheet_link_tag 'yui-reset-fonts' -%> | ||
<%= stylesheet_link_tag 'base' -%> | ||
<%= stylesheet_link_tag 'sprite' -%> | ||
<%= javascript_include_tag :defaults -%> | ||
<!--[if lt IE 7.]><%= javascript_include_tag 'pngfix.js' %><![endif]--> | ||
</head> | ||
<body> | ||
<div id="header"></div><!-- end div header --> | ||
<div id="navigation"><%= render :partial => "page/flatTopNav"%></div> | ||
<div id="breadcrumb"><%= render :partial => "page/breadcrumb" if @page!=@root %></div> | ||
<div id="content"><%= @content_for_layout %></div> | ||
<div id="flatChildNav"><%= render :partial => "page/flatChildNav" %></div> | ||
<div id="footer"><%= (render :partial => "page/footer") %></div> | ||
<h1 id="header"><span>Ansuz CMS</span></h1> | ||
<div id="content"> | ||
<%= render :partial => "page/breadcrumb" if @page!=@root -%> | ||
<%= @content_for_layout -%> | ||
<%= render :partial => "page/child_nav" if !@page.children.empty? -%> | ||
</div> | ||
<%= render :partial => "page/top_nav" -%> | ||
<%= render :partial => "page/footer" -%> | ||
</body> | ||
</html> |
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,7 +1,8 @@ | ||
<% url = "" | ||
@breadcrumb.each do |crumb| # Itterate through breadcrumb, from root to parent of current | ||
url = (url!="")? url+crumb.name+"/" : url = "/" # Create URLs for Breadcrumb sequentially | ||
%> | ||
<%= link_to crumb.title, ((url=='/')? '/' + @root.name + '/' : url ) %> > <% # Code for generating links and '>' seperators | ||
end # End breadcrumb itteration | ||
%><b><%= (@pageNum!=nil)? link_to(@page.title, './') + " > page " + @pageNum.to_s : @page.title %></b> <%# Print the current page without a link and end the div %> | ||
<div id="breadcrumb"> | ||
<% url = "" | ||
@breadcrumb.each do |crumb| | ||
url = (url!="")? url+crumb.name+"/" : url = "/" %> | ||
<%= link_to crumb.title, ((url=='/')? '/' + @root.name + '/' : url ) %> > | ||
<% end %> | ||
<b><%= (@pageNum!=nil)? link_to(@page.title, './') + " > page " + @pageNum.to_s : @page.title %></b> | ||
</div> |
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,10 @@ | ||
<% if @page.show_sub_menu %> | ||
<div id="flatChildNav"> | ||
<h4>Child Pages:</h4> | ||
<ul> | ||
<% @page.children.each do |page| %> | ||
<li><a href='<%= page.name %>/'><%= page.title %></a></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 +1,4 @@ | ||
<ul><% # Center and open UL for Footer links: top level navigation | ||
@topNav.each do |page| # Itterate through top level navigation: Root and all it's sub-pages | ||
%><li><a href='<%= "/"+page.name %>'><%= page.title %></a></li> <% # Code for each link | ||
end # End Itteration | ||
%> | ||
</ul><%# Close UL %> | ||
<div id="footer"> | ||
<h4>Footer Message here</h4> | ||
<h5>Copyright © Message here</h5> | ||
</div> |
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,12 @@ | ||
<div id="navigation"> | ||
<h3>Navigation:</h3> | ||
<ul> | ||
<% @topNav.each do |page| | ||
isActive = (page==@breadcrumb[1]||(@breadcrumb.length==1 && page==@page)) | ||
url = "/"+page.name+"/" %> | ||
<li <%= "id=\"active\"" if isActive -%> > | ||
<a href='<%= url %>'><%= page.title -%></a> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> |