<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<!-- TODO: helper for content type? -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<% cached_controllers = ['audio', 'documents', 'images', 'topics', 'video', 'web_links'] %>
<% if cached_controllers.include?(params[:controller]) and params[:action] == "show" %>
<% cache_with_privacy(current_item, {:part => 'page_title'}) do %><title><%= h(@title) %></title><% end -%>
<% else -%>
<title><%= h(@title) %></title>
<% end -%>
<% unless current_item.nil? -%>
<% cache_with_privacy(current_item, {:part => 'page_keywords'}) do -%>
<meta name="keywords" content="<%= page_keywords -%>" />
<% end -%>
<% cache_with_privacy(current_item, {:part => 'page_description'}) do -%>
<meta name="description" content="<%= page_description -%>" />
<% end -%>
<% else -%>
<% cache({:part => 'page_keywords'}) do -%>
<meta name="keywords" content="<%= page_keywords -%>" />
<% end -%>
<% cache({:part => 'page_description'}) do -%>
<meta name="description" content="<%= page_description -%>" />
<% end -%>
<% end -%>
<% if using_tiny_mce? -%>
<% # Include TinyMCE before other JS to avoid problems,
# tinymce not compatible with bundle_fu -%>
<%= include_tiny_mce_js -%>
<% # point tinymce at the correct css file -%>
<% @tiny_mce_options[:content_css] = "/stylesheets/cache/#{@theme}_theme.css" -%>
<% @tiny_mce_options[:extended_valid_elements] = EXTENDED_VALID_ELEMENTS if @site_admin -%>
<%= tiny_mce_init -%>
<% end -%>
<%= stylesheet_link_tag 'kete-print', :media => 'print' %>
<% bundle :name => "#{@theme}_theme" do -%>
<%= stylesheet_link_tag 'base', :media => 'screen' %>
<%= stylesheet_link_tag 'comment', :media => 'screen' %>
<%= stylesheet_link_tag 'redbox' %>
<%= stylesheet_link_tag 'dan_webb_code_highlighter/styles' if !AVAILABLE_SYNTAX_HIGHLIGHTERS.empty? %>
<%# James - 2008-11-19 %>
<%# Include a custom stylesheet if a third column is enabled. %>
<%= stylesheet_link_tag('left-hand-column') if show_basket_list_naviation_menu? %>
<% load_styles(@theme).each do |stylesheet| -%>
<%= stylesheet_link_tag stylesheet, :media => 'screen' %>
<% end -%>
<% end -%>
<%= stylesheet_link_tag('serif') if @theme_font_family == 'serif' %>
<% if !@header_image.blank? -%>
<% # allows for banner style background image -%>
<style type="text/css">
#header { background: url('<%= @header_image -%>') no-repeat top left !important; }
</style>
<% end -%>
<% bundle :name => "rails_defaults" do -%>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'redbox' %>
<% if !AVAILABLE_SYNTAX_HIGHLIGHTERS.empty? %>
<%= javascript_include_tag 'dan_webb_code_highlighter/code_highlighter' %>
<% AVAILABLE_SYNTAX_HIGHLIGHTERS.each do |syntax| %>
<%= javascript_include_tag "dan_webb_code_highlighter/#{syntax}" %>
<% end %>
<% end %>
<%= javascript_include_tag 'kete' -%>
<% end -%>
<% if ACTIVE_SCAFFOLD_CONTROLLERS.include?(params[:controller]) -%>
<% bundle :name => "active_scaffold" do -%>
<%= active_scaffold_includes %>
<% end -%>
<% end -%>
<%= @rss_tag_auto if !@rss_tag_auto.nil? -%>
<!--[if IE]><%= stylesheet_link_tag 'kete-ie', :media => 'screen' %><![endif]-->
</head>
<body id="<%= @current_basket.urlified_name -%>">
<% if IS_CONFIGURED -%>
<div id="body-outer-wrapper">
<div id="body-inner-wrapper">
<div id="header-wrapper">
<div id="header">
<!-- this would be a good place for your logo -->
<h1><%= link_to PRETTY_SITE_NAME, '/', :tabindex => '2' -%><%= header_link_to_current_basket -%></h1>
<div id="head-search-wrapper">
<% form_tag :overwrite_params => { :action => 'terms_to_page_url_redirect',
:controller => 'search',
:page => nil,
:sort_type => nil,
:sort_direction => nil,
:urlified_name => @site_basket.urlified_name,
:search_terms => nil } do %>
<div class="wrap"><label for="search_terms">Search:</label>
<%= text_field_tag 'search_terms', nil, { :accesskey => '3', :tabindex => '2' } -%>
<%= submit_tag 'Go', :tabindex => '2' %></div>
<% end -%>
</div>
<%= header_links_to_baskets %>
</div>
</div>
<div id="top-menu">
<ul class="user-nav nav-list">
<% if !logged_in? -%>
<li class="first">
<%= link_to_unless_current "Register",
{ :controller => 'account',
:action => 'signup',
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
</li>
<li>
<%= link_to_unless_current "Login",
{ :controller => 'account',
:action => 'login',
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
</li>
<% else -%>
<li id="user_baskets_list" class="first">
<%= link_to_unless_current "#{current_user.user_name}",
{ :controller => 'account',
:action => 'show',
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
<%= link_to "<em>V</em>", { :urlified_name => @site_basket.urlified_name,
:controller => 'account',
:action => 'baskets' },
:tabindex => '2' -%>
<ul class="submenu" style="display:none;">
<%= users_baskets_list -%>
<li style="padding-top:15px;"><%= link_to "all baskets",
{ :controller => 'baskets',
:action => 'list' } -%></li>
</ul>
</li>
<li>
<%= link_to_unless_current "Logout",
{ :controller => 'account',
:action => :logout,
:urlified_name => @site_basket.urlified_name },
:tabindex => '2' -%>
</li>
<% end -%>
</ul>
<ul id="main-nav" class="nav-list">
<li class="first"><a href="/" accesskey="1" tabindex="2">Home</a></li>
<%= header_browse_links %>
<li><%= link_to_unless_current(h(@about_basket.name),
basket_index_url(:urlified_name => @about_basket.urlified_name), :tabindex => '2') %></li>
<li><%= link_to_unless_current(h(@help_basket.name),
basket_index_url(:urlified_name => @help_basket.urlified_name), :tabindex => '2') %></li>
<li><%= mail_to(CONTACT_EMAIL,'Contact', :encode => "hex", :accesskey => '9', :tabindex => '2') %></li>
<%= header_add_links %>
<% add_basket_link = header_add_basket_link -%>
<% unless add_basket_link.blank? -%>
<li><%= add_basket_link -%></li>
<% end -%>
</ul>
</div> <!-- /header -->
<div id="notice" <%= flash[:notice].blank? ? "style='display:none;'" : '' -%>><div><%= flash[:notice] %></div></div>
<div id="error" <%= flash[:error].blank? ? "style='display:none;'" : '' -%>><div><%= flash[:error] %></div></div>
<div id="container">
<%# James - 2008-11-19 %>
<%# Slideshow controls are shown on 'show' pages for all item types %>
<%= render(:partial => "topics/slideshow_controls") if show_slideshow_controls? -%>
<% if render_full_width_content_wrapper? and !@displaying_error %>
<%= render(:partial => "topics/content_wrapper_start" , :locals => { :style_classes =>"full-width notabs" }) %>
<% end %>
<div style="width:1px;height:1px;padding:0px;margin:0px;"><a name="content"> </a></div>
<%= @content_for_layout %>
</div><!-- /container -->
<div class="cleaner"> </div>
<div id="footer">
<!--Footer-->
<% if !@rss_tag_link.nil? -%>
<div id="linkToRSS"><%= @rss_tag_link -%>RSS feed for
these items</a></div>
<% end -%>
<% if logged_in? and @basket_admin and !@displaying_error -%>
<div id="basket-toolbox">
<h4>Tools for basket: <%= h(@current_basket.name) -%></h4>
<ul>
<li class="first"><%= link_to_unless_current "basket preferences",
{:id => @current_basket,
:controller => '/baskets',
:action => :edit},
:tabindex => '2' -%></li>
<li><%= link_to_unless_current "moderate basket contents",
{:controller => '/moderate',
:action => :list},
:tabindex => '2' -%></li>
<li><%= link_to_unless_current "basket members",
{:controller => '/members',
:action => :list},
:tabindex => '2' -%></li>
<% # when this is more refined, may open this up to non-tech-admins -%>
<% if @tech_admin -%>
<li><%= link_to_unless_current "import content into basket",
{:controller => '/importers',
:action => :list},
:tabindex => '2' -%></li>
<% end %>
<% if @current_basket.urlified_name != 'site' -%>
<li><%= link_to_unless_current "delete this basket",
{ :id => @current_basket,
:controller => '/baskets',
:action => :destroy },
:confirm => 'Are you sure? All items in this basket will be deleted forever!', :method => :post,
:tabindex => '2' -%></li>
<% end %>
</ul>
</div>
<% end %>
<% if logged_in? and @site_admin and !@displaying_error %>
<!-- admin toolbox, temp -->
<div id="adminToolbox">
<h4>Administrator's Toolbox</h4>
<p>
Controls:
<%= link_to_unless_current("add basket", {:urlified_name => @site_basket.urlified_name,
:controller => 'baskets',
:action => :new},
:tabindex => '2') %>
|
<%= link_to_unless_current "topic types", {:controller => '/topic_types',
:action => :list,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "content types", {:controller => '/content_types',
:action => :list,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "extended fields", {:controller => '/extended_fields',
:action => :list,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "site members", {:controller => '/members',
:action => :list,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "administer licenses", {:controller => '/licenses',
:action => :index, :urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "List site on Kete.net.nz", {:controller => '/configure',
:action => 'add_link_from_kete_net',
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
<% if @tech_admin -%>
|
<%= link_to_unless_current "reconfigure site", {:controller => '/configure',
:action => :index,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "OAI PMH Sets", {:controller => '/oai_pmh_repository_sets',
:action => :index,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "Z39.50 search databases", {:controller => '/zoom_dbs',
:action => :list,
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
|
<%= link_to_unless_current "Rebuild search databases", {:controller => '/search',
:action => 'setup_rebuild',
:urlified_name => @site_basket.urlified_name},
:tabindex => '2' -%>
<% end -%>
</p>
<p>
Support:
<%= link_to_unless_current("documentation", basket_index_url(:urlified_name => @documentation_basket.urlified_name), :tabindex => '2') %>
</p>
</div>
<% end %>
<div id="footer_links">
<ul>
<% unless GOVERNMENT_WEBSITE.blank? -%>
<li><%= link_to GOVERNMENT_WEBSITE.first, GOVERNMENT_WEBSITE.last, :accesskey => '/', :tabindex => '2' -%></li>
<% end -%>
<% cache({:part => 'accessibility'}) do -%>
<% accessibility_topic = @help_basket.topics.find_by_title('Accessibility') -%>
<%= content_tag('li', link_to('Accessibility', { :urlified_name => 'help',
:controller => 'topics',
:action => 'show',
:id => accessibility_topic },
{:accesskey => '0',
:tabindex => '2'})) if accessibility_topic -%>
<% end -%>
<li><%= link_to 'Sitemap', { :urlified_name => 'site',
:controller => 'baskets',
:action => 'list' },
:accesskey => '2',
:tabindex => '2' -%></li>
<li class="last"><%= link_to "Back to Content", '#content', :accesskey => '[', :tabindex => '2' -%></li>
</ul>
</div>
</div>
</div> <!-- /body-outer-wrapper -->
</div> <!-- /body-inner-wrapper -->
<% else -%>
<div id="body-outer-wrapper">
<div id="body-inner-wrapper">
<div id="wrapper">
<div id="header">
<h1><%= PRETTY_SITE_NAME -%></h1>
</div><!-- /header -->
<div class="cleaner"> </div>
<% if flash[:notice] %>
<!-- TODO: look up if there is a style sheet class for flash, add here -->
<div id="notice"><div><%= flash[:notice] %></div></div>
<% end %>
<%= render(:partial => "topics/content_wrapper_start" , :locals => { :style_classes =>
"full-width notabs" }) %>
<div id="container">
<%= @content_for_layout %>
</div><!-- /container -->
<div class="cleaner"> </div>
<div id="footer">
<!--Footer-->
</div>
</div><!-- /wrapper -->
</div>
</div>
<% end -%>
</body>
</html>