summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorRoger Luo <rogerluo410@gmail.com>2021-03-18 10:02:38 +0800
committerGitHub <noreply@github.com>2021-03-17 22:02:38 -0400
commit119d2cb6e4abb4da90f0da6c908d52e4c26a49a4 (patch)
treeaeb2cc30190edc0345315c821ca0f9c082eeb47f /templates/repo/view_file.tmpl
parent03e99f847c357264597132006c9cf585626c36d8 (diff)
downloadgitea-119d2cb6e4abb4da90f0da6c908d52e4c26a49a4.tar.gz
gitea-119d2cb6e4abb4da90f0da6c908d52e4c26a49a4.zip
Create new issue from code (#14863)
* Feat: add reference in new issue with permalink menu for code view. * Fix: recover index.js file. * Add comments and redo ci. * Fix code convention * Fix code. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 15a8a589f1..9beddfb912 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -111,6 +111,15 @@
{{end}}
</tbody>
</table>
+ <div class="code-view-menu-list ui fluid popup transition hidden">
+ <div class="ui column relaxed equal height">
+ <div class="column">
+ <div class="ui link list">
+ <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{URLJoin AppUrl .RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.issues.context.reference_issue"}}</a>
+ </div>
+ </div>
+ </div>
+ </div>
{{end}}
{{end}}
</div>