diff --git a/app/helpers/classifiers_helper.rb b/app/helpers/classifiers_helper.rb new file mode 100644 index 000000000..bdeb93d2e --- /dev/null +++ b/app/helpers/classifiers_helper.rb @@ -0,0 +1,86 @@ +module ClassifiersHelper + def classifiers + { + :sass => [ + ['spot on face', classifier_image('SASS.spot_on_face')], + ['square shape', classifier_image('SASS.square_shape')], + ['square frame edge', classifier_image('SASS.square_frame_edge')], + ['square container', classifier_image('SASS.square_container')], + ['thick', classifier_image('SASS.thick')], + ['rake or claw', classifier_image('SASS.rake_or_claw')], + ['thin round length (e.g. stick, cane)', classifier_image('SASS.thin_round_length')], + ['thick round length (e.g. pole)', classifier_image('SASS.thick_round_length')], + ['very thick and round (e.g. trunk, pillar)', classifier_image('SASS.very_thick_round')] + ], + :texture_consistency => [ + ['sandy', classifier_image('texture_consistency_quality.tactile.sandy')], + ['sticky', classifier_image('texture_consistency_quality.tactile.sticky')], + ['wet', classifier_image('texture_consistency_quality.tactile.wet')], + ['bright', classifier_image('texture_consistency_quality.visual.bright')], + ['twinkly', classifier_image('texture_consistency_quality.visual.twinkly')], + ['sunshine', classifier_image('texture_consistency_quality.visual.sunshine')] + ], + :entity => [ + ['vehicle', [ + ['into garage', classifier_image('entity.vehicle.into_garage')], + ['nose-to-tail collision', classifier_image('entity.vehicle.nose_to_tail_collision')], + ['reversing', classifier_image('entity.vehicle.reversing')] + ]], + ['person', [ + ['approach', classifier_image('entity.person.approach')], + ['meet', classifier_image('entity.persons.meet')], + ['turn and walk away', classifier_image('entity.person.turn_and_walk_away')] + ]], + ['two legged', [ + ['fall', classifier_image('entity.legs.fall')], + ['jump', classifier_image('entity.legs.jump')], + ['stand up', classifier_image('entity.legs.stand_up')] + ]], + ['plane', [ + ['plane fly', classifier_image('entity.plane.plane_fly')], + ['plane take-off', classifier_image('entity.plane.plane_take_off')] + ]] + ], + :body_parts => [ + ['flap wings', classifier_image('body_parts.wings.flap')], + ['whiplash', classifier_image('body_parts.neck_and_head.whiplash')], + ['Claw', classifier_image('body_parts.claw')], + ['open/shut beak (e.g. duck, goose)', classifier_image('body_parts.wide_beak_open_shut')] + ], + :mass_or_quantity => [ + ['pile of stuff', classifier_image('mass_or_quantity.stuff.heap_pile')], + ['line of people', classifier_image('mass_or_quantity.persons.line')], + ['heavy traffic', classifier_image('mass_or_quantity.vehicles.heavy_traffic')] + ], + :handling_or_instrumental => [ + ['computer-mouse', classifier_image('handling_or_instrumental.computer_mouse')], + ['game-remote', classifier_image('handling_or_instrumental.game_remote')], + ['bat', classifier_image('handling_or_instrumental.bat')], + ['holding cricket-ball', classifier_image('handling_or_instrumental.holding_objects.cricket_ball')], + ['holding softball', classifier_image('handling_or_instrumental.holding_objects.softball')], + ['holding basketball', classifier_image('handling_or_instrumental.holding_objects.basketball')] + ], + :element => [ + ['Fire', [ + ['candle-flame', classifier_image('element.fire.candle_flame')], + ['small-fire', classifier_image('element.fire.small_fire')], + ['bonfire', classifier_image('element.fire.bonfire')] + ]], + ['Water', [ + ['water-drip', classifier_image('element.water.water_drip')], + ['flowing-water', classifier_image('element.water.flowing_water')], + ['water-flooding', classifier_image('element.water.water_flooding')], + ['water-overflowing', classifier_image('element.water.water_overflowing')] + ]], + ['Air', [ + ['gentle breeze', classifier_image('element.air.gentle_breeze')], + ['strong wind', classifier_image('element.air.strong_wind')], + ]] + ] + } + end +private + def classifier_image(partial_image_identifier) + return "/images/classifiers/90/Classifiers.#{partial_image_identifier}.png" + end +end \ No newline at end of file diff --git a/app/helpers/numbers_helper.rb b/app/helpers/numbers_helper.rb new file mode 100644 index 000000000..f26fb1b1f --- /dev/null +++ b/app/helpers/numbers_helper.rb @@ -0,0 +1,82 @@ +module NumbersHelper + def numbers + {:cardinal => signs_from_array(cardinal_array), + :ordinal => signs_from_array(ordinal_array), + :fractions => signs_from_array(fractions_array), + :clock => signs_from_array(clock_array), + :calendar => signs_from_array(calendar_array), + :age => signs_from_array(age_array), + :money => signs_from_array(money_array) + } + end +private + def cardinal_array + [[0, 4056], + [1, 5607], + [2, 5617], + [3, 5619], + [4, 5620], + [5, 5621], + [6, 5622], + [7, 5623], + [9, 5696], + [10, 4065], + [11, 5608], + [12, 5609], + [13, 5610], + [14, 5611], + [15, 5612], + [16, 5613], + [18, 5615], + [19, 5701], + [20, 5618], + [21, 5703], + [22, 5704], + [24, 5715], + [25, nil ], + [30, nil ], + [40, 5707], + [50, 5708], + [60, 5711], + [70, 5712], + [80, 5713], + [90, nil ], + [100, 386], + [100, 5709], + [1000, 2290], + [1000000, 1109], + [1000000000, 4086]] + end + + def ordinal_array + [['first', 5663], + ['first', 2412], + ['second', 2416], + ['fourth', 2418], + ['fifth', 2419]] + end + + def fractions_array + [['1/2', nil ], + ['1/3', 6232], + ['1/4', nil ]] + end + + def clock_array + [['one o\'clock', 5662]] + end + + def calendar_array + [] + end + def age_array + [] + end + + def money_array + [] + end + def signs_from_array(array) + array.map{|v| [v[0], Sign.find(:id => v[1])]}.reject{|v| v[1].nil? } + end +end \ No newline at end of file diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index c138a31b6..cd04a8283 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -77,6 +77,13 @@ def search_term(key) h @query[key].join(' ') unless @query[key].blank? end + def display_search_term + p [search_term('s'), + content_tag(:div, [display_handshapes_search_term, display_locations_search_term, display_location_groups_search_term].compact.join(' ').html_safe, :class => 'selected_signs'), + display_usage_tag_search_term, + display_topic_tag_search_term].compact.join(' ').html_safe + + end private def value_for_sign_attribute number, attribute, main if attribute == :handshape diff --git a/app/helpers/static_pages_helper.rb b/app/helpers/static_pages_helper.rb index 18297bc82..57752797f 100644 --- a/app/helpers/static_pages_helper.rb +++ b/app/helpers/static_pages_helper.rb @@ -4,152 +4,9 @@ def alphabet_listing %w(A B_open B_closed C_half C_full D E F G H I J K L M N O P_open P_closed Q R S T U V W X Y Z) end - def numbers_listing - [[0, 4056], - [1, 5607], - [2, 5617], - [3, 5619], - [4, 5620], - [5, 5621], - [6, 5622], - [7, 5623], - [9, 5696], - [10, 4065], - [11, 5608], - [12, 5609], - [13, 5610], - [14, 5611], - [15, 5612], - [16, 5613], - [18, 5615], - [19, 5701], - [20, 5618], - [21, 5703], - [22, 5704], - [24, 5715], - [25, nil ], - [30, nil ], - [40, 5707], - [50, 5708], - [60, 5711], - [70, 5712], - [80, 5713], - [90, nil ], - [100, 386], - [100, 5709], - [1000, 2290], - [1000000, 1109], - [1000000000, 4086]] - end - - def ordinal_numbers_listing - [['first', 5663], - ['first', 2412], - ['second', 2416], - ['fourth', 2418], - ['fifth', 2419]] - end - - def fractions_listing - [['1/2', nil ], - ['1/3', 6232], - ['1/4', nil ]] - end - - def time_listing - [['one o\'clock', 5662]] - end - - def signs_from_array(array) - array.map{|v| [v[0], Sign.find(:id => v[1])]}.reject{|v| v[1].nil? } - end def link_sign name, id return link_to name, sign_path(id) if Sign.find(:id => id) return name end - def classifiers - { - :sass => [ - ['spot on face', classifier_image('SASS.spot_on_face')], - ['square shape', classifier_image('SASS.square_shape')], - ['square frame edge', classifier_image('SASS.square_frame_edge')], - ['square container', classifier_image('SASS.square_container')], - ['thick', classifier_image('SASS.thick')], - ['rake or claw', classifier_image('SASS.rake_or_claw')], - ['thin round length (e.g. stick, cane)', classifier_image('SASS.thin_round_length')], - ['thick round length (e.g. pole)', classifier_image('SASS.thick_round_length')], - ['very thick and round (e.g. trunk, pillar)', classifier_image('SASS.very_thick_round')] - ], - :texture_consistency => [ - ['sandy', classifier_image('texture_consistency_quality.tactile.sandy')], - ['sticky', classifier_image('texture_consistency_quality.tactile.sticky')], - ['wet', classifier_image('texture_consistency_quality.tactile.wet')], - ['bright', classifier_image('texture_consistency_quality.visual.bright')], - ['twinkly', classifier_image('texture_consistency_quality.visual.twinkly')], - ['sunshine', classifier_image('texture_consistency_quality.visual.sunshine')] - ], - :entity => [ - ['vehicle', [ - ['into garage', classifier_image('entity.vehicle.into_garage')], - ['nose-to-tail collision', classifier_image('entity.vehicle.nose_to_tail_collision')], - ['reversing', classifier_image('entity.vehicle.reversing')] - ]], - ['person', [ - ['approach', classifier_image('entity.person.approach')], - ['meet', classifier_image('entity.persons.meet')], - ['turn and walk away', classifier_image('entity.person.turn_and_walk_away')] - ]], - ['two legged', [ - ['fall', classifier_image('entity.legs.fall')], - ['jump', classifier_image('entity.legs.jump')], - ['stand up', classifier_image('entity.legs.stand_up')] - ]], - ['plane', [ - ['plane fly', classifier_image('entity.plane.plane_fly')], - ['plane take-off', classifier_image('entity.plane.plane_take_off')] - ]] - ], - :body_parts => [ - ['flap wings', classifier_image('body_parts.wings.flap')], - ['whiplash', classifier_image('body_parts.neck_and_head.whiplash')], - ['Claw', classifier_image('body_parts.claw')], - ['open/shut beak (e.g. duck, goose)', classifier_image('body_parts.wide_beak_open_shut')] - ], - :mass_or_quantity => [ - ['pile of stuff', classifier_image('mass_or_quantity.stuff.heap_pile')], - ['line of people', classifier_image('mass_or_quantity.persons.line')], - ['heavy traffic', classifier_image('mass_or_quantity.vehicles.heavy_traffic')] - ], - :handling_or_instrumental => [ - ['computer-mouse', classifier_image('handling_or_instrumental.computer_mouse')], - ['game-remote', classifier_image('handling_or_instrumental.game_remote')], - ['bat', classifier_image('handling_or_instrumental.bat')], - ['holding cricket-ball', classifier_image('handling_or_instrumental.holding_objects.cricket_ball')], - ['holding softball', classifier_image('handling_or_instrumental.holding_objects.softball')], - ['holding basketball', classifier_image('handling_or_instrumental.holding_objects.basketball')] - ], - :element => [ - ['Fire', [ - ['candle-flame', classifier_image('element.fire.candle_flame')], - ['small-fire', classifier_image('element.fire.small_fire')], - ['bonfire', classifier_image('element.fire.bonfire')] - ]], - ['Water', [ - ['water-drip', classifier_image('element.water.water_drip')], - ['flowing-water', classifier_image('element.water.flowing_water')], - ['water-flooding', classifier_image('element.water.water_flooding')], - ['water-overflowing', classifier_image('element.water.water_overflowing')] - ]], - ['Air', [ - ['gentle breeze', classifier_image('element.air.gentle_breeze')], - ['strong wind', classifier_image('element.air.strong_wind')], - ]] - ] - } - end - - private - def classifier_image(partial_image_identifier) - return "/images/classifiers/90/Classifiers.#{partial_image_identifier}.png" - end + end diff --git a/app/views/signs/search.html.haml b/app/views/signs/search.html.haml index f035ead43..0e3a52546 100644 --- a/app/views/signs/search.html.haml +++ b/app/views/signs/search.html.haml @@ -1,14 +1,6 @@ %h1.search_results_for = t('search.results.for') - “ - = search_term('s') - .selected_signs - = display_handshapes_search_term - = display_locations_search_term - = display_location_groups_search_term - = display_usage_tag_search_term - = display_topic_tag_search_term - ” + “#{display_search_term}” %em= "#{@results_total} results." %ol.grid.results.clearfix.rule_after - @signs.each_with_index do |result, i| diff --git a/app/views/static_pages/_number_grid.html.haml b/app/views/static_pages/_number_grid.html.haml new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/static_pages/numbers.html.haml b/app/views/static_pages/numbers.html.haml index 1accf2760..6931c6dfa 100644 --- a/app/views/static_pages/numbers.html.haml +++ b/app/views/static_pages/numbers.html.haml @@ -1,8 +1,48 @@ -%h1 Numbers -= render :partial => 'static_pages/grid', :locals => {:group => signs_from_array(numbers_listing)} -%h2 Ordinal Number -= render :partial => 'static_pages/grid', :locals => {:group => signs_from_array(ordinal_numbers_listing)} -%h2 Fractions -= render :partial => 'static_pages/grid', :locals => {:group => signs_from_array(fractions_listing)} -%h2 Time -= render :partial => 'static_pages/grid', :locals => {:group => signs_from_array(time_listing)} \ No newline at end of file +.typography.rule_after + :markdown + Numbers Signs + ============= + + Many numbers have alternate or varying forms in NZSL. Variation in numbers is + linked to age, region, and personal preference of signers. New (Auslan) numbers + were introduced into schools with Australasian Signed English in 1979, + which differed from the number signs used by earlier generations. + + NZSL has several systems that incorporate number in which a number sign has a + distinct movement and/or location including: + + * [Cardinal Numbers](#cardinal) (counting) + * [Ordinal Numbers](#ordinal) (ordering: 1st) + * [Age](#age) + * [Clock Time](#clock) + * [Calendar Time](#calendar) + * [Money](#money) + * [Fractions](#fractions) +- unless numbers[:cardinal].length.zero? + .typography + %h2#cardinal Cardinal Numbers + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:cardinal]} +- unless numbers[:ordinal].length.zero? + .typography + %h2#ordinal Ordinal Numbers + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:ordinal]} +- unless numbers[:age].length.zero? + .typography + %h2#age Age + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:age]} +- unless numbers[:clock].length.zero? + .typography + %h2#clock Clock Time + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:clock]} +- unless numbers[:calendar] + .typography + %h2#calendar Calendar Time + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:calendar]} +- unless numbers[:money].length.zero? + .typography + %h2#money Money + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:money]} +- unless numbers[:fractions].length.zero? + .typography + %h2#fractions Fractions + = render :partial => 'static_pages/grid', :locals => {:group => numbers[:fractions]} \ No newline at end of file diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png deleted file mode 100644 index 1f1972bd8..000000000 Binary files a/public/apple-touch-icon.png and /dev/null differ diff --git a/public/favicon.ico b/public/favicon.ico index 4ec0d2988..ab622501a 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2d2d249fe..d523a8840 100755 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -188,7 +188,7 @@ a.logo {height:71px; width:92px; background:url('/images/ui/logo.png') top left .dropdown {position:absolute; top:30px; left:-175px; background:white; border:1px solid #99a0a5; z-index:10; display:none; padding-top:4px;} .handshapes .dropdown {width:452px;} .locations .dropdown {width:536px; left:-380px;} -.dropdown .title {padding:3px 3px 7px; line-height:1;} +.dropdown .title {padding:3px 3px 7px; line-height:1;text-align:left;} .dropdown .close {position:absolute; top:5px; right:5px; background:url('/images/ui/close_search.png') right center no-repeat; padding-right:20px; height:15px; line-height:15px;} .attribute_options .row {clear:left;} @@ -231,7 +231,7 @@ a.logo {height:71px; width:92px; background:url('/images/ui/logo.png') top left .default, .input_prompt {color:#777; font-style:italic;} .default {position:absolute; top:0; left:0;} .selected.dropdown_arrow{background-color:white; border:1px solid #99a0a5; margin:-1px; height:30px;} -a.dropdown_arrow {float:right; text-decoration:none; width:20px; height:35px; border:0; line-height:35px; background:url('/images/ui/arrow.png') no-repeat center 10px; position:absolute; z-index:30; margin:0; text-align:center; right: 6px; top:10px;} +a.dropdown_arrow {float:right; text-decoration:none; width:20px; height:35px; border:0; line-height:35px; background:url('/images/ui/arrow.png') no-repeat center 10px; position:absolute; z-index:30; margin:0; text-align:center; right: 6px; top:10px; color:#777;} a.empty {background:url('/images/ui/clear.png') no-repeat center right; height:16px; width:auto; padding-right:14px; position:relative; border:0; z-index:31px; display:block; position:absolute;top:5px;right:118px;line-height:18px;color:#777;} a.empty:hover {border:0;background-color:transparent;color:#555;}