nitc :: CardCatalogStats :: _id
nitc :: CardCatalogStats :: _title
nitc :: CardCatalogStats :: defaultinit
nitc $ CardCatalogStats :: SELF
Type of this instance, automatically specialized in every classnitc $ CardCatalogStats :: rendering
Service used to render the content of the template.nitc :: CardCatalogStats :: _id
template :: Template :: _is_frozen
Is the template allowing more modification (add
)
template :: Template :: _is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: _render_done
Flag to avoid multiple renderingnitc :: CardCatalogStats :: _title
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitc :: StaticCard :: defaultinit
core :: Writable :: defaultinit
template :: Template :: defaultinit
nitc :: CardCatalog :: defaultinit
nitc :: CardCatalogStats :: defaultinit
template :: Template :: is_frozen=
Is the template allowing more modification (add
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
template :: Template :: is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: is_writing=
Flag to avoid infinite recursivity if a template contains itselfcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).template :: Template :: render_done=
Flag to avoid multiple renderingcore :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
# A card that displays statistics about a Nit catalog
class CardCatalogStats
super CardCatalog
redef var id = "catalog_stats"
redef var title = "Stats"
redef fun rendering do
addn "<div id='{id}' class='container-fluid'>"
for key, value in catalog.catalog_stats.to_map do
addn "<span class='text-muted small'>"
addn " <strong>{value}</strong> <span>{key}</span> "
addn "</span>"
end
addn "</div>"
addn "<hr/>"
end
end
src/doc/static/static_cards.nit:456,1--473,3