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
72ad366f
Commit
72ad366f
authored
Aug 18, 2021
by
George Tsiolis
Committed by
Enrique Alcántara
Aug 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update create merge request button on last push event
Changelog: changed
parent
a0122dd3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
29 deletions
+20
-29
app/assets/stylesheets/pages/events.scss
app/assets/stylesheets/pages/events.scss
+0
-15
app/assets/stylesheets/utilities.scss
app/assets/stylesheets/utilities.scss
+4
-0
app/views/projects/_last_push.html.haml
app/views/projects/_last_push.html.haml
+16
-14
No files found.
app/assets/stylesheets/pages/events.scss
View file @
72ad366f
...
...
@@ -154,21 +154,6 @@
}
}
/*
* Last push widget
*/
.event-last-push
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
.event-last-push-text
{
@include
str-truncated
(
100%
);
font-size
:
13px
;
margin-right
:
$gl-padding
;
}
}
@include
media-breakpoint-down
(
xs
)
{
.event-item
{
padding-left
:
0
;
...
...
app/assets/stylesheets/utilities.scss
View file @
72ad366f
...
...
@@ -226,6 +226,10 @@ $gl-line-height-42: px-to-rem(42px);
max-height
:
none
!
important
;
}
.gl-max-w-50p
{
max-width
:
50%
;
}
// Will be moved to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1465
.gl-popover
{
.popover-header
{
...
...
app/views/projects/_last_push.html.haml
View file @
72ad366f
-
event
=
last_push_event
-
if
event
&&
show_last_push_widget?
(
event
)
.row-content-block.top-block.d-none.d-sm-block.white
.event-last-push
.event-last-push-text
%span
=
s_
(
"LastPushEvent|You pushed to"
)
%strong
=
link_to
event
.
ref_name
,
project_commits_path
(
event
.
project
,
event
.
ref_name
),
class:
'ref-name'
.gl-alert.gl-alert-success.mt-2
{
role:
'alert'
}
=
sprite_icon
(
'check-circle'
,
size:
16
,
css_class:
'gl-icon gl-alert-icon gl-alert-icon-no-title'
)
%button
.js-close-banner.gl-alert-dismiss
{
type:
'button'
,
'aria-label'
=>
_
(
'Dismiss'
)
}
=
sprite_icon
(
'close'
,
size:
16
,
css_class:
'gl-icon'
)
.gl-alert-body
%span
=
s_
(
"LastPushEvent|You pushed to"
)
%strong
.gl-display-inline-flex.gl-max-w-50p
{
data:
{
toggle:
'tooltip'
},
title:
event
.
ref_name
}
=
link_to
event
.
ref_name
,
project_commits_path
(
event
.
project
,
event
.
ref_name
),
class:
'ref-name gl-text-truncate'
-
if
event
.
project
!=
@project
%span
=
s_
(
"LastPushEvent|at"
)
%strong
=
link_to_project
event
.
project
-
if
event
.
project
!=
@project
%span
=
s_
(
"LastPushEvent|at"
)
%strong
=
link_to_project
event
.
project
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
-
if
can?
(
current_user
,
:create_merge_request_in
,
event
.
project
.
default_merge_request_target
)
.flex-right
=
link_to
new_mr_path_from_push_event
(
event
),
title:
_
(
"New merge request"
),
class:
"btn gl-button btn-info btn-s
m qa-create-merge-request"
do
#{
_
(
'Create merge request'
)
}
-
if
can?
(
current_user
,
:create_merge_request_in
,
event
.
project
.
default_merge_request_target
)
.gl-alert-actions
=
link_to
new_mr_path_from_push_event
(
event
),
title:
_
(
"New merge request"
),
class:
"btn gl-button btn-confir
m qa-create-merge-request"
do
#{
_
(
'Create merge request'
)
}
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