Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
44e54ee4c6
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue