From eb04c544afee65ca91cb07dbf62f670401a7f244 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Mon, 23 Apr 2012 12:14:39 -0400 Subject: basic view-only http interface --- templates/base.html | 2 +- templates/bom_view.html | 37 +++++++++++++++++++++++++++++++++++++ templates/home.html | 9 ++++++++- templates/user.html | 11 +++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 templates/bom_view.html create mode 100644 templates/user.html (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 538d7db..c455815 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {{ define "HEADER" }} -bombom +bommom {{ end }} diff --git a/templates/bom_view.html b/templates/bom_view.html new file mode 100644 index 0000000..2606217 --- /dev/null +++ b/templates/bom_view.html @@ -0,0 +1,37 @@ +{{ template "HEADER" }} +

{{ .BomMeta.Name }} is a bom.

+Owner: {{ .BomMeta.Owner }}
+{{ if .BomMeta.Homepage }}Homepage: {{ .BomMeta.Homepage }}
{{ end }} +{{ if .BomMeta.Description }}Description: {{ .BomMeta.Description }}
{{ end }} +Version: {{ .BomMeta.HeadVersion }} (at head)
+Created: {{ .Bom.Created }}
+{{ if .Bom.Progeny}}Source: {{ .Bom.Progeny }}
{{ end }} + + + +{{ range .Bom.LineItems }} + + +{{ end }} +
qty + elements + manufacturer + mpn + function + form_factor + specs + category + tag + comment +
{{ len .Elements }} + {{ range .Elements }}{{ if . }}{{ . }} {{ end }}{{ end }} + {{ .Manufacturer }} + {{ .Mpn }} + {{ .Function }} + {{ .FormFactor }} + {{ .Specs }} + {{ .Category }} + {{ .Tag }} + {{ .Comment }} +
+{{ template "FOOTER" }} diff --git a/templates/home.html b/templates/home.html index 1298241..1b328c3 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,3 +1,10 @@ {{ template "HEADER" }} -

Home Page

+

this is bomom.

+ {{ template "FOOTER" }} diff --git a/templates/user.html b/templates/user.html new file mode 100644 index 0000000..f5c8983 --- /dev/null +++ b/templates/user.html @@ -0,0 +1,11 @@ +{{ template "HEADER" }} +

{{ .User }} is a bommom user.

+Email: {{ .Email }} + +{{ template "FOOTER" }} -- cgit v1.2.3