diff options
author | bnewbold <bnewbold@robocracy.org> | 2012-09-20 14:47:20 +0200 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2012-09-20 14:47:20 +0200 |
commit | c3591d04490d10b7a05e1aefff903430fecc2ba8 (patch) | |
tree | 34e0344eef6eef6fb47fc34ef99a1fc290dbb699 /templates | |
parent | 627a217e7e74a6800475a9b3898855b26edd4a16 (diff) | |
download | bommom-c3591d04490d10b7a05e1aefff903430fecc2ba8.tar.gz bommom-c3591d04490d10b7a05e1aefff903430fecc2ba8.zip |
clean uploading
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 14 | ||||
-rw-r--r-- | templates/bom_upload.html | 52 | ||||
-rw-r--r-- | templates/home.html | 17 | ||||
-rw-r--r-- | templates/static/default.css | 2 | ||||
-rw-r--r-- | templates/user.html | 13 |
5 files changed, 83 insertions, 15 deletions
diff --git a/templates/base.html b/templates/base.html index 4fe66ad..ee8a54c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,6 +2,7 @@ <head> <title>bommom</title> <link rel="stylesheet" type="text/css" href="/static/default.css"></link> +<!-- Start Mozilla Persona Code --> <script src="/static/include.js"></script> <script> function login() { @@ -15,6 +16,7 @@ function login() { }); } </script> +<!-- End Mozilla Persona Code --> </head> <body> @@ -24,14 +26,18 @@ function login() { <a class="brand" href="/">bommom.com</a> {{ range .BreadCrumbs }} / {{.}} {{end}} <div class="nav-collapse collapse"> - <p class="navbar-text pull-right"> {{ if .Session.UserName }} - {{ .Session.UserName }} - <a href="/account/logout/"><button class="btn btn-mini" type="button" style="margin-left: 5px;">Log out!</button></a> + <p class="navbar-text pull-right"> + <a href="/account/logout/"><button class="btn btn-mini" type="button" style="margin-left: 15px; margin-top:9px;">Log out!</button></a> + </p> + <p class="navbar-text pull-right"> + logged in as {{ .Session.UserName }} + </p> {{ else }} + <p class="navbar-text pull-right"> <a href="/account/login/"><button class="btn btn-mini" type="button" style="margin-top: 9px;">Log in!</button></a> - {{ end }} </p> + {{ end }} </div><!--/.nav-collapse --> </div> </div> diff --git a/templates/bom_upload.html b/templates/bom_upload.html index 8cc15c8..04126c3 100644 --- a/templates/bom_upload.html +++ b/templates/bom_upload.html @@ -4,21 +4,53 @@ <h1>{{ .BomMeta.Name }} is a bom.</h1> {{ template "BOM_INFO" . }} <hr> - {{ else }} <h1>{{ .name }} could be a bom.</h1> -<b>Owner: </b>{{ .user }}<br> -<hr> - {{ end }} -{{ if .error }}<h3 style="color:red;">{{ .error }}</h3>{{ end }} -<form enctype="multipart/form-data" method="POST" target="."> -<b>Version: </b><input name="version" type="text" value="{{ .version }}"></input><br> -<b>Created: </b>now!<br> -<input type="file" name="bomfile" accept="application/json,application/xml,text/csv"></input><br> -<input type="submit" value="Upload"></input> +<form class="form-horizontal" enctype="multipart/form-data" method="POST" target="."> + {{ if .error }} + <div class="alert alert-error"> + <strong>Error!</strong> {{ .error }} + </div> + {{ end }} + <div class="control-group"> + <label class="control-label" for="owner">Owner</label> + <div class="controls"> + <input type="text" id="created" name="owner" placeholder="{{ .user }}" disabled class="input-large"> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="name">Name</label> + <div class="controls"> + <input type="text" id="created" name="name" placeholder="{{ .name }}" disabled class="input-large"> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="version">Version</label> + <div class="controls"> + <input type="text" id="version" name="version" value="{{ .version }}" placeholder="eg, Rev5" class="input-large"> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="created">Creation Time</label> + <div class="controls"> + <input type="text" id="created" name="created" placeholder="right now!" disabled class="input-large"> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="bomfile">File</label> + <div class="controls"> + <input type="file" name="bomfile" accept="application/json,application/xml,text/csv"></input> + <span class="help-inline">.json, .xml, or .csv</span> + </div> + </div> + <div class="control-group"> + <div class="controls"> + <button type="submit" name="submit" value="up" class="btn btn-primary">Upload</button> + </div> + </div> </form> {{ template "FOOTER" . }} diff --git a/templates/home.html b/templates/home.html index 40e8f6c..41db698 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,5 +1,22 @@ {{ template "HEADER" . }} <h1>this is bomom.</h1> +<div class="well"> +<p> +bommom is a tool for publishing and analysing electronics "bill of materials", +which are lists of components required to assemble a device like a digital +watch or a space telescope control module. +</p> +<p> +this is an open source project; get the code at <a +href="http://git.bnewbold.net/bommom/">git.bnewbold.net/bommom</a> or <a +href="http://github.com/bnewbold/bommom">github.com/bnewbold/bommom</a>. the +project includes a command line tool for managing and converting repositories +of BOMs. it is written in <a href="http://golang.org">golang</a> (the "go" +programming language). +</p> +</div> + +<h3>all BOMs from all users</h3> <table class="table"> {{ range .BomList }} <tr/> diff --git a/templates/static/default.css b/templates/static/default.css index 7ea7b81..045486a 100644 --- a/templates/static/default.css +++ b/templates/static/default.css @@ -1147,7 +1147,7 @@ input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; - height: 20px; + /* height: 20px; */ padding: 4px 6px; margin-bottom: 9px; font-size: 14px; diff --git a/templates/user.html b/templates/user.html index 995819c..7367bc1 100644 --- a/templates/user.html +++ b/templates/user.html @@ -1,5 +1,18 @@ {{ template "HEADER" . }} +{{ if .IsCommon }} +<h1>publicly mirrored BOMs</h1> +<div class="well"> +here BOMs from the "commons" of publicly available open hardware designs are +collected. any <a href="/account/login/">logged in</a> bommom user can submit +or edit BOMs here. +</div> + +<h3>all BOMs in the commons</h3> +{{ else }} <h1>{{ .UserName }} is a bommom user.</h1> +<h3>all of {{ .UserName }}'s BOMs</h3> +{{ end }} + <table class="table"> {{ range .BomList }} <tr/> |