aboutsummaryrefslogtreecommitdiffstats
path: root/templates/bom_view.html
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-04-23 12:14:39 -0400
committerbnewbold <bnewbold@robocracy.org>2012-04-23 12:14:39 -0400
commiteb04c544afee65ca91cb07dbf62f670401a7f244 (patch)
tree99a299dadc12cadbdcf5c0110b392b25081ced73 /templates/bom_view.html
parent7b6696714142de8deeb5ef4f144ac3ecf8116e3e (diff)
downloadbommom-eb04c544afee65ca91cb07dbf62f670401a7f244.tar.gz
bommom-eb04c544afee65ca91cb07dbf62f670401a7f244.zip
basic view-only http interface
Diffstat (limited to 'templates/bom_view.html')
-rw-r--r--templates/bom_view.html37
1 files changed, 37 insertions, 0 deletions
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" }}
+<h1>{{ .BomMeta.Name }} is a bom.</h1>
+<b>Owner: </b>{{ .BomMeta.Owner }}<br>
+{{ if .BomMeta.Homepage }}<b>Homepage: </b>{{ .BomMeta.Homepage }}<br>{{ end }}
+{{ if .BomMeta.Description }}<b>Description: </b>{{ .BomMeta.Description }}<br>{{ end }}
+<b>Version: </b>{{ .BomMeta.HeadVersion }} (at head)<br>
+<b>Created: </b>{{ .Bom.Created }}<br>
+{{ if .Bom.Progeny}}<b>Source: </b>{{ .Bom.Progeny }}<br>{{ end }}
+<table>
+<tr>
+ <th>qty
+ <th>elements
+ <th>manufacturer
+ <th>mpn
+ <th>function
+ <th>form_factor
+ <th>specs
+ <th>category
+ <th>tag
+ <th>comment
+</tr>
+{{ range .Bom.LineItems }}
+<tr>
+ <td>{{ len .Elements }}
+ <td>{{ range .Elements }}{{ if . }}{{ . }} {{ end }}{{ end }}
+ <td>{{ .Manufacturer }}
+ <td>{{ .Mpn }}
+ <td>{{ .Function }}
+ <td>{{ .FormFactor }}
+ <td>{{ .Specs }}
+ <td>{{ .Category }}
+ <td>{{ .Tag }}
+ <td>{{ .Comment }}
+</tr>
+{{ end }}
+</table>
+{{ template "FOOTER" }}