mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-17 10:56:24 -07:00
Replace no longer needed isOP template function with IsTopPost property
This commit is contained in:
parent
b16fdc81b8
commit
1c9858ceab
2 changed files with 7 additions and 7 deletions
|
@ -39,7 +39,7 @@
|
|||
{{- if ne .Email ""}}</a>{{end -}}
|
||||
</span>
|
||||
{{- if ne .Tripcode ""}}<span class="tripcode">!{{.Tripcode}}</span>{{end}} {{formatTimestamp .Timestamp}}</label>
|
||||
<a href="{{$.webroot}}{{.GetBoardDir}}/res/{{if isOP .}}{{.ID}}{{else}}{{.ParentID}}{{end}}.html#{{.ID}}" target="_blank">No. {{.ID}}</a><br/>
|
||||
<a href="{{$.webroot}}{{.GetBoardDir}}/res/{{if .IsTopPost}}{{.ID}}{{else}}{{.ParentID}}{{end}}.html#{{.ID}}" target="_blank">No. {{.ID}}</a><br/>
|
||||
{{- if eq .Filename "deleted" -}}
|
||||
<div class="file-deleted-box" style="text-align:center;">File removed</div>
|
||||
{{- else if ne .Filename "" -}}
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
{{- end -}}
|
||||
{{- if ne .post.Email ""}}</a>{{end}}</span>
|
||||
{{- if ne .post.Tripcode ""}}<span class="tripcode">!{{.post.Tripcode}}</span>{{end}} {{formatTimestamp .post.Timestamp -}}
|
||||
</label><a href="{{$.global.webroot}}{{.board.Dir}}/res/{{if isOP $.post}}{{$.post.ID}}{{else}}{{$.post.ParentID}}{{end}}.html#{{.post.ID}}">No.</a> <a href="javascript:quote({{.post.ID}})" class="backlink-click">{{.post.ID}}</a> <span class="post-links"></span>
|
||||
</label><a href="{{$.global.webroot}}{{.board.Dir}}/res/{{if $.post.IsTopPost}}{{$.post.ID}}{{else}}{{$.post.ParentID}}{{end}}.html#{{.post.ID}}">No.</a> <a href="javascript:quote({{.post.ID}})" class="backlink-click">{{.post.ID}}</a> <span class="post-links"></span>
|
||||
{{if $.is_board_page}}
|
||||
[<a href="{{$.global.webroot}}{{$.board.Dir}}/res/{{$.post.ID}}.html">View</a>]
|
||||
{{end}}<br />
|
||||
{{- end -}}
|
||||
{{- if isOP $.post -}}
|
||||
{{- if $.post.IsTopPost -}}
|
||||
<div class="op-post post" id="op{{$.post.ID}}">
|
||||
{{- else -}}
|
||||
<div id="replycontainer{{.post.ID}}" class="reply-container">
|
||||
<div class="reply" id="reply{{.post.ID}}">
|
||||
<a class="anchor" id="{{$.post.ID}}"></a>
|
||||
{{- end -}}
|
||||
{{if not (isOP $.post)}}{{template "nameline" .}}{{end -}}
|
||||
{{if not $.post.IsTopPost}}{{template "nameline" .}}{{end -}}
|
||||
|
||||
{{- if eq $.post.Filename "deleted" -}}
|
||||
<div class="file-deleted-box" style="text-align:center;">File removed</div>
|
||||
|
@ -34,7 +34,7 @@
|
|||
{{- template "uploadinfo" . -}}
|
||||
<a class="upload-container" href="{{.global.webroot}}{{.board.Dir}}/src/{{.post.Filename}}"><img src="{{.global.webroot}}{{.board.Dir}}/thumb/{{getThreadThumbnail .post.Filename}}" alt="{{$.global.webroot}}{{$.board.Dir}}/src/{{.post.Filename}}" width="{{.post.ThumbW}}" height="{{.post.ThumbH}}" class="upload" /></a>
|
||||
{{- end -}}
|
||||
{{- if isOP $.post}}{{template "nameline" .}}{{end -}}
|
||||
{{- if $.post.IsTopPost}}{{template "nameline" .}}{{end -}}
|
||||
<div class="post-text">{{.post.MessageHTML}}</div>
|
||||
</div>{{if not (isOP $.post)}}
|
||||
{{if not (isOP $.post)}}</div>{{end}}{{end}}
|
||||
</div>{{if not $.post.IsTopPost}}
|
||||
{{if not $.post.IsTopPost}}</div>{{end}}{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue