From 666cb32cc3c33775cf9febed2be3449c1da0bd38 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sun, 18 Feb 2007 01:48:32 -0600 Subject: [PATCH] A little separation of presentation from content. --- app/views/wiki/_inbound_links.rhtml | 8 ++++---- app/views/wiki/edit.rhtml | 2 +- app/views/wiki/list.rhtml | 16 ++++++++-------- app/views/wiki/page.rhtml | 8 +++----- app/views/wiki/revision.rhtml | 4 +--- app/views/wiki/rollback.rhtml | 2 +- public/stylesheets/instiki.css | 28 ++++++++++++++++++++++++++++ 7 files changed, 46 insertions(+), 22 deletions(-) diff --git a/app/views/wiki/_inbound_links.rhtml b/app/views/wiki/_inbound_links.rhtml index 4c5e4e12..ae44b421 100644 --- a/app/views/wiki/_inbound_links.rhtml +++ b/app/views/wiki/_inbound_links.rhtml @@ -1,13 +1,13 @@ <% unless @page.linked_from.empty? %> - + | Linked from: <%= @page.linked_from.collect { |referring_page| link_to_existing_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(", ") %> - + <% end %> diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index dc6e6ae9..b6e39f15 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -24,7 +24,7 @@ <%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name}, {:accesskey => 'c'}) %> - (unlocks page) + (unlocks page) <%= end_form_tag %> diff --git a/app/views/wiki/list.rhtml b/app/views/wiki/list.rhtml index e1b584be..a4b8d209 100644 --- a/app/views/wiki/list.rhtml +++ b/app/views/wiki/list.rhtml @@ -2,11 +2,11 @@ <%= categories_menu unless @categories.empty? %> -
+
<% unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? %>

All Pages -
All pages in <%= @set_name %> listed alphabetically +
All pages in <%= @set_name %> listed alphabetically

<% end %> @@ -19,18 +19,18 @@ <% if @web.count_pages? %> <% total_chars = @pages_in_category.characters %> -

All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages

+

All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages

<% end %>
-
+
<% unless @page_names_that_are_wanted.empty? %>

Wanted Pages
- - Unexisting pages that other pages in <%= @set_name %> reference - + + Nonexistent pages that other pages in <%= @set_name %> reference +

    @@ -50,7 +50,7 @@ <% unless @pages_that_are_orphaned.empty? %>

    Orphaned Pages -
    Pages in <%= @set_name %> that no other page reference +
    Pages in <%= @set_name %> that no other page reference

      diff --git a/app/views/wiki/page.rhtml b/app/views/wiki/page.rhtml index 70afa08f..d627b06b 100644 --- a/app/views/wiki/page.rhtml +++ b/app/views/wiki/page.rhtml @@ -6,11 +6,9 @@
      <% if @show_diff %> -

      - +

      Showing changes from revision #<%= @page.revisions.size - 1 %> to #<%= @page.revisions.size %>: Added | Removed | Changed -

      <%= @renderer.display_diff %> <% else %> @@ -32,7 +30,7 @@ <%= navigation_menu_for_page.join(' | ') %> - + | Views: <%= link_to('Print', { :web => @web.address, :action => 'print', :id => @page.name }, @@ -47,7 +45,7 @@ {:id => 'view_pdf'} %> <% end %> <% end %> - + <%= render :partial => 'inbound_links' %>
      diff --git a/app/views/wiki/revision.rhtml b/app/views/wiki/revision.rhtml index 5f5e2521..6cf9e177 100644 --- a/app/views/wiki/revision.rhtml +++ b/app/views/wiki/revision.rhtml @@ -5,11 +5,9 @@
      <% if @show_diff %> -

      - +

      Showing changes from revision #<%= @revision_number - 1 %> to #<%= @revision_number %>: Added | Removed | Changed -

      <%= @renderer.display_diff %> <% else %> diff --git a/app/views/wiki/rollback.rhtml b/app/views/wiki/rollback.rhtml index a165c71d..b8ff9151 100644 --- a/app/views/wiki/rollback.rhtml +++ b/app/views/wiki/rollback.rhtml @@ -24,7 +24,7 @@ <%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name}, {:accesskey => 'c'}) %> - (unlocks page) + (unlocks page)
      <%= end_form_tag %> diff --git a/public/stylesheets/instiki.css b/public/stylesheets/instiki.css index 73649fe6..a3459b26 100644 --- a/public/stylesheets/instiki.css +++ b/public/stylesheets/instiki.css @@ -168,6 +168,34 @@ margin-bottom:1em; padding-top:1px; } +p.show_diff { +background: #eee; +padding: 3px; +border: 1px solid silver; +font-size:.85em; +} + +span.views, span.linked { +font-size:.85em; +} + +#allPages, #wantedPages { +float: left; +width: 280px; +} +#allPages { +margin-right: 30px; +} + +.pageType { +font-size: .75em; +font-style: italic; +} + +p.pageStats, span.unlock { +font-size; .85em; +} + .diffdel,del.diffmod, .diffdel *, del.diffmod * { background-color:#FAA; text-decoration:line-through;