diff options
author | neon <78957398+neonn@users.noreply.github.com> | 2022-05-05 18:58:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 20:58:37 +0200 |
commit | 0483ee8f69ef91ac3c2a710d43abb31a461ae30a (patch) | |
tree | 6126c3132e0c31a775ef080170ed69a8162ae9ad /templates/repo | |
parent | b536b65189319544939da9b6537919a4fc838d71 (diff) | |
download | gitea-0483ee8f69ef91ac3c2a710d43abb31a461ae30a.tar.gz gitea-0483ee8f69ef91ac3c2a710d43abb31a461ae30a.zip |
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
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 9e9bc670a0..ffc46bfede 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -568,6 +568,15 @@ {{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)}} <div class="ui divider"></div> <div class="ui watching"> |