From 026bdbbc0ca6ea64c388847584be192a8069c433 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 2 Dec 2014 10:05:11 -0600 Subject: [PATCH] warn users with trading lists but no neomail address --- app/views/closet_hangers/index.html.haml | 2 ++ app/views/closet_lists/_closet_list.html.haml | 3 +++ app/views/closet_lists/_trading_neomail_warning.html.haml | 2 ++ config/locales/en.yml | 6 ++++++ 4 files changed, 13 insertions(+) create mode 100644 app/views/closet_lists/_trading_neomail_warning.html.haml diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml index c821a2e2..e563e3db 100644 --- a/app/views/closet_hangers/index.html.haml +++ b/app/views/closet_hangers/index.html.haml @@ -75,6 +75,8 @@ = closet_visibility_descriptions - if has_lists?(owned) %h4= t '.unlisted.header' + - if !@public_perspective + = render partial: 'closet_lists/trading_neomail_warning', locals: {list: @user.null_closet_list(owned), user: @user} .closet-list-content .closet-list-hangers = render_unlisted_closet_hangers(owned) diff --git a/app/views/closet_lists/_closet_list.html.haml b/app/views/closet_lists/_closet_list.html.haml index 9addd4a4..02835634 100644 --- a/app/views/closet_lists/_closet_list.html.haml +++ b/app/views/closet_lists/_closet_list.html.haml @@ -11,6 +11,9 @@ = submit_tag t('.delete'), :confirm => closet_list_delete_confirmation(closet_list) %h4= closet_list.name + - if show_controls + = render partial: 'closet_lists/trading_neomail_warning', locals: {list: closet_list, user: @user} + .closet-list-content - if closet_list.description? = closet_list_description_format closet_list diff --git a/app/views/closet_lists/_trading_neomail_warning.html.haml b/app/views/closet_lists/_trading_neomail_warning.html.haml new file mode 100644 index 00000000..2ef3ea04 --- /dev/null +++ b/app/views/closet_lists/_trading_neomail_warning.html.haml @@ -0,0 +1,2 @@ +- if list.visibility_level.trading? && !user.contact_neopets_username? + %p.warning= t 'closet_lists.closet_list.trading_neomail_warning_html' diff --git a/config/locales/en.yml b/config/locales/en.yml index 7743b475..e36ee2f3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -185,6 +185,12 @@ en: Are you sure you want to delete "%{list_name}"? Even if you do, we'll remember that you want these items. empty: This list is empty. + trading_neomail_warning_html: + You've marked this list as Trading, so folks will discover it via Dress + to Impress, but they might not know how to contact you. If you'd like + to hear from those people, set a Neomail address at the top of + the page. + (If not, maybe you want a Public list instead of Trading.) edit: title: Editing list "%{list_name}"