Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1b998a4a
Commit
1b998a4a
authored
May 23, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added parent row link to files table
parent
c0ea4164
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
+46
-0
app/assets/javascripts/repository/components/table/index.vue
app/assets/javascripts/repository/components/table/index.vue
+6
-0
app/assets/javascripts/repository/components/table/parent_row.vue
...ts/javascripts/repository/components/table/parent_row.vue
+37
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/javascripts/repository/components/table/index.vue
View file @
1b998a4a
...
...
@@ -7,6 +7,7 @@ import getFiles from '../../queries/getFiles.graphql';
import
getProjectPath
from
'
../../queries/getProjectPath.graphql
'
;
import
TableHeader
from
'
./header.vue
'
;
import
TableRow
from
'
./row.vue
'
;
import
ParentRow
from
'
./parent_row.vue
'
;
const
PAGE_SIZE
=
100
;
...
...
@@ -15,6 +16,7 @@ export default {
GlLoadingIcon
,
TableHeader
,
TableRow
,
ParentRow
,
},
mixins
:
[
getRefMixin
],
apollo
:
{
...
...
@@ -47,6 +49,9 @@ export default {
{
path
:
this
.
path
,
ref
:
this
.
ref
},
);
},
showParentRow
()
{
return
!
this
.
isLoadingFiles
&&
this
.
path
!==
''
;
},
},
watch
:
{
$route
:
function
routeChange
()
{
...
...
@@ -120,6 +125,7 @@ export default {
</caption>
<table-header
v-once
/>
<tbody>
<parent-row
v-show=
"showParentRow"
:commit-ref=
"ref"
:path=
"path"
/>
<template
v-for=
"val in entries"
>
<table-row
v-for=
"entry in val"
...
...
app/assets/javascripts/repository/components/table/parent_row.vue
0 → 100644
View file @
1b998a4a
<
script
>
export
default
{
props
:
{
commitRef
:
{
type
:
String
,
required
:
true
,
},
path
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
parentRoute
()
{
const
splitArray
=
this
.
path
.
split
(
'
/
'
);
splitArray
.
pop
();
return
{
path
:
`/tree/
${
this
.
commitRef
}
/
${
splitArray
.
join
(
'
/
'
)}
`
};
},
},
methods
:
{
clickRow
()
{
this
.
$router
.
push
(
this
.
parentRoute
);
},
},
};
</
script
>
<
template
>
<tr
v-once
@
click=
"clickRow"
>
<td
colspan=
"3"
class=
"tree-item-file-name"
>
<router-link
:to=
"parentRoute"
:aria-label=
"__('Go to parent')"
>
..
</router-link>
</td>
</tr>
</
template
>
locale/gitlab.pot
View file @
1b998a4a
...
...
@@ -4647,6 +4647,9 @@ msgstr ""
msgid "Go to %{link_to_google_takeout}."
msgstr ""
msgid "Go to parent"
msgstr ""
msgid "Go to project"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment