Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Center-aligning content of WebAuthN page #21127

Merged
merged 11 commits into from
Sep 9, 2022
Prev Previous commit
Next Next commit
Removed Issue.ReferenceLink in favour of a local template variable
  • Loading branch information
neonn committed May 5, 2022
commit c3f7c4c0467e4f29d447128a5983c14963955afa
4 changes: 0 additions & 4 deletions models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,6 @@ func (issue *Issue) PatchURL() string {
return ""
}

func (issue *Issue) ReferenceLink() string {
return fmt.Sprintf("%s#%d", issue.Repo.FullName(), issue.Index)
}

// State returns string representation of issue status.
func (issue *Issue) State() api.StateType {
if issue.IsClosed {
Expand Down
5 changes: 3 additions & 2 deletions templates/repo/issue/view_content/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,9 @@
<div class="ui divider"></div>
<div class="ui equal width compact grid">
<div class="row ac">
<span class="text column truncate">{{.i18n.Tr "repo.issues.reference_link" .Issue.ReferenceLink}}</span>
<button class="ui two wide button column p-3" data-clipboard-text="{{.Issue.ReferenceLink}}">{{svg "octicon-copy" 14}}</button>
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
<span class="text column truncate">{{.i18n.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
<button class="ui two wide button column p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
</div>
</div>

Expand Down