Index: helpers/application_helper.rb =================================================================== --- helpers/application_helper.rb (revision 482) +++ helpers/application_helper.rb (working copy) @@ -41,6 +41,14 @@ html_options) end + # Creates a hyperlink to a published Wiki page, without checking if the page exists or not + def link_to_published_page(page, text = nil, html_options = {}) + link_to( + text || page.plain_name, + {:web => @web.address, :action => 'published', :id => page.name, :only_path => true}, + html_options) + end + # Creates a hyperlink to a Wiki page, or to a "new page" form if the page doesn't exist yet def link_to_page(page_name, web = @web, text = nil, options = {}) raise 'Web not defined' if web.nil? Index: views/layouts/default.rhtml =================================================================== --- views/layouts/default.rhtml (revision 482) +++ views/layouts/default.rhtml (working copy) @@ -41,7 +41,7 @@
-

+ <% if @page and (@page.name == 'HomePage') and %w( show published print ).include?(@action_name) %> <%= h(@web.name) + (@show_diff ? ' (changes)' : '') %> <% elsif @web %> @@ -50,10 +50,11 @@ <% else %> <%= @title %> <% end %> -

+ <%= render 'navigation' unless @web.nil? || @hide_navigation %> + <% if @flash[:info] %>
<%= escape_preserving_linefeeds @flash[:info] %>
<% end %> @@ -66,8 +67,11 @@ <% if @show_footer %> <% end %> Index: views/wiki/_inbound_links.rhtml =================================================================== --- views/wiki/_inbound_links.rhtml (revision 482) +++ views/wiki/_inbound_links.rhtml (working copy) @@ -1,13 +1,13 @@ <% unless @page.linked_from.empty? %> | Linked from: - <%= @page.linked_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %> + <%= @page.linked_from.collect { |referring_page| link_to_published_page referring_page }.join(", ") %> <% end %> <% unless @page.included_from.empty? %> | Included from: - <%= @page.included_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %> + <%= @page.included_from.collect { |referring_page| link_to_published_page referring_page }.join(", ") %> <% end %> Index: views/wiki/web_list.rhtml =================================================================== --- views/wiki/web_list.rhtml (revision 482) +++ views/wiki/web_list.rhtml (working copy) @@ -1,18 +1,44 @@ <% @title = "Wiki webs" %> - + + + + +
+

+ Loading... +

+ +
+ + +
    + <% @webs.each do |web| %> +
  • + <% if web.published %> + <%= link_to_page 'HomePage', web, web.name, :mode => 'publish' %> + (read-only) / + <%= link_to_page 'HomePage', web, 'editable version', :mode => 'show' %> (requires login) + <% else %> + <%= link_to_page 'HomePage', web, web.name, :mode => 'show' %> + <% end %> + +
  • + <% end %> +
+
Index: views/wiki/published.rhtml =================================================================== --- views/wiki/published.rhtml (revision 482) +++ views/wiki/published.rhtml (working copy) @@ -7,3 +7,27 @@ %> <%= @renderer.display_published %> + + + + Index: views/wiki/edit.rhtml =================================================================== --- views/wiki/edit.rhtml (revision 482) +++ views/wiki/edit.rhtml (working copy) @@ -4,17 +4,12 @@ @hide_navigation = true %> -
- <%= render("#{@web.markup}_help") %> - <%= render 'wiki_words_help' %> -
-
<%= form_tag({ :action => 'save', :web => @web.address, :id => @page.name }, { 'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName()', 'accept-charset' => 'utf-8' }) %> - +
as <%= text_field_tag :author, @author, @@ -29,6 +24,11 @@
<%= end_form_tag %>
+Show Help +
+ <%= render("#{@web.markup}_help") %> + <%= render 'wiki_words_help' %> +
+Hide Help + +

Textile formatting tips (advanced)

@@ -22,3 +40,6 @@ ); } + +Hide Help + Index: views/wiki_words_help.rhtml =================================================================== --- views/wiki_words_help.rhtml (revision 482) +++ views/wiki_words_help.rhtml (working copy) @@ -1,9 +0,0 @@ -

Wiki words

-

- Two or more uppercase words stuck together (camel case) or any phrase surrounded by double - brackets is a wiki word. A camel-case wiki word can be escaped by putting \ in front of it. -

-

- Wiki words: HomePage, ThreeWordsTogether, [[C++]], [[Let's play again!]]
- Not wiki words: IBM, School -

_your text_your text