Skip to content

Commit

Permalink
v2.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed May 14, 2019
1 parent a1b7e1f commit a064d93
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 62 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Solspace Calendar Changelog

## 2.0.20 - 2019-05-14
### Changed
- Updated plugin icon.

### Fixed
- Fixed a bug where date pickers in the Create/Edit event CP page were not respecting the Week Start Day setting.
- Fixed a bug where Settings area in CP was still visible when the `allowAdminChanges` setting is disabled for Project Config.
- Fixed a bug where users/groups could still delete events in calendars they don't have permission to.

## 2.0.19 - 2019-04-15
### Fixed
- Fixed a bug where the `occurrences` object date ranges were not working correctly with events using the Select Dates repeat rule type.
Expand Down
43 changes: 5 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,12 @@
# Solspace Calendar plugin for Craft CMS 3.x

Calendar is the most powerful event management and calendaring plugin on the market for Craft CMS. The intuitive interface allows you to create events with complex recurring event rules and exclusions, while the flexible templating offers a variety of options to satisfy your calendaring needs.
The most reliable and powerful event management plugin for Craft. Set up beautiful calendars and events in minutes!

![Screenshot](src/icon.svg)

## Overview

## Requirements
Calendar is the most reliable and powerful event management and calendaring plugin on the market for Craft CMS. The intuitive interface allows you to create events with complex recurring event rules and exclusions, while the flexible templating offers a variety of options to satisfy your calendaring needs. Stop wasting valuable development hours wrestling with and tuning Craft Entries or other alternatives. You can trust Calendar (and the team behind it) to deliver the quality and support you expect and deserve.

This plugin requires Craft CMS 3.0.0 or later.


## Installation

To install Calendar, simply:

1. Go to the **Plugin Store** area inside your Craft control panel and search for *Calendar*.
2. In the results, click on *Calendar*, and then click on the **Try** button to install a trial copy of Calendar.
4. Try things out and if Calendar is right for your site, purchase a copy of if through the Plugin Store when you're ready!

Calendar can also be installed manually through Composer:

1. Open your terminal and go to your Craft project: `cd /path/to/project`
2. Then tell Composer to require the plugin: `composer require solspace/craft3-calendar`
4. In the Craft control panel, go to *Settings → Plugins* and click the **Install** button for Calendar.


## Calendar Overview

The Solspace Calendar plugin offers up both power and simplicity, giving you all kinds of options to satisfy your calendaring needs. Need a simple display of daily activities? How about a monthly calendar? Need to fully control every table, div, and class that makes up the HTML that will become your calendar? Solspace Calendar can do all that and more.

Solspace Calendar is an Element Type that allows you create and manage event entries similar to regular Craft Entries. The control panel also includes a groundbreaking approach to event management that feels very similar to popular calendaring apps like Apple Calendar and Google Calendar. Similar to these popular calendaring apps, Solspace Calendar allows you to view a full month, week and day view of your existing events, and click on any day of the month or time slot to create new events, click on existing events to edit them, and drag and drop events to move them to other days or times.

You can also manage your own set of calendars that become available to assign to each event. These calendars can have their own unique field layout and coloring options that are worked throughout the control panel and easily accessible to front end templates, making adding a splash of color and styling a breeze!

Events in Solspace Calendar allow you to make recurrence rules and exclusion dates. Need weekly events? Have a group that meets on the 3rd Tuesday of every month? How about a monthly meeting that does not meet during the summer? Solspace Calendar can do all that.

Solspace Calendar allows you to export your events as ICS data, allowing your users to import your event data directly into other calendar applications like Google Calendar, Apple Calendar, Microsoft Outlook, and more.

Last but not least, included with Solspace Calendar is a set of Demo Templates that can be installed on your site, instantaneously giving you a real-world set of styled, working templates.


## Using Calendar

Full documentation for Calendar can be found on the [Solspace documentation website](http://docs.solspace.com/craft/calendar/v2/).
## Documentation
Full documentation for Calendar can be found on the [Solspace documentation website](http://docs.solspace.com/craft/calendar/v2/).
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solspace/craft3-calendar",
"description": "The most powerful event management plugin for Craft.",
"version": "2.0.19",
"version": "2.0.20",
"type": "craft-plugin",
"authors": [
{
Expand Down
9 changes: 9 additions & 0 deletions src/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

namespace Solspace\Calendar\Controllers;

use Craft;
use craft\helpers\UrlHelper;
use Solspace\Calendar\Calendar;
use Solspace\Commons\Helpers\PermissionHelper;
use yii\web\ForbiddenHttpException;
use yii\web\Response;

class SettingsController extends BaseController
Expand Down Expand Up @@ -160,6 +162,13 @@ private function provideTemplate($template, array $variables = []): Response
{
PermissionHelper::requirePermission(Calendar::PERMISSION_SETTINGS);

if (
version_compare(Craft::$app->getVersion(), '3.1', '>=') &&
!\Craft::$app->getConfig()->getGeneral()->allowAdminChanges
) {
throw new ForbiddenHttpException('Administrative changes are disallowed in this environment.');
}

return $this->renderTemplate(
'calendar/settings/_' . $template,
array_merge(
Expand Down
7 changes: 6 additions & 1 deletion src/Elements/Actions/DeleteEventAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use craft\base\ElementAction;
use craft\elements\db\ElementQueryInterface;
use Solspace\Calendar\Calendar;
use Solspace\Calendar\Elements\Event;
use Solspace\Calendar\Library\CalendarPermissionHelper;

class DeleteEventAction extends ElementAction
{
Expand Down Expand Up @@ -47,8 +49,11 @@ public function getConfirmationMessage()
*/
public function performAction(ElementQueryInterface $query): bool
{
/** @var Event $element */
foreach ($query->all() as $element) {
\Craft::$app->getElements()->deleteElement($element);
if (CalendarPermissionHelper::canEditCalendar($element->getCalendar())) {
\Craft::$app->getElements()->deleteElement($element);
}
}

$this->setMessage($this->successMessage);
Expand Down
8 changes: 7 additions & 1 deletion src/Services/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ public function dismissDemoBanner(): bool
*/
public function getWeekStartDay(): int
{
return (int) \Craft::$app->getUsers()->getUserPreference(\Craft::$app->getUser()->id, 'weekStartDay', 0);
return (int) \Craft::$app
->getUsers()
->getUserPreference(
\Craft::$app->getUser()->id,
'weekStartDay',
0
);
}

/**
Expand Down
17 changes: 8 additions & 9 deletions src/icon-mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 19 additions & 8 deletions src/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a064d93

Please sign in to comment.