diff --git a/app/assets/javascripts/admin/utils/directives/with_tip.js.coffee b/app/assets/javascripts/admin/utils/directives/with_tip.js.coffee index 51bb5b05bf..b4f3a7d106 100644 --- a/app/assets/javascripts/admin/utils/directives/with_tip.js.coffee +++ b/app/assets/javascripts/admin/utils/directives/with_tip.js.coffee @@ -3,6 +3,7 @@ angular.module("admin.utils").directive "ofnWithTip", ($sanitize)-> element.attr('data-powertip', $sanitize(attrs.ofnWithTip)) element.powerTip smartPlacement: true + placement: element.attr('powertip-location') fadeInTime: 50 fadeOutTime: 50 intentPollInterval: 300 diff --git a/app/views/admin/order_cycles/index.html.haml b/app/views/admin/order_cycles/index.html.haml index 6d3730febf..ed53a56ea3 100644 --- a/app/views/admin/order_cycles/index.html.haml +++ b/app/views/admin/order_cycles/index.html.haml @@ -7,10 +7,10 @@ = content_for :page_actions do - if subscriptions_enabled? %li - %a.button.icon-plus#new-schedule{ "schedule-dialog" => true } + %a.button.icon-plus#new-schedule{ "schedule-dialog" => true, "ofn-with-tip" => t('.new_schedule_tooltip'), "powertip-location" => 's' } = t('admin.order_cycles.index.new_schedule') %li#new_order_cycle_link - = button_link_to t(:new_order_cycle), main_app.new_admin_order_cycle_path, icon: 'icon-plus', id: 'admin_new_order_cycle_link' + = button_link_to t(:new_order_cycle), main_app.new_admin_order_cycle_path, icon: 'icon-plus', id: 'admin_new_order_cycle_link', "ofn-with-tip" => t(:new_order_cycle_tooltip), "powertip-location" => 's' = admin_inject_column_preferences module: 'admin.orderCycles' diff --git a/config/locales/en.yml b/config/locales/en.yml index 76943a0815..d20f7e7c7e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1079,6 +1079,7 @@ en: schedule: Schedule schedules: Schedules new_schedule: New Schedule + new_schedule_tooltip: The frequency with which a subscription order is placed name_and_timing_form: name: Name orders_open: Orders open at @@ -2242,6 +2243,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using price_sack: "Price Sack" new_order_cycles: "New Order Cycles" 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' edit_order_cycle: "Edit Order Cycle"