0
0
mirror of https://github.com/rls-moe/nyx synced 2025-08-19 06:18:38 +00:00

Added Board Rules

This commit is contained in:
Tim Schuster
2017-03-15 14:14:35 +01:00
parent 19d0e9282d
commit 477d3477df
6 changed files with 114 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ func handleNewThread(w http.ResponseWriter, r *http.Request) {
var mainReply = &resources.Reply{}
thread.Board = chi.URLParam(r, "board")
thread.Metadata = map[string]string{}
err = parseReply(r, mainReply)
if err == trollThrottle {

View File

@@ -103,6 +103,16 @@
<input type="submit" value="Post" />
</td>
</tr>
{{ if .Board.Metadata.rules }}
<tr>
<td class="postblock">
Rules
</td>
<td class="rules">
{{ renderText .Board.Metadata.rules }}
</td>
</tr>
{{ end }}
</tbody>
</table>
</form>