From e0b5d3e73f521499539759c3986d67ba7d3d8f0c Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Apr 2014 13:21:42 -0500 Subject: [PATCH] advanced search fields mockup --- app/assets/stylesheets/outfits/_edit.sass | 24 ++++++++++- app/views/outfits/edit.html.haml | 51 +++++++++++++++++++---- 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/outfits/_edit.sass b/app/assets/stylesheets/outfits/_edit.sass index 6a5a9574..45441089 100644 --- a/app/assets/stylesheets/outfits/_edit.sass +++ b/app/assets/stylesheets/outfits/_edit.sass @@ -312,7 +312,26 @@ body.outfits-edit #preview-search-form-help div +inline-block - width: 48% + vertical-align: top + width: 33% + + li.text, li.select + label + +inline-block + + li.checkbox + list-style: none + margin-left: -24px + + &:nth-of-type(1) + li.text, li.select + label + width: 12em + + &:nth-of-type(2) + li.text, li.select + label + width: 5em #footer bottom: 0 left: 0 @@ -820,6 +839,9 @@ body.outfits-edit &.user-not-signed-in #save-outfit-not-signed-in display: inline-block + #preview-search-form-help + .must-log-in + color: #aca #save-outfit-wrapper.shared-outfit #shared-outfit-permalink, #shared-outfit-url diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index f81948ea..c9b91b1f 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -107,13 +107,50 @@ -# TODO: remove search.examples -# TODO: i18n -# TODO: hook up labels - %ul - %li - %label Item name must contain - %input{type: 'text', name: 'name_require'} - %li - %label Item name must not contain - %input{type: 'text', name: 'name_exclude'} + %div + %ul + %li.text + %label{for: 'advanced-search-name-require'} Name contains + %input{type: 'text', id: 'advanced-search-name-require'} + %li.text + %label{for: 'advanced-search-name-exclude'} Name doesn't contain + %input{type: 'text', id: 'advanced-search-name-exclude'} + %li.select + %label{for: 'advanced-search-nc'} Only include + %select{id: 'advanced-search-nc'} + %option{value: ''} NC and NP items + %option{value: 'nc'} Neocash items + %option{value: 'np'} Neopoint items + %div + %ul + %li.checkbox + %input{type: 'checkbox', id: 'advanced-search-species'} + %label{for: 'advanced-search-species'} + Fits the + -# TODO: update to current species + %span Acara + %li.select + %label{for: 'advanced-search-occupies'} Occupies + -# TODO: populate + %select{id: 'advanced-search-occupies'} + %option any zone + %li.select + %label{for: 'advanced-search-restricts'} Restricts + -# TODO: populate + %select{id: 'advanced-search-restricts'} + %option any or no zones + %div + %ul + -# TODO: hide link if logged in + -# TODO: enable if logged in + -# TODO: update return_to + = link_to 'Log in to use these filters.', login_path_with_return_to + %li.checkbox.must-log-in + %input{type: 'checkbox', id: 'advanced-search-owns', disabled: true} + %label{for: 'advanced-search-owns'} Only include items I own + %li.checkbox.must-log-in + %input{type: 'checkbox', id: 'advanced-search-wants', disabled: true} + %label{for: 'advanced-search-wants'} Only include items I want #preview-search-form-loading= t '.search.loading' #preview-search-form-error.possible-error #preview-search-form-no-results