From d9bcd07b21892488b208662e8e7c593e36c18874 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 23 Feb 2015 19:17:31 +0100 Subject: [PATCH] src/doc: rename `tpl_anchor` into `html_link_to_anchor` and use bootstrap template Signed-off-by: Alexandre Terrasa --- src/doc/doc_phases/doc_html.nit | 2 +- src/doc/html_templates/html_model.nit | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/doc/doc_phases/doc_html.nit b/src/doc/doc_phases/doc_html.nit index bde0922..e92e4de 100644 --- a/src/doc/doc_phases/doc_html.nit +++ b/src/doc/doc_phases/doc_html.nit @@ -467,7 +467,7 @@ redef class MClassPage end var lnk = new Template lnk.add new TplLabel.with_classes(classes) - lnk.add mprop.tpl_anchor + lnk.add mprop.html_link_to_anchor return new TplListItem.with_content(lnk) end diff --git a/src/doc/html_templates/html_model.nit b/src/doc/html_templates/html_model.nit index 362740e..3882eb0 100644 --- a/src/doc/html_templates/html_model.nit +++ b/src/doc/html_templates/html_model.nit @@ -69,9 +69,11 @@ redef class MEntity return tpl end - # A template link to the mentity `nitdoc_id` - fun tpl_anchor: TplLink do - var tpl = new TplLink("#{nitdoc_id}", html_name) + # Returns a Link to the mentity `nitdoc_id`. + # + # Example: `html_short_name + fun html_link_to_anchor: Link do + var tpl = new Link("#{nitdoc_id}", html_name) var mdoc = mdoc_or_fallback if mdoc != null then tpl.title = mdoc.short_comment @@ -143,7 +145,7 @@ redef class MConcern # Return a li element for `self` that can be displayed in a concern list private fun tpl_concern_item: TplListItem do var lnk = new Template - lnk.add tpl_anchor + lnk.add html_link_to_anchor var mdoc = mdoc_or_fallback if mdoc != null then lnk.add ": " @@ -720,7 +722,7 @@ end redef class MInnerClassDef redef fun nitdoc_url do return inner.nitdoc_url - redef fun tpl_anchor do return inner.tpl_anchor + redef fun html_link_to_anchor do return inner.html_link_to_anchor redef fun html_link do return inner.html_link redef fun tpl_signature do return inner.tpl_signature -- 1.7.9.5