diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php index 4df46d1..0e416b8 100644 --- a/app/SymfonyRequirements.php +++ b/app/SymfonyRequirements.php @@ -500,9 +500,9 @@ function_exists('simplexml_import_dom'), $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; $this->addRequirement( - null !== $pcreVersion && $pcreVersion > 8.0, - sprintf('PCRE extension must be available and at least 8.0 (%s installed)', $pcreVersion ? $pcreVersion : 'not'), - 'Upgrade your PCRE extension (8.0+).' + null !== $pcreVersion, + 'PCRE extension must be available', + 'Install the PCRE extension (version 8.0+).' ); /* optional recommendations follow */ @@ -531,6 +531,14 @@ function_exists('simplexml_import_dom'), 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' ); + if (null !== $pcreVersion) { + $this->addRecommendation( + $pcreVersion >= 8.0, + sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), + 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' + ); + } + $this->addRecommendation( class_exists('DomDocument'), 'PHP-XML module should be installed', diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist index 8e330b1..ad452fc 100644 --- a/app/phpunit.xml.dist +++ b/app/phpunit.xml.dist @@ -17,6 +17,7 @@ ../src/*/*Bundle/Tests ../src/*/Bundle/*Bundle/Tests + ../vendor/servergrove/kb-bundle/*/*Bundle/Tests diff --git a/composer.json b/composer.json index 341e4b2..9b45c85 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "doctrine/doctrine-fixtures-bundle": "dev-master", "servergrove/translation-editor-bundle": "dev-master", "jackalope/jackalope-jackrabbit": "dev-master", - "knplabs/knp-markdown-bundle": "dev-master" + "knplabs/knp-markdown-bundle": "dev-master", + "servergrove/kb-bundle": "dev-master" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 13455b8..630667c 100644 --- a/composer.lock +++ b/composer.lock @@ -1,5 +1,5 @@ { - "hash": "7904290bad6e4a269040126a330d050f", + "hash": "224d38f9af84e1eee53eff2034149319", "packages": [ { "name": "chjj/marked", @@ -15,8 +15,7 @@ "reference": null, "shasum": null }, - "type": "library", - "installation-source": "dist" + "type": "library" }, { "name": "codemirror/codemirror", @@ -32,8 +31,7 @@ "reference": null, "shasum": null }, - "type": "library", - "installation-source": "dist" + "type": "library" }, { "name": "dflydev/markdown", @@ -52,14 +50,13 @@ "require": { "php": ">=5.3" }, - "time": "1342369887", + "time": "2012-07-15 16:31:27", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "dflydev\\markdown": "src" @@ -111,14 +108,13 @@ "require": { "php": ">=5.3.2" }, - "time": "1348120518", + "time": "2012-09-20 05:55:18", "type": "library", "extra": { "branch-alias": { "dev-master": "2.3.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\Common": "lib/" @@ -180,9 +176,8 @@ "require": { "php": ">=5.3.2" }, - "time": "1351735543", + "time": "2012-11-01 02:05:43", "type": "library", - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\Common\\DataFixtures": "lib/" @@ -222,14 +217,13 @@ "php": ">=5.3.2", "doctrine/common": "2.3.*" }, - "time": "1352716871", + "time": "2012-11-12 10:41:11", "type": "library", "extra": { "branch-alias": { "dev-master": "2.3.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\DBAL": "lib/" @@ -297,14 +291,13 @@ "suggest": { "doctrine/orm": "The Doctrine ORM integration is optional in the bundle." }, - "time": "1353074073", + "time": "2012-11-16 13:54:33", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\Bundle\\DoctrineBundle": "" @@ -357,9 +350,8 @@ "doctrine/doctrine-bundle": "1.0.*", "symfony/doctrine-bridge": ">=2.1.0,<2.3-dev" }, - "time": "1350914272", + "time": "2012-10-22 13:57:52", "type": "symfony-bundle", - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\Bundle\\FixturesBundle": "" @@ -416,14 +408,13 @@ "doctrine/data-fixtures": "if you want to use the fixture loading", "doctrine/phpcr-odm": "if you want to use the odm as well. require version 1.0.*" }, - "time": "1351700155", + "time": "2012-10-31 16:15:55", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\Bundle\\PHPCRBundle": "" @@ -480,7 +471,7 @@ "midgard/phpcr": ">=1.3", "symfony/yaml": ">=2.0.0,<2.3.0-dev" }, - "time": "1352889687", + "time": "2012-11-14 10:41:27", "bin": [ "bin/phpcr", "bin/phpcr.php" @@ -491,7 +482,6 @@ "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Doctrine\\ODM\\PHPCR": "lib/" @@ -548,14 +538,13 @@ "provide": { "phpcr/phpcr-implementation": "2.1.0-beta4" }, - "time": "1352906109", + "time": "2012-11-14 15:15:09", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Jackalope\\": "src/" @@ -610,14 +599,13 @@ "phpcr/phpcr-utils": "dev-master", "symfony/console": ">=2.0.0,<2.2.0-dev" }, - "time": "1352137588", + "time": "2012-11-05 17:46:28", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Jackalope\\": "src/" @@ -663,7 +651,6 @@ "dev-master": "1.0.x-dev" } }, - "installation-source": "dist", "autoload": { "classmap": [ "lib" @@ -707,7 +694,6 @@ }, "time": "2012-01-02 12:50:26", "type": "symfony-bundle", - "installation-source": "dist", "autoload": { "psr-0": { "JMS\\AopBundle": "" @@ -749,7 +735,6 @@ }, "time": "2012-01-02 12:40:52", "type": "library", - "installation-source": "dist", "autoload": { "psr-0": { "CG\\": "src/" @@ -806,9 +791,8 @@ "doctrine/doctrine-bundle": "*", "doctrine/orm": "*" }, - "time": "1348217792", + "time": "2012-09-21 08:56:32", "type": "symfony-bundle", - "installation-source": "source", "autoload": { "psr-0": { "JMS\\DiExtraBundle": "" @@ -851,7 +835,6 @@ }, "time": "2012-01-02 13:32:49", "type": "library", - "installation-source": "dist", "autoload": { "psr-0": { "Metadata\\": "src/" @@ -912,9 +895,8 @@ "symfony/form": "*", "symfony/validator": "*" }, - "time": "1346947943", + "time": "2012-09-06 16:12:23", "type": "symfony-bundle", - "installation-source": "source", "autoload": { "psr-0": { "JMS\\SecurityExtraBundle": "" @@ -965,14 +947,13 @@ "symfony/twig-bundle": "to use the Twig markdown filter", "ext-sundown": "to use optional support for php-sundown extension instead of php implementation" }, - "time": "1350500955", + "time": "2012-10-17 19:09:15", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Knp\\Bundle\\MarkdownBundle": "" @@ -1032,14 +1013,13 @@ "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin" }, - "time": "1352285252", + "time": "2012-11-07 10:47:32", "type": "library", "extra": { "branch-alias": { "dev-master": "1.1-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Assetic": "src/" @@ -1091,14 +1071,13 @@ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-mongo": "Allow sending log messages to a MongoDB server" }, - "time": "1352907970", + "time": "2012-11-14 15:46:10", "type": "library", "extra": { "branch-alias": { "dev-master": "1.3.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Monolog": "src/" @@ -1139,14 +1118,13 @@ "require": { "php": ">=5.3.0" }, - "time": "1352903597", + "time": "2012-11-14 14:33:17", "type": "library", "extra": { "branch-alias": { "dev-master": "2.1-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "PHPCR": "src" @@ -1195,14 +1173,13 @@ "phpcr/phpcr": ">=2.1.0-beta5", "symfony/console": ">=2.0.0,<2.3.0-dev" }, - "time": "1353075233", + "time": "2012-11-16 14:13:53", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "PHPCR\\Util": "src" @@ -1256,14 +1233,13 @@ "require": { "symfony/framework-bundle": "2.1.*" }, - "time": "1353323932", + "time": "2012-11-19 11:18:52", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Sensio\\Bundle\\DistributionBundle": "" @@ -1303,14 +1279,13 @@ "symfony/framework-bundle": "2.1.*", "doctrine/common": ">=2.1,<2.4-dev" }, - "time": "1350448707", + "time": "2012-10-17 04:38:27", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Sensio\\Bundle\\FrameworkExtraBundle": "" @@ -1355,14 +1330,13 @@ "doctrine/orm": ">=2.1,<2.4-dev", "twig/twig": ">=1.8,<2.0-dev" }, - "time": "1352464423", + "time": "2012-11-09 12:33:43", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Sensio\\Bundle\\GeneratorBundle": "" @@ -1379,6 +1353,50 @@ ], "description": "This bundle generates code for you" }, + { + "name": "servergrove/kb-bundle", + "version": "dev-master", + "target-dir": "ServerGrove/KbBundle", + "source": { + "type": "git", + "url": "https://github.com/servergrove/ServerGroveKbBundle", + "reference": "8eaaae89022e4493b7927e9572314c029d20cfea" + }, + "dist": { + "type": "zip", + "url": "https://github.com/servergrove/ServerGroveKbBundle/archive/8eaaae89022e4493b7927e9572314c029d20cfea.zip", + "reference": "8eaaae89022e4493b7927e9572314c029d20cfea", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/framework-bundle": ">=2.0,<2.3-dev" + }, + "require-dev": { + "symfony/finder": ">=2.0,<2.3-dev" + }, + "time": "2013-01-11 18:51:48", + "type": "library", + "autoload": { + "psr-0": { + "ServerGrove\\KbBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ismael Ambrosi", + "email": "ismaambrosi@gmail.com" + }, + { + "name": "Pablo Godel", + "email": "pgodel@gmail.com" + } + ] + }, { "name": "servergrove/translation-editor-bundle", "version": "dev-master", @@ -1398,9 +1416,8 @@ "php": ">=5.3.2", "symfony/framework-bundle": "2.*" }, - "time": "1345037367", + "time": "2012-08-15 13:29:27", "type": "symfony-bundle", - "installation-source": "source", "autoload": { "psr-0": { "ServerGrove\\Bundle\\TranslationEditorBundle": "" @@ -1449,7 +1466,6 @@ "dev-master": "4.2-dev" } }, - "installation-source": "dist", "autoload": { "files": [ "lib/swift_required.php" @@ -1506,14 +1522,13 @@ "suggest": { "symfony/twig-bundle": ">=2.1.0,<2.3-dev" }, - "time": "1352285268", + "time": "2012-11-07 10:47:48", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Bundle\\AsseticBundle": "" @@ -1563,14 +1578,13 @@ "symfony/yaml": ">=2.1.0,<2.3-dev", "symfony/config": ">=2.1.0,<2.3-dev" }, - "time": "1348137624", + "time": "2012-09-20 10:40:24", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Bundle\\MonologBundle": "" @@ -1618,14 +1632,13 @@ "symfony/config": ">=2.1.0,<2.3-dev", "symfony/yaml": ">=2.1.0,<2.3-dev" }, - "time": "1350447491", + "time": "2012-10-17 04:18:11", "type": "symfony-bundle", "extra": { "branch-alias": { "dev-master": "2.1-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Bundle\\SwiftmailerBundle": "" @@ -1707,14 +1720,13 @@ "propel/propel1": "dev-master", "monolog/monolog": "1.*" }, - "time": "1353321329", + "time": "2012-11-19 10:35:29", "type": "library", "extra": { "branch-alias": { "dev-master": "2.1-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony": "src/", @@ -1757,14 +1769,13 @@ "require": { "twig/twig": "1.*" }, - "time": "1349889206", + "time": "2012-10-10 17:13:26", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Twig_Extensions_": "lib/" @@ -1804,14 +1815,13 @@ "require": { "php": ">=5.2.4" }, - "time": "1353308798", + "time": "2012-11-19 07:06:38", "type": "library", "extra": { "branch-alias": { "dev-master": "1.12-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Twig_": "lib/" @@ -1848,6 +1858,7 @@ "doctrine/doctrine-fixtures-bundle": 20, "servergrove/translation-editor-bundle": 20, "jackalope/jackalope-jackrabbit": 20, - "knplabs/knp-markdown-bundle": 20 + "knplabs/knp-markdown-bundle": 20, + "servergrove/kb-bundle": 20 } } diff --git a/src/ServerGrove/KbBundle/Composer/JackrabbitInstaller.php b/src/ServerGrove/KbBundle/Composer/JackrabbitInstaller.php deleted file mode 100644 index b30623e..0000000 --- a/src/ServerGrove/KbBundle/Composer/JackrabbitInstaller.php +++ /dev/null @@ -1,153 +0,0 @@ - - */ -class JackrabbitInstaller -{ - const JACKRABBIT_VERSION = '2.4.3'; - - /** - * @var string - */ - private static $downloadUrls; - - /** - * @static - * - * @param \Composer\Script\CommandEvent $event - */ - public static function checkAndInstall($event) - { - $appDir = getcwd().'/app'; - $resourcesPath = $appDir.'/Resources'; - if (is_dir($resourcesPath)) { - $filesystem = new Filesystem(); - $jackrabbitDir = $resourcesPath.'/java/jackrabbit'; - - $filesystem->ensureDirectoryExists($jackrabbitDir); - - if (!self::check($jackrabbitDir) && false !== ($file = self::download($event->getIO(), $jackrabbitDir))) { - self::install($file, $appDir); - } - } - } - - /** - * @static - * - * @param string $destination - * - * @return bool - */ - private static function check($destination) - { - $url = current(self::getDownloadUrl()); - - return false !== $url && file_exists($destination.'/'.basename(parse_url($url, PHP_URL_PATH))); - } - - /** - * @static - * - * @param \Composer\IO\IOInterface $io - * @param string $destination - * - * @return bool - */ - private static function download(\Composer\IO\IOInterface $io, $destination) - { - $io->write('Installing jackrabbit'); - if (false === ($urls = self::getDownloadUrl())) { - $io->write('Invalid URLs'); - } else { - reset($urls); - $r = new RemoteFilesystem($io); - - do { - try { - $url = current($urls); - $file = $destination.'/'.basename(parse_url($url, PHP_URL_PATH)); - $io->write(sprintf('Retrieving Jackrabbit from "%s"', $url), true); - - $result = $r->copy('', $url, $file, true); - } catch (\Composer\Downloader\TransportException $ex) { - $io->write('', true); - $result = false; - $file = null; - } - } while (false === $result && next($urls)); - - if (is_null($file)) { - throw new \Exception('Invalid file name'); - } - - return $file; - } - - return false; - } - - private static function install($file, $appDir) - { - $parametersFile = $appDir.'/config/jackrabbit.yml'; - - if (!file_exists($parametersFile)) { - touch($parametersFile); - } - - $content = sprintf( - 'parameters: %s doctrine_phpcr.jackrabbit_jar: %s%1$s', - PHP_EOL, - str_replace($appDir, '%kernel.root_dir%', $file) - ); - - file_put_contents($parametersFile, $content); - } - - /** - * @static - * @return bool|string - */ - private static function getDownloadUrl() - { - if (!is_array(self::$downloadUrls)) { - $version = self::JACKRABBIT_VERSION; - if (false === ($content = file_get_contents(self::getMirrorListUrl($version)))) { - throw new \Exception('Unable to retrive mirror list'); - } - $content = strip_tags($content); - $pattern = '#(?P[https|http|ftp]+\://[\w\.\-/]+/jackrabbit\-standalone\-(?P[0-9\.]+).jar)#'; - - if (!preg_match_all($pattern, $content, $out)) { - return false; - } - - $map = array(); - foreach ($out['url'] as $position => $url) { - if (isset($out['version'][$position]) && $version === $out['version'][$position]) { - $map[] = $url; - } - } - - self::$downloadUrls = array_unique($map); - } - - return self::$downloadUrls; - } - - private static function getMirrorListUrl($version) - { - return strtr( - 'http://www.apache.org/dyn/closer.cgi/jackrabbit/:version/jackrabbit-standalone-:version.jar', - array(':version' => $version) - ); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/ArticlesController.php b/src/ServerGrove/KbBundle/Controller/Admin/ArticlesController.php deleted file mode 100644 index a2c4a11..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/ArticlesController.php +++ /dev/null @@ -1,350 +0,0 @@ -getArticleRepository()->findAll(); - - return array('documents' => $documents); - } - - /** - * Finds and displays a Article document. - * - * @Route("/{slug}/show", name="sgkb_admin_articles_show") - * @ParamConverter("article", class="ServerGroveKbBundle:Article") - * @Template() - */ - public function showAction(Article $article) - { - $deleteForm = $this->createDeleteForm($article); - - return array( - 'article' => $article, - 'delete_form' => $deleteForm->createView(), - ); - } - - /** - * Displays a form to create a new Article document. - * - * @Route("/new", name="sgkb_admin_articles_new") - * @Template() - */ - public function newAction(Category $category = null) - { - $document = new Article(); - if (!is_null($category)) { - $document->addCategory($category); - } - - $form = $this->createForm( - new ArticleNewType(), - $document, - array('enable_related_urls' => $this->areRelatedUrlsEnabled()) - ); - - return array( - 'document' => $document, - 'form' => $form->createView() - ); - } - - /** - * Creates a new Article document. - * - * @Route("/create", name="sgkb_admin_articles_create") - * @Method("post") - */ - public function createAction() - { - $document = new Article(); - $request = $this->getRequest(); - $form = $this->createForm( - new ArticleNewType(), - $document, - array('enable_related_urls' => $this->areRelatedUrlsEnabled()) - ); - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - - $dm->persist($document); - $dm->bindTranslation($document, $this->getDefaultLocale()); - $dm->flush(); - - return $this->redirect( - $this->generateUrl( - 'sgkb_admin_articles_edit', - array( - 'slug' => $document->getSlug() - ) - ) - ); - } - - return $this->render( - 'ServerGroveKbBundle:Admin/Articles:new.html.twig', - array( - 'document' => $document, - 'form' => $form->createView() - ), - new Response('', 400) - ); - } - - /** - * Displays a form to edit an existing Article document. - * - * @Route("/{slug}/edit", name="sgkb_admin_articles_edit") - * @Template() - * @ParamConverter("article", class="ServerGroveKbBundle:Article") - */ - public function editAction(Article $article, array $forms = array()) - { - $original = clone $article; - $dm = $this->getDocumentManager(); - $editForm = $this->createForm( - new ArticleType(), - $original, - array( - 'enable_related_urls' => $this->areRelatedUrlsEnabled(), - 'loader' => new \ServerGrove\KbBundle\Form\ChoiceList\CategoriesLoader($dm) - ) - ); - - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - - $translationForms = array(); - - foreach ($locales as $locale) { - try { - $tmp = $dm->findTranslation(null, $article->getId(), $locale, false); - } catch (\InvalidArgumentException $e) { - $tmp = clone $original; - $tmp->setIsActive(false)->setContent(''); - } - - $form = isset($forms[$locale]) ? $forms[$locale] : $this->createForm( - new ArticleTranslationType($locale), - $tmp, - array('id_prefix' => $locale.'_') - ); - - $translationForms[$locale] = $form->createView(); - } - - return array( - 'document' => $original, - 'edit_form' => $editForm->createView(), - 'delete_form' => $this->createDeleteForm($article)->createView(), - 'translation_forms' => $translationForms - ); - } - - /** - * Edits an existing Article document. - * - * @Route("/{slug}/update", name="sgkb_admin_articles_update") - * @Method("post") - * @ParamConverter("article", class="ServerGroveKbBundle:Article") - */ - public function updateAction(Article $article) - { - $editForm = $this->createForm( - new ArticleType(), - $article, - array('enable_related_urls' => $this->areRelatedUrlsEnabled()) - ); - - $dm = $this->getDocumentManager(); - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - $request = $this->getRequest(); - - $editForm->bind($request); - - if ($valid = $editForm->isValid()) { - $dm->checkpoint($article); - $dm->persist($article); - } - - $translationForms = array(); - - foreach ($locales as $locale) { - $translation = $dm->findTranslation('ServerGrove\KbBundle\Document\Article', $article->getId(), $locale); - - $form = $this->createForm( - new ArticleTranslationType($locale), - $translation, - array('id_prefix' => $locale.'_') - ); - - $form->bind($this->getRequest()); - if ($form->isValid()) { - $dm->bindTranslation($translation, $locale); - } else { - $valid = false; - } - - $translationForms[$locale] = $form; - } - - if ($valid) { - $dm->flush(); - - $url = $request->request->get('back_to_list', false) ? - $this->generateUrl( - 'sgkb_admin_categories_articles', - array('path' => $article->getDefaultCategory()->getPath()) - ) : - $this->generateUrl('sgkb_admin_articles_edit', array('slug' => $article->getSlug())); - - return $this->redirect($url); - } - - return $this->render( - 'ServerGroveKbBundle:Admin/Articles:edit.html.twig', - $this->editAction($dm->refresh($article), $translationForms), - new Response('', 400) - ); - } - - /** - * Deletes a Article document. - * - * @Route("/{slug}/delete", name="sgkb_admin_articles_delete") - * @Method("post") - * @ParamConverter("article", class="ServerGroveKbBundle:Article") - */ - public function deleteAction(Article $article) - { - $form = $this->createDeleteForm($article); - $request = $this->getRequest(); - - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - $dm->remove($article); - $dm->flush(); - } - - return $this->redirect($this->generateUrl('sgkb_admin_articles_index')); - } - - /** - * @Route("/{slug}/keywords/sync.{_format}", name="sgkb_admin_articles_keywords_sync", requirements={"_format"="json"}) - * @Method("post") - * - * @param \ServerGrove\KbBundle\Document\Article $article - * - * @return \Symfony\Component\HttpFoundation\Response - */ - public function syncKeywords(Article $article) - { - $request = $this->getRequest(); - - if (!$request->isXmlHttpRequest()) { - return $this->createNotFoundException(); - } - - $keywords = array(); - - if ($request->request->has('keywords') && is_array($tmp = $request->request->get('keywords'))) { - $keywords = $tmp; - } - - $article->setKeywords($keywords); - - $dm = $this->getDocumentManager(); - $dm->persist($article); - $dm->flush($article); - - return new Response(json_encode(array('result' => true))); - } - - /** - * @Route("/check-article.{_format}", name="sgkb_admin_articles_check", requirements={"_format"="json"}) - * @Method("post") - * - * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @return \Symfony\Component\HttpFoundation\Response - */ - public function checkArticleAction() - { - $request = $this->getRequest(); - - if (!$request->isXmlHttpRequest()) { - throw $this->createNotFoundException(); - } - - if (!$request->request->has('title')) { - throw new HttpException(400, 'Missing title'); - } - - /** @var $translator \Symfony\Bundle\FrameworkBundle\Translation\Translator */ - $translator = $this->get('translator'); - - $message = $translator->trans('The article does not exists'); - $result = true; - - $article = $this->getArticleRepository()->findOneBySlug( - \ServerGrove\KbBundle\Util\Sluggable::urlize($request->request->get('title')) - ); - if ($article) { - $message = $translator->trans('The article already exists'); - $result = false; - } - - return new Response(json_encode( - array( - 'result' => $result, - 'message' => $message - ) - ), 200, array('Content-type' => 'application/json')); - } - - private function createDeleteForm(Article $article) - { - return $this->createFormBuilder(array('slug' => $article->getSlug())) - ->add('slug', 'hidden') - ->getForm(); - } - - /** - * @return boolean - */ - private function areRelatedUrlsEnabled() - { - return $this->get('service_container')->getParameter('server_grove_kb.article.enable_related_urls'); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/ArticlesFilesController.php b/src/ServerGrove/KbBundle/Controller/Admin/ArticlesFilesController.php deleted file mode 100644 index a79fa26..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/ArticlesFilesController.php +++ /dev/null @@ -1,96 +0,0 @@ - - */ -class ArticlesFilesController extends Controller -{ - /** - * @param string $_format - * - * @return array - * - * @Route("/all.{_format}", name="sgkb_admin_articles_files_all", requirements={"_format"="html|json"}) - * @method("get") - */ - public function allAction($_format) - { - $repo = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:ArticleFile'); - $all = array(); - - /** @var $file ArticleFile */ - foreach ($repo->findAll() as $file) { - $all[$file->getId()] = array('path' => $file->getPath()); - } - - if ('json' === $_format) { - $out = json_encode($all); - } else { - $out = var_export($all, true); - } - - return new Response($out); - } - - /** - * @return array - * - * @Route("/uploader", name="sgkb_admin_articles_files_uploader") - * @method("get") - * @Template() - */ - public function uploaderAction() - { - $form = $this->createForm(new ArticleFileType(), new ArticleFile()); - - return array('form' => $form->createView()); - } - - /** - * @Route("/upload", name="sgkb_admin_articles_files_upload") - * @method("post") - * @return array - */ - public function uploadAction() - { - $form = $this->createForm(new ArticleFileType(), $document = new ArticleFile()); - $status = 400; - $refresh = false; - - $form->bind($this->getRequest()); - if ($form->isValid()) { - /** @var $data \Symfony\Component\HttpFoundation\File\UploadedFile */ - $data = $form->get('path')->getData(); - $file = $data->move($this->get('kernel')->getRootDir().'/../web/uploads', date('YmdHi-').$data->getClientOriginalName()); - - $document->setPath('/uploads/'.$file->getBasename()); - - $dm = $this->getDocumentManager(); - - $dm->persist($document); - $dm->flush(); - - $status = 200; - $form = $this->createForm(new ArticleFileType(), new ArticleFile()); - $refresh = true; - } - - return $this->render('ServerGroveKbBundle:Admin/ArticlesFiles:uploader.html.twig', array( - 'form' => $form->createView(), - 'refresh' => $refresh - ), new Response('', $status)); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/CategoriesController.php b/src/ServerGrove/KbBundle/Controller/Admin/CategoriesController.php deleted file mode 100644 index f9ec60b..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/CategoriesController.php +++ /dev/null @@ -1,314 +0,0 @@ - - */ -class CategoriesController extends Controller -{ - - /** - * @Route("/", name="sgkb_admin_categories_index") - * @Route("/{path}/show", name="sgkb_admin_categories_show", requirements={"path":".+"}) - * @Template - * - * @param string|null $path - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @return array - */ - public function indexAction($path = null) - { - if (!is_null($path)) { - if (!$category = $this->getCategoryRepository()->findOneBy(array('path' => $path))) { - throw $this->createNotFoundException('Unable to find Category document.'); - } - - return array('category' => $category, 'categories' => $category->getChildren()); - } - - return array('categories' => $this->getCategoryRepository()->findAllParents()); - } - - /** - * - * @Route("/new", name="sgkb_admin_categories_new") - * @Route("/{path}/categories/new", name="sgkb_admin_categories_new_subcategory", requirements={"path":".+"}) - * @Template - * @ParamConverter("parent", class="ServerGroveKbBundle:Category") - * - * @param \ServerGrove\KbBundle\Document\Category $parent - * - * @return array - */ - public function newAction(Category $parent = null) - { - $document = new Category(); - $form = $this->createForm(new CategoryType(), $document); - - if (!is_null($parent)) { - $document->setParent($parent); - } - - return array( - 'document' => $document, - 'parent' => $parent, - 'form' => $form->createView() - ); - } - - /** - * @Route("/create", name="sgkb_admin_categories_create") - * @Route("/{path}/categories/create", name="sgkb_admin_categories_create_subcategory", requirements={"path":".+"}) - * @Method("post") - * @ParamConverter("parent", class="ServerGroveKbBundle:Category") - * - * @param \ServerGrove\KbBundle\Document\Category $parent - * - * @return array - */ - public function createAction(Category $parent = null) - { - $document = new Category(); - $request = $this->getRequest(); - $form = $this->createForm(new CategoryType(), $document); - - $form->bind($request); - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - - if (is_null($parent)) { - /** @var $session \PHPCR\SessionInterface */ - $session = $dm->getPhpcrSession(); - $root = $session->getNode('/'); - $root->hasNode('categories') || $root->addNode('categories'); - - $document->setParent($dm->find(null, '/categories')); - } else { - $document->setParent($parent); - } - - $dm->persist($document); - $dm->bindTranslation($document, $this->getDefaultLocale()); - $dm->flush(); - - return $this->redirect( - $this->generateUrl('sgkb_admin_categories_show', array('path' => $document->getPath())) - ); - } - - return $this->render( - 'ServerGroveKbBundle:Admin/Categories:new.html.twig', - array( - 'document' => $document, - 'parent' => $parent, - 'form' => $form->createView() - ), - new Response('', 400) - ); - } - - /** - * Displays a form to edit an existing Category document. - * - * @Route("/{path}/edit", name="sgkb_admin_categories_edit", requirements={"path":".+"}) - * @Template() - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - * - * @param \ServerGrove\KbBundle\Document\Category $category - * @param array $forms - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @return array - */ - public function editAction(Category $category, array $forms = array()) - { - $original = clone $category; - $dm = $this->getDocumentManager(); - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - - $translationForms = array(); - - foreach ($locales as $locale) { - try { - $tmp = $dm->findTranslation(get_class($category), $category->getId(), $locale, false); - } catch (\InvalidArgumentException $e) { - $tmp = clone $original; - $tmp->setLocale($locale)->setDescription(''); - } - - $form = isset($forms[$locale]) ? - $forms[$locale] : - $this->createForm(new CategoryType($locale), $tmp, array('id_prefix' => $locale.'_')); - - $translationForms[$locale] = $form->createView(); - } - - return array( - 'document' => $category, - 'settings_form' => $this->createForm(new CategorySettingsType(), $category)->createView(), - 'translation_forms' => $translationForms, - 'delete_form' => $this->createDeleteForm($category)->createView() - ); - } - - /** - * Edits an existing Translation document. - * - * @Route("/{path}/update", name="sgkb_admin_categories_update", requirements={"path":".+"}) - * @Method("post") - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - */ - public function updateAction(Category $category) - { - $original = clone $category; - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - $dm = $this->getDocumentManager(); - $translationForms = array(); - - $settingsForm = $this->createForm(new CategorySettingsType(), $category); - $settingsForm->bind($this->getRequest()); - - $valid = $settingsForm->isValid(); - if ($valid) { - $dm->persist($category); - } - - foreach ($locales as $locale) { - $translation = $dm->findTranslation('ServerGrove\KbBundle\Document\Category', $original->getId(), $locale); - - $form = $this->createForm(new CategoryType($locale), $translation, array('id_prefix' => $locale.'_')); - - $form->bind($this->getRequest()); - if ($form->isValid()) { - $dm->bindTranslation($translation, $locale); - $dm->flush(); - } else { - $valid = false; - } - - $translationForms[$locale] = $form; - } - - if ($valid) { - return $this->redirect( - $this->generateUrl('sgkb_admin_categories_edit', array('path' => $category->getPath())) - ); - } - - return $this->render( - 'ServerGroveKbBundle:Admin/Categories:edit.html.twig', - $this->editAction($category, $translationForms), - new Response('', 400) - ); - } - - /** - * Deletes a Category document. - * - * @Route("/{path}/delete", name="sgkb_admin_categories_delete", requirements={"path":".+"}) - * @Method("post") - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - * - */ - public function deleteAction(Category $category) - { - $form = $this->createDeleteForm($category); - $request = $this->getRequest(); - - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - - $this->removeChildrenFromCategory($category); - $this->removeArticlesFromCategory($category); - - $dm->remove($category); - $dm->flush(); - } - - return $this->redirect($this->generateUrl('sgkb_admin_categories_index')); - } - - /** - * Lists all Article documents. - * - * @Route("/{path}/articles", name="sgkb_admin_categories_articles", requirements={"path":".+"}) - * @Template("ServerGroveKbBundle:Admin/Articles:index.html.twig") - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - */ - public function articlesAction(Category $category) - { - $documents = $category->getArticles(); - - return array('documents' => $documents, 'category' => $category); - } - - /** - * @Route("/{path}/articles/new", name="sgkb_admin_categories_new_article", requirements={"path":".+"}) - * @param \ServerGrove\KbBundle\Document\Category $category - * @return Response - */ - public function newArticleAction(Category $category) - { - return $this->forward('ServerGroveKbBundle:Admin/Articles:new', array('category' => $category)); - } - - public function removeArticlesFromCategory() - { - /** @var $category Category */ - $category = func_get_arg(1 == func_num_args() ? 0 : 1); - - if (!($category instanceof Category)) { - throw new \RuntimeException('Expected instance of Category'); - } - - $dm = $this->getDocumentManager(); - $logger = $this->get('logger'); - - /** @var $article Article */ - foreach ($category->getArticles() as $article) { - $article->removeCategory($category); - if (0 == $article->getCategories()->count()) { - $logger->info(sprintf('Removing article "%s"', $article->getTitle())); - $dm->remove($article); - } - } - } - - public function removeChildrenFromCategory(Category $category) - { - $controller = $this; - - foreach ($category->getChildren() as $child) { - call_user_func(array($controller, 'removeArticlesFromCategory'), $child); - call_user_func(array($controller, 'removeChildrenFromCategory'), $child); - - /** @var $category Category */ - $category->getChildren()->removeElement($child); - } - } - - private function createDeleteForm(Category $category) - { - return $this->createFormBuilder(array('id' => $category->getId())) - ->add('id', 'hidden') - ->getForm(); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/Controller.php b/src/ServerGrove/KbBundle/Controller/Admin/Controller.php deleted file mode 100644 index 82b6fbe..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/Controller.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ -abstract class Controller extends BaseController -{ - - /** - * @return string - */ - protected function getDefaultLocale() - { - return $this->get('service_container')->getParameter('server_grove_kb.default_locale'); - } - - /** - * @return \Symfony\Component\Security\Core\SecurityContext - */ - protected function getSecurityContext() - { - return $this->get('security.context'); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/DefaultController.php b/src/ServerGrove/KbBundle/Controller/Admin/DefaultController.php deleted file mode 100644 index 2a59b77..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/DefaultController.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ -class DefaultController extends Controller -{ - - /** - * @Route("/login", name="sgkb_admin_login") - * @Template - */ - final public function loginAction() - { - $request = $this->getRequest(); - $session = $request->getSession(); - - // get the login error if there is one - if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { - $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR); - } else { - $error = $session->get(SecurityContext::AUTHENTICATION_ERROR); - } - - return array( - 'last_username' => $session->get(SecurityContext::LAST_USERNAME), - 'error' => $error - ); - } - - /** - * @Route("/login-check", name="sgkb_admin_login_check") - * @Method("post") - * @Template - */ - final public function loginCheckAction() - { - return array(); - } - - /** - * @Route("/logout", name="sgkb_admin_logout") - */ - final public function logoutAction() - { - return array(); - } - - /** - * @Route("/", name="sgkb_admin") - * - * @return \Symfony\Component\HttpFoundation\RedirectResponse - */ - final public function redirectAction() - { - return $this->redirect($this->generateUrl('sgkb_admin_categories_index')); - } - - /** - * @Template - */ - public function adminAccessAction() - { - if (!$this->get('security.context')->isGranted('ROLE_EDITOR')) { - return new \Symfony\Component\HttpFoundation\Response(''); - } - - return array(); - } - - /** - * @Template - * - * @return array - */ - public function topbarAction() - { - /** @var $token \Symfony\Component\Security\Core\Authentication\Token\TokenInterface */ - $roles = $this->get('security.context')->getToken()->getRoles(); - - return array('authenticated' => !empty($roles)); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/UrlsController.php b/src/ServerGrove/KbBundle/Controller/Admin/UrlsController.php deleted file mode 100644 index e96f3d3..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/UrlsController.php +++ /dev/null @@ -1,253 +0,0 @@ -getDocumentManager(); - - $documents = $dm->getRepository('ServerGroveKbBundle:Url')->findAll(); - - return array('documents' => $documents); - } - - /** - * Finds and displays a Url document. - * - * @Route("/{slug}/show", name="sgkb_admin_urls_show") - * @Template() - * @ParamConverter("url", class="ServerGroveKbBundle:Url") - */ - public function showAction(Url $url) - { - $deleteForm = $this->createDeleteForm($url); - - return array( - 'document' => $url, - 'delete_form' => $deleteForm->createView(), - ); - } - - /** - * Displays a form to create a new Url document. - * - * @Route("/new", name="sgkb_admin_urls_new") - * @Template() - */ - public function newAction() - { - $document = new Url(); - $form = $this->createForm(new UrlType(), $document); - - return array( - 'document' => $document, - 'form' => $form->createView() - ); - } - - /** - * Creates a new Url document. - * - * @Route("/create", name="sgkb_admin_urls_create") - * @Method("post") - */ - public function createAction() - { - $document = new Url(); - $request = $this->getRequest(); - $form = $this->createForm(new UrlType(), $document); - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - $dm->persist($document); - $dm->bindTranslation($document, $this->getDefaultLocale()); - $dm->flush(); - - if ($request->isXmlHttpRequest()) { - return new Response(json_encode(array( - 'result' => true, - 'rsp' => array( - 'id' => $document->getId(), - 'name' => $document->getName(), - 'url' => $document->getUrl(), - 'slug' => $document->getSlug() - ) - )), 200, array('Content-type' => 'application/json')); - } - - return $this->redirect($this->generateUrl('sgkb_admin_urls_edit', array('slug' => $document->getSlug()))); - - } elseif ($request->isXmlHttpRequest()) { - $getErrors = function($form, $key = 'global') { - $errors = array(); - foreach ($form->getErrors() as $error) { - $errors[$key] = $error->getMessage(); - } - - return $errors; - }; - - $errors = $getErrors($form); - foreach ($form->all() as $key => $child) { - $errors = array_merge($errors, $getErrors($child, $key)); - } - - return new Response(json_encode(array( - 'result' => false, - 'errors' => $errors - )), 400, array('Content-type' => 'application/json')); - } - - return $this->render('ServerGroveKbBundle:Admin/Urls:new.html.twig', array( - 'document' => $document, - 'form' => $form->createView() - ), new Response('', 400)); - } - - /** - * Displays a form to edit an existing Url document. - * - * @Route("/{slug}/edit", name="sgkb_admin_urls_edit") - * @Template() - * @ParamConverter("url", class="ServerGroveKbBundle:Url") - */ - public function editAction(Url $url, array $forms = array()) - { - $dm = $this->getDocumentManager(); - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - - $translationForms = array(); - - foreach ($locales as $locale) { - $requiredFields = true; - try { - $tmp = $dm->findTranslation('ServerGrove\KbBundle\Document\Url', $url->getId(), $locale, false); - } catch (\InvalidArgumentException $e) { - $tmp = clone $url; - $tmp->setName(null)->setUrl(null); - $requiredFields = false; - } - - $form = isset($forms[$locale]) ? $forms[$locale] : $this->createForm(new UrlType($locale, $requiredFields), $tmp); - - $translationForms[$locale] = $form->createView(); - } - - return array( - 'document' => $url, - 'translation_forms' => $translationForms, - ); - } - - /** - * Edits an existing Url document. - * - * @Route("/{slug}/update", name="sgkb_admin_urls_update") - * @Method("post") - * @ParamConverter("url", class="ServerGroveKbBundle:Url") - */ - public function updateAction(Url $url) - { - $locales = $this->get('service_container')->getParameter('server_grove_kb.locales'); - $dm = $this->getDocumentManager(); - $translationForms = array(); - $valid = true; - - foreach ($locales as $locale) { - try { - $translation = $dm->findTranslation('ServerGrove\KbBundle\Document\Url', $url->getId(), $locale, false); - $required = true; - } catch (\InvalidArgumentException $e) { - $translation = $dm->findTranslation('ServerGrove\KbBundle\Document\Url', $url->getId(), $locale); - $required = false; - } - $form = $this->createForm(new UrlType($locale), $translation); - - $form->bind($this->getRequest()); - if ($form->isValid()) { - $dm->bindTranslation($translation, $locale); - $dm->flush(); - - $url = $dm->refresh($url); - } elseif ($required) { - $valid = false; - } - - $translationForms[$locale] = $form; - } - - if ($valid) { - return $this->redirect($this->generateUrl('sgkb_admin_urls_edit', array('slug' => $url->getSlug()))); - } - - return $this->render('ServerGroveKbBundle:Admin/Urls:edit.html.twig', - $this->editAction($url, $translationForms), - new Response('', 400)); - } - - /** - * Deletes a Url document. - * - * @Route("/{slug}/delete", name="sgkb_admin_urls_delete") - * @Method("post") - * @ParamConverter("url", class="ServerGroveKbBundle:Url") - */ - public function deleteAction($url) - { - $form = $this->createDeleteForm($url); - $request = $this->getRequest(); - - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - $dm->remove($url); - $dm->flush(); - } - - return $this->redirect($this->generateUrl('sgkb_admin_urls_index')); - } - - /** - * @Template - * @return array - */ - public function modalFormAction() - { - $urlForm = $this->createForm(new UrlType()); - - return array( - 'form' => $urlForm->createView(), - 'wrap' => true - ); - } - - private function createDeleteForm(Url $url) - { - return $this->createFormBuilder(array('slug' => $url->getSlug())) - ->add('slug', 'hidden') - ->getForm(); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Admin/UsersController.php b/src/ServerGrove/KbBundle/Controller/Admin/UsersController.php deleted file mode 100644 index 4989f1d..0000000 --- a/src/ServerGrove/KbBundle/Controller/Admin/UsersController.php +++ /dev/null @@ -1,235 +0,0 @@ -getDocumentManager(); - - $documents = $dm->getRepository('ServerGroveKbBundle:User')->findAll(); - - return array('documents' => $documents); - } - - /** - * Finds and displays a User document. - * - * @Route("/{username}/show", name="sgkb_admin_users_show") - * @Template() - * @ParamConverter("user", class="ServerGroveKbBundle:User") - */ - public function showAction(User $user) - { - $deleteForm = $this->createDeleteForm($user); - - return array( - 'document' => $user, - 'delete_form' => $deleteForm->createView(), - ); - } - - /** - * Displays a form to create a new User document. - * - * @Route("/new", name="sgkb_admin_users_new") - * @Template() - */ - public function newAction() - { - $document = new User(); - $form = $this->createForm(new UserType(), $document); - - return array( - 'document' => $document, - 'form' => $form->createView() - ); - } - - /** - * Creates a new User document. - * - * @Route("/create", name="sgkb_admin_users_create") - * @Method("post") - */ - public function createAction() - { - $document = new User(); - $request = $this->getRequest(); - $form = $this->createForm(new UserType(), $document); - - $form->bind($request); - if ($form->isValid()) { - $document->setPassword($this->getEncodedPassword($document, $form->get('password')->getData())); - - $dm = $this->getDocumentManager(); - $dm->persist($document); - $dm->flush(); - - return $this->redirect($this->generateUrl('sgkb_admin_users_show', array('username' => $document->getUsername()))); - } - - return $this->render('ServerGroveKbBundle:Admin/Users:new.html.twig', array( - 'document' => $document, - 'form' => $form->createView() - ), new Response('', 400)); - } - - /** - * Displays a form to edit an existing User document. - * - * @Route("/{username}/edit", name="sgkb_admin_users_edit") - * @Template() - * @ParamConverter("user", class="ServerGroveKbBundle:User") - */ - public function editAction(User $user) - { - $editForm = $this->createForm(new UserEditType(), $user); - $deleteForm = $this->createDeleteForm($user); - - return array( - 'document' => $user, - 'edit_form' => $editForm->createView(), - 'delete_form' => $deleteForm->createView(), - ); - } - - /** - * Edits an existing User document. - * - * @Route("/{username}/update", name="sgkb_admin_users_update") - * @Method("post") - * @ParamConverter("user", class="ServerGroveKbBundle:User") - */ - public function updateAction(User $user) - { - - $editForm = $this->createForm(new UserEditType(), $user); - $deleteForm = $this->createDeleteForm($user); - - $request = $this->getRequest(); - - $editForm->bind($request); - if ($editForm->isValid()) { - $dm = $this->getDocumentManager(); - $dm->persist($user); - $dm->flush(); - - return $this->redirect($this->generateUrl('sgkb_admin_users_edit', array('username' => $user->getUsername()))); - } - - return $this->render('ServerGroveKbBundle:Admin/Users:edit.html.twig', array( - 'document' => $user, - 'edit_form' => $editForm->createView(), - 'delete_form' => $deleteForm->createView(), - ), new Response('', 400)); - } - - /** - * Deletes a User document. - * - * @Route("/{username}/delete", name="sgkb_admin_users_delete") - * @Method("post") - * @ParamConverter("user", class="ServerGroveKbBundle:User") - */ - public function deleteAction(User $user) - { - $form = $this->createDeleteForm($user); - $request = $this->getRequest(); - - $form->bind($request); - - if ($form->isValid()) { - $dm = $this->getDocumentManager(); - $dm->remove($user); - $dm->flush(); - } - - return $this->redirect($this->generateUrl('sgkb_admin_users_index')); - } - - /** - * @Route("/{username}/password/edit", name="sgkb_admin_users_password_edit") - * @Method("get") - * @ParamConverter("user", class="ServerGroveKbBundle:User") - * @Template() - */ - public function passwordEditAction(User $user) - { - $form = $this->createForm(new UserPasswordType(), $user); - - return array('form' => $form->createView(), 'document' => $user); - } - - /** - * @Route("/{username}/password/update", name="sgkb_admin_users_password_update") - * @Method("post") - * @ParamConverter("user", class="ServerGroveKbBundle:User") - */ - public function passwordUpdateAction(User $user) - { - $form = $this->createForm(new UserPasswordType(), $user); - $request = $this->getRequest(); - - $form->bind($request); - - if ($form->isValid()) { - $user->setPassword($this->getEncodedPassword($user, $form->get('password')->getData())); - - $dm = $this->getDocumentManager(); - $dm->persist($user); - $dm->flush($user); - - return $this->redirect($this->generateUrl('sgkb_admin_users_password_edit', array('username' => $user->getUsername()))); - } - - return $this->render('ServerGroveKbBundle:Admin/Users:passwordEdit.html.twig', array( - 'form' => $form->createView(), - 'document' => $user - )); - } - - /** - * @param \ServerGrove\KbBundle\Document\User $user - * @param string $password - * - * @return string - */ - private function getEncodedPassword(User $user, $password) - { - $factory = $this->get('security.encoder_factory'); - $encoder = $factory->getEncoder($user); - - return $encoder->encodePassword($password, $user->getSalt()); - } - - private function createDeleteForm(User $user) - { - return $this->createFormBuilder(array('username' => $user->getUsername())) - ->add('username', 'hidden') - ->getForm(); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/ArticlesController.php b/src/ServerGrove/KbBundle/Controller/ArticlesController.php deleted file mode 100644 index abf397d..0000000 --- a/src/ServerGrove/KbBundle/Controller/ArticlesController.php +++ /dev/null @@ -1,163 +0,0 @@ - - */ -class ArticlesController extends Controller -{ - - /** - * - * @Route("/{slug}.{_format}", name="sgkb_articles_view", defaults={"_format"="html"}, requirements={"_format"="html|json|xml"}) - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - * @ParamConverter("article", class="ServerGroveKbBundle:Article") - * @Template - * - * @param Article $article - * @param Category $category - * @param bool $registerView - * @param bool $searchForm - * @param bool $showComments - * - * @return array - */ - public function viewAction(Article $article, Category $category, $registerView = true, $searchForm = false, $showComments = true) - { - if ($registerView) { - $this->registerView($article); - } - - $this->checkLocale($article); - - return array( - 'category' => $category, - 'article' => $article, - 'searchForm' => $searchForm, - 'showComments' => $showComments - ); - } - - private function checkLocale(Article $article) - { - $dm = $this->getDocumentManager(); - $locales = $dm->getLocalesFor($article); - - $locale = $this->getRequest()->getLocale(); - if (!in_array($locale, $locales)) { - $article->setTitle($article->getTitle().'(Needs to be translated by Google)'); - } - } - - /** - * @Template - * - * @param \ServerGrove\KbBundle\Document\Article $article - * @param \ServerGrove\KbBundle\Document\Category $category - * @return array - */ - public function articleContentAction(Article $article, Category $category = null, $showComments = true) - { - !is_null($category) || $category = $article->getDefaultCategory(); - $locales = $this->getActiveLocales($article, $this->getDocumentManager()->getLocalesFor($article)); - $localeNames = $this->getLocaleNames($locales); - $currentLocale = $this->getRequest()->getLocale(); - - foreach ($locales as $locale) { - $localeNames[$locale]['current'] = $currentLocale == $locale; - $localeNames[$locale]['path'] = $this->generateUrl( - 'sgkb_articles_view', - array( - '_format' => $this->getRequest()->get('_format'), - '_locale' => $locale, - 'slug' => $article->getSlug(), - 'path' => $category->getPath() - ) - ); - } - - $article = $this->getDocumentManager()->refresh($article); - $this->checkLocale($article); - - $articles = $category->getArticles(); - $index = $articles->indexOf($article); - - $container = $this->get('service_container'); - - return array( - 'article' => $article, - 'category' => $category, - 'locales' => $locales, - 'localeNames' => $localeNames, - 'previousArticle' => $articles->get($index - 1), - 'nextArticle' => $articles->get($index + 1), - 'enable_related_urls' => $container->getParameter('server_grove_kb.article.enable_related_urls'), - 'showComments' => $showComments - ); - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - */ - private function registerView(Article $article) - { - $article->registerView(); - $this->getDocumentManager()->persist($article); - $this->getDocumentManager()->flush(); - } - - /** - * @param array $locales - * @return array - */ - private function getLocaleNames(array $locales) - { - $names = array_map( - function ($locale) { - return array('name'=> Locale::getDisplayLanguage($locale)); - }, - $locales - ); - - return array_combine($locales, $names); - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - * @param array $locales - * @return array - */ - private function getActiveLocales(Article $article, array $locales) - { - $activeLocales = array(); - foreach ($locales as $locale) { - try { - $articleTranslation = $this->getDocumentManager()->findTranslation( - 'ServerGrove\KbBundle\Document\Article', - $article->getId(), - $locale, - false - ); - if ($articleTranslation->getIsActive()) { - $activeLocales[] = $locale; - } - } catch (\InvalidArgumentException $e) { - - } - } - - return $activeLocales; - } -} diff --git a/src/ServerGrove/KbBundle/Controller/CategoriesController.php b/src/ServerGrove/KbBundle/Controller/CategoriesController.php deleted file mode 100644 index 97775c8..0000000 --- a/src/ServerGrove/KbBundle/Controller/CategoriesController.php +++ /dev/null @@ -1,139 +0,0 @@ - - */ -class CategoriesController extends Controller -{ - - /** - * @Route("/", name="sgkb_categories_index") - * @Template - * - * @param array $categories - * - * @return array - */ - public function indexAction($categories = null) - { - return array(); - } - - /** - * @Template - * - * @param \ServerGrove\KbBundle\Document\Category $category - * @param \ServerGrove\KbBundle\Document\Category $topCategory - * @return array - */ - public function selectorAction(Category $category = null, Category $topCategory = null) - { - $context = $this->get('security.context'); - $repository = $this->getCategoryRepository(); - if (is_null($category)) { - $categories = $repository->findAllParentsActive($context->isGranted('ROLE_USER')); - } else { - $categories = $category->getChildren()->filter( - $repository->getFilterClosure($context->isGranted('ROLE_USER')) - ); - } - - $filteredCategories = new ArrayCollection(); - - /** @var $category \ServerGrove\KbBundle\Document\Category */ - foreach ($categories as $subcategory) { - if ($this->shouldCategoryBeDisplayed($subcategory)) { - $filteredCategories->add($subcategory); - } - } - - return array('categories' => $filteredCategories, 'topCategory' => $topCategory); - } - - /** - * @param \ServerGrove\KbBundle\Document\Category $category - * @return \Symfony\Component\HttpFoundation\Response - */ - public function subcategorySelectorAction(Category $category) - { - return $this->render( - 'ServerGroveKbBundle:Categories:subcategorySelector.html.twig', - $this->selectorAction($category) - ); - } - - /** - * - * @Route("/view/{path}.{_format}", - * name="sgkb_categories_view", - * defaults={"_format"="html"}, - * requirements={"_format"="html|json|xml|rss","path":".+"} - * ) - * @Template - * @ParamConverter("category", class="ServerGroveKbBundle:Category") - * - * @param Category $category - * - * @return array - */ - public function viewAction(Category $category) - { - $keyword = $this->get('service_container')->getParameter('server_grove_kb.article.top_keyword'); - $context = $this->get('security.context'); - $repository = $this->getCategoryRepository(); - - return array( - 'category' => $category, - 'subcategories' => $category->getChildren()->filter( - $repository->getFilterClosure($context->isGranted('ROLE_USER')) - ), - 'articles' => $category->getArticles(true), - 'topArticles' => $category->getArticles(true)->filter( - function (Article $article) use ($keyword) { - return in_array($keyword, $article->getKeywords()->getValues()); - } - ) - ); - } - - /** - * @param \ServerGrove\KbBundle\Document\Category $category - * - * @return bool - */ - private function shouldCategoryBeDisplayed(Category $category) - { - if (0 < $category->getArticles()->count()) { - /** @var $article \ServerGrove\KbBundle\Document\Article */ - foreach ($category->getArticles() as $article) { - // If the category has at least one article active, - // it should be displayed - if ($article->getIsActive()) { - return true; - } - } - } elseif (0 < $category->getChildren()->count()) { - /** @var $child \ServerGrove\KbBundle\Document\Category */ - foreach ($category->getChildren() as $child) { - if ($this->shouldCategoryBeDisplayed($child)) { - return true; - } - } - } - - return false; - } -} diff --git a/src/ServerGrove/KbBundle/Controller/Controller.php b/src/ServerGrove/KbBundle/Controller/Controller.php deleted file mode 100644 index 8ad0371..0000000 --- a/src/ServerGrove/KbBundle/Controller/Controller.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Controller extends BaseController -{ - - /** @var \Doctrine\Common\Persistence\ObjectManager */ - private $documentManager; - - /** - * @return \Doctrine\ODM\PHPCR\DocumentManager - */ - public function getDocumentManager() - { - if (!$this->documentManager) { - $this->documentManager = $this->get('doctrine_phpcr.odm.document_manager'); - } - - return $this->documentManager; - } - - /** - * @return \ServerGrove\KbBundle\Repository\ArticleRepository - */ - protected function getArticleRepository() - { - return $this->getDocumentManager()->getRepository("ServerGroveKbBundle:Article"); - } - - /** - * @return \ServerGrove\KbBundle\Repository\CategoryRepository - */ - protected function getCategoryRepository() - { - return $this->getDocumentManager()->getRepository("ServerGroveKbBundle:Category"); - } -} diff --git a/src/ServerGrove/KbBundle/Controller/DefaultController.php b/src/ServerGrove/KbBundle/Controller/DefaultController.php deleted file mode 100644 index 52b3a24..0000000 --- a/src/ServerGrove/KbBundle/Controller/DefaultController.php +++ /dev/null @@ -1,105 +0,0 @@ -get('service_container')->getParameter('server_grove_kb.article.front_page_category'); - /** @var $category \ServerGrove\KbBundle\Document\Category */ - $category = $this->getCategoryRepository()->find(sprintf('/categories/%s', Sluggable::urlize($categoryName))); - - if ($category && $category->getArticles()->count()) { - $keyword = $this->get('service_container')->getParameter('server_grove_kb.article.front_page_keyword'); - - $article = $category->getArticles()->filter( - function (Article $article) use ($keyword) { - return in_array($keyword, $article->getKeywords()->toArray()); - } - )->first(); - - if (!$article) { - $article = $category->getArticles()->first(); - } - - return $this->forward( - 'ServerGroveKbBundle:Articles:view', - array( - 'article' => $article, - 'category' => $article->getDefaultCategory(), - 'registerView' => false, - 'searchForm' => true, - 'showComments' => false - ) - ); - } - - return $this->forward('ServerGroveKbBundle:Categories:index'); - } - - /** - * @Template("ServerGroveKbBundle:Default:searchForm.html.twig") - * @return array - */ - public function searchFormAction() - { - $form = $this->getSearchForm(); - - return array('form' => $form->createView()); - } - - /** - * @Route("/{_locale}/search", name="sgkb_search", requirements={"_locale"="en|es|pt"}) - * @Template - * - * @return array - */ - public function searchAction() - { - $form = $this->getSearchForm(); - - /** @var $request \Symfony\Component\HttpFoundation\Request */ - $request = $this->getRequest(); - - $results = array(); - if ('POST' == $request->getMethod()) { - $form->bind($request); - if ($form->isValid()) { - $data = $form->getData(); - $category = null; - - if (!empty($data['category'])) { - $category = $this->getCategoryRepository()->find($data['category']); - } - - $results = $this->getArticleRepository()->search($data['keywords'], $category); - } - } - - return array( - 'form' => $form->createView(), - 'results' => $results - ); - - } - - /** - * @return \Symfony\Component\Form\Form - */ - private function getSearchForm() - { - return $this->createForm(new \ServerGrove\KbBundle\Form\SearchArticleType($this->getCategoryRepository())); - } -} diff --git a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadArticlesData.php b/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadArticlesData.php deleted file mode 100644 index f313bc9..0000000 --- a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadArticlesData.php +++ /dev/null @@ -1,116 +0,0 @@ - - */ -class LoadArticlesData implements FixtureInterface, OrderedFixtureInterface -{ - - /** - * Load data fixtures with the passed EntityManager - * - * @param \Doctrine\Common\Persistence\ObjectManager $manager - * - * @return void - */ - public function load(ObjectManager $manager) - { - $description = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'article-description.md'); - - $article = $this->addArticle( - $manager, - 'The title of my article', - $description, - array($manager->find(null, '/categories/test')), - array('My keyword', 'homepage'), - $manager->find(null, '/url/announcing-multi-lingual-support-for-control-panel'), - array(array('key' => 'test-key', 'value' => 'test-value')) - ); - - $article->setTitle('El título de mi artículo'); - $article->setContent('El contenido de mi artículo'); - $manager->bindTranslation($article, 'es'); - - $article = $this->addArticle( - $manager, - 'The title of the other article', - $description, - array_map( - function ($category) use ($manager) { - return $manager->find(null, '/categories/'.$category); - }, - array('test/child', 'homepage', 'test', 'category-a', 'category-c') - ), - array('My super keyword', 'feature'), - $manager->find(null, '/url/control-panel-v2-launched-with-mongohosting-and-lots-more'), - array(array('key' => 'test-key-2', 'value' => 'test-value-2')) - ); - - $manager->flush(); - - /** @var $user \ServerGrove\KbBundle\Document\User */ - $user = $manager->find(null, '/users/editor'); - $user->subscribe($article); - - $manager->persist($user); - - $manager->flush(); - } - - private function addArticle( - $manager, - $title, - $content, - array $categories, - array $keywords, - $url = null, - array $metadata = array() - ) { - $article = new \ServerGrove\KbBundle\Document\Article(); - $article - ->setTitle($title) - ->setContent($content)->setContentType('markdown') - ->setIsActive(true); - - if (!is_null($url)) { - $article->addUrl($url); - } - - foreach ($categories as $category) { - $article->addCategory($category); - } - - foreach ($keywords as $keyword) { - $article->addKeyword($keyword); - } - - foreach ($metadata as $meta) { - $article->setMetadata($meta['key'], $meta['value']); - } - - $manager->persist($article); - $manager->bindTranslation($article, 'en'); - - return $article; - } - - /** - * Get the order of this fixture - * - * @return integer - */ - public function getOrder() - { - return 3; - } -} diff --git a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadCategoriesData.php b/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadCategoriesData.php deleted file mode 100644 index 43c9b3d..0000000 --- a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadCategoriesData.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ -class LoadCategoriesData implements FixtureInterface, OrderedFixtureInterface -{ - /** - * Load data fixtures with the passed EntityManager - * - * @param \Doctrine\Common\Persistence\ObjectManager $manager - */ - public function load(ObjectManager $manager) - { - $session = $manager->getPhpcrSession(); - $session->getRootNode()->addNode('categories'); - - /** @var $parent \Doctrine\ODM\PHPCR\Document\Generic */ - $parent = $manager->find(null, '/categories'); - - $this->addCategory($manager, 'Homepage', 'Category for homepage articles', $parent, true); - $this->addCategory($manager, 'Category A', 'Description', $parent); - $this->addCategory($manager, 'Category B', 'Description', $parent); - $this->addCategory($manager, 'Category C', 'Description', $parent); - - $category = $this->addCategory($manager, 'Test', 'This is the description of the test category', $parent); - $this->addCategory($manager, 'Child', 'Description of child category', $category); - -/* - $category = $this->addCategory($manager, 'CategoryD', 'This is the description of the test category', $parent); - $this->addCategory($manager, 'Child', 'Description of child category', $category); - */ $manager->flush(); - - $this->addTranslation($manager, $category, 'es', 'Prueba', 'Esta es la descripción de la categoría de prueba'); - } - - /** - * @param \Doctrine\Common\Persistence\ObjectManager $manager - * @param string $name - * @param string $description - * @param \ServerGrove\KbBundle\Document\Category|\Doctrine\ODM\PHPCR\Document\Generic $parent - * @param bool $private - * @return \ServerGrove\KbBundle\Document\Category - */ - private function addCategory(ObjectManager $manager, $name, $description, $parent, $private = false) - { - - $category = new Category(); - $category->setParent($parent); - $category->setName($name); - $category->setDescription($description); - $category->setVisibility($private ? Category::VISIBILITY_PRIVATE : Category::VISIBILITY_PUBLIC); - - $manager->persist($category); - $manager->bindTranslation($category, 'en'); - $manager->flush($category); - - return $category; - } - - private function addTranslation(ObjectManager $manager, Category $category, $locale, $name, $description) - { - $category->setName($name); - $category->setDescription($description); - - $manager->bindTranslation($category, $locale); - $manager->flush(); - } - - /** - * Get the order of this fixture - * - * @return integer - */ - public function getOrder() - { - return 2; - } - -} diff --git a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUrlData.php b/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUrlData.php deleted file mode 100644 index bd3fde4..0000000 --- a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUrlData.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class LoadUrlData implements FixtureInterface, OrderedFixtureInterface -{ - - /** - * Load data fixtures with the passed EntityManager - * - * @param \Doctrine\Common\Persistence\ObjectManager $manager - * - * @return void - */ - public function load(ObjectManager $manager) - { - $this->addUrl($manager, 'Control Panel V2 launched with MongoHosting and lots more', 'http://blog.servergrove.com/2012/05/14/control-panel-v2-launched-with-mongohosting-and-lots-more/'); - $url = $this->addUrl($manager, 'Announcing multi-lingual support for Control Panel', 'http://blog.servergrove.com/2012/01/17/announcing-multi-lingual-support-for-control-panel/'); - - $url->setName('Nuestro Panel de Control habla español!')->setUrl('http://blog.servergrove.com/2012/01/17/nuestro-panel-de-control-habla-espanol/'); - $manager->bindTranslation($url, 'es'); - - $manager->flush(); - } - - /** - * @param \Doctrine\Common\Persistence\ObjectManager $manager - * @param string $name - * @param string $url - * - * @return \ServerGrove\KbBundle\Document\Url - */ - private function addUrl(ObjectManager $manager, $name, $url) - { - $document = new Url(); - $document->setName($name); - $document->setUrl($url); - $manager->persist($document); - - $manager->bindTranslation($document, 'en'); - - return $document; - } - - /** - * Get the order of this fixture - * - * @return integer - */ - public function getOrder() - { - return 2; - } -} diff --git a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUsersData.php b/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUsersData.php deleted file mode 100644 index 4978a72..0000000 --- a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/LoadUsersData.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ -class LoadUsersData extends AbstractFixture implements OrderedFixtureInterface -{ - - /** - * Load data fixtures with the passed EntityManager - * - * @param \Doctrine\Common\Persistence\ObjectManager $manager - */ - public function load(ObjectManager $manager) - { - /** @var $session \PHPCR\SessionInterface */ - $session = $manager->getPhpcrSession(); - $root = $session->getNode('/'); - $root->addNode('users'); - - $this->createUser('User Foo', 'user', 'abc123', 'user@example.com', array('ROLE_USER'), $manager); - $this->createUser('John Editor', 'editor', 'abc123', 'editor@example.com', array('ROLE_EDITOR'), $manager); - $this->createUser('Administrator', 'admin', 'abc123', 'admin@example.com', array('ROLE_ADMIN'), $manager); - - $manager->flush(); - } - - /** - * @param string $name - * @param string $username - * @param string $password - * @param string $email - * @param array $roles - * @param \Doctrine\Common\Persistence\ObjectManager $manager - * - * @return \ServerGrove\KbBundle\Document\User - */ - private function createUser($name, $username, $password, $email, array $roles, ObjectManager $manager) - { - $user = new User(); - $user->setName($name); - $user->setUsername($username); - $user->setEnabled(true); - $user->setLocked(false); - $user->setEmail($email); - - foreach ($roles as $role) { - $user->addRole($role); - } - - # @todo Fix this - $encoder = new \Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder(); - $user->setPassword($encoder->encodePassword($password, $user->getSalt())); - - $manager->persist($user); - - return $user; - } - - /** - * Get the order of this fixture - * - * @return integer - */ - public function getOrder() - { - return 1; - } -} diff --git a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/article-description.md b/src/ServerGrove/KbBundle/DataFixtures/PHPCR/article-description.md deleted file mode 100644 index 5b26fec..0000000 --- a/src/ServerGrove/KbBundle/DataFixtures/PHPCR/article-description.md +++ /dev/null @@ -1,100 +0,0 @@ -# Header 1 -## Header 2 -### Header 3 -#### Header 4 -##### Header 5 -###### Header 6 - ---- - -A link to [ServerGrove.com](http://servergrove.com/ "ServerGrove") - ---- - -Lorem `ipsum` dolor sit *amet*, consectetur **adipiscing** elit. Integer ***fermentum***, nulla vel pharetra porttitor, sapien nulla tincidunt augue, eu ultricies mauris tellus et purus. - -* List element 1 -* List element 2 - ---- - - A line of code - ---- - - /** - * Class PHPExample - */ - class PHPExample - { - /** - * @var string - */ - private $property1; - - /** - * @var boolean - */ - private $property2; - - /** - * @param string $property1 - * @param boolean $property2 - */ - public function __construct($property1, $property2) - { - $this->property1 = $property1; - $this->property2 = $property2; - } - - /** - * Sets the value of property1 - * - * @param string $property1 - */ - public function setProperty1($property1) - { - $this->property1 = $property1; - } - - /** - * Returns the value of property1 - * - * @return string - */ - public function getProperty1() - { - return $this->property1; - } - - /** - * Sets the value of property2 - * - * @param boolean $property2 - */ - public function setProperty2($property2) - { - $this->property2 = $property2; - } - - /** - * Returns the value of property2 - * - * @return boolean - */ - public function getProperty2() - { - return $this->property2; - } - } - ---- - - - - Example page - - - Hello World! - - diff --git a/src/ServerGrove/KbBundle/DependencyInjection/Configuration.php b/src/ServerGrove/KbBundle/DependencyInjection/Configuration.php deleted file mode 100644 index 0e8f8f6..0000000 --- a/src/ServerGrove/KbBundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,80 +0,0 @@ -root('server_grove_kb'); - - $rootNode - ->children() - ->arrayNode('locales') - ->prototype('scalar') - ->isRequired() - ->cannotBeEmpty() - ->end() - ->end(); - - $rootNode - ->children() - ->arrayNode('article') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('enable_related_urls')->defaultFalse()->end() - ->scalarNode('front_page_category')->defaultValue('Homepage')->end() - ->scalarNode('front_page_keyword')->defaultValue('homepage')->end() - ->scalarNode('top_keyword')->defaultValue('feature')->end() - ->end() - ->end() - ->end(); - - $rootNode - ->children() - ->scalarNode('default_locale') - ->cannotBeEmpty() - ->defaultValue('en') - ->end() - ->end(); - - $rootNode - ->children() - ->scalarNode('editor_type') - ->cannotBeEmpty() - ->defaultValue('markdown') - ->end() - ->end(); - - $rootNode - ->children() - ->arrayNode('mailer') - ->addDefaultsIfNotSet() - ->children() - ->arrayNode('from') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('email')->defaultValue('no-reply@servergrove.com')->end() - ->scalarNode('name')->defaultValue('ServerGrove KnowledgeBase System')->end() - ->end() - ->end() - ->end() - ->end() - ->end(); - - return $treeBuilder; - } -} diff --git a/src/ServerGrove/KbBundle/DependencyInjection/ServerGroveKbExtension.php b/src/ServerGrove/KbBundle/DependencyInjection/ServerGroveKbExtension.php deleted file mode 100644 index ef5eea1..0000000 --- a/src/ServerGrove/KbBundle/DependencyInjection/ServerGroveKbExtension.php +++ /dev/null @@ -1,39 +0,0 @@ -processConfiguration($configuration, $configs); - - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('services.xml'); - - $container->setParameter('server_grove_kb.article.enable_related_urls', $config['article']['enable_related_urls']); - $container->setParameter('server_grove_kb.article.front_page_category', $config['article']['front_page_category']); - $container->setParameter('server_grove_kb.article.front_page_keyword', $config['article']['front_page_keyword']); - $container->setParameter('server_grove_kb.article.top_keyword', $config['article']['top_keyword']); - $container->setParameter('server_grove_kb.locales', $config['locales']); - $container->setParameter('server_grove_kb.default_locale', $config['default_locale']); - $container->setParameter('server_grove_kb.editor_type', $config['editor_type']); - $container->setParameter('server_grove_kb.mailer.from.name', $config['mailer']['from']['name']); - $container->setParameter('server_grove_kb.mailer.from.email', $config['mailer']['from']['email']); - } -} diff --git a/src/ServerGrove/KbBundle/Document/Article.php b/src/ServerGrove/KbBundle/Document/Article.php deleted file mode 100644 index 0b860db..0000000 --- a/src/ServerGrove/KbBundle/Document/Article.php +++ /dev/null @@ -1,519 +0,0 @@ -categories = new ArrayCollection(); - $this->subscriptors = new ArrayCollection(); - $this->urls = new ArrayCollection(); - $this->metadata = array(); - $this->keywords = array(); - $this->contentType = self::CONTENT_TYPE_MARKDOWN; - $this->isActive = false; - } - - /** - * @return string - */ - public function __toString() - { - return $this->getTitle(); - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param $title - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setTitle($title) - { - $this->title = $title; - - if (is_null($this->slug)) { - $this->setSlug(Sluggable::urlize($title)); - } - - return $this; - } - - /** - * @return string - */ - public function getTitle() - { - return is_string($this->title) ? $this->title : ''; - } - - /** - * @PHPCRODM\PrePersist - */ - public function registerCreated() - { - $this->setCreated(new \DateTime()); - - return $this; - } - - /** - * @param $created - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setCreated($created) - { - $this->created = $created; - - return $this; - } - - /** - * @return \DateTime - */ - public function getCreated() - { - return $this->created; - } - - /** - * @return mixed - */ - public function getUpdated() - { - return $this->updated; - } - - /** - * @PHPCRODM\PreUpdate - */ - public function registerUpdated() - { - $this->setUpdated(new \DateTime()); - - return $this; - } - - /** - * @param $updated - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setUpdated($updated) - { - $this->updated = $updated; - - return $this; - } - - /** - * @return bool - */ - public function getIsActive() - { - return $this->isActive; - } - - /** - * @param boolean $value - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setIsActive($value) - { - $this->isActive = $value; - - return $this; - } - - /** - * @param Category $category - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function addCategory(Category $category) - { - $category->addArticle($this); - $this->categories->add($category); - - return $this; - } - - public function removeCategory(Category $category) - { - $this->categories->removeElement($category->removeArticle($this)); - - return $this; - } - - /** - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getCategories() - { - return $this->categories; - } - - /** - * @return Category - */ - public function getDefaultCategory() - { - return $this->getCategories()->first(); - } - - public function setSlug($slug) - { - $this->slug = $slug; - - return $this; - } - - /** - * @return string - */ - public function getSlug() - { - return $this->slug; - } - - /** - * @param int $views - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setViews($views) - { - $this->views = $views; - - return $this; - } - - /** - * @return int - */ - public function getViews() - { - return $this->views; - } - - /** - * Increases the number of views registered for this article - */ - public function registerView() - { - if (is_null($this->views)) { - $this->views = 0; - } - $this->views++; - - return $this; - } - - /** - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getSubscriptors() - { - return $this->subscriptors; - } - - /** - * @param string $key - * @param string $value - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setMetadata($key, $value) - { - $this->metadata[$key] = $value; - - return $this; - } - - /** - * @param string $key - * @param string $default - * - * @return mixed - */ - public function getMetadata($key, $default = null) - { - if ($this->hasMetadata($key)) { - return $this->metadata[$key]; - } - - return $default; - } - - /** - * @param string $key - * - * @return bool - */ - public function hasMetadata($key) - { - return isset($this->metadata[$key]); - } - - /** - * @return array - */ - public function getAllMetadata() - { - return $this->metadata; - } - - /** - * @param string|array $keywords - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setKeywords($keywords) - { - if (is_string($keywords)) { - $keywords = array_map('trim', explode(',', $keywords)); - } - - if (is_array($keywords)) { - $this->keywords = array_unique($keywords); - } - - return $this; - } - - /** - * @return \Doctrine\ODM\PHPCR\MultivaluePropertyCollection - */ - public function getKeywords() - { - return $this->keywords; - } - - /** - * @param string $keyword - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function addKeyword($keyword) - { - $this->keywords[] = $keyword; - - return $this; - } - - /** - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getUrls() - { - return $this->urls; - } - - /** - * @param \ServerGrove\KbBundle\Document\Url $url - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function addUrl(Url $url) - { - $this->urls->add($url); - - return $this; - } - - public function removeUrl(Url $url) - { - $this->urls->removeElement($url); - - return $this; - } - - /** - * @param $content - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setContent($content) - { - $this->content = $content; - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * @param $locale - * - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setLocale($locale) - { - $this->locale = $locale; - - return $this; - } - - /** - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * @param string $contentType - * @return \ServerGrove\KbBundle\Document\Article - */ - public function setContentType($contentType) - { - $this->contentType = $contentType; - - return $this; - } - - /** - * @return string - */ - public function getContentType() - { - return $this->contentType; - } -} diff --git a/src/ServerGrove/KbBundle/Document/ArticleFile.php b/src/ServerGrove/KbBundle/Document/ArticleFile.php deleted file mode 100644 index 1f51fa3..0000000 --- a/src/ServerGrove/KbBundle/Document/ArticleFile.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ -class ArticleFile -{ - - /** - * @var string - * @PHPCRODM\Id(strategy="repository") - */ - private $id; - - /** - * @var string - * @PHPCRODM\String - */ - private $path; - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $path - */ - public function setPath($path) - { - $this->path = $path; - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } -} diff --git a/src/ServerGrove/KbBundle/Document/Category.php b/src/ServerGrove/KbBundle/Document/Category.php deleted file mode 100644 index 848d5aa..0000000 --- a/src/ServerGrove/KbBundle/Document/Category.php +++ /dev/null @@ -1,404 +0,0 @@ -articles = new ArrayCollection(); - $this->children = new ArrayCollection(); - $this->setVisibility(self::VISIBILITY_PUBLIC); - } - - /** - * @return string - */ - public function __toString() - { - if ($this->displayName instanceof \Closure) { - return call_user_func($this->displayName, $this); - } - - return $this->getName(); - } - - /** - * @param callable $displayName - * @return Category - */ - public function setDisplayName(\Closure $displayName) - { - $this->displayName = $displayName; - - return $this; - } - - /** - * @param string $id - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param Category $parent - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setParent($parent) - { - $this->parent = $parent; - - return $this; - } - - /** - * @return \ServerGrove\KbBundle\Document\Category - */ - public function getParent() - { - return $this->parent; - } - - /** - * @return Category - */ - public function getTopCategory() - { - $category = $this; - while ($category->getParent() instanceof self) { - $category = $category->getParent(); - } - - return $category; - } - - /** - * @return string - */ - public function getSlug() - { - return $this->slug; - } - - /** - * @PHPCRODM\PrePersist - */ - public function setPath($path = null) - { - if (is_null($path)) { - if ($this->getParent() instanceof static) { - $path = $this->getParent()->getPath().'/'.$this->getSlug(); - } else { - $path = $this->getSlug(); - } - $this->path = $path; - } else { - $this->path = $path; - } - - return $this; - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * @param string $locale - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setLocale($locale) - { - $this->locale = $locale; - - return $this; - } - - /** - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * @param $name - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setName($name) - { - $this->name = $name; - if (is_null($this->slug)) { - $this->slug = Sluggable::urlize($name); - } - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return is_string($this->name) ? $this->name : ''; - } - - /** - * @param $description - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setDescription($description) - { - $this->description = $description; - - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @PHPCRODM\PrePersist - */ - public function setCreated() - { - $this->created = new \DateTime(); - - return $this; - } - - /** - * @return \DateTime - */ - public function getCreated() - { - return $this->created; - } - - /** - * @PHPCRODM\PreUpdate - */ - public function setUpdated($value = null) - { - if (!$value) { - $value = new \DateTime(); - } - $this->updated = $value; - - return $this; - } - - /** - * @return \DateTime - */ - public function getUpdated() - { - return $this->updated; - } - - /** - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getChildren() - { - return $this->children; - } - - /** - * @param Article $article - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function addArticle(Article $article) - { - $this->articles->add($article); - - return $this; - } - - /** - * @param Article $article - * - * @return \ServerGrove\KbBundle\Document\Category - */ - public function removeArticle(Article $article) - { - $this->articles->removeElement($article); - - return $this; - } - - /** - * @param bool $sorted - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getArticles($sorted = false) - { - if ($sorted) { - $collection = new ArrayCollection(); - $articles = $this->articles->toArray(); - usort( - $articles, - function (Article $articleA, Article $articleB) { - if ($articleA->getTitle() == $articleB->getTitle()) { - return 0; - } - - return strnatcmp($articleA->getTitle(), $articleB->getTitle()); - } - ); - - foreach ($articles as $article) { - $collection->add($article); - } - - return $collection; - } - - return $this->articles; - } - - /** - * Sets the value of visibility - * - * @param string $visibility - * @return \ServerGrove\KbBundle\Document\Category - */ - public function setVisibility($visibility) - { - $this->visibility = $visibility; - - return $this; - } - - /** - * Returns the value of visibility - * - * @return string - */ - public function getVisibility() - { - return $this->visibility; - } -} diff --git a/src/ServerGrove/KbBundle/Document/Url.php b/src/ServerGrove/KbBundle/Document/Url.php deleted file mode 100644 index c47de37..0000000 --- a/src/ServerGrove/KbBundle/Document/Url.php +++ /dev/null @@ -1,209 +0,0 @@ -id; - } - - /** - * @param string $id - * @return \ServerGrove\KbBundle\Document\Url - */ - protected function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * Set name - * - * @param string $name - * @return \ServerGrove\KbBundle\Document\Url - */ - public function setName($name) - { - $this->name = $name; - - if (is_null($this->slug)) { - $this->setSlug(Sluggable::urlize($this->name)); - } - - return $this; - } - - /** - * Get name - * - * @return string - */ - public function getName() - { - return is_string($this->name) ? $this->name : ''; - } - - /** - * Sets the created date - * - * @PHPCRODM\PrePersist - * - * @return \ServerGrove\KbBundle\Document\Url - */ - public function registerCreatedDate() - { - $this->created_at = new \DateTime(); - - return $this; - } - - /** - * Set url - * - * @param string $url - * @return \ServerGrove\KbBundle\Document\Url - */ - public function setUrl($url) - { - $this->url = $url; - - return $this; - } - - /** - * Get url - * - * @return string $url - */ - public function getUrl() - { - return $this->url; - } - - /** - * @param string $locale - * - * @return \ServerGrove\KbBundle\Document\Url - */ - public function setLocale($locale) - { - $this->locale = $locale; - - return $this; - } - - /** - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * Set created_at - * - * @param \DateTime $createdAt - * @return \ServerGrove\KbBundle\Document\Url - */ - public function setCreatedAt($createdAt) - { - $this->created_at = $createdAt; - - return $this; - } - - /** - * Get created_at - * - * @return \DateTime $createdAt - */ - public function getCreatedAt() - { - return $this->created_at; - } - - /** - * @return string - */ - public function __toString() - { - return $this->getName(); - } - - /** - * @param string $slug - * @return \ServerGrove\KbBundle\Document\Url - */ - public function setSlug($slug) - { - $this->slug = $slug; - - return $this; - } - - /** - * @return string - */ - public function getSlug() - { - return $this->slug; - } -} diff --git a/src/ServerGrove/KbBundle/Document/User.php b/src/ServerGrove/KbBundle/Document/User.php deleted file mode 100644 index 9cda04f..0000000 --- a/src/ServerGrove/KbBundle/Document/User.php +++ /dev/null @@ -1,353 +0,0 @@ - - */ -class User implements AdvancedUserInterface -{ - - /** - * @var string - * @PHPCRODM\Id(strategy="repository") - */ - private $id; - - /** - * @var string - * @PHPCRODM\String - * @Assert\NotBlank() - */ - private $name; - - /** - * @var string - * @PHPCRODM\String - * @Assert\NotBlank - */ - private $username; - - /** - * @var string - * @PHPCRODM\String - * @Assert\NotBlank - */ - private $password; - - /** - * @var string - * @PHPCRODM\String - */ - private $salt; - - /** - * @var string - * @PHPCRODM\String - * @Assert\NotBlank - * @Assert\Email - */ - private $email; - - /** - * @var \Doctrine\ODM\PHPCR\MultivaluePropertyCollection - * @PHPCRODM\String(multivalue=true) - */ - private $roles; - - /** - * @var bool - * @PHPCRODM\Boolean - */ - private $enabled; - - /** - * @var bool - * @PHPCRODM\Boolean - */ - private $locked; - - /** - * @var \DateTime - * @PHPCRODM\Date - * @Assert\Date - */ - private $expirationDate; - - /** - * @var \Doctrine\Common\Collections\ArrayCollection - * @PHPCRODM\ReferenceMany(targetDocument="Article") - */ - private $subscriptions; - - /** - * Constructor - */ - public function __construct() - { - $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36); - $this->roles = array(); - $this->subscriptions = new ArrayCollection(); - } - - public function __sleep() - { - return array( - 'id', - 'name', - 'username', - 'password', - 'salt', - 'email', - 'roles', - 'enabled', - 'locked', - 'expirationDate' - ); - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $email - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $role - */ - public function addRole($role) - { - $this->roles[] = $role; - } - - /** - * @param string $role - */ - public function removeRole($role) - { - $this->roles->removeElement($role); - } - - /** - * @param array $roles - */ - public function setRoles($roles) - { - $this->roles = $roles; - } - - /** - * Returns the roles granted to the user. - * - * @return array - */ - public function getRoles() - { - return is_object($this->roles) ? $this->roles->toArray() : $this->roles; - } - - /** - * @param string $password - */ - public function setPassword($password) - { - $this->password = $password; - } - - /** - * Returns the password used to authenticate the user. - * - * @return string The password - */ - public function getPassword() - { - return $this->password; - } - - /** - * Returns the salt. - * - * @return string The salt - */ - public function getSalt() - { - return $this->salt; - } - - /** - * @param string $username - */ - public function setUsername($username) - { - $this->username = $username; - } - - /** - * Returns the username used to authenticate the user. - * - * @return string The username - */ - public function getUsername() - { - return $this->username; - } - - /** - * @param boolean $enabled - */ - public function setEnabled($enabled) - { - $this->enabled = $enabled; - } - - /** - * @param \DateTime $expirationDate - */ - public function setExpirationDate($expirationDate) - { - $this->expirationDate = $expirationDate; - } - - /** - * @return \DateTime - */ - public function getExpirationDate() - { - return $this->expirationDate; - } - - /** - * @param boolean $locked - */ - public function setLocked($locked) - { - $this->locked = $locked; - } - - public function isLocked() - { - return $this->locked; - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - */ - public function subscribe(Article $article) - { - $this->getSubscriptions()->add($article); - } - - /** - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getSubscriptions() - { - if (is_null($this->subscriptions)) { - $this->subscriptions = new ArrayCollection(); - } - - return $this->subscriptions; - } - - /** - * Removes sensitive data from the user. - * - * @return void - */ - public function eraseCredentials() - { - // TODO: Implement eraseCredentials() method. - } - - /** - * Checks whether the user's account has expired. - * - * @return Boolean true if the user's account is non expired, false otherwise - */ - public function isAccountNonExpired() - { - return is_null($this->getExpirationDate()) || time() < $this->getExpirationDate()->getTimestamp(); - } - - /** - * Checks whether the user is locked. - * - * @return Boolean true if the user is not locked, false otherwise - */ - public function isAccountNonLocked() - { - return !$this->isLocked(); - } - - /** - * Checks whether the user's credentials (password) has expired. - * - * @return Boolean true if the user's credentials are non expired, false otherwise - */ - public function isCredentialsNonExpired() - { - return true; - } - - /** - * Checks whether the user is enabled. - * - * @return Boolean true if the user is enabled, false otherwise - */ - public function isEnabled() - { - return $this->enabled; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * - * @return string - */ - protected function getSluggableValue() - { - return $this->username; - } -} diff --git a/src/ServerGrove/KbBundle/Form/ArticleFileType.php b/src/ServerGrove/KbBundle/Form/ArticleFileType.php deleted file mode 100644 index 2064998..0000000 --- a/src/ServerGrove/KbBundle/Form/ArticleFileType.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -class ArticleFileType extends AbstractType -{ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('path', 'file', array('attr' => array('class' => ''))); - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'article_file'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/ArticleNewType.php b/src/ServerGrove/KbBundle/Form/ArticleNewType.php deleted file mode 100644 index ce2a4c5..0000000 --- a/src/ServerGrove/KbBundle/Form/ArticleNewType.php +++ /dev/null @@ -1,14 +0,0 @@ -add('title'); - parent::buildForm($builder, $options); - } -} diff --git a/src/ServerGrove/KbBundle/Form/ArticleTranslationType.php b/src/ServerGrove/KbBundle/Form/ArticleTranslationType.php deleted file mode 100644 index 40f6dea..0000000 --- a/src/ServerGrove/KbBundle/Form/ArticleTranslationType.php +++ /dev/null @@ -1,66 +0,0 @@ -locale = $locale; - } - - public function finishView(FormView $view, FormInterface $form, array $options) - { - $view->vars['contentType'] = $form->get('contentType')->getData(); - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('title', 'text', array('max_length'=> 150, 'attr' => array('class' => 'input-xxlarge'))); - $builder->add('isActive', null, array('required' => false, 'label' => false)); - - $builder->add('contentType', 'choice', array( - 'required' => true, - 'label' => 'Type', - 'choices' => array( - 'markdown' => 'Markdown', - 'wysiwyg' => 'HTML' - ), - 'expanded' => true, - 'multiple' => false, - 'attr' => array('ng-model' => 'contentType') - )); - - $builder->add('content', 'sg_editor', array( - 'required' => false, - 'attr' => array( - 'class' => 'input-xxlarge translation_content', - 'ng-model' => 'content' - ) - )); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\Article', 'id_prefix' => '')); - } - - public function getName() - { - return 'translation_'.$this->locale; - } -} diff --git a/src/ServerGrove/KbBundle/Form/ArticleType.php b/src/ServerGrove/KbBundle/Form/ArticleType.php deleted file mode 100644 index ae67716..0000000 --- a/src/ServerGrove/KbBundle/Form/ArticleType.php +++ /dev/null @@ -1,45 +0,0 @@ -add('categories', 'sg_category', array( - 'multiple' => true, - 'expanded' => false, - 'class' => 'ServerGrove\KbBundle\Document\Category', - 'query_builder' => '', - 'attr' => array('size' => 11, 'class' => 'input-xxlarge') - )); - - if ($options['enable_related_urls']) { - $builder->add('urls', 'phpcr_document', array( - 'class' => 'ServerGrove\KbBundle\Document\Url', - 'multiple' => true, - 'expanded' => false, - 'required' => false, - 'attr' => array('class' => 'url-selector') - )); - } - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'ServerGrove\KbBundle\Document\Article', - 'enable_related_urls' => false, - 'loader' => null - )); - } - - public function getName() - { - return 'article'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/CategorySettingsType.php b/src/ServerGrove/KbBundle/Form/CategorySettingsType.php deleted file mode 100644 index 6c80600..0000000 --- a/src/ServerGrove/KbBundle/Form/CategorySettingsType.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class CategorySettingsType extends AbstractType -{ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add( - 'visibility', - 'choice', - array( - 'choices' => array( - Category::VISIBILITY_PUBLIC => 'Public', - Category::VISIBILITY_PRIVATE => 'Private' - ) - ) - ); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\Category')); - } - - public function getName() - { - return 'category_settings'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/CategoryType.php b/src/ServerGrove/KbBundle/Form/CategoryType.php deleted file mode 100644 index c3e9887..0000000 --- a/src/ServerGrove/KbBundle/Form/CategoryType.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class CategoryType extends AbstractType -{ - /** - * @var string - */ - private $locale; - - /** - * @param string $locale - */ - public function __construct($locale = '') - { - $this->locale = $locale; - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('id', 'hidden'); - $builder->add('locale', 'hidden', array('required' => !empty($this->locale))); - $builder->add('name'); - $builder->add('description', 'textarea', array('required' => false)); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\Category', 'id_prefix' => '')); - } - - public function getName() - { - return empty($this->locale) ? 'category' : 'category_translation_'.$this->locale; - } -} diff --git a/src/ServerGrove/KbBundle/Form/ChoiceList/CategoriesLoader.php b/src/ServerGrove/KbBundle/Form/ChoiceList/CategoriesLoader.php deleted file mode 100644 index ae8f9dc..0000000 --- a/src/ServerGrove/KbBundle/Form/ChoiceList/CategoriesLoader.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -class CategoriesLoader implements EntityLoaderInterface -{ - private $manager; - - public function __construct(ObjectManager $manager) - { - $this->manager = $manager; - } - - /** - * Returns an array of entities that are valid choices in the corresponding choice list. - * - * @return array The entities. - */ - public function getEntities() - { - /** @var $categories \Doctrine\Common\Collections\ArrayCollection */ - $parents = $this->manager->getRepository('ServerGroveKbBundle:Category')->findAllParents(); - $categories = new ArrayCollection(); - - foreach ($parents as $parent) { - $this->addCategoryToArrayCollection($categories, $parent); - } - - return $categories; - } - - /** - * Returns an array of entities matching the given identifiers. - * - * @param string $identifier The identifier field of the object. This method - * is not applicable for fields with multiple - * identifiers. - * @param array $values The values of the identifiers. - * - * @return array The entities. - */ - public function getEntitiesByIds($identifier, array $values) - { - /** @var $entities ArrayCollection */ - $entities = $this->getEntities(); - - return $entities->filter(function($document) use ($values) { - return method_exists($document, 'getId') && in_array($document->getId(), $values); - })->toArray(); - } - - /** - * @param \Doctrine\Common\Collections\ArrayCollection $categories - * @param \ServerGrove\KbBundle\Document\Category $category - * @param int $spaces - */ - public function addCategoryToArrayCollection(ArrayCollection $categories, Category $category, $spaces = 0) - { - $categories->add($category); - $category->setDisplayName(function(Category $category) use ($spaces) { - return str_repeat('- ', $spaces).$category->getName(); - }); - foreach ($category->getChildren() as $child) { - call_user_func_array(array($this, __FUNCTION__), array($categories, $child, $spaces + 1)); - } - } -} diff --git a/src/ServerGrove/KbBundle/Form/SearchArticleType.php b/src/ServerGrove/KbBundle/Form/SearchArticleType.php deleted file mode 100644 index d8a2b02..0000000 --- a/src/ServerGrove/KbBundle/Form/SearchArticleType.php +++ /dev/null @@ -1,53 +0,0 @@ -repository = $repository; - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - $choices = array(); - - foreach ($this->repository->findAllParentsActive() as $category) { - $choices[$category->getId()] = $category->__toString(); - } - - $builder->add( - 'category', - 'choice', - array( - 'required' => false, - 'expanded' => false, - 'multiple' => false, - 'choices' => $choices, - 'empty_value' => 'Search all', - ) - ); - $builder->add('keywords', 'search'); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('csrf_protection' => false)); - } - - public function getName() - { - return 'article'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/Type/CategoryType.php b/src/ServerGrove/KbBundle/Form/Type/CategoryType.php deleted file mode 100644 index aa24e1c..0000000 --- a/src/ServerGrove/KbBundle/Form/Type/CategoryType.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class CategoryType extends DoctrineType -{ - - /** - * Return the default loader object. - * - * @param ObjectManager $manager - * @param mixed $queryBuilder - * @param string $class - * - * @return EntityLoaderInterface - */ - public function getLoader(ObjectManager $manager, $queryBuilder, $class) - { - return new CategoriesLoader($manager); - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'sg_category'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/Type/EditorType.php b/src/ServerGrove/KbBundle/Form/Type/EditorType.php deleted file mode 100644 index b614d29..0000000 --- a/src/ServerGrove/KbBundle/Form/Type/EditorType.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class EditorType extends AbstractType -{ - - private $type; - - public function __construct($type) - { - $this->type = $type; - } - - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['type'] = $options['type']; - } - - /** - * {@inheritdoc} - */ - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('type' => $this->type)); - $resolver->setAllowedValues(array('type' => array('markdown', 'wysiwyg'))); - } - - public function getParent() - { - return 'textarea'; - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'sg_editor'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/Type/LocaleType.php b/src/ServerGrove/KbBundle/Form/Type/LocaleType.php deleted file mode 100644 index 39e3eba..0000000 --- a/src/ServerGrove/KbBundle/Form/Type/LocaleType.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class LocaleType extends BaseType -{ - - private $locales; - - public function __construct(array $locales) - { - $this->locales = array_combine($locales, $locales); - } - - /** - * {@inheritdoc} - */ - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $choices = array_intersect_key(Locale::getDisplayLocales(\Locale::getDefault()), $this->locales); - $resolver->setDefaults(array('choices' => $choices)); - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'sg_locale'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/Type/Prepended/DateType.php b/src/ServerGrove/KbBundle/Form/Type/Prepended/DateType.php deleted file mode 100644 index 36edb6e..0000000 --- a/src/ServerGrove/KbBundle/Form/Type/Prepended/DateType.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class DateType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add($builder->getName(), 'date', $options); - } - - public function getParent() - { - return 'date'; - } - - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['label'] = $options['label']; - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'sg_prepended_date'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/UrlType.php b/src/ServerGrove/KbBundle/Form/UrlType.php deleted file mode 100644 index 46a05aa..0000000 --- a/src/ServerGrove/KbBundle/Form/UrlType.php +++ /dev/null @@ -1,46 +0,0 @@ -locale = $locale; - $this->requiredFields = $requiredFields; - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('name', null, array('required' => $this->requiredFields)); - $builder->add('url', 'url', array('required' => $this->requiredFields)); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\Url')); - } - - public function getName() - { - return 'urls'.(is_null($this->locale) ? '' : '_'.$this->locale); - } -} diff --git a/src/ServerGrove/KbBundle/Form/UserEditType.php b/src/ServerGrove/KbBundle/Form/UserEditType.php deleted file mode 100644 index 5a392bd..0000000 --- a/src/ServerGrove/KbBundle/Form/UserEditType.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ -class UserEditType extends UserType -{ - public function buildForm(FormBuilderInterface $builder, array $options) - { - parent::buildForm($builder, $options); - $builder->remove('password'); - } -} diff --git a/src/ServerGrove/KbBundle/Form/UserPasswordType.php b/src/ServerGrove/KbBundle/Form/UserPasswordType.php deleted file mode 100644 index 76065b6..0000000 --- a/src/ServerGrove/KbBundle/Form/UserPasswordType.php +++ /dev/null @@ -1,32 +0,0 @@ -add('password', 'repeated', array( - 'type' => 'password', - 'invalid_message' => 'Password fields must match.', - 'first_name' => 'password', - 'second_name' => 'confirm_password' - )); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\User')); - } - - public function getName() - { - return 'user_password'; - } -} diff --git a/src/ServerGrove/KbBundle/Form/UserType.php b/src/ServerGrove/KbBundle/Form/UserType.php deleted file mode 100644 index 5113598..0000000 --- a/src/ServerGrove/KbBundle/Form/UserType.php +++ /dev/null @@ -1,50 +0,0 @@ -add('name', null, array('attr' => array('autocomplete'=> 'off'))) - ->add('email', null, array('attr' => array('autocomplete'=> 'off'))) - ->add('username', null, array('attr' => array('autocomplete'=> 'off'))) - ->add('password', 'repeated', array( - 'type' => 'password', - 'invalid_message' => 'Password fields must match.', - 'first_name' => 'password', - 'second_name' => 'confirm_password' - )) - ->add('roles', 'choice', array( - 'choices' => array( - 'ROLE_ADMIN' => 'Admin', - 'ROLE_EDITOR' => 'Editor', - 'ROLE_CONTRIBUTOR' => 'Contributor' - ), - 'multiple' => true - )) - ->add('enabled', null, array('label' => 'Is Active', 'required' => false)) - ->add('locked', 'hidden') - ->add('expirationDate', 'sg_prepended_date', array( - 'years' => range(date('Y'), date('Y') + 5), - 'label' => 'Expiration Date', - 'attr' => array('disabled' => 'disabled') - )); - } - - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array('data_class' => 'ServerGrove\KbBundle\Document\User')); - } - - public function getName() - { - return 'user'; - } -} diff --git a/src/ServerGrove/KbBundle/Listener/UserActionListener.php b/src/ServerGrove/KbBundle/Listener/UserActionListener.php deleted file mode 100644 index 22ecc21..0000000 --- a/src/ServerGrove/KbBundle/Listener/UserActionListener.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ -class UserActionListener -{ - - /** - * @var \Symfony\Component\DependencyInjection\ContainerInterface - */ - private $container; - - /** - * @var string - */ - private $fromName; - - /** - * @var string - */ - private $fromEmail; - - public function __construct(ContainerInterface $container, $fromName, $fromEmail) - { - $this->container = $container; - $this->fromName = $fromName; - $this->fromEmail = $fromEmail; - } - - public function postUpdate(LifecycleEventArgs $arg) - { - if (!$this->container->isScopeActive('request')) { - return; - } - - if (!$this->container->get('security.context')->getToken()->isAuthenticated()) { - return; - } - - if ($arg->getDocument() instanceof Document\Article) { - if ($arg->getDocument()->wereTranslationsModified()) { - $this->notifyModification($arg->getDocument(), $arg->getDocumentManager()); - } - } - } - - private function notifyModification(Document\Article $article, $dm) - { - $emails = $dm->getRepository('ServerGroveKbBundle:User')->getEditorsEmails(); - $message = \Swift_Message::newInstance() - ->setContentType('text/html') - ->setSubject('An article has been modified and requires your review') - ->setFrom(array($this->fromEmail => $this->fromName)) - ->setTo($emails) - ->setBody($this->container->get('templating')->render('ServerGroveKbBundle:Notice:modification.html.twig', $this->getModificationVars($article))); - - $this->container->get('mailer')->send($message); - } - - private function getModificationVars(Document\Article $article) - { - $latestVersion = null; - $previousVersion = null; - $locale = ''; - foreach ($article->getTranslations() as $translation) { - $versions = $translation->getVersions(); - foreach ($versions as $version) { - if (is_null($latestVersion) || $version->getCreatedAt() > $latestVersion->getCreatedAt()) { - $latestVersion = $version; - $locale = $translation->getLocale(); - if (($aux = $translation->getActiveVersion()) instanceof Document\Version) { - $previousVersion = $aux; - } - } - } - } - - return array( - 'article' => $article, - 'locale' => $locale, - 'previous' => $previousVersion, - 'current' => $latestVersion - ); - } -} diff --git a/src/ServerGrove/KbBundle/Readme.md b/src/ServerGrove/KbBundle/Readme.md deleted file mode 100644 index ddef431..0000000 --- a/src/ServerGrove/KbBundle/Readme.md +++ /dev/null @@ -1,114 +0,0 @@ -# ServerGroveKbBundle - - -This bundle allows to easily create a knowledge base application with a few simple steps. - - -## Installation - -You need to add the bundle to your composer file. You can easily do so by running the following command: - -```bash -# temporarily until we find the proper name for the bundle -$ composer require servergrove/kb-bundle:dev-master -``` - - -### Add the bundle to your project - -There is only one requirement, to add the Bundle instance to your Kernel - -```php - - -### Backend - -The backend is located under `/admin`, so you will have to go to . -This is a secure area, so you will have to login with valid credentials. If you are using the test data, then you can access it with `admin:abc123` diff --git a/src/ServerGrove/KbBundle/Repository/ArticleFileRepository.php b/src/ServerGrove/KbBundle/Repository/ArticleFileRepository.php deleted file mode 100644 index 1d4b6cf..0000000 --- a/src/ServerGrove/KbBundle/Repository/ArticleFileRepository.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class ArticleFileRepository extends DocumentRepository implements RepositoryIdInterface -{ - - /** - * Generate a document id - * - * @param \ServerGrove\KbBundle\Document\ArticleFile $document - * @param object $parent - * - * @return string - */ - public function generateId($document, $parent = null) - { - /** @var $session \PHPCR\SessionInterface */ - $session = $this->getDocumentManager()->getPhpcrSession(); - $root = $session->getNode('/'); - - if (!$root->hasNode('articles-files')) { - $root->addNode('articles-files'); - } - - return '/articles-files/'.Sluggable::urlize($document->getPath()); - } -} diff --git a/src/ServerGrove/KbBundle/Repository/ArticleRepository.php b/src/ServerGrove/KbBundle/Repository/ArticleRepository.php deleted file mode 100644 index 5b8cd4b..0000000 --- a/src/ServerGrove/KbBundle/Repository/ArticleRepository.php +++ /dev/null @@ -1,95 +0,0 @@ -find('/articles/'.$slug); - } - - /** - * @param $search - * - * @return \Doctrine\Common\Collections\Collection - * - * @TODO Implement this method with a query builder - */ - public function search($search, Category $category = null) - { - /** @var $articles \Doctrine\Common\Collections\ArrayCollection */ - if (is_null($category)) { - $articles = $this->findAll(); - } else { - $articles = $this->getArticlesFromCategoryHierarchy($category, new ArrayCollection()); - } - - $filtered = $articles->filter( - function (Article $article) use ($search) { - return 0 == strcasecmp($article->getTitle(), $search) - || in_array($search, $article->getKeywords()->getValues()) - || false !== stripos($article->getTitle(), $search) - || false !== stripos($article->getContent(), $search); - } - ); - - return $filtered; - } - - /** - * @param \ServerGrove\KbBundle\Document\Category $category - * @param \Doctrine\Common\Collections\ArrayCollection $articles - * @return \Doctrine\Common\Collections\ArrayCollection - */ - public function getArticlesFromCategoryHierarchy(Category $category, ArrayCollection $articles) - { - if (is_null($articles)) { - $articles = new \Doctrine\Common\Collections\ArrayCollection(); - } - - foreach ($category->getArticles() as $article) { - $articles->add($article); - } - - foreach ($category->getChildren() as $child) { - $this->getArticlesFromCategoryHierarchy($child, $articles); - } - - return $articles; - } - - /** - * Generate a document id - * - * @param \ServerGrove\KbBundle\Document\Article $document - * @param object $parent - * - * @return string - */ - public function generateId($document, $parent = null) - { - /** @var $session \PHPCR\SessionInterface */ - $session = $this->getDocumentManager()->getPhpcrSession(); - $root = $session->getNode('/'); - - if (!$root->hasNode('articles')) { - $root->addNode('articles'); - } - - return '/articles/'.$document->getSlug(); - } -} diff --git a/src/ServerGrove/KbBundle/Repository/CategoryRepository.php b/src/ServerGrove/KbBundle/Repository/CategoryRepository.php deleted file mode 100644 index 235aa38..0000000 --- a/src/ServerGrove/KbBundle/Repository/CategoryRepository.php +++ /dev/null @@ -1,89 +0,0 @@ -findAllParents($displayPrivate); - $collection = new \Doctrine\Common\Collections\ArrayCollection(); - - /** @var $parent \ServerGrove\KbBundle\Document\Category */ - foreach ($parents as $parent) { - $collection->add($parent); - } - - return $collection; - } - - /** - * @param bool $displayPrivate - * @return array - */ - public function findAllParents($displayPrivate = true) - { - /** @var $all \Doctrine\Common\Collections\ArrayCollection */ - $all = new ArrayCollection(); - - /** @var $categories ArrayCollection */ - $categories = $this - ->getDocumentByStringQuery($this->getParentsQueryString()) - ->filter($this->getFilterClosure($displayPrivate)); - - $array = $categories->toArray(); - - usort( - $array, - function (Category $categoryA, Category $categoryB) { - if ($categoryA->getName() == $categoryB->getName()) { - return 0; - } - - return strnatcmp($categoryA->getName(), $categoryB->getName()); - } - ); - - foreach ($array as $category) { - $all->add($category); - } - - return $all; - } - - public function getFilterClosure($displayPrivate) - { - if ($displayPrivate) { - return function () { return true; }; - } - - return function (Category $category) { return Category::VISIBILITY_PRIVATE !== $category->getVisibility(); }; - } - - private function getParentsQueryString() - { - return 'SELECT * FROM [nt:unstructured] WHERE ISCHILDNODE("/categories")'; - } - - private function getDocumentByStringQuery($string) - { - return $this->getDocumentsByQuery($this->createQuery($string, QueryInterface::JCR_SQL2)); - } -} diff --git a/src/ServerGrove/KbBundle/Repository/UrlRepository.php b/src/ServerGrove/KbBundle/Repository/UrlRepository.php deleted file mode 100644 index 129f48a..0000000 --- a/src/ServerGrove/KbBundle/Repository/UrlRepository.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class UrlRepository extends DocumentRepository implements RepositoryIdInterface -{ - - /** - * Generate a document id - * - * @param \ServerGrove\KbBundle\Document\Url $document - * @param object $parent - * - * @return string - */ - public function generateId($document, $parent = null) - { - /** @var $session \PHPCR\SessionInterface */ - $session = $this->getDocumentManager()->getPhpcrSession(); - $root = $session->getNode('/'); - - if (!$root->hasNode('url')) { - $root->addNode('url'); - } - - return '/url/'.$document->getSlug(); - } -} diff --git a/src/ServerGrove/KbBundle/Repository/UserRepository.php b/src/ServerGrove/KbBundle/Repository/UserRepository.php deleted file mode 100644 index 541185b..0000000 --- a/src/ServerGrove/KbBundle/Repository/UserRepository.php +++ /dev/null @@ -1,56 +0,0 @@ -find('/users/'.$username); - } - - /** - * @return array - */ - public function getEditorsEmails() - { - $users = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:User')->findBy(array( - 'roles' => 'ROLE_ADMIN' # Is it ok to use it this way? - )); - - $emails = array(); - foreach ($users as $user) { - $emails[] = $user->getEmail(); - } - - return $emails; - } - - /** - * Generate a document id - * - * @param object $document - * @param object $parent - * - * @return string - */ - public function generateId($document, $parent = null) - { - return '/users/'.$document->getUsername(); - } -} diff --git a/src/ServerGrove/KbBundle/Request/PHPCRParamConverter.php b/src/ServerGrove/KbBundle/Request/PHPCRParamConverter.php deleted file mode 100644 index 2cf6cf2..0000000 --- a/src/ServerGrove/KbBundle/Request/PHPCRParamConverter.php +++ /dev/null @@ -1,117 +0,0 @@ - - */ -class PHPCRParamConverter implements ParamConverterInterface -{ - - /** - * @var \Doctrine\ODM\PHPCR\DocumentManager - */ - private $manager; - - /** - * @param \Doctrine\ODM\PHPCR\DocumentManager $manager - */ - public function __construct(DocumentManager $manager) - { - $this->manager = $manager; - } - - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface $configuration - * - * @return bool - */ - public function apply(Request $request, ConfigurationInterface $configuration) - { - $name = $configuration->getName(); - $class = $configuration->getClass(); - $options = $this->getOptions($configuration); - - $document = $this->findOneBy($class, $request, $options); - - if (!$document) { - return false; - } - - $request->attributes->set($name, $document); - - return true; - } - - /** - * @param \Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface $configuration - * - * @return bool - */ - public function supports(ConfigurationInterface $configuration) - { - if (preg_match('/[a-zA-Z]+\:[a-zA-Z]+/', $configuration->getClass())) { - return true; - } - - if (class_exists($configuration->getClass())) { - try { - $this->manager->getClassMetadata($configuration->getClass()); - - return true; - } catch (MappingException $e) { - return false; - } - } - - return false; - } - - protected function findOneBy($class, Request $request, $options) - { - if (!$options['mapping']) { - $keys = $request->attributes->keys(); - $options['mapping'] = $keys ? array_combine($keys, $keys) : array(); - } - - foreach ($options['exclude'] as $exclude) { - unset($options['mapping'][$exclude]); - } - - if (!$options['mapping']) { - return false; - } - - $criteria = array(); - $metadata = $this->manager->getClassMetadata($class); - - foreach ($options['mapping'] as $attribute => $field) { - if ($metadata->hasField($field) || ($metadata->hasAssociation($field) && $metadata->isSingleValuedAssociation($field))) { - $criteria[$field] = $request->attributes->get($attribute); - } - } - - if (!$criteria) { - return false; - } - - return $this->manager->getRepository($class)->findOneBy($criteria); - } - - protected function getOptions(ConfigurationInterface $configuration) - { - return array_replace(array( - 'exclude' => array(), - 'mapping' => array(), - ), $configuration->getOptions()); - } -} diff --git a/src/ServerGrove/KbBundle/Resources/config/routing.yml b/src/ServerGrove/KbBundle/Resources/config/routing.yml deleted file mode 100644 index d646c55..0000000 --- a/src/ServerGrove/KbBundle/Resources/config/routing.yml +++ /dev/null @@ -1,35 +0,0 @@ -ServerGroveKbBundle_Admin_Articles_Files: - resource: "@ServerGroveKbBundle/Controller/Admin/ArticlesFilesController.php" - type: annotation - -ServerGroveKbBundle_Admin_Articles: - resource: "@ServerGroveKbBundle/Controller/Admin/ArticlesController.php" - type: annotation - -ServerGroveKbBundle_Admin_Categories: - resource: "@ServerGroveKbBundle/Controller/Admin/CategoriesController.php" - type: annotation - -ServerGroveKbBundle_Admin_Default: - resource: "@ServerGroveKbBundle/Controller/Admin/DefaultController.php" - type: annotation - -ServerGroveKbBundle_Admin_Urls: - resource: "@ServerGroveKbBundle/Controller/Admin/UrlsController.php" - type: annotation - -ServerGroveKbBundle_Admin_Users: - resource: "@ServerGroveKbBundle/Controller/Admin/UsersController.php" - type: annotation - -ServerGroveKbBundle_Articles: - resource: "@ServerGroveKbBundle/Controller/ArticlesController.php" - type: annotation - -ServerGroveKbBundle_Categories: - resource: "@ServerGroveKbBundle/Controller/CategoriesController.php" - type: annotation - -ServerGroveKbBundle_Default: - resource: "@ServerGroveKbBundle/Controller/DefaultController.php" - type: annotation diff --git a/src/ServerGrove/KbBundle/Resources/config/security.yml.example b/src/ServerGrove/KbBundle/Resources/config/security.yml.example deleted file mode 100644 index cfa3532..0000000 --- a/src/ServerGrove/KbBundle/Resources/config/security.yml.example +++ /dev/null @@ -1,50 +0,0 @@ -jms_security_extra: - secure_all_services: false - expressions: true - -security: - encoders: - ServerGrove\KbBundle\Document\User: sha512 - Symfony\Component\Security\Core\User\User: plaintext - - role_hierarchy: - ROLE_CONTRIBUTOR: [ROLE_USER] - ROLE_EDITOR: [ROLE_CONTRIBUTOR] - ROLE_ADMIN: [ROLE_EDITOR] - ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] - - providers: - user_db: - id: server_grove_kb.security.user.provider - - firewalls: - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - - secured_area: - pattern: ^/ - anonymous: ~ - form_login: - default_target_path: /admin - login_path: /admin/login - check_path: /admin/login-check - - logout: - path: /admin/logout - target: /admin/login - - remember_me: - key: "%secret%" - lifetime: 3600 - path: / - domain: ~ # Defaults to the current domain from $_SERVER - - access_control: - - { path: ^/admin/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/admin/[\w_\-\/]+/edit, roles: ROLE_EDITOR } - - { path: ^/admin/[\w_\-\/]+/update, roles: ROLE_EDITOR } - - { path: ^/admin/[\w_\-\/]+/new, roles: ROLE_ADMIN } - - { path: ^/admin/[\w_\-\/]+/create, roles: ROLE_ADMIN } - - { path: ^/admin/[\w_\-\/]+/delete, roles: ROLE_ADMIN } - - { path: ^/admin, roles: ROLE_USER } diff --git a/src/ServerGrove/KbBundle/Resources/config/services.xml b/src/ServerGrove/KbBundle/Resources/config/services.xml deleted file mode 100644 index e33ea40..0000000 --- a/src/ServerGrove/KbBundle/Resources/config/services.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - ServerGrove\KbBundle\Util\MarkdownParser - ServerGrove\KbBundle\Security\User\UserProvider - ServerGrove\KbBundle\Form\Type\LocaleType - ServerGrove\KbBundle\Form\Type\EditorType - ServerGrove\KbBundle\Form\Type\CategoryType - ServerGrove\KbBundle\Form\Type\Prepended\DateType - ServerGrove\KbBundle\Listener\UserActionListener - ServerGrove\KbBundle\Twig\TextExtension - ServerGrove\KbBundle\Twig\ArticleExtension - ServerGrove\KbBundle\Request\PHPCRParamConverter - - - - - - - - - - - - - - - - %server_grove_kb.locales% - - - - - %server_grove_kb.editor_type% - - - - - - - - - - - - - - - %server_grove_kb.mailer.from.name% - %server_grove_kb.mailer.from.email% - - - - - - - - - - - %server_grove_kb.locales% - ServerGroveKbBundle:Admin:locales.html.twig - - - - diff --git a/src/ServerGrove/KbBundle/Resources/doc/index.rst b/src/ServerGrove/KbBundle/Resources/doc/index.rst deleted file mode 100644 index e69de29..0000000 diff --git a/src/ServerGrove/KbBundle/Resources/public/css/backend/admin.css b/src/ServerGrove/KbBundle/Resources/public/css/backend/admin.css deleted file mode 100644 index f7fccb7..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/backend/admin.css +++ /dev/null @@ -1,46 +0,0 @@ - -/* modal for image gallery */ -#galleryModal ul.image-gallery { - max-height: 200px; - overflow: auto;; -} - -#galleryModal ul.image-gallery li { - display: inline; - list-style-type: none; - cursor: pointer; -} - -#galleryModal ul.image-gallery li:hover { - opacity: 0.8; -} - -#galleryModal ul.image-gallery li img { - margin: 2px; - width: 96px; - height: 96px; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -} - -#galleryModal ul.image-gallery li img.selected { - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; -} - -#galleryModal .image-preview { - text-align: center; -} - -#galleryModal .image-preview img { - margin: 3px; -} - - -/* mage disables flags gray*/ -li.flag-disabled { - opacity:0.3; - filter:alpha(opacity=30); /* For IE8 and earlier */; -} \ No newline at end of file diff --git a/src/ServerGrove/KbBundle/Resources/public/css/bootstrap-2.0.4.min.css b/src/ServerGrove/KbBundle/Resources/public/css/bootstrap-2.0.4.min.css deleted file mode 100755 index f0b9523..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/bootstrap-2.0.4.min.css +++ /dev/null @@ -1,727 +0,0 @@ -/*! - * Bootstrap v2.0.4 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} -.clearfix:after{clear:both;} -.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} -.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} -article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} -audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} -audio:not([controls]){display:none;} -html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} -a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -a:hover,a:active{outline:0;} -sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} -sup{top:-0.5em;} -sub{bottom:-0.25em;} -img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} -#map_canvas img{max-width:none;} -button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} -button,input{*overflow:visible;line-height:normal;} -button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} -button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} -input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} -input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} -textarea{overflow:auto;vertical-align:top;} -body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} -a{color:#0088cc;text-decoration:none;} -a:hover{color:#005580;text-decoration:underline;} -.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} -.row:after{clear:both;} -[class*="span"]{float:left;margin-left:20px;} -.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} -.span12{width:940px;} -.span11{width:860px;} -.span10{width:780px;} -.span9{width:700px;} -.span8{width:620px;} -.span7{width:540px;} -.span6{width:460px;} -.span5{width:380px;} -.span4{width:300px;} -.span3{width:220px;} -.span2{width:140px;} -.span1{width:60px;} -.offset12{margin-left:980px;} -.offset11{margin-left:900px;} -.offset10{margin-left:820px;} -.offset9{margin-left:740px;} -.offset8{margin-left:660px;} -.offset7{margin-left:580px;} -.offset6{margin-left:500px;} -.offset5{margin-left:420px;} -.offset4{margin-left:340px;} -.offset3{margin-left:260px;} -.offset2{margin-left:180px;} -.offset1{margin-left:100px;} -.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} -.row-fluid:after{clear:both;} -.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;} -.row-fluid [class*="span"]:first-child{margin-left:0;} -.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;} -.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;} -.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;} -.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;} -.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;} -.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;} -.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;} -.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;} -.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;} -.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;} -.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;} -.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;} -.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";} -.container:after{clear:both;} -.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";} -.container-fluid:after{clear:both;} -p{margin:0 0 9px;}p small{font-size:11px;color:#999999;} -.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} -h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} -h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} -h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} -h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;} -h4,h5,h6{line-height:18px;} -h4{font-size:14px;}h4 small{font-size:12px;} -h5{font-size:12px;} -h6{font-size:11px;color:#999999;text-transform:uppercase;} -.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} -.page-header h1{line-height:1;} -ul,ol{padding:0;margin:0 0 9px 25px;} -ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} -ul{list-style:disc;} -ol{list-style:decimal;} -li{line-height:18px;} -ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} -dl{margin-bottom:18px;} -dt,dd{line-height:18px;} -dt{font-weight:bold;line-height:17px;} -dd{margin-left:9px;} -.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} -.dl-horizontal dd{margin-left:130px;} -hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} -strong{font-weight:bold;} -em{font-style:italic;} -.muted{color:#999999;} -abbr[title]{cursor:help;border-bottom:1px dotted #999999;} -abbr.initialism{font-size:90%;text-transform:uppercase;} -blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} -blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} -blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} -q:before,q:after,blockquote:before,blockquote:after{content:"";} -address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;} -small{font-size:100%;} -cite{font-style:normal;} -code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} -pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;} -pre code{padding:0;color:inherit;background-color:transparent;border:0;} -.pre-scrollable{max-height:340px;overflow-y:scroll;} -.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;} -.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} -a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} -.label-important,.badge-important{background-color:#b94a48;} -.label-important[href],.badge-important[href]{background-color:#953b39;} -.label-warning,.badge-warning{background-color:#f89406;} -.label-warning[href],.badge-warning[href]{background-color:#c67605;} -.label-success,.badge-success{background-color:#468847;} -.label-success[href],.badge-success[href]{background-color:#356635;} -.label-info,.badge-info{background-color:#3a87ad;} -.label-info[href],.badge-info[href]{background-color:#2d6987;} -.label-inverse,.badge-inverse{background-color:#333333;} -.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} -table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} -.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;} -.table th{font-weight:bold;} -.table thead th{vertical-align:bottom;} -.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} -.table tbody+tbody{border-top:2px solid #dddddd;} -.table-condensed th,.table-condensed td{padding:4px 5px;} -.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;} -.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} -.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} -.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} -.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;} -.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;} -.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} -.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;} -table .span1{float:none;width:44px;margin-left:0;} -table .span2{float:none;width:124px;margin-left:0;} -table .span3{float:none;width:204px;margin-left:0;} -table .span4{float:none;width:284px;margin-left:0;} -table .span5{float:none;width:364px;margin-left:0;} -table .span6{float:none;width:444px;margin-left:0;} -table .span7{float:none;width:524px;margin-left:0;} -table .span8{float:none;width:604px;margin-left:0;} -table .span9{float:none;width:684px;margin-left:0;} -table .span10{float:none;width:764px;margin-left:0;} -table .span11{float:none;width:844px;margin-left:0;} -table .span12{float:none;width:924px;margin-left:0;} -table .span13{float:none;width:1004px;margin-left:0;} -table .span14{float:none;width:1084px;margin-left:0;} -table .span15{float:none;width:1164px;margin-left:0;} -table .span16{float:none;width:1244px;margin-left:0;} -table .span17{float:none;width:1324px;margin-left:0;} -table .span18{float:none;width:1404px;margin-left:0;} -table .span19{float:none;width:1484px;margin-left:0;} -table .span20{float:none;width:1564px;margin-left:0;} -table .span21{float:none;width:1644px;margin-left:0;} -table .span22{float:none;width:1724px;margin-left:0;} -table .span23{float:none;width:1804px;margin-left:0;} -table .span24{float:none;width:1884px;margin-left:0;} -form{margin:0 0 18px;} -fieldset{padding:0;margin:0;border:0;} -legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:13.5px;color:#999999;} -label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;} -input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} -label{display:block;margin-bottom:5px;} -select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;} -input,textarea{width:210px;} -textarea{height:auto;} -textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);} -input[type="radio"],input[type="checkbox"]{margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;} -input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;} -.uneditable-textarea{width:auto;height:auto;} -select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} -select{width:220px;border:1px solid #bbb;} -select[multiple],select[size]{height:auto;} -select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -.radio,.checkbox{min-height:18px;padding-left:18px;} -.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} -.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} -.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} -.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} -.input-mini{width:60px;} -.input-small{width:90px;} -.input-medium{width:150px;} -.input-large{width:210px;} -.input-xlarge{width:270px;} -.input-xxlarge{width:530px;} -input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;} -.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;} -input,textarea,.uneditable-input{margin-left:0;} -input.span12, textarea.span12, .uneditable-input.span12{width:930px;} -input.span11, textarea.span11, .uneditable-input.span11{width:850px;} -input.span10, textarea.span10, .uneditable-input.span10{width:770px;} -input.span9, textarea.span9, .uneditable-input.span9{width:690px;} -input.span8, textarea.span8, .uneditable-input.span8{width:610px;} -input.span7, textarea.span7, .uneditable-input.span7{width:530px;} -input.span6, textarea.span6, .uneditable-input.span6{width:450px;} -input.span5, textarea.span5, .uneditable-input.span5{width:370px;} -input.span4, textarea.span4, .uneditable-input.span4{width:290px;} -input.span3, textarea.span3, .uneditable-input.span3{width:210px;} -input.span2, textarea.span2, .uneditable-input.span2{width:130px;} -input.span1, textarea.span1, .uneditable-input.span1{width:50px;} -input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;} -input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;} -.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} -.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning .checkbox:focus,.control-group.warning .radio:focus,.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} -.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} -.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} -.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error .checkbox:focus,.control-group.error .radio:focus,.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} -.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} -.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} -.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success .checkbox:focus,.control-group.success .radio:focus,.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} -.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} -input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} -.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";} -.form-actions:after{clear:both;} -.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);} -:-moz-placeholder{color:#999999;} -:-ms-input-placeholder{color:#999999;} -::-webkit-input-placeholder{color:#999999;} -.help-block,.help-inline{color:#555555;} -.help-block{display:block;margin-bottom:9px;} -.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;} -.input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2;} -.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} -.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;} -.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} -.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;} -.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;} -.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} -.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} -.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} -.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;} -.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} -.form-search label,.form-inline label{display:inline-block;} -.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;} -.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;} -.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;} -.control-group{margin-bottom:9px;} -legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} -.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} -.form-horizontal .control-group:after{clear:both;} -.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;} -.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:160px;} -.form-horizontal .help-block{margin-top:9px;margin-bottom:0;} -.form-horizontal .form-actions{padding-left:160px;} -.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9;} -.btn:active,.btn.active{background-color:#cccccc \9;} -.btn:first-child{*margin-left:0;} -.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} -.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} -.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} -.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.btn-large [class^="icon-"]{margin-top:1px;} -.btn-small{padding:5px 9px;font-size:11px;line-height:16px;} -.btn-small [class^="icon-"]{margin-top:-1px;} -.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;} -.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} -.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);} -.btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} -.btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0055cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;*background-color:#004ab3;} -.btn-primary:active,.btn-primary.active{background-color:#004099 \9;} -.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505;} -.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} -.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a;} -.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} -.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;*background-color:#499249;} -.btn-success:active,.btn-success.active{background-color:#408140 \9;} -.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;*background-color:#2a85a0;} -.btn-info:active,.btn-info.active{background-color:#24748c \9;} -.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;*background-color:#151515;} -.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;} -button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} -button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;} -button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;} -button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;} -[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;} -.icon-white{background-image:url("../img/glyphicons-halflings-white.png");} -.icon-glass{background-position:0 0;} -.icon-music{background-position:-24px 0;} -.icon-search{background-position:-48px 0;} -.icon-envelope{background-position:-72px 0;} -.icon-heart{background-position:-96px 0;} -.icon-star{background-position:-120px 0;} -.icon-star-empty{background-position:-144px 0;} -.icon-user{background-position:-168px 0;} -.icon-film{background-position:-192px 0;} -.icon-th-large{background-position:-216px 0;} -.icon-th{background-position:-240px 0;} -.icon-th-list{background-position:-264px 0;} -.icon-ok{background-position:-288px 0;} -.icon-remove{background-position:-312px 0;} -.icon-zoom-in{background-position:-336px 0;} -.icon-zoom-out{background-position:-360px 0;} -.icon-off{background-position:-384px 0;} -.icon-signal{background-position:-408px 0;} -.icon-cog{background-position:-432px 0;} -.icon-trash{background-position:-456px 0;} -.icon-home{background-position:0 -24px;} -.icon-file{background-position:-24px -24px;} -.icon-time{background-position:-48px -24px;} -.icon-road{background-position:-72px -24px;} -.icon-download-alt{background-position:-96px -24px;} -.icon-download{background-position:-120px -24px;} -.icon-upload{background-position:-144px -24px;} -.icon-inbox{background-position:-168px -24px;} -.icon-play-circle{background-position:-192px -24px;} -.icon-repeat{background-position:-216px -24px;} -.icon-refresh{background-position:-240px -24px;} -.icon-list-alt{background-position:-264px -24px;} -.icon-lock{background-position:-287px -24px;} -.icon-flag{background-position:-312px -24px;} -.icon-headphones{background-position:-336px -24px;} -.icon-volume-off{background-position:-360px -24px;} -.icon-volume-down{background-position:-384px -24px;} -.icon-volume-up{background-position:-408px -24px;} -.icon-qrcode{background-position:-432px -24px;} -.icon-barcode{background-position:-456px -24px;} -.icon-tag{background-position:0 -48px;} -.icon-tags{background-position:-25px -48px;} -.icon-book{background-position:-48px -48px;} -.icon-bookmark{background-position:-72px -48px;} -.icon-print{background-position:-96px -48px;} -.icon-camera{background-position:-120px -48px;} -.icon-font{background-position:-144px -48px;} -.icon-bold{background-position:-167px -48px;} -.icon-italic{background-position:-192px -48px;} -.icon-text-height{background-position:-216px -48px;} -.icon-text-width{background-position:-240px -48px;} -.icon-align-left{background-position:-264px -48px;} -.icon-align-center{background-position:-288px -48px;} -.icon-align-right{background-position:-312px -48px;} -.icon-align-justify{background-position:-336px -48px;} -.icon-list{background-position:-360px -48px;} -.icon-indent-left{background-position:-384px -48px;} -.icon-indent-right{background-position:-408px -48px;} -.icon-facetime-video{background-position:-432px -48px;} -.icon-picture{background-position:-456px -48px;} -.icon-pencil{background-position:0 -72px;} -.icon-map-marker{background-position:-24px -72px;} -.icon-adjust{background-position:-48px -72px;} -.icon-tint{background-position:-72px -72px;} -.icon-edit{background-position:-96px -72px;} -.icon-share{background-position:-120px -72px;} -.icon-check{background-position:-144px -72px;} -.icon-move{background-position:-168px -72px;} -.icon-step-backward{background-position:-192px -72px;} -.icon-fast-backward{background-position:-216px -72px;} -.icon-backward{background-position:-240px -72px;} -.icon-play{background-position:-264px -72px;} -.icon-pause{background-position:-288px -72px;} -.icon-stop{background-position:-312px -72px;} -.icon-forward{background-position:-336px -72px;} -.icon-fast-forward{background-position:-360px -72px;} -.icon-step-forward{background-position:-384px -72px;} -.icon-eject{background-position:-408px -72px;} -.icon-chevron-left{background-position:-432px -72px;} -.icon-chevron-right{background-position:-456px -72px;} -.icon-plus-sign{background-position:0 -96px;} -.icon-minus-sign{background-position:-24px -96px;} -.icon-remove-sign{background-position:-48px -96px;} -.icon-ok-sign{background-position:-72px -96px;} -.icon-question-sign{background-position:-96px -96px;} -.icon-info-sign{background-position:-120px -96px;} -.icon-screenshot{background-position:-144px -96px;} -.icon-remove-circle{background-position:-168px -96px;} -.icon-ok-circle{background-position:-192px -96px;} -.icon-ban-circle{background-position:-216px -96px;} -.icon-arrow-left{background-position:-240px -96px;} -.icon-arrow-right{background-position:-264px -96px;} -.icon-arrow-up{background-position:-289px -96px;} -.icon-arrow-down{background-position:-312px -96px;} -.icon-share-alt{background-position:-336px -96px;} -.icon-resize-full{background-position:-360px -96px;} -.icon-resize-small{background-position:-384px -96px;} -.icon-plus{background-position:-408px -96px;} -.icon-minus{background-position:-433px -96px;} -.icon-asterisk{background-position:-456px -96px;} -.icon-exclamation-sign{background-position:0 -120px;} -.icon-gift{background-position:-24px -120px;} -.icon-leaf{background-position:-48px -120px;} -.icon-fire{background-position:-72px -120px;} -.icon-eye-open{background-position:-96px -120px;} -.icon-eye-close{background-position:-120px -120px;} -.icon-warning-sign{background-position:-144px -120px;} -.icon-plane{background-position:-168px -120px;} -.icon-calendar{background-position:-192px -120px;} -.icon-random{background-position:-216px -120px;} -.icon-comment{background-position:-240px -120px;} -.icon-magnet{background-position:-264px -120px;} -.icon-chevron-up{background-position:-288px -120px;} -.icon-chevron-down{background-position:-313px -119px;} -.icon-retweet{background-position:-336px -120px;} -.icon-shopping-cart{background-position:-360px -120px;} -.icon-folder-close{background-position:-384px -120px;} -.icon-folder-open{background-position:-408px -120px;} -.icon-resize-vertical{background-position:-432px -119px;} -.icon-resize-horizontal{background-position:-456px -118px;} -.icon-hdd{background-position:0 -144px;} -.icon-bullhorn{background-position:-24px -144px;} -.icon-bell{background-position:-48px -144px;} -.icon-certificate{background-position:-72px -144px;} -.icon-thumbs-up{background-position:-96px -144px;} -.icon-thumbs-down{background-position:-120px -144px;} -.icon-hand-right{background-position:-144px -144px;} -.icon-hand-left{background-position:-168px -144px;} -.icon-hand-up{background-position:-192px -144px;} -.icon-hand-down{background-position:-216px -144px;} -.icon-circle-arrow-right{background-position:-240px -144px;} -.icon-circle-arrow-left{background-position:-264px -144px;} -.icon-circle-arrow-up{background-position:-288px -144px;} -.icon-circle-arrow-down{background-position:-312px -144px;} -.icon-globe{background-position:-336px -144px;} -.icon-wrench{background-position:-360px -144px;} -.icon-tasks{background-position:-384px -144px;} -.icon-filter{background-position:-408px -144px;} -.icon-briefcase{background-position:-432px -144px;} -.icon-fullscreen{background-position:-456px -144px;} -.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";} -.btn-group:after{clear:both;} -.btn-group:first-child{*margin-left:0;} -.btn-group+.btn-group{margin-left:5px;} -.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} -.btn-group>.btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} -.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} -.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} -.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} -.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;} -.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} -.btn-group>.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:4px;*padding-bottom:4px;} -.btn-group>.btn-mini.dropdown-toggle{padding-left:5px;padding-right:5px;} -.btn-group>.btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px;} -.btn-group>.btn-large.dropdown-toggle{padding-left:12px;padding-right:12px;} -.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} -.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;} -.btn-group.open .btn-primary.dropdown-toggle{background-color:#0055cc;} -.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;} -.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;} -.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;} -.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;} -.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;} -.btn .caret{margin-top:7px;margin-left:0;} -.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);} -.btn-mini .caret{margin-top:5px;} -.btn-small .caret{margin-top:6px;} -.btn-large .caret{margin-top:6px;border-left-width:5px;border-right-width:5px;border-top-width:5px;} -.dropup .btn-large .caret{border-bottom:5px solid #000000;border-top:0;} -.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);} -.nav{margin-left:0;margin-bottom:18px;list-style:none;} -.nav>li>a{display:block;} -.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} -.nav>.pull-right{float:right;} -.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;} -.nav li+.nav-header{margin-top:9px;} -.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;} -.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} -.nav-list>li>a{padding:3px 15px;} -.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} -.nav-list [class^="icon-"]{margin-right:2px;} -.nav-list .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} -.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";} -.nav-tabs:after,.nav-pills:after{clear:both;} -.nav-tabs>li,.nav-pills>li{float:left;} -.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} -.nav-tabs{border-bottom:1px solid #ddd;} -.nav-tabs>li{margin-bottom:-1px;} -.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} -.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} -.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;} -.nav-stacked>li{float:none;} -.nav-stacked>li>a{margin-right:0;} -.nav-tabs.nav-stacked{border-bottom:0;} -.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} -.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} -.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;} -.nav-pills.nav-stacked>li>a{margin-bottom:3px;} -.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} -.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;} -.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;} -.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;} -.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333;} -.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;} -.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} -.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);} -.tabs-stacked .open>a:hover{border-color:#999999;} -.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";} -.tabbable:after{clear:both;} -.tab-content{overflow:auto;} -.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;} -.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} -.tab-content>.active,.pill-content>.active{display:block;} -.tabs-below>.nav-tabs{border-top:1px solid #ddd;} -.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;} -.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;} -.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd;} -.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;} -.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} -.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} -.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} -.tabs-left>.nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} -.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} -.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} -.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} -.tabs-right>.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} -.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} -.navbar{*position:relative;*z-index:2;overflow:visible;margin-bottom:18px;} -.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);} -.navbar .container{width:auto;} -.nav-collapse.collapse{height:auto;} -.navbar{color:#999999;}.navbar .brand:hover{text-decoration:none;} -.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#999999;} -.navbar .navbar-text{margin-bottom:0;line-height:40px;} -.navbar .navbar-link{color:#999999;}.navbar .navbar-link:hover{color:#ffffff;} -.navbar .btn,.navbar .btn-group{margin-top:5px;} -.navbar .btn-group .btn{margin:0;} -.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";} -.navbar-form:after{clear:both;} -.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} -.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0;} -.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} -.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;} -.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query:-moz-placeholder{color:#cccccc;} -.navbar-search .search-query:-ms-input-placeholder{color:#cccccc;} -.navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;} -.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} -.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;} -.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} -.navbar-fixed-top{top:0;} -.navbar-fixed-bottom{bottom:0;} -.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} -.navbar .nav.pull-right{float:right;} -.navbar .nav>li{display:block;float:left;} -.navbar .nav>li>a{float:none;padding:9px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} -.navbar .btn{display:inline-block;padding:4px 10px 4px;margin:5px 5px 6px;line-height:18px;} -.navbar .btn-group{margin:0;padding:5px 5px 6px;} -.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;} -.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;} -.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;} -.navbar .nav.pull-right{margin-left:10px;margin-right:0;} -.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{background-color:#222222;*background-color:#151515;} -.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#080808 \9;} -.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} -.btn-navbar .icon-bar+.icon-bar{margin-top:3px;} -.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} -.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} -.navbar-fixed-bottom .dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;} -.navbar-fixed-bottom .dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;} -.navbar .nav li.dropdown .dropdown-toggle .caret,.navbar .nav li.dropdown.open .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} -.navbar .nav li.dropdown.active .caret{opacity:1;filter:alpha(opacity=100);} -.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:transparent;} -.navbar .nav li.dropdown.active>.dropdown-toggle:hover{color:#ffffff;} -.navbar .pull-right .dropdown-menu,.navbar .dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right .dropdown-menu:before,.navbar .dropdown-menu.pull-right:before{left:auto;right:12px;} -.navbar .pull-right .dropdown-menu:after,.navbar .dropdown-menu.pull-right:after{left:auto;right:13px;} -.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;} -.breadcrumb .divider{padding:0 5px;color:#999999;} -.breadcrumb .active a{color:#333333;} -.pagination{height:36px;margin:18px 0;} -.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} -.pagination li{display:inline;} -.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;} -.pagination a:hover,.pagination .active a{background-color:#f5f5f5;} -.pagination .active a{color:#999999;cursor:default;} -.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;} -.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} -.pagination-centered{text-align:center;} -.pagination-right{text-align:right;} -.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";} -.pager:after{clear:both;} -.pager li{display:inline;} -.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} -.pager a:hover{text-decoration:none;background-color:#f5f5f5;} -.pager .next a{float:right;} -.pager .previous a{float:left;} -.pager .disabled a,.pager .disabled a:hover{color:#999999;background-color:#fff;cursor:default;} -.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";} -.thumbnails:after{clear:both;} -.row-fluid .thumbnails{margin-left:0;} -.thumbnails>li{float:left;margin-bottom:18px;margin-left:20px;} -.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);} -a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} -.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} -.thumbnail .caption{padding:9px;} -.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#c09853;} -.alert-heading{color:inherit;} -.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;} -.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;} -.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;} -.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;} -.alert-block{padding-top:14px;padding-bottom:14px;} -.alert-block>p,.alert-block>ul{margin-bottom:0;} -.alert-block p+p{margin-top:5px;} -@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} -.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} -.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} -.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);} -.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);} -.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} -.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);} -.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.hero-unit{padding:60px;margin-bottom:30px;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;} -.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit;} -.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} -.tooltip.top{margin-top:-2px;} -.tooltip.right{margin-left:2px;} -.tooltip.bottom{margin-top:2px;} -.tooltip.left{margin-left:-2px;} -.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} -.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} -.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} -.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} -.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.tooltip-arrow{position:absolute;width:0;height:0;} -.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;} -.popover.right{margin-left:5px;} -.popover.bottom{margin-top:5px;} -.popover.left{margin-left:-5px;} -.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} -.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} -.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} -.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} -.popover .arrow{position:absolute;width:0;height:0;} -.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} -.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} -.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} -.modal-open .dropdown-menu{z-index:2050;} -.modal-open .dropdown.open{*z-index:2050;} -.modal-open .popover{z-index:2060;} -.modal-open .tooltip{z-index:2070;} -.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} -.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} -.modal{position:fixed;top:50%;left:50%;z-index:1050;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} -.modal.fade.in{top:50%;} -.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} -.modal-body{overflow-y:auto;max-height:400px;padding:15px;} -.modal-form{margin-bottom:0;} -.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";} -.modal-footer:after{clear:both;} -.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;} -.modal-footer .btn-group .btn+.btn{margin-left:-1px;} -.dropup,.dropdown{position:relative;} -.dropdown-toggle{*margin-bottom:-3px;} -.dropdown-toggle:active,.open .dropdown-toggle{outline:0;} -.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";opacity:0.3;filter:alpha(opacity=30);} -.dropdown .caret{margin-top:8px;margin-left:2px;} -.dropdown:hover .caret,.open .caret{opacity:1;filter:alpha(opacity=100);} -.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:4px 0;margin:1px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;} -.dropdown-menu .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} -.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333333;white-space:nowrap;} -.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;} -.open{*z-index:1000;}.open >.dropdown-menu{display:block;} -.pull-right>.dropdown-menu{right:0;left:auto;} -.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"\2191";} -.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;} -.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.accordion{margin-bottom:18px;} -.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.accordion-heading{border-bottom:0;} -.accordion-heading .accordion-toggle{display:block;padding:8px 15px;} -.accordion-toggle{cursor:pointer;} -.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} -.carousel{position:relative;margin-bottom:18px;line-height:1;} -.carousel-inner{overflow:hidden;width:100%;position:relative;} -.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} -.carousel .item>img{display:block;line-height:1;} -.carousel .active,.carousel .next,.carousel .prev{display:block;} -.carousel .active{left:0;} -.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} -.carousel .next{left:100%;} -.carousel .prev{left:-100%;} -.carousel .next.left,.carousel .prev.right{left:0;} -.carousel .active.left{left:-100%;} -.carousel .active.right{left:100%;} -.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;} -.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} -.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);} -.carousel-caption h4,.carousel-caption p{color:#ffffff;} -.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} -.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} -.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);} -button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;} -.pull-right{float:right;} -.pull-left{float:left;} -.hide{display:none;} -.show{display:block;} -.invisible{visibility:hidden;} -.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;} -.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;} -.hidden{display:none;visibility:hidden;} -.visible-phone{display:none !important;} -.visible-tablet{display:none !important;} -.hidden-desktop{display:none !important;} -@media (max-width:767px){.visible-phone{display:inherit !important;} .hidden-phone{display:none !important;} .hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;}}@media (min-width:768px) and (max-width:979px){.visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;} .hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} [class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:auto;margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.762430939%;*margin-left:2.709239449638298%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .span12{width:99.999999993%;*width:99.9468085036383%;} .row-fluid .span11{width:91.436464082%;*width:91.38327259263829%;} .row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%;} .row-fluid .span9{width:74.30939226%;*width:74.25620077063829%;} .row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%;} .row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%;} .row-fluid .span6{width:48.618784527%;*width:48.5655930376383%;} .row-fluid .span5{width:40.055248616%;*width:40.0020571266383%;} .row-fluid .span4{width:31.491712705%;*width:31.4385212156383%;} .row-fluid .span3{width:22.928176794%;*width:22.874985304638297%;} .row-fluid .span2{width:14.364640883%;*width:14.311449393638298%;} .row-fluid .span1{width:5.801104972%;*width:5.747913482638298%;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:714px;} input.span11, textarea.span11, .uneditable-input.span11{width:652px;} input.span10, textarea.span10, .uneditable-input.span10{width:590px;} input.span9, textarea.span9, .uneditable-input.span9{width:528px;} input.span8, textarea.span8, .uneditable-input.span8{width:466px;} input.span7, textarea.span7, .uneditable-input.span7{width:404px;} input.span6, textarea.span6, .uneditable-input.span6{width:342px;} input.span5, textarea.span5, .uneditable-input.span5{width:280px;} input.span4, textarea.span4, .uneditable-input.span4{width:218px;} input.span3, textarea.span3, .uneditable-input.span3{width:156px;} input.span2, textarea.span2, .uneditable-input.span2{width:94px;} input.span1, textarea.span1, .uneditable-input.span1{width:32px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564%;*margin-left:2.510911074638298%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%;} .row-fluid .span10{width:82.905982906%;*width:82.8527914166383%;} .row-fluid .span9{width:74.358974359%;*width:74.30578286963829%;} .row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%;} .row-fluid .span7{width:57.264957265%;*width:57.2117657756383%;} .row-fluid .span6{width:48.717948718%;*width:48.6647572286383%;} .row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%;} .row-fluid .span4{width:31.623931624%;*width:31.5707401346383%;} .row-fluid .span3{width:23.076923077%;*width:23.0237315876383%;} .row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%;} .row-fluid .span1{width:5.982905983%;*width:5.929714493638298%;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:1160px;} input.span11, textarea.span11, .uneditable-input.span11{width:1060px;} input.span10, textarea.span10, .uneditable-input.span10{width:960px;} input.span9, textarea.span9, .uneditable-input.span9{width:860px;} input.span8, textarea.span8, .uneditable-input.span8{width:760px;} input.span7, textarea.span7, .uneditable-input.span7{width:660px;} input.span6, textarea.span6, .uneditable-input.span6{width:560px;} input.span5, textarea.span5, .uneditable-input.span5{width:460px;} input.span4, textarea.span4, .uneditable-input.span4{width:360px;} input.span3, textarea.span3, .uneditable-input.span3{width:260px;} input.span2, textarea.span2, .uneditable-input.span2{width:160px;} input.span1, textarea.span1, .uneditable-input.span1{width:60px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:18px;} .navbar-fixed-bottom{margin-top:18px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 9px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#999999;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222222;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}} diff --git a/src/ServerGrove/KbBundle/Resources/public/css/flags16.css b/src/ServerGrove/KbBundle/Resources/public/css/flags16.css deleted file mode 100644 index 594380a..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/flags16.css +++ /dev/null @@ -1,245 +0,0 @@ -.f16 .flag{display:inline-block;height:16px;width:16px;vertical-align:text-top;line-height:16px;background:url(/images/flags16.png) no-repeat;} -.f16 ._African_Union(OAS){background-position:0 -16px;} -.f16 ._Arab_League{background-position:0 -32px;} -.f16 ._ASEAN{background-position:0 -48px;} -.f16 ._CARICOM{background-position:0 -64px;} -.f16 ._CIS{background-position:0 -80px;} -.f16 ._Commonwealth{background-position:0 -96px;} -.f16 ._England{background-position:0 -112px;} -.f16 ._European_Union{background-position:0 -128px;} -.f16 ._Islamic_Conference{background-position:0 -144px;} -.f16 ._Kosovo{background-position:0 -160px;} -.f16 ._NATO{background-position:0 -176px;} -.f16 ._Northern_Cyprus{background-position:0 -192px;} -.f16 ._Northern_Ireland{background-position:0 -208px;} -.f16 ._Olimpic_Movement{background-position:0 -224px;} -.f16 ._OPEC{background-position:0 -240px;} -.f16 ._Red_Cross{background-position:0 -256px;} -.f16 ._Scotland{background-position:0 -272px;} -.f16 ._Somaliland{background-position:0 -288px;} -.f16 ._Tibet{background-position:0 -304px;} -.f16 ._United_Nations{background-position:0 -320px;} -.f16 ._Wales{background-position:0 -336px;} -.f16 .ad{background-position:0 -352px;} -.f16 .ae{background-position:0 -368px;} -.f16 .af{background-position:0 -384px;} -.f16 .ag{background-position:0 -400px;} -.f16 .ai{background-position:0 -416px;} -.f16 .al{background-position:0 -432px;} -.f16 .am{background-position:0 -448px;} -.f16 .an{background-position:0 -464px;} -.f16 .ao{background-position:0 -480px;} -.f16 .aq{background-position:0 -496px;} -.f16 .ar{background-position:0 -512px;} -.f16 .as{background-position:0 -528px;} -.f16 .at{background-position:0 -544px;} -.f16 .au{background-position:0 -560px;} -.f16 .aw{background-position:0 -576px;} -.f16 .az{background-position:0 -592px;} -.f16 .ba{background-position:0 -608px;} -.f16 .bb{background-position:0 -624px;} -.f16 .bd{background-position:0 -640px;} -.f16 .be{background-position:0 -656px;} -.f16 .bf{background-position:0 -672px;} -.f16 .bg{background-position:0 -688px;} -.f16 .bh{background-position:0 -704px;} -.f16 .bi{background-position:0 -720px;} -.f16 .bj{background-position:0 -736px;} -.f16 .bm{background-position:0 -752px;} -.f16 .bn{background-position:0 -768px;} -.f16 .bo{background-position:0 -784px;} -.f16 .br{background-position:0 -800px;} -.f16 .bs{background-position:0 -816px;} -.f16 .bt{background-position:0 -832px;} -.f16 .bw{background-position:0 -848px;} -.f16 .by{background-position:0 -864px;} -.f16 .bz{background-position:0 -880px;} -.f16 .ca{background-position:0 -896px;} -.f16 .cg{background-position:0 -912px;} -.f16 .cf{background-position:0 -928px;} -.f16 .cd{background-position:0 -944px;} -.f16 .ch{background-position:0 -960px;} -.f16 .ci{background-position:0 -976px;} -.f16 .ck{background-position:0 -992px;} -.f16 .cl{background-position:0 -1008px;} -.f16 .cm{background-position:0 -1024px;} -.f16 .cn{background-position:0 -1040px;} -.f16 .co{background-position:0 -1056px;} -.f16 .cr{background-position:0 -1072px;} -.f16 .cu{background-position:0 -1088px;} -.f16 .cv{background-position:0 -1104px;} -.f16 .cy{background-position:0 -1120px;} -.f16 .cz{background-position:0 -1136px;} -.f16 .de{background-position:0 -1152px;} -.f16 .dj{background-position:0 -1168px;} -.f16 .dk{background-position:0 -1184px;} -.f16 .dm{background-position:0 -1200px;} -.f16 .do{background-position:0 -1216px;} -.f16 .dz{background-position:0 -1232px;} -.f16 .ec{background-position:0 -1248px;} -.f16 .ee{background-position:0 -1264px;} -.f16 .eg{background-position:0 -1280px;} -.f16 .eh{background-position:0 -1296px;} -.f16 .er{background-position:0 -1312px;} -.f16 .es{background-position:0 -1328px;} -.f16 .et{background-position:0 -1344px;} -.f16 .fi{background-position:0 -1360px;} -.f16 .fj{background-position:0 -1376px;} -.f16 .fm{background-position:0 -1392px;} -.f16 .fo{background-position:0 -1408px;} -.f16 .fr{background-position:0 -1424px;} -.f16 .ga{background-position:0 -1440px;} -.f16 .gb{background-position:0 -1456px;} -.f16 .gd{background-position:0 -1472px;} -.f16 .ge{background-position:0 -1488px;} -.f16 .gg{background-position:0 -1504px;} -.f16 .gh{background-position:0 -1520px;} -.f16 .gi{background-position:0 -1536px;} -.f16 .gl{background-position:0 -1552px;} -.f16 .gm{background-position:0 -1568px;} -.f16 .gn{background-position:0 -1584px;} -.f16 .gp{background-position:0 -1600px;} -.f16 .gq{background-position:0 -1616px;} -.f16 .gr{background-position:0 -1632px;} -.f16 .gt{background-position:0 -1648px;} -.f16 .gu{background-position:0 -1664px;} -.f16 .gw{background-position:0 -1680px;} -.f16 .gy{background-position:0 -1696px;} -.f16 .hk{background-position:0 -1712px;} -.f16 .hn{background-position:0 -1728px;} -.f16 .hr{background-position:0 -1744px;} -.f16 .ht{background-position:0 -1760px;} -.f16 .hu{background-position:0 -1776px;} -.f16 .id{background-position:0 -1792px;} -.f16 .mc{background-position:0 -1792px;} -.f16 .ie{background-position:0 -1808px;} -.f16 .il{background-position:0 -1824px;} -.f16 .im{background-position:0 -1840px;} -.f16 .in{background-position:0 -1856px;} -.f16 .iq{background-position:0 -1872px;} -.f16 .ir{background-position:0 -1888px;} -.f16 .is{background-position:0 -1904px;} -.f16 .it{background-position:0 -1920px;} -.f16 .je{background-position:0 -1936px;} -.f16 .jm{background-position:0 -1952px;} -.f16 .jo{background-position:0 -1968px;} -.f16 .jp{background-position:0 -1984px;} -.f16 .ke{background-position:0 -2000px;} -.f16 .kg{background-position:0 -2016px;} -.f16 .kh{background-position:0 -2032px;} -.f16 .ki{background-position:0 -2048px;} -.f16 .km{background-position:0 -2064px;} -.f16 .kn{background-position:0 -2080px;} -.f16 .kp{background-position:0 -2096px;} -.f16 .kr{background-position:0 -2112px;} -.f16 .kw{background-position:0 -2128px;} -.f16 .ky{background-position:0 -2144px;} -.f16 .kz{background-position:0 -2160px;} -.f16 .la{background-position:0 -2176px;} -.f16 .lb{background-position:0 -2192px;} -.f16 .lc{background-position:0 -2208px;} -.f16 .li{background-position:0 -2224px;} -.f16 .lk{background-position:0 -2240px;} -.f16 .lr{background-position:0 -2256px;} -.f16 .ls{background-position:0 -2272px;} -.f16 .lt{background-position:0 -2288px;} -.f16 .lu{background-position:0 -2304px;} -.f16 .lv{background-position:0 -2320px;} -.f16 .ly{background-position:0 -2336px;} -.f16 .ma{background-position:0 -2352px;} -.f16 .md{background-position:0 -2368px;} -.f16 .me{background-position:0 -2384px;} -.f16 .mg{background-position:0 -2400px;} -.f16 .mh{background-position:0 -2416px;} -.f16 .mk{background-position:0 -2432px;} -.f16 .ml{background-position:0 -2448px;} -.f16 .mm{background-position:0 -2464px;} -.f16 .mn{background-position:0 -2480px;} -.f16 .mo{background-position:0 -2496px;} -.f16 .mq{background-position:0 -2512px;} -.f16 .mr{background-position:0 -2528px;} -.f16 .ms{background-position:0 -2544px;} -.f16 .mt{background-position:0 -2560px;} -.f16 .mu{background-position:0 -2576px;} -.f16 .mv{background-position:0 -2592px;} -.f16 .mw{background-position:0 -2608px;} -.f16 .mx{background-position:0 -2624px;} -.f16 .my{background-position:0 -2640px;} -.f16 .mz{background-position:0 -2656px;} -.f16 .na{background-position:0 -2672px;} -.f16 .nc{background-position:0 -2688px;} -.f16 .ne{background-position:0 -2704px;} -.f16 .ng{background-position:0 -2720px;} -.f16 .ni{background-position:0 -2736px;} -.f16 .nl{background-position:0 -2752px;} -.f16 .no{background-position:0 -2768px;} -.f16 .np{background-position:0 -2784px;} -.f16 .nr{background-position:0 -2800px;} -.f16 .nz{background-position:0 -2816px;} -.f16 .om{background-position:0 -2832px;} -.f16 .pa{background-position:0 -2848px;} -.f16 .pe{background-position:0 -2864px;} -.f16 .pf{background-position:0 -2880px;} -.f16 .pg{background-position:0 -2896px;} -.f16 .ph{background-position:0 -2912px;} -.f16 .pk{background-position:0 -2928px;} -.f16 .pl{background-position:0 -2944px;} -.f16 .pr{background-position:0 -2960px;} -.f16 .ps{background-position:0 -2976px;} -.f16 .pt{background-position:0 -2992px;} -.f16 .pw{background-position:0 -3008px;} -.f16 .py{background-position:0 -3024px;} -.f16 .qa{background-position:0 -3040px;} -.f16 .re{background-position:0 -3056px;} -.f16 .ro{background-position:0 -3072px;} -.f16 .rs{background-position:0 -3088px;} -.f16 .ru{background-position:0 -3104px;} -.f16 .rw{background-position:0 -3120px;} -.f16 .sa{background-position:0 -3136px;} -.f16 .sb{background-position:0 -3152px;} -.f16 .sc{background-position:0 -3168px;} -.f16 .sd{background-position:0 -3184px;} -.f16 .se{background-position:0 -3200px;} -.f16 .sg{background-position:0 -3216px;} -.f16 .si{background-position:0 -3232px;} -.f16 .sk{background-position:0 -3248px;} -.f16 .sl{background-position:0 -3264px;} -.f16 .sm{background-position:0 -3280px;} -.f16 .sn{background-position:0 -3296px;} -.f16 .so{background-position:0 -3312px;} -.f16 .sr{background-position:0 -3328px;} -.f16 .st{background-position:0 -3344px;} -.f16 .sv{background-position:0 -3360px;} -.f16 .sy{background-position:0 -3376px;} -.f16 .sz{background-position:0 -3392px;} -.f16 .tc{background-position:0 -3408px;} -.f16 .td{background-position:0 -3424px;} -.f16 .tg{background-position:0 -3440px;} -.f16 .th{background-position:0 -3456px;} -.f16 .tj{background-position:0 -3472px;} -.f16 .tl{background-position:0 -3488px;} -.f16 .tm{background-position:0 -3504px;} -.f16 .tn{background-position:0 -3520px;} -.f16 .to{background-position:0 -3536px;} -.f16 .tr{background-position:0 -3552px;} -.f16 .tt{background-position:0 -3568px;} -.f16 .tv{background-position:0 -3584px;} -.f16 .tw{background-position:0 -3600px;} -.f16 .tz{background-position:0 -3616px;} -.f16 .ua{background-position:0 -3632px;} -.f16 .ug{background-position:0 -3648px;} -.f16 .us, .f16 .en{background-position:0 -3664px;} -.f16 .uy{background-position:0 -3680px;} -.f16 .uz{background-position:0 -3696px;} -.f16 .va{background-position:0 -3712px;} -.f16 .vc{background-position:0 -3728px;} -.f16 .ve{background-position:0 -3744px;} -.f16 .vg{background-position:0 -3760px;} -.f16 .vi{background-position:0 -3776px;} -.f16 .vn{background-position:0 -3792px;} -.f16 .vu{background-position:0 -3808px;} -.f16 .ws{background-position:0 -3824px;} -.f16 .ye{background-position:0 -3840px;} -.f16 .za{background-position:0 -3856px;} -.f16 .zm{background-position:0 -3872px;} -.f16 .zw{background-position:0 -3872px;} diff --git a/src/ServerGrove/KbBundle/Resources/public/css/frontend/interface.css b/src/ServerGrove/KbBundle/Resources/public/css/frontend/interface.css deleted file mode 100644 index 5d5c3d6..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/frontend/interface.css +++ /dev/null @@ -1,76 +0,0 @@ - - -.strong { - font-weight: bold; -} - -.title-page { - margin: 50px 0 20px 0; -} - -.form-search { - margin: 0; -} - - -blockquote p { - margin-bottom: 0; - font-size: 16px; - font-weight: 300; - line-height: 22.5px; - width: 300px; - float: right; - background: #E1EDF1; - padding: 20px; - -webkit-box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.75); - -moz-box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.75); - box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.75); - margin: 20px 0 30px 20px; -} - - - -.settings { - display: none; -} - -.badge-small { - font-size: 10px; - margin-left: 5px; - font-weight: normal; -} - -.content-preview { - border: solid 1px #999; - height: 450px; - overflow: auto; -} - -a.link-mini { - font-size: 0.6em; -} - - -div.selector.centered{ - text-align: center; - margin-top: 30px; -} - - -ul.articles { - margin-top: 10px; - list-style: none; - margin-left: 0; -} - -ul.articles li { - margin-top: 8px; - - font-size: 14px; -} - -ul.subcategories li { - float: left; - margin-right: 18px; -} - diff --git a/src/ServerGrove/KbBundle/Resources/public/css/keywords.css b/src/ServerGrove/KbBundle/Resources/public/css/keywords.css deleted file mode 100644 index 5617aa0..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/keywords.css +++ /dev/null @@ -1,6 +0,0 @@ -.keywordMgr ul { - margin-left: 0px; -} -.keywordMgr ul li { - display: inline-block; -} diff --git a/src/ServerGrove/KbBundle/Resources/public/css/prettify.css b/src/ServerGrove/KbBundle/Resources/public/css/prettify.css deleted file mode 100644 index d44b3a2..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/css/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/src/ServerGrove/KbBundle/Resources/public/js/0.jquery-1.7.2.min.js b/src/ServerGrove/KbBundle/Resources/public/js/0.jquery-1.7.2.min.js deleted file mode 100644 index 16ad06c..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/js/0.jquery-1.7.2.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.2 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( -a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f -.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/src/ServerGrove/KbBundle/Resources/public/js/1.angular-1.0.1.min.js b/src/ServerGrove/KbBundle/Resources/public/js/1.angular-1.0.1.min.js deleted file mode 100644 index 62bacaf..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/js/1.angular-1.0.1.min.js +++ /dev/null @@ -1,157 +0,0 @@ -/* - AngularJS v1.0.1 - (c) 2010-2012 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(T,aa,p){'use strict';function m(b,a,c){var d;if(b)if(M(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(J(b)&&va(b.length))for(d=0;d=0&&b.splice(c,1);return a}function U(b,a){if(na(b)||b&&b.$evalAsync&&b.$watch)throw z("Can't copy Window or Scope");if(a){if(b=== -a)throw z("Can't copy equivalent objects or arrays");if(K(b)){for(;a.length;)a.pop();for(var c=0;c2?ga.call(arguments,2):[];return M(a)&&!(a instanceof RegExp)?c.length? -function(){return arguments.length?a.apply(b,c.concat(ga.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function hc(b,a){var c=a;/^\$+/.test(b)?c=p:na(a)?c="$WINDOW":a&&aa===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function ba(b,a){return JSON.stringify(b,hc,a?" ":null)}function mb(b){return G(b)?JSON.parse(b):b}function Wa(b){b&&b.length!==0?(b=C(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1; -return b}function oa(b){b=u(b).clone();try{b.html("")}catch(a){}return u("
").append(b).html().match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+C(b)})}function Xa(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=s(c[1])?decodeURIComponent(c[1]):!0)});return a}function nb(b){var a=[];m(b,function(b,d){a.push(Ya(d,!0)+(b===!0?"":"="+Ya(b,!0)))});return a.length?a.join("&"):""}function Za(b){return Ya(b,!0).replace(/%26/gi,"&").replace(/%3D/gi, -"=").replace(/%2B/gi,"+")}function Ya(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function ic(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(h,function(a){h[a]=!0;c(aa.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+ -a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function ob(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=pb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function $a(b,a){a=a||"_";return b.replace(jc, -function(b,d){return(d?a:"")+b.toLowerCase()})}function pa(b,a,c){if(!b)throw new z("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function qa(b,a,c){c&&K(b)&&(b=b[b.length-1]);pa(M(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function kc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c, -d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw z("No module: "+d);var b=[],c=[],j=a("$injector","invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:j,run:function(a){c.push(a); -return this}};g&&j(g);return k})}})}function qb(b){return b.replace(lc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(mc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,i,j,k,l,n;b.length;){h=b.shift();f=0;for(i=h.length;f 
"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function ra(b){rb(b);for(var a=0,b=b.childNodes||[];a --1}function vb(b,a){a&&m(a.split(" "),function(a){b.className=Q((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+Q(a)+" "," "))})}function wb(b,a){a&&m(a.split(" "),function(a){if(!Ca(b,a))b.className=Q(b.className+" "+Q(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&s(a.length)&&!na(a)?a:[a],c=0;c4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"),V.length>20&&c.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+ -V.length+" > 20 )")}else{if(i.cookie!==I){I=i.cookie;d=I.split("; ");V={};for(f=0;f0&&(V[unescape(e.substring(0,g))]=unescape(e.substring(g+1)))}return V}};f.defer=function(a,b){var c;o++;c=l(function(){delete r[c];e(a)},b||0);r[c]=!0;return c};f.defer.cancel=function(a){return r[a]?(delete r[a],n(a),e(x),!0):!1}}function vc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new uc(b,d,a,c)}]}function wc(){this.$get=function(){function b(b, -d){function e(a){if(a!=l){if(n){if(n==a)n=a.n}else n=a;g(a.n,a.p);g(a,l);l=a;l.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw z("cacheId "+b+" taken");var h=0,f=D({},d,{id:b}),i={},j=d&&d.capacity||Number.MAX_VALUE,k={},l=null,n=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);v(b)||(a in i||h++,i[a]=b,h>j&&this.remove(n.key))},get:function(a){var b=k[a];if(b)return e(b),i[a]},remove:function(a){var b=k[a];if(b==l)l=b.p;if(b==n)n=b.n;g(b.n,b.p);delete k[a]; -delete i[a];h--},removeAll:function(){i={};h=0;k={};l=n=null},destroy:function(){k=f=i=null;delete a[b]},info:function(){return D({},f,{size:h})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function xc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Bb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: "; -this.directive=function f(d,e){G(d)?(pa(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var f=b.invoke(a);if(M(f))f={compile:B(f)};else if(!f.compile&&f.link)f.compile=B(f.link);f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(g){c(g)}});return e}])),a[d].push(e)):m(d,lb(f));return this};this.$get=["$injector","$interpolate","$exceptionHandler", -"$http","$templateCache","$parse","$controller","$rootScope",function(b,i,j,k,l,n,r,o){function w(a,b,c){a instanceof u||(a=u(a));m(a,function(b,c){b.nodeType==3&&(a[c]=u(b).wrap("").parent()[0])});var d=t(a,b,a,c);return function(b,c){pa(b,"scope");var e=c?ta.clone.call(a):a;e.data("$scope",b);q(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function q(a,b){try{a.addClass(b)}catch(c){}}function t(a,b,c,d){function e(a,c,d,g){for(var j,i,n,k,l,o=0,r=0,q=f.length;oE.priority)break;if(B=E.scope)N("isolated scope",y,E,F),J(B)&&(q(F,"ng-isolate-scope"),y=E),q(F,"ng-scope"),A=A||E;W=E.name;if(B=E.controller)s=s||{},N("'"+W+"' controller",s[W],E,F),s[W]=E;if(B=E.transclude)N("transclusion",x,E,F),x=E,l=E.priority,B=="element"?($=u(b),F=c.$$element=u("<\!-- "+W+": "+c[W]+" --\>"),b=F[0],Ga(e,u($[0]),b),v=w($,d,l)):($=u(cb(b)).contents(),F.html(""),v=w($,d));if(B=E.template)if(N("template",I,E,F),I=E,$=u("
"+Q(B)+"
").contents(),b=$[0],E.replace){if($.length!= -1||b.nodeType!==1)throw new z(g+B);Ga(e,F,b);W={$attr:{}};a=a.concat(X(b,a.splice(C+1,a.length-(C+1)),W));L(c,W);H=a.length}else F.html(B);if(E.templateUrl)N("template",I,E,F),I=E,k=V(a.splice(C,a.length-C),k,F,c,e,E.replace,v),H=a.length;else if(E.compile)try{D=E.compile(F,c,v),M(D)?f(null,D):D&&f(D.pre,D.post)}catch(O){j(O,oa(F))}if(E.terminal)k.terminal=!0,l=Math.max(l,E.priority)}k.scope=A&&A.scope;k.transclude=x&&v;return k}function y(d,e,g,i){var n=!1;if(a.hasOwnProperty(e))for(var k,e=b.get(e+ -c),l=0,o=e.length;lk.priority)&&k.restrict.indexOf(g)!=-1)d.push(k),n=!0}catch(r){j(r)}return n}function L(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){f=="class"?(q(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function V(a,b,c,d,e,f,j){var i= -[],n,o,r=c[0],q=a.shift(),w=D({},q,{controller:null,templateUrl:null,transclude:null});c.html("");k.get(q.templateUrl,{cache:l}).success(function(k){var l,q;if(f){q=u("
"+Q(k)+"
").contents();l=q[0];if(q.length!=1||l.nodeType!==1)throw new z(g+k);k={$attr:{}};Ga(e,c,l);X(l,a,k);L(d,k)}else l=r,c.html(k);a.unshift(w);n=A(a,c,d,j);for(o=t(c.contents(),j);i.length;){var m=i.pop(),k=i.pop();q=i.pop();var y=i.pop(),I=l;q!==r&&(I=cb(l),Ga(k,u(q),I));n(function(){b(o,y,I,e,m)},y,I,e,m)}i=null}).error(function(a, -b,c,d){throw z("Failed to load template: "+d.url);});return function(a,c,d,e,f){i?(i.push(c),i.push(d),i.push(e),i.push(f)):n(function(){b(o,c,d,e,f)},c,d,e,f)}}function I(a,b){return b.priority-a.priority}function N(a,b,c,d){if(b)throw z("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+oa(d));}function F(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:B(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);q(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue= -a})})})}function W(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:B(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=p;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function Ga(a,b,c){var d=b[0],e=d.parentNode,f,g;if(a){f=0;for(g=a.length;f0){var e=N[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),N.shift(),b):!1}function i(a){f(a)||e("is unexpected, expecting ["+ -a+"]",h())}function j(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,f){return b(d,f,a,c)}}function l(){for(var a=[];;)if(N.length>0&&!h("}",")",";","]")&&a.push(v()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,f=0;f","<=",">="))a=k(a,b.fn,q());return a}function t(){for(var a=m(),b;b=f("*","/","%");)a=k(a,b.fn,m());return a}function m(){var a;return f("+")?A():(a=f("-"))?k(V,a.fn,m()):(a=f("!"))?j(a.fn,m()):A()}function A(){var a; -if(f("("))a=v(),i(")");else if(f("["))a=y();else if(f("{"))a=L();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=u(a,c),c=null):b.text==="["?(c=a,a=da(a)):b.text==="."?(c=a,a=s(a)):e("IMPOSSIBLE");return a}function y(){var a=[];if(g().text!="]"){do a.push(F());while(f(","))}i("]");return function(b,c){for(var d=[],f=0;f1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=c}function eb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(v(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Tc(){this.$get=B(T)}function Mb(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=C(Q(b.substr(0,e))); -d=Q(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Nb(b){var a=J(b)?b:p;return function(c){a||(a=Mb(b));return c?a[C(c)]||null:a}}function Ob(b,a,c){if(M(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Uc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){G(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=mb(d,!0)));return d}],transformRequest:[function(a){return J(a)&&Sa.apply(a)!=="[object File]"?ba(a):a}],headers:{common:{Accept:"application/json, text/plain, */*", -"X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,i,j,k){function l(a){function c(a){var b=D({},a,{data:Ob(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:j.reject(b)}a.method=la(a.method);var e=a.transformRequest||d.transformRequest,f=a.transformResponse||d.transformResponse, -g=d.headers,g=D({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[C(a.method)],a.headers),e=Ob(a.data,Nb(g),e),i;v(a.data)&&delete g["Content-Type"];i=n(a,e,g);i=i.then(c,c);m(w,function(a){i=a(i)});i.success=function(b){i.then(function(c){b(c.data,c.status,c.headers,a)});return i};i.error=function(b){i.then(null,function(c){b(c.data,c.status,c.headers,a)});return i};return i}function n(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(w,[a,b,Mb(c)]):m.remove(w));f(b,a,c);i.$apply()}function f(a, -c,d){c=Math.max(c,0);(200<=c&&c<300?n.resolve:n.reject)({data:a,status:c,headers:Nb(d),config:b})}function h(){var a=Ua(l.pendingRequests,b);a!==-1&&l.pendingRequests.splice(a,1)}var n=j.defer(),k=n.promise,m,p,w=r(b.url,b.params);l.pendingRequests.push(b);k.then(h,h);b.cache&&b.method=="GET"&&(m=J(b.cache)?b.cache:o);if(m)if(p=m.get(w))if(p.then)return p.then(h,h),p;else K(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else m.put(w,k);p||a(b.method,w,c,e,d,b.timeout,b.withCredentials);return k}function r(a, -b){if(!b)return a;var c=[];dc(b,function(a,b){a==null||a==p||(J(a)&&(a=ba(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),w=[];m(e,function(a){w.push(G(a)?k.get(a):k.invoke(a))});l.pendingRequests=[];(function(a){m(arguments,function(a){l[a]=function(b,c){return l(D(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){l[a]=function(b,c,d){return l(D(d||{},{method:a,url:b, -data:c}))}})})("post","put");l.defaults=d;return l}]}function Vc(){this.$get=["$browser","$window","$document",function(b,a,c){return Wc(b,Xc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Wc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c)}return function(e, -i,j,k,l,n,r){function o(a,c,d,e){c=(i.match(Fb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(x)}b.$$incOutstandingRequestCount();i=i||b.url();if(C(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(i.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var q=new a;q.open(e,i,!0);m(l,function(a,b){a&&q.setRequestHeader(b,a)});var t;q.onreadystatechange=function(){q.readyState== -4&&o(k,t||q.status,q.responseText,q.getAllResponseHeaders())};if(r)q.withCredentials=!0;q.send(j||"");n>0&&c(function(){t=-1;q.abort()},n)}}}function Yc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","), -SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function Zc(){this.$get=["$rootScope","$browser","$q", -"$exceptionHandler",function(b,a,c,d){function e(e,f,i){var j=c.defer(),k=j.promise,l=s(i)&&!i,f=a.defer(function(){try{j.resolve(e())}catch(a){j.reject(a),d(a)}l||b.$apply()},f),i=function(){delete g[k.$$timeoutId]};k.$$timeoutId=f;g[f]=j;k.then(i,i);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Pb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector", -function(a){return function(b){return a.get(b+c)}}];a("currency",Qb);a("date",Rb);a("filter",$c);a("json",ad);a("limitTo",bd);a("lowercase",cd);a("number",Sb);a("orderBy",Tb);a("uppercase",dd)}function $c(){return function(b,a){if(!(b instanceof Array))return b;var c=[];c.check=function(a){for(var b=0;b --1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c=k+l)for(var j=h.length-k,n=0;n0||e>-c)e+=c;e===0&&c==-12&&(e=12);return hb(e,a,d)}}function La(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Rb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=H(b[9]+b[10]),h=H(b[9]+b[11]));a.setUTCFullYear(H(b[1]),H(b[2])-1,H(b[3]));a.setUTCHours(H(b[4]||0)-g,H(b[5]||0)-h,H(b[6]||0),H(b[7]||0))}return a} -var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;return function(c,e){var g="",h=[],f,i,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;G(c)&&(c=ed.test(c)?H(c):a(c));va(c)&&(c=new Date(c));if(!ma(c))return c;for(;e;)(i=fd.exec(e))?(h=h.concat(ga.call(i,1)),e=h.pop()):(h.push(e),e=null);m(h,function(a){f=gd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ad(){return function(b){return ba(b,!0)}} -function bd(){return function(b,a){if(!(b instanceof Array))return b;var a=H(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;dl?(d.$setValidity("maxlength",!1),p):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function ib(b,a){b="ngClass"+b;return R(function(c,d,e){c.$watch(e[b],function(b,e){if(a===!0||c.$index% -2===a)e&&b!==e&&(J(e)&&!K(e)&&(e=Ta(e,function(a,b){if(a)return b})),d.removeClass(K(e)?e.join(" "):e)),J(b)&&!K(b)&&(b=Ta(b,function(a,b){if(a)return b})),b&&d.addClass(K(b)?b.join(" "):b)},!0)})}var C=function(b){return G(b)?b.toLowerCase():b},la=function(b){return G(b)?b.toUpperCase():b},z=T.Error,Z=H((/msie (\d+)/.exec(C(navigator.userAgent))||[])[1]),u,ha,ga=[].slice,Ra=[].push,Sa=Object.prototype.toString,Yb=T.angular||(T.angular={}),sa,Cb,Y=["0","0","0"];x.$inject=[];ya.$inject=[];Cb=Z<9?function(b){b= -b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var jc=/[A-Z]/g,hd={full:"1.0.1",major:1,minor:0,dot:1,codeName:"thorium-shielding"},Ba=P.cache={},Aa=P.expando="ng-"+(new Date).getTime(),nc=1,id=T.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},tb=T.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b, -a,c){b.detachEvent("on"+a,c)},lc=/([\:\-\_]+(.))/g,mc=/^moz([A-Z])/,ta=P.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);P(T).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Ra,sort:[].sort,splice:[].splice},Ea={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ea[C(b)]=b});var zb={}; -m("input,select,option,textarea,button,form".split(","),function(b){zb[la(b)]=!0});m({data:ub,inheritedData:Da,scope:function(b){return Da(b,"$scope")},controller:xb,injector:function(b){return Da(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ca,css:function(b,a,c){a=qb(a);if(s(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?p:d);return d}},attr:function(b,a,c){var d=C(a);if(Ea[d])if(s(c))c?(b[a]=!0, -b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||x).specified?d:p;else if(s(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?p:b},prop:function(b,a,c){if(s(c))b[a]=c;else return b[a]},text:D(Z<9?function(b,a){if(b.nodeType==1){if(v(a))return b.innerText;b.innerText=a}else{if(v(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(v(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(v(a))return b.value; -b.value=a},html:function(b,a){if(v(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)}, -"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Kc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},gb={},Xc=T.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new z("This browser does not support XMLHttpRequest."); -};Pb.$inject=["$provide"];Qb.$inject=["$locale"];Sb.$inject=["$locale"];var Vb=".",gd={yyyy:O("FullYear",4),yy:O("FullYear",2,0,!0),y:O("FullYear",1),MMMM:La("Month"),MMM:La("Month",!0),MM:O("Month",2,1),M:O("Month",1,1),dd:O("Date",2),d:O("Date",1),HH:O("Hours",2),H:O("Hours",1),hh:O("Hours",2,-12),h:O("Hours",1,-12),mm:O("Minutes",2),m:O("Minutes",1),ss:O("Seconds",2),s:O("Seconds",1),EEEE:La("Day"),EEE:La("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=a.getTimezoneOffset(); -return hb(a/60,2)+hb(Math.abs(a%60),2)}},fd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,ed=/^\d+$/;Rb.$inject=["$locale"];var cd=B(C),dd=B(la);Tb.$inject=["$parse"];var jd=B({restrict:"E",compile:function(a,c){c.href||c.$set("href","");return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),jb={};m(Ea,function(a,c){var d=ea("ng-"+c);jb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c, -!!a)})}}}}});m(["src","href"],function(a){var c=ea("ng-"+a);jb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){g.$set(a,c);Z&&e.prop(a,c)})}}}});var Oa={$addControl:x,$removeControl:x,$setValidity:x,$setDirty:x};Wb.$inject=["$element","$attrs","$scope"];var Ra={name:"form",restrict:"E",controller:Wb,compile:function(){return{pre:function(a,c,d,e){d.action||c.bind("submit",function(a){a.preventDefault()});var g=c.parent().controller("form"),h=d.name||d.ngForm;h&&(a[h]= -e);g&&c.bind("$destroy",function(){g.$removeControl(e);h&&(a[h]=p);D(e,Oa)})}}}},kd=B(Ra),ld=B(D(U(Ra),{restrict:"EAC"})),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,$b={text:Qa,number:function(a,c,d,e,g,h){Qa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=S(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number", -!1),p)});e.$formatters.push(function(a){return S(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!S(a)&&ai?(e.$setValidity("max",!1),p):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return S(a)||va(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1), -p)})},url:function(a,c,d,e,g,h){Qa(a,c,d,e,g,h);a=function(a){return S(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),p)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,h){Qa(a,c,d,e,g,h);a=function(a){return S(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),p)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){v(d.name)&&c.attr("name",wa());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})}); -e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;G(g)||(g=!0);G(h)||(h=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:x,button:x,submit:x,reset:x},ac=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel", -link:function(d,e,g,h){h&&($b[C(g.type)]||$b.text)(d,e,g,h,c,a)}}}],Na="ng-valid",Ma="ng-invalid",Pa="ng-pristine",Xb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function h(a,c){c=c?"-"+$a(c,"-"):"";e.removeClass((a?Ma:Na)+c).addClass((a?Na:Ma)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var g=g(d.ngModel), -f=g.assign;if(!f)throw z(Db+d.ngModel+" ("+oa(e)+")");this.$render=x;var i=e.inheritedData("$formController")||Oa,j=0,k=this.$error={};e.addClass(Pa);h(!0);this.$setValidity=function(a,c){if(k[a]!==!c){if(c){if(k[a]&&j--,!j)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,j++;k[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Pa).addClass(Xb),i.$setDirty();m(this.$parsers, -function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,f(a,d),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(g,function(a){if(l.$modelValue!==a){var c=l.$formatters,d=c.length;for(l.$modelValue=a;d--;)a=c[d](a);if(l.$viewValue!==a)l.$viewValue=a,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h=e[1]||Oa;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=B({require:"ngModel", -link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),bc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(S(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])|| -d.ngList||",",h=function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(Q(a))});return c};e.$parsers.push(h);e.$formatters.push(function(a){return K(a)&&!fa(h(e.$viewValue),a)?a.join(", "):p})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=R(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind); -a.$watch(d.ngBind,function(a){c.text(a==p?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=ib("",!0),zd=ib("Odd",0),Ad=ib("Even",1),Bd=R({compile:function(a,c){c.$set("ngCloak",p);a.removeClass("ng-cloak")}}), -Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],cc={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);cc[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(C(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=R(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Fd=["$http","$templateCache", -"$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,i=h.onload||"",j=h.autoscroll;return function(g,h){var n=0,m,o=function(){m&&(m.$destroy(),m=null);h.html("")};g.$watch(f,function(f){var q=++n;f?a.get(f,{cache:c}).success(function(a){q===n&&(m&&m.$destroy(),m=g.$new(),h.html(a),e(h.contents())(m),s(j)&&(!j||g.$eval(j))&&d(),m.$emit("$includeContentLoaded"),g.$eval(i))}).error(function(){q===n&&o()}):o()})}}}}],Gd=R({compile:function(){return{pre:function(a, -c,d){a.$eval(d.ngInit)}}}}),Hd=R({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,i=g.attr(h.$attr.when),j=h.offset||0,k=e.$eval(i),l={};m(k,function(a,e){l[e]=c(a.replace(d,"{{"+f+"-"+j+"}}"))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-j)),l[c](e,g,!0))},function(a){g.text(a)})}}}],Jd=R({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a, -c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),i,j,k;if(!h)throw z("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];i=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw z("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");j=h[3]||h[1];k=h[2];var l=new db;a.$watch(function(a){var e,f,h=a.$eval(i),m=fc(h,!0),p,u=new db,A,y,v,s,z=c;if(K(h))v=h||[];else{v=[];for(A in h)h.hasOwnProperty(A)&&A.charAt(0)!= -"$"&&v.push(A);v.sort()}e=0;for(f=v.length;ex;)u.pop().element.remove()}for(;v.length>w;)v.pop()[0].element.remove()}var h;if(!(h=w.match(d)))throw z("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+w+"'.");var j=c(h[2]||h[1]),k=h[4]||h[6],l=h[5],m=c(h[3]||""),n=c(h[2]?h[1]:k),r=c(h[7]),v=[[{element:f,label:""}]];q&&(a(q)(e),q.removeClass("ng-scope"),q.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a, -c=r(e)||[],d={},h,i,j,m,q,s;if(o){i=[];m=0;for(s=v.length;m@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}'); diff --git a/src/ServerGrove/KbBundle/Resources/public/js/2.bootstrap-2.0.4.min.js b/src/ServerGrove/KbBundle/Resources/public/js/2.bootstrap-2.0.4.min.js deleted file mode 100755 index 2c00b6f..0000000 --- a/src/ServerGrove/KbBundle/Resources/public/js/2.bootstrap-2.0.4.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/** -* Bootstrap.js by @fat & @mdo -* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js -* Copyright 2012 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt -*/ -!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('
- - - - - - - - - - - - {% for document in documents %} - - - - - - - - - {% endfor %} - -
{% trans %}Title{% endtrans %}{% trans %}Categories{% endtrans %}{% trans %}Keywords{% endtrans %}{% trans %}Date{% endtrans %}{% trans %}Active{% endtrans %}{% trans %}Actions{% endtrans %}
{{ document }}{{ document.getCategories().values()|join(', ') }}{{ document.getKeywords()|join(', ') }}{{ document.updated|date("m.d.y, g:i a") }} - {{ article_locales(document) }} - - - {{ sgkb.editLink('sgkb_admin_articles_edit', { 'slug': document.slug }, {}, 'Edit Article') }} - {% trans %}View Article{% endtrans %} -
diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/markdown-cheatsheet.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/markdown-cheatsheet.html.twig deleted file mode 100644 index cf59576..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/markdown-cheatsheet.html.twig +++ /dev/null @@ -1,152 +0,0 @@ - diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/new.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/new.html.twig deleted file mode 100644 index df8713d..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/new.html.twig +++ /dev/null @@ -1,84 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% form_theme form _self %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, document.getDefaultCategory()|default(false), true) }} -{% endblock postheader %} - -{% block content %} -
- {{ form_widget(form, { legend: 'Article creation'|trans }) }} -
- -   - {% trans %}Cancel{% endtrans %} -
-
- {% render "ServerGroveKbBundle:Admin/Urls:modalForm" %} -{% endblock %} - -{% block form_row %} - {% spaceless %} -
- {{ form_label(form, label|default(null)) }} -
- {% set attributes = {} %} - {% if form.get('value') is not iterable %} - {% set attributes = attributes|merge({ 'ng-model': form.get('name')~'.value', 'ng-init': form.get('name')~'.value="'~form.get('value')~'"' }) %} - {% else %} - {% set attributes = attributes|merge({ 'ng-model': form.get('name')~'.values', 'ng-init': form.get('name')~'.values='~form.get('value')|json_encode }) %} - {% endif %} - - {{ form_widget(form, { 'attr': attributes }) }} - {{ form_errors(form) }} -
-
- {% endspaceless %} -{% endblock form_row %} - -{% block choice_widget_options %} - {% spaceless %} - {% for group_label, choice in options %} - {% if choice is iterable %} - - {% set options = choice %} - {{ block('choice_widget_options') }} - - {% else %} - - {% endif %} - {% endfor %} - {% endspaceless %} -{% endblock choice_widget_options %} - -{% block field_errors %} - {% spaceless %} - {% set error_messages %} - {% if errors|length > 0 %} - {% for error in errors %} - {% if loop.index > 1 %} - ,  - {% endif %} - {{ error.messageTemplate|trans(error.messageParameters, 'validators') }} - {% endfor %} - {% endif %} - {% endset %} - {% raw %}{{{% endraw %} {{ form.get('name') }}{% raw %}.message }}{% endraw %} - {% endspaceless %} -{% endblock field_errors %} - -{% block row_container_attributes %} - {% spaceless %} - - {% set attr = { 'class': "ng-class:getClassForControlGroup('"~form.get('name')~"'); control-group" } %} - - {% if errors|length > 0 %} - {% set attr = attr|merge({ 'class': 'error ' ~ attr.class }) %} - {% endif %} - - {% for attrname,attrvalue in attr %}{{ attrname }}="{{ attrvalue }}" {% endfor %} - - {% endspaceless %} -{% endblock row_container_attributes %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/show.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/show.html.twig deleted file mode 100644 index 44a78e6..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Articles/show.html.twig +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(article, article.getDefaultCategory(), true) }} -{% endblock postheader %} - -{% block content %} -

{% trans with { "%name%": article } %}Article "%name%"{% endtrans %}

- -
-
{% trans %}Title{% endtrans %}
-
{{ article.title }}
-
{% trans %}Created{% endtrans %}
-
{{ article.created|date('Y-m-d H:i:s') }}
-
{% trans %}Updated{% endtrans %}
-
{{ article.updated|date('Y-m-d H:i:s') }}
-
{% trans %}Is Active{% endtrans %}
-
{{ article.isActive|booltostr }}
-
{% trans %}Categories{% endtrans %}
-
{{ article.categories.count() }}
-
{% trans %}Slug{% endtrans %}
-
{{ article.slug }}
-
{% trans %}Metadata{% endtrans %}
-
{{ article.getAllMetadata | json_encode }}
-
- -

-
-

- -
- {% set extras %} - {% trans %}Back to the list{% endtrans %} - {{ sgkb.editLink('sgkb_admin_articles_edit', { 'slug': article.slug }, { 'class': 'btn' }, 'Edit Article') }} - {% endset %} - {{ sgkb.deleteForm(delete_form, 'sgkb_admin_articles_delete', { 'slug': article.slug }, extras) }} -
-{% endblock %} - -{% block javascripts %} - {{ parent() }} - - -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/ArticlesFiles/uploader.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/ArticlesFiles/uploader.html.twig deleted file mode 100644 index cee525f..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/ArticlesFiles/uploader.html.twig +++ /dev/null @@ -1,41 +0,0 @@ -{% spaceless %} - - - - Image uploader - {% stylesheets "@ServerGroveKbBundle/Resources/public/css/*.css" filter="?yui_css" output="/css/compiled/uploader.css" %} - - {% endstylesheets %} - {% javascripts - "@ServerGroveKbBundle/Resources/public/js/*.js" - "@ServerGroveKbBundle/Resources/public/js/backend/*.js" - filter="?yui_js" - output="/js/compiled/uploader.js" %} - - {% endjavascripts %} - {% if refresh is defined and refresh %} - - {% endif %} - - -
- {{ form_widget(form.path) }} - - - - - - {{ form_rest(form) }} -
- - -{% endspaceless %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/edit.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/edit.html.twig deleted file mode 100644 index a8ea646..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/edit.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, document, true) }} -{% endblock postheader %} - -{% block content %} -

{% trans %}Category edit{% endtrans %}

- - {% if translation_forms is defined %} -
- {% trans %}Settings{% endtrans %} - {{ form_widget(settings_form) }} - - {% for locale,translation_form in translation_forms %} - {{ form_widget(translation_form, { 'legend': 'Category translation for locale "%locale%"'|trans({ '%locale%': locale }) }) }} - {% endfor %} - -
- -   - {% trans %}Cancel{% endtrans %} -
-
- {% endif %} - - {% if is_granted("ROLE_ADMIN") %} - - {{ form_widget(delete_form) }} - - {% endif %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/index.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/index.html.twig deleted file mode 100644 index a2fcbf5..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/index.html.twig +++ /dev/null @@ -1,74 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, category|default(false), true) }} -{% endblock postheader %} - -{% block content %} - -{% if category is not defined %} -

{% trans %}Categories list{% endtrans %}

-{% else %} - {% include "ServerGroveKbBundle:Admin/Categories:show.html.twig" %} - {% if category.getChildren()|length > 0 %} -

{% trans %}Subcategories list{% endtrans %}

- {% endif %} -{% endif %} - -
- {% if category is defined %} - {{ sgkb.newLinkForTable('sgkb_admin_categories_new_subcategory', { path: category.path }, {}, 'Add Category') }} - {% else %} - {{ sgkb.newLinkForTable('sgkb_admin_categories_new', {}, {}, 'Add Category') }} - {% endif %} -
- - - - - - - - - - - - - - - {% for category in categories %} - {{ _self.drawItemRow(category) }} - {% else %} - - - - {% endfor %} - -
{% trans %}Name{% endtrans %}{% trans %}Edit{% endtrans %}
{% trans %}No categories have been found{% endtrans %}
-{% endblock %} - -{% macro drawItemRow(category, spaces) %} - {% import "ServerGroveKbBundle:Admin:macros.html.twig" as sgkb %} - - - {{ category.name }} - - - {% trans %}Articles{% endtrans %} - {{ category.getArticles()|length }} - - {% trans %}Subcategories{% endtrans %} - {{ category.getChildren()|length }} - - {{ sgkb.editCat('sgkb_admin_categories_edit', { 'path': category.path }) }} - - - - {% if category.getChildren()|length > 0 %} - {% for child in category.getChildren() %} - {{ _self.drawItemRow(child, 1 + spaces|default(0)) }} - {% endfor %} - {% endif %} - -{% endmacro %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/new.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/new.html.twig deleted file mode 100644 index eae1b9f..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/new.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, parent|default(false), true) }} -{% endblock postheader %} - -{% block content %} - {% set actionPath = parent ? path('sgkb_admin_categories_create_subcategory', { path: parent.path }) : path('sgkb_admin_categories_create') %} -
- {{ form_widget(form, { legend: "Category creation"|trans }) }} - -
- - {% trans %}Cancel{% endtrans %} -
-
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/show.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/show.html.twig deleted file mode 100644 index 313e3bf..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Categories/show.html.twig +++ /dev/null @@ -1 +0,0 @@ -

{% trans with { "%name%": category.name } %}Category "%name%"{% endtrans %}

diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/adminAccess.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Default/adminAccess.html.twig deleted file mode 100644 index df6f0fd..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/adminAccess.html.twig +++ /dev/null @@ -1,5 +0,0 @@ -{% spaceless %} -
- {% trans %}You are logged in the admin area{% endtrans %}. {% trans with {"%path%": path('sgkb_admin')} %}Click here to return now{% endtrans %}. -
-{% endspaceless %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/login.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Default/login.html.twig deleted file mode 100644 index 4784ddb..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/login.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block content %} -
-
-
- Login to the Admin panel - {% if error %} -
{{ error.message }}
- {% endif %} - - - - -
- -
-
-
-
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/topbar.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Default/topbar.html.twig deleted file mode 100644 index e6e3c98..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Default/topbar.html.twig +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/edit.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/edit.html.twig deleted file mode 100644 index 9a59a92..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/edit.html.twig +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -
- {% for locale, form in translation_forms %} - {{ _self.translationForm(form, locale) }} - {% endfor %} -
- -   - {% trans %}Cancel{% endtrans %} -
-
-{% endblock %} - - -{% macro translationForm(form, locale) %} -{{ form_widget(form, { legend: 'Url edit for locale "%locale%"'|trans({ '%locale%': locale }) }) }} -{% endmacro %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/index.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/index.html.twig deleted file mode 100644 index f866e4b..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/index.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -

Url list

- - - - - - - - - - - - - - - - - - - - - {% for document in documents %} - - - - - - {% endfor %} - -
NameCreated_atActions
-
- {{ sgkb.newLinkForTable('sgkb_admin_urls_new', {}, {}, 'Add URL') }} -
-
{{ document.name }}{% if document.createdat %}{{ document.createdat|date('Y-m-d') }}{% endif%} - {% trans %}Show{% endtrans %} - {{ sgkb.editLink('sgkb_admin_urls_edit', { 'slug': document.slug }, { 'class': 'btn btn-mini' }) }} -
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/modalForm.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/modalForm.html.twig deleted file mode 100644 index ff256df..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/modalForm.html.twig +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/new.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/new.html.twig deleted file mode 100644 index 3ab5623..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/new.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -
- {{ form_widget(form, { legend: 'Url creation'|trans }) }} -
- -   - {% trans %}Cancel{% endtrans %} -
-
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/show.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/show.html.twig deleted file mode 100644 index db42814..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Urls/show.html.twig +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -

{% trans with { '%name%': document.name } %}Url "%name%"{% endtrans %}

- -
-
Name
-
{{ document.name }}
-
Url
-
{{ document.url }}
-
Created At
-
{{ document.createdat|date('Y-m-d H:i:s') }}
-
- -
- {% set extras %} - {% trans %}Back to the list{% endtrans %} - {{ sgkb.editLink('sgkb_admin_urls_edit', { 'slug': document.slug }, { 'class': 'btn' }, 'Edit URL') }} - {% endset %} - {{ sgkb.deleteForm(delete_form, 'sgkb_admin_urls_delete', { 'slug': document.slug }, extras) }} -
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/edit.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Users/edit.html.twig deleted file mode 100644 index acf6a12..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/edit.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -
- {{ form_widget(edit_form, { legend: 'User edit'|trans } ) }} - -
- - {% trans %}Cancel{% endtrans %} -
-
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/index.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Users/index.html.twig deleted file mode 100644 index 474d749..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/index.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -

User list

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% for document in documents %} - - - - - - - - - - - - {% endfor %} - -
{% trans %}Name{% endtrans %}{% trans %}Username{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Roles{% endtrans %}{% trans %}Enabled{% endtrans %}{% trans %}Locked{% endtrans %}{% trans %}Expirationdate{% endtrans %}{% trans %}Subscriptions{% endtrans %}{% trans %}Actions{% endtrans %}
-
- {{ sgkb.newLinkForTable('sgkb_admin_users_new', {}, {}, 'Add User') }} -
-
{{ document.name }}{{ document.username }}{{ document.email }}{{ document.roles|join(", ") }}{{ document.enabled|booltostr }}{{ document.locked|booltostr }}{% if document.expirationDate %}{{ document.expirationDate|date('Y-m-d H:i:s') }}{% else %}{% trans %}Never{% endtrans %}{% endif%}{{ document.subscriptions|length }} - {% trans %}Show{% endtrans %} - {{ sgkb.editLink('sgkb_admin_users_edit', { 'username': document.username }, { 'class': 'btn btn-mini' }) }} - {% if is_granted('ROLE_ADMIN') %} - {% trans %}Change Password{% endtrans %} - {% endif %} -
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/new.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Users/new.html.twig deleted file mode 100644 index e1ea55d..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/new.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -
- {{ form_widget(form, { legend: 'User creation'|trans }) }} - - -
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/passwordEdit.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Users/passwordEdit.html.twig deleted file mode 100644 index 6158461..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/passwordEdit.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -
- {{ form_widget(form, { legend: 'User password edit'|trans } ) }} - -
- - {% trans %}Cancel{% endtrans %} -
-
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/show.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/Users/show.html.twig deleted file mode 100644 index 0048976..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/Users/show.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "ServerGroveKbBundle:Admin:layout.html.twig" %} - -{% block postheader %} - {{ parent() }} - {{ sgkb_breadcrumb.displayBreadcrumb(false, false, true) }} -{% endblock postheader %} - -{% block content %} -

User

- -
-
{% trans %}Name{% endtrans %}
-
{{ document.name }}
-
{% trans %}Username{% endtrans %}
-
{{ document.username }}
-
{% trans %}Email{% endtrans %}
-
{{ document.email }}
-
{% trans %}Roles{% endtrans %}
-
{{ document.roles|join(", ") }}
-
{% trans %}Enabled{% endtrans %}
-
{{ document.enabled|booltostr }}
-
{% trans %}Locked{% endtrans %}
-
{{ document.locked|booltostr }}
-
- -
- {% set extras %} - {% trans %}Back to the list{% endtrans %} - {{ sgkb.editLink('sgkb_admin_users_edit', { 'username': document.username }, { 'class': "btn" }, 'Edit User') }} - {% endset %} - {{ sgkb.deleteForm(delete_form, 'sgkb_admin_users_delete', { 'username': document.username }, extras) }} -
-{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/layout.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/layout.html.twig deleted file mode 100644 index 59a1e3c..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/layout.html.twig +++ /dev/null @@ -1,55 +0,0 @@ -{% import "ServerGroveKbBundle:Admin:macros.html.twig" as sgkb %} -{% import "ServerGroveKbBundle::macros.html.twig" as sgkb_breadcrumb %} - - - - {% block title %} Admin - Knowledge Base{% endblock %} - {% block metas %}{% endblock %} - {% block stylesheets %} - {% spaceless %} - {% stylesheets - "../vendor/codemirror/codemirror/lib/codemirror.css" - "@ServerGroveKbBundle/Resources/public/css/*.css" - "@ServerGroveKbBundle/Resources/public/css/backend/*.css" - filter="?yui_css" output="/css/compiled/admin.css" %} - - {% endstylesheets %} - {% endspaceless %} - {% endblock %} - - {% block javascripts %} - {% spaceless %} - {% javascripts - "@ServerGroveKbBundle/Resources/public/js/*.js" - "../vendor/chjj/marked/lib/marked.js" - "../vendor/codemirror/codemirror/lib/codemirror.js" - "../vendor/codemirror/codemirror/mode/xml/xml.js" - "../vendor/codemirror/codemirror/mode/markdown/markdown.js" - "../vendor/codemirror/codemirror/mode/javascript/javascript.js" - "../vendor/codemirror/codemirror/mode/css/css.js" - "../vendor/codemirror/codemirror/mode/htmlmixed/htmlmixed.js" - "@ServerGroveKbBundle/Resources/public/js/backend/*.js" - filter="?yui_js" - output="/js/compiled/admin.js" %} - - {% endjavascripts %} - {% endspaceless %} - {% endblock %} - - - {% include "ServerGroveKbBundle:Admin:partials.html.twig" %} - {% block preheader %} - {% render "ServerGroveKbBundle:Admin/Default:topbar" %} - {% endblock preheader %} - {% block postheader %}{% endblock postheader %} - -
-
- {% block content %}{% endblock %} -
-
- - {% block prefooter %}{% endblock prefooter %} - {% block postfooter %}{% endblock postfooter %} - - diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/locales.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/locales.html.twig deleted file mode 100644 index 1b71ab1..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/locales.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{% block article_locales %} -{% spaceless %} -
    - {% for locale in locales %} - {{ article_locale(article, locale) }} - {% endfor %} -
-{% endspaceless %} -{% endblock article_locales %} - -{% block article_locale %} -{% spaceless %} -
  • -{% endspaceless %} -{% endblock article_locale %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/macros.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/macros.html.twig deleted file mode 100644 index 4183559..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/macros.html.twig +++ /dev/null @@ -1,56 +0,0 @@ -{% macro editLink(route, params, attrs, text) %} -{% spaceless %} -{% if is_granted("ROLE_CONTRIBUTOR") %} - - {{ text|default('Edit')|trans }} - -{% endif %} -{% endspaceless %} -{% endmacro %} - -{% macro editCat(route, params, attrs) %} -{% spaceless %} -{% if is_granted("ROLE_CONTRIBUTOR") %} - - {% trans %}Settings{% endtrans %} - -{% endif %} -{% endspaceless %} -{% endmacro %} - -{% macro deleteForm(delete_form, route, params, extras) %} -{% if is_granted("ROLE_ADMIN") %} -
    - {{ form_widget(delete_form) }} - {{ extras|default('') }} -   - -
    -{% endif %} -{% endmacro %} - -{% macro newLink(route, params, attrs, text) %} -{% spaceless %} -{% if is_granted("ROLE_EDITOR") %} - -{% endif %} -{% endspaceless %} -{% endmacro %} - -{% macro newLinkForTable(route, params, attrs, text) %} -{% spaceless %} -{% if is_granted("ROLE_EDITOR") %} - - {{ text|default('Create new item')|trans }} - -{% endif %} -{% endspaceless %} -{% endmacro %} - -{% macro renderAttributes(attributes) %} -{% for key, value in attributes|default({}) %} {{ key }}="{{ value }}"{% endfor %} -{% endmacro %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/partials.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/partials.html.twig deleted file mode 100644 index 9b98d5e..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Admin/partials.html.twig +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/src/ServerGrove/KbBundle/Resources/views/Admin/uploader.html.twig b/src/ServerGrove/KbBundle/Resources/views/Admin/uploader.html.twig deleted file mode 100644 index e69de29..0000000 diff --git a/src/ServerGrove/KbBundle/Resources/views/Articles/articleContent.html.twig b/src/ServerGrove/KbBundle/Resources/views/Articles/articleContent.html.twig deleted file mode 100644 index c5e552b..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Articles/articleContent.html.twig +++ /dev/null @@ -1,78 +0,0 @@ -
    - - -
    -

    {{ article.getTitle() }}

    -
    - -
    - {% if article.getContentType() == 'markdown' %} - {{ article.getContent()|markdown }} - {% else %} - {{ article.getContent()|raw }} - {% endif %} -
    - -
    -{% if locales|length > 1%} -

    - This article is also available in these languages - -

    -{% endif %} - -{% if enable_related_urls and article.getUrls()|length > 0 %} -
    -

    Related Urls

    - -
    -{% endif %} - -{% if showComments is defined and showComments %} -
    - - -comments powered by Disqus -{% endif %} - - diff --git a/src/ServerGrove/KbBundle/Resources/views/Articles/empty.html.twig b/src/ServerGrove/KbBundle/Resources/views/Articles/empty.html.twig deleted file mode 100644 index 6311a71..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Articles/empty.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} - -{% block content %} -{% spaceless %} -{% trans %}This article has not been written yet :({% endtrans %} -{% endspaceless %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Articles/google-translation.html.twig b/src/ServerGrove/KbBundle/Resources/views/Articles/google-translation.html.twig deleted file mode 100644 index 9b3d097..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Articles/google-translation.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} - -{% block content %} -{% spaceless %} -

    {% trans %}Categories{% endtrans %}

    - -

    {{ article.title }}(Needs to be translated by Google)

    -

    {{ article.content | raw }}

    -
    Related Urls
    - - - -{% endspaceless %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Articles/view.html.twig b/src/ServerGrove/KbBundle/Resources/views/Articles/view.html.twig deleted file mode 100644 index e3127c7..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Articles/view.html.twig +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} - -{% block title %}{{ article.getTitle() }} - {{ category.getName() }} - {{ parent() }}{% endblock title %} - -{% block metas %} - {{ parent() }} - -{% endblock metas %} - -{% block content %} - {% spaceless %} - {% if searchForm is defined and searchForm %} - {% render "ServerGroveKbBundle:Default:searchForm" %} - {% endif %} - - {% set showComments = showComments is defined ? showComments : true %} - {% render "ServerGroveKbBundle:Articles:articleContent" with { 'article': article, 'category': category, 'showComments': showComments } %} - {% endspaceless %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Categories/index.html.twig b/src/ServerGrove/KbBundle/Resources/views/Categories/index.html.twig deleted file mode 100644 index 63d29ed..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Categories/index.html.twig +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} - -{% block content %} -{% render "ServerGroveKbBundle:Default:searchForm" %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Categories/selector.html.twig b/src/ServerGrove/KbBundle/Resources/views/Categories/selector.html.twig deleted file mode 100644 index 1bb20a0..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Categories/selector.html.twig +++ /dev/null @@ -1,28 +0,0 @@ -{% if categories|length > 0 %} -{% spaceless %} - -{% endspaceless %} -{% endif %} - -{% macro drawCategoryMenu(category, current) %} -{% spaceless %} - - - {{ category.getName() }} - - -{% endspaceless %} -{% endmacro %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Categories/subcategorySelector.html.twig b/src/ServerGrove/KbBundle/Resources/views/Categories/subcategorySelector.html.twig deleted file mode 100644 index ac4419a..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Categories/subcategorySelector.html.twig +++ /dev/null @@ -1,13 +0,0 @@ -{% spaceless %} - -{% endspaceless %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Categories/view.html.twig b/src/ServerGrove/KbBundle/Resources/views/Categories/view.html.twig deleted file mode 100644 index 3700afc..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Categories/view.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} - -{% block title %}{{ category.getName() }} - {{ parent() }}{% endblock title %} - -{% block metas %} - {{ parent() }} - -{% endblock %} - - -{% macro articleLink(article, category) %} - {% if article %} -
  • - {{ article }} -
  • - {% endif %} -{% endmacro %} - -{% block content %} - - -

    {% trans with {"%name%": category} %}%name%{% endtrans %}

    - {{ category.description }} -
    -{% if category.getChildren() | length > 0 %} -{% trans %}Subcategories{% endtrans %} - {% render "ServerGroveKbBundle:Categories:subcategorySelector" with { 'category': category } %} -
    -{% endif %} -
    -
    -

    {% trans %}Articles{% endtrans %}

    -
      - {% for article in articles %} - {{ _self.articleLink(article, category) }} - {% endfor %} -
    -
    -
    - -

    {% trans %}Top Articles{% endtrans %}

    -
      - {% for article in topArticles %} - {{ _self.articleLink(article, category) }} - {% endfor %} -
    - -
    -
    -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Categories/view.rss.twig b/src/ServerGrove/KbBundle/Resources/views/Categories/view.rss.twig deleted file mode 100644 index a2e94d7..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Categories/view.rss.twig +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "ServerGroveKbBundle::layout.rss.twig" %} - -{% block title %}Articles from {{ category.name }}{% endblock %} - -{% block description %}{{ category.description }}{% endblock %} - -{% block lastBuildDate %} -{% spaceless %} -{% if articles|length > 0 %} -{{ articles.current.created|date('r') }} -{% endif %} -{% endspaceless %} -{% endblock %} - -{% block items %} -{% for article in articles %} - - {{ article.getTitle(app.request.locale) }} - {{ url('sgkb_articles_view', { '_format': "html", 'category': category.slug, 'slug': article.slug }) }} - {{ article.getContent(app.request.locale)|striptags }} - {{ article.created|date('r') }} - -{% endfor %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Default/breadcrumb.html.twig b/src/ServerGrove/KbBundle/Resources/views/Default/breadcrumb.html.twig deleted file mode 100644 index 717e851..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Default/breadcrumb.html.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% import "ServerGroveKbBundle::macros.html.twig" as sgkb_frontend %} - -{{ sgkb_frontend.displayBreadcrumb(article|default(false), category|default(false)) }} diff --git a/src/ServerGrove/KbBundle/Resources/views/Default/index.html.twig b/src/ServerGrove/KbBundle/Resources/views/Default/index.html.twig deleted file mode 100644 index 3ab4955..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Default/index.html.twig +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} -{% block content %} -

    {% trans %}Categories{% endtrans %}

    -{% render "ServerGroveKbBundle:Categories:index" %} -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Default/layout.html.twig b/src/ServerGrove/KbBundle/Resources/views/Default/layout.html.twig deleted file mode 100644 index 0d8f510..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Default/layout.html.twig +++ /dev/null @@ -1,40 +0,0 @@ -{% extends "ServerGroveKbBundle::layout.html.twig" %} - -{% block preheader %} - -{% endblock %} - -{% block postheader %} -

    {% trans %}Knowledge Base{% endtrans %}

    -{% endblock %} - -{% block stylesheets %} -{% spaceless %} -{% stylesheets - "@ServerGroveKbBundle/Resources/public/css/*.css" - "@ServerGroveKbBundle/Resources/public/css/frontend/*.css" - filter="?yui_css" output="/css/compiled/default.css" %} - -{% endstylesheets %} -{% endspaceless %} -{% endblock %} - -{% block prefooter %} - -
    -
    - {% trans %}Admin{% endtrans %} - {% if article is defined and is_granted('ROLE_EDITOR') %} -   - {% trans %}Edit this page{% endtrans %} - {% endif %} - {% if is_granted('ROLE_ADMIN') %} - {% if category is defined %} - {% trans %}Add Article{% endtrans %} - {% else %} - {% trans %}Add Article{% endtrans %} - {% endif %} - {% endif %} -
    -
    -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Default/search.html.twig b/src/ServerGrove/KbBundle/Resources/views/Default/search.html.twig deleted file mode 100644 index 3f71a53..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Default/search.html.twig +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "ServerGroveKbBundle:Default:layout.html.twig" %} -{% block content %} -{% render "ServerGroveKbBundle:Default:searchForm" %} -

    {% trans %}Articles{% endtrans %}

    -
      - {% for article in results %} -
    • {{ article }}
    • - {% else %} -
    • {% trans %}No articles found{% endtrans %}
    • - {% endfor %} -
    -{% endblock %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Default/searchForm.html.twig b/src/ServerGrove/KbBundle/Resources/views/Default/searchForm.html.twig deleted file mode 100644 index 2b6daf2..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Default/searchForm.html.twig +++ /dev/null @@ -1,13 +0,0 @@ -{% spaceless %} -
    - -
    -{% endspaceless %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Form/fields.html.twig b/src/ServerGrove/KbBundle/Resources/views/Form/fields.html.twig deleted file mode 100644 index 91712d5..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Form/fields.html.twig +++ /dev/null @@ -1,130 +0,0 @@ -{% extends 'form_div_layout.html.twig' %} - -{% block form_row %} -{% spaceless %} -
    - {% if form.has('expanded') and form.get('expanded') and form.has('multiple') and not form.get('multiple') %} - {{ form_label(form, label|default(null)) }} -
    - - {{ form_widget(form) }} - {{ form_errors(form) }} -
    - {% elseif form.has('checked') %} -
    - {{ block('form_checkbox') }} -
    - {% else %} - {{ form_label(form, label|default(null)) }} -
    - {{ form_widget(form) }} - {{ form_errors(form) }} -
    - {% endif %} -
    -{% endspaceless %} -{% endblock form_row %} - -{% block form_checkbox %} - -{% endblock %} - -{# Widgets #} - -{% block choice_widget_expanded %} -{% spaceless %} -{% for child in form %} - -{% endfor %} -{% endspaceless %} -{% endblock choice_widget_expanded %} - -{% block sg_editor_widget %} -{{ form_widget(form, { 'attr': { 'rows': 20 } }) }} -{% endblock sg_editor_widget %} - -{% block form_widget %} -{% spaceless %} -{% if legend is defined %} -{{ legend }} -{% endif %} -{{ form_errors(form) }} -{{ block('form_rows') }} -{{ form_rest(form) }} -{% endspaceless %} -{% endblock form_widget %} - -{% block sg_prepended_date_widget %} -{% spaceless %} -
    - - - - - {{ date_pattern|replace({ - '{{ year }}': form_widget(form.year, { attr: attr|merge({ class: 'input-mini' }) }), - '{{ month }}': form_widget(form.month, { attr: attr|merge({ class: 'input-mini' }) }), - '{{ day }}': form_widget(form.day, { attr: attr|merge({ class: 'input-mini' }) }), - })|raw }} -
    -{% endspaceless %} -{% endblock sg_prepended_date_widget %} - -{# Labels #} - -{% block form_label %} -{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %} -{{ parent() }} -{% endblock form_label %} - -{# Errors #} - -{% block field_errors %} -{% spaceless %} -{% if errors|length > 0 %} - - {% for error in errors %} - {% if loop.index > 1 %} - ,  - {% endif %} - {{ error.messageTemplate|trans(error.messageParameters, 'validators') }} - {% endfor %} - -{% endif %} -{% endspaceless %} -{% endblock field_errors %} - -{# Element attributes #} - -{% block row_container_attributes %} -{% spaceless %} -{% set attr = { 'class': 'control-group' } %} -{% if errors|length > 0 %} -{% set attr = attr|merge({ 'class': 'error ' ~ attr.class }) %} -{% endif %} -{% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %} -{% endspaceless %} -{% endblock row_container_attributes %} - - -{% block widget_attributes %} -{% spaceless %} -{% set attr = { class: 'input-xlarge' }|merge(attr) %} -{{ parent() }} -{% endspaceless %} -{% endblock widget_attributes %} diff --git a/src/ServerGrove/KbBundle/Resources/views/Notice/modification.html.twig b/src/ServerGrove/KbBundle/Resources/views/Notice/modification.html.twig deleted file mode 100644 index 34188fe..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/Notice/modification.html.twig +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - The article {{ article.name }} has been modified by {{ current.user.username }} for the locale "{{ app.request.locale }}". -

    - - - - - - - - - -
    Active versionUser's version
    {{ previous.content }}{{ current.content }}
    - - diff --git a/src/ServerGrove/KbBundle/Resources/views/layout.html.twig b/src/ServerGrove/KbBundle/Resources/views/layout.html.twig deleted file mode 100644 index 687bba0..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/layout.html.twig +++ /dev/null @@ -1,77 +0,0 @@ - - - - {% block title %}Knowledge Base{% endblock %} - {% block metas %}{% endblock %} - {% block javascripts %} - {% spaceless %} - {% javascripts - "@ServerGroveKbBundle/Resources/public/js/*.js" - "@ServerGroveKbBundle/Resources/public/js/frontend/*.js" - "@ServerGroveKbBundle/Resources/public/js/google-code-prettify/*.js" - filter="?yui_js" output="/js/compiled/frontend.js" %} - - {% endjavascripts %} - {% endspaceless %} - {% endblock %} - {% block stylesheets %}{% endblock %} - - - - - - -{% block prefooter %}{% endblock prefooter %} -{% block postfooter %}{% endblock postfooter %} -{% endblock body %} - - diff --git a/src/ServerGrove/KbBundle/Resources/views/layout.rss.twig b/src/ServerGrove/KbBundle/Resources/views/layout.rss.twig deleted file mode 100644 index f32b962..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/layout.rss.twig +++ /dev/null @@ -1,12 +0,0 @@ -{% spaceless %} - - - - {% block title %}{% endblock %} - {% block description %}{% endblock %} - {% block lastBuildDate %}{% endblock %} - {% block items %} - {% endblock %} - - -{% endspaceless %} diff --git a/src/ServerGrove/KbBundle/Resources/views/macros.html.twig b/src/ServerGrove/KbBundle/Resources/views/macros.html.twig deleted file mode 100644 index 3a945a0..0000000 --- a/src/ServerGrove/KbBundle/Resources/views/macros.html.twig +++ /dev/null @@ -1,51 +0,0 @@ -{% macro displayCategoryBreadcrumb(category, active, admin) %} - - {% if category.parent.path is defined %} - {{ _self.displayCategoryBreadcrumb(category.getParent(), false, admin) }} - {% endif %} - - {% set route = admin|default(false) ? "sgkb_admin_categories_show" : "sgkb_categories_view" %} - - {{ category.getName() }} - - {% if not active|default(false) %} - / - {% endif %} - - -{% endmacro %} - -{% macro displayArticleBreadcrumb(article, category, admin) %} - - {{ _self.displayCategoryBreadcrumb(category, false, admin) }} - - {% set route = admin|default(false) ? "sgkb_admin_articles_show" : "sgkb_articles_view" %} -
  • - {{ article.getTitle() }} -
  • - -{% endmacro %} - -{% macro displayBreadcrumb(article, category, admin) %} - {% spaceless %} - {% set admin = admin|default(false) %} - {% set article = article|default(false) %} - {% set category = category|default(false) %} - - {% endspaceless %} -{% endmacro %} diff --git a/src/ServerGrove/KbBundle/Security/User/UserProvider.php b/src/ServerGrove/KbBundle/Security/User/UserProvider.php deleted file mode 100644 index d0245cc..0000000 --- a/src/ServerGrove/KbBundle/Security/User/UserProvider.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ -class UserProvider implements UserProviderInterface -{ - /** @var \Doctrine\Common\Persistence\ObjectManager */ - private $manager; - - public function __construct(ObjectManager $manager) - { - $this->manager = $manager; - } - - /** - * Loads the user for the given username. - * - * This method must throw UsernameNotFoundException if the user is not - * found. - * - * @param string $username The username - * - * @return UserInterface - * - * @see UsernameNotFoundException - * - * @throws UsernameNotFoundException if the user is not found - * - */ - public function loadUserByUsername($username) - { - if (!($user = $this->manager->find(null, sprintf('/users/%s', $username)))) { - throw new UsernameNotFoundException(sprintf('User "%s" not found', $username)); - } - - return $user; - } - - /** - * Refreshes the user for the account interface. - * - * It is up to the implementation to decide if the user data should be - * totally reloaded (e.g. from the database), or if the UserInterface - * object can just be merged into some internal array of users / identity - * map. - * - * @param UserInterface $user - * - * @return UserInterface - * - * @throws UnsupportedUserException if the account is not supported - */ - public function refreshUser(UserInterface $user) - { - try { - return $this->loadUserByUsername($user->getUsername()); - } catch (UsernameNotFoundException $ex) { - throw new UnsupportedUserException($ex->getMessage()); - } - } - - /** - * Whether this provider supports the given user class - * - * @param string $class - * - * @return Boolean - */ - public function supportsClass($class) - { - return 'ServerGrove\KbBundle\Document\User' === $class; - } -} diff --git a/src/ServerGrove/KbBundle/ServerGroveKbBundle.php b/src/ServerGrove/KbBundle/ServerGroveKbBundle.php deleted file mode 100644 index 93a80c8..0000000 --- a/src/ServerGrove/KbBundle/ServerGroveKbBundle.php +++ /dev/null @@ -1,9 +0,0 @@ - - */ -class ArticlesControllerTest extends ControllerTestCase -{ - private $title = 'The title of my article'; - - public function testIndexAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_index')); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $this->assertGreaterThan(0, $crawler->filter('h1')->count()); - $this->assertEquals('Article list', $crawler->filter('h1')->eq(0)->text()); - $this->assertGreaterThan(0, $crawler->filter('table.table tbody tr')->count()); - } - - public function testShowAction() - { - $client = $this->getClient(); - - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_show', array('slug' => Sluggable::urlize($this->title)))); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $this->assertGreaterThan(0, $crawler->filter('h1')->count()); - $this->assertEquals('Article "'.$this->title.'"', $crawler->filter('h1')->eq(0)->text()); - } - - public function testNewAction() - { - $client = $this->getClient(); - - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_new')); - $form = $crawler->selectButton('Create')->form(); - - $form['article[title]'] = 'My article name'; - $form['article[categories]']->select('/categories/test'); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - /** @var $article \ServerGrove\KbBundle\Document\Article */ - $article = $this->getArticleRepository()->find('/articles/my-article-name'); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Article', $article); - - $this->assertCount(1, $article->getCategories()); - - /** @var $category \ServerGrove\KbBundle\Document\Category */ - $category = $article->getCategories()->first(); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Category', $category); - - $this->assertEquals('Test', $category->getName()); - } - - /** - * @depends testNewAction - */ - public function testCreateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_articles_create')); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - /** - * @depends testNewAction - */ - public function testEditAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_edit', array('slug' => $slug = Sluggable::urlize($this->title)))); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $form = $crawler->selectButton('Save')->form(); - $form['article[categories]']->select(array('/categories/mysql', '/categories/billing')); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - /** @var $article \ServerGrove\KbBundle\Document\Article */ - $article = $this->getDocumentManager()->refresh($this->getArticleRepository()->find('/articles/'.$slug)); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Article', $article); - - $this->assertCount(2, $article->getCategories()); - - /** @var $category \ServerGrove\KbBundle\Document\Category */ - foreach ($article->getCategories() as $category) { - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Category', $category); - $this->assertTrue(in_array($category->getName(), array('MySQL', 'Billing'))); - } - - $crawler = $client->request('GET', $url = $this->generateUrl('sgkb_admin_articles_edit', array('slug' => $slug = Sluggable::urlize($this->title)))); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $form = $crawler->selectButton('Save')->form(); - - $form['translation_es[title]'] = 'Título en español'; - $form['translation_es[isActive]']->tick(); - $form['translation_es[content]'] = 'Contenido en español'; - $form['back_to_list']->untick(); - - $crawler = $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $this->assertEquals('Redirecting to '.$url, $crawler->filter('title')->first()->text()); - } - - /** - * @depends testEditAction - */ - public function testUpdateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_articles_update', array('slug' => Sluggable::urlize($this->title)))); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - /** - * @depends testNewAction - */ - public function testDeleteAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_edit', array('slug' => $slug = Sluggable::urlize($this->title)))); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $this->markTestIncomplete(); - $this->assertGreaterThan(0, $crawler->filter('button#btn_sgkb_admin_articles_delete')->count()); - - $form = $crawler->selectButton('btn_sgkb_admin_articles_delete')->form(); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - /** @var $article \ServerGrove\KbBundle\Document\Article */ - $article = $this->getArticleRepository()->find('/articles/'.$slug); - $this->assertNotInstanceOf('ServerGrove\KbBundle\Document\Article', $article); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/Admin/ArticlesFilesControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/Admin/ArticlesFilesControllerTest.php deleted file mode 100644 index 4a970a4..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/Admin/ArticlesFilesControllerTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class ArticlesFilesControllerTest extends ControllerTestCase -{ - public function testUploaderAction() - { - $client = $this->getClient(); - - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_articles_files_uploader')); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $form = $crawler->selectButton('Submit')->form(); - $form['article_file[path]']->upload($file = __FILE__); - - $date = date('YmdHi'); - $client->submit($form); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - $this->assertFileExists($createdFile = $client->getKernel()->getRootDir().'/../web/uploads/'.$date.'-'.basename(__FILE__)); - - $client->request('GET', $this->generateUrl('sgkb_admin_articles_files_all', array('_format' => 'json'))); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $json = (array) json_decode($client->getResponse()->getContent()); - - $this->assertArrayHasKey($key = '/articles-files/uploads-'.Sluggable::urlize(strtolower(basename($createdFile))), $json); - $this->assertObjectHasAttribute('path', $json[$key]); - $this->assertEquals(str_replace(dirname(dirname($createdFile)), '', $createdFile), $json[$key]->path); - - unlink($createdFile); - } - - public function testUploadAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_articles_files_upload')); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/Admin/CategoriesControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/Admin/CategoriesControllerTest.php deleted file mode 100644 index 7e0ca20..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/Admin/CategoriesControllerTest.php +++ /dev/null @@ -1,147 +0,0 @@ - - */ -class CategoriesControllerTest extends ControllerTestCase -{ - public function getPaths() - { - return array( - array(null), - array('test'), - ); - } - - /** - * @param string $path - * - * @dataProvider getPaths - */ - public function testIndexAction($path) - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl(is_null($path) ? 'sgkb_admin_categories_index' : 'sgkb_admin_categories_show', array('path' => $path))); - - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - $this->assertGreaterThan(0, $crawler->filter('table.table tbody tr')->count()); - - if (is_null($path)) { - $this->assertEquals(0, $crawler->filter('h1:contains("Category")')->count()); - $this->assertEquals('Categories list', $crawler->filter('#doccontent h2')->first()->text()); - } else { - $this->assertEquals('Subcategories list', $crawler->filter('#doccontent h2')->first()->text()); - } - } - - /** - * @param string $path - * - * @dataProvider getPaths - */ - public function testNewAction($path) - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl(is_null($path) ? 'sgkb_admin_categories_new' : 'sgkb_admin_categories_new_subcategory', array('path' => $path))); - - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - $this->assertEquals('Category creation', $crawler->filter('form legend')->first()->text()); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Create')->form(); - - $form['category[name]'] = $name = 'Test category'; - $form['category[description]'] = 'This is the description of the Test category'; - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $category = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:Category')->findOneBy(array('path' => ltrim($path.'/test-category', '/'))); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Category', $category); - - $this->assertEquals($name, $category->getName()); - - if (!is_null($path)) { - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Category', $category->getParent()); - $this->assertEquals($path, $category->getParent()->getPath()); - } - } - - /** - * @depends testNewAction - */ - public function testCreateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_categories_create')); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - /** - * @param string $path - * - * @dataProvider getPaths - */ - public function testEditAction($path) - { - if (is_null($path)) { - return; - } - - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_categories_edit', array('path' => $path))); - - $this->assertRegExp('/^Category translation for locale \"[a-z_]{2,7}\"$/', $crawler->filter('form legend')->eq(1)->text()); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Save')->form(); - $name = 'New name '.md5(microtime(true)); - - $form['category_translation_en[name]'] = $name; - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $category = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:Category')->findOneBy(array('path' => $path)); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Category', $category); - $this->getDocumentManager()->refresh($category); - - $this->assertEquals($name, $category->getName()); - } - - /** - * @depends testEditAction - */ - public function testUpdateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_categories_update', array('path' => 'test', - 'locale' => 'en'))); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - public function testDeleteAction() - { - $path = 'test'; - - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_categories_edit', array('path' => $path))); - - $this->markTestIncomplete(); - $this->assertGreaterThan(0, $crawler->filter('button#btn_sgkb_admin_categories_delete')->count()); - - $form = $crawler->selectButton('btn_sgkb_admin_categories_delete')->form(); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $category = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:Category')->findOneBy(array('path' => $path)); - $this->assertNotInstanceOf('ServerGrove\KbBundle\Document\Category', $category); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/Admin/ControllerTestCase.php b/src/ServerGrove/KbBundle/Tests/Controller/Admin/ControllerTestCase.php deleted file mode 100644 index 59c4874..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/Admin/ControllerTestCase.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ -abstract class ControllerTestCase extends BaseTestCase -{ - - protected function getArticleRepository() - { - return $this->getDocumentManager()->getRepository('ServerGroveKbBundle:Article'); - } - - protected function setUp() - { - parent::setUp(); - - $this->createTestUser(); - $this->login(); - } - - private function createTestUser() - { - $user = new User(); - $user->setName('Test User'); - $user->setUsername('mytestuser'); - - $encoder = new \Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder(); - $user->setPassword($encoder->encodePassword('mytestpass', $user->getSalt())); - - $user->setEmail('mytest@example.com'); - $user->setEnabled(true); - - $user->setRoles(array('ROLE_ADMIN')); - - $dm = $this->getDocumentManager(); - - /** @var $session \PHPCR\SessionInterface */ - $session = $dm->getPhpcrSession(); - $root = $session->getNode('/'); - if (!$root->hasNode('users')) { - $root->addNode('users'); - } - - $dm->persist($user); - $dm->flush(); - } - - private function login() - { - $client = $this->getClient(); - $crawler = $client->request('GET', '/admin/login'); - - $form = $crawler->selectButton('Login')->form(); - $form['_username'] = 'mytestuser'; - $form['_password'] = 'mytestpass'; - - $client->submit($form); - } - - private function logout() - { - $this->getClient()->request('GET', '/admin/logout'); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/Admin/UrlsControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/Admin/UrlsControllerTest.php deleted file mode 100644 index 13a8590..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/Admin/UrlsControllerTest.php +++ /dev/null @@ -1,101 +0,0 @@ - - */ -class UrlsControllerTest extends ControllerTestCase -{ - private $name = 'Announcing multi-lingual support for Control Panel'; - - public function testIndexAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_urls_index')); - $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertGreaterThan(0, $crawler->filter('table.table tbody tr')->count()); - $this->assertEquals('Url list', $crawler->filter('#doccontent h1')->first()->text()); - } - - public function testNewAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_urls_new')); - - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - $this->assertEquals('Url creation', $crawler->filter('form legend')->first()->text()); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Create')->form(); - - $form['urls[name]'] = 'ServerGrove'; - $form['urls[url]'] = 'http://www.servergrove.com'; - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $url = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:Url')->find('/url/servergrove'); - - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Url', $url); - $this->assertEquals('ServerGrove', $url->getName()); - } - - /** - * @depends testNewAction - */ - public function testCreateAction() - { - $client = $this->getClient(); - $client->request('POST', $this->generateUrl('sgkb_admin_urls_create')); - - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - public function testEditAction() - { - $name = $this->name; - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_urls_edit', array('slug' => $slug = Sluggable::urlize($name)))); - - $this->assertEquals('Url edit for locale "en"', $crawler->filter('form legend')->first()->text()); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Save')->form(); - - $form['urls_en[name]'] = $name = 'New name '.md5(microtime(true)); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $dm = $this->getDocumentManager(); - - /** @var $url \ServerGrove\KbBundle\Document\Url */ - $url = $dm->getRepository('ServerGroveKbBundle:Url')->find('/url/'.$slug); - $dm->refresh($url); - - $this->assertInstanceOf($className = 'ServerGrove\KbBundle\Document\Url', $url); - $this->assertEquals($name, $url->getName()); - - $translation = $dm->findTranslation($className, $url->getId(), 'es', false); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\Url', $translation); - - $this->setExpectedException('InvalidArgumentException'); - $dm->findTranslation($className, $url->getId(), 'pt', false); - } - - /** - * @depends testEditAction - */ - public function testUpdateAction() - { - $client = $this->getClient(); - $client->request('POST', $this->generateUrl('sgkb_admin_urls_update', array('slug' => Sluggable::urlize($this->name)))); - - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/Admin/UsersControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/Admin/UsersControllerTest.php deleted file mode 100644 index 59e742c..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/Admin/UsersControllerTest.php +++ /dev/null @@ -1,130 +0,0 @@ - - */ -class UsersControllerTest extends ControllerTestCase -{ - - public function testIndexAction() - { - $client = $this->getClient(); - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_users_index')); - - $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertGreaterThan(0, $crawler->filter('table.table tbody tr')->count()); - } - - /** - * @dataProvider getUsersData - * - * @param string $name - * @param string $email - * @param string $username - * @param string $password - * @param integer $expiration - * - * @return void - */ - public function testNewAction($name, $email, $username, $password, $expiration) - { - $client = $this->getClient(); - - /** @var $crawler \Symfony\Component\DomCrawler\Crawler */ - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_users_new')); - - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - $this->assertEquals('User creation', $crawler->filter('form legend')->first()->text()); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Create')->form(); - - $form['user[name]'] = $name; - $form['user[email]'] = $email; - $form['user[username]'] = $username; - $form['user[password][password]'] = $form['user[password][confirm_password]'] = $password; - $form['user[enabled]']->tick(); - $form['user[roles]']->select('ROLE_ADMIN'); - - if (is_null($expiration)) { - unset($form['user[expirationDate]']); - } else { - $form['user[expirationDate][day]']->select(date('j', $expiration)); - $form['user[expirationDate][month]']->select(date('n', $expiration)); - $form['user[expirationDate][year]']->select(date('Y', $expiration)); - } - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - /** @var $user \ServerGrove\KbBundle\Document\User */ - $user = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:User')->findOneByUsername($username); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\User', $user); - $this->assertEquals($name, $user->getName()); - $this->assertEquals($email, $user->getEmail()); - $this->assertEquals($username, $user->getUsername()); - - if (is_null($expiration)) { - $this->assertNull($user->getExpirationDate()); - } else { - $this->assertEquals(date('Y-m-d', $expiration), $user->getExpirationDate()->format('Y-m-d')); - } - } - - public function getUsersData() - { - return array( - array('Test user', 'test@example.com', 'testuser', 'mytestpassword', null), - array('Test user', 'test@example.com', 'testuser', 'mytestpassword', mktime(14, 21, 0, date('m') + 1, date('d') + 5)) - ); - } - - /** - * @depends testNewAction - */ - public function testCreateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_users_create')); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } - - public function testAdminUsersEdit() - { - $username = 'admin'; - $client = $this->getClient(); - - /** @var $crawler \Symfony\Component\DomCrawler\Crawler */ - $crawler = $client->request('GET', $this->generateUrl('sgkb_admin_users_edit', array('username' => $username))); - - $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - $this->assertEquals('User edit', $crawler->filter('form legend')->first()->text(), $this->getErrorMessage($client)); - $this->assertGreaterThan(0, $crawler->filter('form')->count()); - - $form = $crawler->selectButton('Save')->form(); - $form['user[name]'] = $name = 'New name '.md5(microtime(true)); - - $client->submit($form); - $this->assertEquals(302, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - - /** @var $user \ServerGrove\KbBundle\Document\User */ - $user = $this->getDocumentManager()->getRepository('ServerGroveKbBundle:User')->findOneByUsername($username); - $this->assertInstanceOf('ServerGrove\KbBundle\Document\User', $user); - $this->assertEquals($name, $user->getName()); - $this->assertEquals($username, $user->getUsername()); - } - - public function testUpdateAction() - { - $client = $this->getClient(); - - $client->request('POST', $this->generateUrl('sgkb_admin_users_update', array('username' => 'admin'))); - $this->assertEquals(400, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client)); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/ArticlesControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/ArticlesControllerTest.php deleted file mode 100644 index 74b942d..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/ArticlesControllerTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - */ -class ArticlesControllerTest extends ControllerTestCase -{ - - public function testArticleView() - { - $crawler = $this->validateArticleAndGetCrawler(); - - $this->assertGreaterThan(0, $crawler->filter('h2.article-title')->count()); - $this->assertEquals('The title of my article', $crawler->filter('h2.article-title')->text()); - $this->assertGreaterThan(0, $crawler->filter('.article-content h1')->count()); - $this->assertEquals('Header 1', $crawler->filter('.article-content h1')->text()); - - if ($this->getClient()->getContainer()->getParameter('server_grove_kb.article.enable_related_urls')) { - $this->assertGreaterThan(0, $crawler->filter('ul.related-urls li')->count()); - } - } - - /** - * @param string $locale - * @param string $title - * - * @dataProvider getTestData - */ - public function testArticleViewWithLocale($locale, $title) - { - $client = $this->getClient(); - $crawler = $client->request('GET', '/'.$locale.'/categories/test/articles/the-title-of-my-article.html'); - $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertGreaterThan(0, $crawler->filter('#doccontent h2.article-title')->count()); - $this->assertEquals($title, $crawler->filter('#doccontent h2.article-title')->first()->text(), $crawler->filter('#doccontent h2.article-title')->first()->text()); - } - - public function getTestData() - { - return array( - array('en', 'The title of my article'), - array('es', 'El título de mi artículo'), - array('pt', 'The title of my article(Needs to be translated by Google)'), // @TODO - ); - } - - /** - * @return \Symfony\Component\DomCrawler\Crawler - */ - private function validateArticleAndGetCrawler() - { - /* @var $crawler \Symfony\Component\DomCrawler\Crawler */ - $crawler = $this->getClient()->request('GET', '/'); - - if (0 == $crawler->filter($selector = '.left-nav ul li a:contains("Test")')->count()) { - $this->markTestSkipped('Missing category for article'); - } - - $link = $crawler->filter($selector)->first()->link(); - $crawler = $this->getClient()->click($link); - - if (0 == $crawler->filter($selector = '.articles a:contains("The title of my article")')->count()) { - $this->markTestSkipped('Missing article'); - } - - $link = $crawler->filter($selector)->first()->link(); - $crawler = $this->getClient()->click($link); - - return $crawler; - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/CategoryControllerTest.php b/src/ServerGrove/KbBundle/Tests/Controller/CategoryControllerTest.php deleted file mode 100644 index eea7fdf..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/CategoryControllerTest.php +++ /dev/null @@ -1,32 +0,0 @@ -getClient()->request('GET', '/'); - $this->assertGreaterThan(0, $crawler->filter('h1:contains("Knowledge Base")')->count(), 'There is no header for KB'); - $this->assertGreaterThan(0, $crawler->filter('.left-nav ul li a:contains("Test")')->count()); - - $link = $crawler->filter('.left-nav ul li a:contains("Test")')->first()->link(); - $crawler = $this->getClient()->click($link); - $this->assertGreaterThan(0, $crawler->filter('h1:contains("Knowledge Base")')->count(), 'There is no header for KB'); - $this->assertGreaterThan(0, $crawler->filter('.breadcrumb a:contains("Test")')->count(), 'There is no breadcrumb for Test category'); - $this->assertEquals(0, $crawler->filter('.breadcrumb a:contains("Child")')->count(), 'There are some breadcrumbs for Child category'); - - $this->assertGreaterThan(0, $crawler->filter('.subcategories a:contains("Child")')->count()); - $this->assertGreaterThan(0, $crawler->filter('.articles a:contains("The title of my article")')->count()); - - $link = $crawler->filter('.subcategories a:contains("Child")')->first()->link(); - $crawler = $this->getClient()->click($link); - $this->assertGreaterThan(0, $crawler->filter('h1:contains("Knowledge Base")')->count(), 'There is no header for KB'); - $this->assertGreaterThan(0, $crawler->filter('.breadcrumb a:contains("Test")')->count(), 'There is no breadcrumb for Test category'); - $this->assertGreaterThan(0, $crawler->filter('.breadcrumb a:contains("Child")')->count(), 'There is no breadcrumb for Child category'); - $this->assertEquals(0, $crawler->filter('.subcategories a')->count()); - $this->assertGreaterThan(0, $crawler->filter('.articles li')->count()); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Controller/ControllerTestCase.php b/src/ServerGrove/KbBundle/Tests/Controller/ControllerTestCase.php deleted file mode 100644 index f698fdc..0000000 --- a/src/ServerGrove/KbBundle/Tests/Controller/ControllerTestCase.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -class ControllerTestCase extends WebTestCase -{ - /** - * @param string $route - * @param array $parameters - * @param bool $absolute - * - * @return mixed - */ - protected function generateUrl($route, $parameters = array(), $absolute = false) - { - return $this->getContainer()->get('router')->generate($route, $parameters, $absolute); - } - - /** - * @param \Symfony\Bundle\FrameworkBundle\Client $client - * - * @return string - */ - protected function getErrorMessage(Client $client) - { - /** @var $profile \Symfony\Component\HttpKernel\Profiler\Profile */ - $profile = $client->getProfile(); - if (!$profile) { - return ''; - } - - /** @var $exception \Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector */ - $exception = $profile->getCollector('exception'); - - if (!$exception->hasException()) { - return ''; - } - - $arrayTrace = array(); - - foreach (array_slice($exception->getTrace(), 0, 10) as $position => $traceLine) { - if (isset($traceLine['class'])) { - $arrayTrace[] = sprintf('[%d] %s(%d) %s%s%s(%s)', - $position, - $traceLine['file'], - $traceLine['line'], - $traceLine['short_class'], - $traceLine['type'], - $traceLine['function'], - isset($traceLine['args']) ? implode(', ', array_map(function($v) { - switch ($v[0]) { - case 'array': - return 'array('.count($v[1]).')'; - case 'object': - return $v[1]; - default: - return $v[1]; - - } - }, $traceLine['args'])) : '' - ); - } - } - - if (count($arrayTrace) < count($exception->getTrace())) { - $arrayTrace[] = '...'; - } - - return $exception->getMessage().PHP_EOL.PHP_EOL.implode(PHP_EOL, $arrayTrace).PHP_EOL; - } -} diff --git a/src/ServerGrove/KbBundle/Tests/Security/UserProviderTest.php b/src/ServerGrove/KbBundle/Tests/Security/UserProviderTest.php deleted file mode 100644 index c95aa49..0000000 --- a/src/ServerGrove/KbBundle/Tests/Security/UserProviderTest.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -class UserProviderTest extends WebTestCase -{ - public function testLoadByUsername() - { - $provider = new UserProvider($this->getDocumentManager()); - - $user = $provider->loadUserByUsername('admin'); - - $this->assertInstanceOf('ServerGrove\KbBundle\Document\User', $user); - $this->assertEquals('admin', $user->getUsername()); - } - - /** - * @expectedException Symfony\Component\Security\Core\Exception\UsernameNotFoundException - */ - public function testLoadByUsernameException() - { - $provider = new UserProvider($this->getDocumentManager()); - - $provider->loadUserByUsername('non-existent'); - } - - public function testRefreshUser() - { - $provider = new UserProvider($dm = $this->getDocumentManager()); - - $user = $provider->refreshUser($dm->getRepository('ServerGroveKbBundle:User')->find('/users/admin')); - - $this->assertInstanceOf('ServerGrove\KbBundle\Document\User', $user); - $this->assertEquals('admin', $user->getUsername()); - } - - /** - * @expectedException Symfony\Component\Security\Core\Exception\UnsupportedUserException - */ - public function testRefreshUserException() - { - $provider = new UserProvider($dm = $this->getDocumentManager()); - - $user = new User(); - $user->setUsername('wrongusername'); - - $provider->refreshUser($user); - } -} diff --git a/src/ServerGrove/KbBundle/Tests/WebTestCase.php b/src/ServerGrove/KbBundle/Tests/WebTestCase.php deleted file mode 100644 index 2427d24..0000000 --- a/src/ServerGrove/KbBundle/Tests/WebTestCase.php +++ /dev/null @@ -1,118 +0,0 @@ - - */ -class WebTestCase extends BaseTestCase -{ - /** - * @var \Symfony\Bundle\FrameworkBundle\Client - */ - private $client; - - /** - * @var Application - */ - private $application; - - /** - * @return \Symfony\Bundle\FrameworkBundle\Client - */ - protected function getClient() - { - return $this->client; - } - - /** - * - */ - protected function setUp() - { - parent::setUp(); - - $this->client = static::createClient(); - - $this->setUpSchemas(); - } - - /** - * @param string $service - * - * @return mixed - */ - protected function get($service) - { - return $this->getContainer()->get($service); - } - - /** - * @return \Symfony\Component\DependencyInjection\ContainerInterface - * @throws \RuntimeException - */ - protected function getContainer() - { - if (!static::$kernel) { - throw new \RuntimeException('There is no Kernel instance'); - } - - return static::$kernel->getContainer(); - } - - /** - * @return \Doctrine\ODM\PHPCR\DocumentManager - */ - protected function getDocumentManager() - { - return $this->get('doctrine_phpcr.odm.document_manager'); - } - - /** - * Loads all the necessary data for tests - */ - private function setupSchemas() - { - $input = $this->getInputDefinition(array('--fixtures' => __DIR__.'/../DataFixtures/PHPCR')); - $input->setInteractive(false); - - $this - ->getApplication() - ->find('doctrine:phpcr:fixtures:load') - ->run($input, new NullOutput()); - } - - /** - * @param array $def - * - * @return \Symfony\Component\Console\Input\ArrayInput - */ - private function getInputDefinition(array $def = array()) - { - return new ArrayInput(array_merge(array('--env' => 'test', '-v'), $def)); - } - - /** - * @return \Symfony\Bundle\FrameworkBundle\Console\Application - */ - private function getApplication() - { - if (!$this->application) { - $this->application = new Application(static::$kernel); - - foreach (static::$kernel->getBundles() as $bundle) { - $bundle->registerCommands($this->application); - } - } - - return $this->application; - } -} diff --git a/src/ServerGrove/KbBundle/Twig/ArticleExtension.php b/src/ServerGrove/KbBundle/Twig/ArticleExtension.php deleted file mode 100644 index c9012c2..0000000 --- a/src/ServerGrove/KbBundle/Twig/ArticleExtension.php +++ /dev/null @@ -1,134 +0,0 @@ - - */ -class ArticleExtension extends \Twig_Extension -{ - /** - * @var \Doctrine\ODM\PHPCR\DocumentManager - */ - private $manager; - - /** - * @var string - */ - private $template; - - /** - * @var \Twig_Template - */ - private $twig; - - /** - * @param \Doctrine\ODM\PHPCR\DocumentManager $manager - * @param array $locales - * @param string $template - */ - public function __construct(DocumentManager $manager, array $locales, $template) - { - $this->manager = $manager; - $this->locales = $locales; - $this->template = $template; - } - - public function initRuntime(\Twig_Environment $environment) - { - parent::initRuntime($environment); - - $this->twig = $environment->loadTemplate($this->template); - } - - public function getTests() - { - return array('active' => new \Twig_Test_Method($this, 'hasLocaleActive')); - } - - public function getFunctions() - { - return array( - 'article_locale' => new \Twig_Function_Method($this, 'renderArticleLocale', array('is_safe' => array('html'))), - 'article_locales' => new \Twig_Function_Method($this, 'renderArticleLocales', array('is_safe' => array('html'))) - ); - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - * @param string $locale - * @return string - */ - public function renderArticleLocale(Article $article, $locale) - { - try { - $active = $this - ->manager - ->findTranslation(get_class($article), $article->getId(), $locale, false) - ->getIsActive(); - } catch (\InvalidArgumentException $e) { - $active = false; - } - - $this->manager->refresh($article); - - return $this->twig->renderBlock('article_locale', array( - 'active' => $active, - 'locale' => $locale, - 'locale_name' => Locale::getDisplayLanguage($locale) - )); - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - * @return string - */ - public function renderArticleLocales(Article $article) - { - return $this->twig->renderBlock('article_locales', array('article' => $article, 'locales'=> $this->locales)); - } - - /** - * @param \ServerGrove\KbBundle\Document\Article $article - * @return mixed - */ - public function hasLocaleActive(Article $article) - { - $locales = $this->getManager()->getLocalesFor($article); - - do { - $tmp = $this->getManager()->findTranslation(get_class($article), $article->getId(), current($locales)); - $active = $tmp->getIsActive(); - } while (!$active && next($locales)); - - $this->getManager()->refresh($article); - - return $active; - } - - /** - * Returns the name of the extension. - * - * @return string The extension name - */ - public function getName() - { - return 'sgkb_article'; - } - - /** - * Returns the value of manager - * - * @return \Doctrine\ODM\PHPCR\DocumentManager - */ - private function getManager() - { - return $this->manager; - } -} diff --git a/src/ServerGrove/KbBundle/Twig/TextExtension.php b/src/ServerGrove/KbBundle/Twig/TextExtension.php deleted file mode 100644 index 84e3114..0000000 --- a/src/ServerGrove/KbBundle/Twig/TextExtension.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class TextExtension extends \Twig_Extension -{ - - /** @var \Symfony\Component\Translation\TranslatorInterface */ - private $translator; - - /** - * @param \Symfony\Component\Translation\TranslatorInterface $translator - */ - public function __construct(TranslatorInterface $translator) - { - $this->translator = $translator; - } - - public function getFilters() - { - return array( - 'booltostr' => new \Twig_Filter_Method($this, 'booltostr') - ); - } - - public function booltostr($bool) - { - $bool = (bool) $bool; - - return $this->translator->trans($bool ? 'Yes' : 'No'); - } - - /** - * Returns the name of the extension. - * - * @return string The extension name - */ - public function getName() - { - return 'sgkb_text'; - } -} diff --git a/src/ServerGrove/KbBundle/Util/MarkdownParser.php b/src/ServerGrove/KbBundle/Util/MarkdownParser.php deleted file mode 100644 index fa5079c..0000000 --- a/src/ServerGrove/KbBundle/Util/MarkdownParser.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class MarkdownParser extends BaseParser -{ - public function doFencedCodeBlocks($text) - { - $text = preg_replace_callback('{ - (?:\n|\A) - # 1: Opening marker - ( - `{3,} # Marker: three tilde or more. - ) - [ ]* \n # Whitespace and newline following marker. - - # 2: Content - ( - (?> - (?!\1 [ ]* \n) # Not a closing marker. - .*\n+ - )+ - ) - - # Closing marker. - \1 [ ]* \n - }xm', - array(&$this, '_doFencedCodeBlocks_callback'), $text); - - return parent::doFencedCodeBlocks($text); - } -} diff --git a/src/ServerGrove/KbBundle/Util/Sluggable.php b/src/ServerGrove/KbBundle/Util/Sluggable.php deleted file mode 100644 index 5f753c3..0000000 --- a/src/ServerGrove/KbBundle/Util/Sluggable.php +++ /dev/null @@ -1,213 +0,0 @@ - - */ -class Sluggable -{ - - /** - * Check if a string has utf7 characters in it - * - * By bmorel at ssi dot fr - * - * @param string $string - * @return boolean $bool - */ - public static function seemsUtf8($string) - { - for ($i = 0; $i < strlen($string); $i++) { - if (ord($string[$i]) < 0x80) continue; # 0bbbbbbb - elseif ((ord($string[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb - elseif ((ord($string[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb - elseif ((ord($string[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb - elseif ((ord($string[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb - elseif ((ord($string[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b - else return false; # Does not match any model - for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ? - if ((++$i == strlen($string)) || ((ord($string[$i]) & 0xC0) != 0x80)) - return false; - } - } - - return true; - } - - /** - * Remove any illegal characters, accents, etc. - * - * @param string $string String to unaccent - * @return string $string Unaccented string - */ - public static function unaccent($string) - { - if ( ! preg_match('/[\x80-\xff]/', $string) ) { - return $string; - } - - if (self::seemsUtf8($string)) { - $chars = array( - // Decompositions for Latin-1 Supplement - chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', - chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', - chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', - chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', - chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', - chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', - chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', - chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', - chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', - chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', - chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', - chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', - chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', - chr(195).chr(159) => 's', chr(195).chr(160) => 'a', - chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', - chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', - chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', - chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', - chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', - chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', - chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', - chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', - chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', - chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', - chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', - chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', - chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', - chr(195).chr(191) => 'y', - // Decompositions for Latin Extended-A - chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', - chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', - chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', - chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', - chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', - chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', - chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', - chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', - chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', - chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', - chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', - chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', - chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', - chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', - chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', - chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', - chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', - chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', - chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', - chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', - chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', - chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', - chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', - chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', - chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', - chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', - chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', - chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', - chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', - chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', - chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', - chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', - chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', - chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', - chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', - chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', - chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', - chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', - chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', - chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', - chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', - chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', - chr(197).chr(148) => 'R', chr(197).chr(149) => 'r', - chr(197).chr(150) => 'R', chr(197).chr(151) => 'r', - chr(197).chr(152) => 'R', chr(197).chr(153) => 'r', - chr(197).chr(154) => 'S', chr(197).chr(155) => 's', - chr(197).chr(156) => 'S', chr(197).chr(157) => 's', - chr(197).chr(158) => 'S', chr(197).chr(159) => 's', - chr(197).chr(160) => 'S', chr(197).chr(161) => 's', - chr(197).chr(162) => 'T', chr(197).chr(163) => 't', - chr(197).chr(164) => 'T', chr(197).chr(165) => 't', - chr(197).chr(166) => 'T', chr(197).chr(167) => 't', - chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', - chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', - chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', - chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', - chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', - chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', - chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', - chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', - chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', - chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', - chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', - chr(197).chr(190) => 'z', chr(197).chr(191) => 's', - // Euro Sign - chr(226).chr(130).chr(172) => 'E', - // GBP (Pound) Sign - chr(194).chr(163) => '', - 'Ä' => 'Ae', 'ä' => 'ae', 'Ü' => 'Ue', 'ü' => 'ue', - 'Ö' => 'Oe', 'ö' => 'oe', 'ß' => 'ss', - // Norwegian characters - 'Ã…'=>'Aa','Æ'=>'Ae','Ø'=>'O','æ'=>'a','ø'=>'o','Ã¥'=>'aa' - ); - - $string = strtr($string, $chars); - } else { - // Assume ISO-8859-1 if not UTF-8 - $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158) - .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194) - .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202) - .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210) - .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218) - .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227) - .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235) - .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243) - .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251) - .chr(252).chr(253).chr(255); - - $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy"; - - $string = strtr($string, $chars['in'], $chars['out']); - $doubleChars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); - $doubleChars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); - $string = str_replace($doubleChars['in'], $doubleChars['out'], $string); - } - - return $string; - } - - /** - * Convert any passed string to a url friendly string. Converts 'My first blog post' to 'my-first-blog-post' - * - * @param string $text Text to urlize - * @return string $text Urlized text - */ - public static function urlize($text) - { - // Remove all non url friendly characters with the unaccent function - $text = self::unaccent($text); - - if (function_exists('mb_strtolower')) { - $text = mb_strtolower($text); - } else { - $text = strtolower($text); - } - - // Remove all none word characters - $text = preg_replace('/\W/', ' ', $text); - - // More stripping. Replace spaces with dashes - $text = strtolower(preg_replace('/[^A-Z^a-z^0-9^\/]+/', '-', - preg_replace('/([a-z\d])([A-Z])/', '\1_\2', - preg_replace('/([A-Z]+)([A-Z][a-z])/', '\1_\2', - preg_replace('/::/', '/', $text))))); - - return trim($text, '-'); - } -}