diff options
author | Roger Luo <rogerluo410@gmail.com> | 2021-03-18 10:02:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 22:02:38 -0400 |
commit | 119d2cb6e4abb4da90f0da6c908d52e4c26a49a4 (patch) | |
tree | aeb2cc30190edc0345315c821ca0f9c082eeb47f /templates | |
parent | 03e99f847c357264597132006c9cf585626c36d8 (diff) | |
download | gitea-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')
-rw-r--r-- | templates/repo/issue/comment_tab.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/view_file.tmpl | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl index d24f7a22ad..28a9b24edc 100644 --- a/templates/repo/issue/comment_tab.tmpl +++ b/templates/repo/issue/comment_tab.tmpl @@ -4,8 +4,9 @@ </div> <div class="field"> <div class="ui bottom active tab" data-tab="write"> - <textarea id="content" class="edit_area js-quick-submit" name="content" tabindex="4" data-id="issue-{{.RepoName}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.Repo.RepoLink}}"> -{{if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end}}</textarea> + <textarea id="content" class="edit_area js-quick-submit" name="content" tabindex="4" data-id="issue-{{.RepoName}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.Repo.RepoLink}}"> + {{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}} + </textarea> </div> <div class="ui bottom tab markdown" data-tab="preview"> {{.i18n.Tr "loading"}} 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> |