Enforce tab indentation in templates (#15289)
* Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>tokarchuk/v1.17
parent
0c77e0791c
commit
d848098f60
@ -1,7 +1,7 @@ |
|||||||
{{.Message}} |
{{.Message}} |
||||||
<details> |
<details> |
||||||
<summary>{{.Summary}}</summary> |
<summary>{{.Summary}}</summary> |
||||||
<code> |
<code> |
||||||
{{.Details | Str2html}} |
{{.Details | Str2html}} |
||||||
</code> |
</code> |
||||||
</details> |
</details> |
||||||
|
@ -1,30 +1,30 @@ |
|||||||
<div class="ui right floated secondary filter menu"> |
<div class="ui right floated secondary filter menu"> |
||||||
<!-- Sort --> |
<!-- Sort --> |
||||||
<div class="ui right dropdown type jump item"> |
<div class="ui right dropdown type jump item"> |
||||||
<span class="text"> |
<span class="text"> |
||||||
{{.i18n.Tr "repo.issues.filter_sort"}} |
{{.i18n.Tr "repo.issues.filter_sort"}} |
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
||||||
</span> |
</span> |
||||||
<div class="menu"> |
<div class="menu"> |
||||||
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a> |
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a> |
||||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a> |
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a> |
||||||
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> |
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> |
||||||
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> |
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> |
||||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a> |
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a> |
||||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a> |
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a> |
||||||
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a> |
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a> |
||||||
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a> |
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a> |
||||||
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a> |
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a> |
||||||
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a> |
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<form class="ui form ignore-dirty" style="max-width: 90%"> |
<form class="ui form ignore-dirty" style="max-width: 90%"> |
||||||
<input type="hidden" name="tab" value="{{$.TabName}}"> |
<input type="hidden" name="tab" value="{{$.TabName}}"> |
||||||
<input type="hidden" name="sort" value="{{$.SortType}}"> |
<input type="hidden" name="sort" value="{{$.SortType}}"> |
||||||
<div class="ui fluid action input"> |
<div class="ui fluid action input"> |
||||||
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> |
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> |
||||||
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> |
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> |
||||||
</div> |
</div> |
||||||
</form> |
</form> |
||||||
<div class="ui divider"></div> |
<div class="ui divider"></div> |
||||||
|
@ -1,4 +1,4 @@ |
|||||||
<div class="ui top attached tabular menu"> |
<div class="ui top attached tabular menu"> |
||||||
<a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> |
<a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> |
||||||
<a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a> |
<a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a> |
||||||
</div> |
</div> |
||||||
|
@ -1,42 +1,42 @@ |
|||||||
<div class="dropzone-attachments"> |
<div class="dropzone-attachments"> |
||||||
{{if .Attachments}} |
{{if .Attachments}} |
||||||
<div class="ui clearing divider"></div> |
<div class="ui clearing divider"></div> |
||||||
{{end}} |
{{end}} |
||||||
<div class="ui middle aligned padded grid"> |
<div class="ui middle aligned padded grid"> |
||||||
{{$hasThumbnails := false}} |
{{$hasThumbnails := false}} |
||||||
{{- range .Attachments -}} |
{{- range .Attachments -}} |
||||||
<div class="twelve wide column" style="padding: 6px;"> |
<div class="twelve wide column" style="padding: 6px;"> |
||||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
||||||
{{if FilenameIsImage .Name}} |
{{if FilenameIsImage .Name}} |
||||||
{{if not (containGeneric $.Content .UUID)}} |
{{if not (containGeneric $.Content .UUID)}} |
||||||
{{$hasThumbnails = true}} |
{{$hasThumbnails = true}} |
||||||
{{end}} |
{{end}} |
||||||
<span class="ui image">{{svg "octicon-file"}}</span> |
<span class="ui image">{{svg "octicon-file"}}</span> |
||||||
{{else}} |
{{else}} |
||||||
<span class="ui image">{{svg "octicon-desktop-download"}}</span> |
<span class="ui image">{{svg "octicon-desktop-download"}}</span> |
||||||
{{end}} |
{{end}} |
||||||
<span><strong>{{.Name}}</strong></span> |
<span><strong>{{.Name}}</strong></span> |
||||||
</a> |
</a> |
||||||
</div> |
</div> |
||||||
<div class="four wide column" style="padding: 0px;"> |
<div class="four wide column" style="padding: 0px;"> |
||||||
<span class="ui text grey right">{{.Size | FileSize}}</span> |
<span class="ui text grey right">{{.Size | FileSize}}</span> |
||||||
</div> |
</div> |
||||||
{{end -}} |
{{end -}} |
||||||
</div> |
</div> |
||||||
|
|
||||||
{{if $hasThumbnails}} |
{{if $hasThumbnails}} |
||||||
<div class="ui clearing divider"></div> |
<div class="ui clearing divider"></div> |
||||||
<div class="ui small images thumbnails"> |
<div class="ui small images thumbnails"> |
||||||
{{- range .Attachments -}} |
{{- range .Attachments -}} |
||||||
{{if FilenameIsImage .Name}} |
{{if FilenameIsImage .Name}} |
||||||
{{if not (containGeneric $.Content .UUID)}} |
{{if not (containGeneric $.Content .UUID)}} |
||||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
||||||
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
||||||
</a> |
</a> |
||||||
{{end}} |
{{end}} |
||||||
{{end}} |
{{end}} |
||||||
{{end -}} |
{{end -}} |
||||||
</div> |
</div> |
||||||
{{end}} |
{{end}} |
||||||
|
|
||||||
</div> |
</div> |
||||||
|
@ -1,32 +1,32 @@ |
|||||||
{{if $.LatestCommitStatus}} |
{{if $.LatestCommitStatus}} |
||||||
{{if not $.Issue.PullRequest.HasMerged}} |
{{if not $.Issue.PullRequest.HasMerged}} |
||||||
<div class="ui top attached header"> |
<div class="ui top attached header"> |
||||||
{{if eq .LatestCommitStatus.State "pending"}} |
{{if eq .LatestCommitStatus.State "pending"}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checking"}} |
{{$.i18n.Tr "repo.pulls.status_checking"}} |
||||||
{{else if eq .LatestCommitStatus.State "success"}} |
{{else if eq .LatestCommitStatus.State "success"}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checks_success"}} |
{{$.i18n.Tr "repo.pulls.status_checks_success"}} |
||||||
{{else if eq .LatestCommitStatus.State "warning"}} |
{{else if eq .LatestCommitStatus.State "warning"}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checks_warning"}} |
{{$.i18n.Tr "repo.pulls.status_checks_warning"}} |
||||||
{{else if eq .LatestCommitStatus.State "failure"}} |
{{else if eq .LatestCommitStatus.State "failure"}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checks_failure"}} |
{{$.i18n.Tr "repo.pulls.status_checks_failure"}} |
||||||
{{else if eq .LatestCommitStatus.State "error"}} |
{{else if eq .LatestCommitStatus.State "error"}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checks_error"}} |
{{$.i18n.Tr "repo.pulls.status_checks_error"}} |
||||||
{{else}} |
{{else}} |
||||||
{{$.i18n.Tr "repo.pulls.status_checking"}} |
{{$.i18n.Tr "repo.pulls.status_checking"}} |
||||||
{{end}} |
{{end}} |
||||||
</div> |
</div> |
||||||
{{end}} |
{{end}} |
||||||
|
|
||||||
{{range $.LatestCommitStatuses}} |
{{range $.LatestCommitStatuses}} |
||||||
<div class="ui attached segment"> |
<div class="ui attached segment"> |
||||||
<span>{{template "repo/commit_status" .}}</span> |
<span>{{template "repo/commit_status" .}}</span> |
||||||
<span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span> |
<span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span> |
||||||
<div class="ui right"> |
<div class="ui right"> |
||||||
{{if $.is_context_required}} |
{{if $.is_context_required}} |
||||||
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} |
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} |
||||||
{{end}} |
{{end}} |
||||||
<span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span> |
<span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
{{end}} |
{{end}} |
||||||
{{end}} |
{{end}} |
||||||
|
@ -1,134 +1,134 @@ |
|||||||
<div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}"> |
<div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}"> |
||||||
<div class="ui container"> |
<div class="ui container"> |
||||||
<h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1> |
<h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1> |
||||||
<div class="ui top attached tabular menu"> |
<div class="ui top attached tabular menu"> |
||||||
{{ $notificationUnreadCount := call .NotificationUnreadCount}} |
{{ $notificationUnreadCount := call .NotificationUnreadCount}} |
||||||
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item"> |
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item"> |
||||||
{{.i18n.Tr "notification.unread"}} |
{{.i18n.Tr "notification.unread"}} |
||||||
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div> |
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div> |
||||||
</a> |
</a> |
||||||
<a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item"> |
<a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item"> |
||||||
{{.i18n.Tr "notification.read"}} |
{{.i18n.Tr "notification.read"}} |
||||||
</a> |
</a> |
||||||
{{if and (eq .Status 1)}} |
{{if and (eq .Status 1)}} |
||||||
<form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;"> |
<form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;"> |
||||||
{{$.CsrfTokenHtml}} |
{{$.CsrfTokenHtml}} |
||||||
<div class="{{if not $notificationUnreadCount}}hide{{end}}"> |
<div class="{{if not $notificationUnreadCount}}hide{{end}}"> |
||||||
<button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'> |
<button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'> |
||||||
{{svg "octicon-checklist"}} |
{{svg "octicon-checklist"}} |
||||||
</button> |
</button> |
||||||
</div> |
</div> |
||||||
</form> |
</form> |
||||||
{{end}} |
{{end}} |
||||||
</div> |
</div> |
||||||
<div class="ui bottom attached active tab segment"> |
<div class="ui bottom attached active tab segment"> |
||||||
{{if eq (len .Notifications) 0}} |
{{if eq (len .Notifications) 0}} |
||||||
{{if eq .Status 1}} |
{{if eq .Status 1}} |
||||||
{{.i18n.Tr "notification.no_unread"}} |
{{.i18n.Tr "notification.no_unread"}} |
||||||
{{else}} |
{{else}} |
||||||
{{.i18n.Tr "notification.no_read"}} |
{{.i18n.Tr "notification.no_read"}} |
||||||
{{end}} |
{{end}} |
||||||
{{else}} |
{{else}} |
||||||
<table class="ui unstackable striped very compact small selectable table" id="notification_table"> |
<table class="ui unstackable striped very compact small selectable table" id="notification_table"> |
||||||
<tbody> |
<tbody> |
||||||
{{range $notification := .Notifications}} |
{{range $notification := .Notifications}} |
||||||
{{$issue := .Issue}} |
{{$issue := .Issue}} |
||||||
{{$repo := .Repository}} |
{{$repo := .Repository}} |
||||||
{{$repoOwner := $repo.MustOwner}} |
{{$repoOwner := $repo.MustOwner}} |
||||||
<tr id="notification_{{.ID}}"> |
<tr id="notification_{{.ID}}"> |
||||||
<td class="collapsing" data-href="{{.HTMLURL}}"> |
<td class="collapsing" data-href="{{.HTMLURL}}"> |
||||||
{{if eq .Status 3}} |
{{if eq .Status 3}} |
||||||
<span class="blue">{{svg "octicon-pin"}}</span> |
<span class="blue">{{svg "octicon-pin"}}</span> |
||||||
{{else if not $issue}} |
{{else if not $issue}} |
||||||
<span class="gray">{{svg "octicon-repo"}}</span> |
<span class="gray">{{svg "octicon-repo"}}</span> |
||||||
{{else if $issue.IsPull}} |
{{else if $issue.IsPull}} |
||||||
{{if $issue.IsClosed}} |
{{if $issue.IsClosed}} |
||||||
{{if $issue.GetPullRequest.HasMerged}} |
{{if $issue.GetPullRequest.HasMerged}} |
||||||
<span class="purple">{{svg "octicon-git-merge"}}</span> |
<span class="purple">{{svg "octicon-git-merge"}}</span> |
||||||
{{else}} |
{{else}} |
||||||
<span class="red">{{svg "octicon-git-pull-request"}}</span> |
<span class="red">{{svg "octicon-git-pull-request"}}</span> |
||||||
{{end}} |
{{end}} |
||||||
{{else}} |
{{else}} |
||||||
<span class="green">{{svg "octicon-git-pull-request"}}</span> |
<span class="green">{{svg "octicon-git-pull-request"}}</span> |
||||||
{{end}} |
{{end}} |
||||||
{{else}} |
{{else}} |
||||||
{{if $issue.IsClosed}} |
{{if $issue.IsClosed}} |
||||||
<span class="red">{{svg "octicon-issue-closed"}}</span> |
<span class="red">{{svg "octicon-issue-closed"}}</span> |
||||||
{{else}} |
{{else}} |
||||||
<span class="green">{{svg "octicon-issue-opened"}}</span> |
<span class="green">{{svg "octicon-issue-opened"}}</span> |
||||||
{{end}} |
{{end}} |
||||||
{{end}} |
{{end}} |
||||||
</td> |
</td> |
||||||
<td class="eleven wide" data-href="{{.HTMLURL}}"> |
<td class="eleven wide" data-href="{{.HTMLURL}}"> |
||||||
<a class="item" href="{{.HTMLURL}}"> |
<a class="item" href="{{.HTMLURL}}"> |
||||||
{{if $issue}} |
{{if $issue}} |
||||||
#{{$issue.Index}} - {{$issue.Title}} |
#{{$issue.Index}} - {{$issue.Title}} |
||||||
{{else}} |
{{else}} |
||||||
{{$repo.FullName}} |
{{$repo.FullName}} |
||||||
{{end}} |
{{end}} |
||||||
</a> |
</a> |
||||||
</td> |
</td> |
||||||
<td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> |
<td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> |
||||||
<a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> |
<a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> |
||||||
{{$repoOwner.Name}}/{{$repo.Name}} |
{{$repoOwner.Name}}/{{$repo.Name}} |
||||||
</a> |
</a> |
||||||
</td> |
</td> |
||||||
<td class="collapsing"> |
<td class="collapsing"> |
||||||
{{if ne .Status 3}} |
{{if ne .Status 3}} |
||||||
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
||||||
{{$.CsrfTokenHtml}} |
{{$.CsrfTokenHtml}} |
||||||
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
||||||
<input type="hidden" name="status" value="pinned" /> |
<input type="hidden" name="status" value="pinned" /> |
||||||
<button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}' |
<button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}' |
||||||
data-url="{{AppSubUrl}}/notifications/status" |
data-url="{{AppSubUrl}}/notifications/status" |
||||||
data-status="pinned" |
data-status="pinned" |
||||||
data-page="{{$.Page.Paginater.Current}}" |
data-page="{{$.Page.Paginater.Current}}" |
||||||
data-notification-id="{{.ID}}" |
data-notification-id="{{.ID}}" |
||||||
data-q="{{$.Keyword}}"> |
data-q="{{$.Keyword}}"> |
||||||
{{svg "octicon-pin"}} |
{{svg "octicon-pin"}} |
||||||
</button> |
</button> |
||||||
</form> |
</form> |
||||||
{{end}} |
{{end}} |
||||||
</td> |
</td> |
||||||
<td class="collapsing"> |
<td class="collapsing"> |
||||||
{{if or (eq .Status 1) (eq .Status 3)}} |
{{if or (eq .Status 1) (eq .Status 3)}} |
||||||
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
||||||
{{$.CsrfTokenHtml}} |
{{$.CsrfTokenHtml}} |
||||||
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
||||||
<input type="hidden" name="status" value="read" /> |
<input type="hidden" name="status" value="read" /> |
||||||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> |
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> |
||||||
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}' |
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}' |
||||||
data-url="{{AppSubUrl}}/notifications/status" |
data-url="{{AppSubUrl}}/notifications/status" |
||||||
data-status="read" |
data-status="read" |
||||||
data-page="{{$.Page.Paginater.Current}}" |
data-page="{{$.Page.Paginater.Current}}" |
||||||
data-notification-id="{{.ID}}" |
data-notification-id="{{.ID}}" |
||||||
data-q="{{$.Keyword}}"> |
data-q="{{$.Keyword}}"> |
||||||
{{svg "octicon-check"}} |
{{svg "octicon-check"}} |
||||||
</button> |
</button> |
||||||
</form> |
</form> |
||||||
{{else if eq .Status 2}} |
{{else if eq .Status 2}} |
||||||
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
<form action="{{AppSubUrl}}/notifications/status" method="POST"> |
||||||
{{$.CsrfTokenHtml}} |
{{$.CsrfTokenHtml}} |
||||||
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
<input type="hidden" name="notification_id" value="{{.ID}}" /> |
||||||
<input type="hidden" name="status" value="unread" /> |
<input type="hidden" name="status" value="unread" /> |
||||||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> |
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> |
||||||
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}' |
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}' |
||||||
data-url="{{AppSubUrl}}/notifications/status" |
data-url="{{AppSubUrl}}/notifications/status" |
||||||
data-status="unread" |
data-status="unread" |
||||||
data-page="{{$.Page.Paginater.Current}}" |
data-page="{{$.Page.Paginater.Current}}" |
||||||
data-notification-id="{{.ID}}" |
data-notification-id="{{.ID}}" |
||||||
data-q="{{$.Keyword}}"> |
data-q="{{$.Keyword}}"> |
||||||
{{svg "octicon-bell"}} |
{{svg "octicon-bell"}} |
||||||
</button> |
</button> |
||||||
</form> |
</form> |
||||||
{{end}} |
{{end}} |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
{{end}} |
{{end}} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
{{end}} |
{{end}} |
||||||
</div> |
</div> |
||||||
{{template "base/paginate" .}} |
{{template "base/paginate" .}} |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue