Added ability to publish articles
This commit is contained in:
		@@ -3,4 +3,5 @@
 | 
			
		||||
<button hx-post="/write-article/" hx-target="#page-content">Artikel schreiben</button>
 | 
			
		||||
<button hx-post="/rss/" hx-target="#page-content">RSS Feed</button>
 | 
			
		||||
<button hx-post="/create-user/" hx-target="#page-content">Benutzer hinzufügen</button>
 | 
			
		||||
<button hx-post="/unpublished-articles/" hx-target="#page-content">Unveröffentlichte Artikel</button>
 | 
			
		||||
{{end}}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								web/templates/to-be-published.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								web/templates/to-be-published.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
{{define "page-content"}}
 | 
			
		||||
<form>
 | 
			
		||||
    <input name="editor-title" type="text" value="{{.Title}}" />
 | 
			
		||||
    <textarea name="editor-desc">{{.Desc}}</textarea>
 | 
			
		||||
    <textarea name="editor-text">{{.Content}}</textarea>
 | 
			
		||||
    <input name="uuid" type="hidden" value="{{.UUID}}" />
 | 
			
		||||
    <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}}
 | 
			
		||||
							
								
								
									
										10
									
								
								web/templates/unpublished-articles.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								web/templates/unpublished-articles.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
{{define "page-content"}}
 | 
			
		||||
<form>
 | 
			
		||||
    {{range .}}
 | 
			
		||||
    <input required id="{{.UUID}}" name="uuid" type="radio" value="{{.UUID}}" />
 | 
			
		||||
    <label for="{{.UUID}}">{{.Title}}</label>
 | 
			
		||||
    {{end}}
 | 
			
		||||
    <input type="submit" value="Auswählen" hx-post="/review-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