Active Admin Rails 4 内联表格
Active Admin Rails 4 inline form
我在 Rails 4 ActiveAdmin 和 Money-Rails 上使用。有没有办法在一行文本中有两个或多个输入?
para "Please enter the amount"
f.input :amount_due_currency, :label => "Dollars ",:input_html => {:style => 'width:3%'}
para "and"
f.input :amount_due_cents, :label => "cents ", :input_html => {:style => 'width:10%'}
para "to deposit on your account."
我需要的输出看起来像
请输入金额 __ 美元和 __ 美分以存入您的帐户。
我试过字符串插值,但失败了。有谁可以帮助我吗?
我相信您可以使用 Arbre columns 来布置表格。为了更好地控制,我使用 CSS 来覆盖单个输入的样式,例如:
form.subscription {
#details {
li:nth-child(n+2):nth-child(-n+5) {
display: inline-block;
width: 48%;
}
}
我在 Rails 4 ActiveAdmin 和 Money-Rails 上使用。有没有办法在一行文本中有两个或多个输入?
para "Please enter the amount"
f.input :amount_due_currency, :label => "Dollars ",:input_html => {:style => 'width:3%'}
para "and"
f.input :amount_due_cents, :label => "cents ", :input_html => {:style => 'width:10%'}
para "to deposit on your account."
我需要的输出看起来像 请输入金额 __ 美元和 __ 美分以存入您的帐户。
我试过字符串插值,但失败了。有谁可以帮助我吗?
我相信您可以使用 Arbre columns 来布置表格。为了更好地控制,我使用 CSS 来覆盖单个输入的样式,例如:
form.subscription {
#details {
li:nth-child(n+2):nth-child(-n+5) {
display: inline-block;
width: 48%;
}
}