diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/info.html b/package/gluon-web-model/files/lib/gluon/web/view/model/info.html new file mode 100644 index 00000000..d1edd81f --- /dev/null +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/info.html @@ -0,0 +1,7 @@ +
+ <% if self.title then %> + + <% end %> + + <%=self.content%> +
diff --git a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua index 1eb90251..eb00ca53 100644 --- a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua +++ b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua @@ -188,6 +188,28 @@ function Node:handle() end end +local Info = class(Node) +M.Info = Info + +function Info:__init__(...) + Node.__init__(self, ...) + + self.default = nil + self.size = nil + self.optional = false + + self.template = "model/info" + + self.error = false +end + +function Info:setcontent(content) + self.content = content +end + +function Info:settitle(title) + self.title = title +end local File = class(Node) M.File = File