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

master
Jacques Distler 2010-05-27 01:18:06 -05:00
commit 44e54ee4c6
3 changed files with 4 additions and 4 deletions

View File

@ -33,6 +33,6 @@ def initialize(match_data, content)
# TODO move presentation of page metadata to controller/view
def url(category)
%{<a class="category_link" href="#{@content.url_generator.url_for :web => @content.web.address,
:action => 'list'}/#{CGI.escape(category)}">#{category}</a>}
:action => 'list', :only_path => true}/#{CGI.escape(category)}">#{category}</a>}
end
end

View File

@ -123,7 +123,7 @@ class StubUrlGenerator < AbstractUrlGenerator
def url_for(hash = {})
if(hash[:action] == 'list')
"http://example.com/#{hash[:web]}/list"
"/#{hash[:web]}/list"
else
'../files/pngs'
end

View File

@ -8,9 +8,9 @@ class CategoryTest < Test::Unit::TestCase
def test_single_category
match(Category, 'category: test', :list => ['test'], :hidden => nil, :unmask_text =>
"<div class=\"property\"> category: <a class=\"category_link\" href=\"http://example.com/wiki1/list/test\">test</a></div>")
"<div class=\"property\"> category: <a class=\"category_link\" href=\"/wiki1/list/test\">test</a></div>")
match(Category, 'category : chunk test ', :list => ['chunk test'], :hidden => nil, :unmask_text =>
"<div class=\"property\"> category: <a class=\"category_link\" href=\"http://example.com/wiki1/list/chunk+test\">chunk test</a></div>")
"<div class=\"property\"> category: <a class=\"category_link\" href=\"/wiki1/list/chunk+test\">chunk test</a></div>")
match(Category, ':category: test', :list => ['test'], :hidden => ':')
end