summaryrefslogtreecommitdiff
path: root/tpls
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-09-05 21:51:05 +0200
committerKevin Chabowski <kevin@kch42.de>2013-09-05 21:51:05 +0200
commit1c91fcb184a4228aa5673e975b65b28ccadc0ea1 (patch)
tree9709dd5e9bb567aeaa3f1c8a4e81f5b3a38dcc43 /tpls
parent6f4d4569a5227e1962f5f7a81e1a63b6046cfb6c (diff)
downloadmailremind-1c91fcb184a4228aa5673e975b65b28ccadc0ea1.tar.gz
mailremind-1c91fcb184a4228aa5673e975b65b28ccadc0ea1.tar.bz2
mailremind-1c91fcb184a4228aa5673e975b65b28ccadc0ea1.zip
Improved job editor
Diffstat (limited to 'tpls')
-rw-r--r--tpls/jobedit.tpl65
-rw-r--r--tpls/jobs.tpl1
-rw-r--r--tpls/master.tpl2
3 files changed, 40 insertions, 28 deletions
diff --git a/tpls/jobedit.tpl b/tpls/jobedit.tpl
index 5896db9..469bb93 100644
--- a/tpls/jobedit.tpl
+++ b/tpls/jobedit.tpl
@@ -22,33 +22,44 @@
</p>
<h2>Schedule</h2>
- {{range .Schedules}}
- <p>
- <strong>Start:</strong>
- <input type="text" name="Start" value="{{.Start}}" /><br />
- <select name="RepetitionEnabled" size="0">
- <option value="no"{{if not .RepetitionEnabled}} selected="selected"{{end}}>Off</option>
- <option value="yes"{{if .RepetitionEnabled}} selected="selected"{{end}}>On</option>
- </select>
- <strong>Repetition:</strong>
- <input type="text" name="Count" value="{{.Count}}" />
- <select name="Unit" size="0">
- <option value="Minute"{{if .UnitIsMinute}} selected="selected"{{end}}>Minute(s)</option>
- <option value="Hour"{{if .UnitIsHour}} selected="selected"{{end}}>Hour(s)</option>
- <option value="Day"{{if .UnitIsDay}} selected="selected"{{end}}>Day(s)</option>
- <option value="Week"{{if .UnitIsWeek}} selected="selected"{{end}}>Week(s)</option>
- <option value="Month"{{if .UnitIsMonth}} selected="selected"{{end}}>Month(s)</option>
- <option value="Year"{{if .UnitIsYear}} selected="selected"{{end}}>Year(s)</option>
- </select>
- <br />
- <select name="EndEnabled" size="0">
- <option value="no"{{if not .EndEnabled}} selected="selected"{{end}}>Off</option>
- <option value="yes"{{if .EndEnabled}} selected="selected"{{end}}>On</option>
- </select>
- <strong>End:</strong>
- <input type="text" name="End" value="{{.End}}" />
- </p>
- {{end}}
+ <table class="fullwidth schedules">
+ <thead>
+ <tr>
+ <th>Start</th>
+ <th colspan="2">Repetition</th>
+ <th colspan="2">End</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Schedules}}<tr>
+ <td><input type="text" name="Start" value="{{.Start}}" /></td>
+ <td>
+ <select name="RepetitionEnabled" size="0" class="enabler">
+ <option value="no"{{if not .RepetitionEnabled}} selected="selected"{{end}}>Off</option>
+ <option value="yes"{{if .RepetitionEnabled}} selected="selected"{{end}}>On</option>
+ </select>
+ </td>
+ <td>
+ <input type="text" name="Count" value="{{.Count}}" class="quant" />
+ <select name="Unit" size="0">
+ <option value="Minute"{{if .UnitIsMinute}} selected="selected"{{end}}>Minute(s)</option>
+ <option value="Hour"{{if .UnitIsHour}} selected="selected"{{end}}>Hour(s)</option>
+ <option value="Day"{{if .UnitIsDay}} selected="selected"{{end}}>Day(s)</option>
+ <option value="Week"{{if .UnitIsWeek}} selected="selected"{{end}}>Week(s)</option>
+ <option value="Month"{{if .UnitIsMonth}} selected="selected"{{end}}>Month(s)</option>
+ <option value="Year"{{if .UnitIsYear}} selected="selected"{{end}}>Year(s)</option>
+ </select>
+ </td>
+ <td>
+ <select name="EndEnabled" size="0" class="enabler">
+ <option value="no"{{if not .EndEnabled}} selected="selected"{{end}}>Off</option>
+ <option value="yes"{{if .EndEnabled}} selected="selected"{{end}}>On</option>
+ </select>
+ </td>
+ <td><input type="text" name="End" value="{{.End}}" /></td>
+ </tr>{{end}}
+ </tbody>
+ </table>
<h2>Save</h2>
<input type="submit" />
diff --git a/tpls/jobs.tpl b/tpls/jobs.tpl
index 60d17f4..6350c3d 100644
--- a/tpls/jobs.tpl
+++ b/tpls/jobs.tpl
@@ -32,7 +32,6 @@
</tr>{{end}}
</tbody>
</table>
- <hr />
<p>
Delete selected:
<select name="Delconfirm" size="0">
diff --git a/tpls/master.tpl b/tpls/master.tpl
index 54098e9..a79f5c6 100644
--- a/tpls/master.tpl
+++ b/tpls/master.tpl
@@ -2,6 +2,8 @@
<head>
<title>{{template "title" .Data}} – mailremind</title>
<link rel="stylesheet" type="text/css" href="/static/style.css" />
+ <script type="text/javascript" src="/static/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="/static/mailremind.js"></script>
</head>
<body>
<div id="main">