Compare commits
No commits in common. "d239a86444d5e4c2cbf5bdd9df23cc81fde9862c" and "c0e446d6d939ca98b415eb773ad6890cc87c9095" have entirely different histories.
d239a86444
...
c0e446d6d9
@ -52,7 +52,7 @@ func newConfig() *Config {
|
|||||||
PDFDir: "/var/www/cpolis/pdfs",
|
PDFDir: "/var/www/cpolis/pdfs",
|
||||||
PicsDir: "/var/www/cpolis/pics",
|
PicsDir: "/var/www/cpolis/pics",
|
||||||
Port: ":8080",
|
Port: ":8080",
|
||||||
Version: "v0.14.1",
|
Version: "v0.14.0",
|
||||||
WebDir: "/var/www/cpolis/web",
|
WebDir: "/var/www/cpolis/web",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,6 @@ func WriteArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.Creator = data.ArticleUsers[fmt.Sprint(creator.LastName, creator.FirstName, creator.ID)]
|
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))
|
delete(data.ArticleUsers, fmt.Sprint(creator.LastName, creator.FirstName, creator.ID))
|
||||||
|
|
||||||
data.Tags, err = db.GetTagList()
|
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" {
|
if r.PostFormValue("creator") == "contributor" {
|
||||||
authors = append(authors, article.CreatorID)
|
|
||||||
} else {
|
|
||||||
contributors = append(contributors, article.CreatorID)
|
contributors = append(contributors, article.CreatorID)
|
||||||
|
} else {
|
||||||
|
authors = append(authors, article.CreatorID)
|
||||||
}
|
}
|
||||||
if len(authors) == 0 {
|
if len(authors) == 0 {
|
||||||
http.Error(w, "Es muss mindestens einen Autor geben.", http.StatusBadRequest)
|
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" {
|
if r.PostFormValue("creator") == "contributor" {
|
||||||
authors = append(authors, article.CreatorID)
|
|
||||||
} else {
|
|
||||||
contributors = append(contributors, article.CreatorID)
|
contributors = append(contributors, article.CreatorID)
|
||||||
|
} else {
|
||||||
|
authors = append(authors, article.CreatorID)
|
||||||
}
|
}
|
||||||
if len(authors) == 0 {
|
if len(authors) == 0 {
|
||||||
http.Error(w, "Es muss mindestens einen Autor geben.", http.StatusBadRequest)
|
http.Error(w, "Es muss mindestens einen Autor geben.", http.StatusBadRequest)
|
||||||
|
@ -75,9 +75,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<input id="creator" name="creator" type="checkbox" value="author" {{if eq .Creator.ArticleRole
|
<input id="creator" name="creator" type="checkbox" value="contributor" {{if eq .Creator.ArticleRole
|
||||||
1}}checked{{end}} />
|
2}}checked{{end}} />
|
||||||
<label for="creator">Ich bin Autor.</label>
|
<label for="creator">Ich bin nicht der Autor.</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-area">
|
<div class="btn-area">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user