summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-12-21 23:09:17 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-12-21 23:09:17 +0000
commit36f4710301926bb853b35d9b14a60e03b42def34 (patch)
tree98cd7fe926f14af085e6bdbc33af6ae27a0ef7c3
parent82e31ee46784cc4a0b987511ce7506dd01a3f004 (diff)
parentd4e2805eb23b548cdd9773c23076f536feb524bf (diff)
downloadgitlab-ce-36f4710301926bb853b35d9b14a60e03b42def34.tar.gz
Merge branch 'fix/last-push-event-widget-layout' into 'master'
Last push event widget width for fixed layout #40268 See merge request gitlab-org/gitlab-ce!15862
-rw-r--r--app/views/projects/_last_push.html.haml27
-rw-r--r--app/views/projects/tree/show.html.haml3
-rw-r--r--changelogs/unreleased/fix-last-push-event-widget-layout.yml5
3 files changed, 21 insertions, 14 deletions
diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml
index 56eecece54c..b68eb47c6b4 100644
--- a/app/views/projects/_last_push.html.haml
+++ b/app/views/projects/_last_push.html.haml
@@ -1,18 +1,19 @@
- event = last_push_event
- if event && show_last_push_widget?(event)
- .row-content-block.top-block.hidden-xs.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'
+ %div{ class: container_class }
+ .row-content-block.top-block.hidden-xs.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'
- - 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)}
- .pull-right
- = link_to new_mr_path_from_push_event(event), title: _("New merge request"), class: "btn btn-info btn-sm" do
- #{ _('Create merge request') }
+ .pull-right
+ = link_to new_mr_path_from_push_event(event), title: _("New merge request"), class: "btn btn-info btn-sm" do
+ #{ _('Create merge request') }
diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml
index 3b4057e56d0..709be20e00f 100644
--- a/app/views/projects/tree/show.html.haml
+++ b/app/views/projects/tree/show.html.haml
@@ -6,6 +6,7 @@
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits")
+= render 'projects/last_push'
+
%div{ class: [(container_class), ("limit-container-width" unless fluid_layout)] }
- = render 'projects/last_push'
= render 'projects/files', commit: @last_commit, project: @project, ref: @ref, content_url: project_tree_path(@project, @id)
diff --git a/changelogs/unreleased/fix-last-push-event-widget-layout.yml b/changelogs/unreleased/fix-last-push-event-widget-layout.yml
new file mode 100644
index 00000000000..ba5b115ca19
--- /dev/null
+++ b/changelogs/unreleased/fix-last-push-event-widget-layout.yml
@@ -0,0 +1,5 @@
+---
+title: Last push event widget width for fixed layout
+merge_request: 15862
+author: George Tsiolis
+type: fixed