]> git.openstreetmap.org Git - rails.git/commitdiff
Make the back button not look disabled
authorAndy Allan <git@gravitystorm.co.uk>
Sat, 4 Jul 2020 09:20:46 +0000 (11:20 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Sat, 4 Jul 2020 09:20:46 +0000 (11:20 +0200)
This switches the message buttons to use bootstrap, so that we can have a back button that looks clickable.

Alternative implementation of #2386

app/assets/stylesheets/common.scss
app/views/messages/show.html.erb

index a13f73d7a8ba0a2aa7228b927da1ea54e664f968..39cdaa47a7f5840e37d6959d05c6ef5e86d3f53e 100644 (file)
@@ -1640,17 +1640,6 @@ tr.turn:hover {
   display: none;
 }
 
-.messages-show .message-buttons {
-  margin-top: $lineheight;
-  margin-bottom: $lineheight * 1.5;
-  padding-top: $lineheight;
-  border-top: 1px solid $lightgrey;
-}
-
-.messages-show .buttons .mark-unread-button {
-  border-radius: 0;
-}
-
 /* Rules for "flash" notice boxes shown at the top of the content area */
 
 .flash {
index 7cf674fefd678b4ed21792b0e1e9f2ac8f479ff1..080503f72fce70fc769ed6eba41744ee5f7c3a9b 100644 (file)
 
   <div class="richtext"><%= @message.body.to_html %></div>
 
-  <div class='message-buttons buttons'>
-    <%= button_to t(".reply_button"), message_reply_path(@message), :class => "reply-button" %>
-    <%= button_to t(".unread_button"), message_mark_path(@message, :mark => "unread"), :class => "mark-unread-button" %>
-    <%= button_to t(".destroy_button"), message_path(@message), :method => "delete", :class => "destroy-button" %>
-    <%= link_to t(".back"), inbox_messages_path, :class => "button deemphasize" %>
+  <div>
+    <%= link_to t(".reply_button"), message_reply_path(@message), :class => "btn btn-primary" %>
+    <%= link_to t(".unread_button"), message_mark_path(@message, :mark => "unread"), :method => "post", :class => "btn btn-primary" %>
+    <%= link_to t(".destroy_button"), message_path(@message), :method => "delete", :class => "btn btn-primary" %>
+    <%= link_to t(".back"), inbox_messages_path, :class => "btn btn-link" %>
   </div>
 
 <% else %>
@@ -34,8 +34,8 @@
 
   <div class="richtext"><%= @message.body.to_html %></div>
 
-  <div class='message-buttons buttons'>
-    <%= link_to t(".back"), outbox_messages_path, :class => "button deemphasize" %>
+  <div>
+    <%= link_to t(".back"), outbox_messages_path, :class => "btn btn-link" %>
   </div>
 
 <% end %>