]> git.openstreetmap.org Git - rails.git/commitdiff
Put message read/unread/delete buttons in one column
authorAnton Khorev <tony29@yandex.ru>
Fri, 11 Aug 2023 15:46:51 +0000 (18:46 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 11 Aug 2023 15:46:51 +0000 (18:46 +0300)
app/assets/stylesheets/common.scss
app/views/messages/_message_summary.html.erb
app/views/messages/_sent_message_summary.html.erb
app/views/messages/inbox.html.erb
app/views/messages/outbox.html.erb

index 5a033bd0b6a3ed8e26cecf1c9d33930f8b29e89a..1b200ded7e412e8c459cb946f3b95e2e27cc9df5 100644 (file)
@@ -1147,21 +1147,15 @@ tr.turn:hover {
 }
 
 .inbox-row .inbox-mark-read {
-  display: none;
+  display: none !important;
 }
 
 .inbox-sent {
   white-space: nowrap;
 }
 
-.inbox-mark-unread,
-.inbox-mark-read,
-.inbox-delete {
-  width: 1%;
-}
-
 .inbox-row-unread .inbox-mark-unread {
-  display: none;
+  display: none !important;
 }
 
 .search_form {
index 1a4445eae9edad0b4d6aedb110f3c7e9b84ee663..b0f5f931b75f014edf5f72c66ee18c0e70242b39 100644 (file)
@@ -2,7 +2,9 @@
   <td class="inbox-sender"><%= link_to message_summary.sender.display_name, user_path(message_summary.sender) %></td>
   <td class="inbox-subject"><%= link_to message_summary.title, message_path(message_summary) %></td>
   <td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td>
-  <td class="inbox-mark-unread"><%= button_to t(".unread_button"), message_mark_path(message_summary, :mark => "unread"), :remote => true, :class => "btn btn-sm btn-primary" %></td>
-  <td class="inbox-mark-read"><%= button_to t(".read_button"), message_mark_path(message_summary, :mark => "read"), :remote => true, :class => "btn btn-sm btn-primary" %></td>
-  <td class="inbox-destroy"><%= button_to t(".destroy_button"), message_path(message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger" %></td>
+  <td class="text-end">
+    <%= button_to t(".unread_button"), message_mark_path(message_summary, :mark => "unread"), :remote => true, :class => "btn btn-sm btn-primary", :form_class => "d-inline-block inbox-mark-unread" %>
+    <%= button_to t(".read_button"), message_mark_path(message_summary, :mark => "read"), :remote => true, :class => "btn btn-sm btn-primary", :form_class => "d-inline-block inbox-mark-read" %>
+    <%= button_to t(".destroy_button"), message_path(message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger", :form_class => "d-inline-block inbox-destroy" %>
+  </td>
 </tr>
index 4d1b361b1822dd8f2cf3d8ad0171a1ddca522c21..fa690e09268e802104f9e30d6e3a4b10ccfafcae 100644 (file)
@@ -2,5 +2,7 @@
   <td class="inbox-sender"><%= link_to sent_message_summary.recipient.display_name, user_path(sent_message_summary.recipient) %></td>
   <td class="inbox-subject"><%= link_to sent_message_summary.title, message_path(sent_message_summary) %></td>
   <td class="inbox-sent"><%= l sent_message_summary.sent_on, :format => :friendly %></td>
-  <td class="inbox-destroy"><%= button_to t(".destroy_button"), message_path(sent_message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger" %></td>
+  <td class="text-end">
+    <%= button_to t(".destroy_button"), message_path(sent_message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger", :form_class => "d-inline-block inbox-destroy" %>
+  </td>
 </tr>
index 4f2925b149e386f86fa4e07c372c8ec5152797fd..7eba93b76e14b0d260991241c8d7d144dcb3241d 100644 (file)
@@ -25,8 +25,6 @@
         <th><%= t ".from" %></th>
         <th><%= t ".subject" %></th>
         <th><%= t ".date" %></th>
-        <th></th>
-        <th></th>
       </tr>
     </thead>
     <tbody>
index 0099b573d816a0d289ca4e65cf17ee52bc400ad5..ad5b4c28f045cc57d60ca19b48065a0a677a789c 100644 (file)
@@ -26,7 +26,6 @@
         <th><%= t ".to" %></th>
         <th><%= t ".subject" %></th>
         <th><%= t ".date" %></th>
-        <th></th>
       </tr>
     </thead>
     <tbody>