forked from jriou/coller
Compare commits
No commits in common. "33628331f4330712781e2b3170236b16b24d9bc2" and "401397241b9c93f42854eb411c8a391da011d81f" have entirely different histories.
33628331f4
...
401397241b
2 changed files with 6 additions and 5 deletions
|
@ -189,7 +189,6 @@ type PageData struct {
|
||||||
Title string
|
Title string
|
||||||
Version string
|
Version string
|
||||||
Expirations []int
|
Expirations []int
|
||||||
Expiration int
|
|
||||||
Languages []string
|
Languages []string
|
||||||
Err error
|
Err error
|
||||||
URL string
|
URL string
|
||||||
|
@ -346,6 +345,9 @@ func (h *GetWebNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.PageData.Err = fmt.Errorf("jriou")
|
||||||
|
h.Templates.ExecuteTemplate(w, templateName, h.PageData)
|
||||||
|
|
||||||
h.PageData.Note = note
|
h.PageData.Note = note
|
||||||
|
|
||||||
h.logger.Debug("rendering note web page")
|
h.logger.Debug("rendering note web page")
|
||||||
|
@ -424,7 +426,6 @@ func (s *Server) Start() error {
|
||||||
p := PageData{
|
p := PageData{
|
||||||
Title: s.config.Title,
|
Title: s.config.Title,
|
||||||
Expirations: s.config.Expirations,
|
Expirations: s.config.Expirations,
|
||||||
Expiration: s.config.Expiration,
|
|
||||||
Languages: s.config.Languages,
|
Languages: s.config.Languages,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
||||||
<option disabled>Expiration</option>
|
<option selected="selected" disabled>Expiration</option>
|
||||||
{{range $exp := .Expirations}}
|
{{range .Expirations}}
|
||||||
<option {{ if eq $exp $.Expiration }}selected="selected"{{end}} value="{{$exp}}">{{HumanDuration $exp}}</option>
|
<option value="{{.}}">{{HumanDuration .}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue