Compare commits
48 Commits
d239a86444
...
v0.14.0
Author | SHA1 | Date | |
---|---|---|---|
370ef205a9 | |||
d328ddb749 | |||
5dc5590da9 | |||
364112a0a4 | |||
a38523e933 | |||
200672dae2 | |||
3d3aad88c8 | |||
e4e43d1a83 | |||
737a9ec314 | |||
1ebe0380ee | |||
d62d71b5d1 | |||
b36e0ea503 | |||
bc4d8fa37e | |||
d2b21e7405 | |||
e3c192359f | |||
46532e4c85 | |||
c722135a56 | |||
887fa863bc | |||
74d71cfb6a | |||
ca7e7cddd3 | |||
94431a2aa9 | |||
5b1f20c5bc | |||
d0c566f8df | |||
5e586aa49a | |||
66b2743d3d | |||
3723b2b5e6 | |||
ce788bfd50 | |||
230a6278cc | |||
42d6e0c198 | |||
e1af2979af | |||
f6dedc6f10 | |||
cdf0a49550 | |||
c3c0650210 | |||
d077f700d8 | |||
ec752b1c66 | |||
46aef4f12f | |||
1b29e328cf | |||
e50cb819f3 | |||
c32e38ca10 | |||
d7c8c7a43a | |||
1cd3edc90c | |||
0e768c9f61 | |||
1fcd775cc5 | |||
203a1ed147 | |||
ef1914ee5c | |||
084b101e31 | |||
b2db128aa9 | |||
081e880fb6 |
@ -52,7 +52,7 @@ func newConfig() *Config {
|
||||
PDFDir: "/var/www/cpolis/pdfs",
|
||||
PicsDir: "/var/www/cpolis/pics",
|
||||
Port: ":8080",
|
||||
Version: "v0.14.1",
|
||||
Version: "v0.14.0",
|
||||
WebDir: "/var/www/cpolis/web",
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ func WriteArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
data.Creator = data.ArticleUsers[fmt.Sprint(creator.LastName, creator.FirstName, creator.ID)]
|
||||
data.Creator.ArticleRole = Author
|
||||
delete(data.ArticleUsers, fmt.Sprint(creator.LastName, creator.FirstName, creator.ID))
|
||||
|
||||
data.Tags, err = db.GetTagList()
|
||||
@ -156,10 +155,10 @@ func SubmitArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
if r.PostFormValue("creator") == "author" {
|
||||
authors = append(authors, article.CreatorID)
|
||||
} else {
|
||||
if r.PostFormValue("creator") == "contributor" {
|
||||
contributors = append(contributors, article.CreatorID)
|
||||
} else {
|
||||
authors = append(authors, article.CreatorID)
|
||||
}
|
||||
if len(authors) == 0 {
|
||||
http.Error(w, "Es muss mindestens einen Autor geben.", http.StatusBadRequest)
|
||||
@ -275,10 +274,10 @@ func ResubmitArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
if r.PostFormValue("creator") == "author" {
|
||||
authors = append(authors, article.CreatorID)
|
||||
} else {
|
||||
if r.PostFormValue("creator") == "contributor" {
|
||||
contributors = append(contributors, article.CreatorID)
|
||||
} else {
|
||||
authors = append(authors, article.CreatorID)
|
||||
}
|
||||
if len(authors) == 0 {
|
||||
http.Error(w, "Es muss mindestens einen Autor geben.", http.StatusBadRequest)
|
||||
|
@ -1,14 +1,9 @@
|
||||
[Unit]
|
||||
Description=cpolis
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/cpolis
|
||||
User=cpolis
|
||||
Group=cpolis
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=default.target
|
||||
|
@ -75,9 +75,9 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input id="creator" name="creator" type="checkbox" value="author" {{if eq .Creator.ArticleRole
|
||||
1}}checked{{end}} />
|
||||
<label for="creator">Ich bin Autor.</label>
|
||||
<input id="creator" name="creator" type="checkbox" value="contributor" {{if eq .Creator.ArticleRole
|
||||
2}}checked{{end}} />
|
||||
<label for="creator">Ich bin nicht der Autor.</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-area">
|
||||
|
Reference in New Issue
Block a user