Add "Reference" section to Issue view sidebar (#19609)

* Add "Reference" section to Issue view sidebar

* Removed unneeded tailored CSS, added Fomantic UI classes

* Removed tailored CSS in favour of HTML-only approach

Kindly provided by @Gusted

* Added i18 translation key for reference link string

* Corrected spelling of "References:" to "Reference:" for reference link text

* Removed `Issue.ReferenceLink` in favour of a local template variable
tokarchuk/v1.17
neon 3 years ago committed by GitHub
parent b536b65189
commit 0483ee8f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      options/locale/locale_en-US.ini
  2. 9
      templates/repo/issue/view_content/sidebar.tmpl

@ -1480,6 +1480,7 @@ issues.content_history.created = created
issues.content_history.delete_from_history = Delete from history issues.content_history.delete_from_history = Delete from history
issues.content_history.delete_from_history_confirm = Delete from history? issues.content_history.delete_from_history_confirm = Delete from history?
issues.content_history.options = Options issues.content_history.options = Options
issues.reference_link = Reference: %s
compare.compare_base = base compare.compare_base = base
compare.compare_head = compare compare.compare_head = compare

@ -568,6 +568,15 @@
{{end}} {{end}}
{{end}} {{end}}
<div class="ui divider"></div>
<div class="ui equal width compact grid">
<div class="row ac">
{{$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>
{{if and .IsRepoAdmin (not .Repository.IsArchived)}} {{if and .IsRepoAdmin (not .Repository.IsArchived)}}
<div class="ui divider"></div> <div class="ui divider"></div>
<div class="ui watching"> <div class="ui watching">

Loading…
Cancel
Save