diff options
author | bie <bie@pha.hk> | 2014-04-14 19:52:40 +0200 |
---|---|---|
committer | bie <bie@pha.hk> | 2014-04-14 19:52:40 +0200 |
commit | e5a20e6113a0a1e303cffa54945d120de3ce31b2 (patch) | |
tree | ac3dbff93f9073b14f387fc6f6b488130938375a /lupin | |
download | tears-e5a20e6113a0a1e303cffa54945d120de3ce31b2.tar.xz |
dette er kode...?
Diffstat (limited to 'lupin')
-rw-r--r-- | lupin/anmeldelse.lua | 22 | ||||
-rw-r--r-- | lupin/artikkel.lua | 18 |
2 files changed, 40 insertions, 0 deletions
diff --git a/lupin/anmeldelse.lua b/lupin/anmeldelse.lua new file mode 100644 index 0000000..37a441b --- /dev/null +++ b/lupin/anmeldelse.lua @@ -0,0 +1,22 @@ +local artikkel = blueprint("anmeldelse") + +function artikkel.env(data) + data.terningkast = os.getenv("POST_terningkast") or "" + data.publisert = os.getenv("POST_publisert") or "" +end + +function artikkel.form(body, data) + html.p() + html.label("Overskrift:") + html.text('title', data.title, 32) + html.p() + html.label("Terningkast:") + html.p(data.terningkast) + html.select('terningkast', { 1, 2, 3, 4, 5, 6 }, data.terningkast or 1) + html.p() + html.textarea('tekst', body) + html.hidden('type', 'anmeldelse') +end + +return artikkel + diff --git a/lupin/artikkel.lua b/lupin/artikkel.lua new file mode 100644 index 0000000..3ad2f4d --- /dev/null +++ b/lupin/artikkel.lua @@ -0,0 +1,18 @@ +local artikkel = blueprint("default") + +function artikkel.env(data) + data.bilde = os.getenv("POST_bilde") + data.publisert = os.getenv("POST_publisert") +end + +function artikkel.form(body, data) + html.p() + html.label("Overskrift:") + html.text('title', data.title, 32) + html.orz('bilde', data.bilde or '') + html.p() + html.textarea('tekst', body) +end + +return artikkel + |