From 7dce6ca89c73591502dedf826954f3acb84d9499 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 9 Jan 2013 17:38:03 -0600 Subject: [PATCH] refactor closet_lists.form hierarchy --- app/helpers/closet_lists_helper.rb | 4 ++-- app/views/closet_lists/_form.html.haml | 10 +++++----- config/locales/en-meep.yml | 23 ++++++++++++----------- config/locales/en.yml | 23 ++++++++++++----------- 4 files changed, 31 insertions(+), 29 deletions(-) diff --git a/app/helpers/closet_lists_helper.rb b/app/helpers/closet_lists_helper.rb index c112069c..498fba82 100644 --- a/app/helpers/closet_lists_helper.rb +++ b/app/helpers/closet_lists_helper.rb @@ -12,8 +12,8 @@ module ClosetListsHelper def hangers_owned_options [ - [translate("closet_lists.form.hangers_owned_options.owned"), true], - [translate("closet_lists.form.hangers_owned_options.wanted"), false] + [closet_lists_group_name(:you, true), true], + [closet_lists_group_name(:you, false), false] ] end diff --git a/app/views/closet_lists/_form.html.haml b/app/views/closet_lists/_form.html.haml index af8e4317..77c7cc40 100644 --- a/app/views/closet_lists/_form.html.haml +++ b/app/views/closet_lists/_form.html.haml @@ -5,18 +5,18 @@ %ul.fields %li = f.label :name - %span.hint= t '.name_hint' + %span.hint= t '.name.hint' = f.text_field :name, :required => true %li - = f.label :hangers_owned, t('.hangers_owned_label') + = f.label :hangers_owned, t('.hangers_owned.label') = f.select :hangers_owned, hangers_owned_options %li - = f.label :visibility, t('.visibility_label') + = f.label :visibility, t('.visibility.label') = f.select :visibility, long_closet_visibility_choices(:list) %li = f.label :description - %span.hint= t '.description_hint' + %span.hint= t '.description.hint' = f.text_area :description - %span.hint= t '.description_markup_hint_html' + %span.hint= t '.description.markup_hint_html' = f.submit t('.submit') diff --git a/config/locales/en-meep.yml b/config/locales/en-meep.yml index bbcc2558..18f2a12c 100644 --- a/config/locales/en-meep.yml +++ b/config/locales/en-meep.yml @@ -185,17 +185,18 @@ en-meep: form: your_items_link: Back to Your Meeps - name_hint: Like "meep for trade" or "NC meeplist" - hangers_owned_label: This is a meep for… - hangers_owned_options: - owned: Meepits you own - wanted: Meepits you want - visibility_label: Who can meep this list? - description_hint: - Why are these meepits in the same meep? What are your terms for meeping? - Or you can meep this blank. - description_markup_hint_html: - We _support_ **Meepdown** and some HTML. + name: + hint: Like "meep for trade" or "NC meeplist" + hangers_owned: + label: This is a meep for… + visibility: + label: Who can meep this list? + description: + hint: + Why are these meepits in the same meep? What are your terms for + meeping? Or you can meep this blank. + markup_hint_html: + We _support_ **Meepdown** and some HTML. submit: Meep list groups: diff --git a/config/locales/en.yml b/config/locales/en.yml index d4005b92..5614be87 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -186,17 +186,18 @@ en: form: your_items_link: Back to Your Items - name_hint: Like "up for trade" or "NC wishlist" - hangers_owned_label: This is a list for… - hangers_owned_options: - owned: Items you own - wanted: Items you want - visibility_label: Who can see this list? - description_hint: - Why are these items in the same list? What are your terms for trading? - Or you can leave this blank. - description_markup_hint_html: - We _support_ **Markdown** and some HTML. + name: + hint: Like "up for trade" or "NC wishlist" + hangers_owned: + label: This is a list for… + visibility: + label: Who can see this list? + description: + hint: + Why are these items in the same list? What are your terms for trading? + Or you can leave this blank. + markup_hint_html: + We _support_ **Markdown** and some HTML. submit: Save list groups: