如果我选中复选框并单击ClickMe按钮,则前端看起来应如下所示:
<td class='actions actions-1 my-files' data-hook="admin_orders_index_row_actions">
<% doc = Spree::BookkeepingDocument.where(printable: shipment.order).last %>
<% if doc %>
<%= link_to_with_icon "file", "", admin_bookkeeping_document_path(doc, format: :pdf), title: "Download Invoice" %>
<input type="checkbox" name="files" class="check"/>`
答案 0 :(得分:0)
<span>
<input type="checkbox" value="<%= admin_bookkeeping_document_path(doc, format: :pdf)%>" name="my-files" style="margin-left: 30%;">
</span>
添加此代码段,并在link_to
标签之后,并在复选框中,属性值给出link_to
标签值的值。