diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-07 08:22:35 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-07 08:22:35 +0300 |
commit | 52a583c120686329d931e99035756996264a26c3 (patch) | |
tree | 868f4d06a46f6f9ee88301b32fd900455a5e4972 /app/views/projects | |
parent | 9b75da80259c7a3bb410d601fea1e9c45c427a33 (diff) | |
parent | 0b34cac1c5f0115b7ea6ed0e1e08b57ee22671cd (diff) |
Merge branch 'show_push_widget_in_upstream' into 'master'
Show last push widget in upstream after push to fork
## What does this MR do?
Show the last push widget in the upstream project when you push to a fork.
## Are there points in the code the reviewer needs to double check?
In the view, I'm checking if `@project` in the first part of the conditional. I felt it was necessary in case `@project` wasn't an object in all cases. Will it ever not be there? Is this check necessary?
Should there be tests? I don't see existing ones for this.
## Why was this MR needed?
I use the fork workflow everywhere and it has annoyed me for some time that the last push widget doesn't show up when viewing the upstream project. I'm almost never viewing the fork in GitLab so I want to be able to easily create a MR in any case.
## Screenshots (if relevant)
**Widget in upstream repo:**
![Screen_Shot_2016-06-23_at_10.05.29_AM](/uploads/f823642e40cf059c3793db6cf00bba50/Screen_Shot_2016-06-23_at_10.05.29_AM.png)
**Widget in fork**:
![Screen_Shot_2016-06-23_at_10.05.25_AM](/uploads/1a976241186ec42cdc43c80bea0c856b/Screen_Shot_2016-06-23_at_10.05.25_AM.png)
**Widget on dashboard**:
![Screen_Shot_2016-06-23_at_10.06.07_AM](/uploads/084ac35f67735aec8042d9bc904255fe/Screen_Shot_2016-06-23_at_10.06.07_AM.png)
See merge request !4880
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_last_push.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml index 434d8644b83..3c6b931f41a 100644 --- a/app/views/projects/_last_push.html.haml +++ b/app/views/projects/_last_push.html.haml @@ -7,7 +7,9 @@ %span You pushed to = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do %strong= event.ref_name - branch + - if @project && event.project != @project + %span at + %strong= link_to_project event.project #{time_ago_with_tooltip(event.created_at)} .pull-right |