3821e626ce
Add support for phrases in template files. Revamped every template to make them use phrases. Revamped every CSS file to make them use phrases. Tweaked the contributing document. We now use LogError instead of log.Fatal() in a few places to capture more stack traces. Fixed the suffixes on the topic and post count pages, as they were saying views instead of posts / topics. Split the paginator into it's own template. Refactored the theme logic to defer loading the static files to a later stage. Greatly improved the accessibility with a number of ARIA attributes in places where there were none. Removed the edit-topic and page templates. Renamed the panel-adminlogs template to panel_adminlogs. Non-existent phrases used by transpiled templates should now be logged. Fixed a bug where alertbox was plopped down multiple times on one page. The phrase placeholders are more informative now. Added the CurrentLanguagePackName and GetLanguagePackByName API functions. Notices are now shown when you delete, update, or create a forum.
44 lines
3.1 KiB
HTML
44 lines
3.1 KiB
HTML
{{/** TODO: Temporary hack until we find a more granular way of doing this. Perhaps, a custom include function? **/}}
|
|
{{if .Header.Theme.BgAvatars}}
|
|
{{range .ItemList}}
|
|
<div class="rowitem passive deletable_block editable_parent simple {{.ClassName}}" style="background-image: url({{.Avatar}}), url(/static/post-avatar-bg.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;">
|
|
<span class="editable_block user_content simple">{{.ContentHtml}}</span>
|
|
<span class="controls">
|
|
<a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>
|
|
|
|
{{if $.CurrentUser.IsMod}}<a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_edit_tooltip"}}" aria-label="{{lang "profile_comments_edit_aria"}}"><button class="username edit_item edit_label"></button></a>
|
|
|
|
<a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_delete_tooltip"}}" aria-label="{{lang "profile_comments_delete_aria"}}"><button class="username delete_item trash_label"></button></a>{{end}}
|
|
|
|
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label" title="{{lang "profile_comments_report_tooltip"}}" aria-label="{{lang "profile_comments_report_aria"}}"></button></a>
|
|
|
|
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}}
|
|
</span>
|
|
</div>
|
|
{{end}}
|
|
{{else}}
|
|
{{range .ItemList}}
|
|
<div class="rowitem passive deletable_block editable_parent comment {{.ClassName}}">
|
|
<div class="topRow">
|
|
<div class="userbit">
|
|
<img src="{{.Avatar}}" alt="{{.CreatedByName}}'s Avatar" title="{{.CreatedByName}}'s Avatar" />
|
|
<span class="nameAndTitle">
|
|
<a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>
|
|
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}}
|
|
</span>
|
|
</div>
|
|
<span class="controls">
|
|
{{if $.CurrentUser.IsMod}}
|
|
<a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_edit_tooltip"}}" aria-label="{{lang "profile_comments_edit_aria"}}"><button class="username edit_item edit_label"></button></a>
|
|
<a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_delete_tooltip"}}" aria-label="{{lang "profile_comments_delete_aria"}}"><button class="username delete_item trash_label"></button></a>
|
|
{{end}}
|
|
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label" title="{{lang "profile_comments_report_tooltip"}}" aria-label="{{lang "profile_comments_report_aria"}}"></button></a>
|
|
</span>
|
|
</div>
|
|
<div class="content_column">
|
|
<span class="editable_block user_content">{{.ContentHtml}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="after_comment"></div>
|
|
{{end}}
|
|
{{end}} |