Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2010-05-27 00:30:29 -05:00
commit 1f4f1a4ba3
6 changed files with 30 additions and 13 deletions

View file

@ -17,8 +17,8 @@ class Category < Chunk::Abstract
def initialize(match_data, content)
super(match_data, content)
@content = content
@hidden = match_data[1]
# @list = match_data[2].split(',').map { |c| clean = c.purify; clean.strip.escapeHTML if clean }
@list = match_data[2].split(',').map { |c| clean = c.purify.strip.escapeHTML; clean if clean != ''}
@list.compact!
@unmask_text = ''
@ -32,6 +32,7 @@ def initialize(match_data, content)
# TODO move presentation of page metadata to controller/view
def url(category)
%{<a class="category_link" href="../list/#{category}">#{category}</a>}
%{<a class="category_link" href="#{@content.url_generator.url_for :web => @content.web.address,
:action => 'list'}/#{CGI.escape(category)}">#{category}</a>}
end
end

View file

@ -128,7 +128,7 @@ class WikiContent < ActiveSupport::SafeBuffer
:mode => :show
}.freeze
attr_reader :web, :options, :revision, :not_rendered, :pre_rendered
attr_reader :web, :options, :revision, :not_rendered, :pre_rendered, :url_generator
# Create a new wiki content string from the given one.
# The options are explained at the top of this file.