{{=<% %>=}}
<div style="padding: 16px;">
    <ion-card>
        <ion-card-header>
            <ion-text>
                <h3 class="ion-text-bold"><% text %></h3>
            </ion-text>
        </ion-card-header>
        <ion-card-content>
            <%#description%>
                <b>{{ 'plugin.mod_booking.description' | translate }}</b>:
                <ion-text>
                <%{ description }%>
                </ion-text>
            <%/description%>

            <br>
            <%#location%>
                <b>{{ 'plugin.mod_booking.location' | translate }}</b>: <% location %> <br>
            <%/location%>

            <%#address%>
                <b>{{ 'plugin.mod_booking.address' | translate }}</b>: <% address %> <br>
            <%/address%>

            <%#teachers%>
            <b>{{ 'plugin.mod_booking.firstname' | translate }}</b>: <% firstname %> <br>
            <b>{{ 'plugin.mod_booking.lastname' | translate }}</b>: <% lastname %> <br>
            <%#email%>
                <b>{{ 'plugin.mod_booking.email' | translate }}</b>: <% email %> <br>
            <%/email%>
            <%/teachers%>

            <br>

            <%#cancelbookingoption%>
            <ion-button core-site-plugins-call-ws
                name="mod_booking_bookit" [params]="{itemid: <% id %>, area: 'option', userid: <% userid %>, data: <% data %>}"
                [preSets]="{getFromCache: 0, saveToCache: 0}"
                refreshOnSuccess="true">
                <% label %>
            </ion-button>
            <%/cancelbookingoption%>

            <br>

            <%#submit%>
            <ion-button core-site-plugins-call-ws
                name="mod_booking_bookit" [params]="{itemid: <% id %>, area: 'option', userid: <% userid %>, data:''}"
                [preSets]="{getFromCache: 0, saveToCache: 0}"
                refreshOnSuccess="true">
                <% label %>
            </ion-button>
            <%/submit%>

            <%#nosubmit%>
                <%#linktomoodlecourseonbookedbutton%>
                    <ion-button href="<% linktomoodlecourseonbookedbutton %>" core-link [capture]="true">
                        {{ 'plugin.mod_booking.coursestart' | translate }}
                    </ion-button>
                <%/linktomoodlecourseonbookedbutton%>

                <%^linktomoodlecourseonbookedbutton%>
                    <ion-button disabled>
                        <% label %>
                    </ion-button>
                    <%#linktomoodlecourseadditionalbutton%>
                        <br>
                        <ion-button href="<% linktomoodlecourseadditionalbutton %>" core-link [capture]="true">
                            <ion-icon name="school" style="margin-right: 8px; font-size: 18px;"></ion-icon>
                            {{ 'plugin.mod_booking.gotomoodlecourse' | translate }}
                        </ion-button>
                    <%/linktomoodlecourseadditionalbutton%>
                <%/linktomoodlecourseonbookedbutton%>
            <%/nosubmit%>

        </ion-card-content>
    </ion-card>
</div>
