pwb 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -25
- data/app/assets/fonts/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fonts/fontawesome-webfont.svg +2668 -637
- data/app/assets/fonts/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/javascripts/pwb/shared/page-content.js +24 -0
- data/app/assets/javascripts/pwb/shared/squares-container.js +58 -0
- data/app/assets/javascripts/pwb/shared/vue-main.js +1 -1
- data/app/assets/javascripts/pwb/shared/vue-squares.js.erb +74 -0
- data/app/assets/javascripts/pwb/squares/tabable-section.js +47 -0
- data/app/assets/javascripts/pwb/themes/squares.js.erb +45 -0
- data/app/assets/javascripts/pwb/themes/vic.js.erb +152 -0
- data/app/assets/javascripts/pwb_admin_panel/application_legacy_1.js +5 -0
- data/app/assets/stylesheets/pwb/themes/berlin.scss +4 -0
- data/app/assets/stylesheets/pwb/themes/berlin/main.scss +1 -1
- data/app/assets/stylesheets/pwb/themes/default.scss +1 -0
- data/app/assets/stylesheets/pwb/themes/default/carousel.scss +2 -1
- data/app/assets/stylesheets/pwb/themes/default/landing_content_areas.scss +13 -13
- data/app/assets/stylesheets/pwb/themes/default/shame.scss +0 -16
- data/app/assets/stylesheets/pwb/themes/matt.scss +18 -0
- data/app/assets/stylesheets/pwb/themes/shared/liquid_templates.scss +37 -0
- data/app/assets/stylesheets/pwb/themes/shared/shame.scss +7 -0
- data/app/assets/stylesheets/pwb/themes/squares.scss +22 -0
- data/app/assets/stylesheets/pwb/themes/squares/vue-material-docs.scss +200 -0
- data/app/assets/stylesheets/pwb/themes/squares/vue-material-vars.scss +141 -0
- data/app/assets/stylesheets/pwb/themes/vic.scss +104 -0
- data/app/assets/stylesheets/pwb/themes/vic/general.scss +15 -0
- data/app/assets/stylesheets/pwb/themes/vic/landing.scss +189 -0
- data/app/assets/stylesheets/pwb/themes/vic/slider.scss +127 -0
- data/app/assets/stylesheets/pwb_admin_panel/application_legacy_1.scss +6 -0
- data/app/controllers/pwb/admin_panel_controller.rb +7 -1
- data/app/controllers/pwb/api/v1/clients_controller.rb +35 -0
- data/app/controllers/pwb/api/v1/contacts_controller.rb +41 -0
- data/app/controllers/pwb/api/v1/links_controller.rb +47 -0
- data/app/controllers/pwb/api/v1/page_controller.rb +117 -0
- data/app/controllers/pwb/api/v1/page_fragments_controller.rb +74 -0
- data/app/controllers/pwb/api/v1/properties_controller.rb +30 -9
- data/app/controllers/pwb/api/v1/sections_controller.rb +27 -26
- data/app/controllers/pwb/api/v1/website_controller.rb +11 -11
- data/app/controllers/pwb/application_controller.rb +22 -11
- data/app/controllers/pwb/{sections_controller.rb → contact_us_controller.rb} +24 -45
- data/app/controllers/pwb/css_controller.rb +5 -2
- data/app/controllers/pwb/pages_controller.rb +36 -0
- data/app/controllers/pwb/search_controller.rb +33 -11
- data/app/controllers/pwb/squares_controller.rb +48 -0
- data/app/controllers/pwb/welcome_controller.rb +30 -5
- data/app/helpers/pwb/application_helper.rb +50 -49
- data/app/helpers/pwb/css_helper.rb +14 -0
- data/app/helpers/pwb/navigation_helper.rb +82 -0
- data/app/models/pwb/contact.rb +25 -0
- data/app/models/pwb/content.rb +26 -8
- data/app/models/pwb/content_photo.rb +18 -0
- data/app/models/pwb/link.rb +41 -0
- data/app/models/pwb/message.rb +1 -1
- data/app/models/pwb/page.rb +227 -0
- data/app/models/pwb/page_content.rb +33 -0
- data/app/models/pwb/page_part.rb +17 -0
- data/app/models/pwb/preset_style.rb +37 -0
- data/app/models/pwb/prop.rb +4 -0
- data/app/models/pwb/website.rb +64 -9
- data/app/resources/pwb/api/v1/{section_resource.rb → client_resource.rb} +3 -4
- data/app/resources/pwb/api/v1/property_resource.rb +23 -4
- data/app/resources/pwb/api/v1/web_content_resource.rb +1 -1
- data/app/resources/pwb/api_public/v1/prop_resource.rb +9 -2
- data/{db/cms_fixtures/cms/layouts/about-us/content.html → app/themes/airbnb/views/layouts/pwb/_generic_modal.html.erb} +0 -0
- data/{db/cms_fixtures/cms/layouts/about-us/javascript.js → app/themes/airbnb/views/layouts/pwb/_login_modal.html.erb} +0 -0
- data/app/themes/airbnb/views/layouts/pwb/application.html.erb +82 -0
- data/app/themes/airbnb/views/pwb/_footer.html.erb +25 -0
- data/app/themes/airbnb/views/pwb/props/_images_section_carousel.html.erb +43 -0
- data/app/themes/airbnb/views/pwb/props/show.html.erb +69 -0
- data/app/themes/airbnb/views/pwb/search/_search_form_for_rent.html.erb +183 -0
- data/app/themes/airbnb/views/pwb/search/_search_results.html.erb +34 -0
- data/app/themes/airbnb/views/pwb/search/buy.html.erb +65 -0
- data/app/themes/airbnb/views/pwb/search/rent.html.erb +87 -0
- data/app/themes/airbnb/views/pwb/sections/_contact_us_form.html.erb +49 -0
- data/app/themes/airbnb/views/pwb/sections/contact_us.html.erb +56 -0
- data/app/themes/airbnb/views/pwb/welcome/_content_area_cols.html.erb +12 -0
- data/app/themes/airbnb/views/pwb/welcome/_single_property_row.html.erb +51 -0
- data/app/themes/airbnb/views/pwb/welcome/index.html.erb +66 -0
- data/app/themes/berlin/views/pwb/_footer.html.erb +15 -20
- data/app/themes/berlin/views/pwb/_header.html.erb +7 -9
- data/app/themes/berlin/views/pwb/pages/show.html.erb +50 -0
- data/app/themes/berlin/views/pwb/search/buy.html.erb +1 -1
- data/app/themes/berlin/views/pwb/search/rent.html.erb +1 -2
- data/app/themes/berlin/views/pwb/sections/contact_us.html.erb +1 -1
- data/app/themes/berlin/views/pwb/welcome/index.html.erb +51 -7
- data/app/themes/config.json +14 -0
- data/app/themes/default/views/pwb/{sections/cms.html.erb → pages/show.html.erb} +9 -8
- data/app/themes/default/views/pwb/search/buy.html.erb +1 -1
- data/app/themes/default/views/pwb/search/rent.html.erb +1 -1
- data/app/themes/default/views/pwb/sections/about_us.html.erb +8 -7
- data/app/themes/default/views/pwb/sections/contact_us.html.erb +40 -30
- data/app/themes/default/views/pwb/sections/static.html.erb +3 -20
- data/app/themes/default/views/pwb/welcome/_single_property_row.html.erb +1 -1
- data/app/themes/default/views/pwb/welcome/index.html.erb +7 -38
- data/app/themes/matt/views/layouts/pwb/application.html.erb +45 -0
- data/app/themes/matt/views/pwb/_footer.html.erb +60 -0
- data/app/themes/matt/views/pwb/_header.html.erb +105 -0
- data/app/themes/matt/views/pwb/search/buy.html.erb +65 -0
- data/app/themes/matt/views/pwb/welcome/index.html.erb +132 -0
- data/app/themes/vic/views/layouts/pwb/application.html.erb +94 -0
- data/app/themes/vic/views/pwb/_header.html.erb +100 -0
- data/app/themes/vic/views/pwb/props/_images_section_carousel.html.erb +43 -0
- data/app/themes/vic/views/pwb/props/show.html.erb +69 -0
- data/app/themes/vic/views/pwb/search/buy.html.erb +65 -0
- data/app/themes/vic/views/pwb/search/rent.html.erb +65 -0
- data/app/themes/vic/views/pwb/sections/_contact_us_form.html.erb +49 -0
- data/app/themes/vic/views/pwb/sections/contact_us.html.erb +56 -0
- data/app/themes/vic/views/pwb/welcome/_content_area_cols.html.erb +12 -0
- data/app/themes/vic/views/pwb/welcome/_single_property_row.html.erb +51 -0
- data/app/themes/vic/views/pwb/welcome/index.html.erb +27 -0
- data/app/views/devise/shared/_links.html.erb +1 -1
- data/app/views/layouts/pwb/admin_panel_error.html.erb +19 -0
- data/app/views/layouts/pwb/admin_panel_legacy_1.html.erb +21 -0
- data/app/views/layouts/pwb/squares.html.erb +72 -0
- data/app/views/pwb/_footer.html.erb +2 -6
- data/app/views/pwb/_header.html.erb +23 -25
- data/app/views/pwb/admin_panel/show_legacy_1.html.erb +3 -0
- data/app/views/pwb/custom_css/_berlin.css.erb +0 -67
- data/app/views/pwb/custom_css/_default.css.erb +0 -22
- data/app/views/pwb/custom_css/_shared.css.erb +4 -3
- data/app/views/pwb/custom_css/_vic.css.erb +10 -0
- data/app/views/pwb/props/_images_section_carousel.html.erb +1 -1
- data/app/views/pwb/search/_search_result_item.html.erb +1 -1
- data/app/views/pwb/squares/show_client.html.erb +26 -0
- data/app/views/pwb/squares/show_prop.html.erb +26 -0
- data/app/views/pwb/squares/vue.html.erb +1 -0
- data/config/client_setups/default.json +28 -27
- data/config/initializers/i18n_globalise.rb +4 -0
- data/config/locales/admin.en.yml +38 -7
- data/config/locales/admin.es.yml +60 -6
- data/config/locales/admin.pt.yml +474 -0
- data/config/locales/admin.ru.yml +49 -6
- data/config/locales/devise.it.yml +137 -0
- data/config/locales/en.yml +7 -7
- data/config/locales/it.yml +160 -0
- data/config/locales/pt.yml +2 -0
- data/config/locales/rails.it.yml +213 -0
- data/config/locales/tr.yml +36 -36
- data/config/locales/vi.yml +5 -5
- data/config/preset_styles/green_amber.json +23 -0
- data/config/preset_styles/purple_teal.json +23 -0
- data/config/preset_styles/red_light.json +18 -0
- data/config/routes.rb +35 -23
- data/db/example_images/carousel_villa_with_pool.jpg +0 -0
- data/db/example_images/flat_luxury_dining_area.jpg +0 -0
- data/db/example_images/flat_luxury_living_area.jpg +0 -0
- data/db/migrate/20161120103546_create_pwb_props.rb +3 -3
- data/db/migrate/20161122174847_create_pwb_sections.rb +9 -8
- data/db/migrate/20161128221919_create_pwb_clients.rb +1 -0
- data/db/migrate/20170315195413_add_extra_cols_to_pwb_sections.rb +7 -6
- data/db/migrate/20170716075456_create_pwb_pages.rb +23 -0
- data/db/migrate/20170716110121_translate_pages.rb +17 -0
- data/db/migrate/20170720183443_create_pwb_links.rb +29 -0
- data/db/migrate/20170720201601_translate_links.rb +13 -0
- data/db/migrate/20170915094326_create_pwb_page_contents.rb +17 -0
- data/db/migrate/20170917215533_add_page_part_key_to_pwb_contents.rb +7 -0
- data/db/migrate/20170919134945_add_block_key_to_pwb_content_photos.rb +5 -0
- data/db/migrate/20170923195321_create_pwb_contacts.rb +33 -0
- data/db/migrate/20171011212930_create_pwb_page_parts.rb +30 -0
- data/db/seeds/translations_es.rb +1 -87
- data/db/seeds/translations_it.rb +92 -0
- data/db/yml_seeds/agency_address.yml +8 -8
- data/db/yml_seeds/contacts.yml +13 -0
- data/db/yml_seeds/content_translations/en.yml +73 -0
- data/db/yml_seeds/content_translations/es.yml +74 -0
- data/db/yml_seeds/content_translations/it.yml +73 -0
- data/db/yml_seeds/content_translations/pt.yml +73 -0
- data/db/yml_seeds/{content/footer.yml → footer.yml} +0 -0
- data/db/yml_seeds/links.yml +389 -0
- data/db/yml_seeds/page_parts/ABOUT_PAGE_PARTS.md +5 -0
- data/db/yml_seeds/page_parts/about-us__content_html.yml +24 -0
- data/db/yml_seeds/page_parts/about-us__our_agency.yml +51 -0
- data/db/yml_seeds/page_parts/contact-us__content_html.yml +24 -0
- data/db/yml_seeds/page_parts/contact-us__form_and_map.yml +17 -0
- data/db/yml_seeds/page_parts/home__about_us_services.yml +85 -0
- data/db/yml_seeds/page_parts/home__content_html.yml +24 -0
- data/db/yml_seeds/page_parts/home__landing_hero.yml +51 -0
- data/db/yml_seeds/page_parts/legal__content_html.yml +24 -0
- data/db/yml_seeds/page_parts/privacy__content_html.yml +24 -0
- data/db/yml_seeds/page_parts/sell__content_html.yml +24 -0
- data/db/yml_seeds/pages/about.yml +11 -0
- data/db/yml_seeds/pages/buy.yml +23 -0
- data/db/yml_seeds/pages/contact.yml +12 -0
- data/db/yml_seeds/pages/home.yml +15 -0
- data/db/yml_seeds/pages/legal_notice.yml +11 -0
- data/db/yml_seeds/pages/privacy_policy.yml +11 -0
- data/db/yml_seeds/pages/rent.yml +15 -0
- data/db/yml_seeds/pages/sell.yml +13 -0
- data/db/yml_seeds/prop/flat_for_rent.yml +11 -11
- data/db/yml_seeds/prop/flat_for_rent_2.yml +57 -0
- data/db/yml_seeds/prop/flat_for_sale.yml +11 -12
- data/db/yml_seeds/prop/flat_for_sale_2.yml +56 -0
- data/db/yml_seeds/prop/villa_for_rent.yml +14 -14
- data/db/yml_seeds/prop/villa_for_sale.yml +15 -15
- data/db/yml_seeds/prop_spain/flat_for_rent.yml +58 -0
- data/db/yml_seeds/prop_spain/flat_for_sale.yml +58 -0
- data/db/yml_seeds/prop_spain/villa_for_rent.yml +58 -0
- data/db/yml_seeds/prop_spain/villa_for_sale.yml +59 -0
- data/db/yml_seeds/sections.yml +119 -119
- data/db/yml_seeds/{content → to_delete}/about_us.yml +0 -0
- data/db/yml_seeds/{content → to_delete}/carousel.yml +0 -0
- data/db/yml_seeds/{content → to_delete}/content_columns.yml +0 -0
- data/db/yml_seeds/to_delete/footer.yml +15 -0
- data/db/yml_seeds/{content → to_delete}/sell.yml +0 -0
- data/db/yml_seeds/{content → to_delete}/static.yml +0 -0
- data/db/yml_seeds/website.yml +2 -1
- data/lib/pwb/engine.rb +16 -2
- data/lib/pwb/pages_seeder.rb +190 -0
- data/lib/pwb/seeder.rb +56 -14
- data/lib/pwb/version.rb +1 -1
- data/lib/tasks/pwb_tasks.rake +19 -2
- data/spec/controllers/pwb/api/v1/propeties_controller_spec.rb +2 -2
- data/spec/controllers/pwb/welcome_controller_spec.rb +18 -5
- data/spec/dummy/config/initializers/assets.rb +9 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/config/secrets.yml +3 -0
- data/spec/dummy/db/migrate/20171201161323_create_property_web_scraper_import_hosts.property_web_scraper.rb +22 -0
- data/spec/dummy/db/migrate/20171201161324_create_property_web_scraper_listings.property_web_scraper.rb +84 -0
- data/spec/dummy/db/schema.rb +475 -398
- data/spec/factories/pwb_contacts.rb +5 -0
- data/spec/factories/pwb_contents.rb +3 -0
- data/spec/factories/pwb_links.rb +5 -0
- data/spec/factories/pwb_page_contents.rb +5 -0
- data/spec/factories/pwb_page_parts.rb +8 -0
- data/spec/factories/pwb_pages.rb +29 -0
- data/spec/factories/pwb_prop_photos.rb +11 -2
- data/spec/fixtures/mls/properties_interealty.json +1 -496
- data/spec/fixtures/params/bulk_create.json +3 -3
- data/spec/libraries/pwb/pages_seeder_spec.rb +56 -0
- data/spec/libraries/pwb/seeder_spec.rb +14 -10
- data/spec/models/pwb/contact_spec.rb +7 -0
- data/spec/models/pwb/link_spec.rb +7 -0
- data/spec/models/pwb/page_content_spec.rb +7 -0
- data/spec/models/pwb/page_part_spec.rb +7 -0
- data/spec/models/pwb/page_spec.rb +28 -0
- data/spec/models/pwb/website_spec.rb +10 -0
- data/spec/rails_helper.rb +1 -1
- data/spec/requests/pwb/themes_spec.rb +15 -10
- data/spec/views/pwb/application_layout.html.erb_spec.rb +28 -21
- data/spec/views/pwb/contact_us.html.erb_spec.rb +11 -0
- data/spec/views/pwb/welcome.html.erb_spec.rb +13 -9
- metadata +230 -244
- data/app/controllers/pwb/api/v1/cms_pages_controller.rb +0 -102
- data/app/controllers/pwb/comfy_controller.rb +0 -106
- data/app/models/pwb/cms_page_container.rb +0 -9
- data/app/models/pwb/section.rb +0 -35
- data/app/models/pwb/welcome.rb +0 -4
- data/app/resources/pwb/api/v1/cms_block_resource.rb +0 -11
- data/app/resources/pwb/api/v1/cms_page_resource.rb +0 -27
- data/app/themes/berlin/views/pwb/sections/about_us.html.erb +0 -59
- data/app/themes/berlin/views/pwb/sections/cms.html.erb +0 -34
- data/app/themes/berlin/views/pwb/sections/static.html.erb +0 -58
- data/app/views/pwb/search/_search_result_item_to_del.html.erb +0 -56
- data/config/cms_page_containers/about-us.json +0 -18
- data/config/cms_page_containers/about.json +0 -107
- data/config/cms_page_containers/landing.json +0 -19
- data/config/cms_page_containers/legal.json +0 -17
- data/config/cms_page_containers/sell.json +0 -96
- data/config/initializers/comfortable_mexican_sofa.rb +0 -142
- data/config/initializers/i18n.rb +0 -1
- data/db/cms_fixtures/cms/categories/pages.yml +0 -3
- data/db/cms_fixtures/cms/files/_rerenting-landing_framed.png.yml +0 -6
- data/db/cms_fixtures/cms/files/rerenting-landing_framed.png +0 -0
- data/db/cms_fixtures/cms/layouts/about-us/attributes.yml +0 -4
- data/db/cms_fixtures/cms/layouts/about-us/people/attributes.yml +0 -4
- data/db/cms_fixtures/cms/layouts/about-us/people/content.html +0 -55
- data/db/cms_fixtures/cms/layouts/about-us/services/attributes.yml +0 -4
- data/db/cms_fixtures/cms/layouts/about-us/services/content.html +0 -32
- data/db/cms_fixtures/cms/layouts/about-us/services/javascript.js +0 -0
- data/db/cms_fixtures/cms/layouts/about-us/services/stylesheet.css +0 -0
- data/db/cms_fixtures/cms/layouts/about-us/stylesheet.css +0 -0
- data/db/cms_fixtures/cms/layouts/default-layout/attributes.yml +0 -4
- data/db/cms_fixtures/cms/layouts/default-layout/content.html +0 -51
- data/db/cms_fixtures/cms/layouts/default-layout/javascript.js +0 -0
- data/db/cms_fixtures/cms/layouts/default-layout/stylesheet.css +0 -0
- data/db/cms_fixtures/cms/pages/index/about-us/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_d.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/services/content_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/content_b.html +0 -0
- data/db/cms_fixtures/cms/pages/index/about-us/services/content_c.html +0 -0
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_b.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_c.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/title_a.html +0 -1
- data/db/cms_fixtures/cms/pages/index/about-us/services/title_b.html +0 -0
- data/db/cms_fixtures/cms/pages/index/about-us/services/title_c.html +0 -0
- data/db/cms_fixtures/cms/pages/index/attributes.yml +0 -8
- data/db/cms_fixtures/cms/pages/index/content.html +0 -1
- data/db/cms_fixtures/cms/pages/index/title.html +0 -0
- data/db/cms_fixtures/cms/snippets/snippet1/attributes.yml +0 -3
- data/db/cms_fixtures/cms/snippets/snippet1/content.html +0 -1
- data/db/cms_fixtures/sample-site/categories/files.yml +0 -1
- data/db/cms_fixtures/sample-site/categories/pages.yml +0 -1
- data/db/cms_fixtures/sample-site/categories/snippets.yml +0 -1
- data/db/cms_fixtures/sample-site/files/_sample.jpg.yml +0 -5
- data/db/cms_fixtures/sample-site/files/sample.jpg +0 -0
- data/db/cms_fixtures/sample-site/layouts/default/attributes.yml +0 -1
- data/db/cms_fixtures/sample-site/layouts/default/content.html +0 -5
- data/db/cms_fixtures/sample-site/layouts/default/javascript.js +0 -1
- data/db/cms_fixtures/sample-site/layouts/default/nested/attributes.yml +0 -2
- data/db/cms_fixtures/sample-site/layouts/default/nested/content.haml +0 -3
- data/db/cms_fixtures/sample-site/layouts/default/nested/javascript.js +0 -1
- data/db/cms_fixtures/sample-site/layouts/default/nested/stylesheet.css +0 -1
- data/db/cms_fixtures/sample-site/layouts/default/stylesheet.css +0 -1
- data/db/cms_fixtures/sample-site/pages/index/attributes.yml +0 -6
- data/db/cms_fixtures/sample-site/pages/index/child/attributes.yml +0 -3
- data/db/cms_fixtures/sample-site/pages/index/child/left.haml +0 -1
- data/db/cms_fixtures/sample-site/pages/index/child/right.html +0 -1
- data/db/cms_fixtures/sample-site/pages/index/child/thumbnail.png +0 -0
- data/db/cms_fixtures/sample-site/pages/index/content.html +0 -2
- data/db/cms_fixtures/sample-site/snippets/default/attributes.yml +0 -4
- data/db/cms_fixtures/sample-site/snippets/default/content.html +0 -1
- data/db/migrate/20170315212222_translate_sections.rb +0 -15
- data/db/migrate/20170513221300_create_cms.rb +0 -133
- data/lib/pwb/cms_data_loader.rb +0 -38
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/1/carousel_windows.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/2/carousel_deck_chair.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/3/carousel_grass.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/4/carousel_grass.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/gdaje3atcct1gx2ngv9u.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/new_villa.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/kitchen_modern.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/rxo23syongfydjpoizrd.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/3/mansion_front.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/3/vzlptgtccsk2d2ewp4id.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/4/mansion_bedroom.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/4/xwayprwnmmmhrzrgwvch.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/5/flat_window.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/5/ilxn2u37bak0v60u6f8q.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/6/kitchen_classic.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/7/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/8/lounge_cosy.jpg +0 -0
- data/spec/factories/pwb_sections.rb +0 -4
- data/spec/models/pwb/section_spec.rb +0 -11
@@ -0,0 +1,33 @@
|
|
1
|
+
module Pwb
|
2
|
+
class PageContent < ApplicationRecord
|
3
|
+
belongs_to :page
|
4
|
+
belongs_to :content
|
5
|
+
# https://stackoverflow.com/questions/5856838/scope-with-join-on-has-many-through-association
|
6
|
+
|
7
|
+
scope :ordered_visible, -> () { where(visible_on_page: true).order('sort_order asc') }
|
8
|
+
|
9
|
+
# if the page_content represents a rails_page_part, will return the page_part_key
|
10
|
+
# else will return the raw html
|
11
|
+
def get_html_or_page_part_key
|
12
|
+
if self.is_rails_part
|
13
|
+
# page_part_key
|
14
|
+
return page_part_key
|
15
|
+
else
|
16
|
+
return content.present? ? content.raw : nil
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def as_json(options = nil)
|
21
|
+
super({only: [
|
22
|
+
"sort_order", "visible_on_page"
|
23
|
+
],
|
24
|
+
methods: ["content","content_page_part_key"]
|
25
|
+
}.merge(options || {}))
|
26
|
+
end
|
27
|
+
|
28
|
+
def content_page_part_key
|
29
|
+
content.present? ? content.page_part_key : ""
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# page_parts consist of liquid template and block_contents which
|
2
|
+
# can be parsed to generate html content
|
3
|
+
# Resulting html content is stored in page content model
|
4
|
+
module Pwb
|
5
|
+
class PagePart < ApplicationRecord
|
6
|
+
belongs_to :page, optional: true, foreign_key: "page_slug", primary_key: "slug"
|
7
|
+
|
8
|
+
def as_json(options = nil)
|
9
|
+
super({only: [
|
10
|
+
"is_rails_part", "page_part_key", "page_slug", "editor_setup", "block_contents"
|
11
|
+
],
|
12
|
+
methods: []
|
13
|
+
}.merge(options || {}))
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Pwb
|
2
|
+
# https://github.com/zilkey/active_hash
|
3
|
+
class PresetStyle < ActiveJSON::Base
|
4
|
+
set_root_path "#{Pwb::Engine.root}/config/preset_styles"
|
5
|
+
use_multiple_files
|
6
|
+
set_filenames "purple_teal","green_amber"
|
7
|
+
# , "green_light"
|
8
|
+
|
9
|
+
def class_name element_name
|
10
|
+
self[:associations][element_name] || ""
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.default_values
|
14
|
+
Pwb::PresetStyle.first.attributes.as_json
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
# purple teal
|
19
|
+
# $primary-color-dark: #7B1FA2
|
20
|
+
# $primary-color: #9C27B0
|
21
|
+
# $primary-color-light: #E1BEE7
|
22
|
+
# $primary-color-text: #FFFFFF
|
23
|
+
# $accent-color: #009688
|
24
|
+
# $primary-text-color: #212121
|
25
|
+
# $secondary-text-color: #757575
|
26
|
+
# $divider-color: #BDBDBD
|
27
|
+
|
28
|
+
# /* Palette generated by Material Palette - materialpalette.com/green/amber */
|
29
|
+
|
30
|
+
# $primary-color-dark: #388E3C
|
31
|
+
# $primary-color: #4CAF50
|
32
|
+
# $primary-color-light: #C8E6C9
|
33
|
+
# $primary-color-text: #FFFFFF
|
34
|
+
# $accent-color: #FFC107
|
35
|
+
# $primary-text-color: #212121
|
36
|
+
# $secondary-text-color: #757575
|
37
|
+
# $divider-color: #BDBDBD
|
data/app/models/pwb/prop.rb
CHANGED
@@ -4,6 +4,10 @@ module Pwb
|
|
4
4
|
globalize_accessors locales: I18n.available_locales
|
5
5
|
# globalize_accessors locales: [:en, :ca, :es, :fr, :ar, :de, :ru, :pt]
|
6
6
|
|
7
|
+
# below needed to avoid "... is not an attribute known to Active Record" warnings
|
8
|
+
attribute :title
|
9
|
+
attribute :description
|
10
|
+
|
7
11
|
# Use EUR as model level currency
|
8
12
|
# register_currency :eur
|
9
13
|
|
data/app/models/pwb/website.rb
CHANGED
@@ -3,6 +3,9 @@ module Pwb
|
|
3
3
|
extend ActiveHash::Associations::ActiveRecordExtensions
|
4
4
|
belongs_to_active_hash :theme, optional: true, foreign_key: "theme_name", class_name: "Pwb::Theme", shortcuts: [:friendly_name], primary_key: "name"
|
5
5
|
|
6
|
+
# TODO - add favicon image (and logo image directly)
|
7
|
+
# as well as details hash for storing pages..
|
8
|
+
|
6
9
|
def self.unique_instance
|
7
10
|
# there will be only one row, and its ID must be '1'
|
8
11
|
begin
|
@@ -17,6 +20,28 @@ module Pwb
|
|
17
20
|
end
|
18
21
|
end
|
19
22
|
|
23
|
+
def admin_page_links
|
24
|
+
# return update_admin_page_links
|
25
|
+
if self.configuration["admin_page_links"].present?
|
26
|
+
return configuration["admin_page_links"]
|
27
|
+
else
|
28
|
+
return update_admin_page_links
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# TODO - call this each time a page
|
33
|
+
# needs to be added or
|
34
|
+
# deleted from admin
|
35
|
+
def update_admin_page_links
|
36
|
+
admin_page_links = []
|
37
|
+
Pwb::Link.ordered_visible_admin.each do |link|
|
38
|
+
admin_page_links.push link.as_json
|
39
|
+
end
|
40
|
+
self.configuration["admin_page_links"] = admin_page_links
|
41
|
+
self.save!
|
42
|
+
return admin_page_links
|
43
|
+
end
|
44
|
+
|
20
45
|
def as_json(options = nil)
|
21
46
|
super({only: [
|
22
47
|
"company_display_name", "theme_name",
|
@@ -27,7 +52,7 @@ module Pwb
|
|
27
52
|
"sale_price_options_from", "sale_price_options_till",
|
28
53
|
"rent_price_options_from", "rent_price_options_till"
|
29
54
|
],
|
30
|
-
methods: ["style_variables"]}.merge(options || {}))
|
55
|
+
methods: ["style_variables","admin_page_links"]}.merge(options || {}))
|
31
56
|
end
|
32
57
|
|
33
58
|
enum default_area_unit: { sqmt: 0, sqft: 1 }
|
@@ -58,7 +83,9 @@ module Pwb
|
|
58
83
|
|
59
84
|
|
60
85
|
# admin client & default.css.erb uses style_variables
|
61
|
-
# but it is stored
|
86
|
+
# but it is stored in style_variables_for_theme json col
|
87
|
+
# In theory, could have different style_variables per theme but not
|
88
|
+
# doing that right now
|
62
89
|
def style_variables
|
63
90
|
default_style_variables = {
|
64
91
|
"primary_color" => "#e91b23", # red
|
@@ -73,6 +100,40 @@ module Pwb
|
|
73
100
|
def style_variables=(style_variables)
|
74
101
|
style_variables_for_theme["default"] = style_variables
|
75
102
|
end
|
103
|
+
# spt 2017 - above 2 will be redundant once vic becomes default layout
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
# below used when rendering to decide which class names
|
108
|
+
# to use for which elements
|
109
|
+
def get_element_class element_name
|
110
|
+
style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values
|
111
|
+
style_associations = style_details["associations"] || []
|
112
|
+
style_associations[element_name] || ""
|
113
|
+
end
|
114
|
+
|
115
|
+
# below used by custom stylesheet generator to decide
|
116
|
+
# values for various class names (mainly colors)
|
117
|
+
def get_style_var var_name
|
118
|
+
style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values
|
119
|
+
style_vars = style_details["variables"] || []
|
120
|
+
style_vars[var_name] || ""
|
121
|
+
end
|
122
|
+
|
123
|
+
# allow direct bulk setting of styles from admin UI
|
124
|
+
def style_settings=(style_settings)
|
125
|
+
style_variables_for_theme["vic"] = style_settings
|
126
|
+
end
|
127
|
+
|
128
|
+
# allow setting of styles to a preset config from admin UI
|
129
|
+
def style_settings_from_preset=(preset_style_name)
|
130
|
+
preset_style = Pwb::PresetStyle.where(name: preset_style_name).first
|
131
|
+
if preset_style
|
132
|
+
style_variables_for_theme["vic"] = preset_style.attributes.as_json
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
|
76
137
|
|
77
138
|
def body_style
|
78
139
|
body_style = ""
|
@@ -112,13 +173,7 @@ module Pwb
|
|
112
173
|
end
|
113
174
|
|
114
175
|
def render_google_analytics
|
115
|
-
|
116
|
-
if self.analytics_id.present?
|
117
|
-
return true
|
118
|
-
else
|
119
|
-
return false
|
120
|
-
end
|
121
|
-
|
176
|
+
Rails.env.production? && analytics_id.present?
|
122
177
|
end
|
123
178
|
end
|
124
179
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Pwb
|
2
|
-
class Api::V1::
|
3
|
-
model_name 'Pwb::
|
4
|
-
attributes :
|
5
|
-
# attributes :link_title_es, :link_title_en, :link_title_ar
|
2
|
+
class Api::V1::ClientResource < JSONAPI::Resource
|
3
|
+
model_name 'Pwb::Client'
|
4
|
+
attributes :first_names, :last_names
|
6
5
|
# attributes :page_title_es, :page_title_en, :page_title_ar
|
7
6
|
# attributes :show_in_top_nav, :show_in_footer, :is_page
|
8
7
|
# attributes :key, :contents
|
@@ -2,6 +2,29 @@ module Pwb
|
|
2
2
|
class Api::V1::PropertyResource < JSONAPI::Resource
|
3
3
|
model_name 'Pwb::Prop'
|
4
4
|
|
5
|
+
# http://jsonapi-resources.com/v0.9/guide/resources.html#Callbacks
|
6
|
+
# thought of using below to dynamically set globalize attributes dynamically but
|
7
|
+
# it doesn't get called when resource is just being retrieved...
|
8
|
+
# after_create :add_attributes
|
9
|
+
# def add_attributes
|
10
|
+
# binding.pry
|
11
|
+
# end
|
12
|
+
|
13
|
+
attributes :title, :description
|
14
|
+
attributes :title_en, :description_en
|
15
|
+
attributes :title_es, :description_es
|
16
|
+
attributes :title_it, :description_it
|
17
|
+
attributes :title_de, :description_de
|
18
|
+
attributes :title_ru, :description_ru
|
19
|
+
attributes :title_pt, :description_pt
|
20
|
+
attributes :title_fr, :description_fr
|
21
|
+
attributes :title_tr, :description_tr
|
22
|
+
attributes :title_nl, :description_nl
|
23
|
+
attributes :title_vi, :description_vi
|
24
|
+
attributes :title_ar, :description_ar
|
25
|
+
attributes :title_ca, :description_ca
|
26
|
+
|
27
|
+
|
5
28
|
attributes :area_unit, :photos, :property_photos, :extras
|
6
29
|
attributes :street_address, :street_name, :street_number, :postal_code
|
7
30
|
attributes :city, :region, :currency
|
@@ -11,10 +34,6 @@ module Pwb
|
|
11
34
|
attributes :constructed_area, :year_construction, :plot_area
|
12
35
|
attributes :prop_type_key, :prop_state_key, :prop_origin_key
|
13
36
|
|
14
|
-
attributes :title_fr, :title_de, :title_ru, :title_pt
|
15
|
-
attributes :description_fr, :description_de, :description_ru, :description_pt
|
16
|
-
attributes :title_es, :title_en, :title_ar, :description_es, :description_en, :description_ar
|
17
|
-
|
18
37
|
attributes :for_sale, :for_rent_short_term, :for_rent_long_term, :obscure_map, :hide_map
|
19
38
|
|
20
39
|
attributes :price_sale_current_cents, :price_sale_original_cents
|
@@ -3,7 +3,7 @@ module Pwb
|
|
3
3
|
model_name 'Pwb::Content'
|
4
4
|
attributes :key, :tag
|
5
5
|
attributes :raw_fr, :raw_de, :raw_ru, :raw_pt
|
6
|
-
attributes :raw_es, :raw_en, :
|
6
|
+
attributes :raw_es, :raw_en, :content_photos
|
7
7
|
|
8
8
|
# /api/v1/web-contents?filter%5Btag%5D=home&filter%5Bkey%5D=tagLine
|
9
9
|
# below is needed for above to work
|
@@ -2,6 +2,15 @@ module Pwb
|
|
2
2
|
class ApiPublic::V1::PropResource < JSONAPI::Resource
|
3
3
|
model_name 'Pwb::Prop'
|
4
4
|
|
5
|
+
attributes :title, :description
|
6
|
+
attributes :title_en, :description_en
|
7
|
+
attributes :title_es, :description_es
|
8
|
+
attributes :title_it, :description_it
|
9
|
+
attributes :title_de, :description_de
|
10
|
+
attributes :title_ru, :description_ru
|
11
|
+
attributes :title_pt, :description_pt
|
12
|
+
attributes :title_fr, :description_fr
|
13
|
+
|
5
14
|
attributes :area_unit, :photos, :property_photos, :extras
|
6
15
|
attributes :street_address, :street_number, :postal_code
|
7
16
|
attributes :city, :region, :currency
|
@@ -11,8 +20,6 @@ module Pwb
|
|
11
20
|
attributes :constructed_area, :year_construction, :plot_area
|
12
21
|
attributes :prop_type_key, :prop_state_key, :prop_origin_key
|
13
22
|
|
14
|
-
attributes :title_es, :title_en, :title_ar, :description_es, :description_en, :description_ar
|
15
|
-
|
16
23
|
attributes :for_sale, :for_rent_short_term, :for_rent_long_term, :obscure_map, :hide_map
|
17
24
|
|
18
25
|
attributes :price_sale_current_cents, :price_sale_original_cents
|
File without changes
|
File without changes
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns:esi="http://www.edge-delivery.org/esi/1.0" prefix="og: http://ogp.me/ns#">
|
3
|
+
<head>
|
4
|
+
<title><%= content_for?( :title ) ? "#{ yield :title } | StayBay" : 'Corporate Housing Marketplace | Furnished Rentals | StayBay' %></title>
|
5
|
+
<%# include_gon %>
|
6
|
+
<% if content_for? :og_title %>
|
7
|
+
<meta property="og:title" content="<%= yield :og_title %>" />
|
8
|
+
<% else %>
|
9
|
+
<meta property="og:title" content="<%= content_for?( :title ) ? "#{ yield :title } | StayBay" : 'Corporate Housing Marketplace | Furnished Rentals | StayBay' %>" />
|
10
|
+
<% end %>
|
11
|
+
<% if content_for? :og_type %>
|
12
|
+
<meta property="og:type" content="<%= yield :og_type %>" />
|
13
|
+
<% end %>
|
14
|
+
<% if content_for? :og_url %>
|
15
|
+
<meta property="og:url" content="<%= yield :og_url %>" />
|
16
|
+
<% else %>
|
17
|
+
<meta property="og:url" content="<%= root_url protocol: 'https' %>" />
|
18
|
+
<% end %>
|
19
|
+
<% if content_for? :og_image %>
|
20
|
+
<meta property="og:image" content="<%= yield :og_image %>" />
|
21
|
+
<% else %>
|
22
|
+
<meta property="og:image" content="<%= asset_path( 'staybay-logo-for-fbgraph.png' ) %>" />
|
23
|
+
<meta property="og:image:secure_url" content="<%= asset_path( 'staybay-logo-for-fbgraph.png' ) %>" />
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
27
|
+
|
28
|
+
<link rel="shortcut icon" href="<%= asset_path("favicon.ico") %>" />
|
29
|
+
|
30
|
+
<link type="text/css" rel="stylesheet" href="http<%= 's' if Rails.env.production? %>://fast.fonts.net/cssapi/8716b186-e069-4784-9261-004ba0e392fc.css"/>
|
31
|
+
<%= stylesheet_link_tag "pwb/themes/airbnb", media: "all" %>
|
32
|
+
<style>
|
33
|
+
<%# custom_styles "airbnb" %>
|
34
|
+
</style>
|
35
|
+
<%= javascript_include_tag "pwb/themes/vic", async: false %>
|
36
|
+
<%= csrf_meta_tags %>
|
37
|
+
|
38
|
+
|
39
|
+
<%# javascript_include_tag "//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52b326503e2b18e6" %>
|
40
|
+
<script type="text/javascript">
|
41
|
+
var stayBayIsIE = false;
|
42
|
+
</script>
|
43
|
+
|
44
|
+
<!--[if lt IE 9]>
|
45
|
+
<script type="text/javascript">
|
46
|
+
var stayBayIsIE = true;
|
47
|
+
</script>
|
48
|
+
<%= javascript_include_tag "polyfill/selectivzr.min.js" %>
|
49
|
+
<%= javascript_include_tag "polyfill/respond.min.js" %>
|
50
|
+
<![endif]-->
|
51
|
+
|
52
|
+
<%# javascript_include_tag "modernizr-2.6.2.js" %>
|
53
|
+
|
54
|
+
</head>
|
55
|
+
|
56
|
+
<!-- body -->
|
57
|
+
<body class=" <%= yield :body_class if content_for? :body_class %> <%# 'logged-in' if logged_in? %>">
|
58
|
+
|
59
|
+
<main id="main-vue">
|
60
|
+
<%= yield %>
|
61
|
+
</main>
|
62
|
+
|
63
|
+
<% if @cached %>
|
64
|
+
<!-- Last rendered on <%= Time.now.to_s %> -->
|
65
|
+
<% end %>
|
66
|
+
|
67
|
+
<%# render partial: 'layouts/impostor' %>
|
68
|
+
|
69
|
+
|
70
|
+
<%= yield :body if content_for?( :body ) %>
|
71
|
+
|
72
|
+
<%= render partial: '/pwb/footer' %>
|
73
|
+
|
74
|
+
<%= render partial: 'layouts/pwb/login_modal' %>
|
75
|
+
|
76
|
+
<%= render partial: 'layouts/pwb/generic_modal' %>
|
77
|
+
|
78
|
+
|
79
|
+
<%= yield :page_script if content_for?( :page_script ) %>
|
80
|
+
|
81
|
+
</body>
|
82
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%# Footer that appears on every page %>
|
2
|
+
|
3
|
+
<footer class="site-footer">
|
4
|
+
<div class="site-content">
|
5
|
+
|
6
|
+
<div class="social-links">
|
7
|
+
<a class="social-in icon-in" href="http://www.linkedin.com/company/staybay-inc" target="_blank"><em>LinkedIn</em></a>
|
8
|
+
<a class="social-twtr icon-twtr" href="https://twitter.com/StayBaycom" target="_blank"><em>Twitter</em></a>
|
9
|
+
<a class="social-fb icon-fb" href="https://www.facebook.com/staybayinc" target="_blank"><em>Facebook</em></a>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<nav id="nav-footer">
|
13
|
+
<ul>
|
14
|
+
<li><%# link_to "About", about_path %> </li>
|
15
|
+
<li><%= link_to "Blog", "http://staybayblog.com/", target: "_blank" %> </li>
|
16
|
+
<li><%# link_to "FAQ", faq_path %> </li>
|
17
|
+
<li><%# link_to "Terms", terms_path %> </li>
|
18
|
+
<li><%# link_to "Privacy", privacy_path %> </li>
|
19
|
+
</ul>
|
20
|
+
</nav>
|
21
|
+
|
22
|
+
<p class="copyright">© 2014 StayBay. All rights reserved.</p>
|
23
|
+
</div>
|
24
|
+
</footer>
|
25
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<slick-carousel inline-template :slick-options="{
|
2
|
+
dots: false,
|
3
|
+
infinite: true,
|
4
|
+
arrows: true,
|
5
|
+
speed: 500,
|
6
|
+
fade: true,
|
7
|
+
cssEase: 'linear'
|
8
|
+
}" style="visibility: hidden">
|
9
|
+
<div class="slick-slider">
|
10
|
+
<% @property_details.prop_photos.each.with_index do |photo, index| %>
|
11
|
+
<%= opt_image_tag(photo, height: 800, crop: "scale", :quality => "auto", class: "", alt: "img") %>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</slick-carousel>
|
15
|
+
<div class="product-gallery">
|
16
|
+
<div class="thumbnail-images" style="display:none;">
|
17
|
+
<%# properties_carousel_footer @property_details.prop_photos %>
|
18
|
+
</div>
|
19
|
+
<div class="wp-block property list no-border">
|
20
|
+
<div class="wp-block-content clearfix">
|
21
|
+
<div class="wp-block-footer style2">
|
22
|
+
<ul class="aux-info">
|
23
|
+
<li><i class="fa fa-arrows-alt"></i>
|
24
|
+
<%= @property_details.constructed_area %>
|
25
|
+
<%= area_unit @property_details %>
|
26
|
+
</li>
|
27
|
+
<li><i class="fa fa-bed"></i>
|
28
|
+
<%= @property_details.count_bedrooms %>
|
29
|
+
</li>
|
30
|
+
<li><i class="fa fa-shower"></i>
|
31
|
+
<%= @property_details.count_bathrooms %>
|
32
|
+
</li>
|
33
|
+
<li>
|
34
|
+
<% if @property_details.has_garage %>
|
35
|
+
<i class="fa fa-car"></i>
|
36
|
+
<%= @property_details.count_garages %>
|
37
|
+
<% end %>
|
38
|
+
</li>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|