<script type="text/javascript" language="javascript">
    function showDevice(xmldoc) {
        var CalDevice = document.getElementById("CalDevice");
        if (CalDevice) {
            CalDevice.innerHTML = xmldoc;
        }
    }
</script>

<!-- ###CONTENT### begin -->
<div class="card panel-fcs-border shadow-sm" id="detailContent">
    <div class="card-header">
                <span class="fcs-card-title h2">[% $user->gettext('Termin') %]</span>
    </div>
    <div class="card-body">


        <div class="card panel-info shadow-sm rounded">
            <div class="card-body text-center">
                <div class="btn-group-vertical">
                    [% if $user->UserID == $event.caleventownerid || ($event.caldeviceid > 0 && $user->hasRight(61)) %]
                        <input type="button" value="[% $user->gettext('Bearbeiten') %]" onclick="window.location.href = '[% $action %]&amp;class=event&amp;id=[% $event.caleventid %]';" class="btn btn-outline-primary"/>
                                <input type="button" value="[% $user->gettext('L&ouml;schen') %]" onclick="bootbox.confirm('[% $user->gettext('Termin wirklich entfernen ?') %]', function (result) {
                                            if (result) {
                                                window.location.href = '[% $action %]&class=event&event=del&id=[% $event.caleventid %]';
                                                            }
                                                        });" class="btn btn-outline-danger"/>
                    [% /if %]
                    <a href="[% $action %]&amp;class=event" class="btn btn-outline-primary" >[% $user->gettext('Weiteren Termin einrichten') %]</a>
                    [% if $user->hasRight(61) && $AssetDesk == 1 %]
                        <a href="[% $action %]&amp;class=event&amp;event=device&amp;date=[% $date %]" class="btn btn-outline-primary">[% $user->gettext('Weiteres Ger&auml;t sperren') %]</a>
                    [% /if %]
                </div>
            </div>
        </div>


        <div class="card panel-info shadow-sm rounded">
            <div class="card-header">
                <span class="fcs-card-title h3">[% $user->gettext("Detaillierte Informationen") %]</span>
            </div>
            <div class="card-body form-horizontal form-label-left ">
                <div class="col-lg-8 offset-md-2">
                    <div class="form-group row mb-3">
                        <label class="control-label col-lg-4">
                            [% $user->gettext("Was") %]:
                        </label>
                        <div class="col-lg-8">
                            <p class="form-control-static">[% $event.caleventname %]</p>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="control-label col-lg-4">
                            [% $user->gettext("Wann") %]:
                        </label>
                        <div class="col-lg-8">
                            <p class="form-control-static">
                                [% $user->gettext($dates->_weekday($event.date)) %]
                                [% $dates->_day($event.date) %].
                                [% $user->gettext($dates->_month($event.date)) %]
                                [% $dates->_year($event.date) %]

                                [% if $event.caleventdateday != 1 %]
                                    [% $event.time %] [% $user->gettext('Uhr') %]
                                    [% $user->gettext('bis') %]
                                    [% $user->gettext($dates->_weekday($event.enddate)) %]
                                    [% $dates->_day($event.enddate) %].
                                    [% $user->gettext($dates->_month($event.enddate)) %]
                                    [% $dates->_year($event.enddate) %]
                                    [% $event.endtime %] [% $user->gettext('Uhr') %]
                                [% /if %]
                            </p>
                        </div>
                    </div>
                    [% if $event.caleventlocation|count_characters > 0 %]
                        <div class="form-group row mb-3">
                            <label class="control-label col-lg-4">
                                [% $user->gettext("Wo") %]:
                            </label>
                            <div class="col-lg-8">
                                <p class="form-control-static">[% $event.caleventlocation %]</p>
                            </div>
                        </div>
                    [% /if %]
                    [% if $event.caleventdescription|count_characters > 0 %]
                        <div class="form-group row mb-3">
                            <label class="control-label col-lg-4">
                                [% $user->gettext("Beschreibung") %]:
                            </label>
                            <div class="col-lg-8">
                                <p class="form-control-static">[% $event.caleventdescription %]</p>
                            </div>
                        </div>
                    [% /if %]
                </div>
            </div>
        </div>


    </div>
</div>