0e5d0e649e
You can now see which forum the topics are in on the topic list. Relative times are now calculated in real-time rather than once at start-up. I'm not sure how it ended up like that. Fixed an issue with the lastReplyAt field not being populated for topics. We now have relative times for weeks and months.
16 lines
1.7 KiB
HTML
16 lines
1.7 KiB
HTML
{{template "header.html" . }}
|
|
{{if gt .Page 1}}<div id="prevFloat" class="prev_button"><a class="prev_link" href="/forum/{{.Forum.ID}}?page={{subtract .Page 1}}"><</a></div>{{end}}
|
|
{{if ne .LastPage .Page}}<link rel="prerender" href="/forum/{{.Forum.ID}}?page={{add .Page 1}}" />
|
|
<div id="nextFloat" class="next_button"><a class="next_link" href="/forum/{{.Forum.ID}}?page={{add .Page 1}}">></a></div>{{end}}
|
|
<div class="rowblock">
|
|
<div class="rowitem rowhead"><a>{{.Title}}</a>
|
|
{{if ne .CurrentUser.ID 0}}{{if not .CurrentUser.Perms.CreateTopic}}<span class='username' title='No Permissions' style="font-weight:normal;float: right;position:relative;top:-5px;">🔒︎</span>{{else}}<a href="/topics/create/{{.Forum.ID}}" class='username' style="float: right;position:relative;top:-5px;">New Topic</a>{{end}}{{end}}</div>
|
|
</div>
|
|
<div class="rowblock">
|
|
{{range .ItemList}}<div class="rowitem passive" style="{{if .Avatar}}background-image: url({{.Avatar}});background-position: left;background-repeat: no-repeat;background-size: 64px;padding-left: 72px;{{end}}{{if .Sticky}}background-color: #FFFFCC;{{else if .Is_Closed}}background-color: #eaeaea;{{end}}">
|
|
<a href="/topic/{{.ID}}">{{.Title}}</a> {{if .Is_Closed}}<span class="username topic_status_e topic_status_closed" title="Status: Closed" style="float: right;position:relative;top:-5px;margin-left:8px;">🔒︎</span>{{end}}
|
|
<a style="float: right;font-size:12px;">{{.LastReplyAt}}</a>
|
|
</div>
|
|
{{else}}<div class="rowitem passive">There aren't any topics in this forum yet.{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/{{.Forum.ID}}">Start one?</a>{{end}}</div>{{end}}
|
|
</div>
|
|
{{template "footer.html" . }} |