src/doc: rename `tpl_anchor` into `html_link_to_anchor` and use bootstrap template
authorAlexandre Terrasa <alexandre@moz-code.org>
Mon, 23 Feb 2015 18:17:31 +0000 (19:17 +0100)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 21 Apr 2015 12:28:56 +0000 (08:28 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/doc_phases/doc_html.nit
src/doc/html_templates/html_model.nit

index bde0922..e92e4de 100644 (file)
@@ -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
 
index 362740e..3882eb0 100644 (file)
@@ -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: `<a href="#nitdoc_id" title="mdoc.short_comment">html_short_name</a>
+       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