summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Minko <vitaly.minko@gmail.com>2019-06-05 18:28:22 +0300
committerVitaly Minko <vitaly.minko@gmail.com>2019-06-05 18:28:22 +0300
commitb356c316ffd0d3202ebb0c2c6ab92a1aacfbb26f (patch)
treeb973b230758c757b72c4ac73c2d551eac40be649
parentd9dcba96af25bfa8cc8b43652335a2677c4b78ec (diff)
Fixed broken links on the thread listing page.
-rw-r--r--cmd/dscuss-web/controller/reply_handlers.go1
-rw-r--r--cmd/dscuss-web/view/thread.go17
2 files changed, 3 insertions, 15 deletions
diff --git a/cmd/dscuss-web/controller/reply_handlers.go b/cmd/dscuss-web/controller/reply_handlers.go
index 27add9e..f92f646 100644
--- a/cmd/dscuss-web/controller/reply_handlers.go
+++ b/cmd/dscuss-web/controller/reply_handlers.go
@@ -17,7 +17,6 @@ this program. If not, see <http://www.gnu.org/licenses/>.
package controller
import (
- "fmt"
"net/http"
"net/url"
"vminko.org/dscuss"
diff --git a/cmd/dscuss-web/view/thread.go b/cmd/dscuss-web/view/thread.go
index 2c82a75..488a583 100644
--- a/cmd/dscuss-web/view/thread.go
+++ b/cmd/dscuss-web/view/thread.go
@@ -22,11 +22,11 @@ const threadHTML = `
{{ if .Common.IsWritingPermitted }}
<div class="btn-row">
- <a class="link-btn" href="/reply?id={{ .ThreadID }}">Reply</a>
+ <a class="link-btn" href="/reply?id={{ .ID }}">Reply</a>
</div>
{{end}}
-<h2 id="title"><a href="/thread?id={{ .ThreadID }}">{{ .Subject }}</a></h2>
+<h2 id="title"><a href="/thread?id={{ .ID }}">{{ .Subject }}</a></h2>
<span class="topic">in <a href="/board?topic={{ .Topic }}">{{ .Topic }}</a></span>
<div class="message-row">
<div class="message-text">{{ .Text }}</div>
@@ -35,7 +35,7 @@ const threadHTML = `
{{ if .Common.IsWritingPermitted }}
| <a href="/ban?id={{ .AuthorID }}">ban</a>
| <a href="/rmmsg?id={{ .ID }}">delete</a>
- | <a href="/reply?id={{ $.ID }}">reply</a>
+ | <a href="/reply?id={{ .ID }}">reply</a>
{{ end }}
</div>
</div>
@@ -64,17 +64,6 @@ const threadHTML = `
{{ end }}
<div id="comment-last"></div>
-{{ if .Common.IsWritingPermitted }}
-<div style="margin-top: 40px;">
-<form action="/reply" method="POST" enctype="multipart/form-data">
- <input type="hidden" name="csrf" value="{{ .Common.CSRF }}">
- <input type="hidden" name="id" value="{{ .ThreadID }}">
- <textarea name="content" rows="12" placeholder="Your reply..."></textarea>
- <input type="submit" name="action" class="no-double-post" value="Post reply">
-</form>
-</div>
-{{ end }}
-
{{ end }}`
/* vim: set filetype=html: */