2016-12-02 07:38:54 +00:00
{{template "header.html" . }}
2017-05-29 14:52:37 +00:00
2017-08-06 15:22:18 +00:00
< form id = "edit_topic_form" action = '/topic/edit/submit/{{.Topic.ID}}' method = "post" > < / form >
2017-10-30 09:57:08 +00:00
{{if gt .Page 1}}< link rel = "prev" href = "/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" / >
< div id = "prevFloat" class = "prev_button" > < a class = "prev_link" aria-label = "Go to the previous page" rel = "prev" href = "/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" > < < / a > < / div > {{end}}
2017-05-29 14:52:37 +00:00
2017-10-30 09:57:08 +00:00
{{if ne .LastPage .Page}}< link rel = "prerender next" href = "/topic/{{.Topic.ID}}?page={{add .Page 1}}" / >
2017-05-29 14:52:37 +00:00
< div id = "nextFloat" class = "next_button" >
2017-08-27 09:33:45 +00:00
< a class = "next_link" aria-label = "Go to the next page" rel = "next" href = "/topic/{{.Topic.ID}}?page={{add .Page 1}}" > > < / a >
2017-05-29 14:52:37 +00:00
< / div > {{end}}
2017-08-20 09:39:02 +00:00
< main >
2017-10-30 09:57:08 +00:00
< div class = "rowblock rowhead topic_block" aria-label = "The opening post of this topic" >
2017-09-03 04:50:31 +00:00
< div class = "rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}" >
2017-08-27 09:33:45 +00:00
< h1 class = 'topic_name hide_on_edit' > {{.Topic.Title}}< / h1 >
2017-09-22 02:21:17 +00:00
{{if .Topic.IsClosed}}< span class = 'username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title = 'Status: Closed' > 🔒 & #xFE0E< / span > {{end}}
2017-07-29 10:36:39 +00:00
{{if .CurrentUser.Perms.EditTopic}}
< input form = 'edit_topic_form' class = 'show_on_edit topic_name_input' name = "topic_name" value = '{{.Topic.Title}}' type = "text" / >
< button form = 'edit_topic_form' name = "topic-button" class = "formbutton show_on_edit submit_edit" > Update< / button >
{{end}}
< / div >
2016-12-02 07:38:54 +00:00
< / div >
2017-07-29 10:36:39 +00:00
2017-10-30 09:57:08 +00:00
< article itemscope itemtype = "http://schema.org/CreativeWork" class = "rowblock post_container top_post" aria-label = "The opening post for this topic" >
2017-12-10 03:43:30 +00:00
< div class = "rowitem passive editable_parent post_item {{.Topic.ClassName}}" style = "background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;" >
2017-10-30 09:57:08 +00:00
< p class = "hide_on_edit topic_content user_content" itemprop = "text" style = "margin:0;padding:0;" > {{.Topic.ContentHTML}}< / p >
2017-03-07 07:22:29 +00:00
< textarea name = "topic_content" class = "show_on_edit topic_content_input" > {{.Topic.Content}}< / textarea >
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
< span class = "controls" >
2017-06-28 12:05:26 +00:00
2017-10-30 09:57:08 +00:00
< a href = "{{.Topic.UserLink}}" class = "username real_username" rel = "author" > {{.Topic.CreatedByName}}< / a >
2017-05-29 14:52:37 +00:00
{{if .CurrentUser.Perms.LikeItem}}< a href = "/topic/like/submit/{{.Topic.ID}}" class = "mod_button" title = "Love it" style = "color:#202020;" >
2017-09-23 19:57:13 +00:00
< button class = "username like_label" { { if . Topic . Liked } } style = "background-color:#D6FFD6;" { { end } } > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if .CurrentUser.Perms.EditTopic}}< a href = '/topic/edit/{{.Topic.ID}}' class = "mod_button open_edit" style = "font-weight:normal;" title = "Edit Topic" > < button class = "username edit_label" > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if .CurrentUser.Perms.DeleteTopic}}< a href = '/topic/delete/submit/{{.Topic.ID}}' class = "mod_button" style = "font-weight:normal;" title = "Delete Topic" > < button class = "username trash_label" > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-09-22 02:21:17 +00:00
{{if .CurrentUser.Perms.CloseTopic}}{{if .Topic.IsClosed}}< a class = "mod_button" href = '/topic/unlock/submit/{{.Topic.ID}}' style = "font-weight:normal;" title = "Unlock Topic" > < button class = "username unlock_label" > < / button > < / a > {{else}}< a href = '/topic/lock/submit/{{.Topic.ID}}' class = "mod_button" style = "font-weight:normal;" title = "Lock Topic" > < button class = "username lock_label" > < / button > < / a > {{end}}{{end}}
2017-05-29 14:52:37 +00:00
{{if .CurrentUser.Perms.PinTopic}}{{if .Topic.Sticky}}< a class = "mod_button" href = '/topic/unstick/submit/{{.Topic.ID}}' style = "font-weight:normal;" title = "Unpin Topic" > < button class = "username unpin_label" > < / button > < / a > {{else}}< a href = '/topic/stick/submit/{{.Topic.ID}}' class = "mod_button" style = "font-weight:normal;" title = "Pin Topic" > < button class = "username pin_label" > < / button > < / a > {{end}}{{end}}
2017-09-23 19:57:13 +00:00
{{if .CurrentUser.Perms.ViewIPs}}< a class = "mod_button" href = '/users/ips/?ip={{.Topic.IPAddress}}' style = "font-weight:normal;" title = "View IP" > < button class = "username ip_label" > < / button > < / a > {{end}}
2017-08-17 11:13:49 +00:00
< a href = "/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class = "mod_button report_item" style = "font-weight:normal;" title = "Flag Topic" > < button class = "username flag_label" > < / button > < / a >
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if .Topic.LikeCount}}< a class = "username hide_on_micro like_count" > {{.Topic.LikeCount}}< / a > < a class = "username hide_on_micro like_count_label" title = "Like Count" > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-07-17 10:23:42 +00:00
{{if .Topic.Tag}}< a class = "username hide_on_micro user_tag" > {{.Topic.Tag}}< / a > {{else}}< a class = "username hide_on_micro level" > {{.Topic.Level}}< / a > < a class = "username hide_on_micro level_label" style = "float:right;" title = "Level" > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
< / span >
2016-12-02 07:38:54 +00:00
< / div >
2017-08-20 09:39:02 +00:00
< / article >
2017-10-30 09:57:08 +00:00
< div class = "rowblock post_container" aria-label = "The current page for this topic" style = "overflow: hidden;" > {{range .ItemList}}{{if .ActionType}}
< article itemscope itemtype = "http://schema.org/CreativeWork" class = "rowitem passive deletable_block editable_parent post_item action_item" >
2017-04-02 13:00:40 +00:00
< span class = "action_icon" style = "font-size: 18px;padding-right: 5px;" > {{.ActionIcon}}< / span >
2017-10-30 09:57:08 +00:00
< span itemprop = "text" > {{.ActionType}}< / span >
2017-08-20 09:39:02 +00:00
< / article >
2017-04-02 13:00:40 +00:00
{{else}}
2017-12-10 03:43:30 +00:00
< article itemscope itemtype = "http://schema.org/CreativeWork" class = "rowitem passive deletable_block editable_parent post_item {{.ClassName}}" style = "background-image: url({{.Avatar}}), url(/static/{{$.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;" >
2017-09-28 22:16:34 +00:00
{{/** TODO: We might end up with < br > s in the inline editor, fix this **/}}
2017-10-30 09:57:08 +00:00
< p class = "editable_block user_content" itemprop = "text" style = "margin:0;padding:0;" > {{.ContentHtml}}< / p >
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
< span class = "controls" >
2017-06-28 12:05:26 +00:00
2017-10-30 09:57:08 +00:00
< a href = "{{.UserLink}}" class = "username real_username" rel = "author" > {{.CreatedByName}}< / a >
2017-09-23 19:57:13 +00:00
{{if $.CurrentUser.Perms.LikeItem}}< a href = "/reply/like/submit/{{.ID}}" class = "mod_button" title = "Love it" style = "color:#202020;" > < button class = "username like_label" { { if . Liked } } style = "background-color:#D6FFD6;" { { end } } > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if $.CurrentUser.Perms.EditReply}}< a href = "/reply/edit/submit/{{.ID}}" class = "mod_button" title = "Edit Reply" > < button class = "username edit_item edit_label" > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if $.CurrentUser.Perms.DeleteReply}}< a href = "/reply/delete/submit/{{.ID}}" class = "mod_button" title = "Delete Reply" > < button class = "username delete_item trash_label" > < / button > < / a > {{end}}
2017-09-23 19:57:13 +00:00
{{if $.CurrentUser.Perms.ViewIPs}}< a class = "mod_button" href = '/users/ips/?ip={{.IPAddress}}' style = "font-weight:normal;" title = "View IP" > < button class = "username ip_label" > < / button > < / a > {{end}}
2017-08-17 11:13:49 +00:00
< a href = "/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class = "mod_button report_item" title = "Flag Reply" > < button class = "username report_item flag_label" > < / button > < / a >
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
{{if .LikeCount}}< a class = "username hide_on_micro like_count" > {{.LikeCount}}< / a > < a class = "username hide_on_micro like_count_label" title = "Like Count" > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-08-17 11:13:49 +00:00
{{if .Tag}}< a class = "username hide_on_micro user_tag" > {{.Tag}}< / a > {{else}}< a class = "username hide_on_micro level" > {{.Level}}< / a > < a class = "username hide_on_micro level_label" style = "float:right;" title = "Level" > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2017-05-29 14:52:37 +00:00
< / span >
2017-08-20 09:39:02 +00:00
< / article >
2017-04-02 13:00:40 +00:00
{{end}}{{end}}< / div >
2017-05-13 14:27:42 +00:00
2016-12-21 02:30:32 +00:00
{{if .CurrentUser.Perms.CreateReply}}
2017-10-12 03:24:14 +00:00
< div class = "rowblock topic_reply_form quick_create_form" >
< form id = "reply_form" enctype = "multipart/form-data" action = "/reply/create/" method = "post" > < / form >
< input form = "reply_form" name = "tid" value = '{{.Topic.ID}}' type = "hidden" / >
< div class = "formrow real_first_child" >
< div class = "formitem" >
< textarea id = "input_content" form = "reply_form" name = "reply-content" placeholder = "Insert reply here" required > < / textarea >
2016-12-02 07:38:54 +00:00
< / div >
2017-10-12 03:24:14 +00:00
< / div >
< div class = "formrow quick_button_row" >
< div class = "formitem" >
< button form = "reply_form" name = "reply-button" class = "formbutton" > Create Reply< / button >
{{if .CurrentUser.Perms.UploadFiles}}
< input name = "upload_files" form = "reply_form" id = "upload_files" multiple type = "file" style = "display: none;" / >
< label for = "upload_files" class = "formbutton add_file_button" > Add File< / label >
< div id = "upload_file_dock" > < / div > {{end}}
2016-12-02 07:38:54 +00:00
< / div >
2017-10-12 03:24:14 +00:00
< / div >
2016-12-02 07:38:54 +00:00
< / div >
2016-12-04 10:44:28 +00:00
{{end}}
2017-08-20 09:39:02 +00:00
< / main >
2017-06-28 12:05:26 +00:00
{{template "footer.html" . }}