2005-01-24 19:52:04 +01:00
|
|
|
<%
|
2005-03-26 19:56:37 +01:00
|
|
|
def list_item(text, link_options, description, accesskey = nil)
|
|
|
|
link_options[:controller] = 'wiki'
|
2005-03-27 16:23:09 +02:00
|
|
|
link_options[:web] = @web.address
|
2005-03-26 19:56:37 +01:00
|
|
|
link_to_unless_current(text, link_options, :title => description, :accesskey => accesskey) {
|
2005-04-28 07:35:58 +02:00
|
|
|
content_tag('b', text, 'title' => description, 'class' => 'navOn')
|
2005-03-26 19:56:37 +01:00
|
|
|
}
|
2005-01-24 19:52:04 +01:00
|
|
|
end
|
|
|
|
%>
|
|
|
|
|
2005-11-14 15:02:36 +01:00
|
|
|
<div class="navigation">
|
2005-03-26 19:56:37 +01:00
|
|
|
<% if @action_name != 'published' then %>
|
|
|
|
<%= list_item 'Home Page', {:action => 'show', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> |
|
|
|
|
<%= list_item 'All Pages', {:action => 'list'}, 'Alphabetically sorted list of pages', 'A' %> |
|
2005-11-14 15:02:36 +01:00
|
|
|
<%= list_item 'Recently Revised', {:action =>'recently_revised'}, 'Pages sorted by when they were last changed', 'U' %> |
|
2005-03-26 19:56:37 +01:00
|
|
|
<%= list_item 'Authors', {:action => 'authors'}, 'Who wrote what' %> |
|
|
|
|
<%= list_item 'Feeds', {:action => 'feeds'}, 'Subscribe to changes by RSS' %> |
|
2005-11-14 15:02:36 +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'}) %>
|
|
|
|
<input type="text" id="searchField" name="query" value="Search"
|
|
|
|
onfocus="this.value == 'Search' ? this.value = '' : true"
|
|
|
|
onblur="this.value == '' ? this.value = 'Search' : true" />
|
|
|
|
<%= end_form_tag %>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% else %>
|
2005-03-26 19:56:37 +01:00
|
|
|
<%= list_item 'Home Page', {:action => 'published', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> |
|
2005-01-24 19:52:04 +01:00
|
|
|
<% end%>
|
2005-11-14 15:02:36 +01:00
|
|
|
</div>
|