|
1 | 1 | ActiveAdmin.register Invoice do |
2 | | - permit_params :legal_date, :number, :paid, :state, :attachment, :photo, :category_id, |
3 | | - :city_id, :amount, :color, :updated_at, :active, item_ids: [], other_item_ids: [] |
| 2 | + permit_params :legal_date, :number, :paid, :state, :attachment, :photo, :category_id, :city_id, |
| 3 | + :amount, :color, :updated_at, :picture, :active, item_ids: [], other_item_ids: [] |
4 | 4 |
|
5 | 5 | filter :id, as: :numeric_range_filter |
6 | 6 |
|
|
17 | 17 | tag_column :state, interactive: true |
18 | 18 | bool_column :paid |
19 | 19 | image_column :photo, style: :thumb |
| 20 | + image_column :picture, style: :jpg_small |
20 | 21 | attachment_column :attachment |
21 | 22 | number_column :amount, as: :currency, unit: "$", separator: "," |
22 | 23 | toggle_bool_column :active |
|
35 | 36 | list_row :details, localize: true |
36 | 37 | image_row("Mi foto", :photo, style: :big, &:photo) |
37 | 38 | attachment_row("My doc", :attachment, label: 'Download file', truncate: false, &:attachment) |
| 39 | + image_row("Mi picture", :picture, image_options: { width: 100 }, &:picture) |
38 | 40 | row :legal_date |
39 | 41 | number_row("Monto", :amount, as: :human, &:amount) |
40 | 42 | row :city |
|
87 | 89 |
|
88 | 90 | f.input :photo |
89 | 91 |
|
| 92 | + f.input :picture, as: :file |
| 93 | + |
90 | 94 | f.input :color, as: :color_picker, |
91 | 95 | palette: Invoice.colors |
92 | 96 |
|
|
0 commit comments