loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove unnecessary ".Link" usages (#29929)

Follow #29909

(cherry picked from commit 91699a9bb1fc59029a2605912f1e380eff7297fa)

authored by

wxiaoguang and committed by
Earl Warren
4f8763c4 4061cb32

+15 -15
+1 -1
templates/admin/notice.tmpl
··· 49 49 </div> 50 50 </div> 51 51 </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}}"> 53 53 {{ctx.Locale.Tr "admin.notices.delete_selected"}} 54 54 </button> 55 55 </th>
+2 -2
templates/admin/stacktrace.tmpl
··· 4 4 <div class="gt-df gt-ac"> 5 5 <div class="gt-f1"> 6 6 <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> 9 9 </div> 10 10 </div> 11 11 <form target="_blank" action="{{AppSubUrl}}/admin/monitor/diagnosis" class="ui form">
+1 -1
templates/repo/wiki/new.tmpl
··· 9 9 <a class="ui tiny primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a> 10 10 {{end}} 11 11 </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"> 13 13 {{.CsrfTokenHtml}} 14 14 <div class="field {{if .Err_Title}}error{{end}}"> 15 15 <input name="title" value="{{.title}}" aria-label="{{ctx.Locale.Tr "repo.wiki.page_title"}}" placeholder="{{ctx.Locale.Tr "repo.wiki.page_title"}}" autofocus required>
+1 -1
templates/user/auth/reset_passwd.tmpl
··· 51 51 <div class="inline field"> 52 52 <button class="ui primary button">{{ctx.Locale.Tr "auth.reset_password_helper"}}</button> 53 53 {{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> 55 55 {{end}} 56 56 </div> 57 57 {{else}}
+8 -8
templates/user/dashboard/issues.tmpl
··· 5 5 <div class="flex-container"> 6 6 <div class="flex-container-nav"> 7 7 <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}}"> 9 9 {{ctx.Locale.Tr "home.issues.in_your_repos"}} 10 10 <strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong> 11 11 </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}}"> 13 13 {{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}} 14 14 <strong>{{CountFmt .IssueStats.AssignCount}}</strong> 15 15 </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}}"> 17 17 {{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}} 18 18 <strong>{{CountFmt .IssueStats.CreateCount}}</strong> 19 19 </a> 20 20 {{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}}"> 22 22 {{ctx.Locale.Tr "repo.issues.filter_type.review_requested"}} 23 23 <strong>{{CountFmt .IssueStats.ReviewRequestedCount}}</strong> 24 24 </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}}"> 26 26 {{ctx.Locale.Tr "repo.issues.filter_type.reviewed_by_you"}} 27 27 <strong>{{CountFmt .IssueStats.ReviewedCount}}</strong> 28 28 </a> 29 29 {{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}}"> 31 31 {{ctx.Locale.Tr "repo.issues.filter_type.mentioning_you"}} 32 32 <strong>{{CountFmt .IssueStats.MentionCount}}</strong> 33 33 </a> ··· 36 36 <div class="flex-container-main content"> 37 37 <div class="list-header"> 38 38 <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}}"> 40 40 {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 41 41 {{ctx.Locale.PrettyNumber .IssueStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}} 42 42 </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}}"> 44 44 {{svg "octicon-issue-closed" 16 "gt-mr-3"}} 45 45 {{ctx.Locale.PrettyNumber .IssueStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}} 46 46 </a>
+2 -2
templates/user/dashboard/milestones.tmpl
··· 36 36 <div class="flex-container-main content"> 37 37 <div class="list-header"> 38 38 <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}}"> 40 40 {{svg "octicon-milestone" 16 "gt-mr-3"}} 41 41 {{ctx.Locale.PrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}} 42 42 </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}}"> 44 44 {{svg "octicon-check" 16 "gt-mr-3"}} 45 45 {{ctx.Locale.PrettyNumber .MilestoneStats.ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}} 46 46 </a>