mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Replace angular tooltips in Primary Details tab
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= label_tag :permalink, t('.permalink')
|
||||
%div{'ofn-with-tip' => t('.permalink_tip', link: main_app.root_url)}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.permalink_tip', link: main_app.root_url)}
|
||||
.eight.columns
|
||||
= text_field_tag "enterprise[permalink]", @enterprise.permalink, data: { action: "input->permalink#validate", "permalink-target": "permalinkField" }
|
||||
.two.columns.omega
|
||||
@@ -21,15 +20,13 @@
|
||||
.row
|
||||
.three.columns.alpha
|
||||
%label= t('.link_to_front')
|
||||
%div{'ofn-with-tip' => t('.link_to_front_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.link_to_front_tip')}
|
||||
.eight.columns.omega
|
||||
- front_shop_path = "#{main_app.root_url}#{@enterprise.permalink}/shop"
|
||||
= link_to front_shop_path, front_shop_path , target: "_blank"
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= label_tag :id, t('.ofn_uid')
|
||||
%div{'ofn-with-tip' => t('.ofn_uid_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.ofn_uid_tip')}
|
||||
.six.columns
|
||||
= @enterprise.id
|
||||
|
||||
@@ -8,15 +8,13 @@
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= f.label :group_ids, t('.groups')
|
||||
%div{'ofn-with-tip' => t('.groups_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.groups_tip')}
|
||||
.eight.columns.omega
|
||||
= f.collection_select :group_ids, @groups, :id, :name, {}, data: { controller: "tom-select", "tom-select-options-value": { plugins: ['remove_button'], maxItems: nil } }, class: "full-width", multiple: true, placeholder: t('.groups_placeholder')
|
||||
.row
|
||||
.three.columns.alpha
|
||||
%label= t('.primary_producer')
|
||||
%div{'ofn-with-tip' => t('.primary_producer_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.primary_producer_tip')}
|
||||
.five.columns.omega
|
||||
= f.check_box :is_primary_producer, data: { action: "change->primary-details#primaryProducerChanged" }
|
||||
= f.label :is_primary_producer, t('.producer')
|
||||
@@ -24,8 +22,7 @@
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= f.label :sells, t('.sells')
|
||||
%div{'ofn-with-tip' => t('.sells_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.sells_tip')}
|
||||
.two.columns
|
||||
= f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
|
||||
= f.label :sells, t('.none'), value: "none"
|
||||
@@ -38,8 +35,7 @@
|
||||
.row
|
||||
.three.columns.alpha
|
||||
%label= t('.visible_in_search')
|
||||
%div{'ofn-with-tip' => t('.visible_in_search_tip')}
|
||||
%a= t('admin.whats_this')
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.visible_in_search_tip')}
|
||||
.two.columns
|
||||
= f.radio_button :visible, "public", 'ng-model' => 'Enterprise.visible'
|
||||
= f.label :visible, t('.visible'), value: 'public'
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
%a{"data-tooltip-target": "element", "data-action": "mouseenter->tooltip#showTooltip mouseleave->tooltip#hideTooltip"}= t('admin.whats_this')
|
||||
.tooltip-container
|
||||
.tooltip{"data-tooltip-target": "tooltip"}
|
||||
= tooltip_text
|
||||
= sanitize tooltip_text
|
||||
.arrow{"data-tooltip-target": "arrow"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user