Added ability to view tags when rejecting and change tags when reworking articles
This commit is contained in:
@ -1,10 +1,16 @@
|
||||
{{define "page-content"}}
|
||||
<h2>Editor</h2>
|
||||
<form>
|
||||
<input name="article-title" placeholder="Titel" type="text" value="{{.Title}}" />
|
||||
<textarea name="article-description" placeholder="Beschreibung">{{.Description}}</textarea>
|
||||
<textarea name="article-content" placeholder="Artikel">{{.Content}}</textarea>
|
||||
<input name="article-id" type="hidden" value="{{.ID}}" />
|
||||
<input name="article-title" placeholder="Titel" type="text" value="{{.Article.Title}}" />
|
||||
<textarea name="article-description" placeholder="Beschreibung">{{.Article.Description}}</textarea>
|
||||
<textarea name="article-content" placeholder="Artikel">{{.Article.Content}}</textarea>
|
||||
<input name="article-id" type="hidden" value="{{.Article.ID}}" />
|
||||
|
||||
{{range .Tags}}
|
||||
<input id="tag-{{.Name}}" name="tags" type="checkbox" value="{{.ID}}" {{if index $.Selected .ID}}checked{{end}} />
|
||||
<label for="tag-{{.Name}}">{{.Name}}</label>
|
||||
{{end}}
|
||||
|
||||
<input type="submit" value="Senden" hx-post="/resubmit-article/" hx-target="#page-content" />
|
||||
</form>
|
||||
{{end}}
|
||||
|
@ -1,11 +1,19 @@
|
||||
{{define "page-content"}}
|
||||
<form>
|
||||
<h2>{{.Title}}</h2>
|
||||
<p>{{.Description}}</p>
|
||||
{{.Content}}
|
||||
<input name="id" type="hidden" value="{{.ID}}" />
|
||||
<h2>{{.Article.Title}}</h2>
|
||||
<p>{{.Article.Description}}</p>
|
||||
{{.Article.Content}}
|
||||
|
||||
<p>
|
||||
{{range .Tags}}
|
||||
{{.Name}}
|
||||
{{end}}
|
||||
</p>
|
||||
|
||||
<input name="id" type="hidden" value="{{.Article.ID}}" />
|
||||
<input type="submit" value="Veröffentlichen" hx-post="/publish-article/" hx-target="#page-content" />
|
||||
<input type="submit" value="Ablehnen" hx-post="/reject-article/" hx-target="#page-content" />
|
||||
</form>
|
||||
|
||||
<button hx-get="/hub/" hx-target="#page-content">Zurück</button>
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user