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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8e5c72f8
Commit
8e5c72f8
authored
Mar 21, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring file lock button back into UI
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c2c89e3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
34 deletions
+8
-34
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+0
-34
app/views/projects/blob/_header.html.haml
app/views/projects/blob/_header.html.haml
+8
-0
No files found.
app/views/projects/blob/_actions.html.haml
deleted
100644 → 0
View file @
c2c89e3e
-
if
@environment
.btn-group
<
=
view_on_environment_button
(
@commit
.
sha
,
@path
,
@environment
)
.btn-group
{
role:
"group"
}
<
=
link_to
'Raw'
,
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
,
target:
'_blank'
-# only show normal/blame view links for text files
-
if
blob_text_viewable?
(
@blob
)
-
if
current_page?
namespace_project_blame_path
(
@project
.
namespace
,
@project
,
@id
)
=
link_to
'Normal View'
,
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
-
else
=
link_to
'Blame'
,
namespace_project_blame_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm js-blob-blame-link'
unless
@blob
.
empty?
=
link_to
'History'
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
=
link_to
'Permalink'
,
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
sha
,
@path
)),
class:
'btn btn-sm js-data-file-blob-permalink-url'
-
if
current_user
.btn-group
{
role:
"group"
}
<
=
lock_file_link
(
html_options:
{
class:
'btn btn-sm path-lock'
})
-
if
blob_text_viewable?
(
@blob
)
=
edit_blob_link
=
replace_blob_link
=
delete_blob_link
-
if
license_allows_file_locks?
:javascript
PathLocks
.
init
(
'
#{
toggle_namespace_project_path_locks_path
(
@project
.
namespace
,
@project
)
}
'
,
'
#{
@path
}
'
);
app/views/projects/blob/_header.html.haml
View file @
8e5c72f8
...
...
@@ -34,6 +34,14 @@
-
if
current_user
.btn-group
{
role:
"group"
}
<
=
lock_file_link
(
html_options:
{
class:
'btn btn-sm path-lock'
})
=
edit_blob_link
if
blob_text_viewable?
(
blob
)
=
replace_blob_link
=
delete_blob_link
-
if
license_allows_file_locks?
:javascript
PathLocks
.
init
(
'
#{
toggle_namespace_project_path_locks_path
(
@project
.
namespace
,
@project
)
}
'
,
'
#{
@path
}
'
);
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