diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/file.html b/package/gluon-web-model/files/lib/gluon/web/view/model/file.html new file mode 100644 index 00000000..9b7aeb00 --- /dev/null +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/file.html @@ -0,0 +1,21 @@ +
+ <% if self.error then %> +

<%=self.error%>

+ <% end %> + +
+
+ +
+ +
+
+
+ +
+ + +
+
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 7306bbc0..1eb90251 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 @@ -189,6 +189,21 @@ function Node:handle() end +local File = class(Node) +M.File = File + +function File:__init__(...) + Node.__init__(self, ...) + + self.default = nil + self.size = nil + self.optional = false + + self.template = "model/file" + + self.error = false +end + local Template = class(Node) M.Template = Template