From 56a89296050096df29d0a653019c194631cc6562 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Thu, 21 Jan 2021 14:51:17 +0100 Subject: [PATCH] Comment - Reference in new issue (#14366) * Implemented "Reference in new issue" * Fixed menu style on "pulls/x/files" because "button" has a style. * Added context menu for PR file comments. * Use only a single modal for every comment. * Use current repository as default. Added search filter. * Added suggested changes. * Fixed assignment. Co-authored-by: Andrew Thornton Co-authored-by: 6543 <6543@obermui.de> --- options/locale/locale_en-US.ini | 2 + templates/repo/diff/box.tmpl | 2 + templates/repo/issue/view_content.tmpl | 4 +- .../repo/issue/view_content/context_menu.tmpl | 13 +++-- .../view_content/reference_issue_dialog.tmpl | 30 ++++++++++++ web_src/js/index.js | 47 +++++++++++++++++++ 6 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 templates/repo/issue/view_content/reference_issue_dialog.tmpl diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 142f3049f..c950591d7 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1068,6 +1068,7 @@ issues.commented_at = `commented %s` issues.delete_comment_confirm = Are you sure you want to delete this comment? issues.context.copy_link = Copy Link issues.context.quote_reply = Quote Reply +issues.context.reference_issue = Reference in new issue issues.context.edit = Edit issues.context.delete = Delete issues.no_content = There is no content yet. @@ -1225,6 +1226,7 @@ issues.review.resolve_conversation = Resolve conversation issues.review.un_resolve_conversation = Unresolve conversation issues.review.resolved_by = marked this conversation as resolved issues.assignee.error = Not all assignees was added due to an unexpected error. +issues.reference_issue.body = Body pulls.desc = Enable pull requests and code reviews. pulls.new = New Pull Request diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 8533f9b91..f01795ad1 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -164,6 +164,8 @@ {{end}} + {{template "repo/issue/view_content/reference_issue_dialog" .}} + {{if .IsSplitStyle}}