File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 75
75
{{end}}
76
76
</tbody>
77
77
</table>
78
+ <div class="code-line-menu tippy-target">
79
+ {{if $.Permission.CanRead $.UnitTypeIssues}}
80
+ <a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
81
+ {{end}}
82
+ <a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
83
+ </div>
78
84
</div>
79
85
</div>
80
86
</div>
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ function showLineButton() {
102
102
}
103
103
104
104
// find active row and add button
105
- const tr = document . querySelector ( '.code-view tr.active .lines-code' ) . closest ( 'tr ') ;
106
- const td = tr . querySelector ( 'td' ) ;
105
+ const tr = document . querySelector ( '.code-view tr.active' ) ;
106
+ const td = tr . querySelector ( 'td.lines-num ' ) ;
107
107
const btn = document . createElement ( 'button' ) ;
108
108
btn . classList . add ( 'code-line-button' , 'ui' , 'basic' , 'button' ) ;
109
109
btn . innerHTML = svg ( 'octicon-kebab-horizontal' ) ;
@@ -148,10 +148,7 @@ export function initRepoCodeView() {
148
148
document . selection . empty ( ) ;
149
149
}
150
150
151
- // show code view menu marker (don't show in blame page)
152
- if ( ! isBlame ( ) ) {
153
- showLineButton ( ) ;
154
- }
151
+ showLineButton ( ) ;
155
152
} ) ;
156
153
157
154
$ ( window ) . on ( 'hashchange' , ( ) => {
You can’t perform that action at this time.
0 commit comments