Remove name2 now that name is fixed.
This commit is contained in:
@@ -14,19 +14,20 @@ module Gollum
|
|||||||
end
|
end
|
||||||
|
|
||||||
def new_page page
|
def new_page page
|
||||||
%Q( <li class="file"><a href="#{page.name}">#{page.name2}</a></li>\n)
|
name = page.name
|
||||||
|
%Q( <li class="file"><a href="#{name}">#{name}</a></li>\n)
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_folder page
|
def new_folder page
|
||||||
new_sub_folder ::File.dirname(page.path), page.name, page.name2
|
new_sub_folder ::File.dirname(page.path), page.name
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_sub_folder path, name, name2
|
def new_sub_folder path, name
|
||||||
<<-HTML
|
<<-HTML
|
||||||
<li>
|
<li>
|
||||||
<label>#{path}</label> <input type="checkbox" checked />
|
<label>#{path}</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="#{name}">#{name2}</a></li>
|
<li class="file"><a href="#{name}">#{name}</a></li>
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -63,12 +64,12 @@ module Gollum
|
|||||||
# Handle special case of only one folder.
|
# Handle special case of only one folder.
|
||||||
if (count - folder_start == 1)
|
if (count - folder_start == 1)
|
||||||
path = @pages[ folder_start ]
|
path = @pages[ folder_start ]
|
||||||
|
name = page.name
|
||||||
html += <<-HTML
|
html += <<-HTML
|
||||||
<li>
|
<li>
|
||||||
<label>#{::File.dirname(path)}</label> <input type="checkbox" checked />
|
<label>#{::File.dirname(path)}</label> <input type="checkbox" checked />
|
||||||
<ol>
|
<ol>
|
||||||
<li class="file"><a href="#{page.name}">#{page.name2}</a></li>
|
<li class="file"><a href="#{name}">#{name}</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
HTML
|
HTML
|
||||||
@@ -128,7 +129,7 @@ module Gollum
|
|||||||
end
|
end
|
||||||
|
|
||||||
# subfolder
|
# subfolder
|
||||||
html += new_sub_folder ::File.dirname(page.path).split('/').last, page.name, page.name2
|
html += new_sub_folder ::File.dirname(page.path).split('/').last, page.name
|
||||||
else
|
else
|
||||||
# depth+1 because we need an additional end_folder
|
# depth+1 because we need an additional end_folder
|
||||||
(depth+1).times { html += end_folder; }
|
(depth+1).times { html += end_folder; }
|
||||||
|
|||||||
+2
-9
@@ -116,21 +116,14 @@ module Gollum
|
|||||||
self.class.strip_filename(filename)
|
self.class.strip_filename(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: The canonical page name without extension.
|
# Public: The canonical page name without extension, and dashes converted
|
||||||
|
# to spaces.
|
||||||
#
|
#
|
||||||
# Returns the String name.
|
# Returns the String name.
|
||||||
def name
|
def name
|
||||||
self.class.canonicalize_filename(filename)
|
self.class.canonicalize_filename(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: The canonical page name without extension, and dashes
|
|
||||||
# really converted to spaces.
|
|
||||||
#
|
|
||||||
# Returns the String name.
|
|
||||||
def name2
|
|
||||||
self.class.canonicalize_filename(filename).gsub('-', ' ')
|
|
||||||
end
|
|
||||||
|
|
||||||
# Public: The title will be constructed from the
|
# Public: The title will be constructed from the
|
||||||
# filename by stripping the extension and replacing any dashes with
|
# filename by stripping the extension and replacing any dashes with
|
||||||
# spaces.
|
# spaces.
|
||||||
|
|||||||
Reference in New Issue
Block a user