diff --git a/README.md b/README.md index 19dc35a..00929bb 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,17 @@ domstor_template: builder: org_id: 13 #Идентификатор вашей организации в системе Домстор location_id: 2004 #Идентификатор города в системе Домстор. 2004 - Кемерово, 2006 - Новокузнецк, 2236 - Новосибирск - cache_dir: '%kernel.cache_dir%' #Директория, где хранится кэш объектов - cache_type: 'file' #Тип кэширования. Поддерживаются: file, apc, array, xcache, memcache - cache_time: 86400 #Время жизни кэша - filter_template_dir: '%kernel.root_dir%/../src/AppBundle/Resources/views/Filters' + cache: + type: 'file' #Тип кэширования. Поддерживаются: file, apc, array, xcache, memcache + time: 86400 #Время жизни кэша + uniq_key: '13' #Уникальный ключ хэша + options: + directory: '%kernel.cache_dir%' #Директория, где хранится кэш объектов + filter: + template_dir: '%kernel.root_dir%/../src/AppBundle/Resources/views/Filters' + links: #Список населенных пунктов для поиска недвижимости + 2004: 'Недвижимость в Кемерово' + 43: 'Недвижимость в Кемеровской области' mailer: request: service: 'default' #mailer-сервис, через который будут отправляться сообщения о поступлении новых заявок diff --git a/app/config/config.yml b/app/config/config.yml index fa11708..ac9616d 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -124,10 +124,17 @@ domstor_template: builder: org_id: 13 location_id: 2004 - cache_dir: '%kernel.cache_dir%' - cache_type: 'file' - cache_time: 86400 - filter_template_dir: '%kernel.root_dir%/../src/AppBundle/Resources/views/Filters' + cache: + type: 'file' + time: 86400 + uniq_key: '13' + options: + directory: '%kernel.cache_dir%' + filter: + template_dir: '%kernel.root_dir%/../src/AppBundle/Resources/views/Filters' + links: + 2004: 'Недвижимость в Кемерово' + 43: 'Недвижимость в Кемеровской области' mailer: request: service: 'default' diff --git a/app/config/sonata/block.yml b/app/config/sonata/block.yml index 4ba0fc1..60bfc27 100644 --- a/app/config/sonata/block.yml +++ b/app/config/sonata/block.yml @@ -32,4 +32,5 @@ sonata_block: domstor.template.block.home.vacancy.service: ~ domstor.template.block.realtyicons.service: ~ domstor.template.block.domstor_filter.service: ~ + domstor.template.block.switch_location.service: ~ \ No newline at end of file diff --git a/composer.json b/composer.json index 1a897f4..eb00294 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "php": ">=7.1", "doctrine/doctrine-bundle": "^1.6", "doctrine/orm": "^2.5", - "domstor-project/template-bundle": "^1.6", + "domstor-project/template-bundle": "1.7.*", "incenteev/composer-parameter-handler": "^2.0", "leafo/scssphp": "^0.6", "patchwork/jsqueeze": "^2.0", diff --git a/src/AppBundle/Controller/ObjectsController.php b/src/AppBundle/Controller/ObjectsController.php index 3b77a47..e351a44 100644 --- a/src/AppBundle/Controller/ObjectsController.php +++ b/src/AppBundle/Controller/ObjectsController.php @@ -9,6 +9,7 @@ use Domstor\TemplateBundle\Model\TitleProviderInterface; use Domstor_Builder; use Domstor_Domstor; +use Symfony\Component\Config\FileLocatorInterface; /** * @Route("/objects") @@ -16,26 +17,33 @@ class ObjectsController extends Controller { /** - * @Route("/{object}/{action}/{id}") + * @param int $location + * @param string $object + * @param string $action + * @param string $id + * @param Request $request + * @Route("/{location}/{object}/{action}/{id}") * @Template() + * @return array */ - public function detailAction($object, $action, $id) { - /* @var $locator \Symfony\Component\Config\FileLocatorInterface */ + public function detailAction($location, $object, $action, $id, Request $request) { + /* @var $locator FileLocatorInterface */ $locator = $this->container->get('file_locator'); /* @var $builder Domstor_Builder */ $builder = $this->get('domstor.template.domstorlib.domstor_builder'); $baseParams = $this->getParameter('domstor.template.domstorlib.domstor_parameters'); $domstor = $builder->build(array( 'org_id' => $baseParams['org_id'], - 'location_id' => $baseParams['location_id'], + 'location_id' => $location, 'cache' => array( - 'type' => $baseParams['cache_type'], - 'time' => $baseParams['cache_time'], - 'uniq_key' => (string)$baseParams['org_id'], - 'options' => array('directory' => $locator->locate($baseParams['cache_dir'])), + 'type' => $baseParams['cache']['type'], + 'time' => $baseParams['cache']['time'], + 'uniq_key' => $baseParams['cache']['uniq_key'], + 'options' => array('directory' => $locator->locate($baseParams['cache']['options']['directory'])), ), 'href_templates' => array( 'object' => $this->generateUrl('app_objects_detail', array( + 'location'=> $location, 'object' => $object, 'action' => $action, 'id' => '-id', @@ -44,7 +52,7 @@ public function detailAction($object, $action, $id) { 'object' => $object, 'action' => $action, )).'?page=%page%sort%filter', - + ), 'href_placeholders' => array( 'id' => '-id', @@ -60,39 +68,46 @@ public function detailAction($object, $action, $id) { } /* @var $titleProvider TitleProviderInterface */ $titleProvider = $this->get('domstor.template.provider.title'); - return array( + return [ 'detail' => $detail, 'object' => $object, 'action' => $action, 'list_url' => $domstor->getListLink($object, $action), - 'list_title' => $titleProvider->getListTitle($object, $action, $domstor->getLocationName('pr')), - ); + 'list_title' => $titleProvider->getListTitle($object, $action, $domstor->getLocationName('pr')) + ]; } /** + * @param string $object + * @param string $action + * @param Request $request * @Route("/{object}/{action}") * @Template() + * @return array */ public function listAction($object, $action, Request $request) { + $locationFromCookie = $request->cookies->get('location_id',null); /* @var $locator \Symfony\Component\Config\FileLocatorInterface */ $locator = $this->container->get('file_locator'); /* @var $builder Domstor_Builder */ $builder = $this->get('domstor.template.domstorlib.domstor_builder'); $baseParams = $this->getParameter('domstor.template.domstorlib.domstor_parameters'); + $locationId = is_numeric($locationFromCookie) ? (int)$locationFromCookie : $baseParams['location_id']; $domstor = $builder->build(array( 'org_id' => $baseParams['org_id'], - 'location_id' => $baseParams['location_id'], + 'location_id' => $locationId, 'cache' => array( - 'type' => $baseParams['cache_type'], - 'time' => $baseParams['cache_time'], - 'uniq_key' => (string)$baseParams['org_id'], - 'options' => array('directory' => $locator->locate($baseParams['cache_dir'])), + 'type' => $baseParams['cache']['type'], + 'time' => $baseParams['cache']['time'], + 'uniq_key' => $baseParams['cache']['uniq_key'], + 'options' => array('directory' => $locator->locate($baseParams['cache']['options']['directory'])), ), 'filter' => array( - 'template_dir' => $locator->locate($baseParams['filter_template_dir']), + 'template_dir' => $locator->locate($baseParams['filter']['template_dir']), ), 'href_templates' => array( 'object' => $this->generateUrl('app_objects_detail', array( + 'location' => $locationId, 'object' => $object, 'action' => $action, 'id' => '-id', @@ -126,6 +141,7 @@ public function listAction($object, $action, Request $request) { 'list' => $list, 'locationsList' => $locationList, 'title' => $titleProvider->getListTitle($object, $action, $domstor->getLocationName('pr')), + 'currentLocation'=>$locationId ]; } diff --git a/src/AppBundle/Resources/public/sass/pages/inner.scss b/src/AppBundle/Resources/public/sass/pages/inner.scss index f16eb35..eb44bd1 100644 --- a/src/AppBundle/Resources/public/sass/pages/inner.scss +++ b/src/AppBundle/Resources/public/sass/pages/inner.scss @@ -1,572 +1,615 @@ -@import "../helpers/mixins"; -@import "../helpers/variables"; - - -.middle_inners { - position: relative; - width: 1110px; - margin: 0 auto; - padding: 0 0 3em 0; - z-index: 100; - - @media only screen and (max-width: 1199px) { - width: 940px; - } - @media only screen and (max-width: 991px) { - width: 740px; - } - @media only screen and (max-width: 767px) { - width: 90%; - } - @media only screen and (max-width: 479px) { - width: 95%; - } - - h1 { - padding-top: 1em; - } - h2, h3, h4 { - padding-bottom: .5em; - - } - p { - font-size: 1em; - - &.data, &.signature { - color: #acacac; - font-size: .9em; - } - } - - ul, ol { - font-size: 1em; - padding-bottom: .5em; - padding-left: 1.5em; - - li { - padding-bottom: .5em; - - ul, ol { - font-size: 1em; - padding-top: .5em; - padding-bottom: 0; - - li:last-child { - padding-bottom: 0; - } - } - ul { - padding-left: 1.5em; - } - } - } - ul li { - list-style-type: none; - position: relative; - padding-left: 20px; - } - ul li:before { - color: #63cac9; - content: "●"; - /* padding-right: .3em; */ - position: absolute; - top: 0px; - left: 0px; - } - ul.after_float li { - overflow: hidden; - } - ol { - padding-left: 2.5em; - - li ul { - padding-left: 1em; - } - } - - .breadcrumbs { - position: relative; - width: 100%; - padding: 1em 0; - color: #989898; - - a, a:visited { - color: #989898; - } - a:hover { - text-decoration: none; - } - } - .table-responsive { - border: 0; - margin: 0; - } - table.txt { - position: relative; - width: 100%; - border-collapse: collapse; - margin: .5em 0 1em 0; - - thead { - th, td { - background: #d9e2f0; - color: #000; - text-align: center; - } - } - th, td { - padding: .4em; - vertical-align: middle; - font-size: 1.15em; - width: auto; - border: 1px solid #daddee; - } - td { - border: 1px solid #daddee; - } - tr:hover { - background: #f2f7ff; - } - - /* &.consalt { - margin-top: 1.5em; - tr td:first-child { - text-align: center; - } - } */ - } - - h1 + table { - margin-top: 0; - } - h3 + table { - margin-top: .2em; - } - .center { - text-align: center; - } - .fotogalery { - position: relative; - padding-top: 1em; - - @media only screen and (max-width: 991px) { - text-align: center; - } - - a { - position: relative; - display: inline-block; - z-index: 1; - } - img { - height: 150px; - margin: 0 1.2em 1.2em 0; - max-width: 100%; - - &.nosize { - height: auto; - } - } - } - - h3 + .fotogalery { - padding-top: 0; - } - a.back { - position: relative; - color: #61c0bb; - border: 2px solid #61c0bb; - text-decoration: none; - font-size: 1.2em; - display: inline-block; - z-index: 10000; - padding: .3em 1.2em .4em 1em; - vertical-align: top; - margin-top: 1.5em; - - &:hover { - color: #026d67; - background: #61c0bb; - } - } - .rght { - position: relative; - float: right; - padding: .7em 0 .2em 1em; - - @media only screen and (max-width: 599px) { - float: none; - padding-left: 0; - text-align: center; - } - } - .lft { - position: relative; - float: left; - padding: .7em 1em .2em 0; - - @media only screen and (max-width: 599px) { - float: none; - padding-right: 0; - text-align: center; - } - } - .clear { - clear: both; - } - .full_width { - padding-bottom: 1em; - - p { - padding-bottom: 0; - } - img { - width: auto; - max-width: 100%; - } - } - - /* НОВОСТИ */ - @import "../components/news"; - .news_home { - padding-top: 0; - - .news_content { - text-align: left; - padding-top: 0; - - .news_block { - display: inline-block; - vertical-align: top; - width: 254px; - padding: 10px; - margin: 15px 10px; - text-align: left; - margin-left: 0; - padding-left: 0; - margin-right: 20px; - - p { - padding: 0; - - a { - color: $color_news; - text-decoration: underline; - - &:hover { - color: $color_news; - text-decoration: none; - } - } - &.data { - /* padding: 0; */ - font-size: .9em; - color: $color_news_data; - } - &:first-child { - padding-bottom: 1em; - } - } - } - p.archive_news { - display: none; - } - } - } - - /* ОТЗЫВЫ */ - .reviews_inners { - position: relative; - width: 100%; - padding: 0 0 3em 0; - - .review { - position: relative; - display: inline-block; - vertical-align: top; - width: 254px; - padding: 10px 10px 10px 0; - margin: 15px 20px 15px 0; - text-align: left; - - p { - padding: 0 0 .5em 0; - color: $color_reviews; - - &.data, &.signature { - padding: 0; - font-size: .9em; - color: $color_reviews_data; - } - /* &:first-child { - height: 140px; - margin-bottom: 1em; - overflow: hidden; - - @media only screen and (min-width: 1600px) { - height: 170px; - } - @media only screen and (max-width: 1199px) { - height: 170px; - } - @media only screen and (max-width: 991px) { - height: 175px; - } - @media only screen and (max-width: 767px) { - height: 255px; - } - @media only screen and (max-width: 479px) { - height: 285px; - } - @media only screen and (max-width: 359px) { - height: 315px; - } - } */ - - a { - color: $color_reviews; - - &:hover { - color: $color_reviews; - text-decoration: none; - } - } - } - } - } - - - /* ВАКАНСИИ */ - .vacancy_inners { - position: relative; - width: 100%; - padding: 0 0 3em 0; - - .vacancy { - position: relative; - display: inline-block; - vertical-align: top; - width: 254px; - padding: 10px; - margin: 15px 20px 15px 0; - text-align: left; - min-height: 180px; - border: 1px solid #dedede; - - h4 { - font-size: 1.05em; - padding: 0 0 1em 0; - font-weight: bold; - color: $color_vacancy; - } - p { - padding: 0 0 .2em 0; - color: $color_vacancy; - line-height: 1.4em; - } - a.vacancy_link { - position: absolute; - top: 0; - left: 0; - width: 254px; - height: 100%; - - /* @media only screen and (max-width: 479px) { - width: 247px; - } */ - - } - &:hover { - background: $bg_vacancy_hover; - - h4, p { - color: $color_vacancy_hover; - } - } - } - } - - /* ПОСТРАНИЧНАЯ НАВИГАЦИЯ */ - .pagination { - position: relative; - width: 100%; - - span.cur { - padding: 5px 10px; - background: #f0f0f0; - color: #2d2d2d; - border-radius: 20px; - } - a { - padding: 5px 10px;/* - - &:visited { - color: $blue; - } - &:hover { - color: #ed1c24; - } */ - } - em { - margin: 0 1em; - font-size: 1.6em; - - a { - text-decoration: none; - } - } - } - - - /* КОНТАКТЫ */ - &.contact_page { - width: 100%; - padding-bottom: 0; - - .breadcrumbs, h1 { - width: 1110px; - margin: 0 auto; - padding-bottom: 0; - - @media only screen and (max-width: 1199px) { - width: 940px; - } - @media only screen and (max-width: 991px) { - width: 740px; - } - @media only screen and (max-width: 767px) { - width: 80%; - } - } - } - .map_home { - position: relative; - width: 100%; - margin-top: 2em; - /* height: 500px; */ - - /* @media only screen and (max-width: 767px) { - width: 85%; - margin: 0 auto; - } */ - - .map_description { - /* position: relative; */ - /* width: 1110px; - margin: 0 auto; - z-index: 10; */ - position: relative; - width: 100%; - margin: 0 auto; - background: url(/bundles/app/images/template/bg-map.jpg) no-repeat 0 0; - - /* @media only screen and (max-width: 1199px) { - width: 940px; - } - @media only screen and (max-width: 991px) { - width: 740px; - } - @media only screen and (max-width: 767px) { - width: 100%; - } */ - @media only screen and (max-width: 767px) { - width: 80%; - margin: 0 auto; - } - - .map_txt { - /* position: absolute; - top: 40px; - left: 0; - width: 350px; - height: auto; - max-height: 400px; - overflow: hidden; - padding: 30px; - background: $bg_map url(/bundles/app/images/template/bg-map-address.png) no-repeat 100% 100%; - color: $color_map; */ - - /* @media only screen and (max-width: 479px) { - width: 100%; - } */ - position: relative; - width: 100%; - margin: 0 auto; - background: $bg_map; - text-align: center; - padding: 1.5em 1em 0 1em; - opacity: .85; - - /* @media only screen and (max-width: 1199px) { - width: 940px; - } - @media only screen and (max-width: 991px) { - width: 740px; - } */ - /* @media only screen and (max-width: 767px) { - width: 80%; - margin: 0 auto; - } */ - - p { - position: relative; - display: inline-block; - vertical-align: top; - width: 250px; - margin: 0 1em 1.5em 1em; - text-align: left; - color: $color_map; - font-size: 1.1em; - padding: 0 0 0 25px; - background: url(/bundles/app/images/template/marker-adress.png) no-repeat 0 0; - - - &.email_map { - padding-left: 35px; - background: url(/bundles/app/images/template/marker-mail.png) no-repeat 0 60%; - } - - @media only screen and (max-width: 991px) { - width: 300px; - } - @media only screen and (max-width: 479px) { - width: 95%; - margin-left: 0; - margin-right: 0; - } - } - a { - color: $color_map; - - &:visited, &:hover { - color: $color_map; - } - &:hover { - text-decoration: none; - } - } - } - } - - .map { - position: relative; - width: 100%; - height: 400px; - top: 0; - left: 0; - - @media only screen and (max-width: 767px) { - width: 80%; - margin: 0 auto; - } - } - } - } - -.fancybox-opened .fancybox-title { - display: none !important; -} - - -/* СТРАНИЦА ПОИСКА */ +@import "../helpers/mixins"; +@import "../helpers/variables"; + + +.middle_inners { + position: relative; + width: 1110px; + margin: 0 auto; + padding: 0 0 3em 0; + z-index: 100; + + @media only screen and (max-width: 1199px) { + width: 940px; + } + @media only screen and (max-width: 991px) { + width: 740px; + } + @media only screen and (max-width: 767px) { + width: 90%; + } + @media only screen and (max-width: 479px) { + width: 95%; + } + + h1 { + padding-top: 1em; + } + h2, h3, h4 { + padding-bottom: .5em; + + } + p { + font-size: 1em; + + &.data, &.signature { + color: #acacac; + font-size: .9em; + } + } + + ul, ol { + font-size: 1em; + padding-bottom: .5em; + padding-left: 1.5em; + + li { + padding-bottom: .5em; + + ul, ol { + font-size: 1em; + padding-top: .5em; + padding-bottom: 0; + + li:last-child { + padding-bottom: 0; + } + } + ul { + padding-left: 1.5em; + } + } + } + ul li { + list-style-type: none; + position: relative; + padding-left: 20px; + } + ul li:before { + color: #63cac9; + content: "●"; + /* padding-right: .3em; */ + position: absolute; + top: 0px; + left: 0px; + } + ul.after_float li { + overflow: hidden; + } + ol { + padding-left: 2.5em; + + li ul { + padding-left: 1em; + } + } + + .breadcrumbs { + position: relative; + width: 100%; + padding: 1em 0; + color: #989898; + + a, a:visited { + color: #989898; + } + a:hover { + text-decoration: none; + } + } + .table-responsive { + border: 0; + margin: 0; + } + table.txt { + position: relative; + width: 100%; + border-collapse: collapse; + margin: .5em 0 1em 0; + + thead { + th, td { + background: #d9e2f0; + color: #000; + text-align: center; + } + } + th, td { + padding: .4em; + vertical-align: middle; + font-size: 1.15em; + width: auto; + border: 1px solid #daddee; + } + td { + border: 1px solid #daddee; + } + tr:hover { + background: #f2f7ff; + } + + /* &.consalt { + margin-top: 1.5em; + tr td:first-child { + text-align: center; + } + } */ + } + + h1 + table { + margin-top: 0; + } + h3 + table { + margin-top: .2em; + } + .center { + text-align: center; + } + .fotogalery { + position: relative; + padding-top: 1em; + + @media only screen and (max-width: 991px) { + text-align: center; + } + + a { + position: relative; + display: inline-block; + z-index: 1; + } + img { + height: 150px; + margin: 0 1.2em 1.2em 0; + max-width: 100%; + + &.nosize { + height: auto; + } + } + } + + h3 + .fotogalery { + padding-top: 0; + } + a.back { + position: relative; + color: #61c0bb; + border: 2px solid #61c0bb; + text-decoration: none; + font-size: 1.2em; + display: inline-block; + z-index: 10000; + padding: .3em 1.2em .4em 1em; + vertical-align: top; + margin-top: 1.5em; + + &:hover { + color: #026d67; + background: #61c0bb; + } + } + .rght { + position: relative; + float: right; + padding: .7em 0 .2em 1em; + + @media only screen and (max-width: 599px) { + float: none; + padding-left: 0; + text-align: center; + } + } + .lft { + position: relative; + float: left; + padding: .7em 1em .2em 0; + + @media only screen and (max-width: 599px) { + float: none; + padding-right: 0; + text-align: center; + } + } + .clear { + clear: both; + } + .full_width { + padding-bottom: 1em; + + p { + padding-bottom: 0; + } + img { + width: auto; + max-width: 100%; + } + } + + /* НОВОСТИ */ + @import "../components/news"; + .news_home { + padding-top: 0; + + .news_content { + text-align: left; + padding-top: 0; + + .news_block { + display: inline-block; + vertical-align: top; + width: 254px; + padding: 10px; + margin: 15px 10px; + text-align: left; + margin-left: 0; + padding-left: 0; + margin-right: 20px; + + p { + padding: 0; + + a { + color: $color_news; + text-decoration: underline; + + &:hover { + color: $color_news; + text-decoration: none; + } + } + &.data { + /* padding: 0; */ + font-size: .9em; + color: $color_news_data; + } + &:first-child { + padding-bottom: 1em; + } + } + } + p.archive_news { + display: none; + } + } + } + + /* ОТЗЫВЫ */ + .reviews_inners { + position: relative; + width: 100%; + padding: 0 0 3em 0; + + .review { + position: relative; + display: inline-block; + vertical-align: top; + width: 254px; + padding: 10px 10px 10px 0; + margin: 15px 20px 15px 0; + text-align: left; + + p { + padding: 0 0 .5em 0; + color: $color_reviews; + + &.data, &.signature { + padding: 0; + font-size: .9em; + color: $color_reviews_data; + } + /* &:first-child { + height: 140px; + margin-bottom: 1em; + overflow: hidden; + + @media only screen and (min-width: 1600px) { + height: 170px; + } + @media only screen and (max-width: 1199px) { + height: 170px; + } + @media only screen and (max-width: 991px) { + height: 175px; + } + @media only screen and (max-width: 767px) { + height: 255px; + } + @media only screen and (max-width: 479px) { + height: 285px; + } + @media only screen and (max-width: 359px) { + height: 315px; + } + } */ + + a { + color: $color_reviews; + + &:hover { + color: $color_reviews; + text-decoration: none; + } + } + } + } + } + + + /* ВАКАНСИИ */ + .vacancy_inners { + position: relative; + width: 100%; + padding: 0 0 3em 0; + + .vacancy { + position: relative; + display: inline-block; + vertical-align: top; + width: 254px; + padding: 10px; + margin: 15px 20px 15px 0; + text-align: left; + min-height: 180px; + border: 1px solid #dedede; + + h4 { + font-size: 1.05em; + padding: 0 0 1em 0; + font-weight: bold; + color: $color_vacancy; + } + p { + padding: 0 0 .2em 0; + color: $color_vacancy; + line-height: 1.4em; + } + a.vacancy_link { + position: absolute; + top: 0; + left: 0; + width: 254px; + height: 100%; + + /* @media only screen and (max-width: 479px) { + width: 247px; + } */ + + } + &:hover { + background: $bg_vacancy_hover; + + h4, p { + color: $color_vacancy_hover; + } + } + } + } + + /* ПОСТРАНИЧНАЯ НАВИГАЦИЯ */ + .pagination { + position: relative; + width: 100%; + + span.cur { + padding: 5px 10px; + background: #f0f0f0; + color: #2d2d2d; + border-radius: 20px; + } + a { + padding: 5px 10px;/* + + &:visited { + color: $blue; + } + &:hover { + color: #ed1c24; + } */ + } + em { + margin: 0 1em; + font-size: 1.6em; + + a { + text-decoration: none; + } + } + } + + + /* КОНТАКТЫ */ + &.contact_page { + width: 100%; + padding-bottom: 0; + + .breadcrumbs, h1 { + width: 1110px; + margin: 0 auto; + padding-bottom: 0; + + @media only screen and (max-width: 1199px) { + width: 940px; + } + @media only screen and (max-width: 991px) { + width: 740px; + } + @media only screen and (max-width: 767px) { + width: 80%; + } + } + } + .map_home { + position: relative; + width: 100%; + margin-top: 2em; + /* height: 500px; */ + + /* @media only screen and (max-width: 767px) { + width: 85%; + margin: 0 auto; + } */ + + .map_description { + /* position: relative; */ + /* width: 1110px; + margin: 0 auto; + z-index: 10; */ + position: relative; + width: 100%; + margin: 0 auto; + background: url(/bundles/app/images/template/bg-map.jpg) no-repeat 0 0; + + /* @media only screen and (max-width: 1199px) { + width: 940px; + } + @media only screen and (max-width: 991px) { + width: 740px; + } + @media only screen and (max-width: 767px) { + width: 100%; + } */ + @media only screen and (max-width: 767px) { + width: 80%; + margin: 0 auto; + } + + .map_txt { + /* position: absolute; + top: 40px; + left: 0; + width: 350px; + height: auto; + max-height: 400px; + overflow: hidden; + padding: 30px; + background: $bg_map url(/bundles/app/images/template/bg-map-address.png) no-repeat 100% 100%; + color: $color_map; */ + + /* @media only screen and (max-width: 479px) { + width: 100%; + } */ + position: relative; + width: 100%; + margin: 0 auto; + background: $bg_map; + text-align: center; + padding: 1.5em 1em 0 1em; + opacity: .85; + + /* @media only screen and (max-width: 1199px) { + width: 940px; + } + @media only screen and (max-width: 991px) { + width: 740px; + } */ + /* @media only screen and (max-width: 767px) { + width: 80%; + margin: 0 auto; + } */ + + p { + position: relative; + display: inline-block; + vertical-align: top; + width: 250px; + margin: 0 1em 1.5em 1em; + text-align: left; + color: $color_map; + font-size: 1.1em; + padding: 0 0 0 25px; + background: url(/bundles/app/images/template/marker-adress.png) no-repeat 0 0; + + + &.email_map { + padding-left: 35px; + background: url(/bundles/app/images/template/marker-mail.png) no-repeat 0 60%; + } + + @media only screen and (max-width: 991px) { + width: 300px; + } + @media only screen and (max-width: 479px) { + width: 95%; + margin-left: 0; + margin-right: 0; + } + } + a { + color: $color_map; + + &:visited, &:hover { + color: $color_map; + } + &:hover { + text-decoration: none; + } + } + } + } + + .map { + position: relative; + width: 100%; + height: 400px; + top: 0; + left: 0; + + @media only screen and (max-width: 767px) { + width: 80%; + margin: 0 auto; + } + } + } + + /* ЗАГОЛОВОК И ССЫЛКА НА СТРАНИЦЕ ПОИСКА */ + .header_one_location { + position: relative; + display: table; + width: 100%; + padding-top: 1em; + + @media only screen and (max-width: 991px) { + display: block; + } + + h1 { + position: relative; + display: table-cell; + width: 70%; + vertical-align: top; + padding-top: 0; + + @media only screen and (max-width: 991px) { + display: block; + width: 100%; + } + } + .switch_location { + position: relative; + display: table-cell; + width: 30%; + vertical-align: top; + text-align: right; + padding-bottom: .5em; + white-space: nowrap; + + @media only screen and (max-width: 991px) { + display: block; + width: 100%; + white-space: normal; + } + @media only screen and (max-width: 479px) { + text-align: left; + } + } + } + } + +.fancybox-opened .fancybox-title { + display: none !important; +} + + +/* СТРАНИЦА ПОИСКА */ @import "../components/search"; \ No newline at end of file diff --git a/src/AppBundle/Resources/views/Objects/list.html.twig b/src/AppBundle/Resources/views/Objects/list.html.twig index 48c6fe5..8758477 100644 --- a/src/AppBundle/Resources/views/Objects/list.html.twig +++ b/src/AppBundle/Resources/views/Objects/list.html.twig @@ -5,9 +5,22 @@ {% block breadcrumbs %}Главная / {{ title }} {% endblock %} +{% block javascripts %} + {{ parent() }} + {% javascripts filter="?jsqueeze" output="js/minified/switch_location.js" + 'https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.min.js' + '@DomstorTemplateBundle/Resources/public/js/switch_location.js' + %} + + {% endjavascripts %} +{% endblock %} + {% block content %} -

{{ title }}

+
+

{{ title }}

+ {{ sonata_block_render({'type':'domstor.template.block.switch_location.service'}, {'current_location': currentLocation} ) }} +
{{ list.filter|raw }}
{{ list|raw }}
{% endblock %} diff --git a/src/AppBundle/Resources/views/layout.html.twig b/src/AppBundle/Resources/views/layout.html.twig index e3ce659..54483ef 100644 --- a/src/AppBundle/Resources/views/layout.html.twig +++ b/src/AppBundle/Resources/views/layout.html.twig @@ -15,7 +15,7 @@ {% javascripts filter="?jsqueeze" output="js/minified/layout.js" 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js' 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js' - 'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js' + 'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js' '@AppBundle/Resources/public/js/main.js' '@AppBundle/Resources/public/js/scrolltop.js' %} @@ -24,6 +24,7 @@