Reservations Calendar

Backend calendar for Reservations plugin.

Back to Reservations Calendar Support

Mr Hound
Mr Hound

Hi Vojta,

I think a small update is required to match the parameter category with the one of the reservation plugin.
This update could also include further translations.

In lang.php file add :

    'plugin' => [
        'name' => 'Reservations Calendar',
        'category' => 'Reservations',
        'description' => 'Backend calendar for Reservations plugin.',
        'settings_description' => 'Manage Reservations calendar.',
    ],

In Plugin.php file change :

    public function pluginDetails()
    {
        return [
            'name' => 'Reservations Calendar',
            'description' => 'Backend calendar for Reservations plugin.',
            'author' => 'Vojta Svoboda',
            'icon' => 'icon-calendar-o',
        ];
    }

to

    public function pluginDetails()
    {
        return [
            'name' => 'vojtasvoboda.reservationscalendar::lang.plugin.name',
            'description' => 'vojtasvoboda.reservationscalendar::lang.plugin.description',
            'author' => 'Vojta Svoboda',
            'icon' => 'icon-calendar-o',
        ];
    }

and


    public function boot()
    {
        // Override backend menu
        Event::listen('backend.menu.extendItems', function($manager)
        {
            $manager->addSideMenuItems('VojtaSvoboda.Reservations', 'reservations', [
                'calendar' => [
                    'label' => 'Calendar',
                    'url' => Backend::url('vojtasvoboda/reservationscalendar/calendar'),
                    'icon' => 'icon-calendar',
                    'permissions' => ['vojtasvoboda.reservations.*'],
                    'order' => 150,
                ],
            ]);
        });
    }

    public function registerSettings()
    {
        return [
            'settings' => [
                'category' => 'Reservations',
                'label' => 'Reservations Calendar',
                'description' => 'Manage Reservations calendar.',
                'icon' => 'icon-calendar',
                'class' => 'VojtaSvoboda\ReservationsCalendar\Models\Settings',
                'order' => 200,
            ],
        ];
    }

to

    public function boot()
    {
        // Override backend menu
        Event::listen('backend.menu.extendItems', function($manager)
        {
            $manager->addSideMenuItems('VojtaSvoboda.Reservations', 'reservations', [
                'calendar' => [
                    'label' => 'vojtasvoboda.reservationscalendar::lang.plugin.name',
                    'url' => Backend::url('vojtasvoboda/reservationscalendar/calendar'),
                    'icon' => 'icon-calendar',
                    'permissions' => ['vojtasvoboda.reservations.*'],
                    'order' => 150,
                ],
            ]);
        });
    }

    public function registerSettings()
    {
        return [
            'settings' => [
                'category' => 'vojtasvoboda.reservationscalendar::lang.plugin.category',
                'label' => 'vojtasvoboda.reservationscalendar::lang.plugin.name',
                'description' => 'vojtasvoboda.reservationscalendar::lang.plugin.settings_description',
                'icon' => 'icon-calendar',
                'class' => 'VojtaSvoboda\ReservationsCalendar\Models\Settings',
                'order' => 200,
            ],
        ];
    }

I will send you the corresponding French translation file.

Last updated

Vojta Svoboda
Vojta Svoboda

Hi Mr. Hound, feel free to send pull request and I will merge it as usual :-)

Mr Hound
Mr Hound

Hi,

With pleasure, but without public repo it will be difficult.

[edit] ... Ho wait, I've got your email.
Send you a patch file asap.

Last updated

1-3 of 3