import html_components
import html::bootstrap
import ordered_tree
+import model::model_collect
redef class MEntity
- # ID used as a HTML unique ID and in file names.
- #
- # **Must** match the following (POSIX ERE) regular expression:
- #
- # ~~~POSIX ERE
- # ^[A-Za-z_][A-Za-z0-9._-]*$
- # ~~~
- #
- # That way, the ID is always a valid URI component and a valid XML name.
- fun nitdoc_id: String is abstract
-
# URL of this entity’s Nitdoc page.
fun nitdoc_url: String is abstract
redef fun css_classes do
var set = new HashSet[String]
if is_intro then set.add "intro"
- for m in mclass.intro.modifiers do set.add m.to_cmangle
- for m in modifiers do set.add m.to_cmangle
+ for m in mclass.intro.collect_modifiers do set.add m.to_cmangle
+ for m in collect_modifiers do set.add m.to_cmangle
return set.to_a
end
end
redef fun css_classes do
var set = new HashSet[String]
if is_intro then set.add "intro"
- for m in mproperty.intro.modifiers do set.add m.to_cmangle
- for m in modifiers do set.add m.to_cmangle
+ for m in mproperty.intro.collect_modifiers do set.add m.to_cmangle
+ for m in collect_modifiers do set.add m.to_cmangle
return set.to_a
end
end
private fun html_concern_item: ListItem do
var lnk = html_link
var tpl = new Template
- tpl.add new Link.with_title("#concern:{nitdoc_id}", lnk.text, lnk.title)
+ tpl.add new Link.with_title("#{nitdoc_id}.concern", lnk.text, lnk.title)
var comment = html_short_comment
if comment != null then
tpl.add ": "