a5f5f4af7e
Added the PageStore. Renamed account_own_edit.html to account_own_edit_password.html Renamed custom-page.html to custom_page.html Renamed the pre_render_custom_page hook to pre_render_tmpl_page. Added a new pre_render_custom_page hook, not to be confused with the previous one. Renamed the pre_render_account_own_edit_critical hook to pre_render_account_own_edit_password. Moved the report forum ID into a constant. Renamed todaysReportCount to topicsTopicCountByForum and made it more generic. Renamed panel-menu.html to panel_menu.html Renamed panel-inner-menu.html to panel_inner_menu.html Removed an irrelevant editable_parent in a no results row. Fixed the profile page loading the wrong profile.css Fixed a bug where the last poster avatar would break on the forum page. Added the AddNotice method to *Header. Greatly simplified many of the page struct definitions. Added the ErrorPage page struct and refactored the error pages to use it. Added the BasePanelPage page struct and refactored the panel page structs to use it. Tweaked the DefaultHeader function to set the user on the spot rather than after the fact. Simplified AccountEditAvatarSubmit into a redirect. Add the addElement closure in the control panel dashboard to reduce the amount of complexity. Tweaked LogWarning to better handle nils. Added the account_username phrase. Added the account_avatar phrase. Added the account_email phrase. Added the panel_pages phrase. Added the panel_pages_edit phrase. Added the panel_page_created phrase. Added the panel_page_updated phrase. Added the panel_page_deleted phrase. Added the account_menu_security phrase. Added the panel_menu_pages phrase. Added the panel_pages_head phrase. Added the panel_pages_edit_button_aria phrase. Added the panel_pages_delete_button_aria phrase. Added the panel_pages_no_pages phrase. Added the panel_pages_create_head phrase. Added the panel_pages_create_name phrase. Added the panel_pages_create_name_placeholder phrase. Added the panel_pages_create_title phrase. Added the panel_pages_create_title_placeholder phrase. Added the panel_pages_create_body_placeholder phrase. Added the panel_pages_create_submit_button phrase. Added the panel_pages_edit_head phrase. Added the panel_pages_name phrase. Added the panel_pages_title phrase. Added the panel_pages_edit_update_button phrase. Began work on two-factor authentication. Made more progress with the Nox Theme.
121 lines
6.5 KiB
HTML
121 lines
6.5 KiB
HTML
{{template "header.html" . }}
|
|
|
|
{{if gt .Page 1}}<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="{{lang "paginator_prev_page_aria"}}" rel="prev" href="/forum/{{.Forum.ID}}?page={{subtract .Page 1}}">{{lang "paginator_less_than"}}</a></div>{{end}}
|
|
{{if ne .LastPage .Page}}<div id="nextFloat" class="next_button"><a class="next_link" aria-label="{{lang "paginator_next_page_aria"}}" rel="next" href="/forum/{{.Forum.ID}}?page={{add .Page 1}}">{{lang "paginator_greater_than"}}</a></div>{{end}}
|
|
|
|
<main id="forumItemList" itemscope itemtype="http://schema.org/ItemList">
|
|
<div id="forum_head_block" class="rowblock rowhead topic_list_title_block{{if ne .CurrentUser.ID 0}} has_opt{{end}}">
|
|
<div class="rowitem forum_title">
|
|
<h1 itemprop="name">{{.Title}}</h1>
|
|
</div>
|
|
{{if ne .CurrentUser.ID 0}}
|
|
<div class="optbox">
|
|
{{if .CurrentUser.Perms.CreateTopic}}
|
|
<div class="pre_opt auto_hide"></div>
|
|
<div class="opt create_topic_opt" title="{{lang "topic_list_create_topic_tooltip"}}" aria-label="{{lang "topic_list_create_topic_aria"}}"><a class="create_topic_link" href="/topics/create/{{.Forum.ID}}"></a></div>
|
|
{{/** TODO: Add a permissions check for this **/}}
|
|
<div class="opt mod_opt" title="{{lang "topic_list_moderate_tooltip"}}">
|
|
<a class="moderate_link" href="#" aria-label="{{lang "topic_list_moderate_aria"}}"></a>
|
|
</div>
|
|
{{else}}<div class="opt locked_opt" title="{{lang "forum_locked_tooltip"}}" aria-label="{{lang "forum_locked_aria"}}"><a></a></div>{{end}}
|
|
</div>
|
|
<div style="clear: both;"></div>
|
|
{{end}}
|
|
</div>
|
|
{{if ne .CurrentUser.ID 0}}
|
|
<div class="mod_floater auto_hide">
|
|
<form method="post">
|
|
<div class="mod_floater_head">
|
|
<span>{{lang "topic_list_what_to_do"}}</span>
|
|
</div>
|
|
<div class="mod_floater_body">
|
|
<select class="mod_floater_options">
|
|
<option val="delete">{{lang "topic_list_moderate_delete"}}</option>
|
|
<option val="lock">{{lang "topic_list_moderate_lock"}}</option>
|
|
<option val="move">{{lang "topic_list_moderate_move"}}</option>
|
|
</select>
|
|
<button>{{lang "topic_list_moderate_run"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{if .CurrentUser.Perms.CreateTopic}}
|
|
<div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form" style="display: none;" aria-label="{{lang "quick_topic_aria"}}">
|
|
<form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/" method="post"></form>
|
|
<img class="little_row_avatar" src="{{.CurrentUser.Avatar}}" height="64" alt="{{lang "quick_topic_avatar_alt"}}" title="{{lang "quick_topic_avatar_tooltip"}}" />
|
|
<input form="quick_post_form" id="topic_board_input" name="topic-board" value="{{.Forum.ID}}" type="hidden">
|
|
<div class="main_form">
|
|
<div class="topic_meta">
|
|
<div class="formrow topic_name_row real_first_child">
|
|
<div class="formitem">
|
|
<input form="quick_post_form" name="topic-name" placeholder="{{lang "quick_topic_whatsup"}}" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="formrow topic_content_row">
|
|
<div class="formitem">
|
|
<textarea form="quick_post_form" id="input_content" name="topic-content" placeholder="{{lang "quick_topic_content_placeholder"}}" required></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="formrow poll_content_row auto_hide">
|
|
<div class="formitem">
|
|
Poll stuff
|
|
</div>
|
|
</div>
|
|
<div class="formrow quick_button_row">
|
|
<div class="formitem">
|
|
<button form="quick_post_form" name="topic-button" class="formbutton">{{lang "quick_topic_create_topic_button"}}</button>
|
|
<button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "quick_topic_add_poll_button"}}</button>
|
|
{{if .CurrentUser.Perms.UploadFiles}}
|
|
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" />
|
|
<label for="upload_files" class="formbutton add_file_button">{{lang "quick_topic_add_file_button"}}</label>
|
|
<div id="upload_file_dock"></div>{{end}}
|
|
<button class="formbutton close_form">{{lang "quick_topic_cancel_button"}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
<div id="forum_topic_list" class="rowblock topic_list" aria-label="{{lang "forum_list_aria"}}">
|
|
{{range .ItemList}}<div class="topic_row" data-tid="{{.ID}}">
|
|
<div class="rowitem topic_left passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}">
|
|
<span class="selector"></span>
|
|
<a href="{{.Creator.Link}}"><img src="{{.Creator.Avatar}}" height="64" alt="{{.Creator.Name}}'s Avatar" title="{{.Creator.Name}}'s Avatar" /></a>
|
|
<span class="topic_inner_left">
|
|
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a>
|
|
<br /><a class="rowsmall starter" href="{{.Creator.Link}}" title="{{.Creator.Name}}">{{.Creator.Name}}</a>
|
|
{{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}}
|
|
{{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="{{lang "status_closed_tooltip"}}"> | 🔒︎</span>{{end}}
|
|
{{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky" title="{{lang "status_pinned_tooltip"}}"> | 📍︎</span>{{end}}
|
|
</span>
|
|
{{/** TODO: Phase this out of Cosora and remove it **/}}
|
|
<div class="topic_inner_right rowsmall">
|
|
<span class="replyCount">{{.PostCount}}</span><br />
|
|
<span class="likeCount">{{.LikeCount}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="topic_middle">
|
|
<div class="topic_inner_middle rowsmall">
|
|
<span class="replyCount">{{.PostCount}}</span><br />
|
|
<span class="likeCount">{{.LikeCount}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="rowitem topic_right passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}">
|
|
<div class="topic_right_inside">
|
|
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.Avatar}}" height="64" alt="{{.LastUser.Name}}'s Avatar" title="{{.LastUser.Name}}'s Avatar" /></a>
|
|
<span>
|
|
<a href="{{.LastUser.Link}}" class="lastName" style="font-size: 14px;" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
|
|
<span class="rowsmall lastReplyAt">{{.RelativeLastReplyAt}}</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>{{else}}<div class="rowitem passive rowmsg">{{lang "forum_no_topics"}}{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/{{.Forum.ID}}">{{lang "forum_start_one"}}</a>{{end}}</div>{{end}}
|
|
</div>
|
|
|
|
{{if gt .LastPage 1}}
|
|
{{template "paginator.html" . }}
|
|
{{end}}
|
|
|
|
</main>
|
|
{{template "footer.html" . }}
|