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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
7b26414c
Commit
7b26414c
authored
Oct 17, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split up projects/tree/_tree partial.
parent
6bd9a9fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
38 deletions
+37
-38
app/views/projects/tree/_tree_content.html.haml
app/views/projects/tree/_tree_content.html.haml
+1
-34
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+32
-0
app/views/projects/tree/show.html.haml
app/views/projects/tree/show.html.haml
+4
-4
No files found.
app/views/projects/tree/_tree.html.haml
→
app/views/projects/tree/_tree
_content
.html.haml
View file @
7b26414c
.gray-content-block
%ul
.breadcrumb.repo-breadcrumb
%li
=
link_to
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
@ref
)
do
=
@project
.
path
-
tree_breadcrumbs
(
tree
,
6
)
do
|
title
,
path
|
%li
-
if
path
=
link_to
truncate
(
title
,
length:
40
),
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
path
)
-
else
=
link_to
title
,
'#'
-
if
allowed_tree_edit?
%li
%span
.dropdown
%a
.dropdown-toggle.btn.add-to-tree
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
=
icon
(
'plus'
)
%ul
.dropdown-menu
%li
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@id
),
title:
'Create file'
,
id:
'new-file-link'
do
=
icon
(
'pencil fw'
)
Create file
%li
=
link_to
'#modal-upload-blob'
,
{
'data-target'
=>
'#modal-upload-blob'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'file fw'
)
Upload file
%li
.divider
%li
=
link_to
'#modal-create-new-dir'
,
{
'data-target'
=>
'#modal-create-new-dir'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'folder fw'
)
New directory
%div
#tree-content-holder
.tree-content-holder
%div
.tree-content-holder
.tree-table-holder
%table
.table
#tree-slider
{
class:
"table_#{@hex_path} tree-table table-striped"
}
%thead
...
...
@@ -60,8 +29,6 @@
-
if
tree
.
readme
=
render
"projects/tree/readme"
,
readme:
tree
.
readme
%div
.tree_progress
-
if
allowed_tree_edit?
=
render
'projects/blob/upload'
,
title:
'Upload'
,
placeholder:
'Upload new file'
,
button_title:
'Upload file'
,
form_path:
namespace_project_create_blob_path
(
@project
.
namespace
,
@project
,
@id
),
method: :post
=
render
'projects/blob/new_dir'
...
...
app/views/projects/tree/_tree_header.html.haml
0 → 100644
View file @
7b26414c
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'tree'
,
path:
@path
%ul
.breadcrumb.repo-breadcrumb
%li
=
link_to
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
@ref
)
do
=
@project
.
path
-
tree_breadcrumbs
(
tree
,
6
)
do
|
title
,
path
|
%li
-
if
path
=
link_to
truncate
(
title
,
length:
40
),
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
path
)
-
else
=
link_to
title
,
'#'
-
if
allowed_tree_edit?
%li
%span
.dropdown
%a
.dropdown-toggle.btn.add-to-tree
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
=
icon
(
'plus'
)
%ul
.dropdown-menu
%li
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@id
),
title:
'Create file'
,
id:
'new-file-link'
do
=
icon
(
'pencil fw'
)
Create file
%li
=
link_to
'#modal-upload-blob'
,
{
'data-target'
=>
'#modal-upload-blob'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'file fw'
)
Upload file
%li
.divider
%li
=
link_to
'#modal-create-new-dir'
,
{
'data-target'
=>
'#modal-create-new-dir'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'folder fw'
)
New directory
app/views/projects/tree/show.html.haml
View file @
7b26414c
...
...
@@ -6,12 +6,12 @@
=
render
'projects/last_push'
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'tree'
,
path:
@path
-
if
can?
current_user
,
:download_code
,
@project
.tree-download-holder
=
render
'projects/repositories/download_archive'
,
ref:
@ref
,
btn_class:
'btn-group pull-right hidden-xs hidden-sm'
,
split_button:
true
#tree-holder
.tree-holder.clearfix
=
render
"tree"
,
tree:
@tree
.gray-content-block.top-block
=
render
'projects/tree/tree_header'
,
tree:
@tree
=
render
'projects/tree/tree_content'
,
tree:
@tree
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