mirror of
https://github.com/go-gitea/gitea
synced 2025-07-28 21:28:38 +00:00
Make SVG size argument optional (#12814)
Now defaults to 16 on both frontend and backend. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
<div class="column">
|
||||
{{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock" 16}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
{{svg "octicon-calendar" 16}}
|
||||
{{svg "octicon-calendar"}}
|
||||
{{if .Milestone.DeadlineString}}
|
||||
<span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span>
|
||||
{{else}}
|
||||
@@ -42,11 +42,11 @@
|
||||
<div class="six wide column">
|
||||
<div class="ui tiny basic status buttons">
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
|
||||
{{svg "octicon-issue-opened" 16}}
|
||||
{{svg "octicon-issue-opened"}}
|
||||
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
|
||||
{{svg "octicon-issue-closed" 16}}
|
||||
{{svg "octicon-issue-closed"}}
|
||||
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
||||
</a>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@
|
||||
<span class="info">{{.i18n.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
|
||||
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
||||
{{range .Labels}}
|
||||
<a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash" 16}}{{else if contain $.SelLabelIDs .ID}}{{svg "octicon-check" 16}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}</a>
|
||||
<a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if contain $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,11 +120,11 @@
|
||||
<div class="six wide column">
|
||||
<div class="ui tiny basic status buttons">
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
|
||||
{{svg "octicon-issue-opened" 16}}
|
||||
{{svg "octicon-issue-opened"}}
|
||||
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
|
||||
{{svg "octicon-issue-closed" 16}}
|
||||
{{svg "octicon-issue-closed"}}
|
||||
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
||||
</a>
|
||||
</div>
|
||||
@@ -151,7 +151,7 @@
|
||||
<div class="menu">
|
||||
{{range .Labels}}
|
||||
<div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
|
||||
{{if contain $.SelLabelIDs .ID}}{{svg "octicon-check" 16}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}
|
||||
{{if contain $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -193,14 +193,14 @@
|
||||
{{if .IsPull}}
|
||||
{{if .PullRequest.HasMerged}}
|
||||
<div class="ui purple label">#{{.Index}}</div>
|
||||
<a class="ui purple text">{{svg "octicon-git-pull-request" 16}}</a>
|
||||
<a class="ui purple text">{{svg "octicon-git-pull-request"}}</a>
|
||||
{{else}}
|
||||
<div class="ui red label">#{{.Index}}</div>
|
||||
<a class="ui red text">{{svg "octicon-git-pull-request" 16}}</a>
|
||||
<a class="ui red text">{{svg "octicon-git-pull-request"}}</a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="ui red label">#{{.Index}}</div>
|
||||
<a class="ui red text">{{svg "octicon-issue-closed" 16}}</a>
|
||||
<a class="ui red text">{{svg "octicon-issue-closed"}}</a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .IsRead}}
|
||||
@@ -209,9 +209,9 @@
|
||||
<div class="ui green label">#{{.Index}}</div>
|
||||
{{end}}
|
||||
{{if .IsPull}}
|
||||
<a class="ui green text">{{svg "octicon-git-pull-request" 16}}</a>
|
||||
<a class="ui green text">{{svg "octicon-git-pull-request"}}</a>
|
||||
{{else}}
|
||||
<a class="ui green text">{{svg "octicon-issue-opened" 16}}</a>
|
||||
<a class="ui green text">{{svg "octicon-issue-opened"}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -228,11 +228,11 @@
|
||||
{{end}}
|
||||
|
||||
{{if .NumComments}}
|
||||
<span class="comment ui right">{{svg "octicon-comment" 16}} {{.NumComments}}</span>
|
||||
<span class="comment ui right">{{svg "octicon-comment"}} {{.NumComments}}</span>
|
||||
{{end}}
|
||||
|
||||
{{if .TotalTrackedTime}}
|
||||
<span class="comment ui right">{{svg "octicon-clock" 16}} {{.TotalTrackedTime | Sec2Time}}</span>
|
||||
<span class="comment ui right">{{svg "octicon-clock"}} {{.TotalTrackedTime | Sec2Time}}</span>
|
||||
{{end}}
|
||||
|
||||
<p class="desc">
|
||||
@@ -247,18 +247,18 @@
|
||||
|
||||
{{if .Ref}}
|
||||
<a class="ref" href="{{index $.IssueRefURLs .ID}}">
|
||||
{{svg "octicon-git-branch" 16}} {{index $.IssueRefEndNames .ID}}
|
||||
{{svg "octicon-git-branch"}} {{index $.IssueRefEndNames .ID}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{$tasks := .GetTasks}}
|
||||
{{if gt $tasks 0}}
|
||||
{{$tasksDone := .GetTasksDone}}
|
||||
<span class="checklist">
|
||||
{{svg "octicon-checklist" 16}} {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
|
||||
{{svg "octicon-checklist"}} {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
|
||||
</span>
|
||||
{{end}}
|
||||
{{if ne .DeadlineUnix 0}}
|
||||
{{svg "octicon-calendar" 16}}
|
||||
{{svg "octicon-calendar"}}
|
||||
<span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span>
|
||||
{{end}}
|
||||
{{range .Assignees}}
|
||||
@@ -271,25 +271,25 @@
|
||||
{{$rejectOfficial := call $approvalCounts .ID "reject"}}
|
||||
{{$waitingOfficial := call $approvalCounts .ID "waiting"}}
|
||||
{{if gt $approveOfficial 0}}
|
||||
<span class="approvals">{{svg "octicon-check" 16}}
|
||||
<span class="approvals">{{svg "octicon-check"}}
|
||||
{{$.i18n.Tr (TrN $.i18n.Lang $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n") $approveOfficial}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{if gt $rejectOfficial 0}}
|
||||
<span class="rejects">{{svg "octicon-diff" 16}}
|
||||
<span class="rejects">{{svg "octicon-diff"}}
|
||||
{{$.i18n.Tr (TrN $.i18n.Lang $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n") $rejectOfficial}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{if gt $waitingOfficial 0}}
|
||||
<span class="waiting">{{svg "octicon-eye" 16}}
|
||||
<span class="waiting">{{svg "octicon-eye"}}
|
||||
{{$.i18n.Tr (TrN $.i18n.Lang $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n") $waitingOfficial}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{if and (not .PullRequest.HasMerged) (gt (len .PullRequest.ConflictedFiles) 0)}}
|
||||
<span class="conflicting">{{svg "octicon-x" 16}} {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}</span>
|
||||
<span class="conflicting">{{svg "octicon-x"}} {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user