diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php index 25bc938..56bd35d 100644 --- a/app/SymfonyRequirements.php +++ b/app/SymfonyRequirements.php @@ -41,25 +41,25 @@ class Requirement /** * Constructor that initializes the requirement. * - * @param Boolean $fulfilled Whether the requirement is fulfilled + * @param bool $fulfilled Whether the requirement is fulfilled * @param string $testMessage The message for testing the requirement * @param string $helpHtml The help text formatted in HTML for resolving the problem * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) - * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement */ public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) { - $this->fulfilled = (Boolean) $fulfilled; + $this->fulfilled = (bool) $fulfilled; $this->testMessage = (string) $testMessage; $this->helpHtml = (string) $helpHtml; $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; - $this->optional = (Boolean) $optional; + $this->optional = (bool) $optional; } /** * Returns whether the requirement is fulfilled. * - * @return Boolean true if fulfilled, otherwise false + * @return bool true if fulfilled, otherwise false */ public function isFulfilled() { @@ -99,7 +99,7 @@ class Requirement /** * Returns whether this is only an optional recommendation and not a mandatory requirement. * - * @return Boolean true if optional, false if mandatory + * @return bool true if optional, false if mandatory */ public function isOptional() { @@ -117,16 +117,16 @@ class PhpIniRequirement extends Requirement /** * Constructor that initializes the requirement. * - * @param string $cfgName The configuration name used for ini_get() - * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) - * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement + * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement */ public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) { @@ -193,7 +193,7 @@ class RequirementCollection implements IteratorAggregate /** * Adds a mandatory requirement. * - * @param Boolean $fulfilled Whether the requirement is fulfilled + * @param bool $fulfilled Whether the requirement is fulfilled * @param string $testMessage The message for testing the requirement * @param string $helpHtml The help text formatted in HTML for resolving the problem * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) @@ -206,7 +206,7 @@ class RequirementCollection implements IteratorAggregate /** * Adds an optional recommendation. * - * @param Boolean $fulfilled Whether the recommendation is fulfilled + * @param bool $fulfilled Whether the recommendation is fulfilled * @param string $testMessage The message for testing the recommendation * @param string $helpHtml The help text formatted in HTML for resolving the problem * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) @@ -219,15 +219,15 @@ class RequirementCollection implements IteratorAggregate /** * Adds a mandatory requirement in form of a php.ini configuration. * - * @param string $cfgName The configuration name used for ini_get() - * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) */ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) { @@ -237,15 +237,15 @@ class RequirementCollection implements IteratorAggregate /** * Adds an optional recommendation in form of a php.ini configuration. * - * @param string $cfgName The configuration name used for ini_get() - * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) */ public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) { @@ -343,7 +343,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns whether a php.ini configuration is not correct. * - * @return Boolean php.ini configuration problem? + * @return bool php.ini configuration problem? */ public function hasPhpIniConfigIssue() { @@ -405,7 +405,7 @@ class SymfonyRequirements extends RequirementCollection $this->addRequirement( is_dir(__DIR__.'/../vendor/composer'), 'Vendor libraries must be installed', - 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. ' . + 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. '. 'Then run "php composer.phar install" to install them.' ); diff --git a/composer.json b/composer.json index 4823ea7..610ec33 100755 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ "enko/ics": "~0.1", "doctrine/migrations": "dev-master", "doctrine/doctrine-migrations-bundle": "dev-master", - "jbroadway/urlify" : "~1.0" + "jbroadway/urlify" : "~1.0", + "enko/relativedateparser" : "v0.2" }, "require-dev": { "sensio/generator-bundle": "~2.3" diff --git a/composer.lock b/composer.lock index d3cb91e..f6c857b 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "77745a3287830b815f677d20df33b385", + "hash": "ce7476174febffa01f09dfba2d9e3bb5", "packages": [ { "name": "doctrine/annotations", @@ -66,7 +66,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", + "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -81,16 +81,16 @@ }, { "name": "doctrine/cache", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "e16d7adf45664a50fa86f515b6d5e7f670130449" + "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/e16d7adf45664a50fa86f515b6d5e7f670130449", - "reference": "e16d7adf45664a50fa86f515b6d5e7f670130449", + "url": "https://api.github.com/repos/doctrine/cache/zipball/cf483685798a72c93bf4206e3dd6358ea07d64e7", + "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7", "shasum": "" }, "require": { @@ -106,7 +106,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -119,17 +119,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan H. Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -138,11 +127,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Caching library offering an object-oriented API for many cache backends", @@ -151,7 +146,7 @@ "cache", "caching" ], - "time": "2013-10-25 19:04:14" + "time": "2014-09-17 14:24:04" }, { "name": "doctrine/collections", @@ -208,7 +203,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", + "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -284,7 +279,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", + "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -546,7 +541,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", + "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -600,7 +595,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", + "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -672,16 +667,16 @@ }, { "name": "doctrine/orm", - "version": "v2.4.4", + "version": "v2.4.5", "source": { "type": "git", "url": "https://github.com/doctrine/doctrine2.git", - "reference": "fc19c3b53dcd00e6584db40669fdd699c4671f97" + "reference": "c0d3cdbdfbf873871167050ab077e49b1ad02ab0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/fc19c3b53dcd00e6584db40669fdd699c4671f97", - "reference": "fc19c3b53dcd00e6584db40669fdd699c4671f97", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/c0d3cdbdfbf873871167050ab077e49b1ad02ab0", + "reference": "c0d3cdbdfbf873871167050ab077e49b1ad02ab0", "shasum": "" }, "require": { @@ -718,17 +713,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -736,6 +720,14 @@ { "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" } ], "description": "Object-Relational-Mapper for PHP", @@ -744,7 +736,7 @@ "database", "orm" ], - "time": "2014-07-11 03:05:53" + "time": "2014-09-22 21:58:51" }, { "name": "enko/ics", @@ -798,6 +790,42 @@ ], "time": "2014-07-30 23:43:46" }, + { + "name": "enko/relativedateparser", + "version": "v0.2", + "source": { + "type": "git", + "url": "https://github.com/HackspaceJena/RelativeDateParser.git", + "reference": "0f1e587c652eac6c109c05637da9e6b5328c8564" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/HackspaceJena/RelativeDateParser/zipball/0f1e587c652eac6c109c05637da9e6b5328c8564", + "reference": "0f1e587c652eac6c109c05637da9e6b5328c8564", + "shasum": "" + }, + "require": { + "symfony/config": "~2.5", + "symfony/translation": "~2.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tim Schumacher", + "email": "tim@bandenkrieg.hacked.jp" + } + ], + "time": "2014-09-21 17:06:28" + }, { "name": "incenteev/composer-parameter-handler", "version": "v2.1.0", @@ -1255,17 +1283,17 @@ }, { "name": "sensio/distribution-bundle", - "version": "v3.0.5", + "version": "v3.0.6", "target-dir": "Sensio/Bundle/DistributionBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "ad10123f2532f6e311e583cce203ef368eedc469" + "reference": "e20461e4f8e1afd68f36cf90bdccc06f7aa6a6c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/ad10123f2532f6e311e583cce203ef368eedc469", - "reference": "ad10123f2532f6e311e583cce203ef368eedc469", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/e20461e4f8e1afd68f36cf90bdccc06f7aa6a6c2", + "reference": "e20461e4f8e1afd68f36cf90bdccc06f7aa6a6c2", "shasum": "" }, "require": { @@ -1304,26 +1332,26 @@ "configuration", "distribution" ], - "time": "2014-08-26 13:14:47" + "time": "2014-09-24 14:47:46" }, { "name": "sensio/framework-extra-bundle", - "version": "v3.0.1", + "version": "v3.0.2", "target-dir": "Sensio/Bundle/FrameworkExtraBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "dbc1e5aa830f3bf8063b29102add3c1e476d616e" + "reference": "9b22aaee517e80aad3238ea0328458b6f964066f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/dbc1e5aa830f3bf8063b29102add3c1e476d616e", - "reference": "dbc1e5aa830f3bf8063b29102add3c1e476d616e", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9b22aaee517e80aad3238ea0328458b6f964066f", + "reference": "9b22aaee517e80aad3238ea0328458b6f964066f", "shasum": "" }, "require": { "doctrine/common": "~2.2", - "symfony/framework-bundle": "~2.5" + "symfony/framework-bundle": "~2.3" }, "require-dev": { "symfony/expression-language": "~2.4", @@ -1351,9 +1379,7 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" } ], "description": "This bundle provides a way to configure your controllers with annotations", @@ -1361,7 +1387,7 @@ "annotations", "controllers" ], - "time": "2014-05-22 23:27:44" + "time": "2014-09-02 07:11:30" }, { "name": "sensiolabs/security-checker", @@ -1410,16 +1436,16 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.2.1", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af" + "reference": "e02f71a35436af4bd58a1bd90116089e632e29e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/2b9af56cc676c338d52fca4c657e5bdff73bb7af", - "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/e02f71a35436af4bd58a1bd90116089e632e29e1", + "reference": "e02f71a35436af4bd58a1bd90116089e632e29e1", "shasum": "" }, "require": { @@ -1445,13 +1471,11 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "name": "Chris Corbyn" }, { - "name": "Chris Corbyn" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Swiftmailer, free feature-rich PHP mailer", @@ -1460,7 +1484,7 @@ "mail", "mailer" ], - "time": "2014-06-13 11:44:54" + "time": "2014-09-20 07:17:36" }, { "name": "symfony/assetic-bundle", @@ -1527,22 +1551,20 @@ }, { "name": "symfony/icu", - "version": "v1.2.2", + "version": "v1.0.1", "target-dir": "Symfony/Component/Icu", "source": { "type": "git", "url": "https://github.com/symfony/Icu.git", - "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a" + "reference": "fdba214b1e087c149843bde976263c53ac10c975" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Icu/zipball/d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", - "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", + "url": "https://api.github.com/repos/symfony/Icu/zipball/fdba214b1e087c149843bde976263c53ac10c975", + "reference": "fdba214b1e087c149843bde976263c53ac10c975", "shasum": "" }, "require": { - "ext-intl": "*", - "lib-icu": ">=4.4", "php": ">=5.3.3", "symfony/intl": "~2.3" }, @@ -1572,7 +1594,7 @@ "icu", "intl" ], - "time": "2014-07-25 09:58:17" + "time": "2013-10-04 09:12:07" }, { "name": "symfony/monolog-bundle", @@ -1692,16 +1714,16 @@ }, { "name": "symfony/symfony", - "version": "v2.5.3", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "f077a238c781f845487a7c81fea8033ccd0e6a02" + "reference": "3a369dddea56596df91977d8c2083e70784852f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/f077a238c781f845487a7c81fea8033ccd0e6a02", - "reference": "f077a238c781f845487a7c81fea8033ccd0e6a02", + "url": "https://api.github.com/repos/symfony/symfony/zipball/3a369dddea56596df91977d8c2083e70784852f2", + "reference": "3a369dddea56596df91977d8c2083e70784852f2", "shasum": "" }, "require": { @@ -1759,7 +1781,7 @@ "doctrine/data-fixtures": "1.0.*", "doctrine/dbal": "~2.2", "doctrine/orm": "~2.2,>=2.2.3", - "egulias/email-validator": "1.1.0", + "egulias/email-validator": "~1.2", "ircmaxell/password-compat": "1.0.*", "monolog/monolog": "~1.3", "ocramius/proxy-manager": ">=0.3.1,<0.6-dev", @@ -1802,7 +1824,7 @@ "keywords": [ "framework" ], - "time": "2014-08-06 07:03:01" + "time": "2014-09-03 09:51:48" }, { "name": "twig/extensions", @@ -1913,17 +1935,17 @@ "packages-dev": [ { "name": "sensio/generator-bundle", - "version": "v2.3.5", + "version": "v2.4.0", "target-dir": "Sensio/Bundle/GeneratorBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", - "reference": "8b7a33aa3d22388443b6de0b0cf184122e9f60d2" + "reference": "d5c0b996a46276d50943a80f95a46b59215a0e68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/8b7a33aa3d22388443b6de0b0cf184122e9f60d2", - "reference": "8b7a33aa3d22388443b6de0b0cf184122e9f60d2", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/d5c0b996a46276d50943a80f95a46b59215a0e68", + "reference": "d5c0b996a46276d50943a80f95a46b59215a0e68", "shasum": "" }, "require": { @@ -1953,13 +1975,11 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" } ], "description": "This bundle generates code for you", - "time": "2014-04-28 14:01:06" + "time": "2014-09-22 14:56:14" } ], "aliases": [], diff --git a/src/Hackspace/Bundle/CalciferBundle/Command/GenerateEventsCommand.php b/src/Hackspace/Bundle/CalciferBundle/Command/GenerateEventsCommand.php index f697a78..c74573a 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Command/GenerateEventsCommand.php +++ b/src/Hackspace/Bundle/CalciferBundle/Command/GenerateEventsCommand.php @@ -17,6 +17,8 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Validator\Constraints\DateTime; +use enko\RelativeDateParser\RelativeDateParser; class GenerateEventsCommand extends ContainerAwareCommand { @@ -44,20 +46,21 @@ class GenerateEventsCommand extends ContainerAwareCommand $entities = $repo->findAll(); foreach($entities as $entity) { /** @var RepeatingEvent $entity */ - $period = new \DatePeriod($entity->nextdate,new \DateInterval($entity->repeating_pattern),$end); + $next_date = is_null($entity->nextdate) ? new DateTime() : $entity->nextdate; + $parser = new RelativeDateParser($entity->repeating_pattern,$next_date,'de'); $event = null; - foreach($period as $date) { - /** @var \DateTime $date */ - $output->writeln(sprintf("Creating Event %s for %s",$entity->summary,$date->format('Y-m-d H:i'))); + while (($next_date = $parser->getNext()) < $end) { + /** @var \DateTime $next_date */ + $output->writeln(sprintf("Creating Event %s for %s",$entity->summary,$next_date->format('Y-m-d H:i'))); $event = new Event(); $event->location = $entity->location; - $event->startdate = $date; + $event->startdate = $next_date; if ($entity->duration > 0) { $duration = new \DateInterval("PT".$entity->duration.'H'); /** @var \DateTime $enddate */ - $enddate = clone $date; + $enddate = clone $next_date; $enddate->add($duration); - $entity->enddate = $enddate; + $event->enddate = $enddate; } $event->summary = $entity->summary; $event->description = $entity->description; @@ -72,10 +75,10 @@ class GenerateEventsCommand extends ContainerAwareCommand } $entityManager->persist($event); $entityManager->flush(); + $parser->setNow($next_date); } if (!is_null($event)) { $entity->nextdate = $event->startdate; - $entity->nextdate->add(new \DateInterval($entity->repeating_pattern)); $entityManager->persist($entity); $entityManager->flush(); } diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/EventController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/EventController.php index d23aab5..78bfb9e 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/EventController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/EventController.php @@ -54,7 +54,7 @@ class EventController extends Controller * * @Route("/termine/", name="_create") * @Method("POST") - * @Template("CalciferBundle:Event:new.html.twig") + * @Template("CalciferBundle:Event:edit.html.twig") */ public function createAction(Request $request) { @@ -63,7 +63,8 @@ class EventController extends Controller $em = $this->saveEvent($request, $entity); - if ($entity->isValid()) { + $errors = $entity->isValid(); + if ($errors === true) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); @@ -73,6 +74,7 @@ class EventController extends Controller return array( 'entity' => $entity, + 'errors' => $errors, ); } @@ -81,7 +83,7 @@ class EventController extends Controller * * @Route("/termine/neu", name="_new") * @Method("GET") - * @Template() + * @Template("CalciferBundle:Event:edit.html.twig") */ public function newAction() { @@ -171,7 +173,8 @@ class EventController extends Controller $em = $this->saveEvent($request, $entity); - if ($entity->isValid()) { + $errors = $entity->isValid(); + if ($errors === true) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); @@ -180,7 +183,8 @@ class EventController extends Controller } return array( - 'entity' => $entity, + 'entity' => $entity, + 'errors' => $errors, ); } @@ -192,13 +196,18 @@ class EventController extends Controller */ public function saveEvent(Request $request, Event $entity) { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + $entity->description = $request->get('description'); $entity->summary = $request->get('summary'); $entity->url = $request->get('url'); $startdate = $request->get('startdate'); - $startdate = new \DateTime($startdate); - $entity->startdate = $startdate; - $entity->slug = \URLify::filter($entity->summary, 255, 'de'); + if (strlen($startdate) > 0) { + $startdate = new \DateTime($startdate); + $entity->startdate = $startdate; + } + $entity->slug = $entity->generateSlug($entity->summary,$em); $enddate = $request->get('enddate'); if (strlen($enddate) > 0) { @@ -237,7 +246,7 @@ class EventController extends Controller if (strlen($location_lon) > 0) { $location_obj->lon = $location_lon; } - $location_obj->slug = \URLify::filter($location_obj->name, 255, 'de'); + $location_obj->slug = $location_obj->generateSlug($location->name,$em); $em->persist($location_obj); $em->flush(); $entity->setLocation($location_obj); @@ -258,14 +267,79 @@ class EventController extends Controller } else { $tag_obj = new Tag(); $tag_obj->name = $tag; - $tag_obj->slug = \URLify::filter($tag_obj->name, 255, 'de'); + $tag_obj->slug = $tag_obj->generateSlug($tag_obj->name,$em); $em->persist($tag_obj); $em->flush(); $entity->addTag($tag_obj); } } - return $em; } return $em; } + + /** + * Deletes a Event entity. + * + * @Route("/termine/{slug}/löschen", name="_delete") + * @Method({"GET", "POST"}) + * @Template("CalciferBundle:Event:delete.html.twig") + */ + public function deleteAction(Request $request, $slug) { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository('CalciferBundle:Event'); + + /** @var Event $entity */ + $entity = $repo->findOneBy(['slug' => $slug]); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find Event entity.'); + } + + + $confirmation = $request->get('confirmation',false); + + if (($request->getMethod() == 'POST') && ($confirmation)) { + $em->remove($entity); + $em->flush(); + + return $this->redirect('/'); + } + + return array( + 'entity' => $entity, + + ); + } + + /** + * Copies a Event entity. + * + * @Route("/termine/{slug}/kopieren", name="_copy") + * @Method("GET") + * @Template("CalciferBundle:Event:edit.html.twig") + */ + public function copyAction(Request $request, $slug) { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository('CalciferBundle:Event'); + + /** @var Event $entity */ + $entity = $repo->findOneBy(['slug' => $slug]); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find Event entity.'); + } + + $entity->id = null; + + return array( + 'entity' => $entity, + + ); + } } diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php index 631892a..fc07a8c 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php @@ -40,7 +40,7 @@ class LocationController extends Controller * @Method("GET") * @Template("CalciferBundle:Event:index.html.twig") */ - public function showAction($slug,$format) + public function showAction($slug, $format) { /** @var EntityManager $em */ $em = $this->getDoctrine()->getManager(); @@ -58,17 +58,17 @@ class LocationController extends Controller $em = $this->getDoctrine()->getManager(); $now = new \DateTime(); - $now->setTime(0,0,0); + $now->setTime(0, 0, 0); /** @var QueryBuilder $qb */ $qb = $em->createQueryBuilder(); - $qb ->select(array('e')) + $qb->select(array('e')) ->from('CalciferBundle:Event', 'e') ->where('e.startdate >= :startdate') ->andWhere('e.locations_id = :location') ->orderBy('e.startdate') - ->setParameter('startdate',$now) - ->setParameter('location',$location->id); + ->setParameter('startdate', $now) + ->setParameter('location', $location->id); $entities = $qb->getQuery()->execute(); if ($format == 'ics') { @@ -118,4 +118,74 @@ class LocationController extends Controller ); } } + + /** + * Finds and displays a Event entity. + * + * @Route("/{slug}/bearbeiten", name="location_edit") + * @Method("GET") + * @Template() + */ + public function editAction($slug) + { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository('CalciferBundle:Location'); + + /** @var Location $location */ + $location = $repo->findOneBy(['slug' => $slug]); + + if (!$location) { + throw $this->createNotFoundException('Unable to find Location entity.'); + } + + return [ + 'entity' => $location + ]; + } + + /** + * Finds and displays a Event entity. + * + * @Route("/{slug}/bearbeiten", name="location_update") + * @Method("POST") + */ + public function updateAction(Request $request, $slug) { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository('CalciferBundle:Location'); + + /** @var Location $location */ + $location = $repo->findOneBy(['slug' => $slug]); + + if (!$location) { + throw $this->createNotFoundException('Unable to find Location entity.'); + } + + if ($location->name != $request->get('name')) { + $location->name = $request->get('name'); + $location->slug = $location->generateSlug($location->name,$em); + } + $location->streetaddress = $request->get('streetaddress'); + $location->streetnumber = $request->get('streetnumber'); + $location->zipcode = $request->get('zipcode'); + $location->city = $request->get('city'); + $location->description = $request->get('description'); + + $latlon = $request->get('geocords'); + $latlon = explode(',',$latlon); + if (count($latlon) == 2) { + $location->lat = $latlon[0]; + $location->lon = $latlon[1]; + } + + $em->persist($location); + $em->flush(); + + return $this->redirect($this->generateUrl('location_show', array('slug' => $location->slug))); + } } diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/RepeatingEventController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/RepeatingEventController.php index db41dca..18b22e6 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/RepeatingEventController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/RepeatingEventController.php @@ -191,10 +191,12 @@ class RepeatingEventController extends Controller $location = $request->get('location'); $location_lat = $request->get('location_lat'); $location_lon = $request->get('location_lon'); + + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + if (strlen($location) > 0) { // check if the location already exists - /** @var EntityManager $em */ - $em = $this->getDoctrine()->getManager(); $repo = $em->getRepository('CalciferBundle:Location'); $results = $repo->findBy(['name' => $location]); if (count($results) > 0) { @@ -217,7 +219,7 @@ class RepeatingEventController extends Controller if (strlen($location_lon) > 0) { $location_obj->lon = $location_lon; } - $location_obj->slug = \URLify::filter($location_obj->name, 255, 'de'); + $location_obj->slug = $location_obj->generateSlug($location_obj->name,$em); $em->persist($location_obj); $em->flush(); $entity->location = $location_obj; @@ -240,7 +242,7 @@ class RepeatingEventController extends Controller } else { $tag_obj = new Tag(); $tag_obj->name = $tag; - $tag_obj->slug = \URLify::filter($tag_obj->name, 255, 'de'); + $tag_obj->slug = $tag_obj->generateSlug($tag_obj->name,$em); $em->persist($tag_obj); $em->flush(); $entity->addTag($tag_obj); @@ -250,13 +252,60 @@ class RepeatingEventController extends Controller $entity->clearTags(); } - $entity->slug = \URLify::filter($entity->summary,255,'de'); + $entity->slug = $entity->generateSlug($entity->summary,$em); $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); return $entity; + } + /** + * Deletes a Event entity. + * + * @Route("/{slug}/löschen", name="repeating_event_delete") + * @Method({"GET", "POST"}) + * @Template("CalciferBundle:RepeatingEvent:delete.html.twig") + */ + public function deleteAction(Request $request, $slug) { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository('CalciferBundle:RepeatingEvent'); + + /** @var Event $entity */ + $entity = $repo->findOneBy(['slug' => $slug]); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find Event entity.'); + } + + + $confirmation = $request->get('confirmation',false); + + if (($request->getMethod() == 'POST') && ($confirmation)) { + $em->remove($entity); + $em->flush(); + + return $this->redirect('/'); + } + + return array( + 'entity' => $entity, + + ); + } + + /** + * Deletes a Event entity. + * + * @Route("/wiederholungsmuster", name="repeating_patterns") + * @Method({"GET", "POST"}) + * @Template("CalciferBundle:RepeatingEvent:repeating_patterns.html.twig") + */ + public function repeatingPatternsHelpAction(Request $request) { + return null; } } diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php index dfb63f5..69ea0bb 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php @@ -71,6 +71,7 @@ class TagController extends Controller if ($format == 'ics') { $calendar = new Calendar(); $calendar->setProdId('-//My Company//Cool Calendar App//EN'); + $calendar->setTimeZone(new \DateTimeZone('Europe/Berlin')); foreach ($entities as $entity) { /** @var Event $entity */ diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/BaseEntity.php b/src/Hackspace/Bundle/CalciferBundle/Entity/BaseEntity.php index ed3a198..ba972ee 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/BaseEntity.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/BaseEntity.php @@ -9,7 +9,9 @@ namespace Hackspace\Bundle\CalciferBundle\Entity; use Doctrine\ORM\Mapping as ORM; -use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\EntityRepository; +use Symfony\Component\Security\Acl\Exception\Exception; /** * A baseclass for all other entities @@ -54,10 +56,41 @@ abstract class BaseEntity { public function __set($name,$value) { if (property_exists($this,$name)) { - $this->$name = $value; + if ($value == '') { + $this->$name = null; + } else { + $this->$name = $value; + } return $this; } else { throw new \Exception("Property {$name} does not Exists"); } } + + public function generateSlug($name,EntityManager $em) { + $slug = \URLify::filter($name, 255, 'de'); + + /** @var EntityRepository $repo */ + $repo = $em->getRepository(get_class($this)); + + $entity = $repo->findOneBy(['slug' => $slug]); + + if (is_null($entity)) { + return $slug; + } else { + $counter = 1; + while (true) { + $new_slug = $slug . '-' . $counter; + $entity = $repo->findOneBy(['slug' => $new_slug]); + if (is_null($entity)) { + return $new_slug; + } + if ($counter === 100) { + throw new \Exception('There are 100 events with the same name, pick a fresh one!'); + } + $counter++; + } + } + return null; + } } \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php b/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php index 8a3a791..68104d4 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php @@ -3,6 +3,7 @@ namespace Hackspace\Bundle\CalciferBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Validator\Constraints\DateTime; /** * Event @@ -102,7 +103,18 @@ class Event extends BaseEntity } public function isValid() { - return true; + $errors = []; + if (!($this->startdate instanceof \DateTime)) { + $errors['startdate'] = 'Bitte gebe ein Startdatum ein.'; + } + if ((!is_null($this->startdate)) && (!is_null($this->enddate)) && ($this->enddate < $this->startdate)) { + $errors['enddate'] = 'Bitte setze ein Enddatum das nach dem Startdatum ist.'; + } + if (strlen($this->summary) == 0) { + $errors['summary'] = 'Bitte gebe eine Zusammenfassung an.'; + } + + return (count($errors) > 0) ? $errors : true; } public function getFormatedDate() { diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php b/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php index afd6feb..477d42f 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php @@ -8,8 +8,13 @@ use Doctrine\ORM\Mapping as ORM; * Location * * @property string $name + * @property string $description * @property float $lon * @property float $lat + * @property string $streetaddress + * @property string $streetnumber + * @property string $zipcode; + * @property string $city * * @ORM\Table(name="locations") * @ORM\Entity @@ -23,6 +28,41 @@ class Location extends BaseEntity */ protected $name; + /** + * @var string + * + * @ORM\Column(name="description", type="text", nullable=true) + */ + protected $description; + + /** + * @var string + * + * @ORM\Column(name="streetaddress", type="string", length=255, nullable=true) + */ + protected $streetaddress; + + /** + * @var string + * + * @ORM\Column(name="streetnumber", type="string", length=255, nullable=true) + */ + protected $streetnumber; + + /** + * @var string + * + * @ORM\Column(name="zipcode", type="string", length=255, nullable=true) + */ + protected $zipcode; + + /** + * @var string + * + * @ORM\Column(name="city", type="string", length=255, nullable=true) + */ + protected $city; + /** * @var float * @@ -37,5 +77,9 @@ class Location extends BaseEntity */ protected $lat; + public function hasAddress() { + return ((strlen($this->streetaddress) > 0) && (strlen($this->city))); + } + } diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/RepeatingEvent.php b/src/Hackspace/Bundle/CalciferBundle/Entity/RepeatingEvent.php index d7a6bcd..a9ff31c 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/RepeatingEvent.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/RepeatingEvent.php @@ -84,17 +84,4 @@ class RepeatingEvent extends BaseEntity * ) */ protected $tags = []; - - public function getFormatedRepeatPattern() { - switch($this->repeating_pattern) { - case 'P7D': - return 'Wöchentlich'; - case 'P14D': - return 'Alle 2 Wochen'; - case 'P1M': - return 'Monatlich'; - default: - return $this->repeating_pattern; - } - } } \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss index 867884c..7e0730a 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss @@ -6,13 +6,17 @@ } } - .startdate,.location,.url,.edit { + .startdate,.location,.url,.action { display: inline; margin: 0; margin-right: 0.5rem; margin-bottom: 0.5rem; } + a i.icon { + text-decoration: none; + } + ul.tags { padding-left: 0; margin: 0; @@ -38,6 +42,22 @@ form .ui.form { } } -#map { +#view-map, #map { height: 20rem; +} + +.location-edit { + text-decoration: none; +} + +#location-description { + p { + margin-top: 0.5rem; + margin-bottom: 0.5rem; + } + + .ui.section.divider { + margin-top: 0; + margin-bottom: 0; + } } \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js index b7a1dcc..c4dddbd 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js @@ -46,18 +46,30 @@ jQuery(document).ready(function () { closable: false, onApprove: function () { var coords = marker.getLatLng(); - jQuery('input[name=location_lat]').val(coords.lat); - jQuery('input[name=location_lon]').val(coords.lng); - jQuery('input[name=location]').css('margin-bottom', '3.2rem'); - jQuery('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng); + if (!(jQuery('input[name=location_lat]').val() == undefined)) { + jQuery('input[name=location_lat]').val(coords.lat); + jQuery('input[name=location_lon]').val(coords.lng); + jQuery('input[name=location]').css('margin-bottom', '3.2rem'); + jQuery('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng); + } else { + jQuery('input[name=geocords]').val(coords.lat + ',' + coords.lng); + } }, onDeny: function () { }, onVisible: function () { map.invalidateSize(true); - var lat = parseFloat(jQuery('input[name=location_lat]').val()); - var lon = parseFloat(jQuery('input[name=location_lon]').val()); + var lat = 0; + var lon = 0; + if (!(jQuery('input[name=location_lat]').val() == undefined)) { + lat = parseFloat(jQuery('input[name=location_lat]').val()); + lon = parseFloat(jQuery('input[name=location_lon]').val()); + } else { + var latlon = jQuery('input[name=geocords]').val(); + lat = latlon.split(',')[0]; + lon = latlon.split(',')[1]; + } if ((lat > 0) && (lon > 0)) { map.setView([lat, lon], 16); var latlng = new L.LatLng(lat, lon); @@ -70,3 +82,43 @@ jQuery(document).ready(function () { }).modal('attach events', '.add_geo', 'show'); } }); + +$(document).ready(function() { + + if (jQuery('#view-map').length == 1) { + jQuery('.show_map').click(addGeoCoordinates); + map = L.map('view-map'); + + // add an OpenStreetMap tile layer + L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' + }).addTo(map); + + map.setView([51.505, -0.09], 0); + + L.Icon.Default.imagePath = '/css/images'; + var popup = L.popup(); + + var marker = L.marker(); + + jQuery('.geo.viewer').modal('setting', { + closable: true, + onDeny: function () { + + }, + onVisible: function () { + map.invalidateSize(true); + var lat = $('#view-map').data('lat'); + var lon = $('#view-map').data('lon'); + if ((lat > 0) && (lon > 0)) { + map.setView([lat, lon], 16); + var latlng = new L.LatLng(lat, lon); + marker.setLatLng(latlng); + marker.addTo(map); + } else { + map.locate({setView: true}); + } + } + }).modal('attach events', '.show_map', 'show'); + } +}); \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/delete.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/delete.html.twig new file mode 100755 index 0000000..66a4061 --- /dev/null +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/delete.html.twig @@ -0,0 +1,29 @@ +{% extends 'CalciferBundle::layout.html.twig' %} + +{% block css %} + {% stylesheets filter="compass" + "@CalciferBundle/Resources/assets/css/events.scss" %} + + {% endstylesheets %} +{% endblock %} + +{% block javascripts %} + {% javascripts + "@CalciferBundle/Resources/assets/js/events.js" %} + + {% endjavascripts %} +{% endblock %} + +{% block body -%} +
+
+
+
+

Möchtest du die Veranstaltung „{{ entity.summary }}“ zum Datum „{{ entity.startdate.format('Y-m-d H:i') }}“ wirklich löschen?

+ + Nein +
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig index 07d2d67..a004f41 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig @@ -4,8 +4,7 @@ {% stylesheets filter="compass" "@CalciferBundle/Resources/assets/css/jquery.datetimepicker.scss" "@CalciferBundle/Resources/assets/css/events.scss" - "@CalciferBundle/Resources/assets/css/leaflet.scss" - %} + "@CalciferBundle/Resources/assets/css/leaflet.scss" %} {% endstylesheets %} {% endblock %} @@ -14,8 +13,7 @@ {% javascripts "@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js" "@CalciferBundle/Resources/assets/js/events.js" - "@CalciferBundle/Resources/assets/js/leaflet.js" - %} + "@CalciferBundle/Resources/assets/js/leaflet.js" %} {% endjavascripts %} {% endblock %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig index 84f135a..4a9b99a 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig @@ -4,11 +4,21 @@ href="{{ path('_show', { 'slug': entity.slug }) }}">{{ entity.summary }} -

+ {% if (detail|default(false)) %} +

Bearbeiten

+

+ Löschen +

+ +

+ Kopieren +

+ {% endif %} +

{{ entity.getFormatedDate() }} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig index d2f1e82..39ac995 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig @@ -1,6 +1,6 @@

-
+
@@ -11,6 +11,9 @@ value="{{ entity.startdate.format('Y-m-d H:i')|default('') }}" placeholder="{{ "now"|date('Y-m-d H:i') }}" class="form-control"> + {% if(errors|default('0') != 0) %} {% if('startdate' in errors|keys) %} +
{{ errors.startdate }}
+ {% endif %}{% endif %} @@ -19,7 +22,7 @@
-
+
@@ -30,10 +33,14 @@ placeholder="{{ "now"|date('Y-m-d H:i') }}" class="form-control"> + {% if(errors|default('0') != 0) %} {% if('enddate' in errors|keys) %} +
{{ errors.enddate }}
+ {% endif %}{% endif %} +
-
+
@@ -45,6 +52,10 @@ maxlength="255" class="form-control"> + {% if(errors|default('0') != 0) %} {% if('summary' in errors|keys) %} +
{{ errors.summary }}
+ {% endif %}{% endif %} +
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig index 287a5a6..b567157 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig @@ -3,6 +3,7 @@ {% block css %} {% stylesheets filter="compass" "@CalciferBundle/Resources/assets/css/events.scss" + "@CalciferBundle/Resources/assets/css/leaflet.scss" %} {% endstylesheets %} @@ -11,6 +12,7 @@ {% block javascripts %} {% javascripts "@CalciferBundle/Resources/assets/js/events.js" + "@CalciferBundle/Resources/assets/js/leaflet.js" %} {% endjavascripts %} @@ -22,10 +24,45 @@

Termine {% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %} - {% if location|default(false) %} für Ort „{{ location.name }}“{% endif %} + {% if location|default(false) %} für Ort „{{ location.name }}“ {% endif %}

{% if tag|default(false) %} Link zur Kalenderdatei + {% if location|default(false) %} + {% if (location.description|length > 0) or location.hasAddress() %} +
+ {% if (location.description|length > 0) %} +

{{ location.description|markdown }}

+ {% endif %} + {% if (location.hasAddress()) %} +
+

+ Anschrift:
+ {{ location.streetaddress }}{% if(location.streetnumber|length > 0) %} {{ location.streetnumber }}{% endif %}
+ {% if(location.zipcode|length > 0) %}{{ location.zipcode }} {% endif %}{{ location.city }} +

+ {% endif %} + {% if ((location.lon > 0) and (location.lat > 0)) %} +

Auf einer OpenStreetMap-Karte anzeigen

+ + {% endif %} +
+ {% endif %} {% endif %}
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/new.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/new.html.twig deleted file mode 100755 index a004f41..0000000 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/new.html.twig +++ /dev/null @@ -1,34 +0,0 @@ -{% extends 'CalciferBundle::layout.html.twig' %} - -{% block css %} - {% stylesheets filter="compass" - "@CalciferBundle/Resources/assets/css/jquery.datetimepicker.scss" - "@CalciferBundle/Resources/assets/css/events.scss" - "@CalciferBundle/Resources/assets/css/leaflet.scss" %} - - {% endstylesheets %} -{% endblock %} - -{% block javascripts %} - {% javascripts - "@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js" - "@CalciferBundle/Resources/assets/js/events.js" - "@CalciferBundle/Resources/assets/js/leaflet.js" %} - - {% endjavascripts %} -{% endblock %} - -{% block body -%} -
-
-

Termin bearbeiten

-
-
- -
-
- {{ include('CalciferBundle:Event:event_form.html.twig',{'entity':entity}) }} -
-
- -{% endblock %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig index 27728ae..7d19293 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig @@ -18,6 +18,6 @@ {% block body -%}
- {{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity}) }} + {{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity,'detail' : true}) }}
{% endblock %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig new file mode 100644 index 0000000..f511f12 --- /dev/null +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig @@ -0,0 +1,166 @@ +{% extends 'CalciferBundle::layout.html.twig' %} + +{% block css %} + {% stylesheets filter="compass" + "@CalciferBundle/Resources/assets/css/jquery.datetimepicker.scss" + "@CalciferBundle/Resources/assets/css/events.scss" + "@CalciferBundle/Resources/assets/css/leaflet.scss" %} + + {% endstylesheets %} +{% endblock %} + +{% block javascripts %} + {% javascripts + "@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js" + "@CalciferBundle/Resources/assets/js/events.js" + "@CalciferBundle/Resources/assets/js/leaflet.js" %} + + {% endjavascripts %} +{% endblock %} + +{% block body -%} +
+
+

Termin bearbeiten

+
+
+ +
+
+ +
+
+ + +
+ + +
+ +
+
+
+ +
+ + +
+ + +
Du kannst hier Markdown benutzen. +
+
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+ Gebe entweder Breitengrad und Längengrad (Mit Punkten!) kommasepariert ein oder wähle einen Punkt auf der Karte aus. +
+ +
+
+ + + + +
+ + +
+
+ +{% endblock %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/delete.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/delete.html.twig new file mode 100755 index 0000000..26d8f37 --- /dev/null +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/delete.html.twig @@ -0,0 +1,29 @@ +{% extends 'CalciferBundle::layout.html.twig' %} + +{% block css %} + {% stylesheets filter="compass" + "@CalciferBundle/Resources/assets/css/events.scss" %} + + {% endstylesheets %} +{% endblock %} + +{% block javascripts %} + {% javascripts + "@CalciferBundle/Resources/assets/js/events.js" %} + + {% endjavascripts %} +{% endblock %} + +{% block body -%} +
+
+
+
+

Möchtest du den wiederholenden Termin „{{ entity.summary }}“ wirklich löschen?

+ + Nein +
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig index ce108c5..12664f7 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig @@ -44,10 +44,11 @@ {{ entity.nextdate.format('Y-m-d H:i') }} - {{ entity.getFormatedRepeatPattern() }} + {{ entity.repeating_pattern }} - Bearbeiten + Bearbeiten | + Löschen {% endfor %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig index c3eb044..c532246 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig @@ -38,23 +38,23 @@
- + -
-