mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Improve notify producer button
Add icon Better confirmation message Adds tooltip Adds small icon and change text if already notified
This commit is contained in:
@@ -44,4 +44,20 @@ input[type="submit"], input[type="button"], button, .button {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translateY(-50%);
|
||||
font-size: 10px;
|
||||
text-transform: capitalize;
|
||||
padding: 0px 5px;
|
||||
border-radius: 3px;
|
||||
|
||||
&:before { padding: 0 }
|
||||
|
||||
&.danger { background-color: $warning-red; }
|
||||
&.success { background-color: $spree-green; }
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,13 @@
|
||||
- content_for :page_actions do
|
||||
- if can? :notify_producers, @order_cycle
|
||||
%li
|
||||
= button_to t(:notify_producers), main_app.notify_producers_admin_order_cycle_path, :id => 'admin_notify_producers', :confirm => t(:are_you_sure)
|
||||
- processed = @order_cycle.processed_at.present?
|
||||
- url = main_app.notify_producers_admin_order_cycle_path
|
||||
- confirm_msg = "#{t('.notify_producers_tip')} #{t(:are_you_sure)}"
|
||||
%a.button.icon-email.with-tip{ href: url, data: { method: 'post', confirm: confirm_msg }, 'data-powertip': t('.notify_producers_tip') }
|
||||
= processed ? t('.re_notify_producers') : t(:notify_producers)
|
||||
- if processed
|
||||
.badge.icon-ok.success
|
||||
|
||||
- content_for :page_title do
|
||||
= t :edit_order_cycle
|
||||
|
||||
@@ -1038,6 +1038,8 @@ en:
|
||||
back_to_list: "Back To List"
|
||||
save_and_back_to_list: "Save and Back to List"
|
||||
choose_products_from: "Choose Products From:"
|
||||
re_notify_producers: Re notify producers
|
||||
notify_producers_tip: This will send an email to each producer with the list of their orders.
|
||||
incoming:
|
||||
incoming: "Incoming"
|
||||
supplier: "Supplier"
|
||||
@@ -2405,7 +2407,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
new_order_cycle: "New Order Cycle"
|
||||
new_order_cycle_tooltip: "Open shop for a certain time period"
|
||||
select_a_coordinator_for_your_order_cycle: "Select a coordinator for your order cycle"
|
||||
notify_producers: 'Notify producers'
|
||||
notify_producers: 'Notify producers'
|
||||
edit_order_cycle: "Edit Order Cycle"
|
||||
roles: "Roles"
|
||||
update: "Update"
|
||||
|
||||
Reference in New Issue
Block a user