instiki/app/views/navigation.rhtml

32 lines
1.7 KiB
Plaintext
Raw Normal View History

2007-01-22 14:43:50 +01:00
<%
def list_item(text, link_options, description, accesskey = nil)
link_options[:controller] = 'wiki'
link_options[:web] = @web.address
link_to_unless_current(text, link_options, :title => description, :accesskey => accesskey) {
content_tag('b', text, 'title' => description, 'class' => 'navOn')
}
end
%>
<div class="navigation">
2009-11-10 01:17:57 +01:00
<span class="skipNav"><a href='#navEnd'>Skip the Navigation Links</a> | </span>
<%- if params['action'] != 'published' then -%>
2007-01-22 14:43:50 +01:00
<%= list_item 'Home Page', {:action => 'show', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> |
<%= list_item 'All Pages', {:action => 'list'}, 'Alphabetically sorted list of pages', 'A' %> |
<%= list_item 'Recently Revised', {:action =>'recently_revised'}, 'Pages sorted by when they were last changed', 'U' %> |
<%= list_item 'Authors', {:action => 'authors'}, 'Who wrote what' %> |
<%= list_item 'Feeds', {:action => 'feeds'}, 'Subscribe to changes by Atom' %> |
2007-01-22 14:43:50 +01:00
<%= list_item 'Export', {:action => 'export'}, 'Download a zip with all the pages in this wiki', 'X' %> |
<% form_tag({ :controller => 'wiki', :action => 'search', :web => @web.address},
{'id' => 'navigationSearchForm', 'method' => 'get', 'accept-charset' => 'utf-8' }) do %>
2007-02-15 15:26:47 +01:00
<fieldset class="search"><input type="text" id="searchField" name="query" value="Search"
2007-01-22 14:43:50 +01:00
onfocus="this.value == 'Search' ? this.value = '' : true"
2007-02-15 15:26:47 +01:00
onblur="this.value == '' ? this.value = 'Search' : true" /></fieldset>
<% end %>
2009-11-10 01:17:57 +01:00
<%- else -%>
<%= list_item 'Home Page', {:action => 'published', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> |
<%= list_item 'Feeds', {:action => 'feeds'}, 'Subscribe to changes by Atom' %>
2009-11-10 01:17:57 +01:00
<% end-%>
<span id='navEnd'></span>
2007-02-15 15:26:47 +01:00
</div>