summaryrefslogtreecommitdiff
path: root/tpls
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-31 21:52:40 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-31 21:52:40 +0200
commitf68f1f326a196882383e534ff5166bf91b4e079d (patch)
treed49c42dca58f6868222c5d3d8b20bf69b5c2e7e9 /tpls
parent945af900ee539fc270e82e906c6d961c51e4913d (diff)
downloadmailremind-f68f1f326a196882383e534ff5166bf91b4e079d.tar.gz
mailremind-f68f1f326a196882383e534ff5166bf91b4e079d.tar.bz2
mailremind-f68f1f326a196882383e534ff5166bf91b4e079d.zip
Jobs can now be viewed in the job editor.
Diffstat (limited to 'tpls')
-rw-r--r--tpls/jobedit.tpl51
-rw-r--r--tpls/jobs.tpl2
2 files changed, 52 insertions, 1 deletions
diff --git a/tpls/jobedit.tpl b/tpls/jobedit.tpl
new file mode 100644
index 0000000..ef1d394
--- /dev/null
+++ b/tpls/jobedit.tpl
@@ -0,0 +1,51 @@
+{{define "title"}}{{if .JobID}}Edit Job{{else}}Create Job{{end}}{{end}}
+
+{{define "content"}}
+ {{if .Error}}
+ <div class="error">{{.Error}}</div>
+ {{end}}
+
+ {{if not .Fatal}}
+ {{if .Success}}
+ <div class="success">{{.Success}}</div>
+ {{end}}
+
+ <form action="/jobedit{{if .JobID}}/{{.JobID}}{{end}}" method="post" accept-charset="UTF-8">
+ <h2>Mail</h2>
+ <p>
+ <strong>Subject:</strong><br />
+ <input type="text" name="Subject" value="{{.Subject}}" />
+ </p>
+ <p>
+ <strong>Content:</strong><br />
+ <textarea name="Content" cols="80" rows="20">{{.Content}}</textarea>
+ </p>
+
+ <h2>Schedule</h2>
+ {{range .Schedules}}
+ <p>
+ <strong>Start:</strong>
+ <input type="text" name="Start" value="{{.Start}}" /><br />
+ <input type="checkbox" name="RepetitionEnabled"{{if .RepetitionEnabled}} checked="checked"{{end}} />
+ <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 />
+ <input type="checkbox" name="EndEnabled"{{if .EndEnabled}} checked="checked"{{end}} />
+ <strong>End:</strong>
+ <input type="text" name="End" value="{{.End}}" />
+ </p>
+ {{end}}
+
+ <h2>Save</h2>
+ <input type="submit" />
+ </form>
+ {{end}}
+{{end}} \ No newline at end of file
diff --git a/tpls/jobs.tpl b/tpls/jobs.tpl
index 578791e..9408e48 100644
--- a/tpls/jobs.tpl
+++ b/tpls/jobs.tpl
@@ -23,7 +23,7 @@
<tbody>
{{range .Jobs}}<tr>
<td><input type="checkbox" name="Jobs" value="{{.ID}}" /></td>
- <td><a href="/edit/{{.ID}}">{{.Subject}}</a></td>
+ <td><a href="/jobedit/{{.ID}}">{{.Subject}}</a></td>
<td>{{.Excerpt}}</td>
<td>{{.Next}}</td>
</tr>{{end}}