From: Saman Bemel-Benrud Date: Tue, 11 Jun 2013 18:25:41 +0000 (-0700) Subject: Generalize support for groups of action buttons X-Git-Tag: live~4890 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d2ddf35ae2ea497ce55015b99deb92dec79a0a56 Generalize support for groups of action buttons --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index f068438bf..8456c4b2f 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1307,6 +1307,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; } /* Rules for message in/out box page */ +.message #content { + max-width: 740px; +} + .messages { width: 100%; border: 1px solid #ddd; @@ -1539,7 +1543,7 @@ a.button { display: block; padding: $lineheight/4; min-width: 120px; - margin-bottom: $lineheight/2; + margin: 0 0 $lineheight/2 0; color: white; background: $blue; text-align: center; @@ -1561,6 +1565,28 @@ a.button.submit { } } +.buttons { + min-width: 200px; + + input[type="submit"], + .button { + box-sizing: border-box; + display: inline-block; + margin-bottom:0; + width:50%; + min-width: 0; + } + input:first-child, + .button:first-child { + border-radius:2px 0 0 2px; + border-right:1px solid white; + } + input:last-child, + .button:first-child { + border-radius:0 2px 2px 0; + } +} + /* Rules for doing distinct colour of alternate table rows */ .table0, @@ -1718,25 +1744,6 @@ a.button.submit { margin-bottom: $lineheight/4; white-space: nowrap; } - - input.richtext_doedit, - input.richtext_dopreview { - margin-right: $lineheight/2; - } - } - - .buttons input[type="submit"] { - display: inline-block; - margin-bottom:0; - width:99px; - min-width:99px; - } - .buttons input:first-child { - border-radius:2px 0 0 2px; - margin-right:1px; - } - .buttons input:last-child { - border-radius:0 2px 2px 0; } } diff --git a/app/views/message/read.html.erb b/app/views/message/read.html.erb index f3d6ef139..168421c6d 100644 --- a/app/views/message/read.html.erb +++ b/app/views/message/read.html.erb @@ -8,9 +8,11 @@ <%= link_to h(@message.sender.display_name), :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %>
<%= l @message.sent_on, :format => :friendly %> +
<%= button_to t('message.read.reply_button'), :controller => 'message', :action => 'reply', :message_id => @message.id %> <%= button_to t('message.read.unread_button'), :controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread' %>
+
<%= @message.body.to_html %>