summaryrefslogtreecommitdiffstats
path: root/web/templates
diff options
context:
space:
mode:
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/.gitignore1
-rw-r--r--web/templates/Makefile24
-rw-r--r--web/templates/labitrack.d/about52
-rw-r--r--web/templates/labitrack.d/ancientbrowser15
-rw-r--r--web/templates/labitrack.d/browse2
-rw-r--r--web/templates/labitrack.d/create2
-rw-r--r--web/templates/labitrack.d/edit2
-rw-r--r--web/templates/labitrack.d/hello_world6
-rw-r--r--web/templates/labitrack.d/identify8
-rw-r--r--web/templates/labitrack.d/labelform38
-rw-r--r--web/templates/labitrack.d/notfound8
-rw-r--r--web/templates/labitrack.d/objecttable22
-rw-r--r--web/templates/labitrack.d/pagination18
-rw-r--r--web/templates/labitrack.d/recent2
-rw-r--r--web/templates/labitrack.d/view9
15 files changed, 209 insertions, 0 deletions
diff --git a/web/templates/.gitignore b/web/templates/.gitignore
new file mode 100644
index 0000000..1521c8b
--- /dev/null
+++ b/web/templates/.gitignore
@@ -0,0 +1 @@
+dist
diff --git a/web/templates/Makefile b/web/templates/Makefile
new file mode 100644
index 0000000..339a911
--- /dev/null
+++ b/web/templates/Makefile
@@ -0,0 +1,24 @@
+DIRS=$(wildcard *.d)
+FILEEXT=
+SRCTARGETS=$(patsubst %.d,dist/%.src.js,$(DIRS))
+MINTARGETS=$(patsubst %.d,dist/%.min.js,$(DIRS))
+
+depend=$(shell sh -c 'ls $$(echo $1 | cut -d/ -f2 | cut -d. -f1).d/*$(FILEEXT)')
+
+.PHONY: all mkdist
+all: $(MINTARGETS)
+clean:
+ rm -f $(SRCTARGETS)
+ rm -f $(MINTARGETS)
+mkdist:
+ @@mkdir -p dist
+
+.SECONDEXPANSION:
+$(SRCTARGETS): $$(call depend,$$@) | mkdist
+ date
+ handlebars --output $@ $^
+
+.SECONDEXPANSION:
+$(MINTARGETS): $$(patsubst %.min.js,%.src.js,$$@)
+ date
+ uglifyjs $^ > $@
diff --git a/web/templates/labitrack.d/about b/web/templates/labitrack.d/about
new file mode 100644
index 0000000..58ef4d6
--- /dev/null
+++ b/web/templates/labitrack.d/about
@@ -0,0 +1,52 @@
+<div class="hide tmplheader">About Labitrack</div>
+<p>
+Glued togther with the following compoments by <a href="http://asbjorn.it/">Asbjørn Sloth Tønnesen</a> in <a href="http://labitat.dk/">Labitat</a>.
+</p>
+
+<div>
+ Client side:
+ <ul>
+ <li><a href="http://twitter.github.com/bootstrap/">Bootstrap</a></li>
+ <li><a href="http://jquery.com/">jQuery</a></li>
+ <li><a href="http://documentcloud.github.com/backbone/">Backbone</a></li>
+ <li><a href="http://www.handlebarsjs.com">Handlebars</a></li>
+ <li><a href="http://documentcloud.github.com/underscore/">Underscore</a></li>
+ </ul>
+</div>
+<div>
+ Server side (mainly):
+ <ul>
+ <li><a href="https://github.com/esmil/lem">LEM (Lua Event Machine)</a> by <a href="https://labitat.dk/wiki/User:Esmil">Emil Renner Berthing</a> in <a href="http://labitat.dk/">Labitat</a></li>
+ <li><a href="http://2e8.dk/ql570">ql570</a> by <a href="http://asbjorn.it/">Asbjørn Sloth Tønnesen</a> in <a href="http://labitat.dk/">Labitat</a></li>
+ <li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
+ </ul>
+</div>
+
+<h2>Source</h2>
+<p>The source code is available at the following locations:
+<ul>
+ <li><a href="http://2e8.dk/labitat/labitrack">http://2e8.dk/labitat/labitrack</a> (primary)</li>
+ <li><a href="http://github.com/labitat/labitrack">http://github.com/labitat/labitrack</a></li>
+</ul>
+</p>
+
+<h2>License</h2>
+<p>This work is licensed under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License (GPL)</a> v3 or later.</p>
+
+<pre>
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.
+</pre>
+
+<h2>Original version</h2>
+<p>The original implementation of Labitrack was made by Panton and Halfd, with TK, Python, Pyx, SQLite, LaTeX and Brothers proprietary driver.</p>
diff --git a/web/templates/labitrack.d/ancientbrowser b/web/templates/labitrack.d/ancientbrowser
new file mode 100644
index 0000000..cdaced3
--- /dev/null
+++ b/web/templates/labitrack.d/ancientbrowser
@@ -0,0 +1,15 @@
+<div class="hide tmplheader">HTML5 rocks</div>
+<div class="alert-message block-message error">
+ <h2>You are using an unsupported browser</h2>
+ <p>Labitrack requires a fairly modern browser, because it relies on being able to render the labels in your browser.</p>
+ <ul>
+ <li>
+ Canvas support, including support for:
+ <ul>
+ <li>drawing text</li>
+ <li>toDataURL (getting the data of the canvas)</li>
+ </ul>
+ </li>
+ <li>Web fonts</li>
+ </ul>
+</div>
diff --git a/web/templates/labitrack.d/browse b/web/templates/labitrack.d/browse
new file mode 100644
index 0000000..b38b169
--- /dev/null
+++ b/web/templates/labitrack.d/browse
@@ -0,0 +1,2 @@
+<div class="hide tmplheader">Browse</div>
+<div id="objecttable_ph"/>
diff --git a/web/templates/labitrack.d/create b/web/templates/labitrack.d/create
new file mode 100644
index 0000000..ee5b1fe
--- /dev/null
+++ b/web/templates/labitrack.d/create
@@ -0,0 +1,2 @@
+<div class="hide tmplheader">Create new tracking label</div>
+{{labelform}}
diff --git a/web/templates/labitrack.d/edit b/web/templates/labitrack.d/edit
new file mode 100644
index 0000000..be6e11d
--- /dev/null
+++ b/web/templates/labitrack.d/edit
@@ -0,0 +1,2 @@
+<div class="hide tmplheader">Edit label #{{id}}</div>
+{{labelform}}
diff --git a/web/templates/labitrack.d/hello_world b/web/templates/labitrack.d/hello_world
new file mode 100644
index 0000000..22bc008
--- /dev/null
+++ b/web/templates/labitrack.d/hello_world
@@ -0,0 +1,6 @@
+<div class="entry">
+ <h2>{{title}}</h2>
+ <div class="body">
+ {{body}}
+ </div>
+</div>
diff --git a/web/templates/labitrack.d/identify b/web/templates/labitrack.d/identify
new file mode 100644
index 0000000..94ea05b
--- /dev/null
+++ b/web/templates/labitrack.d/identify
@@ -0,0 +1,8 @@
+<div class="hide tmplheader">{{page}}</div>
+<p>
+ I am {{page}} sfdsfas
+ <ul>
+ <li><a href="/browse">/browse</a></li>
+ <li><a href="/">/</a></li>
+ </ul>
+</p>
diff --git a/web/templates/labitrack.d/labelform b/web/templates/labitrack.d/labelform
new file mode 100644
index 0000000..b135e9a
--- /dev/null
+++ b/web/templates/labitrack.d/labelform
@@ -0,0 +1,38 @@
+<form id="labelform">
+ <fieldset>
+ <div class="clearfix">
+ <label for="name">Name</label>
+ <div class="input">
+ <input class="xlarge" id="name" name="name" type="text" placeholder="Name" required="required" value="{{data.name}}"/>
+ </div>
+ </div>
+ <div class="clearfix">
+ <label for="desc">Description</label>
+ <div class="input">
+ <textarea class="xlarge" name="desc" id="desc" rows="3" placeholder="Description" required="required">{{data.desc}}</textarea>
+ </div>
+ </div>
+ <div class="clearfix">
+ <label for="tags">Tags</label>
+ <div class="input">
+ <ul class="inputs-list">
+ {{#each tags}}
+ <li>
+ <label>
+ <input type="checkbox" name="tags" value="{{name}}"{{checked_tag ../data.tags}}/>
+ <span>{{desc}}</span>
+ </label>
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+ </div>
+ <div class="actions">
+ <input type="submit" class="btn primary save" value="{{save_text}}">&nbsp;<button type="reset" class="btn">Cancel</button>
+ </div>
+ </fieldset>
+</form>
+
+<h2>Low-res preview <small>(rendered in <span id="rendertime">some</span> ms)</small></h2>
+
+<canvas id="label"/>
diff --git a/web/templates/labitrack.d/notfound b/web/templates/labitrack.d/notfound
new file mode 100644
index 0000000..db23ebe
--- /dev/null
+++ b/web/templates/labitrack.d/notfound
@@ -0,0 +1,8 @@
+<div class="hide tmplheader">{{action}} label #{{id}}</div>
+<h2>Failed</h2>
+<p>
+ There was a problem loading the label data from the server.
+</p>
+<p>
+ Status code returned by the server: <b>{{status}}</b>
+</p>
diff --git a/web/templates/labitrack.d/objecttable b/web/templates/labitrack.d/objecttable
new file mode 100644
index 0000000..13b6dee
--- /dev/null
+++ b/web/templates/labitrack.d/objecttable
@@ -0,0 +1,22 @@
+{{pagination}}
+<table class="zebra-striped">
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Tags</th>
+ <th>&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each rows}}
+ <tr>
+ <td><a href="/view/{{id}}">{{id}}</a></td>
+ <td><a href="/view/{{id}}">{{name}}</a></td>
+ <td><a href="/view/{{id}}">{{desc}}</a></td>
+ <td><a href="/view/{{id}}">{{tags}}</a></td>
+ </tr>
+ {{/each}}
+ </tbody>
+</table>
diff --git a/web/templates/labitrack.d/pagination b/web/templates/labitrack.d/pagination
new file mode 100644
index 0000000..95df273
--- /dev/null
+++ b/web/templates/labitrack.d/pagination
@@ -0,0 +1,18 @@
+<div class="pagination">
+ <ul>
+ Paging on the way
+ <!--
+ {{#each pages}}
+ {{#if link}}
+ <li class="pg_{{id}} {{classes}}">
+ <a href="{{link}}">{{label}}</a>
+ </li>
+ {{else}}
+ <li class="pg_{{id}} {{classes}}">
+ <a>{{label}}</a>
+ </li>
+ {{/if}}
+ {{/each}}
+ -->
+ </ul>
+</div>
diff --git a/web/templates/labitrack.d/recent b/web/templates/labitrack.d/recent
new file mode 100644
index 0000000..9734a54
--- /dev/null
+++ b/web/templates/labitrack.d/recent
@@ -0,0 +1,2 @@
+<div class="hide tmplheader">Recent changes</div>
+<div id="objecttable_ph"/>
diff --git a/web/templates/labitrack.d/view b/web/templates/labitrack.d/view
new file mode 100644
index 0000000..77b11d9
--- /dev/null
+++ b/web/templates/labitrack.d/view
@@ -0,0 +1,9 @@
+<div class="hide tmplheader">View label #{{id}}</div>
+<p>
+ <canvas id="label"/>
+</p>
+<div class="well" style="text-align: right;">
+ <a href="http://o.labitat.dk/{{id}}" class="btn">Wiki</a>
+ <a href="/edit/{{id}}" class="btn">Edit</a>
+ <a href="#" class="btn btn_print">Print</a>
+</div>