From dfaea75c27d8590b7dd534becc2a874356b8d745 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 15 Sep 2021 13:19:56 +0100 Subject: [PATCH] Use an 'inline' dl to unify the appearance of the mapper and admin info details lines --- app/assets/stylesheets/common.scss | 17 +++++++---- app/views/users/show.html.erb | 48 +++++++++++++++++++----------- 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index ec2ec4dea..644517ff2 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1096,12 +1096,6 @@ tr.turn:hover { /* Rules for the user profile page */ -.admin-user-info small { - margin-bottom: $lineheight/2; - display: inline; - margin-right: $lineheight; -} - .contact-activity { margin-top: $lineheight; width: 100%; @@ -1559,6 +1553,17 @@ div.secondary-actions { } } +/* Create a single-line dl */ + +dl.dl-inline { + dt, dd { + display: inline-block; + } + dd { + margin-right: 1em; + } +} + /* Customise the background colour of striped tables */ .table-striped > tbody > tr:nth-child(2n+1) > td, diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index d0d448f97..3943a2d02 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -116,20 +116,24 @@ <% end %> -

+

- <%= t ".mapper since" %> <%= l @user.creation_time.to_date, :format => :long %> - <% unless @user.terms_agreed %> - | - <%= t ".ct status" %> - <% if @user.terms_seen? -%> - <%= t ".ct declined" %> - <% else -%> - <%= t ".ct undecided" %> +
+
<%= t ".mapper since" %>
+
<%= l @user.creation_time.to_date, :format => :long %>
+ <% unless @user.terms_agreed %> +
<%= t ".ct status" %>
+
+ <% if @user.terms_seen? -%> + <%= t ".ct declined" %> + <% else -%> + <%= t ".ct undecided" %> + <% end -%> +
<% end -%> - <% end -%> +
-

+
<% if can?(:set_status, User) || can?(:destroy, User) %>