Skip to content

Commit 91699a9

Browse files
authored
Remove unnecessary ".Link" usages (#29929)
Follow #29909
1 parent 4c476fa commit 91699a9

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

templates/admin/notice.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</div>
5050
</div>
5151
</div>
52-
<button class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Paginater.Current}}">
52+
<button class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="?page={{.Page.Paginater.Current}}">
5353
{{ctx.Locale.Tr "admin.notices.delete_selected"}}
5454
</button>
5555
</th>

templates/admin/stacktrace.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<div class="gt-df gt-ac">
55
<div class="gt-f1">
66
<div class="ui compact small menu">
7-
<a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="{{.Link}}?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a>
8-
<a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="{{.Link}}?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a>
7+
<a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a>
8+
<a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a>
99
</div>
1010
</div>
1111
<form target="_blank" action="{{AppSubUrl}}/admin/monitor/diagnosis" class="ui form">

templates/repo/wiki/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<a class="ui tiny primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
1010
{{end}}
1111
</div>
12-
<form class="ui form" action="{{.Link}}?action={{if .PageIsWikiEdit}}_edit{{else}}_new{{end}}" method="post">
12+
<form class="ui form" action="?action={{if .PageIsWikiEdit}}_edit{{else}}_new{{end}}" method="post">
1313
{{.CsrfTokenHtml}}
1414
<div class="field {{if .Err_Title}}error{{end}}">
1515
<input name="title" value="{{.title}}" aria-label="{{ctx.Locale.Tr "repo.wiki.page_title"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.page_title"}}" autofocus required>

templates/user/auth/reset_passwd.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<div class="inline field">
5252
<button class="ui primary button">{{ctx.Locale.Tr "auth.reset_password_helper"}}</button>
5353
{{if and .has_two_factor (not .scratch_code)}}
54-
<a href="{{.Link}}?code={{.Code}}&amp;scratch_code=true">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a>
54+
<a href="?code={{.Code}}&scratch_code=true">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a>
5555
{{end}}
5656
</div>
5757
{{else}}

templates/user/dashboard/issues.tmpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
<div class="flex-container">
66
<div class="flex-container-nav">
77
<div class="ui secondary vertical filter menu tw-bg-transparent">
8-
<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
8+
<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
99
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
1010
<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
1111
</a>
12-
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{.Link}}?type=assigned&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
12+
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="?type=assigned&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
1313
{{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}}
1414
<strong>{{CountFmt .IssueStats.AssignCount}}</strong>
1515
</a>
16-
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{.Link}}?type=created_by&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
16+
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="?type=created_by&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
1717
{{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}}
1818
<strong>{{CountFmt .IssueStats.CreateCount}}</strong>
1919
</a>
2020
{{if .PageIsPulls}}
21-
<a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="{{.Link}}?type=review_requested&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
21+
<a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="?type=review_requested&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
2222
{{ctx.Locale.Tr "repo.issues.filter_type.review_requested"}}
2323
<strong>{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
2424
</a>
25-
<a class="{{if eq .ViewType "reviewed_by"}}active{{end}} item" href="{{.Link}}?type=reviewed_by&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
25+
<a class="{{if eq .ViewType "reviewed_by"}}active{{end}} item" href="?type=reviewed_by&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
2626
{{ctx.Locale.Tr "repo.issues.filter_type.reviewed_by_you"}}
2727
<strong>{{CountFmt .IssueStats.ReviewedCount}}</strong>
2828
</a>
2929
{{end}}
30-
<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{.Link}}?type=mentioned&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
30+
<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="?type=mentioned&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
3131
{{ctx.Locale.Tr "repo.issues.filter_type.mentioning_you"}}
3232
<strong>{{CountFmt .IssueStats.MentionCount}}</strong>
3333
</a>
@@ -36,11 +36,11 @@
3636
<div class="flex-container-main content">
3737
<div class="list-header">
3838
<div class="small-menu-items ui compact tiny menu list-header-toggle">
39-
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
39+
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?type={{$.ViewType}}&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
4040
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
4141
{{ctx.Locale.PrettyNumber .IssueStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
4242
</a>
43-
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
43+
<a class="item{{if .IsShowClosed}} active{{end}}" href="?type={{$.ViewType}}&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
4444
{{svg "octicon-issue-closed" 16 "gt-mr-3"}}
4545
{{ctx.Locale.PrettyNumber .IssueStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
4646
</a>

templates/user/dashboard/milestones.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
<div class="flex-container-main content">
3737
<div class="list-header">
3838
<div class="small-menu-items ui compact tiny menu list-header-toggle">
39-
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
39+
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
4040
{{svg "octicon-milestone" 16 "gt-mr-3"}}
4141
{{ctx.Locale.PrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
4242
</a>
43-
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
43+
<a class="item{{if .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
4444
{{svg "octicon-check" 16 "gt-mr-3"}}
4545
{{ctx.Locale.PrettyNumber .MilestoneStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
4646
</a>

0 commit comments

Comments
 (0)