* Neues Form-Widget für input + HTML5-datalist (autocomplete)
* Layout head-Bereich: canonical-Tag und title-Tag, sowie robots/noindex,nofollow für einige Seiten * Abfahrtsorte in der Suchmaske auf der Startseite angepasst * Traveltainment-Suche: Suchergebnisseite, CMS-Template (mit Suchmaske oben), Sidebar-Widget * Behoben: Vorschaubild von Reiseprogrammen wird nicht mehr angezeigt * Bewertung für google-Ergebniseintrag (In der Sidebar) * E-Mail-Signatur korrigiert * Eltern-Template wird dynamisch bestimmt / Template ohne "Rahmen" wird für AJAX-Anfragen verwendet * Termin-Status in Termintabelle auf Reiseprogrammseiten anzeigen * /create-tree : Reiseführer-Unterseiten mit Reiseführer-Hauptseite verknüpfen * Behoben: Exception bei Öffnen bestimmter Reisetermine; Bei diesen Terminen fehlen die Abfahrtsorte * Behoben: Video klappt erst beim 2. Klick aus git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3299 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
d8fcf531ec
commit
ff9c159297
27 changed files with 1167 additions and 229 deletions
|
|
@ -6,6 +6,7 @@ use AppBundle\Entity\BreadcrumbEntry;
|
|||
use AppBundle\Entity\Page;
|
||||
use AppBundle\Entity\TravelProgram;
|
||||
use AppBundle\Form\SearchRequestType;
|
||||
use AppBundle\Form\TtSearchRequestType;
|
||||
use AppBundle\Util;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
|
|
@ -27,8 +28,7 @@ class DefaultController extends Controller
|
|||
|
||||
public function defaultAction(Request $request)
|
||||
{
|
||||
// #TODO 404
|
||||
die ("caught");
|
||||
throw new $this->createNotFoundException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,14 +36,12 @@ class DefaultController extends Controller
|
|||
*/
|
||||
public function homeAction()
|
||||
{
|
||||
//$departures = $this->getEntityManager()->getRepository('AppBundle:TravelDeparturePoint')->findAll();
|
||||
$destinations = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')->findAll();
|
||||
|
||||
return $this->render('default/pages/home.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'destinations' => $destinations,
|
||||
'startDate' => new \DateTime('+5 day'),
|
||||
'endDate' => new \DateTime('+19 day')
|
||||
'canonical_url' => Util::getBaseUrl() .'/',
|
||||
'show_search_sidebar_widget' => false,
|
||||
'search_form' => $this->createForm(SearchRequestType::class)->createView(),
|
||||
'tt_search_form' => $this->createForm(TtSearchRequestType::class)->createView(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +49,7 @@ class DefaultController extends Controller
|
|||
{
|
||||
return $this->render('default/pages/default.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'page' => $page
|
||||
'page' => $page,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -60,14 +58,6 @@ class DefaultController extends Controller
|
|||
return $this->render('default/pages/overview.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'page' => $page,
|
||||
|
||||
// #WORKAROUND Special navigation logic here adapted from the old website: Don't show child entries
|
||||
// #TODO Only applies at level 0
|
||||
/*
|
||||
'nav_pages' => $page->getChildren(),
|
||||
'nav_child_pages' => [],
|
||||
'nav_open_node' => null
|
||||
*/
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +98,17 @@ class DefaultController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function cmsTraveltainmentAction(Page $page)
|
||||
{
|
||||
$form = $this->createForm(TtSearchRequestType::class);
|
||||
|
||||
return $this->render('default/pages/traveltainment.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'page' => $page,
|
||||
'tt_search_form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function cmsTravelProgramAction(Page $page)
|
||||
{
|
||||
$this->getDoctrine()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($page->getTravelProgram());
|
||||
|
|
@ -160,6 +161,69 @@ class DefaultController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/tt-suche")
|
||||
*/
|
||||
public function ttSearchAction(Request $request)
|
||||
{
|
||||
$form = $this->createForm(TtSearchRequestType::class);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid())
|
||||
{
|
||||
$data = $form->getData();
|
||||
|
||||
$ttUrl = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1';
|
||||
$ttUrl .= '&termin=' . $data['termin']->format('d.m.Y');
|
||||
$ttUrl .= '&ruecktermin=' . $data['ruecktermin']->format('d.m.Y');
|
||||
if (!empty($data['dauer'])) $ttUrl .= '&dauer='. $data['dauer'];
|
||||
if (!empty($data['t']))
|
||||
{
|
||||
$ttUrl .= '&personen=25'. str_repeat(';25', $data['t']);
|
||||
for ($i = 0; $i < 3; ++$i)
|
||||
{
|
||||
if (!empty($data['child'.$i]))
|
||||
{
|
||||
$ttUrl .= ';'. $data['child'. $i];
|
||||
}
|
||||
}
|
||||
}
|
||||
$ttUrl .= '&detail=';
|
||||
if (!empty($data['topRegion']) && isset(TtSearchRequestType::$DESTINATION_CHOICES[$data['topRegion']]))
|
||||
{
|
||||
$ttUrl .= 'hotel&topRegion='. TtSearchRequestType::$DESTINATION_CHOICES[$data['topRegion']];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ttUrl .= 'zielgebiet';
|
||||
}
|
||||
if (!empty($data['abflughafen'])) $ttUrl .= '&abflughafen='. $data['abflughafen'];
|
||||
if (!empty($data['shotel'])) $ttUrl .= '&shotel='. urlencode($data['shotel']);
|
||||
if (!empty($data['kategorie'])) $ttUrl .= '&kategorie='. $data['kategorie'];
|
||||
if (!empty($data['zimmer'])) $ttUrl .= '&zimmer='. $data['zimmer'];
|
||||
if (!empty($data['verpflegung'])) $ttUrl .= '&verpflegung='. $data['verpflegung'];
|
||||
if (!empty($data['hbfges'])) $ttUrl .= '&hbfges='. $data['hbfges'];
|
||||
if (!empty($data['hbfanz'])) $ttUrl .= '&hbfanz='. $data['hbfanz'];
|
||||
if (!empty($data['hbfempf'])) $ttUrl .= '&hbfempf='. $data['hbfempf'];
|
||||
if ($data['familie_kinder'] ?? false) $ttUrl .= '&familie_kinder=0';
|
||||
if ($data['strand'] ?? false) $ttUrl .= '&strand=0';
|
||||
if ($data['wellness'] ?? false) $ttUrl .= '&wellness=0';
|
||||
if ($data['typ'] ?? false) $ttUrl .= '&typ=0';
|
||||
if (!empty($data['sportangebot'])) $ttUrl .= '&sportangebot='. $data['sportangebot'];
|
||||
|
||||
//die($ttUrl);
|
||||
//http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&detail=hotel&showresult=1&termin=26.02.2017&ruecktermin=12.03.2017&dauer=6_14&personen=25;25&abflughafen=-1&topRegion=727
|
||||
//http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&detail=zielgebiet&showresult=1&termin=26.02.2017&ruecktermin=12.03.2017&dauer=6_14&personen=25;25&abflughafen=-1&topRegion=
|
||||
}
|
||||
|
||||
return $this->render('default/pages/ttSearch.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'breadcrumb_entries' => [new BreadcrumbEntry('Suchen')],
|
||||
'tt_search_form' => $form->createView(),
|
||||
'tt_url' => $ttUrl ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function headerAction()
|
||||
{
|
||||
$qb = $this->getEntityManager()->createQueryBuilder();
|
||||
|
|
@ -255,8 +319,6 @@ class DefaultController extends Controller
|
|||
}
|
||||
return $this->render('default/components/sidebar/searchSidebarWidget.html.twig', [
|
||||
'search_form' => $this->createForm(SearchRequestType::class, [
|
||||
'b' => new \DateTime('+5 day'),
|
||||
'e' => new \DateTime('+19 day'),
|
||||
'c' => $destination,
|
||||
'c2' => $combinedDestination,
|
||||
])->createView()
|
||||
|
|
@ -302,6 +364,8 @@ class DefaultController extends Controller
|
|||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 47 WHERE catalog_id = 3 AND owner = 0');
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 66 WHERE catalog_id = 6 AND owner = 0');
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 2803 WHERE catalog_id = 14 AND owner = 0');
|
||||
// Add missing owner relation
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 13 WHERE id in (1314,1426,1472,1548)');
|
||||
|
||||
$lft = 0;
|
||||
$this->createTree(0, $lft, 0);
|
||||
|
|
@ -311,6 +375,7 @@ class DefaultController extends Controller
|
|||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 0 WHERE parent_id = 47 AND catalog_id = 3');
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 0 WHERE parent_id = 66 AND catalog_id = 6');
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 0 WHERE parent_id = 2803 AND catalog_id = 14');
|
||||
$em->getConnection()->executeUpdate('UPDATE page SET owner = 0 WHERE id in (1314,1426,1472,1548)');
|
||||
|
||||
$em->commit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue