DB-Skript:
CREATE TABLE fewo_lodging (id INT AUTO_INCREMENT NOT NULL, type_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, equipment LONGTEXT NOT NULL, adress1 VARCHAR(255) NOT NULL, adress2 VARCHAR(255) DEFAULT NULL, zip_code VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL, maximum_persons INT NOT NULL, deposit DOUBLE PRECISION NOT NULL, only_weekday INT NOT NULL, calendar_visible TINYINT(1) NOT NULL, INDEX IDX_9629C357C54C8C93 (type_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE fewo_lodging_image (id INT AUTO_INCREMENT NOT NULL, lodging_id INT DEFAULT NULL, full_file_name VARCHAR(255) NOT NULL, file_name VARCHAR(255) NOT NULL, description VARCHAR(255) DEFAULT NULL, INDEX IDX_D49F667187335AF1 (lodging_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE fewo_lodging_type (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE fewo_price (id INT AUTO_INCREMENT NOT NULL, lodging_id INT DEFAULT NULL, season_id INT DEFAULT NULL, per_night DOUBLE PRECISION NOT NULL, flat_price DOUBLE PRECISION NOT NULL, INDEX IDX_3DE13C987335AF1 (lodging_id), INDEX IDX_3DE13C94EC001D1 (season_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE fewo_reservation (id INT AUTO_INCREMENT NOT NULL, lodging_id INT DEFAULT NULL, from_date DATE NOT NULL, to_date DATE NOT NULL, status INT NOT NULL, type INT NOT NULL, INDEX IDX_36537F7487335AF1 (lodging_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE fewo_season (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, from_date DATE NOT NULL, to_date DATE NOT NULL, minimum_stay INT NOT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE fewo_lodging ADD CONSTRAINT FK_9629C357C54C8C93 FOREIGN KEY (type_id) REFERENCES fewo_lodging_type (id);
ALTER TABLE fewo_lodging_image ADD CONSTRAINT FK_D49F667187335AF1 FOREIGN KEY (lodging_id) REFERENCES fewo_lodging (id) ON DELETE SET NULL;
ALTER TABLE fewo_price ADD CONSTRAINT FK_3DE13C987335AF1 FOREIGN KEY (lodging_id) REFERENCES fewo_lodging (id);
ALTER TABLE fewo_price ADD CONSTRAINT FK_3DE13C94EC001D1 FOREIGN KEY (season_id) REFERENCES fewo_season (id) ON DELETE SET NULL;
ALTER TABLE fewo_reservation ADD CONSTRAINT FK_36537F7487335AF1 FOREIGN KEY (lodging_id) REFERENCES fewo_lodging (id) ON DELETE SET NULL;
ALTER TABLE page ADD fewo_lodging INT DEFAULT NULL;
ALTER TABLE page ADD CONSTRAINT FK_140AB6209629C357 FOREIGN KEY (fewo_lodging) REFERENCES fewo_lodging (id) ON DELETE SET NULL;
CREATE UNIQUE INDEX UNIQ_140AB6209629C357 ON page (fewo_lodging);
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Apartment');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Bauernhof');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Bungalow');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Campingplatz');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Chalet');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Ferienanlage');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Ferienhaus');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Ferienwohnung');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Finca');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Hotel');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Hütte');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Pension');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Schloss');
INSERT INTO `fewo_lodging_type` (`name`) VALUES ('Villa');
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3348 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
2ebd38d3d7
commit
ab026b752f
57 changed files with 6507 additions and 25 deletions
|
|
@ -0,0 +1,221 @@
|
|||
{#{% extends 'admin.html.twig' %}#}
|
||||
{# @var fewo_lodging \AppBundle\Entity\FewoLodging #}
|
||||
{% extends get_base_template() %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{% javascripts '@AppBundle/Resources/public/js/travelProgram.js' %}
|
||||
<script src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<section class="clearfix">
|
||||
<div class="content-copy">
|
||||
|
||||
<h1>{{ fewo_lodging.name }}</h1>
|
||||
|
||||
{#
|
||||
********* SLIDER *********
|
||||
#}
|
||||
|
||||
<section class="section fullscreen background padding-0 margin-bottom-20">
|
||||
<div id="myCarousel" class="carousel slide">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="1"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<!-- Wrapper for Slides -->
|
||||
<div class="carousel-inner">
|
||||
{% for lodging_image in fewo_lodging.images %}
|
||||
{# @var image \AppBundle\Entity\FewoLodgingImage #}
|
||||
<div class="item{% if loop.first %} active{% endif %}">
|
||||
<!-- Set the first background image using inline CSS below. -->
|
||||
{# TODO #}
|
||||
<div class="fill" style="background-image:url({{ asset('uploads/images/' ~ lodging_image.file) }});"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</section><!-- end section -->
|
||||
|
||||
{#
|
||||
********* TAB BAR *********
|
||||
#}
|
||||
|
||||
{% block travel_lodging_program_tab_bar %}
|
||||
<div class="scroller-nav-tabs scroller-left-nav-tabs"><i class="glyphicon glyphicon-chevron-left"></i></div>
|
||||
<div class="scroller-nav-tabs scroller-right-nav-tabs"><i class="glyphicon glyphicon-chevron-right"></i></div>
|
||||
<div class="wrapper-nav-tabs">
|
||||
<ul class="nav nav-tabs nav-justified list-nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#travel-description-content-tab" aria-controls="travel-description-content-tab" role="tab" data-toggle="tab">
|
||||
Beschreibung
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#travel-equipment-content-tab" aria-controls="travel-equipment-content-tab" role="tab" data-toggle="tab">
|
||||
Ausstattung
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#travel-dates-content-tab" aria-controls="travel-dates-content-tab" role="tab" data-toggle="tab">
|
||||
Termine <i class="fa fa-star"></i> Preise
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock travel_lodging_program_tab_bar %}
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
{#
|
||||
********* BESCHREIBUNG *********
|
||||
#}
|
||||
|
||||
<div role="tabpanel" class="tab-pane active" id="travel-description-content-tab">
|
||||
{#TODO alles wirklich hier? wo bilder?#}
|
||||
|
||||
<h3>Allgemeines</h3>
|
||||
|
||||
<div class="table-responsive" id="no-more-tables">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Adresse</th>
|
||||
<th>PLZ</th>
|
||||
<th>Ort</th>
|
||||
<th>Max. Personenanzahl</th>
|
||||
<th>Kaution</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td data-title="Typ">
|
||||
{{ fewo_lodging.type }}
|
||||
</td>
|
||||
<td data-title="Adresse">
|
||||
{{ fewo_lodging.adress1 }}
|
||||
{% if fewo_lodging.adress2 is not empty %}
|
||||
{{ fewo_lodging.adress2 }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-title="PLZ">
|
||||
{{ fewo_lodging.zipCode }}
|
||||
</td>
|
||||
<td data-title="Ort">
|
||||
{% if fewo_lodging.city is not empty %}
|
||||
{{ fewo_lodging.city }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-title="Max. Personenanzahl">
|
||||
{% if fewo_lodging.maximumPersons is not empty %}
|
||||
{{ fewo_lodging.maximumPersons }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-title="Kaution">
|
||||
{% if fewo_lodging.deposit is not empty %}
|
||||
{{ fewo_lodging.deposit|number_format(2, ',', '.') }} €
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if fewo_lodging.description is not empty %}
|
||||
<hr>
|
||||
<div>
|
||||
{{ fewo_lodging.description|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div> <!-- END tabpanel -->
|
||||
|
||||
{#
|
||||
********* AUSSTATTUNG *********
|
||||
#}
|
||||
|
||||
<div role="tabpanel" class="tab-pane" id="travel-equipment-content-tab">
|
||||
<div>
|
||||
{{ fewo_lodging.equipment|raw }}
|
||||
</div>
|
||||
</div> <!-- END tabpanel -->
|
||||
|
||||
{#
|
||||
********* TERMINE UND PREISE *********
|
||||
#}
|
||||
|
||||
<div role="tabpanel" class="tab-pane" id="travel-dates-content-tab">
|
||||
<h3>Saisons</h3>
|
||||
<div class="table-responsive" id="no-more-tables">
|
||||
|
||||
{% if fewo_lodging.prices is not empty %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beginn</th>
|
||||
<th>Ende</th>
|
||||
<th>Preis p.P. pro Nacht</th>
|
||||
<th>Pauschalpreis</th>
|
||||
<th>Kaution</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for price in fewo_lodging.prices %}
|
||||
<tr>
|
||||
<td data-title="Name">
|
||||
<strong class="small">
|
||||
{{ price.season.name }}
|
||||
</strong>
|
||||
</td>
|
||||
<td data-title="Beginn">
|
||||
{{ price.season.fromDate|date }}
|
||||
</td>
|
||||
<td data-title="Ende">
|
||||
{{ price.season.toDate|date }}
|
||||
</td>
|
||||
<td data-title="Preis p.P pro Nacht">
|
||||
{{ price.perNight|number_format(2, ',', '.') }} €
|
||||
</td>
|
||||
<td data-title="Pauschalpreis">
|
||||
{{ price.flatPrice|number_format(2, ',', '.') }} €
|
||||
</td>
|
||||
<td data-title="Kaution">
|
||||
{% if fewo_lodging.deposit is not empty %}
|
||||
{{ fewo_lodging.deposit|number_format(2, ',', '.') }} €
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Buchung</h3>
|
||||
{% include 'default/pages/cms/calendarLodgingProgram.html.twig' %}
|
||||
{% else %}
|
||||
Momentan sind für dieses Programm keine Termine verfügbar.
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div> <!-- END tabpanel -->
|
||||
</div>
|
||||
|
||||
{{ block('travel_lodging_program_tab_bar') }}
|
||||
</div>
|
||||
</section><!-- end section -->
|
||||
{% endblock body %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue