diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-09 11:25:05 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-09 11:25:05 +0000 |
commit | 5309dad4599310a50883366c9cdf866465a89f11 (patch) | |
tree | 6f99a4344cc56e5b1359c3909ec440018763b49d /app/views | |
parent | 11e43cddbc22e9402e1f3f0f79172cebd741983f (diff) | |
parent | e9ab09c6b59421c32913e4b92ee061b91de30231 (diff) | |
download | gitlab-ce-5309dad4599310a50883366c9cdf866465a89f11.tar.gz |
Merge branch 'last-push-widget' into 'master'
Last push widget
Continue of !938. Screenshots are at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/938#note_1594727
See merge request !946
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_last_push.html.haml | 14 | ||||
-rw-r--r-- | app/views/projects/activity.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/blob/show.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/merge_requests/index.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/tree/show.html.haml | 4 |
6 files changed, 23 insertions, 3 deletions
diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml new file mode 100644 index 00000000000..30622d8a910 --- /dev/null +++ b/app/views/projects/_last_push.html.haml @@ -0,0 +1,14 @@ +- if event = last_push_event + - if show_last_push_widget?(event) + .hidden-xs.center + .slead + %span You pushed to + = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do + %strong= event.ref_name + branch + #{time_ago_with_tooltip(event.created_at)} + + %div + = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-info btn-sm" do + Create Merge Request + %hr diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 25bd93cae87..b486cd4ded4 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -1,6 +1,5 @@ += render 'projects/last_push' .hidden-xs - = render "events/event_last_push", event: @last_push - - if current_user %ul.nav.nav-pills.event_filter.pull-right %li diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index a1d464bac59..bd2fc43633c 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -1,4 +1,7 @@ - page_title @blob.path, @ref + += render 'projects/last_push' + %div.tree-ref-holder = render 'shared/ref_switcher', destination: 'blob', path: @path diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index e0bc1df97ee..72fbe2e27a7 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -1,4 +1,5 @@ - page_title "Merge Requests" += render 'projects/last_push' .append-bottom-10 .pull-right = render 'shared/issuable/search_form', path: namespace_project_merge_requests_path(@project.namespace, @project) diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 17907a42e3c..d9cff805575 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -6,6 +6,7 @@ = render 'shared/no_ssh' = render 'shared/no_password' += render 'projects/last_push' = render "home_panel" .project-stats diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index 04590f65b27..c9e59428e78 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -2,7 +2,9 @@ = content_for :meta_tags do - if current_user = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits") - + += render 'projects/last_push' + .tree-ref-holder = render 'shared/ref_switcher', destination: 'tree', path: @path |