diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-07-21 09:42:22 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-07-21 09:42:22 +0000 |
commit | cb9f418bf846b5bc32902ed70ddc7d7be3d5c071 (patch) | |
tree | b41196f155fd7d6ae692a719058921cfb2af2ec0 /app | |
parent | caefed2771abd1b544b77fcb6ed408a7877498cb (diff) | |
parent | fa079e38d443275efc7b23aa62f44d1e426cd37e (diff) | |
download | gitlab-ce-cb9f418bf846b5bc32902ed70ddc7d7be3d5c071.tar.gz |
Merge branch 'hide-project-name-in-project-activities' into 'master'
Hide project name in project activities
## What does this MR do?
- hide namespace and project name on project activity page
## Are there points in the code the reviewer needs to double check?
- did `.event_label` have any meaning?
## Why was this MR needed?
- all events on project activity page are from the same project, so the information was redundant
## What are the relevant issue numbers?
closes #18963
## Screenshots
### Before
![events-before](/uploads/76336e3f5cb08d4ef984df73c89aa90f/events-before.png)
### After
![events-after](/uploads/4a10718ed32960efc115d7854e5cad68/events-after.png)
![after-john-activity](/uploads/d9d151a829d8d32136525e8eb7ea04ad/after-john-activity.png)
See merge request !5068
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/events.scss | 8 | ||||
-rw-r--r-- | app/views/events/_event_scope.html.haml | 7 | ||||
-rw-r--r-- | app/views/events/event/_common.html.haml | 9 | ||||
-rw-r--r-- | app/views/events/event/_created_project.html.haml | 2 | ||||
-rw-r--r-- | app/views/events/event/_note.html.haml | 11 | ||||
-rw-r--r-- | app/views/events/event/_push.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/_activity.html.haml | 3 |
7 files changed, 26 insertions, 20 deletions
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss index a2145956eb5..5c336bb1c7e 100644 --- a/app/assets/stylesheets/pages/events.scss +++ b/app/assets/stylesheets/pages/events.scss @@ -176,3 +176,11 @@ } } } + +// hide event scope (namespace + project) where it is not necessary +.project-activity { + .event-scope { + display: none; + } +} + diff --git a/app/views/events/_event_scope.html.haml b/app/views/events/_event_scope.html.haml new file mode 100644 index 00000000000..8f7da7d8c4f --- /dev/null +++ b/app/views/events/_event_scope.html.haml @@ -0,0 +1,7 @@ +%span.event-scope + = event_preposition(event) + - if event.project + = link_to_project event.project + - else + = event.project_name + diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index 2e2403347c1..bba6e0d2c20 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -1,6 +1,6 @@ .event-title %span.author_name= link_to_author event - %span.event_label{class: event.action_name} + %span{class: event.action_name} - if event.target = event.action_name %strong @@ -10,12 +10,7 @@ - else = event_action_name(event) - = event_preposition(event) - - - if event.project - = link_to_project event.project - - else - = event.project_name + = render "events/event_scope", event: event - if event.target.respond_to?(:title) .event-body diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml index 5a2a469ba62..aba64dd17d0 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -1,6 +1,6 @@ .event-title %span.author_name= link_to_author event - %span.event_label{class: event.action_name} + %span{class: event.action_name} = event_action_name(event) - if event.project diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 830fec0b4ab..f08c96df309 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -1,14 +1,9 @@ .event-title %span.author_name= link_to_author event - %span.event_label - = event.action_name - = event_note_title_html(event) - at + = event.action_name + = event_note_title_html(event) - - if event.project - = link_to_project event.project - - else - = event.project_name + = render "events/event_scope", event: event .event-body .event-note diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index ea54ef226ec..44fff49d99c 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -2,14 +2,14 @@ .event-title %span.author_name= link_to_author event - %span.event_label.pushed #{event.action_name} #{event.ref_type} + %span.pushed #{event.action_name} #{event.ref_type} - if event.rm_ref? %strong= event.ref_name - else %strong = link_to event.ref_name, namespace_project_commits_path(project.namespace, project, event.ref_name), title: h(event.target_title) - at - = link_to_project project + + = render "events/event_scope", event: event - if event.push_with_commits? .event-body diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 48b0dd6b121..ac50ce83f6a 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -5,7 +5,8 @@ %i.fa.fa-rss = render 'shared/event_filter' -.content_list{:"data-href" => activity_project_path(@project)} + +.content_list.project-activity{:"data-href" => activity_project_path(@project)} = spinner :javascript |