ni_nitdoc: inform class name and namespace
authorStefan Lage <lagestfan@gmail.com>
Fri, 28 Jun 2013 21:19:02 +0000 (17:19 -0400)
committerStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 20:54:24 +0000 (16:54 -0400)
Insert first part of the content of a class page, its name and its
namespace

Signed-off-by: Stefan Lage <lagestfan@gmail.com>

src/ni_nitdoc.nit

index b61c0a2..197727d 100644 (file)
@@ -693,6 +693,7 @@ class NitdocMClasses
                inheritance_column
                close("div")
                open("div").add_class("content")
+               content
                close("div")
        end
 
@@ -765,6 +766,23 @@ class NitdocMClasses
                close("nav")
        end
 
+       fun content do
+               var subtitle = ""
+               var lmmodule = new List[MModule]
+               # Insert the subtitle part
+               add("h1").text(mclass.name)
+               open("div").add_class("subtitle")
+               if mclass.visibility is none_visibility then subtitle += "private "
+               subtitle += "{mclass.kind} <a href=\"{mclass.public_owner.name}.html\">{mclass.public_owner.name}</a>::{mclass.name}"
+               add_html(subtitle)
+               close("div")
+               add_html("<div style=\"float: right;\"><a id=\"lblDiffCommit\"></a></div>")
+               # We add the class description
+               open("section").add_class("description")
+               if not stdclassdef is null and not stdclassdef.comment.is_empty then add_html("<pre class=\"text_label\" title=\"122\" name=\"\" tag=\"{mclass.mclassdefs.first.location.to_s}\" type=\"2\">{stdclassdef.comment} </pre><textarea id=\"fileContent\" class=\"edit\" cols=\"76\" rows=\"1\" style=\"display: none;\"></textarea><a id=\"cancelBtn\" style=\"display: none;\">Cancel</a><a id=\"commitBtn\" style=\"display: none;\">Commit</a><pre id=\"preSave\" class=\"text_label\" type=\"2\"></pre>")
+               close("section")
+       end
+
 end    
 
 class NitdocPage