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
4a39436f
Commit
4a39436f
authored
Jan 24, 2020
by
Marcel van Remmerden
Committed by
Annabel Dunstone Gray
Jan 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Buttons for Edit and Web IDE look like segmented control in file header
parent
9fc7382d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+2
-2
app/views/projects/blob/_header.html.haml
app/views/projects/blob/_header.html.haml
+5
-7
app/views/projects/blob/_viewer_switcher.html.haml
app/views/projects/blob/_viewer_switcher.html.haml
+1
-1
changelogs/unreleased/197500-edit-and-web-ide-look-like-segmented-control-in-file-header.yml
...nd-web-ide-look-like-segmented-control-in-file-header.yml
+5
-0
No files found.
app/helpers/blob_helper.rb
View file @
4a39436f
...
@@ -47,7 +47,7 @@ module BlobHelper
...
@@ -47,7 +47,7 @@ module BlobHelper
def
edit_blob_button
(
project
=
@project
,
ref
=
@ref
,
path
=
@path
,
options
=
{})
def
edit_blob_button
(
project
=
@project
,
ref
=
@ref
,
path
=
@path
,
options
=
{})
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
common_classes
=
"btn btn-primary js-edit-blob
#{
options
[
:extra_class
]
}
"
common_classes
=
"btn btn-primary js-edit-blob
ml-2
#{
options
[
:extra_class
]
}
"
edit_button_tag
(
blob
,
edit_button_tag
(
blob
,
common_classes
,
common_classes
,
...
@@ -62,7 +62,7 @@ module BlobHelper
...
@@ -62,7 +62,7 @@ module BlobHelper
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
edit_button_tag
(
blob
,
edit_button_tag
(
blob
,
'btn btn-inverted btn-primary ide-edit-button'
,
'btn btn-inverted btn-primary ide-edit-button
ml-2
'
,
_
(
'Web IDE'
),
_
(
'Web IDE'
),
ide_edit_path
(
project
,
ref
,
path
,
options
),
ide_edit_path
(
project
,
ref
,
path
,
options
),
project
,
project
,
...
...
app/views/projects/blob/_header.html.haml
View file @
4a39436f
...
@@ -2,18 +2,16 @@
...
@@ -2,18 +2,16 @@
.js-file-title.file-title-flex-parent
.js-file-title.file-title-flex-parent
=
render
'projects/blob/header_content'
,
blob:
blob
=
render
'projects/blob/header_content'
,
blob:
blob
.file-actions
.file-actions
<
=
render
'projects/blob/viewer_switcher'
,
blob:
blob
unless
blame
=
render
'projects/blob/viewer_switcher'
,
blob:
blob
unless
blame
=
edit_blob_button
.btn-group
{
role:
"group"
}
<
=
ide_edit_button
=
edit_blob_button
.btn-group.ml-2
{
role:
"group"
}
>
=
ide_edit_button
.btn-group
{
role:
"group"
}
<
=
render_if_exists
'projects/blob/header_file_locks_link'
=
render_if_exists
'projects/blob/header_file_locks_link'
-
if
current_user
-
if
current_user
=
replace_blob_link
=
replace_blob_link
=
delete_blob_link
=
delete_blob_link
.btn-group
{
role:
"group"
}
<
.btn-group
.ml-2
{
role:
"group"
}
=
copy_blob_source_button
(
blob
)
unless
blame
=
copy_blob_source_button
(
blob
)
unless
blame
=
open_raw_blob_button
(
blob
)
=
open_raw_blob_button
(
blob
)
=
download_blob_button
(
blob
)
=
download_blob_button
(
blob
)
...
...
app/views/projects/blob/_viewer_switcher.html.haml
View file @
4a39436f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
-
simple_viewer
=
blob
.
simple_viewer
-
simple_viewer
=
blob
.
simple_viewer
-
rich_viewer
=
blob
.
rich_viewer
-
rich_viewer
=
blob
.
rich_viewer
.btn-group.js-blob-viewer-switcher
{
role:
"group"
}
.btn-group.js-blob-viewer-switcher
.ml-2
{
role:
"group"
}
>
-
simple_label
=
"Display
#{
simple_viewer
.
switcher_title
}
"
-
simple_label
=
"Display
#{
simple_viewer
.
switcher_title
}
"
%button
.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip
{
'aria-label'
=>
simple_label
,
title:
simple_label
,
data:
{
viewer:
'simple'
,
container:
'body'
}
}
>
%button
.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip
{
'aria-label'
=>
simple_label
,
title:
simple_label
,
data:
{
viewer:
'simple'
,
container:
'body'
}
}
>
=
icon
(
simple_viewer
.
switcher_icon
)
=
icon
(
simple_viewer
.
switcher_icon
)
...
...
changelogs/unreleased/197500-edit-and-web-ide-look-like-segmented-control-in-file-header.yml
0 → 100644
View file @
4a39436f
---
title
:
Remove button group for edit and web ide in file header
merge_request
:
23291
author
:
type
:
other
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