当我在rails中隐藏一个按钮时,其他按钮移动到那个地方我想将按钮放在平行线上,如果其他按钮的位置在那种情况下不可见,则应该清楚......我的代码如下:
<div class=" list_el">
<span class="pull-right" style="text-align:right">
<%if accountant?%>
<%= link_to_if(!crm_donation["received"], "Approved", crm_donations_path(:id => crm_donation["id"]), :class => "label label-success") if !crm_donation["received"]%>
<%end%>
<%= link_to "rollback", edit_crm_donation_rollback_path(crm_donation["id"]), :class => 'label label-info' if supervisor? && crm_donation["rollback_id"].blank?%>
<%= link_to "delete", crm_donation_path(crm_donation["id"]), :class => 'label label-important1', method: :delete, data: { confirm: 'Are you sure?' } if accountant? && !crm_donation["received"]%>
<%= link_to "details", crm_donation_path(crm_donation["id"]), :class => 'label label-success' %>
<%if !accountant?%>
<%= link_to "pdf", "/letter/#{crm_donation["id"]}.pdf", :class => "label label-info1", :target=>"_blank"%>
<%if crm_donation["email_sent"]%>
<%=link_to_if(crm_donation["received"], "email", donation_email_sent_path(crm_donation["email_sent"]), :class=>"label label-emails") { label_tag( "email" , "email",:class => "label") }%>
<%else%>
<%if !crm_donation["rollback_id"]%>
<%=link_to_if(crm_donation["received"], "email", new_donation_email_sent_path(:donation_id => crm_donation["id"]), :class=>"label label-emailf") { label_tag( "email" , "email",:class => "label") } %>
<%end%>
<%end%>
<%end%>
</span>
</div>
按钮位置是这样的:
details | pdf
rollback | details | pdf | email
我想这样做:
details | pdf
rollback | details | pdf | email