Provides checkbox to make fixxpert featured/unfeatured
# File app/helpers/admin/fixxperts_helper.rb, line 35 def admin_fixxpert_featured_link(fixxpert) if fixxpert.active? && fixxpert.is_registration_completed? if fixxpert.is_featured? link_to unmark_featured_admin_fixxpert_path(fixxpert), method: :patch, remote: true, data: {confirm: "Do you want to revoke user - \"#{fixxpert.full_name}\" from featured?"} do check_box_tag 'unfeatured', true, true end else link_to mark_featured_admin_fixxpert_path(fixxpert), method: :patch, remote: true, data: {confirm: "Do you want to add user - \"#{fixxpert.name}\" in featured?"} do check_box_tag 'featured', true, false end end else '-' end end
Provides checkbox to make fixxpert searchable/unsearchable
# File app/helpers/admin/fixxperts_helper.rb, line 4 def admin_fixxpert_searchable_link(fixxpert) if fixxpert.active? && fixxpert.is_registration_completed? if fixxpert.searchable? link_to unmark_searchable_admin_fixxpert_path(fixxpert), method: :patch, remote: true, data: {confirm: "Do you want to revoke user - \"#{fixxpert.full_name}\" from search?"} do check_box_tag 'unsearchable', true, true end else link_to mark_searchable_admin_fixxpert_path(fixxpert), method: :patch, remote: true, data: {confirm: "Do you want to add user - \"#{fixxpert.name}\" in search?"} do check_box_tag 'searchable', true, false end end else '-' end end
Provides link to resend activation link to fixxpert if it was not activated or for Intimate Profile Completion.
# File app/helpers/admin/fixxperts_helper.rb, line 21 def admin_fixxpert_status_link(fixxpert) if fixxpert.is_registration_completed? 'Yes' else link = unless fixxpert.active? link_to 'Resend Activation!', resend_activation_admin_user_path(fixxpert), remote: true else link_to 'Intimate Profile Completion', intimate_profile_completion_admin_fixxpert_path(fixxpert), remote: true end ('No - ' + link).html_safe end end