div_class = 'toc'
div_class << ' right' if right_align
div_class << ' left' if left_align
- out = "<ul class=\"#{div_class}\"><li>"
+ out = "<ul class=\"#{div_class}\"><li><strong>#{l :label_table_of_contents}</strong></li><li>"
root = headings.map(&:first).min
current = root
started = false
label_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen
setting_new_item_menu_tab: Menü zum Anlegen neuer Objekte
label_new_object_tab_enabled: Dropdown-Menü "+" anzeigen
+ label_table_of_contents: Inhaltsverzeichnis
error_no_projects_with_tracker_allowed_for_new_issue: There are no projects with trackers
for which you can create an issue
field_textarea_font: Font used for text areas
label_relations: Relations
label_new_project_issue_tab_enabled: Display the "New issue" tab
label_new_object_tab_enabled: Display the "+" drop-down
+ label_table_of_contents: Table of contents
label_font_default: Default font
label_font_monospace: Monospaced font
label_font_proportional: Proportional font
label_relations: Relations
label_new_project_issue_tab_enabled: Afficher l'onglet "Nouvelle demande"
label_new_object_tab_enabled: Afficher le menu déroulant "+"
+ label_table_of_contents: Contenu
label_font_default: Police par défaut
label_font_monospace: Police non proportionnelle
label_font_proportional: Police proportionnelle
div.wiki ul.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; }
div.wiki ul.toc ul { margin: 0; padding: 0; }
div.wiki ul.toc li {list-style-type:none; margin: 0; font-size:12px;}
+div.wiki ul.toc>li:first-child {margin-bottom: .5em; color: #777;}
div.wiki ul.toc li li {margin-left: 1.5em; font-size:10px;}
div.wiki ul.toc a {
font-size: 0.9em;
end
def test_table_of_content
+ set_language_if_valid 'en'
+
raw = <<-RAW
{{toc}}
RAW
expected = '<ul class="toc">' +
+ '<li><strong>Table of contents</strong></li>' +
'<li><a href="#Title">Title</a>' +
'<ul>' +
'<li><a href="#Subtitle-with-a-Wiki-link">Subtitle with a Wiki link</a></li>' +
end
def test_table_of_content_should_generate_unique_anchors
+ set_language_if_valid 'en'
+
raw = <<-RAW
{{toc}}
RAW
expected = '<ul class="toc">' +
+ '<li><strong>Table of contents</strong></li>' +
'<li><a href="#Title">Title</a>' +
'<ul>' +
'<li><a href="#Subtitle">Subtitle</a></li>' +
end
def test_table_of_content_should_contain_included_page_headings
+ set_language_if_valid 'en'
+
raw = <<-RAW
{{toc}}
RAW
expected = '<ul class="toc">' +
+ '<li><strong>Table of contents</strong></li>' +
'<li><a href="#Included">Included</a></li>' +
'<li><a href="#Child-page-1">Child page 1</a></li>' +
'</ul>'
end
def test_macro_collapse_should_not_break_toc
+ set_language_if_valid 'en'
+
text = <<-RAW
{{toc}}
}}"
RAW
- expected_toc = '<ul class="toc"><li><a href="#Title">Title</a><ul><li><a href="#Heading">Heading</a></li></ul></li></ul>'
+ expected_toc = '<ul class="toc"><li><strong>Table of contents</strong></li><li><a href="#Title">Title</a><ul><li><a href="#Heading">Heading</a></li></ul></li></ul>'
assert_include expected_toc, textilizable(text).gsub(/[\r\n]/, '')
end