<?php

/*
* Title                   : Pinpoint Booking System WordPress Plugin (PRO)
* Version                 : 2.1.6
* File                    : views/calendars/views-backend-calendars.php
* File Version            : 1.0.4
* Created / Last Modified : 16 February 2016
* Author                  : Dot on Paper
* Copyright               : © 2012 Dot on Paper
* Website                 : http://www.dotonpaper.net
* Description             : Back end calendars views class.
*/

if (!class_exists('DOPBSPViewsBackEndCalendars')){
    class DOPBSPViewsBackEndCalendars extends DOPBSPViewsBackEnd{
        /*
         * Returns calendars template.
         *
         * @return calendars HTML page
         */
        function template(){
            global $DOPBSP;
            global $DOT;

            $this->getTranslation();
            ?>
            <div class="wrap DOPBSP-admin">
                <!--
                    Header
                -->
                <?php $this->displayHeader($DOPBSP->text('TITLE'),
                                           $DOPBSP->text('CALENDARS_TITLE')); ?>
                <input type="hidden" name="DOPBSP-calendar-ID" id="DOPBSP-calendar-ID" value="" />
                <input type="hidden" name="DOPBSP-calendar-jump-to-day" id="DOPBSP-calendar-jump-to-day" value="" />
                <!--
                    Content
                -->
                <div class="dopbsp-main dopbsp-hidden">
                    <table class="dopbsp-content-wrapper">
                        <colgroup>
                            <col id="DOPBSP-col-column1" class="dopbsp-column1" />
                            <col id="DOPBSP-col-column-separator1" class="dopbsp-separator" />
                            <col id="DOPBSP-col-column2" class="dopbsp-column2" />
                            <col id="DOPBSP-col-column-separator2" class="dopbsp-separator" />
                            <col id="DOPBSP-col-column3" class="dopbsp-column3" />
                        </colgroup>
                        <tbody>
                            <tr>
                                <td id="DOPBSP-column1" class="dopbsp-column">
                                    <div class="dopbsp-column-header">
                                        <?php
                                        if ($DOT->get('page')
                                                && $DOPBSP->classes->backend_settings_users->permission(wp_get_current_user()->ID,
                                                                                                        'use-booking-system')
                                                && false){
                                            ?>
                                            <a href="javascript:DOPBSPBackEndCalendar.add()" class="dopbsp-button dopbsp-add">
                                                <span class="dopbsp-info"><?php $DOT->echo($DOPBSP->text('CALENDARS_ADD_CALENDAR_SUBMIT')); ?></span>
                                            </a>
                                            <a href="javascript:DOPBSPBackEndCalendar.duplicate()" class="dopbsp-button dopbsp-duplicate dopbsp-disabled">
                                                <span class="dopbsp-info"><?php $DOT->echo($DOPBSP->text('CALENDARS_DUPLICATE_CALENDAR_SUBMIT')); ?></span>
                                            </a>
                                            <a href="<?php $DOT->echo(DOPBSP_CONFIG_HELP_DOCUMENTATION_URL,
                                                                      'url'); ?>" target="_blank" class="dopbsp-button dopbsp-help">
                                                <span class="dopbsp-info dopbsp-help">
                                                    <?php $DOT->echo($DOPBSP->text('CALENDARS_HELP')); ?>
                                                    <br /><br />
                                                    <?php $DOT->echo($DOPBSP->text('CALENDARS_ADD_CALENDAR_HELP')); ?>
                                                    <br /><br />
                                                    <?php $DOT->echo($DOPBSP->text('HELP_VIEW_DOCUMENTATION')); ?>
                                                </span>
                                            </a>
                                            <?php
                                        }
                                        else{
                                            ?>
                                            <a href="<?php $DOT->echo(DOPBSP_CONFIG_HELP_DOCUMENTATION_URL,
                                                                      'url'); ?>" target="_blank" class="dopbsp-button dopbsp-help">
                                                <span class="dopbsp-info dopbsp-help">
                                                    <?php $DOT->echo($DOPBSP->text('CALENDARS_HELP')); ?>
                                                    <br /><br />
                                                    <?php $DOT->echo($DOPBSP->text('HELP_VIEW_DOCUMENTATION')); ?>
                                                </span>
                                            </a>
                                            <?php
                                        }
                                        ?>
                                        <br class="dopbsp-clear" />
                                    </div>
                                    <div class="dopbsp-column-content">&nbsp;</div>
                                </td>
                                <td id="DOPBSP-column-separator1" class="dopbsp-separator"></td>
                                <td id="DOPBSP-column2" class="dopbsp-column">
                                    <div class="dopbsp-column-header">&nbsp;</div>
                                    <div class="dopbsp-column-content">&nbsp;</div>
                                </td>
                                <td id="DOPBSP-column-separator2" class="dopbsp-separator"></td>
                                <td id="DOPBSP-column3" class="dopbsp-column">
                                    <div class="dopbsp-column-header">&nbsp;</div>
                                    <div class="dopbsp-column-content">&nbsp;</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <?php
        }
    }
}