Update file_view output
This commit is contained in:
@@ -22,7 +22,7 @@ module Gollum
|
|||||||
def new_page page
|
def new_page page
|
||||||
name = page.name
|
name = page.name
|
||||||
url = url_for_page page
|
url = url_for_page page
|
||||||
%Q( <li class="file"><a href="#{url}"><span class="icon"></span>#{name}</a></li>\n)
|
%Q( <li class="file"><a href="#{url}"><span class="icon"></span>#{name}</a></li>)
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_folder folder_path
|
def new_folder folder_path
|
||||||
@@ -38,10 +38,7 @@ module Gollum
|
|||||||
end
|
end
|
||||||
|
|
||||||
def end_folder
|
def end_folder
|
||||||
<<-HTML
|
"</ol></li>\n"
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
HTML
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def url_for_page page
|
def url_for_page page
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
<ol class="tree">
|
<ol class="tree">
|
||||||
<li class="file"><a href="0"><span class="icon"></span>0</a></li>
|
<li class="file"><a href="0"><span class="icon"></span>0</a></li></ol>
|
||||||
</ol>
|
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li>
|
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
<li class="file"><a href="folder0"><span class="icon"></span>folder0</a></li>
|
<li class="file"><a href="folder0"><span class="icon"></span>folder0</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@@ -2,11 +2,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<label>folder0</label> <input type="checkbox" checked />
|
<label>folder0</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li>
|
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li></ol></li>
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<label>folder1</label> <input type="checkbox" checked />
|
<label>folder1</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder1/1"><span class="icon"></span>1</a></li>
|
<li class="file"><a href="folder1/1"><span class="icon"></span>1</a></li></ol>
|
||||||
</ol>
|
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
<ol class="tree">
|
<ol class="tree">
|
||||||
<li class="file"><a href="root"><span class="icon"></span>root</a></li>
|
<li class="file"><a href="root"><span class="icon"></span>root</a></li> <li>
|
||||||
<li>
|
|
||||||
<label>folder0</label> <input type="checkbox" checked />
|
<label>folder0</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li>
|
<li class="file"><a href="folder0/0"><span class="icon"></span>0</a></li></ol></li>
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<label>folder1</label> <input type="checkbox" checked />
|
<label>folder1</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder1/1"><span class="icon"></span>1</a></li>
|
<li class="file"><a href="folder1/1"><span class="icon"></span>1</a></li></ol>
|
||||||
</ol>
|
|
||||||
@@ -8,21 +8,14 @@
|
|||||||
<li>
|
<li>
|
||||||
<label>folder2</label> <input type="checkbox" checked />
|
<label>folder2</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder0/folder1/folder2/0"><span class="icon"></span>0</a></li>
|
<li class="file"><a href="folder0/folder1/folder2/0"><span class="icon"></span>0</a></li></ol></li>
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<label>folder3</label> <input type="checkbox" checked />
|
<label>folder3</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder0/folder1/folder3/1"><span class="icon"></span>1</a></li>
|
<li class="file"><a href="folder0/folder1/folder3/1"><span class="icon"></span>1</a></li></ol></li>
|
||||||
</ol>
|
</ol></li>
|
||||||
</li>
|
</ol></li>
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<label>folder4</label> <input type="checkbox" checked />
|
<label>folder4</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="folder4/2"><span class="icon"></span>2</a></li>
|
<li class="file"><a href="folder4/2"><span class="icon"></span>2</a></li></ol>
|
||||||
</ol>
|
|
||||||
@@ -72,6 +72,10 @@ def check name, pages_array
|
|||||||
pages = FakePages.new pages_array
|
pages = FakePages.new pages_array
|
||||||
expected = read name
|
expected = read name
|
||||||
actual = view pages
|
actual = view pages
|
||||||
|
|
||||||
|
# Uncomment when updating tests
|
||||||
|
# write name, actual
|
||||||
|
|
||||||
assert_equal expected, actual
|
assert_equal expected, actual
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user