resolved merge conflict

This commit is contained in:
andibraeu 2014-09-27 17:41:33 +02:00
commit 65fe172e73
26 changed files with 880 additions and 230 deletions

View file

@ -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 <a href="http://getcomposer.org/">http://getcomposer.org/</a>. ' .
'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. '.
'Then run "<strong>php composer.phar install</strong>" to install them.'
);

View file

@ -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"

194
composer.lock generated
View file

@ -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": [],

View file

@ -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();
}

View file

@ -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,
);
}
}

View file

@ -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)));
}
}

View file

@ -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;
}
}

View file

@ -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 */

View file

@ -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;
}
}

View file

@ -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() {

View file

@ -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)));
}
}

View file

@ -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;
}
}
}

View file

@ -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;
}
}

View file

@ -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: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> 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');
}
});

View file

@ -0,0 +1,29 @@
{% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid">
<div class="ui column">
<div class="ui segment event box">
<form class="ui form" method="post">
<p>Möchtest du die Veranstaltung <strong>„{{ entity.summary }}“</strong> zum Datum <strong>„{{ entity.startdate.format('Y-m-d H:i') }}“</strong> wirklich löschen?</p>
<button name="confirmation" value="true" class="ui button red">Ja</button>
<a href="{{ path('_show', {'slug' : entity.slug }) }}" class="ui button green">Nein</a>
</form>
</div>
</div>
</div>
{% endblock %}

View file

@ -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" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% 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" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}

View file

@ -4,11 +4,21 @@
href="{{ path('_show', { 'slug': entity.slug }) }}">{{ entity.summary }}</a>
</h2>
<p class="edit">
{% if (detail|default(false)) %}
<p class="action">
<a href="{{ path('_edit', {'slug' : entity.slug }) }}"><i
class="circular icon edit green inverted link"></i>Bearbeiten</a>
</p>
<p class="action">
<a href="{{ path('_delete', {'slug' : entity.slug }) }}"><i class="circular icon delete green inverted link"></i>Löschen</a>
</p>
<p class="action">
<a href="{{ path('_copy', {'slug' : entity.slug }) }}"><i class="circular icon copy green inverted link"></i>Kopieren</a>
</p>
{% endif %}
<p class="startdate ">
<i class="circular icon calendar green inverted link" title="Wann?"
data-content="Wann?"></i>{{ entity.getFormatedDate() }}

View file

@ -1,6 +1,6 @@
<form method="post" action="{% if entity.id|default(0) > 0 %}{{ path('_update',{'slug':entity.slug}) }}{% else %}{{ path('_create') }}{% endif %}">
<div class="ui form segment">
<div class="field">
<div class="field{% if(errors|default('0') != 0) %} {% if('startdate' in errors|keys) %}error{% endif %}{% endif %}">
<label class="control-label required" for="event_startdate">Startdatum</label>
<div class="ui left labeled icon input">
@ -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) %}
<div class="ui red pointing above ui label">{{ errors.startdate }}</div>
{% endif %}{% endif %}
<i class="icon calendar"></i>
@ -19,7 +22,7 @@
</div>
</div>
</div>
<div class="field">
<div class="field{% if(errors|default('0') != 0) %} {% if('enddate' in errors|keys) %}error{% endif %}{% endif %}">
<label class="control-label required" for="event_enddate">Enddatum</label>
<div class="ui left labeled icon input">
@ -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) %}
<div class="ui red pointing above ui label">{{ errors.enddate }}</div>
{% endif %}{% endif %}
<i class="icon calendar"></i>
</div>
</div>
<div class="field">
<div class="field{% if(errors|default('0') != 0) %} {% if('summary' in errors|keys) %}error{% endif %}{% endif %}">
<label class="" for="event_summary">Zusammenfassung</label>
<div class="ui left labeled input">
@ -45,6 +52,10 @@
maxlength="255"
class="form-control">
{% if(errors|default('0') != 0) %} {% if('summary' in errors|keys) %}
<div class="ui red pointing above ui label">{{ errors.summary }}</div>
{% endif %}{% endif %}
<div class="ui corner label">
<i class="icon asterisk"></i>
</div>

View file

@ -3,6 +3,7 @@
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
"@CalciferBundle/Resources/assets/css/leaflet.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
@ -11,6 +12,7 @@
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
"@CalciferBundle/Resources/assets/js/leaflet.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
@ -22,10 +24,45 @@
<h1>
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 }} <a class="location-edit" href="{{ path("location_edit",{slug:location.slug}) }}"><i class="ui icon edit inverted green circular link"></i> </a> {% endif %}
</h1>
{% if tag|default(false) %}
<a href="{{ path('tag_show',{'slug' : tag.slug }) }}.ics"><i class="icon calendar"></i>Link zur Kalenderdatei</a>
{% if location|default(false) %}
{% if (location.description|length > 0) or location.hasAddress() %}
<div id="location-description" class="ui message green">
{% if (location.description|length > 0) %}
<p>{{ location.description|markdown }}</p>
{% endif %}
{% if (location.hasAddress()) %}
<div class="ui section divider"></div>
<p>
Anschrift:<br/>
{{ location.streetaddress }}{% if(location.streetnumber|length > 0) %} {{ location.streetnumber }}{% endif %}<br/>
{% if(location.zipcode|length > 0) %}{{ location.zipcode }} {% endif %}{{ location.city }}
</p>
{% endif %}
{% if ((location.lon > 0) and (location.lat > 0)) %}
<p><a href="" class="show_map">Auf einer OpenStreetMap-Karte anzeigen</a></p>
<div class="ui modal geo viewer">
<i class="close icon"></i>
<div class="header">
{{ location.name }}<br/>
{{ location.streetaddress }}{% if(location.streetnumber|length > 0) %} {{ location.streetnumber }}{% endif %}<br/>
{% if(location.zipcode|length > 0) %}{{ location.zipcode }} {% endif %}{{ location.city }}
</div>
<div class="content">
<div id="view-map" data-lat="{{ location.lat }}" data-lon="{{ location.lon }}"></div>
</div>
<div class="actions">
<div class="ui button ok">
Schließen
</div>
</div>
</div>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>
</div>

View file

@ -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" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js"
"@CalciferBundle/Resources/assets/js/events.js"
"@CalciferBundle/Resources/assets/js/leaflet.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid">
<div class="ui column">
<h1>Termin bearbeiten</h1>
</div>
</div>
<div class="ui one column page grid">
<div class="ui column">
{{ include('CalciferBundle:Event:event_form.html.twig',{'entity':entity}) }}
</div>
</div>
{% endblock %}

View file

@ -18,6 +18,6 @@
{% block body -%}
<div class="ui one column page grid">
{{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity}) }}
{{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity,'detail' : true}) }}
</div>
{% endblock %}

View file

@ -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" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js"
"@CalciferBundle/Resources/assets/js/events.js"
"@CalciferBundle/Resources/assets/js/leaflet.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid">
<div class="ui column">
<h1>Termin bearbeiten</h1>
</div>
</div>
<div class="ui one column page grid">
<div class="ui column">
<form method="post"
action="{{ path('location_update',{'slug':entity.slug}) }}">
<div class="ui form segment">
<div class="field">
<label class="" for="location-name">Name</label>
<div class="ui left labeled input">
<input type="text"
id="location-name"
name="name"
value="{{ entity.name|default('') }}"
required="required"
maxlength="255"
class="form-control">
<div class="ui corner label">
<i class="icon asterisk"></i>
</div>
</div>
</div>
<div class="field">
<label class="control-label required" for="location-description">Beschreibung</label>
<div class="ui left labeled icon input attached-label">
<textarea id="location-description" name="description">{{ entity.description|default('') }}</textarea>
<div class="ui bottom attached label">Du kannst hier <a
href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> benutzen.
</div>
</div>
</div>
<div class="field">
<label class="" for="location-streetaddress">Straße</label>
<div class="ui left labeled input">
<input type="text"
id="location-streetaddress"
name="streetaddress"
value="{{ entity.streetaddress|default('') }}"
required="required"
maxlength="255"
class="form-control">
</div>
</div>
<div class="field">
<label class="" for="location-streetnumber">Hausnummer</label>
<div class="ui left labeled input">
<input type="text"
id="location-streetnumber"
name="streetnumber"
value="{{ entity.streetnumber|default('') }}"
required="required"
maxlength="255"
class="form-control">
</div>
</div>
<div class="field">
<label class="" for="location-zipcode">Postleitzahl</label>
<div class="ui left labeled input">
<input type="text"
id="location-zipcode"
name="zipcode"
value="{{ entity.zipcode|default('') }}"
required="required"
maxlength="255"
class="form-control">
</div>
</div>
<div class="field">
<label class="" for="location-city">Ort</label>
<div class="ui left labeled input">
<input type="text"
id="location-city"
name="city"
value="{{ entity.city|default('') }}"
required="required"
maxlength="255"
class="form-control">
</div>
</div>
<div class="field">
<label class="control-label required" for="location-geocords">Geokoordinaten</label>
<div class="ui left labeled icon input attached-{% if entity.location.lat|default(0) > 0 %}geo-{% endif %}label">
<input type="text"
id="location-geocords"
name="geocords"
maxlength="255"
value="{{ entity.lat|default('0') }},{{ entity.lon|default('0') }}"
class="form-control">
<i class="icon map marker"></i>
<div class="ui bottom attached label">
Gebe entweder Breitengrad und Längengrad (Mit Punkten!) kommasepariert ein oder <a href="#" class="add_geo">wähle einen Punkt auf der Karte aus</a>.
</div>
<div class="ui modal geo chooser">
<i class="close icon"></i>
<div class="header">
Wähle einen Punkt auf der Karte
</div>
<div class="content">
<div id="map"></div>
</div>
<div class="actions">
<div class="ui button cancel">
Cancel
</div>
<div class="ui button ok">
Okay
</div>
</div>
</div>
</div>
</div>
<input type="submit" class="ui button blue" value="Speichern"/>
</div>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,29 @@
{% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid">
<div class="ui column">
<div class="ui segment event box">
<form class="ui form" method="post">
<p>Möchtest du den wiederholenden Termin <strong>„{{ entity.summary }}“</strong> wirklich löschen?</p>
<button name="confirmation" value="true" class="ui button red">Ja</button>
<a href="{{ path('_show', {'slug' : entity.slug }) }}" class="ui button green">Nein</a>
</form>
</div>
</div>
</div>
{% endblock %}

View file

@ -44,10 +44,11 @@
{{ entity.nextdate.format('Y-m-d H:i') }}
</td>
<td>
{{ entity.getFormatedRepeatPattern() }}
{{ entity.repeating_pattern }}
</td>
<td>
<a href="{{ path('repeating_event_edit', {'slug':entity.slug}) }}">Bearbeiten</a>
<a href="{{ path('repeating_event_edit', {'slug':entity.slug}) }}">Bearbeiten</a> |
<a href="{{ path('repeating_event_delete', {'slug':entity.slug}) }}">Löschen</a>
</td>
</tr>
{% endfor %}

View file

@ -38,23 +38,23 @@
</div>
<div class="field">
<label class="control-label required" for="event_duration">Wiederholungsmuster</label>
<label class="control-label required" for="event_duration">Terminwiederholungsmuster</label>
<div class="ui left labeled input">
<div class="ui dropdown selection fluid">
<input name="repeating_pattern" type="hidden" value="{{ entity.repeating_pattern|default('') }}">
<div class="ui left labeled input attached-label">
<input type="text"
id="repeating_pattern"
name="repeating_pattern"
value="{{ entity.repeating_pattern|default('') }}"
required="required"
maxlength="255"
class="form-control">
<div class="default text">Bitte wähle einen Wert aus</div>
<i class="dropdown icon"></i>
<div class="ui corner label">
<i class="icon asterisk"></i>
</div>
<div class="menu">
<div class="item" data-value="P7D">Wöchentlich</div>
<div class="item" data-value="P14D">Jede 2. Woche</div>
<div class="item" data-value="P1M">Monatlich</div>
</div>
<div class="ui corner label">
<i class="icon asterisk"></i>
</div>
<div class="ui bottom attached label">
Gebe hier ein <a href="{{ path("repeating_patterns") }}">Wiederholungsmuster</a> an.
</div>
</div>

View file

@ -0,0 +1,37 @@
{% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss" %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1 class="ui header">
Wiederholungsmuster
</h1>
</div>
</div>
<div class="ui one column page grid segment">
<div class="ui column">
<p>Es gibt 2 verschiedene Wiederholungsmustertypen. Feste Termine oder Interval Termine.</p>
<p>Der erste definiert sich dadurch das der Termin immer an einem bestimmten Tag im Monat passieren soll. Das Hackspace-Plenum findet z.B. am <code>Zweiten Freitag des Monats</code> statt. Die Sicherheitssprechstunde findet immer am <code>Ersten Dienstag des Monats</code> statt. Anhand dieser Beispiele sollte eigentlich klar sein wie dieses Wiederholungsmuster funktioniert:</p>
<p>An erster stelle definiert man die Woche: Erster, Zweiter, Dritter, Letzter (In manchen Fällen kann Dritter und Letzter auch identisch sein).</p>
<p>An zweiter stelle definiert man den Wochentag: Montag, Dienstag, Mitwoch usw.</p>
<p>An letzter Stelle steht noch pro Forma „des Monats“</p>
<p>Der zweite Wiederholungstyp ist für regelmäßige Termine wie z.B. die Elektrorunde gedacht, die <code>Alle 7 Tage</code>. Für die Brettspielerei würde man <code>Alle 2 Wochen</code> schreiben.</p>
</div>
</div>
{% endblock %}