2016-12-02 07:38:54 +00:00
{{template "header.html" . }}
2017-05-29 14:52:37 +00:00
2018-01-14 12:03:20 +00:00
< form id = "edit_topic_form" action = '/topic/edit/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' method = "post" > < / form >
2018-12-17 10:14:20 +00:00
{{if gt .Page 1}}< link rel = "prev" href = "{{.Topic.Link}}?page={{subtract .Page 1}}" / >
2019-02-10 05:52:26 +00:00
< div id = "prevFloat" class = "prev_button" > < a class = "prev_link" aria-label = "{{lang " paginator . prev_page_aria " } } " rel = "prev" href = "{{.Topic.Link}}?page={{subtract .Page 1}}" > {{lang "paginator.less_than"}}< / a > < / div > {{end}}
2017-05-29 14:52:37 +00:00
2018-12-17 10:14:20 +00:00
{{if ne .LastPage .Page}}< link rel = "prerender next" href = "{{.Topic.Link}}?page={{add .Page 1}}" / >
2017-05-29 14:52:37 +00:00
< div id = "nextFloat" class = "next_button" >
2019-02-10 05:52:26 +00:00
< a class = "next_link" aria-label = "{{lang " paginator . next_page_aria " } } " rel = "next" href = "{{.Topic.Link}}?page={{add .Page 1}}" > {{lang "paginator.greater_than"}}< / a >
2017-05-29 14:52:37 +00:00
< / div > {{end}}
2018-12-17 10:14:20 +00:00
< link rel = "canonical" href = "//{{.Site.URL}}{{.Topic.Link}}{{if gt .Page 1}}?page={{.Page}}{{end}}" / >
2017-08-20 09:39:02 +00:00
< main >
2018-06-24 13:49:29 +00:00
< div { { scope " topic_title_block " } } class = "rowblock rowhead topic_block" aria-label = "{{lang " topic . opening_post_aria " } } " >
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}}" >
2018-03-31 05:25:27 +00:00
< h1 class = 'topic_name hide_on_edit' title = '{{.Topic.Title}}' > {{.Topic.Title}}< / h1 >
2018-06-24 13:49:29 +00:00
{{if .Topic.IsClosed}}< span class = 'username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title = '{{lang "status.closed_tooltip"}}' aria-label = '{{lang "topic.status_closed_aria"}}' > 🔒 & #xFE0E< / span > {{end}}
2018-06-01 05:02:29 +00:00
{{/** TODO: Does this need to be guarded by a permission? It's only visible in edit mode anyway, which can't be triggered, if they don't have the permission **/}}
{{if not .Topic.IsClosed or .CurrentUser.Perms.CloseTopic}}
2017-07-29 10:36:39 +00:00
{{if .CurrentUser.Perms.EditTopic}}
2018-06-24 13:49:29 +00:00
< input form = 'edit_topic_form' class = 'show_on_edit topic_name_input' name = "topic_name" value = '{{.Topic.Title}}' type = "text" aria-label = "{{lang " topic . title_input_aria " } } " / >
< button form = 'edit_topic_form' name = "topic-button" class = "formbutton show_on_edit submit_edit" > {{lang "topic.update_button"}}< / button >
2017-07-29 10:36:39 +00:00
{{end}}
2018-06-01 05:02:29 +00:00
{{end}}
2017-07-29 10:36:39 +00:00
< / div >
2016-12-02 07:38:54 +00:00
< / div >
2018-02-10 15:07:21 +00:00
{{if .Poll.ID}}
2018-06-24 13:49:29 +00:00
< article class = "rowblock post_container poll" aria-level = "{{lang " topic . poll_aria " } } " >
2018-02-03 05:47:14 +00:00
< div class = "rowitem passive editable_parent post_item poll_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;" >
< div class = "topic_content user_content" style = "margin:0;padding:0;" >
{{range .Poll.QuickOptions}}
< div class = "poll_option" >
< input form = "poll_{{$.Poll.ID}}_form" id = "poll_option_{{.ID}}" name = "poll_option_input" type = "checkbox" value = "{{.ID}}" / >
< label class = "poll_option_label" for = "poll_option_{{.ID}}" >
< div class = "sel" > < / div >
< / label >
< span id = "poll_option_text_{{.ID}}" class = "poll_option_text" > {{.Value}}< / span >
< / div >
{{end}}
< div class = "poll_buttons" >
2018-06-24 13:49:29 +00:00
< button form = "poll_{{.Poll.ID}}_form" class = "poll_vote_button" > {{lang "topic.poll_vote"}}< / button >
< button class = "poll_results_button" data-poll-id = "{{.Poll.ID}}" > {{lang "topic.poll_results"}}< / button >
< a href = "#" > < button class = "poll_cancel_button" > {{lang "topic.poll_cancel"}}< / button > < / a >
2018-02-03 05:47:14 +00:00
< / div >
< / div >
< div id = "poll_results_{{.Poll.ID}}" class = "poll_results auto_hide" >
< div class = "topic_content user_content" > < / div >
< / div >
< / div >
< / article >
2018-02-10 15:07:21 +00:00
{{end}}
2017-07-29 10:36:39 +00:00
2018-06-24 13:49:29 +00:00
< article { { scope " opening_post " } } itemscope itemtype = "http://schema.org/CreativeWork" class = "rowblock post_container top_post" aria-label = "{{lang " topic . opening_post_aria " } } " >
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;" >
2019-03-25 03:30:56 +00:00
< span class = "hide_on_edit topic_content user_content" itemprop = "text" style = "margin:0;padding:0;" > {{.Topic.ContentHTML}}< / span >
{{if .CurrentUser.Loggedin}}< textarea name = "topic_content" class = "show_on_edit topic_content_input edit_source" > {{.Topic.Content}}< / textarea > {{end}}
2017-06-28 12:05:26 +00:00
2018-06-24 13:49:29 +00:00
< span class = "controls{{if .Topic.LikeCount}} has_likes{{end}}" aria-label = "{{lang " topic . post_controls_aria " } } " >
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 >
2019-03-25 03:30:56 +00:00
{{if .CurrentUser.Loggedin}}
{{if .CurrentUser.Perms.LikeItem}}< a href = "/topic/like/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class = "mod_button" { { if . Topic . Liked } } title = "{{lang " topic . unlike_tooltip " } } " aria-label = "{{lang " topic . unlike_aria " } } " { { else } } title = "{{lang " topic . like_tooltip " } } " aria-label = "{{lang " topic . like_aria " } } " { { end } } >
2018-03-31 05:25:27 +00:00
< button class = "username like_label {{if .Topic.Liked}}remove_like{{else}}add_like{{end}}" > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2019-03-25 03:30:56 +00:00
< a href = "" class = "mod_button quote_item" title = "{{lang " topic . quote_tooltip " } } " aria-label = "{{lang " topic . quote_aria " } } " > < button class = "username quote_label" > < / button > < / a >
2018-06-01 05:02:29 +00:00
{{if not .Topic.IsClosed or .CurrentUser.Perms.CloseTopic}}
2019-03-25 03:30:56 +00:00
{{if .CurrentUser.Perms.EditTopic}}< a href = '/topic/edit/{{.Topic.ID}}' class = "mod_button open_edit" title = "{{lang " topic . edit_tooltip " } } " aria-label = "{{lang " topic . edit_aria " } } " > < button class = "username edit_label" > < / button > < / a > {{end}}
2018-06-01 05:02:29 +00:00
{{end}}
2017-06-28 12:05:26 +00:00
2019-03-25 03:30:56 +00:00
{{if .CurrentUser.Perms.DeleteTopic}}< a href = '/topic/delete/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class = "mod_button" title = "{{lang " topic . delete_tooltip " } } " aria-label = "{{lang " topic . delete_aria " } } " > < button class = "username delete_label" > < / button > < / a > {{end}}
2017-06-28 12:05:26 +00:00
2019-03-25 03:30:56 +00:00
{{if .CurrentUser.Perms.CloseTopic}}{{if .Topic.IsClosed}}< a class = "mod_button" href = '/topic/unlock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' title = "{{lang " topic . unlock_tooltip " } } " aria-label = "{{lang " topic . unlock_aria " } } " > < button class = "username unlock_label" > < / button > < / a > {{else}}< a href = '/topic/lock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class = "mod_button" title = "{{lang " topic . lock_tooltip " } } " aria-label = "{{lang " topic . lock_aria " } } " > < button class = "username lock_label" > < / button > < / a > {{end}}{{end}}
{{if .CurrentUser.Perms.PinTopic}}{{if .Topic.Sticky}}< a class = "mod_button" href = '/topic/unstick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' title = "{{lang " topic . unpin_tooltip " } } " aria-label = "{{lang " topic . unpin_aria " } } " > < button class = "username unpin_label" > < / button > < / a > {{else}}< a href = '/topic/stick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class = "mod_button" title = "{{lang " topic . pin_tooltip " } } " aria-label = "{{lang " topic . pin_aria " } } " > < button class = "username pin_label" > < / button > < / a > {{end}}{{end}}
{{if .CurrentUser.Perms.ViewIPs}}< a class = "mod_button" href = '/users/ips/?ip={{.Topic.IPAddress}}' title = "{{lang " topic . ip_tooltip " } } " aria-label = "The poster's IP is {{.Topic.IPAddress}}" > < button class = "username ip_label" > < / button > < / a > {{end}}
{{end}}
2017-09-22 02:21:17 +00:00
2019-03-25 03:30:56 +00:00
< a href = "/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class = "mod_button report_item" title = "{{lang " topic . flag_tooltip " } } " aria-label = "{{lang " topic . flag_aria " } } " rel = "nofollow" > < button class = "username flag_label" > < / button > < / a >
2017-06-28 12:05:26 +00:00
2018-06-24 13:49:29 +00:00
< a class = "username hide_on_micro like_count" aria-label = "{{lang " topic . like_count_aria " } } " > {{.Topic.LikeCount}}< / a > < a class = "username hide_on_micro like_count_label" title = "{{lang " topic . like_count_tooltip " } } " > < / a >
2017-06-28 12:05:26 +00:00
2018-10-10 21:29:38 +00:00
{{if .Topic.Tag}}< a class = "username hide_on_micro user_tag" > {{.Topic.Tag}}< / a > {{else}}< a class = "username hide_on_micro level" aria-label = "{{lang " topic . level_aria " } } " title = "{{lang " topic . level_tooltip " } } " > {{level .Topic.Level}}< / a > < a class = "username hide_on_micro level_label" title = "{{lang " topic . level_tooltip " } } " > < / 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
2018-06-24 13:49:29 +00:00
{{template "topic_posts.html" . }}
2017-05-13 14:27:42 +00:00
2016-12-21 02:30:32 +00:00
{{if .CurrentUser.Perms.CreateReply}}
2018-06-01 05:02:29 +00:00
{{if not .Topic.IsClosed or .CurrentUser.Perms.CloseTopic}}
2018-06-24 13:49:29 +00:00
< div class = "rowblock topic_reply_form quick_create_form" aria-label = "{{lang " topic . reply_aria " } } " >
2018-02-03 05:47:14 +00:00
< form id = "quick_post_form" enctype = "multipart/form-data" action = "/reply/create/?session={{.CurrentUser.Session}}" method = "post" > < / form >
< input form = "quick_post_form" name = "tid" value = '{{.Topic.ID}}' type = "hidden" / >
< input form = "quick_post_form" id = "has_poll_input" name = "has_poll" value = "0" type = "hidden" / >
2017-10-12 03:24:14 +00:00
< div class = "formrow real_first_child" >
< div class = "formitem" >
2018-06-24 13:49:29 +00:00
< textarea id = "input_content" form = "quick_post_form" name = "reply-content" placeholder = "{{lang " topic . reply_content " } } " required > < / textarea >
2018-02-03 05:47:14 +00:00
< / div >
< / div >
< div class = "formrow poll_content_row auto_hide" >
< div class = "formitem" >
< div class = "pollinput" data-pollinput = "0" >
< input type = "checkbox" disabled / >
< label class = "pollinputlabel" > < / label >
2018-06-24 13:49:29 +00:00
< input form = "quick_post_form" name = "pollinputitem[0]" class = "pollinputinput" type = "text" placeholder = "{{lang " topic . reply_add_poll_option " } } " / >
2018-02-03 05:47:14 +00:00
< / div >
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" >
2018-06-24 13:49:29 +00:00
< button form = "quick_post_form" name = "reply-button" class = "formbutton" > {{lang "topic.reply_button"}}< / button >
< button form = "quick_post_form" class = "formbutton" id = "add_poll_button" > {{lang "topic.reply_add_poll_button"}}< / button >
2017-10-12 03:24:14 +00:00
{{if .CurrentUser.Perms.UploadFiles}}
2018-02-03 05:47:14 +00:00
< input name = "upload_files" form = "quick_post_form" id = "upload_files" multiple type = "file" style = "display: none;" / >
2018-06-24 13:49:29 +00:00
< label for = "upload_files" class = "formbutton add_file_button" > {{lang "topic.reply_add_file_button"}}< / label >
2017-10-12 03:24:14 +00:00
< 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}}
2018-06-01 05:02:29 +00:00
{{end}}
2017-08-20 09:39:02 +00:00
< / main >
2017-06-28 12:05:26 +00:00
{{template "footer.html" . }}