From 9bd074d4cf6b81328921c03c93a385b703da71c9 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 6 Aug 2015 14:55:03 +0200 Subject: Use display: inline where appropriate --- app/views/events/event/_push.html.haml | 2 +- app/views/layouts/_user_styles.html.haml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 4de3e66962b..8bed5cdb9cc 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -34,7 +34,7 @@ Compare #{from_label}...#{truncate_sha(event.commit_to)} - if create_mr - %span{"data-user-is" => event.author_id} + %span{"data-user-is" => event.author_id, "data-display" => "inline"} or = link_to create_mr_path(event.project.default_branch, event.ref_name, event.project) do create a merge request diff --git a/app/views/layouts/_user_styles.html.haml b/app/views/layouts/_user_styles.html.haml index b7f0f316724..b76b3cb5510 100644 --- a/app/views/layouts/_user_styles.html.haml +++ b/app/views/layouts/_user_styles.html.haml @@ -7,10 +7,18 @@ display: block !important; } + [data-user-is="#{current_user.try(:id)}"][data-display="inline"] { + display: inline !important; + } + [data-user-is-not] { display: block !important; } + [data-user-is-not][data-display="inline"] { + display: inline !important; + } + [data-user-is-not="#{current_user.try(:id)}"] { display: none !important; } -- cgit v1.2.1