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
Boxiang Sun
gitlab-ce
Commits
521c351a
Commit
521c351a
authored
Jul 28, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added old_tree_header to tree_header for not new_repo
parent
6c847a8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
3 deletions
+77
-3
app/views/projects/tree/_old_tree_header.html.haml
app/views/projects/tree/_old_tree_header.html.haml
+70
-0
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+7
-3
No files found.
app/views/projects/tree/_old_tree_header.html.haml
0 → 100644
View file @
521c351a
%ul
.breadcrumb.repo-breadcrumb
%li
=
link_to
project_tree_path
(
@project
,
@ref
)
do
=
@project
.
path
-
path_breadcrumbs
do
|
title
,
path
|
%li
=
link_to
truncate
(
title
,
length:
40
),
project_tree_path
(
@project
,
tree_join
(
@ref
,
path
))
-
if
current_user
%li
-
if
!
on_top_of_branch?
%span
.btn.add-to-tree.disabled.has-tooltip
{
title:
_
(
"You can only add files when you are on a branch"
),
data:
{
container:
'body'
}
}
=
icon
(
'plus'
)
-
else
%span
.dropdown
%a
.dropdown-toggle.btn.add-to-tree
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
,
"data-target"
=>
".add-to-tree-dropdown"
}
=
icon
(
'plus'
)
.add-to-tree-dropdown
%ul
.dropdown-menu
-
if
can_edit_tree?
%li
=
link_to
project_new_blob_path
(
@project
,
@id
)
do
=
icon
(
'pencil fw'
)
#{
_
(
'New file'
)
}
%li
=
link_to
'#modal-upload-blob'
,
{
'data-target'
=>
'#modal-upload-blob'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'file fw'
)
#{
_
(
'Upload file'
)
}
%li
=
link_to
'#modal-create-new-dir'
,
{
'data-target'
=>
'#modal-create-new-dir'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'folder fw'
)
#{
_
(
'New directory'
)
}
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
%li
-
continue_params
=
{
to:
project_new_blob_path
(
@project
,
@id
),
notice:
edit_in_new_fork_notice
,
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
=
link_to
fork_path
,
method: :post
do
=
icon
(
'pencil fw'
)
#{
_
(
'New file'
)
}
%li
-
continue_params
=
{
to:
request
.
fullpath
,
notice:
edit_in_new_fork_notice
+
" Try to upload a file again."
,
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
=
link_to
fork_path
,
method: :post
do
=
icon
(
'file fw'
)
#{
_
(
'Upload file'
)
}
%li
-
continue_params
=
{
to:
request
.
fullpath
,
notice:
edit_in_new_fork_notice
+
" Try to create a new directory again."
,
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
=
link_to
fork_path
,
method: :post
do
=
icon
(
'folder fw'
)
#{
_
(
'New directory'
)
}
%li
.divider
%li
=
link_to
new_project_branch_path
(
@project
)
do
=
icon
(
'code-fork fw'
)
#{
_
(
'New branch'
)
}
%li
=
link_to
new_project_tag_path
(
@project
)
do
=
icon
(
'tags fw'
)
#{
_
(
'New tag'
)
}
app/views/projects/tree/_tree_header.html.haml
View file @
521c351a
...
...
@@ -2,10 +2,14 @@
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'tree'
,
path:
@path
-
if
!
show_new_repo?
=
render
'projects/tree/old_tree_header'
.tree-controls
%a
.btn.btn-default
#editable-mode
{
"href"
=>
"#"
,
"@click.prevent"
=>
"editClicked"
,
"v-cloak"
=>
1
,
"v-if"
=>
"isCommitable"
}
%i
{
":class"
=>
"buttonIcon"
}
%span
{{buttonLabel}}
-
if
show_new_repo?
=
render
'shared/repo/editable_mode'
-
else
=
link_to
s_
(
'Commits|History'
),
project_commits_path
(
@project
,
@id
),
class:
'btn'
=
render
'projects/find_file_link'
...
...
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