author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
95,180
23.10.2018 16:58:51
-7,200
e729bcf6879289aba5fb1ace05e0fa906b52251c
added upload progress
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Editor/Image.vue", "new_path": "assets/js/Components/Editor/Image.vue", "diff": "</button>\n</div>\n</div>\n+ <div class=\"progress mt-3\" v-if=\"progress > 0\">\n+ <div\n+ class=\"progress-bar progress-bar-striped progress-bar-animated\"\n+ role=\"progressbar\"\n+ :aria-valuenow=\"progress\"\n+ aria-valuemin=\"0\"\n+ aria-valuemax=\"100\"\n+ :style=\"`width: ${progress}%`\">\n+ </div>\n+ </div>\n</div>\n<div class=\"col-4\">\n<label>Preview:</label>\n@@ -77,6 +87,7 @@ export default {\npreviewImage: null,\nisDragging: false,\ndragCount: 0,\n+ progress: 0\n};\n},\nmethods: {\n@@ -105,17 +116,25 @@ export default {\nuploadFile(file){\nconst thumbnailParams = this.thumbnail.split('?').pop();\nconst fd = new FormData();\n- fd.append('image', file);\n- this.$axios.post(this.directory, fd, {\n+ const config = {\n+ onUploadProgress: (progressEvent) => {\n+ const percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total )\n+ this.progress = percentCompleted;\n+ },\nheaders: {\n'Content-Type': 'multipart/form-data'\n}\n- }).then(res => {\n+ };\n+ fd.append('image', file);\n+ this.$axios.post(this.directory, fd, config)\n+ .then(res => {\nthis.val = res.data;\nthis.previewImage = `/thumbs/${res.data}?${thumbnailParams}`;\n+ this.progress = 0;\n})\n.catch(err => {\nconsole.log(err);\n+ this.progress = 0;\n})\n},\n},\n" } ]
PHP
MIT License
bolt/core
added upload progress
95,144
27.10.2018 07:52:35
-7,200
0b6feda4372687e54221935fdd0127a2dde589f5
Refactoring routing
[ { "change_type": "MODIFY", "old_path": "config/routes.yaml", "new_path": "config/routes.yaml", "diff": "-# These lines define a route using YAML configuration. The controller used by\n-# the route (FrameworkBundle:Template:template) is a convenient shortcut when\n-# the template can be rendered without executing any logic in your own controller.\n-# See https://symfony.com/doc/current/cookbook/templating/render_without_controller.html\n-\n-#homepage:\n-# path: /{_locale}\n-# controller: Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController::templateAction\n-# requirements:\n-# _locale: '%app_locales%'\n-# defaults:\n-# template: default/homepage.twig\n-# _locale: '%locale%'\n-#\n+# This file defines routes for the frontend and control panel of your Bolt\n+# website. Check below for examples, or read the documentation at\n+# https://docs.bolt.cm/configuration/routing\n+\n+# ------------------------------------------------------------------------------\n+# Place your own routes here, that have a HIGHER priority than the default routes.\n+\n+\n+\n+# ------------------------------------------------------------------------------\n+# These are the routes defining the default behaviour of Bolt's frontend.\n+# Changing these might give unexpected results or even break your website. If\n+# possible, only add NEW routes above or below these.\n+frontend:\n+ resource: '../src/Controller/Frontend/'\n+ prefix: /\n+\n+# ------------------------------------------------------------------------------\n+# Place your own routes here, that have a LOWER priority than the default routes.\n+\n+\n+\n+# ------------------------------------------------------------------------------\n+# These are the routes defining the Bolt Control Panel (\"backend\"). It's common\n+# to modify the `prefix` so the Control Panel can be accessed at a custom URL.\n+control_panel:\n+ resource: '../src/Controller/Bolt/'\n+ prefix: /bolt\n+\n" }, { "change_type": "MODIFY", "old_path": "config/routes/annotations.yaml", "new_path": "config/routes/annotations.yaml", "diff": "+\n+# All routes, used by Bolt: Control Panel, Async and Thumbs, unless overridden\n+# in `../routing.yml` or another location\ncontrollers:\nresource: '../src/Controller/'\ntype: annotation\n-#\n-#controllers_with_locale:\n-# resource: '../src/Controller/'\n-# type: annotation\n-# prefix: /{_locale}\n-# requirements:\n-# _locale: '%app_locales%'\n-# defaults:\n-# _locale: '%locale%'\n+\n" }, { "change_type": "MODIFY", "old_path": "src/Content/MediaFactory.php", "new_path": "src/Content/MediaFactory.php", "diff": "<?php\ndeclare(strict_types=1);\n-/**\n- * @author Bob den Otter <bobdenotter@gmail.com>\n- */\nnamespace Bolt\\Content;\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Async/News.php", "new_path": "src/Controller/Async/News.php", "diff": "@@ -35,7 +35,7 @@ final class News\n* @throws \\GuzzleHttp\\Exception\\GuzzleException\n*\n* @return JsonResponse\n- * @Route(\"/async/news\", name=\"bolt_news\")\n+ * @Route(\"/news\", name=\"bolt_news\")\n*/\npublic function dashboardNews(Request $request)\n{\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Async/Uploader.php", "new_path": "src/Controller/Async/Uploader.php", "diff": "@@ -39,7 +39,7 @@ class Uploader\n}\n/**\n- * @Route(\"/async/upload\", name=\"bolt_upload_post\", methods={\"POST\"})\n+ * @Route(\"/upload\", name=\"bolt_upload_post\", methods={\"POST\"})\n*/\npublic function upload(Request $request)\n{\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/ContentListingController.php", "new_path": "src/Controller/Bolt/ContentListingController.php", "diff": "@@ -15,7 +15,6 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\n/**\n* Class ContentListingController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass ContentListingController extends BaseController\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/BackendController.php", "new_path": "src/Controller/Bolt/DashboardController.php", "diff": "@@ -14,10 +14,9 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\n/**\n* Class BackendController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\n-class BackendController extends BaseController\n+class DashboardController extends BaseController\n{\n/**\n* @Route(\"/\", name=\"bolt_dashboard\")\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/EditFileController.php", "new_path": "src/Controller/Bolt/EditFileController.php", "diff": "@@ -20,7 +20,6 @@ use Webmozart\\PathUtil\\Path;\n/**\n* Class EditFileController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass EditFileController extends BaseController\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/EditMediaController.php", "new_path": "src/Controller/Bolt/EditMediaController.php", "diff": "<?php\ndeclare(strict_types=1);\n-/**\n- * @author Bob den Otter <bobdenotter@gmail.com>\n- */\nnamespace Bolt\\Controller\\Bolt;\n@@ -29,7 +26,6 @@ use Webmozart\\PathUtil\\Path;\n/**\n* Class EditMediaController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass EditMediaController extends BaseController\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/EditRecordController.php", "new_path": "src/Controller/Bolt/EditRecordController.php", "diff": "@@ -23,7 +23,6 @@ use Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\n/**\n* Class EditRecordController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass EditRecordController extends BaseController\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/FinderController.php", "new_path": "src/Controller/Bolt/FinderController.php", "diff": "@@ -18,7 +18,6 @@ use Webmozart\\PathUtil\\Path;\n/**\n* Class EditRecordController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass FinderController extends BaseController\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/MediaController.php", "new_path": "src/Controller/Bolt/MediaController.php", "diff": "@@ -20,7 +20,6 @@ use Webmozart\\PathUtil\\Path;\n/**\n* Class MediaController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass MediaController extends BaseController\n" }, { "change_type": "RENAME", "old_path": "src/Controller/SecurityController.php", "new_path": "src/Controller/Bolt/SecurityController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller;\n+namespace Bolt\\Controller\\Bolt;\n+use Bolt\\Controller\\BaseController;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils;\n@@ -11,7 +12,7 @@ use Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils;\nclass SecurityController extends BaseController\n{\n/**\n- * @Route(\"/bolt/login\", name=\"bolt_login\")\n+ * @Route(\"/login\", name=\"bolt_login\")\n*/\npublic function login(AuthenticationUtils $authenticationUtils): Response\n{\n@@ -33,7 +34,7 @@ class SecurityController extends BaseController\n* But, this will never be executed. Symfony will intercept this first\n* and handle the logout automatically. See logout in config/packages/security.yaml\n*\n- * @Route(\"/bolt/logout\", name=\"bolt_logout\")\n+ * @Route(\"/logout\", name=\"bolt_logout\")\n*/\npublic function logout(): void\n{\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Bolt/UserController.php", "new_path": "src/Controller/Bolt/UserController.php", "diff": "@@ -16,7 +16,6 @@ use Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n/**\n* Class UserController.\n*\n- * @Route(\"/bolt\")\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass UserController extends BaseController\n" }, { "change_type": "RENAME", "old_path": "src/Controller/FrontendController.php", "new_path": "src/Controller/Frontend/Controller.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller;\n+namespace Bolt\\Controller\\Frontend;\nuse Bolt\\Content\\ContentTypeFactory;\n+use Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Repository\\FieldRepository;\n@@ -12,7 +13,7 @@ use Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n-class FrontendController extends BaseController\n+class Controller extends BaseController\n{\n/**\n* @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n" } ]
PHP
MIT License
bolt/core
Refactoring routing
95,144
27.10.2018 08:00:23
-7,200
f9d75cac942979a6c966ec89b35324faf50b80c0
Renaming Namespace
[ { "change_type": "MODIFY", "old_path": "config/routes.yaml", "new_path": "config/routes.yaml", "diff": "@@ -24,6 +24,6 @@ frontend:\n# These are the routes defining the Bolt Control Panel (\"backend\"). It's common\n# to modify the `prefix` so the Control Panel can be accessed at a custom URL.\ncontrol_panel:\n- resource: '../src/Controller/Bolt/'\n+ resource: '../src/Controller/Backend/'\nprefix: /bolt\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/DashboardController.php", "new_path": "src/Controller/Backend/DashboardController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\n@@ -12,8 +12,6 @@ use Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n/**\n- * Class BackendController.\n- *\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\nclass DashboardController extends BaseController\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/EditFileController.php", "new_path": "src/Controller/Backend/EditFileController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/EditMediaController.php", "new_path": "src/Controller/Backend/EditMediaController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\Areas;\nuse Bolt\\Configuration\\Config;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/EditRecordController.php", "new_path": "src/Controller/Backend/EditRecordController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Content\\FieldFactory;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/FinderController.php", "new_path": "src/Controller/Backend/FinderController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Common\\Str;\nuse Bolt\\Configuration\\Areas;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/ContentListingController.php", "new_path": "src/Controller/Backend/ListingController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Content\\ContentTypeFactory;\nuse Bolt\\Controller\\BaseController;\n@@ -17,7 +17,7 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\n*\n* @Security(\"has_role('ROLE_ADMIN')\")\n*/\n-class ContentListingController extends BaseController\n+class ListingController extends BaseController\n{\n/**\n* @Route(\"/content/{contenttype}\", name=\"bolt_contentlisting\")\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/MediaController.php", "new_path": "src/Controller/Backend/MediaController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\Areas;\nuse Bolt\\Configuration\\Config;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/SecurityController.php", "new_path": "src/Controller/Backend/SecurityController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Symfony\\Component\\HttpFoundation\\Response;\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Bolt/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Controller\\Bolt;\n+namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Form\\ChangePasswordType;\n" } ]
PHP
MIT License
bolt/core
Renaming Namespace
95,144
27.10.2018 16:15:09
-7,200
127740f8553df41d564ffd0d0fd92a8e49c7feda
Working on routing.
[ { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Frontend/DetailController.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Frontend;\n+\n+use Bolt\\Controller\\BaseController;\n+use Bolt\\Repository\\ContentRepository;\n+use Bolt\\Repository\\FieldRepository;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class DetailController extends BaseController\n+{\n+ /**\n+ * @Route(\"/{contenttypeslug}/{slug}\", methods={\"GET\"}, name=\"detail\", requirements={\"contenttypeslug\"=\"%bolt.requirement.contenttypes%\"})\n+ *\n+ * @param ContentRepository $contentRepository\n+ * @param FieldRepository $fieldRepository\n+ * @param null $slug\n+ *\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n+ * @return Response\n+ */\n+ public function record(ContentRepository $contentRepository, FieldRepository $fieldRepository, string $contenttypeslug, string $slug): Response\n+ {\n+ if (!is_numeric($slug)) {\n+ $field = $fieldRepository->findOneBySlug($slug);\n+ $record = $field->getContent();\n+ } else {\n+ $record = $contentRepository->findOneBy(['id' => $slug]);\n+ }\n+\n+ $recordSlug = $record->getDefinition()['singular_slug'];\n+\n+ $context = [\n+ 'record' => $record,\n+ $recordSlug => $record,\n+ ];\n+\n+ $templates = $this->templateChooser->record($record);\n+\n+ return $this->renderTemplate($templates, $context);\n+ }\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Frontend/HomepageController.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Frontend;\n+\n+use Bolt\\Controller\\BaseController;\n+use Bolt\\Entity\\Content;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class HomepageController extends BaseController\n+{\n+ /**\n+ * @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n+ */\n+ public function homepage(): Response\n+ {\n+ $homepage = $this->getOption('theme/homepage') ?: $this->getOption('general/homepage');\n+\n+ // todo get $homepage content.\n+\n+ $templates = $this->templateChooser->homepage();\n+\n+ return $this->renderTemplate($templates, []);\n+ }\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Frontend/ListingController.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Frontend;\n+\n+use Bolt\\Content\\ContentTypeFactory;\n+use Bolt\\Controller\\BaseController;\n+use Bolt\\Entity\\Content;\n+use Bolt\\Repository\\ContentRepository;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class ListingController extends BaseController\n+{\n+ /**\n+ * @Route(\n+ * \"/{contenttypeslug}\",\n+ * methods={\"GET\"},\n+ * name=\"listing\"\n+ * )\n+ *\n+ * @param ContentRepository $content\n+ * @param Request $request\n+ *\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n+ * @return Response\n+ */\n+ public function contentListing(ContentRepository $content, Request $request, string $contenttypeslug): Response\n+ {\n+ $page = (int) $request->query->get('page', 1);\n+\n+ /** @var Content $records */\n+ $records = $content->findAll($page);\n+\n+ $contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n+\n+ $templates = $this->templateChooser->listing($contenttype);\n+\n+ return $this->renderTemplate($templates, ['records' => $records]);\n+ }\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Frontend/PreviewController.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Frontend;\n+\n+use Bolt\\Controller\\BaseController;\n+use Bolt\\Entity\\Content;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class PreviewController extends BaseController\n+{\n+ /**\n+ * @Route(\"/preview\", methods={\"GET\", \"POST\"}, name=\"preview\")\n+ */\n+ public function preview(): Response\n+ {\n+ $homepage = $this->getOption('theme/homepage') ?: $this->getOption('general/homepage');\n+\n+ // todo get $homepage content.\n+\n+ $templates = $this->templateChooser->homepage();\n+\n+ return $this->renderTemplate($templates, []);\n+ }\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Frontend/SearchController.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Frontend;\n+\n+use Bolt\\Content\\ContentTypeFactory;\n+use Bolt\\Controller\\BaseController;\n+use Bolt\\Entity\\Content;\n+use Bolt\\Repository\\ContentRepository;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class SearchController extends BaseController\n+{\n+ /**\n+ * @Route(\"/search\", methods={\"GET\", \"POST\"}, name=\"search\")\n+ *\n+ * @param ContentRepository $content\n+ * @param Request $request\n+ *\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n+ * @return Response\n+ */\n+ public function search(ContentRepository $content, Request $request): Response\n+ {\n+ $page = (int) $request->query->get('page', 1);\n+\n+ /** @var Content $records */\n+ $records = $content->findAll($page);\n+\n+ $contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n+\n+ $templates = $this->templateChooser->listing($contenttype);\n+\n+ return $this->renderTemplate($templates, ['records' => $records]);\n+ }\n+}\n" }, { "change_type": "RENAME", "old_path": "src/Controller/Frontend/Controller.php", "new_path": "src/Controller/Frontend/TaxonomyController.php", "diff": "@@ -13,24 +13,10 @@ use Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n-class Controller extends BaseController\n+class TaxonomyController extends BaseController\n{\n/**\n- * @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n- */\n- public function homepage(): Response\n- {\n- $homepage = $this->getOption('theme/homepage') ?: $this->getOption('general/homepage');\n-\n- // todo get $homepage content.\n-\n- $templates = $this->templateChooser->homepage();\n-\n- return $this->renderTemplate($templates, []);\n- }\n-\n- /**\n- * @Route(\"/{contenttypeslug}\", methods={\"GET\"}, name=\"listing\")\n+ * @Route(\"/{taxonomyslug}/{slug}\", methods={\"GET\"}, name=\"taxonomy\", requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\"})\n*\n* @param ContentRepository $content\n* @param Request $request\n@@ -46,7 +32,7 @@ class Controller extends BaseController\n$page = (int) $request->query->get('page', 1);\n/** @var Content $records */\n- $records = $content->findLatest($page);\n+ $records = $content->findAll($page);\n$contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n" }, { "change_type": "MODIFY", "old_path": "src/Kernel.php", "new_path": "src/Kernel.php", "diff": "@@ -107,10 +107,9 @@ class Kernel extends BaseKernel\nreturn $result;\n}\n-\n/**\n* Set the ContentType requirements that are used in Routing.\n- * Note: this functionality is partially duplicated in \\Bolt\\Configuration\\Config\n+ * Note: this functionality is partially duplicated in \\Bolt\\Configuration\\Config.\n*\n* @throws \\Exception\n*/\n@@ -128,7 +127,7 @@ class Kernel extends BaseKernel\n/**\n* Set the Taxonomy requirements that are used in Routing.\n- * Note: this functionality is partially duplicated in \\Bolt\\Configuration\\Config\n+ * Note: this functionality is partially duplicated in \\Bolt\\Configuration\\Config.\n*\n* @throws \\Exception\n*/\n@@ -143,5 +142,4 @@ class Kernel extends BaseKernel\n$container->setParameter('bolt.requirement.pluraltaxonomies', $pluralslugs);\n$container->setParameter('bolt.requirement.taxonomies', $slugs);\n}\n-\n}\n" } ]
PHP
MIT License
bolt/core
Working on routing.
95,144
27.10.2018 19:01:04
-7,200
90edf21a1700727345a95129fcf178bb0199d20c
Tweaking routing
[ { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/DetailController.php", "new_path": "src/Controller/Frontend/DetailController.php", "diff": "@@ -13,7 +13,11 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass DetailController extends BaseController\n{\n/**\n- * @Route(\"/{contenttypeslug}/{slug}\", methods={\"GET\"}, name=\"detail\", requirements={\"contenttypeslug\"=\"%bolt.requirement.contenttypes%\"})\n+ * @Route(\n+ * \"/{contenttypeslug}/{slug}\",\n+ * name=\"detail\",\n+ * requirements={\"contenttypeslug\"=\"%bolt.requirement.contenttypes%\"},\n+ * methods={\"GET\"})\n*\n* @param ContentRepository $contentRepository\n* @param FieldRepository $fieldRepository\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/ListingController.php", "new_path": "src/Controller/Frontend/ListingController.php", "diff": "@@ -17,9 +17,9 @@ class ListingController extends BaseController\n/**\n* @Route(\n* \"/{contenttypeslug}\",\n- * methods={\"GET\"},\n- * name=\"listing\"\n- * )\n+ * name=\"listing\",\n+ * requirements={\"contenttypeslug\"=\"%bolt.requirement.contenttypes%\"},\n+ * methods={\"GET\"})\n*\n* @param ContentRepository $content\n* @param Request $request\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/TaxonomyController.php", "new_path": "src/Controller/Frontend/TaxonomyController.php", "diff": "@@ -16,7 +16,12 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass TaxonomyController extends BaseController\n{\n/**\n- * @Route(\"/{taxonomyslug}/{slug}\", methods={\"GET\"}, name=\"taxonomy\", requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\"})\n+ * @Route(\"\n+ * /{taxonomyslug}/{slug}\",\n+ * name=\"taxonomy\",\n+ * requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\"},\n+ * methods={\"GET\"}\n+ * )\n*/\npublic function listing(ContentRepository $content, Request $request, string $taxonomyslug, string $slug): Response\n{\n" } ]
PHP
MIT License
bolt/core
Tweaking routing
95,144
27.10.2018 19:09:40
-7,200
a2d0a387e15aee019ed4c7aebc15acc5dc132eeb
Removing 'console.log()'
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Admin/Sidebar.vue", "new_path": "assets/js/Components/Admin/Sidebar.vue", "diff": "@@ -66,7 +66,6 @@ export default {\nname: \"admin-sidebar\",\nprops: [\"brand\", \"menu\", \"version\"],\ncreated() {\n- console.log(this.menu);\nconst size = localStorage.getItem('admin-sidebar-size');\nif (size !== null && size === 'slim'){\nthis.size = 'slim'\n" } ]
PHP
MIT License
bolt/core
Removing 'console.log()'
95,144
27.10.2018 19:14:01
-7,200
5c1024df4fb96fd6f6b8a33d636a82f04c797757
Fixing breakage for non-existing thumbnails.
[ { "change_type": "MODIFY", "old_path": "src/Twig/Extension/ImageExtension.php", "new_path": "src/Twig/Extension/ImageExtension.php", "diff": "@@ -54,6 +54,10 @@ class ImageExtension extends AbstractExtension\n$filename = $image;\n}\n+ if (empty($filename)) {\n+ return '';\n+ }\n+\n$secret = $this->config->get('general/secret');\n$params = [\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/image.twig", "new_path": "templates/editcontent/fields/image.twig", "diff": ":label=\"'{{ label }}'\"\n:name=\"'{{ name }}'\"\n:value=\"'{{ field.get('filename') }}'\"\n- :thumbnail=\"'{{ field.get('filename')|thumbnail(width=1200, height=1200, area='files', path=setPath) }}'\"\n+ :thumbnail=\"'{{ field|thumbnail(width=1200, height=1200, area='files', path=setPath) }}'\"\n:title=\"'{{ field.get('title') }}'\"\n:alt=\"'{{ field.get('alt') }}'\"\n:directory=\"'{{directory}}'\"\n" } ]
PHP
MIT License
bolt/core
Fixing breakage for non-existing thumbnails.
95,144
27.10.2018 20:21:41
-7,200
f084110e7f16e22c6480c5e93a1e67856bf7d082
Make sure floatfield and imagefield have correct output
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field/FloatField.php", "new_path": "src/Entity/Field/FloatField.php", "diff": "@@ -12,4 +12,13 @@ use Doctrine\\ORM\\Mapping as ORM;\n*/\nclass FloatField extends Field\n{\n+ public function __toString(): string\n+ {\n+ return floatval($this->value);\n+ }\n+\n+ public function getValue(): ?array\n+ {\n+ return [ floatval($this->value) ];\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/IntegerField.php", "new_path": "src/Entity/Field/IntegerField.php", "diff": "@@ -12,4 +12,13 @@ use Doctrine\\ORM\\Mapping as ORM;\n*/\nclass IntegerField extends Field\n{\n+ public function __toString(): string\n+ {\n+ return intval($this->value);\n+ }\n+\n+ public function getValue(): ?array\n+ {\n+ return [ intval($this->value) ];\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Make sure floatfield and imagefield have correct output
95,144
28.10.2018 06:18:40
-3,600
3ee69ca941f62c8d821b2b83cd7e86c9b8c2ac42
Make "Showcases" work. Fixes
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field/FloatField.php", "new_path": "src/Entity/Field/FloatField.php", "diff": "@@ -14,7 +14,7 @@ class FloatField extends Field\n{\npublic function __toString(): string\n{\n- return floatval($this->value);\n+ return (string) floatval($this->value);\n}\npublic function getValue(): ?array\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/IntegerField.php", "new_path": "src/Entity/Field/IntegerField.php", "diff": "@@ -14,7 +14,7 @@ class IntegerField extends Field\n{\npublic function __toString(): string\n{\n- return intval($this->value);\n+ return (string) intval($this->value);\n}\npublic function getValue(): ?array\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/textarea.twig", "new_path": "templates/editcontent/fields/textarea.twig", "diff": "{% block field %}\n<editor-textarea\n- :value=\"'{{ value }}'\"\n+ :value=\"'{{ value|json_encode() }}'\"\n:label=\"'{{ label }}'\"\n:name=\"'{{ name }}'\"\n></editor-textarea>\n" } ]
PHP
MIT License
bolt/core
Make "Showcases" work. Fixes #55
95,144
28.10.2018 20:57:01
-3,600
17aa00c2551ee57693b0c2d00c082d5d9a728d29
Working on frontend rendering.
[ { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yml", "new_path": "config/bolt/contenttypes.yml", "diff": "@@ -75,6 +75,7 @@ pages:\nbody:\ntype: html\nheight: 300px\n+ allowtwig: true\ntextarea:\ntype: textarea\npostfix: \"This is a plain text area. the contents will <em><strong>not</em></strong> be processed.\"\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/index.twig", "new_path": "public/theme/skeleton/index.twig", "diff": "{{ popup(record.image, 1200, 500) }}\n- {{ record.body }}\n+ {{ record.content }}\n{{ include('partials/_recordfooter.twig', { 'record': record }) }}\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_fresh_install.twig", "new_path": "public/theme/skeleton/partials/_fresh_install.twig", "diff": "<p>This is a minimal theme, with a modular structure. It is well suited to build your own theme's on top of.</p>\n<ul>\n<li>Check the <a href='https://github.com/bobdenotter/bolt-foundation-theme/blob/master/readme.md'>readme.md</a> for instructions on how to customize this theme.</li>\n- <li><a href='{{ path('fileedit', {'namespace': 'theme', 'file': 'index.twig'}) }}'>Edit this template</a>, to get rid of this 'callout'.</li>\n+ <li><a href='{{ path('bolt_edit_file', {'area': 'themes', 'file': 'skeleton/index.twig'}) }}'>Edit this template</a>, to get rid of this 'callout'.</li>\n</ul>\n<small>Note: Only registered users will see this. This piece of content is hidden from regular visitors.</small>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_sub_field_blocks.twig", "new_path": "public/theme/skeleton/partials/_sub_field_blocks.twig", "diff": "{# Sub-block for 'text' field such as 'text', 'textarea', or 'html' #}\n{% block text_field %}\n- <div {% if key is not empty %}data-bolt-field=\"{{ key }}\"{% endif %}>\n+ <div data-bolt-field=\"{{ value.name }}\">\n{%- autoescape false -%}\n{# If 'allowtwig' is true for this field, we'll need to parse it as Twig here. #}\n- {#{% if allowtwig|default(false) %}#}\n+ {#{% if allowtwig %}#}\n{#{{ include(template_from_string(value)) }}#}\n{#{% else %}#}\n{{ value }}\n{# Sub-block for Markdown fields #}\n{% block markdown_field %}\n- <div {% if key is not empty %}data-bolt-field=\"{{ key }}\"{% endif %}>\n+ <div data-bolt-field=\"{{ value.name }}\">\n{# If 'allowtwig' is true for this field, we'll need to parse it as Twig here. #}\n- {#{% if allowtwig|default(false) %}#}\n+ {#{% if allowtwig %}#}\n{#{{ include(template_from_string(value))|markdown }}#}\n{#{% else %}#}\n{{ value|markdown }}\n{# HTML, Textarea, Text fields #}\n{% if fieldtype in ['html', 'textarea', 'text'] %}\n- {{ block('text_field') }}\n+ {% set tag = (value.name in ['title', 'name', 'caption', 'subject', 'heading']) ? 'h3' : 'p' %}\n+ <{{tag}}>{{ block('text_field') }}</{{tag}}>\n{% endif %}\n{# Markdown fields #}\n{% endif %}\n{# Image fields #}\n- {% if fieldtype == \"image\" and value.file|default is not empty %}\n+ {% if fieldtype == \"image\" and value is not empty %}\n{{ value|showimage('684') }}\n{% endif %}\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_sub_fields.twig", "new_path": "public/theme/skeleton/partials/_sub_fields.twig", "diff": "{% endif %}\n{% endspaceless -%}\n+ {{ dump(record.fields) }}\n+\n{# SECTION 2: LOOPING AND ITERATION - The actual looping is done here. #}\n- {% for key, value in record.values if (key not in omittedkeys) %}\n+ {% for value in record.fields if (value.name not in omittedkeys) %}\n+\n+ {# Set the type #}\n+ {% set fieldtype = value.definition.type %}\n- {# Is the field allowed to contain Twig functions #}\n- {% set allowtwig = record.contenttype.fields[key].allowtwig|default(false) %}\n+ {# Is the field allowed to contain Twig functions? #}\n+ {% set allowtwig = value.definition.allowtwig %}\n{# Fields that are considered 'common': 'html', 'markdown', 'textarea',\n'text', 'image', 'video' and 'imagelist' #}\n- {% if common|default(true) and (key not in exclude|default([])) %}\n+ {% if common|default(true) and (value.name not in exclude|default([])) %}\n- {% set fieldtype = record.fieldtype(key) %}\n- {% set value = record.get(key) %}\n{{ block('common_fields') }}\n{% endif %}\n{# The rest of the built-in fieldtypes #}\n- {% if extended|default(false) and (key not in exclude|default([])) %}\n+ {% if extended|default(false) and (value.name not in exclude|default([])) %}\n- {% set fieldtype = record.fieldtype(key) %}\n{{ block('extended_fields') }}\n{% endif %}\n{# Finally, the repeaters and blocks #}\n- {% if (repeaters|default(false) == true and record.fieldtype(key) == \"repeater\") or\n- (blocks|default(false) == true and record.fieldtype(key) == \"block\") %}\n-\n- {% if (global.request.get('_route') != \"preview\") %}\n-\n- {% for repeater in value %}\n-\n- {% for key, repeaterfield in repeater %}\n-\n- {% set fieldtype = repeaterfield.fieldtype() %}\n- {% set value = repeaterfield.value() %}\n- {{ block('common_fields') }}\n- {{ block('extended_fields') }}\n-\n- {% endfor %}\n- {% endfor %}\n-\n- {% else %}\n- {# @deprecated\n- `blocks()` does not work correctly when _previewing_ repeater fields. This will be\n- fixed properly for Bolt 4, but for now we just output a notice, and prevent crashes.\n- See also: https://github.com/bolt/bolt/issues/6605 #}\n- <p>\n- Unfortunately, Repeater and Block fields do not work correctly with the generic\n- <code>block()</code> function, when using Preview. To view these fields, please\n- save the record, and view the page normally.\n- </p>\n- {% endif %}\n- {% endif %}\n+ {#{% if (repeaters|default(false) == true and record.fieldtype(key) == \"repeater\") or#}\n+ {#(blocks|default(false) == true and record.fieldtype(key) == \"block\") %}#}\n+\n+ {#{% if (global.request.get('_route') != \"preview\") %}#}\n+\n+ {#{% for repeater in value %}#}\n+\n+ {#{% for key, repeaterfield in repeater %}#}\n+\n+ {#{% set fieldtype = repeaterfield.fieldtype() %}#}\n+ {#{% set value = repeaterfield.value() %}#}\n+ {#{{ block('common_fields') }}#}\n+ {#{{ block('extended_fields') }}#}\n+\n+ {#{% endfor %}#}\n+ {#{% endfor %}#}\n+\n+ {#{% else %}#}\n+ {# @deprecated#}\n+ {#`blocks()` does not work correctly when _previewing_ repeater fields. This will be#}\n+ {#fixed properly for Bolt 4, but for now we just output a notice, and prevent crashes.#}\n+ {#See also: https://github.com/bolt/bolt/issues/6605 #}\n+ {#<p>#}\n+ {#Unfortunately, Repeater and Block fields do not work correctly with the generic#}\n+ {#<code>block()</code> function, when using Preview. To view these fields, please#}\n+ {#save the record, and view the page normally.#}\n+ {#</p>#}\n+ {#{% endif %}#}\n+ {#{% endif %}#}\n{% endfor %}\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/record.twig", "new_path": "public/theme/skeleton/record.twig", "diff": "{{ dump(record.definition) }}\n- <hr><hr>\n- {{ show_source_code(_self) }}\n- <hr><hr>\n-\n- {% for field in record.fields %}\n- {{ field }}\n- {% endfor %}\n-\n<hr>\n{% if record.image %}\n{{ block('sub_fields', 'partials/_sub_fields.twig') }}\n{% endwith %}\n- <p>Record:</p>\n- <code>{% verbatim %}{{ dump(record.definition) }}{% endverbatim %}</code>\n-\n- {#{{ dump(record.definition) }}#}\n-\n- <p>Field:</p>\n- <code>{% verbatim %}{{ dump(record.image.definition) }}{% endverbatim %}</code>\n- {#{{ dump(record.image.definition) }}#}\n-\n{# Uncomment this if you wish to dump the entire record to the client, for debugging purposes.\n{{ dump(record) }}\n#}\n" }, { "change_type": "MODIFY", "old_path": "src/Content/FieldType.php", "new_path": "src/Content/FieldType.php", "diff": "@@ -26,6 +26,7 @@ final class FieldType extends Collection\n'placeholder' => '',\n'sort' => '',\n'default' => '',\n+ 'allowtwig' => false,\n];\nreturn $values;\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/EditFileController.php", "new_path": "src/Controller/Backend/EditFileController.php", "diff": "@@ -39,6 +39,9 @@ class EditFileController extends BaseController\npublic function editFile(string $area, Request $request): Response\n{\n$file = $request->query->get('file');\n+ if (mb_strpos($file, '/') !== 0) {\n+ $file = '/' . $file;\n+ }\n$basepath = $this->config->getPath($area);\n$filename = Path::canonicalize($basepath . '/' . $file);\n$contents = file_get_contents($filename);\n@@ -58,6 +61,10 @@ class EditFileController extends BaseController\n* @param Request $request\n* @param UrlGeneratorInterface $urlGenerator\n*\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n* @return RedirectResponse\n*/\npublic function editFilePost(Request $request, UrlGeneratorInterface $urlGenerator): Response\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/BaseController.php", "new_path": "src/Controller/BaseController.php", "diff": "@@ -53,6 +53,7 @@ class BaseController extends AbstractController\n// Set config and version.\n$parameters['config'] = $this->config;\n$parameters['version'] = Version::VERSION;\n+ $parameters['user'] = $this->getUser();\n// Resolve string|array of templates into the first one that is found.\nif ($template instanceof Collection) {\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/HomepageController.php", "new_path": "src/Controller/Frontend/HomepageController.php", "diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Frontend;\nuse Bolt\\Controller\\BaseController;\n-use Bolt\\Entity\\Content;\n+use Bolt\\Repository\\ContentRepository;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n@@ -13,15 +13,28 @@ class HomepageController extends BaseController\n{\n/**\n* @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n+ *\n+ * @param ContentRepository $cr\n+ *\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n+ * @return Response\n*/\n- public function homepage(): Response\n+ public function homepage(ContentRepository $contentRepository): Response\n{\n$homepage = $this->getOption('theme/homepage') ?: $this->getOption('general/homepage');\n+ $params = explode('/', $homepage);\n- // todo get $homepage content.\n+ // todo get $homepage content, using \"setcontent\"\n+ $record = $contentRepository->findOneBy(['contentType' => $params[0], 'id' => $params[1]]);\n+ if (!$record) {\n+ $record = $contentRepository->findOneBy(['contentType' => $params[0]]);\n+ }\n$templates = $this->templateChooser->homepage();\n- return $this->renderTemplate($templates, []);\n+ return $this->renderTemplate($templates, ['record' => $record]);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/ContentMagicTraits.php", "new_path": "src/Entity/ContentMagicTraits.php", "diff": "@@ -32,7 +32,7 @@ trait ContentMagicTraits\n// Prefer a field with $name\nforeach ($this->fields as $field) {\nif ($field->getName() === $name) {\n- return $field;\n+ return new \\Twig_Markup($field, 'UTF-8');\n}\n}\n" } ]
PHP
MIT License
bolt/core
Working on frontend rendering.
95,168
29.10.2018 12:09:39
-3,600
6f3df65153ed10f5fa0fab446a26e2a408c6b858
GET operations are always public
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -19,8 +19,8 @@ use Symfony\\Component\\Serializer\\Annotation\\Groups;\n/**\n* @ApiResource(\n* normalizationContext={\"groups\"={\"public\"}},\n- * collectionOperations={\"get\"={\"access_control\"=\"is_granted('ROLE_ADMIN')\"}},\n- * itemOperations={\"get\"={\"access_control\"=\"is_granted('ROLE_ADMIN')\"}}\n+ * collectionOperations={\"get\"},\n+ * itemOperations={\"get\"}\n* )\n* )\n* @ApiFilter(SearchFilter::class)\n" } ]
PHP
MIT License
bolt/core
GET operations are always public
95,168
29.10.2018 12:11:15
-3,600
b17dce3fc4d3f6a0416b6fb4087e139507623ad2
Set Field Entity with GET operation and public properties
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -8,9 +8,14 @@ use ApiPlatform\\Core\\Annotation\\ApiResource;\nuse Bolt\\Content\\FieldType;\nuse Bolt\\Content\\FieldTypeFactory;\nuse Doctrine\\ORM\\Mapping as ORM;\n+use Symfony\\Component\\Serializer\\Annotation\\Groups;\n/**\n- * @ApiResource()\n+ * @ApiResource(\n+ * normalizationContext={\"groups\"={\"public\"}},\n+ * collectionOperations={\"get\"},\n+ * itemOperations={\"get\"}\n+ * )\n* @ORM\\Entity(repositoryClass=\"Bolt\\Repository\\FieldRepository\")\n* @ORM\\Table(name=\"bolt_field\")\n* @ORM\\InheritanceType(\"SINGLE_TABLE\")\n@@ -47,47 +52,56 @@ class Field\n* @ORM\\Id()\n* @ORM\\GeneratedValue()\n* @ORM\\Column(type=\"integer\")\n+ * @Groups(\"public\")\n*/\nprivate $id;\n/**\n* @ORM\\Column(type=\"integer\")\n+ * @Groups(\"public\")\n*/\nprivate $content_id;\n/**\n* @ORM\\Column(type=\"string\", length=191)\n+ * @Groups(\"public\")\n*/\npublic $name;\n/**\n* @ORM\\Column(type=\"json\")\n+ * @Groups(\"public\")\n*/\nprotected $value = [];\n/**\n* @ORM\\Column(type=\"integer\", nullable=true)\n+ * @Groups(\"public\")\n*/\nprivate $parent_id;\n/**\n* @ORM\\Column(type=\"integer\")\n+ * @Groups(\"public\")\n*/\nprivate $sortorder = 0;\n/**\n* @ORM\\Column(type=\"string\", length=191, nullable=true)\n+ * @Groups(\"public\")\n*/\nprivate $locale;\n/**\n* @ORM\\Column(type=\"integer\", nullable=true)\n+ * @Groups(\"public\")\n*/\nprivate $version;\n/**\n* @ORM\\ManyToOne(targetEntity=\"Bolt\\Entity\\Content\", inversedBy=\"fields\")\n* @ORM\\JoinColumn(nullable=false)\n+ * @Groups(\"public\")\n*/\nprivate $content;\n" } ]
PHP
MIT License
bolt/core
Set Field Entity with GET operation and public properties
95,168
29.10.2018 12:28:18
-3,600
92d0179ca020dddf548e65f32f0654fc432684be
Set Taxonomy Entity with GET operation and public properties
[ { "change_type": "MODIFY", "old_path": "src/Entity/Taxonomy.php", "new_path": "src/Entity/Taxonomy.php", "diff": "@@ -8,9 +8,14 @@ use ApiPlatform\\Core\\Annotation\\ApiResource;\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\Mapping as ORM;\n+use Symfony\\Component\\Serializer\\Annotation\\Groups;\n/**\n- * @ApiResource()\n+ * @ApiResource(\n+ * normalizationContext={\"groups\"={\"public\"}},\n+ * collectionOperations={\"get\"},\n+ * itemOperations={\"get\"}\n+ * )\n* @ORM\\Entity(repositoryClass=\"Bolt\\Repository\\TaxonomyRepository\")\n* @ORM\\Table(name=\"bolt_taxonomy\")\n*/\n@@ -20,32 +25,38 @@ class Taxonomy\n* @ORM\\Id()\n* @ORM\\GeneratedValue()\n* @ORM\\Column(type=\"integer\")\n+ * @Groups(\"public\")\n*/\nprivate $id;\n/**\n* @ORM\\ManyToMany(targetEntity=\"Bolt\\Entity\\Content\", inversedBy=\"taxonomies\")\n* @ORM\\JoinTable(name=\"bolt_taxonomy_content\")\n+ * @Groups(\"public\")\n*/\nprivate $content;\n/**\n* @ORM\\Column(type=\"string\", length=191)\n+ * @Groups(\"public\")\n*/\nprivate $type;\n/**\n* @ORM\\Column(type=\"string\", length=191)\n+ * @Groups(\"public\")\n*/\nprivate $slug;\n/**\n* @ORM\\Column(type=\"string\", length=191)\n+ * @Groups(\"public\")\n*/\nprivate $name;\n/**\n* @ORM\\Column(type=\"integer\")\n+ * @Groups(\"public\")\n*/\nprivate $sortorder;\n" } ]
PHP
MIT License
bolt/core
Set Taxonomy Entity with GET operation and public properties
95,168
29.10.2018 14:19:27
-3,600
39274467203c602aac1e6a991bd66b87e1438dd4
Add Controller for Bolt's About page
[ { "change_type": "ADD", "old_path": null, "new_path": "src/Controller/Backend/GeneralController.php", "diff": "+<?php declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Backend;\n+\n+use Bolt\\Controller\\BaseController;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+\n+class GeneralController extends BaseController\n+{\n+ /**\n+ * @Route(\"/about\", name=\"bolt_about\")\n+ */\n+ public function about()\n+ {\n+ return $this->renderTemplate('about/about.twig', [\n+ 'controller_name' => 'GeneralController',\n+ ]);\n+ }\n+}\n" } ]
PHP
MIT License
bolt/core
Add Controller for Bolt's About page
95,132
29.10.2018 18:55:54
-3,600
056a59a899abc4cad1b55b761fbe3ebbda39da8b
Add `resolve` again (for SQLite)
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "#\n# If you're trying out Bolt, just keep it set to SQLite for now.\ndatabase:\n- url: '%env(DATABASE_URL)%'\n+ url: '%env(resolve:DATABASE_URL)%'\n# The name of the website\nsitename: A sample site in CONFIG\n" } ]
PHP
MIT License
bolt/core
Add `resolve` again (for SQLite) (#59)
95,180
29.10.2018 21:34:57
-3,600
5f7730fddb88df9561211ae5749c29dc10479a51
fixed json malformed
[ { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"lint\": \"eslint --ext .js,.vue, assets\",\n\"lint-fix\": \"eslint --ext .js,.vue, assets --fix\",\n\"serve\": \"encore dev-server --port=8001 --progress --disable-host-check\",\n- \"build\": \"encore production --progress\",\n+ \"build\": \"encore production --progress\"\n},\n\"eslintConfig\": {\n\"root\": true,\n" } ]
PHP
MIT License
bolt/core
fixed json malformed
95,144
30.10.2018 08:47:02
-3,600
e9735adb5a5670617b4d6cf1241b8994bb00c832
Make Bolt version in sidebar link to /about.
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Admin/Sidebar.vue", "new_path": "assets/js/Components/Admin/Sidebar.vue", "diff": "</div>\n<button class=\"admin__sidebar--slim\" @click=\"slimMenu()\"><i class=\"fas fa-arrows-alt-h\"></i></button>\n<footer class=\"admin__sidebar--footer\">\n- Bolt {{version}}\n+ <i class=\"fas fa-fw fa-star\"></i> &nbsp; <a :href=\"aboutlink\">Bolt {{version}}</a>\n</footer>\n</nav>\n</template>\n@@ -64,7 +64,7 @@ const admin = document.querySelector('.admin');\nexport default {\nname: \"admin-sidebar\",\n- props: [\"brand\", \"menu\", \"version\"],\n+ props: [\"brand\", \"menu\", \"version\", \"aboutlink\"],\ncreated() {\nconst size = localStorage.getItem('admin-sidebar-size');\nif (size !== null && size === 'slim'){\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/admin/_sidebar.scss", "new_path": "assets/scss/modules/admin/_sidebar.scss", "diff": "justify-content: center;\ncolor: theme-color('secondary');\nfont-weight: $font-weight-bold;\n- text-transform: uppercase;\nfont-size: $small-font-size;\nletter-spacing: $letter-spacing;\n+\n+ a {\n+ font-weight: $font-weight-normal;\n+ }\n}\n}\n" } ]
PHP
MIT License
bolt/core
Make Bolt version in sidebar link to /about.
95,144
30.10.2018 15:11:01
-3,600
48df687a4c68db58c5244592eb0a1a5cf0d8ba67
Fix display of magic values
[ { "change_type": "MODIFY", "old_path": "src/Entity/ContentMagicTraits.php", "new_path": "src/Entity/ContentMagicTraits.php", "diff": "@@ -32,7 +32,7 @@ trait ContentMagicTraits\n// Prefer a field with $name\nforeach ($this->fields as $field) {\nif ($field->getName() === $name) {\n- return new \\Twig_Markup($field, 'UTF-8');\n+ return $field->isExcerptable() ? new \\Twig_Markup($field, 'UTF-8') : $field;\n}\n}\n" } ]
PHP
MIT License
bolt/core
Fix display of magic values
95,144
31.10.2018 06:13:32
-3,600
087aa5350df9bd18681b10b79f4323c7e75f0260
Updating composer.json and lock shizzle
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"@auto-scripts\"\n],\n\"post-update-cmd\": [\n- \"@auto-scripts\"\n+ \"@auto-scripts\",\n+ \"npm install\",\n+ \"npm run build\"\n]\n},\n\"conflict\": {\n" }, { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "},\n{\n\"name\": \"tightenco/collect\",\n- \"version\": \"v5.7.10\",\n+ \"version\": \"v5.7.12\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/tightenco/collect.git\",\n- \"reference\": \"75f5144a2624d113d06e141369560468ac4360a6\"\n+ \"reference\": \"0d89929f10a495ebafc15fb6bff5581d10c38abb\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/tightenco/collect/zipball/75f5144a2624d113d06e141369560468ac4360a6\",\n- \"reference\": \"75f5144a2624d113d06e141369560468ac4360a6\",\n+ \"url\": \"https://api.github.com/repos/tightenco/collect/zipball/0d89929f10a495ebafc15fb6bff5581d10c38abb\",\n+ \"reference\": \"0d89929f10a495ebafc15fb6bff5581d10c38abb\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"collection\",\n\"laravel\"\n],\n- \"time\": \"2018-10-24T14:04:44+00:00\"\n+ \"time\": \"2018-10-30T21:09:13+00:00\"\n},\n{\n\"name\": \"twig/extensions\",\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "\"@babel/highlight\": \"^7.0.0\"\n}\n},\n+ \"@babel/core\": {\n+ \"version\": \"7.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.1.2.tgz\",\n+ \"integrity\": \"sha512-IFeSSnjXdhDaoysIlev//UzHZbdEmm7D0EIH2qtse9xK7mXEZQpYjs2P00XlP1qYsYvid79p+Zgg6tz1mp6iVw==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/code-frame\": \"^7.0.0\",\n+ \"@babel/generator\": \"^7.1.2\",\n+ \"@babel/helpers\": \"^7.1.2\",\n+ \"@babel/parser\": \"^7.1.2\",\n+ \"@babel/template\": \"^7.1.2\",\n+ \"@babel/traverse\": \"^7.1.0\",\n+ \"@babel/types\": \"^7.1.2\",\n+ \"convert-source-map\": \"^1.1.0\",\n+ \"debug\": \"^3.1.0\",\n+ \"json5\": \"^0.5.0\",\n+ \"lodash\": \"^4.17.10\",\n+ \"resolve\": \"^1.3.2\",\n+ \"semver\": \"^5.4.1\",\n+ \"source-map\": \"^0.5.0\"\n+ }\n+ },\n+ \"@babel/generator\": {\n+ \"version\": \"7.1.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz\",\n+ \"integrity\": \"sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/types\": \"^7.1.3\",\n+ \"jsesc\": \"^2.5.1\",\n+ \"lodash\": \"^4.17.10\",\n+ \"source-map\": \"^0.5.0\",\n+ \"trim-right\": \"^1.0.1\"\n+ },\n+ \"dependencies\": {\n+ \"jsesc\": {\n+ \"version\": \"2.5.1\",\n+ \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz\",\n+ \"integrity\": \"sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n\"@babel/helper-builder-binary-assignment-operator-visitor\": {\n\"version\": \"7.1.0\",\n\"resolved\": \"https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz\",\n}\n}\n},\n+ \"@babel/helper-function-name\": {\n+ \"version\": \"7.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz\",\n+ \"integrity\": \"sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/helper-get-function-arity\": \"^7.0.0\",\n+ \"@babel/template\": \"^7.1.0\",\n+ \"@babel/types\": \"^7.0.0\"\n+ }\n+ },\n+ \"@babel/helper-get-function-arity\": {\n+ \"version\": \"7.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz\",\n+ \"integrity\": \"sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/types\": \"^7.0.0\"\n+ }\n+ },\n\"@babel/helper-hoist-variables\": {\n\"version\": \"7.0.0\",\n\"resolved\": \"https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz\",\n}\n}\n},\n+ \"@babel/helper-split-export-declaration\": {\n+ \"version\": \"7.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz\",\n+ \"integrity\": \"sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/types\": \"^7.0.0\"\n+ }\n+ },\n+ \"@babel/helpers\": {\n+ \"version\": \"7.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.1.2.tgz\",\n+ \"integrity\": \"sha512-Myc3pUE8eswD73aWcartxB16K6CGmHDv9KxOmD2CeOs/FaEAQodr3VYGmlvOmog60vNQ2w8QbatuahepZwrHiA==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/template\": \"^7.1.2\",\n+ \"@babel/traverse\": \"^7.1.0\",\n+ \"@babel/types\": \"^7.1.2\"\n+ }\n+ },\n\"@babel/highlight\": {\n\"version\": \"7.0.0\",\n\"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz\",\n}\n}\n},\n+ \"@babel/parser\": {\n+ \"version\": \"7.1.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz\",\n+ \"integrity\": \"sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==\",\n+ \"dev\": true\n+ },\n\"@babel/plugin-proposal-async-generator-functions\": {\n\"version\": \"7.1.0\",\n\"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz\",\n}\n}\n},\n+ \"@babel/template\": {\n+ \"version\": \"7.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz\",\n+ \"integrity\": \"sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/code-frame\": \"^7.0.0\",\n+ \"@babel/parser\": \"^7.1.2\",\n+ \"@babel/types\": \"^7.1.2\"\n+ }\n+ },\n+ \"@babel/traverse\": {\n+ \"version\": \"7.1.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz\",\n+ \"integrity\": \"sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"@babel/code-frame\": \"^7.0.0\",\n+ \"@babel/generator\": \"^7.1.3\",\n+ \"@babel/helper-function-name\": \"^7.1.0\",\n+ \"@babel/helper-split-export-declaration\": \"^7.0.0\",\n+ \"@babel/parser\": \"^7.1.3\",\n+ \"@babel/types\": \"^7.1.3\",\n+ \"debug\": \"^3.1.0\",\n+ \"globals\": \"^11.1.0\",\n+ \"lodash\": \"^4.17.10\"\n+ },\n+ \"dependencies\": {\n+ \"globals\": {\n+ \"version\": \"11.8.0\",\n+ \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.8.0.tgz\",\n+ \"integrity\": \"sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n+ \"@babel/types\": {\n+ \"version\": \"7.1.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz\",\n+ \"integrity\": \"sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"esutils\": \"^2.0.2\",\n+ \"lodash\": \"^4.17.10\",\n+ \"to-fast-properties\": \"^2.0.0\"\n+ },\n+ \"dependencies\": {\n+ \"to-fast-properties\": {\n+ \"version\": \"2.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n+ \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n\"@symfony/webpack-encore\": {\n\"version\": \"0.20.1\",\n\"resolved\": \"https://registry.npmjs.org/@symfony/webpack-encore/-/webpack-encore-0.20.1.tgz\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"vuedraggable\": \"^2.16.0\"\n},\n\"devDependencies\": {\n+ \"@babel/core\": \"^7.1.2\",\n\"@babel/preset-env\": \"^7.1.0\",\n\"@symfony/webpack-encore\": \"^0.20.1\",\n\"autoprefixer\": \"^9.3.1\",\n" } ]
PHP
MIT License
bolt/core
Updating composer.json and lock shizzle
95,144
01.11.2018 07:42:58
-3,600
af375966574e3bc452f7bc862fe43e2d60a8f996
Refactor out ContentTypeFactory and FieldTypeFactory
[ { "change_type": "MODIFY", "old_path": "src/Content/ContentType.php", "new_path": "src/Content/ContentType.php", "diff": "@@ -12,4 +12,25 @@ final class ContentType extends Collection\n{\nreturn $this->get($name);\n}\n+\n+ /**\n+ * @param string $name\n+ * @param Collection $contenttypesconfig\n+ *\n+ * @return ContentType\n+ */\n+ public static function factory(string $name, $contenttypesconfig): ?self\n+ {\n+ if ($contenttypesconfig[$name]) {\n+ return new self($contenttypesconfig[$name]);\n+ }\n+\n+ foreach ($contenttypesconfig as $item => $value) {\n+ if ($value['singular_slug'] === $name) {\n+ return new self($contenttypesconfig[$item]);\n+ }\n+ }\n+\n+ return null;\n+ }\n}\n" }, { "change_type": "DELETE", "old_path": "src/Content/ContentTypeFactory.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Content;\n-\n-use Tightenco\\Collect\\Support\\Collection;\n-\n-final class ContentTypeFactory\n-{\n- public function __construct()\n- {\n- }\n-\n- /**\n- * @param string $name\n- * @param Collection $contenttypesconfig\n- *\n- * @return ContentType\n- */\n- public static function get(string $name, $contenttypesconfig): ?ContentType\n- {\n- if ($contenttypesconfig[$name]) {\n- return new ContentType($contenttypesconfig[$name]);\n- }\n-\n- foreach ($contenttypesconfig as $item => $value) {\n- if ($value['singular_slug'] === $name) {\n- return new ContentType($contenttypesconfig[$item]);\n- }\n- }\n-\n- return null;\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "src/Content/FieldType.php", "new_path": "src/Content/FieldType.php", "diff": "@@ -13,6 +13,9 @@ final class FieldType extends Collection\nparent::__construct(array_merge($this->defaults(), $items));\n}\n+ /**\n+ * @return array\n+ */\nprivate function defaults()\n{\n$values = [\n@@ -31,4 +34,36 @@ final class FieldType extends Collection\nreturn $values;\n}\n+\n+ /**\n+ * @param string $name\n+ * @param ContentType $contentType\n+ *\n+ * @return FieldType|null\n+ */\n+ public static function factory(string $name, ContentType $contentType): ?self\n+ {\n+ if (isset($contentType['fields'][$name])) {\n+ $field = new self($contentType['fields'][$name]);\n+ } else {\n+ $field = new self([]);\n+ }\n+\n+ return $field;\n+ }\n+\n+ /**\n+ * @param string $name\n+ * @param array $definition\n+ *\n+ * @return FieldType|null\n+ */\n+ public static function mock(string $name, array $definition): ?self\n+ {\n+ $definition['name'] = $name;\n+\n+ $field = new self($definition);\n+\n+ return $field;\n+ }\n}\n" }, { "change_type": "DELETE", "old_path": "src/Content/FieldTypeFactory.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Content;\n-\n-final class FieldTypeFactory\n-{\n- public function __construct()\n- {\n- }\n-\n- /**\n- * @param string $name\n- * @param ContentType $contentType\n- *\n- * @return FieldType|null\n- */\n- public static function get(string $name, ContentType $contentType): ?FieldType\n- {\n- if (isset($contentType['fields'][$name])) {\n- $field = new FieldType($contentType['fields'][$name]);\n- } else {\n- $field = new FieldType([]);\n- }\n-\n- return $field;\n- }\n-\n- public static function mock(array $definition, string $name = null): ?FieldType\n- {\n- if ($name) {\n- $definition['name'] = $name;\n- }\n-\n- $field = new FieldType($definition);\n-\n- return $field;\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "src/Content/MenuBuilder.php", "new_path": "src/Content/MenuBuilder.php", "diff": "@@ -204,7 +204,7 @@ class MenuBuilder\nprivate function getLatestRecords($slug)\n{\n/** @var ContentType $ct */\n- $contenttype = ContentTypeFactory::get($slug, $this->config->get('contenttypes'));\n+ $contenttype = ContentType::factory($slug, $this->config->get('contenttypes'));\n/** @var Content $records */\n$records = $this->content->findLatest($contenttype, 5);\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ListingController.php", "new_path": "src/Controller/Backend/ListingController.php", "diff": "@@ -4,7 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\n-use Bolt\\Content\\ContentTypeFactory;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Repository\\ContentRepository;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\n@@ -34,7 +33,7 @@ class ListingController extends BaseController\n*/\npublic function listing(ContentRepository $content, Request $request, string $contenttype = ''): Response\n{\n- $contenttype = ContentTypeFactory::get($contenttype, $this->config->get('contenttypes'));\n+ $contenttype = ContentType::factory($contenttype, $this->config->get('contenttypes'));\n$page = (int) $request->query->get('page', 1);\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/ListingController.php", "new_path": "src/Controller/Frontend/ListingController.php", "diff": "@@ -4,7 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Frontend;\n-use Bolt\\Content\\ContentTypeFactory;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Repository\\ContentRepository;\n@@ -37,7 +36,7 @@ class ListingController extends BaseController\n/** @var Content $records */\n$records = $content->findAll($page);\n- $contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n+ $contenttype = ContentType::factory($contenttypeslug, $this->config->get('contenttypes'));\n$templates = $this->templateChooser->listing($contenttype);\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/SearchController.php", "new_path": "src/Controller/Frontend/SearchController.php", "diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Frontend;\n-use Bolt\\Content\\ContentTypeFactory;\n+use Bolt\\Content\\ContentType;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Repository\\ContentRepository;\n@@ -33,7 +33,7 @@ class SearchController extends BaseController\n/** @var Content $records */\n$records = $content->findAll($page);\n- $contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n+ $contenttype = ContentType::factory($contenttypeslug, $this->config->get('contenttypes'));\n$templates = $this->templateChooser->listing($contenttype);\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/TaxonomyController.php", "new_path": "src/Controller/Frontend/TaxonomyController.php", "diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Frontend;\n-use Bolt\\Content\\ContentTypeFactory;\n+use Bolt\\Content\\ContentType;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Repository\\ContentRepository;\n@@ -30,7 +30,7 @@ class TaxonomyController extends BaseController\n/** @var Content $records */\n$records = $content->findAll($page);\n- $contenttype = ContentTypeFactory::get($contenttypeslug, $this->config->get('contenttypes'));\n+ $contenttype = ContentType::factory($contenttypeslug, $this->config->get('contenttypes'));\n$templates = $this->templateChooser->listing($contenttype);\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -9,7 +9,6 @@ use ApiPlatform\\Core\\Annotation\\ApiResource;\nuse ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Filter\\SearchFilter;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Content\\ContentType;\n-use Bolt\\Content\\ContentTypeFactory;\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\Mapping as ORM;\n@@ -148,7 +147,7 @@ class Content\n{\n$this->config = $config;\n- $this->contentTypeDefinition = ContentTypeFactory::get($this->contentType, $config->get('contenttypes'));\n+ $this->contentTypeDefinition = ContentType::factory($this->contentType, $config->get('contenttypes'));\n}\npublic function getConfig(): Config\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -6,7 +6,6 @@ namespace Bolt\\Entity;\nuse ApiPlatform\\Core\\Annotation\\ApiResource;\nuse Bolt\\Content\\FieldType;\n-use Bolt\\Content\\FieldTypeFactory;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Symfony\\Component\\Serializer\\Annotation\\Groups;\n@@ -125,7 +124,7 @@ class Field\n{\n$contentTypeDefinition = $this->getContent()->getDefinition();\n- $this->fieldTypeDefinition = FieldTypeFactory::get($this->getName(), $contentTypeDefinition);\n+ $this->fieldTypeDefinition = FieldType::factory($this->getName(), $contentTypeDefinition);\n}\npublic function getDefinition(): FieldType\n@@ -133,9 +132,9 @@ class Field\nreturn $this->fieldTypeDefinition;\n}\n- public function setDefinition(array $definition, $name = null)\n+ public function setDefinition($name, array $definition)\n{\n- $this->fieldTypeDefinition = FieldTypeFactory::mock($definition, $name);\n+ $this->fieldTypeDefinition = FieldType::mock($name, $definition);\n}\npublic function getContentId(): ?int\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/ContentHelperExtension.php", "new_path": "src/Twig/Extension/ContentHelperExtension.php", "diff": "@@ -54,11 +54,11 @@ class ContentHelperExtension extends AbstractExtension\nreturn json_encode($menu, $options);\n}\n- public function fieldfactory($definition, $name = null)\n+ public function fieldfactory($name, $definition)\n{\n$field = FieldFactory::get($definition['type']);\n$field->setName($name);\n- $field->setDefinition($definition, $name);\n+ $field->setDefinition($name, $definition);\nreturn $field;\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "{% set field = record.field(key) %}\n{% set fieldgroup = fielddefinition.group %}\n{% if not field %}\n- {% set field = fieldfactory(fielddefinition, key) %}\n+ {% set field = fieldfactory(key, fielddefinition) %}\n{% endif %}\n{% if fieldgroup == group %}\n{% include ['editcontent/fields/' ~ type ~ '.twig', 'editcontent/fields/generic.twig' ] with { 'field': field} %}\n{% set type = fielddefinition.type %}\n{% set field = record.field(key) %}\n{% if not field %}\n- {% set field = fieldfactory(fielddefinition, key) %}\n+ {% set field = fieldfactory(key, fielddefinition) %}\n{% endif %}\n{% endspaceless %}\n{% include 'editcontent/javascripts/' ~ type ~ '.twig' ignore missing with { 'field': field} %}\n{% set type = fielddefinition.type %}\n{% set field = record.field(key) %}\n{% if not field %}\n- {% set field = fieldfactory(fielddefinition, key) %}\n+ {% set field = fieldfactory(key, fielddefinition) %}\n{% endif %}\n{% endspaceless %}\n{% include 'editcontent/stylesheets/' ~ type ~ '.twig' ignore missing with { 'field': field} %}\n" } ]
PHP
MIT License
bolt/core
Refactor out ContentTypeFactory and FieldTypeFactory
95,144
01.11.2018 09:22:01
-3,600
616669592aea1cc473bec5b8d8d51af2f9058b31
Some PHPStan findings.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Async/News.php", "new_path": "src/Controller/Async/News.php", "diff": "@@ -137,7 +137,7 @@ final class News\nforeach ($fetchedNewsItems as $item) {\n$type = isset($item->type) ? $item->type : 'information';\nif (!isset($news[$type])\n- && (empty($item->target_version) || Bolt\\Version::compare($item->target_version, '>'))\n+ && (empty($item->target_version) || Version::compare($item->target_version, '>'))\n) {\n$news[$type] = $item;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/EditMediaController.php", "new_path": "src/Controller/Backend/EditMediaController.php", "diff": "@@ -10,6 +10,7 @@ use Bolt\\Content\\MediaFactory;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Media;\nuse Bolt\\Repository\\MediaRepository;\n+use Bolt\\TemplateChooser;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\Finder\\SplFileInfo;\n@@ -49,14 +50,17 @@ class EditMediaController extends BaseController\n* EditMediaController constructor.\n*\n* @param Config $config\n+ * @param TemplateChooser $templateChooser\n* @param CsrfTokenManagerInterface $csrfTokenManager\n* @param ObjectManager $manager\n* @param UrlGeneratorInterface $urlGenerator\n* @param MediaRepository $mediaRepository\n* @param Areas $areas\n+ * @param MediaFactory $mediaFactory\n*/\npublic function __construct(\nConfig $config,\n+ TemplateChooser $templateChooser,\nCsrfTokenManagerInterface $csrfTokenManager,\nObjectManager $manager,\nUrlGeneratorInterface $urlGenerator,\n@@ -64,8 +68,8 @@ class EditMediaController extends BaseController\nAreas $areas,\nMediaFactory $mediaFactory\n) {\n- $this->config = $config;\n- $this->csrfTokenManager = $csrfTokenManager;\n+ parent::__construct($config, $templateChooser, $csrfTokenManager);\n+\n$this->manager = $manager;\n$this->urlGenerator = $urlGenerator;\n$this->mediaRepository = $mediaRepository;\n@@ -78,6 +82,10 @@ class EditMediaController extends BaseController\n*\n* @param Media|null $media\n*\n+ * @throws \\Twig_Error_Loader\n+ * @throws \\Twig_Error_Runtime\n+ * @throws \\Twig_Error_Syntax\n+ *\n* @return Response\n*/\npublic function edit(Media $media = null)\n" } ]
PHP
MIT License
bolt/core
Some PHPStan findings.
95,180
01.11.2018 11:56:45
-3,600
7f435a6d0ae20a8edc441afedd6d5a4ff6caea6e
added base functionality for theming
[ { "change_type": "MODIFY", "old_path": "assets/js/bolt.js", "new_path": "assets/js/bolt.js", "diff": "@@ -20,8 +20,8 @@ Vue.prototype.$axios = Axios;\n/**\n* Loop Static Assets\n*/\n-const imagesCtx = require.context('../static/', true, /\\.(png|jpg|jpeg|gif|ico|svg|webp)$/);\n-imagesCtx.keys().forEach(imagesCtx);\n+const staticAssets = require.context('../static/', true, /\\.(png|jpg|jpeg|gif|ico|svg|webp)$/);\n+staticAssets.keys().forEach(staticAssets);\n/**\n* Load jQuery\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/init/_base.scss", "new_path": "assets/scss/init/_base.scss", "diff": "//** Init | Base\n-:root{\n-\n- --background: #f3f5f7;\n- --foreground: #ffffff;\n-\n- --status-published: #7fa800;\n- --status-draft: #0569e2;\n- --status-held: #ca2300;\n- --status-timed: #a80;\n-\n- --admin-sidebar: #ffffff;\n- --admin-sidebar-text: #4a555f;\n- --admin-sidebar-icon: #2e2ec2;\n- --admin-sidebar-menu: #4c5377;\n- --admin-sidebar-menu-text: #ffffff;\n- --admin-toolbar: #1f1f84;\n-\n- @include generate-color(primary, 240, 62%, 47%);\n- @include generate-color(secondary, 230, 22%, 38%);\n-\n- @include generate-color(body, 225, 16%, 15%);\n- @include generate-color(shade, 208, 13%, 43%);\n-\n- @include generate-color(success, 152, 92%, 38%);\n- @include generate-color(danger, 350, 73%, 50%);\n-\n-}\n-\nhtml, body {\nmargin: 0;\nheight: 100%;\n@@ -50,16 +22,3 @@ strong {\n.custom-select{\n-webkit-appearance: none;\n}\n\\ No newline at end of file\n-\n-\n-@each $color, $value in $theme-colors {\n- .btn-#{$color} {\n- @include button-css-variable($color);\n- }\n-}\n-\n-@each $color, $value in $theme-colors {\n- .btn-outline-#{$color} {\n- @include button-outline-css-variable($color);\n- }\n-}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/themes/_bootstrap.scss", "diff": "+@import \"~bootstrap/scss/functions\";\n+@import \"~bootstrap/scss/variables\";\n+@import \"~bootstrap/scss/mixins\";\n+\n+@each $color, $value in $bootstrap-colors {\n+ .btn-#{$color} {\n+ @include button-css-variable($color);\n+ }\n+}\n+\n+@each $color, $value in $bootstrap-colors {\n+ .btn-outline-#{$color} {\n+ @include button-outline-css-variable($color);\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/themes/dark.scss", "diff": "+//** Theme | Default\n+\n+@import '../init/mixins';\n+\n+:root{\n+\n+ --background: #2b3136;\n+ --foreground: #ffffff;\n+\n+ --status-published: #7fa800;\n+ --status-draft: #0569e2;\n+ --status-held: #ca2300;\n+ --status-timed: #a80;\n+\n+ --admin-sidebar: #ffffff;\n+ --admin-sidebar-text: #4a555f;\n+ --admin-sidebar-icon: #2e2ec2;\n+ --admin-sidebar-menu: #4c5377;\n+ --admin-sidebar-menu-text: #ffffff;\n+ --admin-toolbar: #1f1f84;\n+\n+ @include generate-color(primary, 240, 62%, 47%);\n+ @include generate-color(secondary, 230, 22%, 38%);\n+\n+ @include generate-color(body, 225, 16%, 15%);\n+ @include generate-color(shade, 208, 13%, 43%);\n+\n+ @include generate-color(success, 152, 92%, 38%);\n+ @include generate-color(danger, 350, 73%, 50%);\n+\n+}\n+\n+$bootstrap-colors: (\n+\n+ \"primary\": #2e2ec2,\n+ \"secondary\": #4c5377,\n+\n+ \"success\": #08bb68,\n+ \"danger\": #dd2443,\n+\n+);\n+\n+@import '_bootstrap';\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/themes/default.scss", "diff": "+//** Theme | Default\n+\n+@import '../init/mixins';\n+\n+:root{\n+\n+ --background: #f3f5f7;\n+ --foreground: #ffffff;\n+\n+ --status-published: #7fa800;\n+ --status-draft: #0569e2;\n+ --status-held: #ca2300;\n+ --status-timed: #a80;\n+\n+ --admin-sidebar: #ffffff;\n+ --admin-sidebar-text: #4a555f;\n+ --admin-sidebar-icon: #2e2ec2;\n+ --admin-sidebar-menu: #4c5377;\n+ --admin-sidebar-menu-text: #ffffff;\n+ --admin-toolbar: #1f1f84;\n+\n+ @include generate-color(primary, 240, 62%, 47%);\n+ @include generate-color(secondary, 230, 22%, 38%);\n+\n+ @include generate-color(body, 225, 16%, 15%);\n+ @include generate-color(shade, 208, 13%, 43%);\n+\n+ @include generate-color(success, 152, 92%, 38%);\n+ @include generate-color(danger, 350, 73%, 50%);\n+\n+}\n+\n+$bootstrap-colors: (\n+\n+ \"primary\": #2e2ec2,\n+ \"secondary\": #4c5377,\n+\n+ \"success\": #08bb68,\n+ \"danger\": #dd2443,\n+\n+);\n+\n+@import '_bootstrap';\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/bootstrap/_overrides.scss", "new_path": "assets/scss/vendor/bootstrap/_overrides.scss", "diff": "//** Bootstrap Overrides\n-// theme colours\n-\n-$theme-colors: (\n-\n- \"primary\": #2e2ec2,\n- \"secondary\": #4c5377,\n-\n- \"success\": #08bb68,\n- \"danger\": #dd2443,\n-\n-);\n-\n-$theme-colors: map-remove($theme-colors, \"light\", \"dark\", \"info\");\n-\n-\n// typography\n$font-family-base: 'Open Sans', sans-serif;\n$headings-font-family: 'Source Sans Pro', sans-serif;\n@@ -52,14 +37,3 @@ $grid-breakpoints: (\n}\n}\n\\ No newline at end of file\n-\n-\n-\n-\n-\n-// @each $color in $theme-colors {\n-// .btn-outline-#{$color} {\n-// @include button-outline-css-variable($color);\n-// }\n-// }\n-\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<link href=\"https://fonts.googleapis.com/css?family=Open+Sans:400,600|Source+Sans+Pro:300,400,600&amp;subset=greek-ext,latin-ext\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.3.1/css/all.css\" integrity=\"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU\" crossorigin=\"anonymous\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets/bolt.css') }}\">\n+ <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets/theme-default.css') }}\">\n{% endblock %}\n</head>\n}\n</script>\n+ <script src=\"{{ asset('assets/manifest.json') }}\" type=\"application/json\"></script>\n<script src=\"{{ asset('assets/bolt.js') }}\"></script>\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "webpack.config.js", "new_path": "webpack.config.js", "diff": "@@ -12,10 +12,20 @@ Encore\n.setManifestKeyPrefix('assets')\n.addEntry('bolt', './assets/js/bolt.js')\n+ .addStyleEntry('theme-default', './assets/scss/themes/default.scss')\n+ .addStyleEntry('theme-dark', './assets/scss/themes/dark.scss')\n+\n.autoProvidejQuery()\n.enableVueLoader()\n.enableSassLoader()\n.enablePostCssLoader()\n+ if(Encore.isProduction()){\n+ Encore.configureFilenames({\n+ js: '[name]-[hash:8].min.js',\n+ css: '[name]-[hash:8].min.css',\n+ })\n+ }\n+\nmodule.exports = Encore.getWebpackConfig();\n" } ]
PHP
MIT License
bolt/core
added base functionality for theming
95,180
01.11.2018 18:37:51
-3,600
56bf02ee1d977a4004ca5d035731465c730b3341
removed brand
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Admin/Sidebar.vue", "new_path": "assets/js/Components/Admin/Sidebar.vue", "diff": "<template>\n<nav class=\"admin__sidebar--nav\">\n- <a class=\"admin__sidebar--brand\" href=\"/bolt/\">\n- <img :src=\"brandFull\" alt=\"Bolt CMS\" v-if=\"size === 'normal'\">\n- <img :src=\"brandIcon\" alt=\"Bolt CMS\" v-else>\n- </a>\n<div>\n<ul class=\"admin__sidebar--menu\">\n<li v-for=\"(item, index) in menu\" :key=\"index\">\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/admin/_sidebar.scss", "new_path": "assets/scss/modules/admin/_sidebar.scss", "diff": "color: var(--admin-sidebar-text);\nheight: 100%;\nbox-shadow: 0 0 40px 0 rgba(0,0,0, 0.07);\n- &--brand{\n- @include darken(--admin-sidebar, 0.02);\n- width: 100%;\n- height: $admin-header-height;\n- display: flex;\n- align-items: center;\n- justify-content: center;\n- margin-bottom: $spacer;\n- padding: 0 $spacer;\n- img{\n- width: 90%;\n- }\n- }\n&--separator {\npadding: 0 $spacer;\nmargin: $spacer / 2 0;\npadding: 0;\nwidth: 100%;\nlist-style: none;\n+ margin-top: $spacer;\n}\n&--link {\n&.is-slim {\n.admin__sidebar {\n- .admin__sidebar--brand{\n- img{\n- width: 100%;\n- }\n- }\n-\n.admin__sidebar--separator,\n.admin__sidebar--footer {\ndisplay: none;\n" } ]
PHP
MIT License
bolt/core
removed brand
95,180
01.11.2018 19:06:40
-3,600
ca44c659a99ccac5bf8da30e7a66ecb4ab077f1d
changed create icon to magic
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Admin/Sidebar.vue", "new_path": "assets/js/Components/Admin/Sidebar.vue", "diff": "<ul class=\"link--menu\">\n<li v-if=\"item.link_new !== null\" class=\"link--create\">\n<a :href=\"item.link_new\">\n- <i class=\"fas fa-plus mr-2\"></i><span>New {{item.singular_name}}</span>\n+ <i class=\"fas fa-magic mr-2\"></i><span>New {{item.singular_name}}</span>\n</a>\n</li>\n<li v-if=\"item.submenu !== null\" v-for=\"(record, index) in item.submenu\" :key=\"index\">\n" } ]
PHP
MIT License
bolt/core
changed create icon to magic
95,144
02.11.2018 13:08:47
-3,600
f51de601fafc83e0735d8efe0a2f65d320ad6c35
Use our own template
[ { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<nav id=\"toolbar\" class=\"admin__toolbar\">\n<admin-toolbar\n:menu=\"{{ sidebarmenu() }}\"\n- user=\"{{user}}\"\n- site-name=\"{{config.get('general/sitename')}}\"\n+ user=\"{{user|default()}}\"\n+ site-name=\"{% if config is defined %}{{ config.get('general/sitename') }}{% endif %}\"\n></admin-toolbar>\n</nav>\n<!-- End Admin Toolbar -->\n" }, { "change_type": "ADD", "old_path": null, "new_path": "templates/bundles/TranslationBundle/WebUI/base.html.twig", "diff": "+{% extends '@bolt/_base/layout.twig' %}\n+\n+{% block container \"widecontent\" %}\n+\n+{% block title %}\n+ Edit Translations\n+{% endblock %}\n+\n+{% block main %}\n+\n+<nav class=\"navbar navbar-expand-lg navbar-light bg-light\">\n+ <div class=\"container\">\n+ <ul class=\"navbar-nav mr-auto\">\n+ <li class=\"nav-item\"><span class=\"navbar-text\">Configs:</span></li>\n+ {% for c in configNames %}\n+ <li class=\"nav-item{% if configName == c %} active{% endif %}\">\n+ <a class=\"nav-link\" href=\"{{ path('translation_index', {configName: c}) }}\">\n+ {{ c }}\n+ </a>\n+ </li>\n+ {% endfor %}\n+ </ul>\n+ </div>\n+</nav>\n+\n+{% block body %}{% endblock %}\n+\n+{% endblock %}\n+\n+{% block javascripts %}\n+ {{ parent() }}\n+ <script type=\"text/javascript\" src=\"{{ asset(\"bundles/translation/js/webui.js\") }}\"></script>\n+{% endblock %}\n+\n+{% block stylesheets %}\n+ {{ parent() }}\n+ <link rel=\"stylesheet\" href=\"{{ asset(\"bundles/translation/css/webui.css\") }}\">\n+{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Use our own template
95,144
02.11.2018 16:14:24
-3,600
7b90a11781efba04d42f8f3b1078480b87037351
Wrapping up Localisation
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -32,6 +32,10 @@ class UserController extends BaseController\n$this->getDoctrine()->getManager()->flush();\n$this->addFlash('success', 'user.updated_successfully');\n+ $locale = $form->getData()->getLocale();\n+ $request->getSession()->set('_locale', $locale);\n+ $request->setLocale($locale);\n+\nreturn $this->redirectToRoute('bolt_profile_edit');\n}\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/TaxonomyFixtures.php", "new_path": "src/DataFixtures/TaxonomyFixtures.php", "diff": "@@ -41,7 +41,6 @@ class TaxonomyFixtures extends Fixture implements DependentFixtureInterface\n$order = 1;\nforeach ($this->config as $taxonomyDefinition) {\n- dump($taxonomyDefinition);\nif (!empty($taxonomyDefinition['options'])) {\n$options = $taxonomyDefinition['options'];\n} else {\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/UserFixtures.php", "new_path": "src/DataFixtures/UserFixtures.php", "diff": "@@ -35,6 +35,8 @@ class UserFixtures extends Fixture\n$user->setPassword($this->passwordEncoder->encodePassword($user, $password));\n$user->setEmail($email);\n$user->setRoles($roles);\n+ $user->setLocale('en');\n+ $user->setBackendTheme('default');\n$manager->persist($user);\n$this->addReference($username, $user);\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/User.php", "new_path": "src/Entity/User.php", "diff": "@@ -85,6 +85,16 @@ class User implements UserInterface, \\Serializable\n*/\nprivate $lastIp;\n+ /**\n+ * @ORM\\Column(type=\"string\", length=191, nullable=true)\n+ */\n+ private $locale;\n+\n+ /**\n+ * @ORM\\Column(type=\"string\", length=191, nullable=true)\n+ */\n+ private $backendTheme;\n+\npublic function __construct()\n{\n}\n@@ -225,4 +235,28 @@ class User implements UserInterface, \\Serializable\nreturn $this;\n}\n+\n+ public function getLocale(): ?string\n+ {\n+ return $this->locale;\n+ }\n+\n+ public function setLocale(?string $locale): self\n+ {\n+ $this->locale = $locale;\n+\n+ return $this;\n+ }\n+\n+ public function getBackendTheme(): ?string\n+ {\n+ return $this->backendTheme;\n+ }\n+\n+ public function setBackendTheme(?string $backendTheme): self\n+ {\n+ $this->backendTheme = $backendTheme;\n+\n+ return $this;\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<link href=\"https://fonts.googleapis.com/css?family=Open+Sans:400,600|Source+Sans+Pro:300,400,600&amp;subset=latin-ext\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.3.1/css/all.css\" integrity=\"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU\" crossorigin=\"anonymous\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets/bolt.css') }}\">\n- <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets/theme-default.css') }}\">\n+ {% set backendTheme = 'assets/theme-' ~ user.backendTheme|default('default') ~ '.css' %}\n+ <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset(backendTheme) }}\">\n{% endblock %}\n</head>\n" }, { "change_type": "MODIFY", "old_path": "templates/dashboard/dashboard.twig", "new_path": "templates/dashboard/dashboard.twig", "diff": "{% extends '@bolt/_base/layout.twig' %}\n{% block title %}\n- <i class='fas mr-2 fa-tachometer-alt'></i><strong>Dashboard</strong>\n+ <i class='fas mr-2 fa-tachometer-alt'></i><strong>{{ 'general.dashboard'|trans }}</strong>\n{% endblock title %}\n{% block main %}\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.es.xlf", "new_path": "translations/messages.es.xlf", "diff": "<target>Visita bolt.cm</target>\n</segment>\n</unit>\n+ <unit id=\"1sstKF9\" name=\"title.edit_user\">\n+ <segment>\n+ <source>title.edit_user</source>\n+ <target>Editar Usuario</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.nl.xlf", "new_path": "translations/messages.nl.xlf", "diff": "</notes>\n<segment>\n<source>label.fullname</source>\n- <target></target>\n+ <target>Volledige naam</target>\n</segment>\n</unit>\n<unit id=\"D2N6_cP\" name=\"label.email\">\n</notes>\n<segment>\n<source>label.email</source>\n- <target></target>\n+ <target>E-mail</target>\n</segment>\n</unit>\n<unit id=\"pGkejkU\" name=\"label.current_password\">\n<target></target>\n</segment>\n</unit>\n+ <unit id=\"Oiwdkpg\" name=\"The Default theme\">\n+ <segment>\n+ <source>The Default theme</source>\n+ <target>Het standaard thema</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" }, { "change_type": "MODIFY", "old_path": "translations/validators.en.xlf", "new_path": "translations/validators.en.xlf", "diff": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n-<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"nl\" trgLang=\"en\">\n+<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"en\" trgLang=\"en\">\n<file id=\"validators.en\">\n<unit id=\"TG1D5NO\" name=\"post.blank_summary\">\n<notes>\n" } ]
PHP
MIT License
bolt/core
Wrapping up Localisation
95,144
02.11.2018 21:23:14
-3,600
3251ac099cbe5a5defdec5127aed489f86a3dd4d
Working on L10n
[ { "change_type": "MODIFY", "old_path": "src/Content/MenuBuilder.php", "new_path": "src/Content/MenuBuilder.php", "diff": "@@ -10,6 +10,7 @@ use Bolt\\Repository\\ContentRepository;\nuse Knp\\Menu\\FactoryInterface;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\n+use Symfony\\Component\\Translation\\TranslatorInterface;\nclass MenuBuilder\n{\n@@ -27,6 +28,10 @@ class MenuBuilder\n/** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n+ /**\n+ * @var TranslatorInterface\n+ */\n+ private $translator;\n/**\n* MenuBuilder constructor.\n@@ -37,29 +42,32 @@ class MenuBuilder\n* @param ContentRepository $content\n* @param UrlGeneratorInterface $urlGenerator\n*/\n- public function __construct(FactoryInterface $factory, Config $config, Stopwatch $stopwatch, ContentRepository $content, UrlGeneratorInterface $urlGenerator)\n+ public function __construct(FactoryInterface $factory, Config $config, Stopwatch $stopwatch, ContentRepository $content, UrlGeneratorInterface $urlGenerator, TranslatorInterface $translator)\n{\n$this->config = $config;\n$this->factory = $factory;\n$this->stopwatch = $stopwatch;\n$this->content = $content;\n$this->urlGenerator = $urlGenerator;\n+ $this->translator = $translator;\n}\npublic function createSidebarMenu()\n{\n$this->stopwatch->start('bolt.sidebar');\n+ $t = $this->translator;\n+\n$menu = $this->factory->createItem('root');\n$menu->addChild('Dashboard', ['uri' => 'homepage', 'extras' => [\n- 'name' => 'Dashboard',\n+ 'name' => $t->trans('caption.dashboard'),\n'icon' => 'fa-tachometer-alt',\n'link' => '/bolt/',\n]]);\n$menu->addChild('Content', ['uri' => 'content', 'extras' => [\n- 'name' => 'Content',\n+ 'name' => $t->trans('caption.content'),\n'type' => 'separator',\n'icon' => 'fa-file',\n]]);\n@@ -83,7 +91,7 @@ class MenuBuilder\n}\n$menu->addChild('Settings', ['uri' => 'settings', 'extras' => [\n- 'name' => 'Settings',\n+ 'name' => $t->trans('caption.settings'),\n'type' => 'separator',\n'icon' => 'fa-wrench',\n]]);\n@@ -91,81 +99,69 @@ class MenuBuilder\n// Configuration submenu\n$menu->addChild('Configuration', ['uri' => 'configuration', 'extras' => [\n- 'name' => 'Configuration',\n+ 'name' => $t->trans('caption.configuration'),\n'icon' => 'fa-flag',\n'link' => '/bolt/finder/config',\n]]);\n$menu['Configuration']->addChild('Users &amp; Permissions', ['uri' => 'users', 'extras' => [\n- 'name' => 'Users &amp; Permissions',\n+ 'name' => $t->trans('caption.users_permissions'),\n'icon' => 'fa-group',\n'link' => '/bolt/finder/config',\n]]);\n$menu['Configuration']->addChild('Main configuration', ['uri' => 'config', 'extras' => [\n- 'name' => 'Main configuration',\n+ 'name' => $t->trans('caption.main_configuration'),\n'icon' => 'fa-cog',\n'link' => '/bolt/editfile/config?file=/bolt/config.yaml',\n]]);\n$menu['Configuration']->addChild('ContentTypes', ['uri' => 'contenttypes', 'extras' => [\n- 'name' => 'ContentTypes',\n+ 'name' => $t->trans('caption.contenttypes'),\n'icon' => 'fa-paint-brush',\n'link' => '/bolt/editfile/config?file=/bolt/contenttypes.yml',\n]]);\n- $menu['Configuration']->addChild('Taxonomy', ['uri' => 'taxonomy', 'extras' => [\n- 'name' => 'Taxonomy',\n+ $menu['Configuration']->addChild('Taxonomies', ['uri' => 'taxonomy', 'extras' => [\n+ 'name' => $t->trans('caption.taxonomies'),\n'icon' => 'fa-tags',\n'link' => '/bolt/editfile/config?file=/bolt/taxonomy.yml',\n]]);\n$menu['Configuration']->addChild('Menu set up', ['uri' => 'menusetup', 'extras' => [\n- 'name' => 'Menu set up',\n+ 'name' => $t->trans('caption.menu_setup'),\n'type' => 'separator',\n'icon' => 'fa-list',\n'link' => '/bolt/editfile/config?file=/bolt/menu.yml',\n]]);\n$menu['Configuration']->addChild('Routing set up', ['uri' => 'routing', 'extras' => [\n- 'name' => 'Routing set up',\n+ 'name' => $t->trans('caption.routing_setup'),\n'icon' => 'fa-random',\n'link' => '/bolt/editfile/config?file=/bolt/routing.yml',\n]]);\n$menu['Configuration']->addChild('Check database', ['uri' => 'database', 'extras' => [\n- 'name' => 'Check database',\n+ 'name' => $t->trans('caption.check_database'),\n'type' => 'separator',\n'icon' => 'fa-database',\n'link' => '/bolt/finder/config',\n]]);\n$menu['Configuration']->addChild('Clear the cache', ['uri' => 'cache', 'extras' => [\n- 'name' => 'Clear the cache',\n+ 'name' => $t->trans('caption.clear_cache'),\n'icon' => 'fa-eraser',\n'link' => '/bolt/finder/config',\n]]);\n- $menu['Configuration']->addChild('Change Log', ['uri' => 'else', 'extras' => [\n- 'name' => 'Change Log',\n- 'icon' => 'fa-archive',\n- 'link' => '/bolt/finder/config',\n- ]]);\n-\n- $menu['Configuration']->addChild('System Log', ['uri' => 'else', 'extras' => [\n- 'name' => 'System Log',\n- 'icon' => 'fa-archive',\n- 'link' => '/bolt/finder/config',\n- ]]);\n-\n$menu['Configuration']->addChild('Set-up checks', ['uri' => 'else', 'extras' => [\n- 'name' => 'Set-up checks',\n+ 'name' => $t->trans('caption.setup_checks'),\n'icon' => 'fa-support',\n'link' => '/bolt/finder/config',\n]]);\n$menu['Configuration']->addChild('Translations: Messages', ['uri' => 'else', 'extras' => [\n- 'name' => 'Translations: Messages',\n+ 'name' => $t->trans('caption.translations'),\n'type' => 'separator',\n'icon' => 'fa-flag',\n'link' => '/bolt/finder/config',\n@@ -173,25 +169,25 @@ class MenuBuilder\n// File Management submenu\n$menu->addChild('File Management', ['uri' => 'content-files', 'extras' => [\n- 'name' => 'File Management',\n+ 'name' => $t->trans('caption.file_management'),\n'icon' => 'fa-flag',\n'link' => '/bolt/finder/files',\n]]);\n$menu['File Management']->addChild('Uploaded files', ['uri' => 'content-files', 'extras' => [\n- 'name' => 'Uploaded files',\n+ 'name' => $t->trans('caption.uploaded_files'),\n'icon' => 'fa-folder-open-o',\n'link' => '/bolt/finder/files',\n]]);\n$menu['File Management']->addChild('View/edit Templates', ['uri' => 'theme-files', 'extras' => [\n- 'name' => 'View/edit Templates',\n+ 'name' => $t->trans('caption.view_edit_templates'),\n'icon' => 'fa-desktop',\n'link' => '/bolt/finder/themes',\n]]);\n$menu->addChild('Extensions', ['uri' => 'extensions', 'extras' => [\n- 'name' => 'Extensions',\n+ 'name' => $t->trans('caption.extensions'),\n'icon' => 'fa-cubes',\n'link' => '/bolt/extensions',\n]]);\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/_content_actions.twig", "new_path": "templates/_partials/_content_actions.twig", "diff": "<div class=\"btn-group\">\n<a href=\"{{ path('bolt_edit_record', {'id': record.id}) }}\" class=\"btn btn-light\">\n- <i class=\"fas fa-edit\"></i> {{ __('edit') }}\n+ <i class=\"fas fa-edit\"></i> {{ 'edit'|trans }}\n</a>\n<button type=\"button\" class=\"btn btn-light dropdown-toggle dropdown-toggle-split\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n- <span class=\"sr-only\">Toggle Dropdown</span>\n+ <span class=\"sr-only\">{{ 'action.toggle_dropdown'|trans }}</span>\n</button>\n<div class=\"dropdown-menu dropdown-menu-right\">\n{% if record.status == \"published\" and record.link is not empty %}\n<a class=\"dropdown-item\" href=\"{{ record.link }}\" target=\"_blank\">\n- <i class=\"fas fa-external-link-square-alt\"></i> {{ __('general.view-on-site') }}\n+ <i class=\"fas fa-external-link-square-alt\"></i> {{ 'general.view-on-site'|trans }}\n</a>\n{% endif %}\n{% endif %}\n{% if permissions.create %}\n<a class=\"dropdown-item\" href=\"{{ path('bolt_edit_record', {'id': record.id, 'duplicate': 1}) }}\">\n- <i class=\"fas fa-copy\"></i> {{ __('contenttypes.generic.duplicate', {'%contenttype%': record.definition.singular_name}) }}\n+ <i class=\"fas fa-copy\"></i> {{ 'contenttypes.generic.duplicate', {'%contenttype%': record.definition.singular_name}|trans }}\n</a>\n{% endif %}\n{% if permissions.delete %}\n{% endif %}\n<span class=\"dropdown-item\">\n- {{ __('general.author') }}: <strong><i class=\"fas fa-user\"></i>\n+ {{ 'general.author'|trans }}: <strong><i class=\"fas fa-user\"></i>\n{% set owner = record.author %}\n{% if owner %}\n{{ owner[:15] }}\n</strong>\n</span>\n- <span class=\"dropdown-item\">{{ __('general.status-current') }}:\n+ <span class=\"dropdown-item\">{{ 'general.status-current'|trans }}:\n<strong> {{ record.status }}</strong></span>\n- <span class=\"dropdown-item\">{{ __('general.slug') }}:\n+ <span class=\"dropdown-item\">{{ 'general.slug'|trans }}:\n<code title=\"{{ record.slug }}\">{{ record.slug|excerpt(24) }}</code>\n</span>\n- <span class=\"dropdown-item\">{{ __('general.created-on') }}:\n+ <span class=\"dropdown-item\">{{ 'general.created-on'|trans }}:\n<i class=\"fas fa-asterisk\"></i> {{ record.datecreated|date(\"Y-m-d H:i\") }}\n</span>\n- <span class=\"dropdown-item\">{{ __('general.published-on') }}:\n+ <span class=\"dropdown-item\">{{ 'general.published-on'|trans }}:\n<i class=\"fas fa-calendar\"></i> {{ record.datepublish|date(\"Y-m-d H:i\") }}\n</span>\n- <span class=\"dropdown-item\">{{ __('general.last-edited-on') }}:\n+ <span class=\"dropdown-item\">{{ 'general.last-edited-on'|trans }}:\n<i class=\"fas fa-sync-alt\"></i> {{ record.datechanged|date(\"Y-m-d H:i\") }}\n</span>\n" }, { "change_type": "MODIFY", "old_path": "templates/content/listing.twig", "new_path": "templates/content/listing.twig", "diff": "<div class=\"card\">\n<div class=\"card-header\">\n- Contentlisting\n+ {{ 'title.contentlisting'|trans }}\n</div>\n<div class=\"card-body\">\n(filtering options go here)\n" }, { "change_type": "MODIFY", "old_path": "templates/dashboard/dashboard.twig", "new_path": "templates/dashboard/dashboard.twig", "diff": "{% extends '@bolt/_base/layout.twig' %}\n{% block title %}\n- <i class='fas mr-2 fa-tachometer-alt'></i><strong>{{ 'general.dashboard'|trans }}</strong>\n+ <i class='fas mr-2 fa-tachometer-alt'></i><strong>{{ 'caption.dashboard'|trans }}</strong>\n{% endblock title %}\n{% block main %}\n" }, { "change_type": "MODIFY", "old_path": "templates/finder/_files.twig", "new_path": "templates/finder/_files.twig", "diff": "<thead class=\"thead-light\">\n<tr>\n<th></th>\n- <th>Filename</th>\n- <th>Thumbnail</th>\n- <th>Size</th>\n- <th>Date</th>\n- <th>Actions</th>\n+ <th>{{ 'filename'|trans }}</th>\n+ <th>{{ 'thumbnail'|trans }}</th>\n+ <th>{{ 'size'|trans }}</th>\n+ <th>{{ 'date'|trans }}</th>\n+ <th>{{ 'actions'|trans }}</th>\n</tr>\n</thead>\n" }, { "change_type": "MODIFY", "old_path": "templates/finder/_folders.twig", "new_path": "templates/finder/_folders.twig", "diff": "<thead class=\"thead-light\">\n<tr>\n<th></th>\n- <th>Directoryname</th>\n- <th>Actions</th>\n+ <th>{{ 'directoryname'|trans }}</th>\n+ <th>{{ 'actions'|trans }}</th>\n</tr>\n</thead>\n" }, { "change_type": "MODIFY", "old_path": "templates/finder/_quickselect.twig", "new_path": "templates/finder/_quickselect.twig", "diff": "<div class=\"row\">\n<div class=\"col-2\">\n- <label>Quick select:</label>\n+ <label>{{ 'label.quick_select'|trans }}</label>\n</div>\n<div class=\"col-8\">\n<select name=\"quickselect\" id=\"quickselect\">\n- <option>Quick select a file</option>\n+ <option>{{ 'form.quick_select_file'|trans }}</option>\n{% for file in allfiles %}\n<option value=\"{{ file.filename }}\">\n</select>\n</div>\n<div class=\"col-2\">\n- <button class=\"btn btn-secondary\">Go</button>\n+ <button class=\"btn btn-secondary\">{{ 'action.go'|trans }}</button>\n</div>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "templates/finder/_uploader.twig", "new_path": "templates/finder/_uploader.twig", "diff": "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/basic.css\" integrity=\"sha256-NI6EfwSJhhs7gXBPbwLXD00msI29Bku3GDJT8gYW+gc=\" crossorigin=\"anonymous\" />\n<div class=\"card mb-4\">\n- <div class=\"card-header\">File uploader</div>\n+ <div class=\"card-header\">{{ 'caption.file_uploader'|trans }}</div>\n<script type=\"text/javascript\" src=\"https://rawgit.com/enyo/dropzone/master/dist/dropzone.js\"></script>\n" } ]
PHP
MIT License
bolt/core
Working on L10n
95,144
02.11.2018 21:37:01
-3,600
4e69e481710e3f43589a141cdb6f8b2b2ace1abe
Injecting labels in topbar Vue component
[ { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<!-- Admin Toolbar -->\n<nav id=\"toolbar\" class=\"admin__toolbar\">\n+ {% set labels = {\n+ 'about.bolt_documentation': 'about.bolt_documentation'|trans,\n+ 'action.visit_site': 'action.visit_site'|trans,\n+ 'action.create_new': 'action.create_new'|trans,\n+ 'general.greeting': 'general.greeting'|trans({'%name%': user.fullName})\n+ } %}\n<admin-toolbar\n:menu=\"{{ sidebarmenu() }}\"\nuser=\"{{user|default()}}\"\nsite-name=\"{% if config is defined %}{{ config.get('general/sitename') }}{% endif %}\"\n+ labels=\"{{ labels|json_encode() }}\"\n></admin-toolbar>\n</nav>\n<!-- End Admin Toolbar -->\n" } ]
PHP
MIT License
bolt/core
Injecting labels in topbar Vue component
95,144
03.11.2018 06:38:27
-3,600
fd609f2a75ab32a31ed9b04eb9afb0c8c7fc5a57
Adding `jsonlabels` twig function
[ { "change_type": "MODIFY", "old_path": "src/Content/MenuBuilder.php", "new_path": "src/Content/MenuBuilder.php", "diff": "@@ -41,6 +41,7 @@ class MenuBuilder\n* @param Stopwatch $stopwatch\n* @param ContentRepository $content\n* @param UrlGeneratorInterface $urlGenerator\n+ * @param TranslatorInterface $translator\n*/\npublic function __construct(FactoryInterface $factory, Config $config, Stopwatch $stopwatch, ContentRepository $content, UrlGeneratorInterface $urlGenerator, TranslatorInterface $translator)\n{\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/ContentHelperExtension.php", "new_path": "src/Twig/Extension/ContentHelperExtension.php", "diff": "@@ -8,6 +8,7 @@ use Bolt\\Content\\FieldFactory;\nuse Bolt\\Content\\MenuBuilder;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Twig\\Runtime;\n+use Symfony\\Component\\Translation\\TranslatorInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n@@ -16,9 +17,19 @@ class ContentHelperExtension extends AbstractExtension\n/** @var MenuBuilder */\nprivate $menuBuilder;\n- public function __construct(MenuBuilder $menuBuilder)\n+ /** @var TranslatorInterface */\n+ private $translator;\n+\n+ /**\n+ * ContentHelperExtension constructor.\n+ *\n+ * @param MenuBuilder $menuBuilder\n+ * @param TranslatorInterface $translator\n+ */\n+ public function __construct(MenuBuilder $menuBuilder, TranslatorInterface $translator)\n{\n$this->menuBuilder = $menuBuilder;\n+ $this->translator = $translator;\n}\n/**\n@@ -39,6 +50,7 @@ class ContentHelperExtension extends AbstractExtension\nreturn [\nnew TwigFunction('sidebarmenu', [$this, 'sidebarmenu']),\n+ new TwigFunction('jsonlabels', [$this, 'jsonlabels']),\nnew TwigFunction('fieldfactory', [$this, 'fieldfactory']),\nnew TwigFunction('selectoptionsfromarray', [Runtime\\ContentHelperRuntime::class, 'selectoptionsfromarray']),\nnew TwigFunction('icon', [$this, 'icon'], $safe),\n@@ -73,4 +85,19 @@ class ContentHelperExtension extends AbstractExtension\nreturn \"<i class='fas mr-2 fa-$icon'></i>\";\n}\n+\n+ /**\n+ * @param array $labels\n+ * @return string\n+ */\n+ public function jsonlabels(array $labels): string\n+ {\n+ $result = [];\n+ foreach ($labels as $label) {\n+ $key = is_array($label) ? $label[0] : $label;\n+ $result[$key] = $this->translator->trans(...(array) $label);\n+ }\n+\n+ return json_encode($result);\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "</head>\n<body>\n+\n<div class=\"admin has-{{ block('container') }}\">\n<!-- Admin Toolbar -->\n<nav id=\"toolbar\" class=\"admin__toolbar\">\n- {% set labels = {\n- 'about.bolt_documentation': 'about.bolt_documentation'|trans,\n- 'action.visit_site': 'action.visit_site'|trans,\n- 'action.create_new': 'action.create_new'|trans,\n- 'general.greeting': 'general.greeting'|trans({'%name%': user.fullName})\n- } %}\n+ {% set labels = jsonlabels(['about.bolt_documentation', 'action.visit_site', 'action.create_new', ['general.greeting', {'%name%': user.fullName}] ]) %}\n<admin-toolbar\n:menu=\"{{ sidebarmenu() }}\"\nuser=\"{{user|default()}}\"\nsite-name=\"{% if config is defined %}{{ config.get('general/sitename') }}{% endif %}\"\n- labels=\"{{ labels|json_encode() }}\"\n+ labels='{{ labels }}'\n></admin-toolbar>\n</nav>\n<!-- End Admin Toolbar -->\n" } ]
PHP
MIT License
bolt/core
Adding `jsonlabels` twig function
95,144
03.11.2018 07:16:29
-3,600
90dd50291dd804636b02954238f5cf41e1b011a7
Make checkboxes work
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/EditRecordController.php", "new_path": "src/Controller/Backend/EditRecordController.php", "diff": "@@ -105,6 +105,13 @@ class EditRecordController extends BaseController\n$content->setPublishedAt(new Carbon($post['publishedAt']));\n$content->setDepublishedAt(new Carbon($post['depublishedAt']));\n+ // Checkboxes not in post need to be set to '0'\n+ foreach ($content->getFields() as $field) {\n+ if ($field->getDefinition()->get('type') === 'checkbox') {\n+ $field->setValue(['0']);\n+ }\n+ }\n+\nforeach ($post['fields'] as $key => $postfield) {\n$this->updateFieldFromPost($key, $postfield, $content);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/ContentHelperExtension.php", "new_path": "src/Twig/Extension/ContentHelperExtension.php", "diff": "@@ -88,6 +88,7 @@ class ContentHelperExtension extends AbstractExtension\n/**\n* @param array $labels\n+ *\n* @return string\n*/\npublic function jsonlabels(array $labels): string\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/checkbox.twig", "new_path": "templates/editcontent/fields/checkbox.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- {{ value }}\n- <label>{{ label }}</label>\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"checkbox\" value=\"{{ value }}\">\n<div class=\"custom-control custom-checkbox\">\n- <input type=\"checkbox\" class=\"custom-control-input\" id=\"{{ name }}\" name=\"{{ name }}\" value=\"{{ value }}\">\n+ <input type=\"checkbox\" class=\"custom-control-input\" id=\"{{ name }}\" name=\"{{ name }}\" value=\"1\" {{ value ? 'checked' }}>\n<label class=\"custom-control-label\" for=\"{{ name }}\">{{ label }}</label>\n</div>\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Make checkboxes work
95,144
03.11.2018 08:12:46
-3,600
8f48eab02f8576d5c764e5b36ebb58eb671216ef
Fixed up flashes and textarea
[ { "change_type": "MODIFY", "old_path": "assets/scss/layout/_admin.scss", "new_path": "assets/scss/layout/_admin.scss", "diff": "@@ -61,10 +61,18 @@ $admin-header-height: 70px;\n&--container{\ndisplay: grid;\ngrid-template-columns: auto $admin-sidebar-width * 1.25;\n- grid-template-areas: \"main aside\";\n+ grid-template-areas: \"flashes aside\"\n+ \"main aside\";\npadding: $spacer * 2;\n}\n+ &--flashes{\n+ grid-area: flashes;\n+ min-width: 0;\n+ padding-right: $spacer * 2;\n+ }\n+\n+\n&--main{\ngrid-area: main;\nmin-width: 0;\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/bootstrap/bootstrap.scss", "new_path": "assets/scss/vendor/bootstrap/bootstrap.scss", "diff": "@import \"~bootstrap/scss/card\";\n@import \"~bootstrap/scss/alert\";\n+@import \"~bootstrap/scss/close\";\n@import \"~bootstrap/scss/progress\";\n@import \"~bootstrap/scss/nav\";\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<div class=\"admin__body\" id=\"{% block container %}content{% endblock %}\">\n<div class=\"container\">\n<div class=\"admin__body--container\">\n+\n+ <div class=\"admin__body--flashes\">\n{{ include('_partials/_flash_messages.twig') }}\n+ </div>\n+\n<main class=\"admin__body--main\">\n{% block main %}\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/textarea.twig", "new_path": "templates/editcontent/fields/textarea.twig", "diff": "{% block field %}\n<editor-textarea\n- :value=\"'{{ value|json_encode() }}'\"\n+ :value='{{ value|json_encode() }}'\n:label=\"'{{ label }}'\"\n:name=\"'{{ name }}'\"\n></editor-textarea>\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/media_edit.twig", "new_path": "templates/editcontent/media_edit.twig", "diff": "<br>\n-<form method=\"post\" id=\"media_edit\">\n+<form method=\"post\" id=\"editcontent\">\n<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('media_edit') }}\">\n{% include '@bolt/editcontent/fields/text.twig' with {\n<input type=\"submit\" class=\"btn btn-primary\" value=\"Save\">\n- {{ dump(media) }}\n-\n</form>\n" } ]
PHP
MIT License
bolt/core
Fixed up flashes and textarea
95,180
03.11.2018 13:25:40
-3,600
7a86bf9d62ea446717ee808115e21d734836e9da
added extra slug functionality
[ { "change_type": "ADD", "old_path": "assets/js/Components/Editor/Partials/Helper.vue", "new_path": "assets/js/Components/Editor/Partials/Helper.vue", "diff": "" }, { "change_type": "ADD", "old_path": "assets/js/Components/Editor/Partials/Label.vue", "new_path": "assets/js/Components/Editor/Partials/Label.vue", "diff": "" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Editor/Slug.vue", "new_path": "assets/js/Components/Editor/Slug.vue", "diff": "@@ -56,8 +56,18 @@ export default {\nicon: 'lock'\n};\n},\n+ mounted(){\n+ setTimeout(()=>{\n+ const title = document.querySelector(`input[name='fields[${this.generate}]']`).value;\n+ if(title.length <= 0){\n+ this.$root.$emit('generate-from-title', true);\n+ }\n+ }, 0);\n+ this.$root.$on('slugify-from-title', data => this.generateSlug());\n+ },\nmethods: {\neditSlug(){\n+ this.$root.$emit('generate-from-title', false);\nif(!this.edit){\nthis.edit = true;\nthis.buttonText = \"Edit\"\n@@ -74,6 +84,7 @@ export default {\nconst title = document.querySelector(`input[name='fields[${this.generate}]']`).value;\nconst slug = this.$options.filters.slugify(title)\nthis.val = slug;\n+ this.$root.$emit('generate-from-title', true);\n}\n}\n};\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Views/editor.js", "new_path": "assets/js/Views/editor.js", "diff": "@@ -2,6 +2,7 @@ import Vue from \"vue\";\n/**\n* Components\n*/\n+import Text from \"../Components/Editor/Text\";\nimport Slug from \"../Components/Editor/Slug\";\nimport Textarea from \"../Components/Editor/Textarea\";\nimport Markdown from \"../Components/Editor/Markdown\";\n@@ -12,6 +13,7 @@ import Image from \"../Components/Editor/Image\";\n/**\n* Register Components\n*/\n+Vue.component(\"editor-text\", Text);\nVue.component(\"editor-slug\", Slug);\nVue.component(\"editor-textarea\", Textarea);\nVue.component(\"editor-markdown\", Markdown);\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/admin/_sidebar.scss", "new_path": "assets/scss/modules/admin/_sidebar.scss", "diff": "background: var(--admin-sidebar);\ncolor: var(--admin-sidebar-text);\nheight: 100%;\n- box-shadow: 0 0 40px 0 rgba(0,0,0, 0.07);\n+ // box-shadow: 0 0 40px 0 rgba(0,0,0, 0.07);\n&--separator {\npadding: 0 $spacer;\nmargin: $spacer / 2 0;\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/date.twig", "new_path": "templates/editcontent/fields/date.twig", "diff": "{% set value = value|date(format='c') %}\n{% endif %}\n- <editor-date\n+ <editor-datetime\n:value=\"'{{ value }}'\"\n:label=\"'{{ label }}'\"\n:name=\"'{{ name }}'\"\n" } ]
PHP
MIT License
bolt/core
added extra slug functionality
95,144
03.11.2018 13:31:56
-3,600
425f22f76ba3db817f18d5d97d1bebbcfdf0c982
Working on Twif filters/functions
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -46,3 +46,6 @@ services:\narguments: [\"@knp_menu.factory\"]\ntags:\n- { name: knp_menu.menu_builder, method: createSidebarMenu, alias: sidebar } # The alias is what is used to retrieve the menu\n+\n+ # config/services.yaml\n+ Twig\\Extension\\StringLoaderExtension:\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/AppExtension.php", "new_path": "src/Twig/Extension/AppExtension.php", "diff": "@@ -4,7 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Twig\\Extension;\n-use Bolt\\Utils\\Markdown;\nuse Symfony\\Component\\Intl\\Intl;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n@@ -12,14 +11,11 @@ use Twig\\TwigFunction;\nclass AppExtension extends AbstractExtension\n{\n- private $parser;\nprivate $localeCodes;\nprivate $locales;\n- private $menuBuilder;\n- public function __construct(Markdown $parser, string $locales)\n+ public function __construct(string $locales)\n{\n- $this->parser = $parser;\n$this->localeCodes = explode('|', $locales);\n}\n@@ -29,8 +25,6 @@ class AppExtension extends AbstractExtension\npublic function getFilters(): array\n{\nreturn [\n- new TwigFilter('md2html', [$this, 'markdownToHtml'], ['is_safe' => ['html']]),\n- new TwigFilter('markdown', [$this, 'markdownToHtml'], ['is_safe' => ['html']]),\nnew TwigFilter('order', [$this, 'dummy']),\nnew TwigFilter('unique', [$this, 'unique']),\nnew TwigFilter('localedatetime', [$this, 'dummy']),\n@@ -75,14 +69,6 @@ class AppExtension extends AbstractExtension\nreturn array_unique($array);\n}\n- /**\n- * Transforms the given Markdown content into HTML content.\n- */\n- public function markdownToHtml(string $content): string\n- {\n- return $this->parser->toHtml($content);\n- }\n-\n/**\n* Takes the list of codes of the locales (languages) enabled in the\n* application and returns an array with the name of each locale written\n" }, { "change_type": "DELETE", "old_path": "src/Twig/Extension/BoltExtension.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Twig\\Extension;\n-\n-use Bolt\\Twig\\Runtime;\n-use Twig\\Extension\\AbstractExtension;\n-use Twig\\TwigFilter;\n-use Twig\\TwigFunction;\n-\n-/**\n- * Bolt base Twig functionality and definitions.\n- */\n-class BoltExtension extends AbstractExtension\n-{\n- /**\n- * {@inheritdoc}\n- */\n- public function getFunctions()\n- {\n- $env = ['needs_environment' => false];\n-\n- return [\n- new TwigFunction('first', [Runtime\\BoltRuntime::class, 'dummy'], $env),\n- new TwigFunction('last', [Runtime\\BoltRuntime::class, 'dummy'], $env),\n- ];\n- }\n-\n- /**\n- * {@inheritdoc}\n- */\n- public function getFilters()\n- {\n- $env = ['needs_environment' => true];\n-\n- return [\n- new TwigFilter('ucfirst', [Runtime\\BoltRuntime::class, 'dummy'], $env + ['alternative' => 'capitalize']),\n- ];\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/HtmlExtension.php", "new_path": "src/Twig/Extension/HtmlExtension.php", "diff": "@@ -4,16 +4,22 @@ declare(strict_types=1);\nnamespace Bolt\\Twig\\Extension;\n-use Bolt\\Twig\\Runtime;\n+use Bolt\\Utils\\Markdown;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n-use Twig\\TwigFunction;\n/**\n* HTML functionality Twig extension.\n*/\nclass HtmlExtension extends AbstractExtension\n{\n+ private $parser;\n+\n+ public function __construct(Markdown $parser)\n+ {\n+ $this->parser = $parser;\n+ }\n+\n/**\n* {@inheritdoc}\n*/\n@@ -23,7 +29,7 @@ class HtmlExtension extends AbstractExtension\n$env = ['needs_environment' => true];\nreturn [\n- new TwigFunction('markdown', [Runtime\\HtmlRuntime::class, 'dummy'], $safe),\n+ new TwigFilter('markdown', [$this, 'markdown'], $safe),\n];\n}\n@@ -36,8 +42,15 @@ class HtmlExtension extends AbstractExtension\n$env = ['needs_environment' => true];\nreturn [\n- new TwigFilter('markdown', [Runtime\\HtmlRuntime::class, 'dummy'], $safe),\n- new TwigFilter('twig', [Runtime\\HtmlRuntime::class, 'twig'], $env + $safe),\n+ new TwigFilter('markdown', [$this, 'markdown'], $safe),\n];\n}\n+\n+ /**\n+ * Transforms the given Markdown content into HTML content.\n+ */\n+ public function markdown(string $content): string\n+ {\n+ return $this->parser->toHtml($content);\n+ }\n}\n" }, { "change_type": "DELETE", "old_path": "src/Twig/Runtime/BoltRuntime.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Twig\\Runtime;\n-\n-/**\n- * Bolt extension runtime for Twig.\n- */\n-class BoltRuntime\n-{\n- public function dummy($input = null)\n- {\n- return $input;\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "src/Twig/Runtime/HtmlRuntime.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Twig\\Runtime;\n-\n-use Twig\\Environment;\n-\n-/**\n- * Bolt specific Twig functions and filters for HTML.\n- */\n-class HtmlRuntime\n-{\n- public function dummy($input = null)\n- {\n- return $input;\n- }\n-\n- /**\n- * Formats the given string as Twig in HTML.\n- *\n- * @param Environment $env\n- * @param string $snippet\n- * @param array $context\n- *\n- * @return string Twig output\n- */\n- public function twig(Environment $env, $snippet, $context = [])\n- {\n- $template = $env->createTemplate((string) $snippet);\n-\n- return twig_include($env, $context, $template, [], true, false, true);\n- }\n-}\n" } ]
PHP
MIT License
bolt/core
Working on Twif filters/functions
95,144
03.11.2018 14:21:48
-3,600
eb968001260766c00ed7764c536a19722259842c
Working on Twig functions / filters
[ { "change_type": "MODIFY", "old_path": "src/Helpers/Str.php", "new_path": "src/Helpers/Str.php", "diff": "@@ -18,7 +18,7 @@ class Str extends \\Bolt\\Common\\Str\n*\n* @return string\n*/\n- public static function makeSafe($str, $strict = false, $extrachars = '')\n+ public static function makeSafe(string $str, bool $strict = false, string $extrachars = ''): string\n{\n$str = str_replace('&amp;', '', $str);\n@@ -44,6 +44,13 @@ class Str extends \\Bolt\\Common\\Str\nreturn $str;\n}\n+ public static function slug(string $str): string\n+ {\n+ $slugify = Slugify::create();\n+\n+ return $slugify->slugify($str);\n+ }\n+\n/**\n* Add 'soft hyphens' &shy; to a string, so that it won't break layout in HTML when\n* using strings without spaces or dashes. Only breaks in long (> 19 chars) words.\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/AdminExtension.php", "new_path": "src/Twig/Extension/AdminExtension.php", "diff": "@@ -5,12 +5,25 @@ declare(strict_types=1);\nnamespace Bolt\\Twig\\Extension;\nuse Bolt\\Twig\\Runtime;\n+use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\nuse Twig\\TwigFunction;\nclass AdminExtension extends AbstractExtension\n{\n+ /** @var UrlGeneratorInterface */\n+ private $urlGenerator;\n+\n+ /**\n+ * Constructor.\n+ *\n+ * @param UrlGeneratorInterface $urlGenerator\n+ */\n+ public function __construct(UrlGeneratorInterface $urlGenerator) {\n+ $this->urlGenerator = $urlGenerator;\n+ }\n+\n/**\n* {@inheritdoc}\n*/\n@@ -19,7 +32,6 @@ class AdminExtension extends AbstractExtension\n$safe = ['is_safe' => ['html']];\nreturn [\n- new TwigFunction('__', [Runtime\\AdminRuntime::class, 'dummy'], $safe),\n];\n}\n@@ -31,8 +43,29 @@ class AdminExtension extends AbstractExtension\n$safe = ['is_safe' => ['html']];\nreturn [\n- new TwigFilter('__', [Runtime\\AdminRuntime::class, 'dummy']),\n- new TwigFilter('ymllink', [Runtime\\AdminRuntime::class, 'ymllink'], $safe),\n+ new TwigFilter('ymllink', [$this, 'ymllink'], $safe),\n];\n}\n+\n+ /**\n+ * Create a link to edit a .yml file, if a filename is detected in the string. Mostly\n+ * for use in Flashbag messages, to allow easy editing.\n+ *\n+ * @param string $str\n+ *\n+ * @return string Resulting string\n+ */\n+ public function ymllink($str)\n+ {\n+ return preg_replace_callback(\n+ '/([a-z0-9_-]+\\.yml)/i',\n+ function ($matches) {\n+ $path = $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/' . $matches[1]]);\n+ $link = sprintf(' <a href=\"%s\">%s</a>', $path, $matches[1]);\n+\n+ return $link;\n+ },\n+ $str\n+ );\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/Extension/TextExtension.php", "new_path": "src/Twig/Extension/TextExtension.php", "diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Twig\\Extension;\n+use Bolt\\Helpers\\Str;\nuse Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n@@ -22,8 +23,18 @@ class TextExtension extends AbstractExtension\nreturn [\nnew TwigFilter('json_decode', [Runtime\\TextRuntime::class, 'dummy']),\n- new TwigFilter('safestring', [Runtime\\TextRuntime::class, 'dummy'], $safe),\n- new TwigFilter('slug', [Runtime\\TextRuntime::class, 'dummy']),\n+ new TwigFilter('safestring', [$this, 'safeString']),\n+ new TwigFilter('slug', [$this, 'slug']),\n];\n}\n+\n+ public function safeString($str, $strict = false, $extrachars = '')\n+ {\n+ return Str::makeSafe($str, $strict, $extrachars);\n+ }\n+\n+ public function slug($str): string\n+ {\n+ return Str::slug((string) $str);\n+ }\n}\n" }, { "change_type": "DELETE", "old_path": "src/Twig/Runtime/AdminRuntime.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Twig\\Runtime;\n-\n-use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\n-\n-/**\n- * Bolt specific Twig functions and filters for backend.\n- */\n-class AdminRuntime\n-{\n- /** @var UrlGeneratorInterface */\n- private $urlGenerator;\n-\n- /**\n- * Constructor.\n- *\n- * @param UrlGeneratorInterface $urlGenerator\n- */\n- public function __construct(\n- UrlGeneratorInterface $urlGenerator\n- ) {\n- $this->urlGenerator = $urlGenerator;\n- }\n-\n- public function dummy($input = null)\n- {\n- return $input;\n- }\n-\n- /**\n- * Create a link to edit a .yml file, if a filename is detected in the string. Mostly\n- * for use in Flashbag messages, to allow easy editing.\n- *\n- * @param string $str\n- *\n- * @return string Resulting string\n- */\n- public function ymllink($str)\n- {\n- return preg_replace_callback(\n- '/([a-z0-9_-]+\\.yml)/i',\n- function ($matches) {\n- $path = $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/' . $matches[1]]);\n- $link = sprintf(' <a href=\"%s\">%s</a>', $path, $matches[1]);\n-\n- return $link;\n- },\n- $str\n- );\n- }\n-}\n" } ]
PHP
MIT License
bolt/core
Working on Twig functions / filters
95,180
03.11.2018 18:28:23
-3,600
ce5026ee0237ae64446208f374d677241965076e
fixed grid issue
[ { "change_type": "MODIFY", "old_path": "assets/scss/layout/_admin.scss", "new_path": "assets/scss/layout/_admin.scss", "diff": "@@ -61,8 +61,8 @@ $admin-header-height: 70px;\n&--container{\ndisplay: grid;\ngrid-template-columns: auto $admin-sidebar-width * 1.25;\n- grid-template-areas: \"flashes aside\"\n- \"main aside\";\n+ grid-template-areas: \"main aside\"\n+ \"flashes aside\";\npadding: $spacer * 2;\n}\n" } ]
PHP
MIT License
bolt/core
fixed grid issue
95,180
04.11.2018 12:32:58
-3,600
1f2d48487e46e51ff2f29da3e55eb3e299ef103b
disabled edit when clicking genrate from title in slug component
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Editor/Slug.vue", "new_path": "assets/js/Components/Editor/Slug.vue", "diff": "@@ -81,7 +81,8 @@ export default {\n},\ngenerateSlug(){\nconst title = document.querySelector(`input[name='fields[${this.generate}]']`).value;\n- const slug = this.$options.filters.slugify(title)\n+ const slug = this.$options.filters.slugify(title);\n+ this.edit = false;\nthis.val = slug;\nthis.$root.$emit('generate-from-title', true);\n}\n" } ]
PHP
MIT License
bolt/core
disabled edit when clicking genrate from title in slug component
95,180
04.11.2018 12:34:08
-3,600
feff0e1a3bdb360eaa3604d1c9adf8370f64e9cc
ran as function instead
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Editor/Slug.vue", "new_path": "assets/js/Components/Editor/Slug.vue", "diff": "@@ -82,9 +82,9 @@ export default {\ngenerateSlug(){\nconst title = document.querySelector(`input[name='fields[${this.generate}]']`).value;\nconst slug = this.$options.filters.slugify(title);\n- this.edit = false;\nthis.val = slug;\nthis.$root.$emit('generate-from-title', true);\n+ return this.editSlug()\n}\n}\n};\n" } ]
PHP
MIT License
bolt/core
ran as function instead
95,180
04.11.2018 12:35:33
-3,600
639f37ae243f02cdcb442b6134a4ec1d0207f5ea
fixed slug fuckup
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Editor/Slug.vue", "new_path": "assets/js/Components/Editor/Slug.vue", "diff": "@@ -84,7 +84,10 @@ export default {\nconst slug = this.$options.filters.slugify(title);\nthis.val = slug;\nthis.$root.$emit('generate-from-title', true);\n- return this.editSlug()\n+\n+ this.edit = false;\n+ this.buttonText = \"Locked\"\n+ this.icon = 'lock'\n}\n}\n};\n" } ]
PHP
MIT License
bolt/core
fixed slug fuckup
95,180
04.11.2018 12:55:07
-3,600
8bfc6dee46dcb126c5a22b5a90fddca1e2295ae8
Added class binding to text input
[ { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/_base.twig", "new_path": "templates/editcontent/fields/_base.twig", "diff": "{% if not class|default() %}\n{% set class = field.definition.class|default() %}\n{% endif %}\n-{% set class = \"form-control \" ~ class %}\n+\n+{% set class = class %}\n{# Set the label #}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/embed.twig", "new_path": "templates/editcontent/fields/embed.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n(Embed preview, and some meta fields go here)\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/file.twig", "new_path": "templates/editcontent/fields/file.twig", "diff": "<label>Filename</label>\n</div>\n<div class=\"col-9\">\n- <input name=\"{{ name }}[filename]\" id=\"{{ id }}-filename\" placeholder=\"filename.jpg\" type=\"text\" value=\"{{ field.get('filename') }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}[filename]\" id=\"{{ id }}-filename\" placeholder=\"filename.jpg\" type=\"text\" value=\"{{ field.get('filename') }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n</div>\n</div>\n<label>Alt</label>\n</div>\n<div class=\"col-9\">\n- <input name=\"{{ name }}[alt]\" placeholder=\"An image depicting a kitten\" type=\"text\" value=\"{{ field.get('alt') }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}[alt]\" placeholder=\"An image depicting a kitten\" type=\"text\" value=\"{{ field.get('alt') }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n</div>\n</div>\n<label>Title</label>\n</div>\n<div class=\"col-9\">\n- <input name=\"{{ name }}[alt]\" placeholder=\"A description of this image\" type=\"text\" value=\"{{ field.get('title') }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}[alt]\" placeholder=\"A description of this image\" type=\"text\" value=\"{{ field.get('title') }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n</div>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/filelist.twig", "new_path": "templates/editcontent/fields/filelist.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n<mark>Note: This field is practically the same as the <code>imagelist</code>-field.</mark>\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/generic.twig", "new_path": "templates/editcontent/fields/generic.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/geolocation.twig", "new_path": "templates/editcontent/fields/geolocation.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n(Small map, lat and long go here, somewhere)\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/text.twig", "new_path": "templates/editcontent/fields/text.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n+{{class}}\n<editor-text\n:value=\"{{ value|json_encode() }}\"\n:name=\"'{{ name }}'\"\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/video.twig", "new_path": "templates/editcontent/fields/video.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n{% block field %}\n- <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"{{ class }}\" {{ attributes|default()|raw }}>\n+ <input name=\"{{ name }}\" placeholder=\"First Name\" type=\"text\" value=\"{{ value }}\" class=\"form-control {{ class }}\" {{ attributes|default()|raw }}>\n<p>(Video preview, and some meta fields go here)</p>\n" } ]
PHP
MIT License
bolt/core
Added class binding to text input
95,180
05.11.2018 10:15:23
-3,600
5d2efbd930b1fceb09c168f9c21de82d109ddc44
added large view option to row
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Filter.vue", "new_path": "assets/js/Components/Listing/Filter.vue", "diff": "<template>\n<ul class=\"listing__filter--controls\">\n<li>\n+ <button class=\"control--button\" :class=\"{'is-active': selecting}\" @click=\"filterButton('selecting', 'listing-row-selecting')\">\n+ <i :class=\"selecting ? 'fas fa-check-circle ':'far fa-circle'\"></i>\n+ </button>\n+ </li>\n+ <li class=\"control--left\">\n<button class=\"control--button\" :class=\"{'is-selected': size === 'small'}\" @click=\"changeSize('small')\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70 55\"><g fill-rule=\"nonzero\"><rect width=\"70\" height=\"10\" rx=\"3\"/><rect width=\"70\" height=\"10\" rx=\"3\" transform=\"translate(0 15)\"/><rect width=\"70\" height=\"10\" rx=\"3\" transform=\"translate(0 30)\"/><rect width=\"70\" height=\"10\" rx=\"3\" transform=\"translate(0 45)\"/></g></svg>\n</button>\n</li>\n- <li class=\"control--left\">\n+ <li>\n<button class=\"control--button\" :class=\"{'is-selected': size === 'normal'}\" @click=\"changeSize('normal')\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70 55\"><g fill-rule=\"nonzero\"><rect width=\"70\" height=\"15\" rx=\"3\"/><rect width=\"70\" height=\"15\" rx=\"3\" transform=\"translate(0 20)\"/><rect width=\"70\" height=\"15\" rx=\"3\" transform=\"translate(0 40)\"/></g></svg>\n</button>\n</li>\n<li>\n- <button class=\"control--button\" :class=\"{'is-active': sorting}\" @click=\"filterButton('sorting', 'listing-row-sorting')\">\n- <i class=\"fas fa-sort\"></i>\n+ <button class=\"control--button\" :class=\"{'is-selected': size === 'large'}\" @click=\"changeSize('large')\">\n+ <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70 55\"><g fill-rule=\"nonzero\"><rect width=\"70\" height=\"24\" rx=\"3\"/><rect width=\"70\" height=\"24\" rx=\"3\" transform=\"translate(0 31)\"/></g></svg>\n</button>\n</li>\n<li>\n- <button class=\"control--button\" :class=\"{'is-active': selecting}\" @click=\"filterButton('selecting', 'listing-row-selecting')\">\n- <i :class=\"selecting ? 'fas fa-check-circle ':'far fa-circle'\"></i>\n+ <button class=\"control--button\" :class=\"{'is-active': sorting}\" @click=\"filterButton('sorting', 'listing-row-sorting')\">\n+ <i class=\"fas\" :class=\"sorting ? 'fa-check-circle':'fa-sort'\"></i>\n</button>\n</li>\n</ul>\n@@ -28,9 +33,10 @@ export default {\nname: \"listing-filter\",\nmounted() {\nconst size = localStorage.getItem('listing-row-size');\n- if (size !== null)\n+ if (size !== null){\nthis.$root.$emit('listing-row-size', size);\nthis.size = size\n+ }\n},\ndata: () => {\nreturn {\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row.vue", "new_path": "assets/js/Components/Listing/Row.vue", "diff": "<template>\n- <transition-group name=\"quickeditor\" tag=\"div\" class=\"listing--container\">\n+ <transition-group :name=\"size !== 'large' ? 'quickeditor':null\" tag=\"div\" class=\"listing--container\">\n+\n<!-- row -->\n<div\nv-if=\"!quickEditor\"\n<div\nclass=\"listing__row--item is-thumbnail\"\n:style=\"`background-image: url(${thumbnail})`\"\n- v-if=\"size === 'normal'\"\n+ v-if=\"size === 'normal' || size === 'large'\"\n></div>\n<!-- end column -->\n<!-- column actions -->\n<row-actions\n:record-id=\"recordId\"\n+ :size=\"size\"\n@quickeditor=\"quickEditor = $event\"\n></row-actions>\n<!-- end column -->\n<!-- quick editor -->\n<row-quick-editor\n- v-if=\"quickEditor\"\n+ v-if=\"quickEditor || size === 'large'\"\n@quickeditor=\"quickEditor = $event\"\n+ :size=\"size\"\nkey=\"test\"\n></row-quick-editor>\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row/_Actions.vue", "new_path": "assets/js/Components/Listing/Row/_Actions.vue", "diff": "</div>\n</a>\n</li>\n- <li>\n+ <li v-if=\"size !== 'large'\">\n<button @click=\"quickEditor()\" type=\"button\" class=\"listing--actions--quickedit\"><i class=\"far fa-caret-square-down mr-1\"></i>Quick Edit</button>\n</li>\n</ul>\n<script>\nexport default {\nname: \"actions\",\n- props: [\"recordId\"],\n+ props: [\"recordId\", \"size\"],\nmethods:{\nquickEditor(){\nthis.$emit('quickeditor', true);\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row/_QuickEditor.vue", "new_path": "assets/js/Components/Listing/Row/_QuickEditor.vue", "diff": "<template>\n- <div class=\"quickedit__row\">\n+ <div class=\"quickedit__row\" :class=\"{'is-large': size === 'large'}\">\n<div class=\"quickedit__row--item is-content\">\n<h4>quick edit settings</h4>\n</div>\n<div class=\"quickedit__row--item is-actions\">\n- <button @click=\"cancel()\" type=\"button\" class=\"btn btn-sm btn-secondary\">\n+ <button @click=\"cancel()\" type=\"button\" class=\"btn btn-sm btn-secondary\" v-if=\"size !== 'large'\">\n<i class=\"fas fa-ban mr-1\"></i>Cancel\n</button>\n<button type=\"button\" class=\"btn btn-sm btn-success\">\n<script>\nexport default {\nname: \"quick-editor\",\n+ props: [\"size\"],\nmethods: {\ncancel(){\nthis.$emit('quickeditor', false);\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_filter.scss", "new_path": "assets/scss/modules/listing/_filter.scss", "diff": "margin-right: 0;\n}\n&.control--left{\n- margin-right: auto;\n+ margin-left: auto;\n}\n}\n.control--button{\ndisplay: flex;\nalign-items: center;\njustify-content: center;\n+ min-width: 30px;\nbackground: var(--foreground);\nborder-radius: $border-radius;\nbox-shadow: $card-box-shadow;\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_row.scss", "new_path": "assets/scss/modules/listing/_row.scss", "diff": "justify-content: space-between;\nwidth: 100%;\nposition: relative;\n- &.sortable-ghost{\n- opacity: 0.1;\n+ transition: all 0.15s ease-in-out;\n+ &.is-large{\n+ border-radius: $border-radius $border-radius 0 0;\n+ .listing__row--item{\n+ &.is-thumbnail{\n+ border-radius: $border-radius 0 0 0;\n+ }\n+ }\n}\n&.is-small{\n.listing__row--item{\n.quickedit__row{\nmin-height: 200px;\n+ box-shadow: $card-box-shadow;\ndisplay: flex;\njustify-content: space-between;\nflex-direction: column;\nbackground: var(--foreground);\nmargin-bottom: $spacer / 1.25;\n+ border-radius: $border-radius;\n+ transition: all 0.15s ease-in-out;\nwidth: 100%;\n+ &.is-large{\n+ border-radius: 0 0 $border-radius $border-radius;\n+ min-height: 150px;\n+ margin-top: -$spacer;\n+ margin-bottom: $spacer;\n+ .quickedit__row--item{\n+ &.is-actions{\n+ justify-content: flex-end;\n+ }\n+ }\n+ }\n&--item{\npadding: $spacer;\n&.is-content{\n.listing--container{\nposition: relative;\noverflow: hidden;\n+ &.sortable-ghost{\n+ opacity: 0.1;\n+ }\n}\n.quickeditor-enter-active, .quickeditor-leave-active {\n" }, { "change_type": "MODIFY", "old_path": "webpack.config.js", "new_path": "webpack.config.js", "diff": "@@ -9,7 +9,7 @@ Encore\n.setPublicPath('/assets')\n.cleanupOutputBeforeBuild()\n- .enableSourceMaps(!Encore.isProduction())\n+ // .enableSourceMaps(!Encore.isProduction())\n.enableVersioning(Encore.isProduction())\n.setManifestKeyPrefix('assets')\n@@ -24,7 +24,10 @@ Encore\n.enableSassLoader()\n.enablePostCssLoader()\n- // .addPlugin(new WebpackBar())\n+ .addPlugin(new WebpackBar({\n+ profile: Encore.isProduction() ? true:false,\n+ minimal: false\n+ }))\nif(Encore.isProduction()){\nEncore.configureFilenames({\n@@ -33,6 +36,5 @@ Encore\n})\n}\n-\n-\nmodule.exports = Encore.getWebpackConfig();\n+\n" } ]
PHP
MIT License
bolt/core
added large view option to row
95,180
05.11.2018 12:18:08
-3,600
586763c99860face089e6dba7c82eb6a0d84e9ae
added selecting base functionality and dashboard/ct logic
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Filter.vue", "new_path": "assets/js/Components/Listing/Filter.vue", "diff": "<template>\n<ul class=\"listing__filter--controls\">\n- <li>\n- <button class=\"control--button\" :class=\"{'is-active': selecting}\" @click=\"filterButton('selecting', 'listing-row-selecting')\">\n- <i :class=\"selecting ? 'fas fa-check-circle ':'far fa-circle'\"></i>\n- </button>\n+ <li v-if=\"type !== 'dashboard'\">\n+ <div class=\"custom-control custom-checkbox\">\n+ <input type=\"checkbox\" class=\"custom-control-input\" id=\"selectAll\" v-model=\"selecting\">\n+ <label class=\"custom-control-label\" for=\"selectll\" @click=\"filterButton('selecting', 'listing-selectall')\"></label>\n+ </div>\n</li>\n<li class=\"control--left\">\n<button class=\"control--button\" :class=\"{'is-selected': size === 'small'}\" @click=\"changeSize('small')\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70 55\"><g fill-rule=\"nonzero\"><rect width=\"70\" height=\"15\" rx=\"3\"/><rect width=\"70\" height=\"15\" rx=\"3\" transform=\"translate(0 20)\"/><rect width=\"70\" height=\"15\" rx=\"3\" transform=\"translate(0 40)\"/></g></svg>\n</button>\n</li>\n- <li>\n- <button class=\"control--button\" :class=\"{'is-selected': size === 'large'}\" @click=\"changeSize('large')\">\n- <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70 55\"><g fill-rule=\"nonzero\"><rect width=\"70\" height=\"24\" rx=\"3\"/><rect width=\"70\" height=\"24\" rx=\"3\" transform=\"translate(0 31)\"/></g></svg>\n- </button>\n- </li>\n- <li>\n+ <li v-if=\"type !== 'dashboard'\">\n<button class=\"control--button\" :class=\"{'is-active': sorting}\" @click=\"filterButton('sorting', 'listing-row-sorting')\">\n<i class=\"fas\" :class=\"sorting ? 'fa-check-circle':'fa-sort'\"></i>\n</button>\n<script>\nexport default {\nname: \"listing-filter\",\n+ props: [\"type\"],\nmounted() {\nconst size = localStorage.getItem('listing-row-size');\nif (size !== null){\n@@ -42,7 +39,7 @@ export default {\nreturn {\nsize: \"normal\",\nsorting: false,\n- selecting: false\n+ selecting: false,\n};\n},\nmethods:{\n@@ -59,7 +56,7 @@ export default {\nthis.$root.$emit('listing-row-size', size);\nlocalStorage.setItem('listing-row-size', size);\nthis.size = size\n- }\n+ },\n}\n};\n</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row.vue", "new_path": "assets/js/Components/Listing/Row.vue", "diff": "<template>\n- <transition-group :name=\"size !== 'large' ? 'quickeditor':null\" tag=\"div\" class=\"listing--container\">\n+ <transition-group name=\"quickeditor\" tag=\"div\" class=\"listing--container\" :class=\"{'is-dahsboard': type === 'dashboard'}\">\n+\n+ <!-- check box -->\n+ <row-checkbox\n+ v-if=\"type !== 'dashboard'\"\n+ :record-id=\"recordId\"\n+ key=\"select\"\n+ ></row-checkbox>\n<!-- row -->\n<div\n<div\nclass=\"listing__row--item is-thumbnail\"\n:style=\"`background-image: url(${thumbnail})`\"\n- v-if=\"size === 'normal' || size === 'large'\"\n+ v-if=\"size === 'normal'\"\n></div>\n<!-- end column -->\n<!-- column meta -->\n<row-meta\n+ :type=\"type\"\n:record-id=\"recordId\"\n:definition=\"definition\"\n:date=\"date\"\n<!-- quick editor -->\n<row-quick-editor\n- v-if=\"quickEditor || size === 'large'\"\n+ v-if=\"quickEditor\"\n@quickeditor=\"quickEditor = $event\"\n:size=\"size\"\n- key=\"test\"\n+ key=\"quickeditor\"\n></row-quick-editor>\n</transition-group>\n</template>\n<script>\n+import Checkbox from './Row/_Checkbox';\nimport QuickEditor from './Row/_QuickEditor';\nimport Actions from './Row/_Actions';\nimport Meta from './Row/_Meta';\nexport default {\nname: \"listing-row\",\n- props: [\"recordId\", \"definition\", \"excerpt\", \"date\", \"status\", \"thumbnail\", \"author\"],\n+ props: [\"type\", \"recordId\", \"definition\", \"excerpt\", \"date\", \"status\", \"thumbnail\", \"author\"],\ncomponents: {\n+ \"row-checkbox\": Checkbox,\n\"row-quick-editor\": QuickEditor,\n\"row-meta\": Meta,\n\"row-actions\": Actions\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row/_Actions.vue", "new_path": "assets/js/Components/Listing/Row/_Actions.vue", "diff": "</div>\n</a>\n</li>\n- <li v-if=\"size !== 'large'\">\n+ <li>\n<button @click=\"quickEditor()\" type=\"button\" class=\"listing--actions--quickedit\"><i class=\"far fa-caret-square-down mr-1\"></i>Quick Edit</button>\n</li>\n</ul>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/Components/Listing/Row/_Checkbox.vue", "diff": "+<template>\n+ <div class=\"listing--checkbox\" key=\"checkbox\">\n+ <div class=\"custom-control custom-checkbox\">\n+ <input type=\"checkbox\" class=\"custom-control-input\" :id=\"`checkbox_${recordId}`\" v-model=\"selected\">\n+ <label class=\"custom-control-label\" :for=\"`checkbox_${recordId}`\" @click=\"checkBox()\"></label>\n+ </div>\n+ </div>\n+</template>\n+\n+<script>\n+ export default {\n+ name: \"checkbox\",\n+ props: [\"recordId\"],\n+ mounted() {\n+ this.$root.$on('listing-selectall', data => this.selected = data);\n+ },\n+ data: () => {\n+ return {\n+ selected: false,\n+ };\n+ },\n+ watch: {\n+ selected(){\n+ if(this.selected){\n+\n+ } else {\n+\n+ }\n+ }\n+ },\n+ methods: {\n+ checkBox(){\n+ let selected = this.selected;\n+ if(selected){\n+ selected = true\n+ this.$root.$emit('listing-row-selected', this.recordId);\n+ } else {\n+ this.$root.$emit('listing-row-unselected', this.recordId);\n+ selected = false\n+ }\n+ },\n+ }\n+ };\n+</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_filter.scss", "new_path": "assets/scss/modules/listing/_filter.scss", "diff": "margin-left: auto;\n}\n}\n+ .custom-control{\n+ margin-left: $spacer / 4;\n+ }\n.control--button{\ntransition: $transition-base;\ncolor: var(--shade);\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_row.scss", "new_path": "assets/scss/modules/listing/_row.scss", "diff": "//** Lisitng | Row\n+$checkbox-row-width: 30px;\n+\n+.listing--container{\n+ position: relative;\n+ display: flex;\n+ flex-wrap: wrap;\n+ width: 100%;\n+ &.sortable-ghost{\n+ opacity: 0.1;\n+ }\n+ &.is-dashboard{\n+ .listing__row, .quickedit__row{\n+ width: 100%;\n+ }\n+ }\n+ .listing__row, .quickedit__row{\n+ width: calc(100% - #{$checkbox-row-width});\n+ }\n+}\n+\n+.listing--checkbox{\n+ width: $checkbox-row-width;\n+ .custom-control{\n+ position: relative;\n+ height: calc(100% - #{$spacer} / 1.25);\n+ padding: 0;\n+ .custom-control-label {\n+ position: absolute;\n+ left: 0;\n+ top: 0;\n+ width: 100%;\n+ height: 100%;\n+ &:hover{\n+ cursor: pointer;\n+ }\n+ &:before, &:after{\n+ left: $spacer / 4;\n+ top: 50%;\n+ transform: translateY(-50%);\n+ }\n+ }\n+ }\n+}\n+\n.listing__row{\nbox-shadow: $card-box-shadow;\nbackground: var(--foreground);\nborder-radius: $border-radius;\nmargin-bottom: $spacer / 1.25;\nmin-height: 50px;\n+ z-index: 100;\ndisplay: flex;\n+ flex: auto;\njustify-content: space-between;\n- width: 100%;\nposition: relative;\n- transition: all 0.15s ease-in-out;\n- &.is-large{\n- border-radius: $border-radius $border-radius 0 0;\n- .listing__row--item{\n- &.is-thumbnail{\n- border-radius: $border-radius 0 0 0;\n- }\n- }\n- }\n&.is-small{\n.listing__row--item{\ndisplay: flex;\nbackground: var(--shade-100);\ndisplay: flex;\nalign-items: center;\n+ border-radius: 0 $border-radius $border-radius 0;\n}\n}\n&--list{\nmin-height: 200px;\nbox-shadow: $card-box-shadow;\ndisplay: flex;\n+ z-index: 99;\njustify-content: space-between;\nflex-direction: column;\nbackground: var(--foreground);\nmargin-bottom: $spacer / 1.25;\nborder-radius: $border-radius;\n- transition: all 0.15s ease-in-out;\n- width: 100%;\n- &.is-large{\n- border-radius: 0 0 $border-radius $border-radius;\n- min-height: 150px;\n- margin-top: -$spacer;\n- margin-bottom: $spacer;\n- .quickedit__row--item{\n- &.is-actions{\n- justify-content: flex-end;\n- }\n- }\n- }\n+ position: relative;\n&--item{\npadding: $spacer;\n&.is-content{\n}\n}\n-.listing--container{\n- position: relative;\n- overflow: hidden;\n- &.sortable-ghost{\n- opacity: 0.1;\n- }\n-}\n-\n.quickeditor-enter-active, .quickeditor-leave-active {\ntransition: transform 0.45s, opacity 0.25s;\n}\ntransform: translateY(30px);\ntransform-origin: top;\nposition: absolute;\n+ right: 0;\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<!-- Admin Main -->\n<div class=\"admin__body\" id=\"{% block container %}content{% endblock %}\">\n<div class=\"container\">\n- <div class=\"admin__body--container\">\n+ <div class=\"admin__body--container\" id=\"{% block vue_id %}{% endblock %}\">\n<main class=\"admin__body--main\">\n{% block main %}\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/_content_listing.twig", "new_path": "templates/_partials/_content_listing.twig", "diff": "{% if records %}\n<nav class=\"listing__filter\">\n- <listing-filter></listing-filter>\n+ <listing-filter\n+ type=\"{{ type }}\"\n+ ></listing-filter>\n</nav>\n<draggable :options=\"{handle:'.listing__row--move', animation: 0}\">\n{% for record in records %}\n<listing-row\n+ type=\"{{ type }}\"\n:record-id=\"'{{ record.id }}'\"\n:definition=\"{{ record.definition|json_encode() }}\"\n:excerpt=\"{{ record.excerpt(150, true)|json_encode() }}\"\n" }, { "change_type": "MODIFY", "old_path": "templates/content/listing.twig", "new_path": "templates/content/listing.twig", "diff": "{% endif %}\n{% endblock %}\n-{% block body_id 'user_edit' %}\n+{% block vue_id 'listing' %}\n{% block main %}\n- <div id=\"listing\">\n- {% include '@bolt/_partials/_content_listing.twig' with {'records': records } %}\n+ <div>\n+ {% include '@bolt/_partials/_content_listing.twig' with {'records': records, 'type': 'contenttype' } %}\n</div>\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/dashboard/dashboard.twig", "new_path": "templates/dashboard/dashboard.twig", "diff": "{% block main %}\n<div id=\"listing\">\n- {% include '@bolt/_partials/_content_listing.twig' with {'records': records } %}\n+ {% include '@bolt/_partials/_content_listing.twig' with {'records': records, 'type': 'dashboard' } %}\n</div>\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
added selecting base functionality and dashboard/ct logic
95,180
05.11.2018 13:03:22
-3,600
07386d06d126aa700aac3368deffcaebc253c9fa
added base multiselect functionality
[ { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row.vue", "new_path": "assets/js/Components/Listing/Row.vue", "diff": "<template>\n- <transition-group name=\"quickeditor\" tag=\"div\" class=\"listing--container\" :class=\"{'is-dahsboard': type === 'dashboard'}\">\n+ <transition-group name=\"quickeditor\" tag=\"div\" class=\"listing--container\" :class=\"{'is-dashboard': type === 'dashboard'}\">\n<!-- check box -->\n<row-checkbox\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Components/Listing/Row/_Checkbox.vue", "new_path": "assets/js/Components/Listing/Row/_Checkbox.vue", "diff": "watch: {\nselected(){\nif(this.selected){\n-\n+ this.$root.$emit('listing-row-selected', this.recordId);\n} else {\n-\n+ this.$root.$emit('listing-row-unselected', this.recordId);\n}\n}\n},\nlet selected = this.selected;\nif(selected){\nselected = true\n- this.$root.$emit('listing-row-selected', this.recordId);\n} else {\n- this.$root.$emit('listing-row-unselected', this.recordId);\nselected = false\n}\n},\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/Components/Listing/SelectedBox.vue", "diff": "+<template>\n+ <div class=\"card mb-3\" v-if=\"recordCount > 0\">\n+ <div class=\"card-header\">\n+ <span class=\"badge is-primary mr-1\">{{recordCount}}</span>\n+ <template v-if=\"recordCount === 1\">{{ctSingular}}</template>\n+ <template v-else>{{ct}}</template>\n+ Selected\n+ </div>\n+ <div class=\"card-body\">\n+ <h4>selected record ids passed</h4>\n+ <p><em>(these can be used with something like axios to bulk modify/delete)</em></p>\n+<pre>\n+<code>{{records}}</code>\n+</pre>\n+ </div>\n+ </div>\n+</template>\n+\n+<script>\n+export default {\n+ name: \"listing-selected-box\",\n+ props: [\"ct\", \"ctSingular\"],\n+ mounted() {\n+ this.$root.$on('listing-row-selected', id => {\n+ this.recordCount++\n+ this.records.push(id);\n+ });\n+ this.$root.$on('listing-row-unselected', id => {\n+ this.recordCount--\n+ let index = this.records.indexOf(id);\n+ if (index > -1) {\n+ this.records.splice(index, 1);\n+ }\n+ });\n+ },\n+ data: () => {\n+ return {\n+ recordCount: 0,\n+ records: []\n+ };\n+ },\n+ methods:{\n+\n+ }\n+};\n+</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/js/Views/listing.js", "new_path": "assets/js/Views/listing.js", "diff": "@@ -8,6 +8,7 @@ import draggable from 'vuedraggable'\n*/\nimport Filter from \"../Components/Listing/Filter\";\nimport Row from \"../Components/Listing/Row\";\n+import SelectedBox from \"../Components/Listing/SelectedBox\";\n/**\n* Register Components\n@@ -15,5 +16,6 @@ import Row from \"../Components/Listing/Row\";\nVue.component(\"listing-filter\", Filter);\nVue.component(\"listing-row\", Row);\nVue.component(\"draggable\", draggable);\n+Vue.component(\"listing-selected-box\", SelectedBox);\nnew Vue({ el: \"#listing\", name: \"listing\" });\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/modules/base/_badge.scss", "diff": "+//** Base | Badge\n+\n+.badge{\n+ &.is-primary{\n+ background: var(--primary);\n+ color: var(--foreground);\n+ padding: 0 $spacer / 4;\n+ text-align: center;\n+ display: inline-flex;\n+ align-items: center;\n+ justify-content: center;\n+ font-weight: $font-weight-bold;\n+ border-radius: $border-radius;\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/base/base.scss", "new_path": "assets/scss/modules/base/base.scss", "diff": "@import '_status';\n@import '_pagination';\n-@import '_notification'\n+@import '_notification';\n+@import '_badge';\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_row.scss", "new_path": "assets/scss/modules/listing/_row.scss", "diff": "@@ -32,9 +32,6 @@ $checkbox-row-width: 30px;\ntop: 0;\nwidth: 100%;\nheight: 100%;\n- &:hover{\n- cursor: pointer;\n- }\n&:before, &:after{\nleft: $spacer / 4;\ntop: 50%;\n@@ -184,6 +181,7 @@ $checkbox-row-width: 30px;\n.quickedit__row{\nmin-height: 200px;\n+ flex: auto;\nbox-shadow: $card-box-shadow;\ndisplay: flex;\nz-index: 99;\n" }, { "change_type": "MODIFY", "old_path": "templates/content/listing.twig", "new_path": "templates/content/listing.twig", "diff": "{% block aside %}\n+ <listing-selected-box\n+ ct=\"{{ contenttype.name }}\"\n+ ct-singular=\"{{ contenttype.singular_name }}\"\n+ ></listing-selected-box>\n+\n<div class=\"card\">\n<div class=\"card-header\">\n{{ 'title.contentlisting'|trans }}\n" } ]
PHP
MIT License
bolt/core
added base multiselect functionality
95,180
05.11.2018 16:13:09
-3,600
f8fc02890fbff03ce70873d93011b7fdafcfed2d
fixed row width
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_row.scss", "new_path": "assets/scss/modules/listing/_row.scss", "diff": "@@ -57,7 +57,7 @@ $checkbox-row-width: 30px;\ndisplay: flex;\nalign-items: center;\n&.is-details{\n- max-width: 45%;\n+ max-width: 40%;\nstrong{\nwhite-space: nowrap;\noverflow: hidden;\n" } ]
PHP
MIT License
bolt/core
fixed row width
95,144
05.11.2018 20:32:27
-3,600
6fd7f6cbe49b25f15cc4347a6bfb46218c407442
Working on twig tags.
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -31,11 +31,6 @@ services:\nresource: '../src/Controller'\ntags: ['controller.service_arguments']\n- Bolt\\Twig\\Runtime\\:\n- resource: '../src/Twig/Runtime/*'\n- public: false\n- tags: ['twig.runtime']\n-\ndoctrine.content_listener:\nclass: Bolt\\EventListener\\ContentListener\narguments: []\n" }, { "change_type": "MODIFY", "old_path": "src/EventSubscriber/ControllerSubscriber.php", "new_path": "src/EventSubscriber/ControllerSubscriber.php", "diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\EventSubscriber;\n-use Bolt\\Twig\\Extension\\SourceCodeExtension;\n+use Bolt\\Twig\\SourceCodeExtension;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent;\nuse Symfony\\Component\\HttpKernel\\KernelEvents;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/AdminExtension.php", "new_path": "src/Twig/AdminExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\n-use Bolt\\Twig\\Runtime;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n-use Twig\\TwigFunction;\nclass AdminExtension extends AbstractExtension\n{\n@@ -20,7 +18,8 @@ class AdminExtension extends AbstractExtension\n*\n* @param UrlGeneratorInterface $urlGenerator\n*/\n- public function __construct(UrlGeneratorInterface $urlGenerator) {\n+ public function __construct(UrlGeneratorInterface $urlGenerator)\n+ {\n$this->urlGenerator = $urlGenerator;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/AppExtension.php", "new_path": "src/Twig/AppExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Symfony\\Component\\Intl\\Intl;\nuse Twig\\Extension\\AbstractExtension;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ArrayExtension.php", "new_path": "src/Twig/ArrayExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\nuse Twig\\TwigFunction;\n@@ -16,7 +15,6 @@ use Twig\\TwigFunction;\n*/\nclass ArrayExtension extends AbstractExtension\n{\n-\nprivate $orderOn;\nprivate $orderAscending;\nprivate $orderOnSecondary;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentHelperExtension.php", "new_path": "src/Twig/ContentHelperExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Bolt\\Content\\FieldFactory;\nuse Bolt\\Content\\MenuBuilder;\nuse Bolt\\Entity\\Content;\n-use Bolt\\Twig\\Runtime;\nuse Symfony\\Component\\Translation\\TranslatorInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n@@ -102,7 +101,6 @@ class ContentHelperExtension extends AbstractExtension\nreturn json_encode($result);\n}\n-\npublic function selectoptionsfromarray(Field $field)\n{\n$values = $field->getDefinition()->get('values');\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/HtmlExtension.php", "new_path": "src/Twig/HtmlExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Bolt\\Utils\\Markdown;\nuse Twig\\Extension\\AbstractExtension;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ImageExtension.php", "new_path": "src/Twig/ImageExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Entity\\Field;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/RecordExtension.php", "new_path": "src/Twig/RecordExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Bolt\\Helpers\\Excerpt;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\nuse Twig\\TwigFunction;\n@@ -55,7 +54,8 @@ class RecordExtension extends AbstractExtension\n/**\n* @param $text\n- * @param integer $length\n+ * @param int $length\n+ *\n* @return string\n*/\npublic function excerpt($text, $length = 100): string\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/RoutingExtension.php", "new_path": "src/Twig/RoutingExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/SourceCodeExtension.php", "new_path": "src/Twig/SourceCodeExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Twig\\Environment;\nuse Twig\\Extension\\AbstractExtension;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/TextExtension.php", "new_path": "src/Twig/TextExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\nuse Bolt\\Helpers\\Str;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/UserExtension.php", "new_path": "src/Twig/UserExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/WidgetExtension.php", "new_path": "src/Twig/WidgetExtension.php", "diff": "declare(strict_types=1);\n-namespace Bolt\\Twig\\Extension;\n+namespace Bolt\\Twig;\n-use Bolt\\Twig\\Runtime;\nuse Twig\\Environment;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n" } ]
PHP
MIT License
bolt/core
Working on twig tags.
95,144
05.11.2018 21:19:07
-3,600
fdf4daf4cafc2767040de5d75c363ec709495b1c
Adding `jsonrecords()` twig function.
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -168,6 +168,33 @@ class Content\nreturn $this->contentTypeDefinition;\n}\n+ /**\n+ * @return array\n+ */\n+ public function getSummary(): array\n+ {\n+ $summary = [\n+ 'title' => $this->magicTitle(),\n+ 'excerpt' => $this->magicexcerpt(),\n+ 'image' => $this->magicImage(),\n+ 'link' => $this->magicLink(),\n+ 'editlink' => $this->magicEditLink(),\n+ 'author' => [\n+ 'id' => $this->getAuthor()->getid(),\n+ 'fullName' => $this->getAuthor()->getfullName(),\n+ 'username' => $this->getAuthor()->getusername(),\n+ 'email' => $this->getAuthor()->getemail(),\n+ 'roles' => $this->getAuthor()->getroles(),\n+ ],\n+ 'createdAt' => $this->getCreatedAt(),\n+ 'modifiedAt' => $this->modifiedAt(),\n+ 'publishedAt' => $this->getPublishedAt(),\n+ 'depublishedAt' => $this->depublishedAt(),\n+ ];\n+\n+ return $summary;\n+ }\n+\n/**\n* @return string\n*/\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/ContentMagicTraits.php", "new_path": "src/Entity/ContentMagicTraits.php", "diff": "@@ -129,7 +129,13 @@ trait ContentMagicTraits\npublic function magicImage()\n{\n- return 'magic image';\n+ foreach ($this->getFields() as $field) {\n+ if ($field->getDefinition()->get('type') === 'image') {\n+ return $field->getValue();\n+ }\n+ }\n+\n+ return null;\n}\npublic function magicExcerpt($length = 200, $includeTitle = false, $focus = null)\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentHelperExtension.php", "new_path": "src/Twig/ContentHelperExtension.php", "diff": "@@ -50,6 +50,7 @@ class ContentHelperExtension extends AbstractExtension\nreturn [\nnew TwigFunction('sidebarmenu', [$this, 'sidebarmenu']),\nnew TwigFunction('jsonlabels', [$this, 'jsonlabels']),\n+ new TwigFunction('jsonrecords', [$this, 'jsonrecords']),\nnew TwigFunction('fieldfactory', [$this, 'fieldfactory']),\nnew TwigFunction('selectoptionsfromarray', [$this, 'selectoptionsfromarray']),\nnew TwigFunction('icon', [$this, 'icon'], $safe),\n@@ -87,18 +88,39 @@ class ContentHelperExtension extends AbstractExtension\n/**\n* @param array $labels\n+ * @param bool $pretty\n*\n* @return string\n*/\n- public function jsonlabels(array $labels): string\n+ public function jsonlabels(array $labels, $pretty = false): string\n{\n$result = [];\n+ $options = $pretty ? JSON_PRETTY_PRINT : 0;\n+\nforeach ($labels as $label) {\n$key = is_array($label) ? $label[0] : $label;\n$result[$key] = $this->translator->trans(...(array) $label);\n}\n- return json_encode($result);\n+ return json_encode($result, $options);\n+ }\n+\n+ /**\n+ * @param $records\n+ * @param bool $pretty\n+ *\n+ * @return string\n+ */\n+ public function jsonrecords($records, $pretty = false): string\n+ {\n+ $result = [];\n+ $options = $pretty ? JSON_PRETTY_PRINT : 0;\n+\n+ foreach ($records as $record) {\n+ $result[] = $record->getSummary();\n+ }\n+\n+ return json_encode($result, $options);\n}\npublic function selectoptionsfromarray(Field $field)\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/_content_listing.twig", "new_path": "templates/_partials/_content_listing.twig", "diff": "+{# @Jack: This twig function gives JSON for the current `records` #}\n+{{ jsonrecords(records) }}\n{% if records %}\n<nav class=\"listing__filter\">\n" }, { "change_type": "MODIFY", "old_path": "templates/content/listing.twig", "new_path": "templates/content/listing.twig", "diff": "{% extends '@bolt/_base/layout.twig' %}\n-\n-\n{% block title %}\n{% if contenttype %}\n<i class='fas mr-2 {{contenttype.icon_one}}'></i> <strong>{{ contenttype.name }}</strong>\n" } ]
PHP
MIT License
bolt/core
Adding `jsonrecords()` twig function.
95,168
06.11.2018 16:14:39
-3,600
4f92025d0b85e3eace13285d91b82df5ffceed39
Set MaxDepth in Content Entity $fields property
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -14,10 +14,12 @@ use Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Serializer\\Annotation\\Groups;\n+use Symfony\\Component\\Serializer\\Annotation\\MaxDepth;\n/**\n* @ApiResource(\n- * normalizationContext={\"groups\"={\"public\"}},\n+ * attributes={\"fetchEager\": true},\n+ * normalizationContext={\"groups\"={\"public\"}, \"enable_max_depth\"=true},\n* collectionOperations={\"get\"},\n* itemOperations={\"get\"}\n* )\n@@ -89,6 +91,8 @@ class Content\n/**\n* @var Field[]|ArrayCollection\n+ * @Groups(\"public\")\n+ * @MaxDepth(1)\n* @ORM\\OneToMany(\n* targetEntity=\"Bolt\\Entity\\Field\",\n* mappedBy=\"content\",\n" } ]
PHP
MIT License
bolt/core
Set MaxDepth in Content Entity $fields property
95,168
06.11.2018 16:30:43
-3,600
465369c1fdafa34570f12be9ddfd662dbafc29da
Remove fetchEager attribute
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -18,7 +18,6 @@ use Symfony\\Component\\Serializer\\Annotation\\MaxDepth;\n/**\n* @ApiResource(\n- * attributes={\"fetchEager\": true},\n* normalizationContext={\"groups\"={\"public\"}, \"enable_max_depth\"=true},\n* collectionOperations={\"get\"},\n* itemOperations={\"get\"}\n" } ]
PHP
MIT License
bolt/core
Remove fetchEager attribute
95,144
06.11.2018 21:19:45
-3,600
4bbbbe6156b48e445f2524cd0af67352ee39add1
Updating Lock files
[ { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "{\n\"_readme\": [\n\"This file locks the dependencies of your project to a known state\",\n- \"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file\",\n+ \"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies\",\n\"This file is @generated automatically\"\n],\n\"content-hash\": \"602823ff1a906a6ec809343479c5e688\",\n},\n{\n\"name\": \"monolog/monolog\",\n- \"version\": \"1.23.0\",\n+ \"version\": \"1.24.0\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/Seldaek/monolog.git\",\n- \"reference\": \"fd8c787753b3a2ad11bc60c063cff1358a32a3b4\"\n+ \"reference\": \"bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4\",\n- \"reference\": \"fd8c787753b3a2ad11bc60c063cff1358a32a3b4\",\n+ \"url\": \"https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266\",\n+ \"reference\": \"bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"logging\",\n\"psr-3\"\n],\n- \"time\": \"2017-06-19T01:22:40+00:00\"\n+ \"time\": \"2018-11-05T09:00:11+00:00\"\n},\n{\n\"name\": \"nelmio/cors-bundle\",\n},\n{\n\"name\": \"symfony/contracts\",\n- \"version\": \"dev-master\",\n+ \"version\": \"v1.0.0-BETA1\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/contracts.git\",\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "},\n\"css-select\": {\n\"version\": \"1.2.0\",\n- \"resolved\": \"http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n\"integrity\": \"sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"domelementtype\": {\n\"version\": \"1.1.3\",\n- \"resolved\": \"http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n\"integrity\": \"sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=\",\n\"dev\": true\n}\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"htmlparser2\": {\n\"version\": \"3.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n\"integrity\": \"sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"media-typer\": {\n\"version\": \"0.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n\"integrity\": \"sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=\",\n\"dev\": true\n},\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"regjsgen\": {\n\"version\": \"0.2.0\",\n- \"resolved\": \"http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n\"integrity\": \"sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=\",\n\"dev\": true\n},\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"dev\": true,\n\"requires\": {\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\",\n\"dev\": true\n},\n},\n\"util\": {\n\"version\": \"0.10.3\",\n- \"resolved\": \"http://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n\"integrity\": \"sha1-evsa/lCAUkZInj23/g7TeTNqwPk=\",\n\"dev\": true,\n\"requires\": {\n" } ]
PHP
MIT License
bolt/core
Updating Lock files
95,180
07.11.2018 10:04:19
-3,600
d7124a9faae5f0e0254148002a50346bede86695
added hashes to url for editor tabs
[ { "change_type": "MODIFY", "old_path": "assets/js/bolt.js", "new_path": "assets/js/bolt.js", "diff": "@@ -25,6 +25,8 @@ import $ from 'jquery';\nwindow.$ = $;\nwindow.jQuery = $;\n+import './helpers/bootstrap';\n+\n/**\n* Vue Components\n*/\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/helpers/bootstrap/_editorTabs.js", "diff": "+export default function editorTabs() {\n+\n+ document.addEventListener(\"DOMContentLoaded\", () => {\n+ const tabLinks = document.querySelectorAll('.editor__tabbar a[data-toggle=\"pill\"]');\n+ let url = location.href.replace(/\\/$/, \"\");\n+\n+ if (location.hash) {\n+ const hash = url.split(\"#\");\n+ $('.editor__tabbar a[href=\"#'+hash[1]+'\"]').tab(\"show\");\n+ url = location.href.replace(/\\/#/, \"#\");\n+ history.replaceState(null, null, url);\n+ }\n+\n+ Array.from(tabLinks).forEach(tab => {\n+ const tabAttribute = tab.getAttribute('aria-selected');\n+ if(tabAttribute === 'true'){\n+ generateHash(tab.getAttribute(\"href\"))\n+ }\n+ tab.addEventListener('click', (e) => {\n+ generateHash(e.target.getAttribute(\"href\"))\n+ });\n+ });\n+\n+ function generateHash(hash) {\n+ let newHash;\n+ newHash = url.split(\"#\")[0] + hash;\n+ history.replaceState(null, null, newHash);\n+ }\n+\n+ });\n+\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/helpers/bootstrap/index.js", "diff": "+import editorTabs from './_editorTabs';\n+\n+editorTabs()\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "<li class=\"nav-item\">\n<a\nclass=\"nav-item nav-link {% if loop.first %}active{% endif %}\"\n- id=\"{{group|slug}}-tab-link\"\n+ id=\"{{group|slug}}-tab\"\ndata-toggle=\"pill\"\n- href=\"#{{group|slug}}-tab\"\n+ href=\"#{{group|slug}}\"\nrole=\"tab\"\naria-controls=\"{{group|slug}}\"\n- aria-selected=\"false\"\n+ aria-selected=\"{% if loop.first %}true{%else%}false{% endif %}\"\n>\n<span>{{group|capitalize}}</span></a>\n</li>\n</nav>\n<div class=\"tab-content\" id=\"nav-tabContent\">\n{% for group in groups %}\n- <div class=\"tab-pane {% if loop.first %}show active{% endif %}\" id=\"{{group|slug}}-tab\" role=\"tabpanel\" aria-labelledby=\"{{group|slug}}-tab-link\">\n+ <div class=\"tab-pane {% if loop.first %}show active{% endif %}\" id=\"{{group|slug}}\" role=\"tabpanel\" aria-labelledby=\"{{group|slug}}-tab\">\n{% for key, fielddefinition in record.definition.fields %}\n{% set type = fielddefinition.type %}\n- {# {% set variant = fielddefinition.variant %}\n- {% set mode = fielddefinition.mode|default(null) %} #}\n{% set field = record.field(key) %}\n{% set fieldgroup = fielddefinition.group %}\n" } ]
PHP
MIT License
bolt/core
added hashes to url for editor tabs
95,144
07.11.2018 15:39:52
-3,600
ced3c0072d328fe4b09bcd8496e0214231de0a12
Move Fieldfactory into Entity
[ { "change_type": "DELETE", "old_path": "src/Content/FieldFactory.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Content;\n-\n-use Bolt\\Entity\\Field;\n-\n-final class FieldFactory\n-{\n- public function __construct()\n- {\n- }\n-\n- /**\n- * @param string $name\n- *\n- * @return Field\n- */\n- public static function get(string $name = 'generic'): Field\n- {\n- $classname = '\\\\Bolt\\\\Entity\\\\Field\\\\' . ucwords($name) . 'Field';\n- if (class_exists($classname)) {\n- $field = new $classname();\n- } else {\n- $field = new Field();\n- }\n-\n- return $field;\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/EditRecordController.php", "new_path": "src/Controller/Backend/EditRecordController.php", "diff": "@@ -5,9 +5,9 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\Config;\n-use Bolt\\Content\\FieldFactory;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Entity\\Content;\n+use Bolt\\Entity\\Field;\nuse Carbon\\Carbon;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\n@@ -123,7 +123,7 @@ class EditRecordController extends BaseController\n{\nif (!$field = $content->getField($key)) {\n$fields = collect($content->getDefinition()->get('fields'));\n- $field = FieldFactory::get($fields->get($key)['type']);\n+ $field = Field::factory($fields->get($key)['type']);\n$field->setName($key);\n$content->addField($field);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/ContentFixtures.php", "new_path": "src/DataFixtures/ContentFixtures.php", "diff": "@@ -5,8 +5,8 @@ declare(strict_types=1);\nnamespace Bolt\\DataFixtures;\nuse Bolt\\Configuration\\Config;\n-use Bolt\\Content\\FieldFactory;\nuse Bolt\\Entity\\Content;\n+use Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\FixturesBundle\\Fixture;\nuse Doctrine\\Common\\DataFixtures\\DependentFixtureInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\n@@ -62,7 +62,7 @@ class ContentFixtures extends Fixture implements DependentFixtureInterface\n$sortorder = 1;\nforeach ($contentType['fields'] as $name => $fieldType) {\n- $field = FieldFactory::get($fieldType['type']);\n+ $field = Field::factory($fieldType['type']);\n$field->setName($name);\n$field->setValue($this->getValuesforFieldType($name, $fieldType));\n$field->setSortorder($sortorder++ * 5);\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -115,6 +115,23 @@ class Field\nreturn implode(', ', $this->getValue());\n}\n+ /**\n+ * @param string $name\n+ *\n+ * @return Field\n+ */\n+ public static function factory(string $name = 'generic'): self\n+ {\n+ $classname = '\\\\Bolt\\\\Entity\\\\Field\\\\' . ucwords($name) . 'Field';\n+ if (class_exists($classname)) {\n+ $field = new $classname();\n+ } else {\n+ $field = new self();\n+ }\n+\n+ return $field;\n+ }\n+\npublic function getId(): ?int\n{\nreturn $this->id;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentHelperExtension.php", "new_path": "src/Twig/ContentHelperExtension.php", "diff": "@@ -4,7 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\n-use Bolt\\Content\\FieldFactory;\nuse Bolt\\Content\\MenuBuilder;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\n@@ -69,7 +68,7 @@ class ContentHelperExtension extends AbstractExtension\npublic function fieldfactory($name, $definition)\n{\n- $field = FieldFactory::get($definition['type']);\n+ $field = Field::factory($definition['type']);\n$field->setName($name);\n$field->setDefinition($name, $definition);\n" } ]
PHP
MIT License
bolt/core
Move Fieldfactory into Entity
95,144
07.11.2018 15:54:14
-3,600
a0bc01034b78a49b6424bcbe49b4a423b74b58a4
Adding some more data to "summary" of content.
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -177,6 +177,9 @@ class Content\npublic function getSummary(): array\n{\n$summary = [\n+ 'id' => $this->getid(),\n+ 'contenttype' => $this->getDefinition()->get('slug'),\n+ 'status' => $this->getStatus(),\n'title' => $this->magicTitle(),\n'excerpt' => $this->magicexcerpt(),\n'image' => $this->magicImage(),\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/ImageField.php", "new_path": "src/Entity/Field/ImageField.php", "diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Entity\\Field;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\ORM\\Mapping as ORM;\n+use League\\Glide\\Urls\\UrlBuilderFactory;\n/**\n* @ORM\\Entity\n@@ -20,4 +21,17 @@ class ImageField extends Field\nreturn $path;\n}\n+\n+ public function getValue(): ?array\n+ {\n+ $value = parent::getValue();\n+\n+ // Create an instance of the URL builder\n+ $urlBuilder = UrlBuilderFactory::create('/thumbs/');\n+\n+ // Generate a URL\n+ $value['path'] = $urlBuilder->getUrl($this->get('filename'), ['w' => 240, 'h' => 160, 'area' => 'files']);\n+\n+ return $value;\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Adding some more data to "summary" of content.
95,144
07.11.2018 15:56:47
-3,600
53210b88d33f1079f2ee84fb85b97001a52ab1b5
.. And adding the icon to "summary"
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -179,7 +179,6 @@ class Content\n$summary = [\n'id' => $this->getid(),\n'contenttype' => $this->getDefinition()->get('slug'),\n- 'status' => $this->getStatus(),\n'title' => $this->magicTitle(),\n'excerpt' => $this->magicexcerpt(),\n'image' => $this->magicImage(),\n@@ -192,6 +191,8 @@ class Content\n'email' => $this->getAuthor()->getemail(),\n'roles' => $this->getAuthor()->getroles(),\n],\n+ 'status' => $this->getStatus(),\n+ 'icon' => $this->getDefinition()->get('icon_one'),\n'createdAt' => $this->getCreatedAt(),\n'modifiedAt' => $this->modifiedAt(),\n'publishedAt' => $this->getPublishedAt(),\n" } ]
PHP
MIT License
bolt/core
.. And adding the icon to "summary"
95,144
08.11.2018 08:22:32
-3,600
8c58572dee0385daf090071dacae37ea737ae196
Handle checkboxes in an nicer way
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/EditRecordController.php", "new_path": "src/Controller/Backend/EditRecordController.php", "diff": "@@ -105,13 +105,6 @@ class EditRecordController extends BaseController\n$content->setPublishedAt(new Carbon($post['publishedAt']));\n$content->setDepublishedAt(new Carbon($post['depublishedAt']));\n- // Checkboxes not in post need to be set to '0'\n- foreach ($content->getFields() as $field) {\n- if ($field->getDefinition()->get('type') === 'checkbox') {\n- $field->setValue(['0']);\n- }\n- }\n-\nforeach ($post['fields'] as $key => $postfield) {\n$this->updateFieldFromPost($key, $postfield, $content);\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/checkbox.twig", "new_path": "templates/editcontent/fields/checkbox.twig", "diff": "{% block field %}\n<div class=\"custom-control custom-checkbox\">\n+ {# What the heck is this hidden field for, you might wonder? Well, it's\n+ there to make sure an unchecked checkbox still shows up in the server\n+ response, so we can handle it there, if present. #}\n+ <input type=\"hidden\" name=\"{{ name }}\" value=\"0\">\n<input type=\"checkbox\" class=\"custom-control-input\" id=\"{{ name }}\" name=\"{{ name }}\" value=\"1\" {{ value ? 'checked' }}>\n<label class=\"custom-control-label\" for=\"{{ name }}\">{{ label }}</label>\n</div>\n" } ]
PHP
MIT License
bolt/core
Handle checkboxes in an nicer way
95,180
08.11.2018 10:03:14
-3,600
6a64063867385edb08193a81e06960a6f2d0df12
listing app tidy up
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Filter.vue", "new_path": "assets/js/app/listing/Components/Filter.vue", "diff": "@@ -48,7 +48,6 @@ export default {\nreturn {\nsorting: false,\nselectAll: false,\n- size: \"normal\"\n};\n},\nwatch: {\n@@ -60,19 +59,14 @@ export default {\n}\n},\nmethods:{\n- filterButton(type, emit){\n- if(this[type] === false){\n- this[type] = true\n- this.$root.$emit(emit, true);\n- } else {\n- this[type] = false\n- this.$root.$emit(emit, false);\n- }\n- },\nchangeSize(size){\nthis.$store.dispatch('general/setRowSize', size)\nlocalStorage.setItem('listing-row-size', size);\n- this.size = size\n+ },\n+ },\n+ computed: {\n+ size(){\n+ return this.$store.getters['general/getRowSize'];\n},\n}\n};\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/SelectBox.vue", "new_path": "assets/js/app/listing/Components/SelectBox.vue", "diff": "<pre>\n<code>{{selected}}</code>\n</pre>\n+\n+<pre>\n+<code>{{order}}</code>\n+</pre>\n+\n</div>\n</div>\n</transition>\n@@ -28,6 +33,9 @@ export default {\n},\nselected(){\nreturn this.$store.getters['selecting/selected']\n+ },\n+ order(){\n+ return this.$store.getters['listing/getOrder']\n}\n}\n};\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "new_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "diff": "<template>\n<div class=\"listing--checkbox\" key=\"checkbox\">\n+ <!-- <input type=\"checkbox\" :id=\"`row-${id}`\" v-model=\"selected\"> -->\n<div class=\"custom-control custom-checkbox\">\n<input type=\"checkbox\" class=\"custom-control-input\" :id=\"`row-${id}`\" v-model=\"selected\">\n<label\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/store/modules/listing/_getters.js", "new_path": "assets/js/app/listing/store/modules/listing/_getters.js", "diff": "const getters = {\ngetRecords: state => state.records,\n+ getOrder(state) {\n+ return state.records.map(record => {\n+ return record.id\n+ });\n+ },\n}\nexport default getters\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/_row.scss", "new_path": "assets/scss/modules/listing/_row.scss", "diff": "@@ -23,6 +23,7 @@ $checkbox-row-width: 30px;\n.listing--checkbox{\nwidth: $checkbox-row-width;\n+ user-select: none;\n.custom-control{\nposition: relative;\nheight: calc(100% - #{$spacer} / 1.25);\n" } ]
PHP
MIT License
bolt/core
listing app tidy up
95,180
08.11.2018 10:14:52
-3,600
40d43f8c42385aba35e3d354b7f06809984773a5
made filtering more efficient
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Filter.vue", "new_path": "assets/js/app/listing/Components/Filter.vue", "diff": "<label\nclass=\"custom-control-label\"\nfor=\"selectll\"\n- @click=\"selectAll = !selectAll\"\n+ @click=\"enableSelectAll(!selectAll)\"\n></label>\n</div>\n</li>\n<button\nclass=\"control--button\"\n:class=\"{'is-active': sorting}\"\n- @click=\"sorting = !sorting\"\n+ @click=\"enableSorting(!sorting)\"\n>\n<i class=\"fas\" :class=\"sorting ? 'fa-check-circle':'fa-sort'\"></i>\n</button>\n@@ -42,23 +42,16 @@ export default {\nmixins: [type],\ncreated() {\nconst size = localStorage.getItem('listing-row-size');\n- size !== null ? this.$store.dispatch('general/setRowSize', size):this.$store.dispatch('general/setRowSize', 'normal');\n- },\n- data: () => {\n- return {\n- sorting: false,\n- selectAll: false,\n- };\n+ if(size !== null)\n+ this.$store.dispatch('general/setRowSize', size)\n},\n- watch: {\n- sorting(){\n- this.$store.dispatch('general/setSorting', this.sorting)\n+ methods:{\n+ enableSorting(arg){\n+ this.$store.dispatch('general/setSorting', arg)\n},\n- selectAll(){\n- this.$store.dispatch('selecting/selectAll', this.selectAll)\n- }\n+ enableSelectAll(arg){\n+ this.$store.dispatch('selecting/selectAll', arg)\n},\n- methods:{\nchangeSize(size){\nthis.$store.dispatch('general/setRowSize', size)\nlocalStorage.setItem('listing-row-size', size);\n@@ -68,6 +61,12 @@ export default {\nsize(){\nreturn this.$store.getters['general/getRowSize'];\n},\n+ sorting(){\n+ return this.$store.getters['general/getSorting'];\n+ },\n+ selectAll(){\n+ return this.$store.getters['selecting/selectAll'];\n+ }\n}\n};\n</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/store/modules/general/_state.js", "new_path": "assets/js/app/listing/store/modules/general/_state.js", "diff": "const state = {\ntype: null,\n- rowSize: null,\n+ rowSize: 'normal',\nsorting: false\n}\n" } ]
PHP
MIT License
bolt/core
made filtering more efficient
95,180
08.11.2018 11:00:37
-3,600
e6043ba356c8f94c124c97298c09c67912d4cadd
checkbox logic fixes
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Filter.vue", "new_path": "assets/js/app/listing/Components/Filter.vue", "diff": "<nav class=\"listing__filter\">\n<ul class=\"listing__filter--controls\">\n<li v-if=\"type !== 'dashboard'\">\n- <div class=\"custom-control custom-checkbox\">\n+ <div class=\"custom-control custom-checkbox\" v-if=\"!sorting\">\n<input type=\"checkbox\" class=\"custom-control-input\" id=\"selectAll\" v-model=\"selectAll\">\n<label\nclass=\"custom-control-label\"\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Index.vue", "new_path": "assets/js/app/listing/Components/Table/Index.vue", "diff": "<draggable :options=\"{handle:'.listing__row--move'}\" v-model=\"records\">\n<transition-group>\n<table-row\n- v-for=\"(record, index) in records\"\n- :key=\"index\"\n+ v-for=\"record in records\"\n+ :key=\"record.id\"\n:record=\"record\"\n></table-row>\n</transition-group>\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "new_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "diff": "<template>\n- <div class=\"listing--checkbox\" key=\"checkbox\">\n- <!-- <input type=\"checkbox\" :id=\"`row-${id}`\" v-model=\"selected\"> -->\n+ <div class=\"listing--checkbox\" key=\"checkbox\" v-if=\"!sorting\">\n<div class=\"custom-control custom-checkbox\">\n- <input type=\"checkbox\" class=\"custom-control-input\" :id=\"`row-${id}`\" v-model=\"selected\">\n+ <input\n+ type=\"checkbox\"\n+ class=\"custom-control-input\"\n+ :id=\"`row-${id}`\"\n+ v-model=\"selected\"\n+ >\n<label\nclass=\"custom-control-label\"\n:for=\"`row-${id}`\"\ncomputed: {\nselectAll() {\nreturn this.$store.getters['selecting/selectAll'];\n+ },\n+ sorting() {\n+ return this.$store.getters['general/getSorting']\n}\n},\nwatch: {\n},\nselected(){\nthis.selected ? this.$store.dispatch('selecting/select', this.id):this.$store.dispatch('selecting/deSelect', this.id)\n+ },\n+ sorting(){\n+ if (this.sorting)\n+ this.selected = false;\n}\n}\n};\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/app/listing/Components/Table/Row/_Sorting.vue", "diff": "+<template>\n+ <button\n+ v-if=\"sorting\"\n+ class=\"listing__row--move\"\n+ >\n+ <i class=\"fas px-2 fa-equals\"></i>\n+ </button>\n+</template>\n+\n+<script>\n+ export default {\n+ name: \"sorting\",\n+ computed: {\n+ sorting() {\n+ return this.$store.getters['general/getSorting']\n+ }\n+ },\n+ };\n+</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Row/index.vue", "new_path": "assets/js/app/listing/Components/Table/Row/index.vue", "diff": "<!-- end column -->\n<!-- column sorting -->\n- <button\n- v-if=\"sorting\"\n- class=\"listing__row--move\"\n- >\n- <i class=\"fas px-2 fa-equals\"></i>\n- </button>\n+ <row-sorting></row-sorting>\n<!-- end column -->\n</div>\n@@ -75,6 +70,7 @@ import type from '../../../mixins/type'\nimport Checkbox from './_Checkbox';\nimport Meta from './_Meta';\nimport Actions from './_Actions';\n+import Sorting from './_Sorting';\nimport QuickEditor from './_QuickEditor';\nexport default {\n@@ -85,6 +81,7 @@ export default {\n\"row-checkbox\": Checkbox,\n\"row-meta\": Meta,\n\"row-actions\": Actions,\n+ \"row-sorting\": Sorting,\n\"row-quick-editor\": QuickEditor\n},\ndata: () => {\n" } ]
PHP
MIT License
bolt/core
checkbox logic fixes
95,180
08.11.2018 11:04:50
-3,600
6af97096583e356fe9de55b4c2236f0d23ee6ec5
fixed selecall logic
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Filter.vue", "new_path": "assets/js/app/listing/Components/Filter.vue", "diff": "@@ -45,6 +45,12 @@ export default {\nif(size !== null)\nthis.$store.dispatch('general/setRowSize', size)\n},\n+ watch: {\n+ sorting(){\n+ if (this.sorting)\n+ this.$store.dispatch('selecting/selectAll', false)\n+ }\n+ },\nmethods:{\nenableSorting(arg){\nthis.$store.dispatch('general/setSorting', arg)\n" } ]
PHP
MIT License
bolt/core
fixed selecall logic
95,180
08.11.2018 11:12:04
-3,600
a6e230e2d56f7a95d4d5197039b7dbe24f2f77d4
fixed draggable options
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/SelectBox.vue", "new_path": "assets/js/app/listing/Components/SelectBox.vue", "diff": "<div class=\"card mb-3\" v-if=\"selectedCount > 0\">\n<div class=\"card-header\">\n<span class=\"badge is-primary mr-1\">{{selectedCount}}</span>\n- <template v-if=\"selectedCount === 1\">{{ctSingular}}</template>\n- <template v-else>{{ct}}</template>\n+ <template v-if=\"selectedCount === 1\">{{singular}}</template>\n+ <template v-else>{{plural}}</template>\nSelected\n</div>\n<div class=\"card-body\">\n<script>\nexport default {\nname: \"listing-selected-box\",\n- props: [\"ct\", \"ctSingular\"],\n+ props: [\"singular\", \"plural\"],\ncomputed:{\nselectedCount(){\nreturn this.$store.getters['selecting/selectedCount']\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Index.vue", "new_path": "assets/js/app/listing/Components/Table/Index.vue", "diff": "<template>\n- <draggable :options=\"{handle:'.listing__row--move'}\" v-model=\"records\">\n+ <draggable :options=\"draggableOptions\" v-model=\"records\">\n<transition-group>\n<table-row\nv-for=\"record in records\"\n@@ -20,6 +20,14 @@ export default {\n\"draggable\": draggable,\n\"table-row\": Row,\n},\n+ data: () => {\n+ return {\n+ draggableOptions: {\n+ handle:'.listing__row--move',\n+ forceFallback: true\n+ }\n+ };\n+ },\ncomputed: {\nrecords: {\nget() {\n" }, { "change_type": "MODIFY", "old_path": "templates/content/listing.twig", "new_path": "templates/content/listing.twig", "diff": "{% block aside %}\n<listing-select-box\n- ct=\"{{ contenttype.name }}\"\n- ct-singular=\"{{ contenttype.singular_name }}\"\n+ plural=\"{{ contenttype.name }}\"\n+ singular=\"{{ contenttype.singular_name }}\"\n></listing-select-box>\n<div class=\"card\">\n" } ]
PHP
MIT License
bolt/core
fixed draggable options
95,180
08.11.2018 11:14:05
-3,600
984b0069d39ec6c7517fbaa182bb93d2a23ae51d
fixed get attribute issue
[ { "change_type": "MODIFY", "old_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "new_path": "assets/js/app/listing/Components/Table/Row/_Checkbox.vue", "diff": "<template>\n- <div class=\"listing--checkbox\" key=\"checkbox\" v-if=\"!sorting\">\n+ <div class=\"listing--checkbox\" key=\"checkbox\" v-show=\"!sorting\">\n<div class=\"custom-control custom-checkbox\">\n<input\ntype=\"checkbox\"\n" } ]
PHP
MIT License
bolt/core
fixed get attribute issue
95,149
09.11.2018 13:42:46
-3,600
8b94ea9f8c96a7291b88c314e906f4338696f7f1
WIP: notifications vue app
[ { "change_type": "ADD", "old_path": null, "new_path": "assets/js/app/notifications/Components/Notification.vue", "diff": "+<template>\n+ <div class=\"admin__notification-message\">\n+ <transition name=\"notification\">\n+ <div class=\"notification\" :data-type=\"`is-${type}`\" role=\"alert\" v-if=\"!close\">\n+ <p v-html=\"message\"></p>\n+ <button type=\"button\" class=\"notification--close\" aria-label=\"Close\" @click=\"close = true\">\n+ {{ closingLabel }}\n+ </button>\n+ </div>\n+ </transition>\n+ </div>\n+</template>\n+\n+<script>\n+ export default {\n+ name: 'bolt-notification',\n+ props:\n+ {\n+ message: {\n+ type: String,\n+ required: true,\n+ default: \"\"\n+ },\n+ type: {\n+ type: String,\n+ required: true,\n+ default: \"error\",\n+ },\n+ closingLabel: {\n+ type: String,\n+ required: true,\n+ default: \"action.close_alert\"\n+ },\n+ duration: {\n+ type: String,\n+ required: false,\n+ default: \"300\"\n+ }\n+ },\n+ mounted () {\n+ setTimeout(() => this.close = false, 0)\n+ if (this.duration !== false) {\n+ setTimeout(() => this.close = true, this.duration)\n+ }\n+ },\n+ data: () => {\n+ return {\n+ close: true\n+ }\n+ }\n+ }\n+</script>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/app/notifications/README.md", "diff": "+h1. Notifications\n+\n+Receives a notification object in this form:\n+\n+message: {\n+ title\n+ type,\n+ body,\n+ labels,\n+ time\n+}\n+\n+receives messages via: backend-rendering as props and via events\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/js/app/notifications/index.js", "diff": "+import Vue from 'vue'\n+\n+import Notification from './Components/Notification'\n+\n+document.addEventListener('DOMContentLoaded', () => new Vue({\n+ el: '#notification',\n+ name: 'notification',\n+ components: {\n+ Notification\n+ },\n+ data () {\n+ const {dataset} = document.querySelector(this.$options.el)\n+ return {\n+ type: dataset.type,\n+ message: dataset.message,\n+ label: dataset.closingLabel,\n+ time: dataset.duration\n+ }\n+ },\n+ render (createElement) {\n+ return createElement('notification', {\n+ props: {\n+ type: this.type,\n+ message: this.message,\n+ closingLabel: this.label,\n+ duration: this.time\n+ }\n+ })\n+ }\n+}))\n" }, { "change_type": "MODIFY", "old_path": "assets/js/bolt.js", "new_path": "assets/js/bolt.js", "diff": "@@ -34,9 +34,9 @@ import './helpers/bootstrap';\nimport \"./Views/admin\";\nimport \"./Views/editor\";\nimport \"./Views/user\";\n-import \"./Views/notifications\";\n+import \"./app/notifications\";\nimport \"./app/listing\";\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "{% endblock %}\n</aside>\n- <div id=\"notifications\">\n+ <div class=\"admin__notification\">\n{{ include('_partials/_flash_messages.twig') }}\n</div>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/_flash_messages.twig", "new_path": "templates/_partials/_flash_messages.twig", "diff": "{% for type, messages in app.flashes %}\n{% for message in messages %}\n- <bolt-notification\n- type=\"{{ type }}\"\n- message=\"{{ message|trans }}\"\n- :labels=\"{{ labels|json_decode }}\"\n- :time=\"3000\"\n- ></bolt-notification>\n{% endfor %}\n{% endfor %}\n+<div id=\"notification\"\n+ data-type=\"test\"\n+ data-message=\"Test\"\n+ data-closing-label=\"close\"\n+ data-duration=\"3000\">\n+</div>\n" } ]
PHP
MIT License
bolt/core
WIP: notifications vue app
95,144
09.11.2018 16:26:18
-3,600
08cfd0cfb98d7e1ab24585ec09a794056ce691f9
Having `npm run` in composer.json was a fun idea, but kinda annoying. :-)
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"@auto-scripts\"\n],\n\"post-update-cmd\": [\n- \"@auto-scripts\",\n- \"npm install\",\n- \"npm run build\"\n+ \"@auto-scripts\"\n]\n},\n\"conflict\": {\n" }, { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "},\n{\n\"name\": \"doctrine/doctrine-cache-bundle\",\n- \"version\": \"1.3.3\",\n+ \"version\": \"1.3.5\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/doctrine/DoctrineCacheBundle.git\",\n- \"reference\": \"4c8e363f96427924e7e519c5b5119b4f54512697\"\n+ \"reference\": \"5514c90d9fb595e1095e6d66ebb98ce9ef049927\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/4c8e363f96427924e7e519c5b5119b4f54512697\",\n- \"reference\": \"4c8e363f96427924e7e519c5b5119b4f54512697\",\n+ \"url\": \"https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/5514c90d9fb595e1095e6d66ebb98ce9ef049927\",\n+ \"reference\": \"5514c90d9fb595e1095e6d66ebb98ce9ef049927\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"instaclick/coding-standard\": \"~1.1\",\n\"instaclick/object-calisthenics-sniffs\": \"dev-master\",\n\"instaclick/symfony2-coding-standard\": \"dev-remaster\",\n- \"phpunit/phpunit\": \"~4|~5\",\n+ \"phpunit/phpunit\": \"~4.8.36|~5.6|~6.5|~7.0\",\n\"predis/predis\": \"~0.8\",\n\"satooshi/php-coveralls\": \"^1.0\",\n\"squizlabs/php_codesniffer\": \"~1.5\",\n\"autoload\": {\n\"psr-4\": {\n\"Doctrine\\\\Bundle\\\\DoctrineCacheBundle\\\\\": \"\"\n- }\n+ },\n+ \"exclude-from-classmap\": [\n+ \"/Tests/\"\n+ ]\n},\n\"notification-url\": \"https://packagist.org/downloads/\",\n\"license\": [\n}\n],\n\"description\": \"Symfony Bundle for Doctrine Cache\",\n- \"homepage\": \"http://www.doctrine-project.org\",\n+ \"homepage\": \"https://www.doctrine-project.org\",\n\"keywords\": [\n\"cache\",\n\"caching\"\n],\n- \"time\": \"2018-03-27T09:22:12+00:00\"\n+ \"time\": \"2018-11-09T06:25:35+00:00\"\n},\n{\n\"name\": \"doctrine/doctrine-migrations-bundle\",\n},\n{\n\"name\": \"nesbot/carbon\",\n- \"version\": \"1.34.0\",\n+ \"version\": \"1.34.1\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/briannesbitt/Carbon.git\",\n- \"reference\": \"1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33\"\n+ \"reference\": \"19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/briannesbitt/Carbon/zipball/1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33\",\n- \"reference\": \"1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33\",\n+ \"url\": \"https://api.github.com/repos/briannesbitt/Carbon/zipball/19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9\",\n+ \"reference\": \"19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"datetime\",\n\"time\"\n],\n- \"time\": \"2018-09-20T19:36:25+00:00\"\n+ \"time\": \"2018-11-08T13:33:47+00:00\"\n},\n{\n\"name\": \"nikic/php-parser\",\n" } ]
PHP
MIT License
bolt/core
Having `npm run` in composer.json was a fun idea, but kinda annoying. :-)
95,144
09.11.2018 17:20:30
-3,600
abfbce84621e3eccf6fd8b37df7d8c33e8f9aa3d
Working on overriding templates for bundles
[ { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/vendor/api-platform/api-platform.scss", "diff": "+\n+/** INCREASE WRAPPER BLOC PADDING **/\n+\n+#swagger-ui.api-platform .wrapper {\n+ padding:0px 60px;\n+}\n+\n+\n+/** INFORMATIONS BLOC **/\n+\n+#swagger-ui.api-platform .information-container.wrapper {\n+ margin:0;\n+ padding:10px 0 0;\n+ width:100%;\n+ max-width:100%;\n+ background-color:white;\n+ border-bottom:1px solid #ccc;\n+ margin-bottom:30px;\n+}\n+\n+#swagger-ui.api-platform .info .title {\n+ color:#3caab5;\n+}\n+\n+#swagger-ui.api-platform .info {\n+ width: 100%;\n+ max-width: 1460px;\n+ padding: 0px 50px;\n+ margin: 0px auto;\n+}\n+\n+/** METHODS BLOCS **/\n+\n+#swagger-ui.api-platform .opblock.opblock-get .opblock-summary-method {\n+ background-color:#3CAAB5;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-put .opblock-summary-method {\n+ background-color:#E6C229;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-post .opblock-summary-method {\n+ background-color:#78BC61;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-delete .opblock-summary-method {\n+ background-color:#ED6A5A;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-deprecated .opblock-summary-method {\n+ background-color:#ebebeb;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-get .opblock-summary {\n+ border-color:#3CAAB5;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-put .opblock-summary {\n+ border-color:#E6C229;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-post .opblock-summary {\n+ border-color:#78BC61;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-delete .opblock-summary {\n+ border-color:#ED6A5A;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-deprecated .opblock-summary {\n+ border-color:#ebebeb;\n+}\n+\n+#swagger-ui.api-platform .opblock-summary-method {\n+ border-radius:0;\n+ padding:10px;\n+}\n+\n+#swagger-ui.api-platform .opblock-summary {\n+ padding:0;\n+}\n+#swagger-ui.api-platform .opblock-tag {\n+ padding:5px 0;\n+ margin:0 0 10px;\n+}\n+#swagger-ui.api-platform .opblock-tag:hover {\n+ background-color:rgba(0,0,0,.1);\n+ transform:scale(1.01);\n+}\n+\n+#swagger-ui.api-platform .opblock-section-header, #swagger-ui.api-platform .opblock.opblock-get .opblock-section-header {\n+ background-color:rgba(60,170,181,0.1);\n+ box-shadow:none;\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-post .opblock-section-header {\n+ background-color:rgba(120,188,97,0.1);\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-put .opblock-section-header {\n+ background-color:rgba(230, 194, 41, 0.1);\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-delete .opblock-section-header {\n+ background-color:rgba(237,106,90,0.1);\n+}\n+\n+#swagger-ui.api-platform .opblock.opblock-deprecated .opblock-section-header {\n+ background-color:rgba(235,235,235,0.1);\n+}\n+\n+#swagger-ui.api-platform .opblock {\n+ border-radius:0;\n+ background-color:white;\n+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);\n+ margin:0 0 10px;\n+ padding:0;\n+ border:none!important;\n+}\n+\n+#swagger-ui .topbar {\n+ display: none;\n+}\n+\n+/** FORMATS **/\n+\n+#formats {\n+ text-align:right;\n+ font-family: Open Sans,sans-serif;\n+ width: 100%;\n+ max-width: 1460px;\n+ padding: 0px 60px;\n+ margin:0 auto;\n+}\n+\n+\n+/** BUTTONS **/\n+\n+#swagger-ui.api-platform .btn.execute {\n+ background-color:#3CAAB5;\n+ border-color:#3CAAB5;\n+ animation:none;\n+ transition:all ease 0.3s;\n+}\n+\n+#swagger-ui.api-platform .btn.execute:hover {\n+ background-color:#288690;\n+ border-color:#288690;\n+}\n+\n+#swagger-ui.api-platform .execute-wrapper {\n+ text-align:center;\n+}\n+\n+#swagger-ui.api-platform .execute-wrapper .btn {\n+ width:auto;\n+ padding:10px 40px;\n+}\n+\n+#swagger-ui.api-platform .btn-group {\n+ max-width: 500px;\n+ margin-left: auto;\n+ margin-right: auto;\n+}\n+\n+#swagger-ui.api-platform .btn-group .btn {\n+ padding:10px 40px;\n+}\n+\n+#swagger-ui.api-platform .btn {\n+ transition:all ease 0.2s;\n+ box-shadow:none;\n+ background-color: #f7f7f7\n+}\n+\n+#swagger-ui.api-platform .btn:hover {\n+ background-color:rgba(65,68,78,0.1);\n+ border-color:transparent;\n+}\n+\n+#swagger-ui.api-platform .btn.cancel:hover {\n+ background-color:rgba(237,106,90,0.1);\n+}\n+\n+#swagger-ui.api-platform .btn.authorize:hover {\n+ background-color:rgba(120,188,97,0.1);\n+}\n+\n+#swagger-ui.api-platform select {\n+ box-shadow:none;\n+ cursor:pointer;\n+}\n+\n+\n+/** FIX TABS SEPARATOR **/\n+\n+#swagger-ui.api-platform .tab li:first-of-type:after {\n+ content : none;\n+}\n+\n+#swagger-ui.api-platform .tab li {\n+ padding:0px 5px;\n+ border-right:1px solid rgba(0,0,0,.2);\n+}\n+\n+#swagger-ui.api-platform .tab li:last-of-type {\n+ border-right:none;\n+}\n+\n+\n+/** REMOVE HIGHLIGHTS FOCUS INPUTS **/\n+\n+#swagger-ui.api-platform input:focus,\n+#swagger-ui.api-platform select:focus,\n+#swagger-ui.api-platform textarea:focus,\n+#swagger-ui.api-platform button:focus {\n+ outline: none;\n+}\n+\n+\n+/** REMOVE TITILIUM FONT **/\n+\n+.swagger-ui .opblock-tag,\n+.swagger-ui .opblock .opblock-section-header label,\n+.swagger-ui .opblock .opblock-section-header h4,\n+.swagger-ui .opblock .opblock-summary-method,\n+.swagger-ui .tab li,\n+.swagger-ui .scheme-container .schemes>label,\n+.swagger-ui .loading-container .loading:after,\n+.swagger-ui .btn,\n+.swagger-ui .btn.cancel,\n+.swagger-ui select,\n+.swagger-ui label,\n+.swagger-ui .dialog-ux .modal-ux-content h4,\n+.swagger-ui .dialog-ux .modal-ux-header h3,\n+.swagger-ui section.models h4,\n+.swagger-ui section.models h5,\n+.swagger-ui .model-title,\n+.swagger-ui .parameter__name,\n+.swagger-ui .topbar a,\n+.swagger-ui .topbar .download-url-wrapper .download-url-button,\n+.swagger-ui .info .title small pre,\n+.swagger-ui .scopes h2,\n+.swagger-ui .errors-wrapper hgroup h4 {\n+ font-family: Open Sans,sans-serif!important;\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/vendor.scss", "new_path": "assets/scss/vendor/vendor.scss", "diff": "@import './flatpickr/flatpickr';\n@import './baguette/baguette';\n@import './selectize/selectize';\n-\n+@import './api-platform/api-platform';\n" }, { "change_type": "MODIFY", "old_path": "config/routes/dev/php_translation.yaml", "new_path": "config/routes/dev/php_translation.yaml", "diff": "-_translation_webui:\n- resource: \"@TranslationBundle/Resources/config/routing_webui.yml\"\n- prefix: /admin\n+#_translation_webui:\n+# resource: \"@TranslationBundle/Resources/config/routing_webui.yml\"\n+# prefix: /admin\n_translation_profiler:\nresource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml'\n" }, { "change_type": "MODIFY", "old_path": "config/routes/php_translation.yaml", "new_path": "config/routes/php_translation.yaml", "diff": "_translation_edit_in_place:\nresource: '@TranslationBundle/Resources/config/routing_edit_in_place.yml'\n- prefix: /admin\n+ prefix: /bolt\n+\n+translation_index:\n+ path: /bolt/trans/{configName}\n+ methods: [GET]\n+ defaults: { _controller: Translation\\Bundle\\Controller\\WebUIController::indexAction, configName: null }\n+\n+translation_show:\n+ path: /bolt/trans/{configName}/{locale}/{domain}\n+ methods: [GET]\n+ defaults: { _controller: Translation\\Bundle\\Controller\\WebUIController::showAction }\n+\n+translation_create:\n+ path: /bolt/trans/{configName}/{locale}/{domain}/new\n+ methods: [POST]\n+ defaults: { _controller: Translation\\Bundle\\Controller\\WebUIController::createAction }\n+\n+translation_edit:\n+ path: /bolt/trans/{configName}/{locale}/{domain}\n+ methods: [POST]\n+ defaults: { _controller: Translation\\Bundle\\Controller\\WebUIController::editAction }\n+\n+translation_delete:\n+ path: /bolt/trans/{configName}/{locale}/{domain}\n+ methods: [DELETE]\n+ defaults: { _controller: Translation\\Bundle\\Controller\\WebUIController::deleteAction }\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<!-- Admin Toolbar -->\n<nav id=\"toolbar\" class=\"admin__toolbar\">\n- {% set labels = jsonlabels(['about.bolt_documentation', 'action.visit_site', 'action.create_new', ['general.greeting', {'%name%': user.fullName}], 'action.logout', 'action.edit_profile']) %}\n+ {% set username = user.fullName|default('Unknown user') %}\n+ {% set labels = jsonlabels(['about.bolt_documentation', 'action.visit_site', 'action.create_new', ['general.greeting', {'%name%': username}], 'action.logout', 'action.edit_profile']) %}\n<admin-toolbar\n:menu=\"{{ sidebarmenu() }}\"\nuser=\"{{user|default()}}\"\n" }, { "change_type": "ADD", "old_path": null, "new_path": "templates/bundles/ApiPlatformBundle/SwaggerUi/index.html.twig", "diff": "+{% extends '@bolt/_base/layout.twig' %}\n+\n+{% block container \"widecontent\" %}\n+\n+{% block title %}\n+ Bolt API Platform\n+{% endblock %}\n+\n+{% block main %}\n+\n+<div id=\"swagger-ui\" class=\"api-platform\"></div>\n+\n+<div class=\"swagger-ui\" id=\"formats\">\n+ <div class=\"information-container wrapper\">\n+ <div class=\"info\">\n+ Available formats:\n+ {% for format in formats|keys %}\n+ <a href=\"{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge({'_format': format})) }}\">{{ format }}</a>\n+ {% endfor %}\n+ </div>\n+ </div>\n+</div>\n+{% endblock %}\n+\n+{% block stylesheets %}\n+{{ parent() }}\n+<link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700\">\n+<link rel=\"stylesheet\" href=\"{{ asset('bundles/apiplatform/swagger-ui/swagger-ui.css') }}\">\n+\n+{# json_encode(65) is for JSON_UNESCAPED_SLASHES|JSON_HEX_TAG to avoid JS XSS #}\n+<script id=\"swagger-data\" type=\"application/json\">{{ swagger_data|json_encode(65)|raw }}</script>\n+{% endblock stylesheets %}\n+\n+\n+{% block javascripts %}\n+{{ parent() }}\n+<script src=\"{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-bundle.js') }}\"></script>\n+<script src=\"{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js') }}\"></script>\n+<script src=\"{{ asset('bundles/apiplatform/init-swagger-ui.js') }}\"></script>\n+{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Working on overriding templates for bundles
95,168
09.11.2018 17:22:41
-3,600
f5231fb1139ec44028965e99331a814738ed1bd4
Add PUT operation to update Content and Fields Entities
[ { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -19,8 +19,13 @@ use Symfony\\Component\\Serializer\\Annotation\\MaxDepth;\n/**\n* @ApiResource(\n* normalizationContext={\"groups\"={\"public\"}, \"enable_max_depth\"=true},\n+ * denormalizationContext={\"groups\"={\"put\"}},\n* collectionOperations={\"get\"},\n- * itemOperations={\"get\"}\n+ * itemOperations={\"get\",\n+ * \"put\"={\n+ * \"denormalization_context\"={\"groups\"={\"put\"}},\n+ * }\n+ * }\n* )\n* @ApiFilter(SearchFilter::class)\n* @ORM\\Entity(repositoryClass=\"Bolt\\Repository\\ContentRepository\")\n@@ -60,7 +65,7 @@ class Content\n/**\n* @ORM\\Column(type=\"string\", length=191)\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $status;\n@@ -72,25 +77,25 @@ class Content\n/**\n* @ORM\\Column(type=\"datetime\")\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $modifiedAt;\n/**\n* @ORM\\Column(type=\"datetime\", nullable=true)\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $publishedAt;\n/**\n* @ORM\\Column(type=\"datetime\")\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $depublishedAt;\n/**\n* @var Field[]|ArrayCollection\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n* @MaxDepth(1)\n* @ORM\\OneToMany(\n* targetEntity=\"Bolt\\Entity\\Field\",\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -8,12 +8,18 @@ use ApiPlatform\\Core\\Annotation\\ApiResource;\nuse Bolt\\Content\\FieldType;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Symfony\\Component\\Serializer\\Annotation\\Groups;\n+use Symfony\\Component\\Serializer\\Annotation\\MaxDepth;\n/**\n* @ApiResource(\n- * normalizationContext={\"groups\"={\"public\"}},\n+ * normalizationContext={\"groups\"={\"public\"}, \"enable_max_depth\"=true},\n+ * denormalizationContext={\"groups\"={\"public\"}},\n* collectionOperations={\"get\"},\n- * itemOperations={\"get\"}\n+ * itemOperations={\"get\",\n+ * \"put\"={\n+ * \"denormalization_context\"={\"groups\"={\"put\"}},\n+ * }\n+ * }\n* )\n* @ORM\\Entity(repositoryClass=\"Bolt\\Repository\\FieldRepository\")\n* @ORM\\Table(name=\"bolt_field\")\n@@ -51,7 +57,7 @@ class Field\n* @ORM\\Id()\n* @ORM\\GeneratedValue()\n* @ORM\\Column(type=\"integer\")\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $id;\n@@ -69,7 +75,7 @@ class Field\n/**\n* @ORM\\Column(type=\"json\")\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprotected $value = [];\n@@ -81,7 +87,7 @@ class Field\n/**\n* @ORM\\Column(type=\"integer\")\n- * @Groups(\"public\")\n+ * @Groups({\"public\", \"put\"})\n*/\nprivate $sortorder = 0;\n@@ -100,7 +106,6 @@ class Field\n/**\n* @ORM\\ManyToOne(targetEntity=\"Bolt\\Entity\\Content\", inversedBy=\"fields\")\n* @ORM\\JoinColumn(nullable=false)\n- * @Groups(\"public\")\n*/\nprivate $content;\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/User.php", "new_path": "src/Entity/User.php", "diff": "@@ -14,7 +14,7 @@ use Symfony\\Component\\Validator\\Constraints as Assert;\n* @ApiResource(\n* normalizationContext={\"groups\"={\"public\"}},\n* collectionOperations={\"get\"},\n- * itemOperations={\"get\"}\n+ * itemOperations={\"get\", \"put\"}\n* )\n* @ORM\\Entity(repositoryClass=\"Bolt\\Repository\\UserRepository\")\n* @ORM\\Table(name=\"bolt_user\")\n" } ]
PHP
MIT License
bolt/core
Add PUT operation to update Content and Fields Entities
95,149
09.11.2018 23:18:52
-3,600
66233d530f7937e06aeced2073aaa13a3e0d83c2
Render notifications by using css transitions. establish eventhub for app-to-app notifications
[ { "change_type": "MODIFY", "old_path": "assets/js/app/notifications/Components/Notification.vue", "new_path": "assets/js/app/notifications/Components/Notification.vue", "diff": "<template>\n<div class=\"admin__notification-message\">\n- <transition name=\"notification\">\n- <div class=\"notification\" :data-type=\"`is-${type}`\" role=\"alert\" v-if=\"!close\">\n- <p v-html=\"message\"></p>\n- <button type=\"button\" class=\"notification--close\" aria-label=\"Close\" @click=\"close = true\">\n+ <transition name=\"notification\" v-on:after-enter=\"show = false\" :duration=\"duration\">\n+ <div v-show=\"show\" class=\"notification\" :data-type=\"`is-${type}`\" role=\"alert\">\n+ <div v-html=\"message\"></div>\n+ <button type=\"button\" class=\"notification__close\" aria-label=\"Close\" @click=\"show = false\">\n{{ closingLabel }}\n</button>\n</div>\n</template>\n<script>\n+ import eventHub from \"../eventhub\";\n+\nexport default {\nname: 'bolt-notification',\nprops:\n}\n},\nmounted() {\n- setTimeout(() => this.close = false, 0)\n- if (this.duration !== false) {\n- setTimeout(() => this.close = true, this.duration)\n- }\n+ this.show = true;\n},\ndata: () => {\nreturn {\n- close: true\n+ show: false\n}\n+ },\n+ created() {\n+ const self = this;\n+ eventHub.$on('showMessage', (message) => {\n+ self.message = message.message;\n+ self.type = message.type;\n+ self.closingLabel = message.closingLabel;\n+ self.duration = message.duration;\n+ this.show = true;\n+ })\n}\n}\n</script>\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/notifications/index.js", "new_path": "assets/js/app/notifications/index.js", "diff": "import Vue from 'vue'\n-\nimport Notification from './Components/Notification'\n-document.addEventListener('DOMContentLoaded', () => new Vue({\n- el: '#notification',\n+document.addEventListener('DOMContentLoaded', () => {\n+ const notifications = Array.from(document.querySelectorAll(\".notifications\"));\n+ for (let notification of notifications) {\n+ new Vue({\n+ el: notification,\nname: 'notification',\ncomponents: {\nNotification\n},\ndata() {\n- const {dataset} = document.querySelector(this.$options.el)\n+ const {dataset} = notification\nreturn {\ntype: dataset.type,\nmessage: dataset.message,\n@@ -26,5 +28,18 @@ document.addEventListener('DOMContentLoaded', () => new Vue({\nduration: this.time\n}\n})\n+ },\n+ /*\n+ Example for event-driven notifications\n+ created() {\n+ setTimeout(() => {\n+ eventHub.$emit('showMessage', {\n+ message: \"hello world\"\n+ })\n+ }, 4000)\n}\n-}))\n+ */\n+ })\n+\n+ }\n+})\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/base/_notification.scss", "new_path": "assets/scss/modules/base/_notification.scss", "diff": "//** Base | Notification\n-#notifications{\n+.notification {\n-webkit-backface-visibility: hidden;\nz-index: 2000;\nposition: fixed;\nbottom: $spacer * 2;\nright: $spacer * 2;\nwidth: 440px;\n-}\n-.notification{\nbackground: var(--body);\ndisplay: flex;\npadding: $spacer;\ncolor: var(--foreground);\nmargin-bottom: $spacer;\nfont-weight: $font-weight-bold;\n- width: inherit;\n+\n&[data-type='is-success'] {\n- .notification--close{\n+ .notification__close {\ncolor: var(--success);\n}\n}\n&[data-type='is-danger'] {\n- .notification--close{\n+ .notification__close {\ncolor: var(--danger);\n}\n}\nflex: auto;\n}\n- &--close{\n+ &__close {\ndisplay: flex;\nalign-items: center;\n- justify-content: center;\n+ justify-content: end;\nbackground: transparent;\nborder: 0;\nposition: relative;\n}\n}\n-\n.notification-enter-active, .notification-leave-active {\ntransition: all .35s;\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/_flash_messages.twig", "new_path": "templates/_partials/_flash_messages.twig", "diff": "{% for type, messages in app.flashes %}\n{% for message in messages %}\n+ <div class=\"notifications\"\n+ data-type=\"{{ type }}\"\n+ data-message=\"{{ message|trans }}\"\n+ data-closing-label=\"close\"\n+ data-duration=\"3000\">\n+ </div>\n+ {% dump(message) %}\n{% endfor %}\n{% endfor %}\n-<div id=\"notification\"\n- data-type=\"test\"\n+\n+{#\n+\n+For example, multiple messages\n+\n+<div class=\"notifications\"\n+ data-type=\"success\"\ndata-message=\"Test\"\ndata-closing-label=\"close\"\ndata-duration=\"3000\">\n</div>\n+\n+<div class=\"notifications\"\n+ data-type=\"danger\"\n+ data-message=\"Test2\"\n+ data-closing-label=\"close\"\n+ data-duration=\"3000\">\n+</div>\n+\n+<div class=\"notifications\"\n+ data-type=\"success\"\n+ data-message=\"Test3\"\n+ data-closing-label=\"close\"\n+ data-duration=\"3000\">\n+</div>\n+\n+\n+#}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Render notifications by using css transitions. establish eventhub for app-to-app notifications
95,144
10.11.2018 13:34:09
-3,600
a690b8cd22b35fd2e49c9d18199fb88566399f4a
Fix link in submenus
[ { "change_type": "MODIFY", "old_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue", "new_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue", "diff": "</a>\n</li>\n<li v-if=\"item.submenu !== null\" v-for=\"(record, index) in item.submenu\" :key=\"index\">\n- <a :href=\"record.editlink\">\n+ <a :href=\"record.editlink || record.link\">\n<i class=\"fas mr-2\" :class=\"record.icon\"></i><span v-html=\"record.name\"></span>\n</a>\n</li>\n" } ]
PHP
MIT License
bolt/core
Fix link in submenus
95,144
10.11.2018 13:34:22
-3,600
6f498509f6058b29d5c2f06f1bedeed9abdb8370
Generate menu only once
[ { "change_type": "MODIFY", "old_path": "src/Twig/ContentHelperExtension.php", "new_path": "src/Twig/ContentHelperExtension.php", "diff": "@@ -19,6 +19,9 @@ class ContentHelperExtension extends AbstractExtension\n/** @var TranslatorInterface */\nprivate $translator;\n+ /** @var string */\n+ private $menu = null;\n+\n/**\n* ContentHelperExtension constructor.\n*\n@@ -59,11 +62,13 @@ class ContentHelperExtension extends AbstractExtension\npublic function sidebarmenu($pretty = false)\n{\n- $menu = $this->menuBuilder->getMenu();\n-\n+ if (!$this->menu) {\n+ $menuArray = $this->menuBuilder->getMenu();\n$options = $pretty ? JSON_PRETTY_PRINT : 0;\n+ $this->menu = json_encode($menuArray, $options);\n+ }\n- return json_encode($menu, $options);\n+ return $this->menu;\n}\npublic function fieldfactory($name, $definition)\n" } ]
PHP
MIT License
bolt/core
Generate menu only once
95,144
10.11.2018 13:34:33
-3,600
d6540cb2eef2c3e1b3fd90f9ea605177c7957a7d
Bump FA to 5.5.0
[ { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "<title>{{ block('title')|striptags }}</title>\n{% block stylesheets %}\n<link href=\"https://fonts.googleapis.com/css?family=Open+Sans:400,600|Source+Sans+Pro:300,400,600&amp;subset=latin-ext\" rel=\"stylesheet\">\n- <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.3.1/css/all.css\" integrity=\"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU\" crossorigin=\"anonymous\">\n+ <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.5.0/css/all.css\" integrity=\"sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU\" crossorigin=\"anonymous\">\n{% set theme = 'theme-' ~ user.backendTheme|default('default') %}\n{{ encore_entry_link_tags('bolt') }}\n{{ encore_entry_link_tags(theme) }}\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout_blank.twig", "new_path": "templates/_base/layout_blank.twig", "diff": "<title>{{ block('title')|striptags }}</title>\n{% block stylesheets %}\n<link href=\"https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600\" rel=\"stylesheet\">\n- <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.3.1/css/all.css\" integrity=\"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU\" crossorigin=\"anonymous\">\n+ <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.5.0/css/all.css\" integrity=\"sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU\" crossorigin=\"anonymous\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets/bolt.css') }}\">\n{% endblock %}\n</head>\n" } ]
PHP
MIT License
bolt/core
Bump FA to 5.5.0
95,144
10.11.2018 14:16:11
-3,600
a7d832a220f9cd74b77dd2be13cfab94d010b0c7
Adding 'fa-fw' to make icons line up
[ { "change_type": "MODIFY", "old_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue", "new_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue", "diff": "<ul class=\"link--menu\">\n<li v-if=\"item.link_new !== null\" class=\"link--create\">\n<a :href=\"item.link_new\">\n- <i class=\"fas fa-magic mr-2\"></i><span>New {{item.singular_name}}</span>\n+ <i class=\"fas fa-fw fa-magic mr-2\"></i><span>New {{item.singular_name}}</span>\n</a>\n</li>\n<li v-if=\"item.submenu !== null\" v-for=\"(record, index) in item.submenu\" :key=\"index\">\n<a :href=\"record.editlink || record.link\">\n- <i class=\"fas mr-2\" :class=\"record.icon\"></i><span v-html=\"record.name\"></span>\n+ <i class=\"fas fa-fw mr-2\" :class=\"record.icon\"></i><span v-html=\"record.name\"></span>\n</a>\n</li>\n</ul>\n" } ]
PHP
MIT License
bolt/core
Adding 'fa-fw' to make icons line up
95,144
10.11.2018 14:17:27
-3,600
9aea9e7f1b77a076cbd2ec4d46b783222d227528
Renaming some config files
[ { "change_type": "RENAME", "old_path": "config/bolt/contenttypes.yml", "new_path": "config/bolt/contenttypes.yaml", "diff": "" }, { "change_type": "RENAME", "old_path": "config/bolt/menu.yml", "new_path": "config/bolt/menu.yaml", "diff": "" }, { "change_type": "DELETE", "old_path": "config/bolt/routing.yml", "new_path": null, "diff": "-# This file defines user-definable routes for the frontend of your Bolt website.\n-# Check below for examples, or read the documentation at\n-# https://docs.bolt.cm/configuration/routing\n-\n-# ------------------------------------------------------------------------------\n-# Place your own routes here, that have a HIGHER priority than the default routes.\n-\n-\n-\n-# ------------------------------------------------------------------------------\n-# These are the routes defining the default behaviour of Bolt's frontend.\n-# Changing these might give unexpected results or even break your website. If\n-# possible, only add NEW routes above or below these.\n-\n-homepage:\n- path: /\n- defaults:\n- _controller: controller.frontend:homepage\n-\n-search:\n- path: /search\n- defaults:\n- _controller: controller.frontend:search\n-\n-preview:\n- path: /preview/{contenttypeslug}\n- defaults:\n- _controller: controller.frontend:preview\n- requirements:\n- contenttypeslug: controller.requirement:anyContentType\n- methods: [POST]\n-\n-contentlink:\n- path: /{contenttypeslug}/{slug}\n- defaults:\n- _controller: controller.frontend:record\n- requirements:\n- contenttypeslug: controller.requirement:anyContentType\n-\n-taxonomylink:\n- path: /{taxonomytype}/{slug}\n- defaults:\n- _controller: controller.frontend:taxonomy\n- requirements:\n- taxonomytype: controller.requirement:anyTaxonomyType\n-\n-contentlisting:\n- path: /{contenttypeslug}\n- defaults:\n- _controller: controller.frontend:listing\n- requirements:\n- contenttypeslug: controller.requirement:pluralContentTypes\n-\n-# ------------------------------------------------------------------------------\n-# Place your own routes here, that have a LOWER priority than the default routes.\n-\n-\n-\n-# ------------------------------------------------------------------------------\n-# Routes examples:\n-\n-# Example to route old '.html' pages to pages genereated by bolt.\n-\n-# oldpages:\n-# path: /{slug}.html\n-# defaults:\n-# _controller: controller.frontend:record\n-# contenttypeslug: page\n-# requirements:\n-# slug: '[a-z0-9-_]+'\n-\n-\n-# Example route with a host requirement\n-\n-# example:\n-# path: /example\n-# defaults:\n-# _controller: controller.frontend:record\n-# contenttypeslug: page\n-# slug: example\n-# host: www.mydomain.org\n-\n-\n-# Example override for a specific contenttype\n-\n-# pagebinding:\n-# path: /{slug}\n-# defaults:\n-# _controller: controller.frontend:record\n-# contenttypeslug: page\n-# contenttype: pages\n-\n-\n-\n-# Example single record override\n-\n-# aboutbinding:\n-# path: /about\n-# defaults:\n-# _controller: controller.frontend:record\n-# contenttypeslug: page\n-# slug: about\n-# recordslug: page/about\n-\n-\n-# Supported internal defaults are:\n-# _controller the controller class::method to be called\n-# _before the before to call, if non-existent the 'before()' of the controller will be called\n-# _after the after to call, if non-existent the 'after()' of the controller will be called\n-#\n-# Both _before and _after support a shortcut notation which re-uses the controller class: '::before'\n-\n-\n-# Example: rendering a \"static\" template from the current theme with no associated record/content.\n-# Note that you can still load and render content from within the template.\n-\n-# templatebinding:\n-# path: /static-page\n-# defaults:\n-# _controller: controller.frontend:template\n-# template: static-page\n" }, { "change_type": "RENAME", "old_path": "config/bolt/taxonomy.yml", "new_path": "config/bolt/taxonomy.yaml", "diff": "" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "},\n\"css-select\": {\n\"version\": \"1.2.0\",\n- \"resolved\": \"http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n\"integrity\": \"sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"domelementtype\": {\n\"version\": \"1.1.3\",\n- \"resolved\": \"http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n\"integrity\": \"sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=\",\n\"dev\": true\n}\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"htmlparser2\": {\n\"version\": \"3.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n\"integrity\": \"sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"media-typer\": {\n\"version\": \"0.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n\"integrity\": \"sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=\",\n\"dev\": true\n},\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"regjsgen\": {\n\"version\": \"0.2.0\",\n- \"resolved\": \"http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n\"integrity\": \"sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=\",\n\"dev\": true\n},\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"dev\": true,\n\"requires\": {\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\",\n\"dev\": true\n},\n},\n\"util\": {\n\"version\": \"0.10.3\",\n- \"resolved\": \"http://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n\"integrity\": \"sha1-evsa/lCAUkZInj23/g7TeTNqwPk=\",\n\"dev\": true,\n\"requires\": {\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/ContentTypesParser.php", "new_path": "src/Configuration/Parser/ContentTypesParser.php", "diff": "@@ -24,7 +24,7 @@ class ContentTypesParser extends BaseParser\npublic function parse(): Collection\n{\n$contentTypes = new Collection();\n- $tempContentTypes = $this->parseConfigYaml('contenttypes.yml');\n+ $tempContentTypes = $this->parseConfigYaml('contenttypes.yaml');\nforeach ($tempContentTypes as $key => $contentType) {\n$contentType = $this->parseContentType($key, $contentType);\n$contentTypes[$key] = $contentType;\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/TaxonomyParser.php", "new_path": "src/Configuration/Parser/TaxonomyParser.php", "diff": "@@ -17,7 +17,7 @@ class TaxonomyParser extends BaseParser\n*/\npublic function parse(): Collection\n{\n- $taxonomies = $this->parseConfigYaml('taxonomy.yml');\n+ $taxonomies = $this->parseConfigYaml('taxonomy.yaml');\n$slugify = Slugify::create();\n" } ]
PHP
MIT License
bolt/core
Renaming some config files
95,144
10.11.2018 14:19:03
-3,600
244f45a0048511d63d84f7dc75e5c812cd2d2ddb
Cleaning up and fixing all menu links
[ { "change_type": "MODIFY", "old_path": "src/Content/MenuBuilder.php", "new_path": "src/Content/MenuBuilder.php", "diff": "@@ -61,13 +61,15 @@ class MenuBuilder\n$menu = $this->factory->createItem('root');\n- $menu->addChild('Dashboard', ['uri' => 'homepage', 'extras' => [\n+ $menu->addChild('Dashboard', [\n+ 'uri' => $this->urlGenerator->generate('bolt_dashboard'),\n+ 'extras' => [\n'name' => $t->trans('caption.dashboard'),\n'icon' => 'fa-tachometer-alt',\n- 'link' => '/bolt/',\n- ]]);\n+ ]\n+ ]);\n- $menu->addChild('Content', ['uri' => 'content', 'extras' => [\n+ $menu->addChild('Content', ['extras' => [\n'name' => $t->trans('caption.content'),\n'type' => 'separator',\n'icon' => 'fa-file',\n@@ -76,22 +78,23 @@ class MenuBuilder\n$contenttypes = $this->config->get('contenttypes');\nforeach ($contenttypes as $contenttype) {\n- $menu->addChild($contenttype['slug'], ['uri' => 'homepage', 'extras' => [\n+ $menu->addChild($contenttype['slug'], [\n+ 'uri' => $this->urlGenerator->generate('bolt_contentlisting', ['contenttype' => $contenttype['slug']]),\n+ 'extras' => [\n'name' => $contenttype['name'],\n'singular_name' => $contenttype['singular_name'],\n'slug' => $contenttype['slug'],\n'singular_slug' => $contenttype['singular_slug'],\n'icon' => $contenttype['icon_many'],\n- 'link' => $this->urlGenerator->generate('bolt_contentlisting', ['contenttype' => $contenttype['slug']]),\n'link_new' => $this->urlGenerator->generate('bolt_edit_record', ['id' => $contenttype['slug']]),\n'contenttype' => $contenttype['slug'],\n'singleton' => $contenttype['singleton'],\n'active' => $contenttype['slug'] === 'pages' ? true : false,\n'submenu' => $this->getLatestRecords($contenttype['slug']),\n- ]]);\n+ ], ]);\n}\n- $menu->addChild('Settings', ['uri' => 'settings', 'extras' => [\n+ $menu->addChild('Settings', ['extras' => [\n'name' => $t->trans('caption.settings'),\n'type' => 'separator',\n'icon' => 'fa-wrench',\n@@ -99,106 +102,154 @@ class MenuBuilder\n// Configuration submenu\n- $menu->addChild('Configuration', ['uri' => 'configuration', 'extras' => [\n+ $menu->addChild('Configuration', ['extras' => [\n'name' => $t->trans('caption.configuration'),\n- 'icon' => 'fa-flag',\n- 'link' => '/bolt/finder/config',\n+ 'icon' => 'fa-sliders-h',\n]]);\n- $menu['Configuration']->addChild('Users &amp; Permissions', ['uri' => 'users', 'extras' => [\n+ $menu['Configuration']->addChild('Users &amp; Permissions', [\n+ 'uri' => $this->urlGenerator->generate('bolt_users'),\n+ 'extras' => [\n'name' => $t->trans('caption.users_permissions'),\n- 'icon' => 'fa-group',\n- 'link' => '/bolt/finder/config',\n- ]]);\n+ 'icon' => 'fa-users',\n+ ],\n+ ]);\n- $menu['Configuration']->addChild('Main configuration', ['uri' => 'config', 'extras' => [\n+ $menu['Configuration']->addChild('Main configuration', [\n+ 'uri' => $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/bolt/config.yaml']),\n+ 'extras' => [\n'name' => $t->trans('caption.main_configuration'),\n'icon' => 'fa-cog',\n- 'link' => '/bolt/editfile/config?file=/bolt/config.yaml',\n- ]]);\n+ ],\n+ ]);\n- $menu['Configuration']->addChild('ContentTypes', ['uri' => 'contenttypes', 'extras' => [\n+ $menu['Configuration']->addChild('ContentTypes', [\n+ 'uri' => $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/bolt/contenttypes.yaml']),\n+ 'extras' => [\n'name' => $t->trans('caption.contenttypes'),\n- 'icon' => 'fa-paint-brush',\n- 'link' => '/bolt/editfile/config?file=/bolt/contenttypes.yml',\n- ]]);\n+ 'icon' => 'fa-object-group',\n+ ]\n+ ]);\n- $menu['Configuration']->addChild('Taxonomies', ['uri' => 'taxonomy', 'extras' => [\n+ $menu['Configuration']->addChild('Taxonomies', [\n+ 'uri' => $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/bolt/taxonomy.yaml']),\n+ 'extras' => [\n'name' => $t->trans('caption.taxonomies'),\n'icon' => 'fa-tags',\n- 'link' => '/bolt/editfile/config?file=/bolt/taxonomy.yml',\n- ]]);\n+ ]\n+ ]);\n- $menu['Configuration']->addChild('Menu set up', ['uri' => 'menusetup', 'extras' => [\n+ $menu['Configuration']->addChild('Menu set up', [\n+ 'uri' => $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/bolt/menu.yaml']),\n+ 'extras' => [\n'name' => $t->trans('caption.menu_setup'),\n'type' => 'separator',\n'icon' => 'fa-list',\n- 'link' => '/bolt/editfile/config?file=/bolt/menu.yml',\n- ]]);\n+ ]\n+ ]);\n- $menu['Configuration']->addChild('Routing set up', ['uri' => 'routing', 'extras' => [\n+ $menu['Configuration']->addChild('Routing set up', [\n+ 'uri' => $this->urlGenerator->generate('bolt_edit_file', ['area' => 'config', 'file' => '/routes.yaml']),\n+ 'extras' => [\n'name' => $t->trans('caption.routing_setup'),\n- 'icon' => 'fa-random',\n- 'link' => '/bolt/editfile/config?file=/bolt/routing.yml',\n+ 'icon' => 'fa-directions',\n+ ]\n+ ]);\n+\n+ $menu['Configuration']->addChild('All configuration files', [\n+ 'uri' => $this->urlGenerator->generate('bolt_finder', ['area' => 'config']),\n+ 'extras' => [\n+ 'name' => $t->trans('caption.all_configuration_files'),\n+ 'icon' => 'fa-cogs',\n+ ]\n+ ]);\n+\n+ // Maintenance submenu\n+\n+ $menu->addChild('Maintenance', ['extras' => [\n+ 'name' => $t->trans('caption.maintenance'),\n+ 'icon' => 'fa-wrench',\n]]);\n- $menu['Configuration']->addChild('Check database', ['uri' => 'database', 'extras' => [\n+ $menu['Maintenance']->addChild('Bolt API', [\n+ 'uri' => $this->urlGenerator->generate('api_entrypoint'),\n+ 'extras' => [\n+ 'name' => $t->trans('caption.api'),\n+ 'icon' => 'fa-code',\n+ ]\n+ ]);\n+\n+ $menu['Maintenance']->addChild('Check database', [\n+ 'uri' => '',\n+ 'extras' => [\n'name' => $t->trans('caption.check_database'),\n- 'type' => 'separator',\n'icon' => 'fa-database',\n- 'link' => '/bolt/finder/config',\n- ]]);\n-\n- $menu['Configuration']->addChild('Clear the cache', ['uri' => 'cache', 'extras' => [\n+ ]\n+ ]);\n+\n+ $menu['Maintenance']->addChild('Fixtures', [\n+ 'uri' => '',\n+ 'extras' => [\n+ 'name' => $t->trans('caption.fixtures_dummy_content'),\n+ 'icon' => 'fa-hat-wizard',\n+ ]\n+ ]);\n+\n+ $menu['Maintenance']->addChild('Clear the cache', [\n+ 'uri' => '',\n+ 'extras' => [\n'name' => $t->trans('caption.clear_cache'),\n'icon' => 'fa-eraser',\n- 'link' => '/bolt/finder/config',\n- ]]);\n+ ]\n+ ]);\n- $menu['Configuration']->addChild('Set-up checks', ['uri' => 'else', 'extras' => [\n+ $menu['Maintenance']->addChild('Set-up checks', [\n+ 'uri' => '',\n+ 'extras' => [\n'name' => $t->trans('caption.setup_checks'),\n- 'icon' => 'fa-support',\n- 'link' => '/bolt/finder/config',\n- ]]);\n+ 'icon' => 'fa-clipboard-check',\n+ ]\n+ ]);\n- $menu['Configuration']->addChild('Translations: Messages', ['uri' => 'else', 'extras' => [\n+ $menu['Maintenance']->addChild('Translations: Messages', [\n+ 'uri' => $this->urlGenerator->generate('translation_index'),\n+ 'extras' => [\n'name' => $t->trans('caption.translations'),\n- 'type' => 'separator',\n- 'icon' => 'fa-flag',\n- 'link' => '/bolt/finder/config',\n- ]]);\n+ 'icon' => 'fa-language',\n+ ]\n+ ]);\n+\n+ $menu['Maintenance']->addChild('Extensions', [\n+ 'uri' => '',\n+ 'extras' => [\n+ 'name' => $t->trans('caption.extensions'),\n+ 'icon' => 'fa-plug',\n+ ]\n+ ]);\n+\n// File Management submenu\n- $menu->addChild('File Management', ['uri' => 'content-files', 'extras' => [\n+\n+ $menu->addChild('File Management', ['extras' => [\n'name' => $t->trans('caption.file_management'),\n- 'icon' => 'fa-flag',\n- 'link' => '/bolt/finder/files',\n+ 'icon' => 'fa-folder-open',\n]]);\n- $menu['File Management']->addChild('Uploaded files', ['uri' => 'content-files', 'extras' => [\n+ $menu['File Management']->addChild('Uploaded files', [\n+ 'uri' => $this->urlGenerator->generate('bolt_finder', ['area' => 'files']),\n+ 'extras' => [\n'name' => $t->trans('caption.uploaded_files'),\n- 'icon' => 'fa-folder-open-o',\n- 'link' => '/bolt/finder/files',\n- ]]);\n+ 'icon' => 'fa-archive',\n+ ]\n+ ]);\n- $menu['File Management']->addChild('View/edit Templates', ['uri' => 'theme-files', 'extras' => [\n+ $menu['File Management']->addChild('View/edit Templates', [\n+ 'uri' => $this->urlGenerator->generate('bolt_finder', ['area' => 'themes']),\n+ 'extras' => [\n'name' => $t->trans('caption.view_edit_templates'),\n- 'icon' => 'fa-desktop',\n- 'link' => '/bolt/finder/themes',\n- ]]);\n-\n- $menu->addChild('Extensions', ['uri' => 'extensions', 'extras' => [\n- 'name' => $t->trans('caption.extensions'),\n- 'icon' => 'fa-cubes',\n- 'link' => '/bolt/extensions',\n- ]]);\n-\n- $menu->addChild('Bolt API', ['uri' => 'settings', 'extras' => [\n- 'name' => $t->trans('caption.api'),\n- 'icon' => 'fa-code',\n- 'link' => '/api',\n- ]]);\n-\n+ 'icon' => 'fa-scroll',\n+ ]\n+ ]);\n$this->stopwatch->stop('bolt.sidebar');\n@@ -246,7 +297,7 @@ class MenuBuilder\n'slug' => $submenuChild->getExtra('slug'),\n'singular_slug' => $submenuChild->getExtra('singular_slug'),\n'icon' => $submenuChild->getExtra('icon'),\n- 'link' => $submenuChild->getExtra('link'),\n+ 'link' => $submenuChild->getUri(),\n'link_new' => $submenuChild->getExtra('link_new'),\n'contenttype' => $submenuChild->getExtra('contenttype'),\n'singleton' => $submenuChild->getExtra('singleton'),\n@@ -264,7 +315,7 @@ class MenuBuilder\n'slug' => $child->getExtra('slug'),\n'singular_slug' => $child->getExtra('singular_slug'),\n'icon' => $child->getExtra('icon'),\n- 'link' => $child->getExtra('link'),\n+ 'link' => $child->getUri(),\n'link_new' => $child->getExtra('link_new'),\n'contenttype' => $child->getExtra('contenttype'),\n'singleton' => $child->getExtra('singleton'),\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -20,6 +20,14 @@ use Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n*/\nclass UserController extends BaseController\n{\n+ /**\n+ * @Route(\"/users\", name=\"bolt_users\")\n+ */\n+ public function users()\n+ {\n+ return $this->renderTemplate('pages/about.twig');\n+ }\n+\n/**\n* @Route(\"/profile-edit\", methods={\"GET\", \"POST\"}, name=\"bolt_profile_edit\")\n*/\n" } ]
PHP
MIT License
bolt/core
Cleaning up and fixing all menu links
95,144
10.11.2018 16:40:12
-3,600
22b34559d52ec6b9366bbe3fa99ad61937621d2f
Updating composer deps.
[ { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "},\n{\n\"name\": \"symfony/flex\",\n- \"version\": \"v1.1.1\",\n+ \"version\": \"v1.1.6\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/flex.git\",\n- \"reference\": \"9fb60f232af0764d58002e7872acb43a74506d25\"\n+ \"reference\": \"27473c8bdf817b462dd26e9e4581795aa095d445\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/flex/zipball/9fb60f232af0764d58002e7872acb43a74506d25\",\n- \"reference\": \"9fb60f232af0764d58002e7872acb43a74506d25\",\n+ \"url\": \"https://api.github.com/repos/symfony/flex/zipball/27473c8bdf817b462dd26e9e4581795aa095d445\",\n+ \"reference\": \"27473c8bdf817b462dd26e9e4581795aa095d445\",\n\"shasum\": \"\"\n},\n\"require\": {\n}\n],\n\"description\": \"Composer plugin for Symfony\",\n- \"time\": \"2018-09-03T08:17:12+00:00\"\n+ \"time\": \"2018-11-10T12:25:57+00:00\"\n},\n{\n\"name\": \"symfony/form\",\n},\n{\n\"name\": \"tightenco/collect\",\n- \"version\": \"v5.7.12\",\n+ \"version\": \"v5.7.13\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/tightenco/collect.git\",\n- \"reference\": \"0d89929f10a495ebafc15fb6bff5581d10c38abb\"\n+ \"reference\": \"5172ad96c54560352b79386b293375da40280fdc\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/tightenco/collect/zipball/0d89929f10a495ebafc15fb6bff5581d10c38abb\",\n- \"reference\": \"0d89929f10a495ebafc15fb6bff5581d10c38abb\",\n+ \"url\": \"https://api.github.com/repos/tightenco/collect/zipball/5172ad96c54560352b79386b293375da40280fdc\",\n+ \"reference\": \"5172ad96c54560352b79386b293375da40280fdc\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"collection\",\n\"laravel\"\n],\n- \"time\": \"2018-10-30T21:09:13+00:00\"\n+ \"time\": \"2018-11-09T19:12:42+00:00\"\n},\n{\n\"name\": \"twig/extensions\",\n" } ]
PHP
MIT License
bolt/core
Updating composer deps.
95,149
10.11.2018 23:02:56
-3,600
701ee9016d2e52b3e4a505f3b96893ef80dc745f
Remove obsolete Notification component
[ { "change_type": "DELETE", "old_path": "assets/js/Components/Base/Notification.vue", "new_path": null, "diff": "-<template>\n- <transition name=\"notification\">\n- <div class=\"notification\" :data-type=\"`is-${type}`\" role=\"alert\" v-if=\"!close\">\n- <p v-html=\"message\"></p>\n- <button type=\"button\" class=\"notification--close\" aria-label=\"Close\" @click=\"close = true\">\n- {{ labels['action.close_alert'] }}\n- </button>\n- </div>\n- </transition>\n-</template>\n-\n-<script>\n-export default {\n- name: \"bolt-notification\",\n- props: [\"message\", \"type\", \"time\", \"labels\"],\n- mounted(){\n- setTimeout(() => this.close = false, 0);\n- if(this.time !== false){\n- setTimeout(() => this.close = true, this.time);\n- }\n- },\n- data: () => {\n- return {\n- close: true\n- };\n- },\n-};\n-</script>\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Remove obsolete Notification component
95,149
11.11.2018 00:00:35
-3,600
ea76949c27f3b666a2c1f07d431612708de16eb8
Stack multiple notifications verticaly. Fixes
[ { "change_type": "MODIFY", "old_path": "assets/js/app/notifications/Components/Notification.vue", "new_path": "assets/js/app/notifications/Components/Notification.vue", "diff": "<div class=\"admin__notification-message\">\n<transition name=\"notification\" v-on:after-enter=\"show = false\" :duration=\"duration\">\n<div v-show=\"show\" class=\"notification\" :data-type=\"`is-${type}`\" role=\"alert\">\n- <div v-html=\"message\"></div>\n+ <div v-html=\"message\" class=\"notification__message\"></div>\n<button type=\"button\" class=\"notification__close\" aria-label=\"Close\" @click=\"show = false\">\n{{ closingLabel }}\n</button>\ntype: {\ntype: String,\nrequired: true,\n- default: \"error\",\n+ default: \"danger\",\n},\nclosingLabel: {\ntype: String,\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/base/_notification.scss", "new_path": "assets/scss/modules/base/_notification.scss", "diff": "//** Base | Notification\n-\n-.notification {\n+.admin__notifications {\n+ display: block;\n-webkit-backface-visibility: hidden;\nz-index: 2000;\nposition: fixed;\nbottom: $spacer * 2;\nright: $spacer * 2;\n- width: 440px;\n-\n+}\n+.admin__notification-message {\n+ display: flex !important;\n+ align-items: center;\n+}\n+.notification {\n+ position: relative;\nbackground: var(--body);\n- display: flex;\n- padding: $spacer;\n+ padding: $spacer $spacer;\n+ margin-bottom: $spacer * .5;\nborder-radius: $border-radius;\nbox-shadow: $card-box-shadow;\ncolor: var(--foreground);\n- margin-bottom: $spacer;\nfont-weight: $font-weight-bold;\n+ & .notification__message {\n+ float: left !important;;\n+ }\n+\n&[data-type='is-success'] {\n.notification__close {\ncolor: var(--success);\ncolor: var(--danger);\n}\n}\n- &:last-child {\n- margin-bottom: 0;\n- }\n+\np {\nmargin: 0;\nflex: auto;\n}\n&__close {\n- display: flex;\n- align-items: center;\n- justify-content: end;\n+ float: right !important;\nbackground: transparent;\nborder: 0;\nposition: relative;\ncolor: var(--foreground);\nfont-weight: $font-weight-bold;\nright: -$spacer / 2;\n- margin-left: $spacer;\nletter-spacing: $letter-spacing;\ntext-transform: capitalize;\n&:focus {\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "{% endblock %}\n</aside>\n- <div class=\"admin__notification\">\n+ <div class=\"admin__notifications\">\n{{ include('_partials/_flash_messages.twig') }}\n</div>\n</div>\n" } ]
PHP
MIT License
bolt/core
Stack multiple notifications verticaly. Fixes #96
95,149
11.11.2018 00:03:36
-3,600
264772c865355561da64d46d68a64c83be32b4fc
Remove example for multiple messages
[ { "change_type": "MODIFY", "old_path": "templates/_partials/_flash_messages.twig", "new_path": "templates/_partials/_flash_messages.twig", "diff": "{% dump(message) %}\n{% endfor %}\n{% endfor %}\n-\n-{#\n-\n-For example, multiple messages\n-\n-<div class=\"notifications\"\n- data-type=\"success\"\n- data-message=\"Test\"\n- data-closing-label=\"close\"\n- data-duration=\"3000\">\n-</div>\n-\n-<div class=\"notifications\"\n- data-type=\"danger\"\n- data-message=\"Test2\"\n- data-closing-label=\"close\"\n- data-duration=\"3000\">\n-</div>\n-\n-<div class=\"notifications\"\n- data-type=\"success\"\n- data-message=\"Test3\"\n- data-closing-label=\"close\"\n- data-duration=\"3000\">\n-</div>\n-\n-\n-#}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Remove example for multiple messages
95,144
11.11.2018 17:03:41
-3,600
7ed56d4fc3c8b5ca8020693a59818a5daca320fe
Doing some work on 1i8n in core.
[ { "change_type": "MODIFY", "old_path": "src/Content/MenuBuilder.php", "new_path": "src/Content/MenuBuilder.php", "diff": "@@ -66,7 +66,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.dashboard'),\n'icon' => 'fa-tachometer-alt',\n- ]\n+ ],\n]);\n$menu->addChild('Content', ['extras' => [\n@@ -128,7 +128,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.contenttypes'),\n'icon' => 'fa-object-group',\n- ]\n+ ],\n]);\n$menu['Configuration']->addChild('Taxonomies', [\n@@ -136,7 +136,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.taxonomies'),\n'icon' => 'fa-tags',\n- ]\n+ ],\n]);\n$menu['Configuration']->addChild('Menu set up', [\n@@ -145,7 +145,7 @@ class MenuBuilder\n'name' => $t->trans('caption.menu_setup'),\n'type' => 'separator',\n'icon' => 'fa-list',\n- ]\n+ ],\n]);\n$menu['Configuration']->addChild('Routing set up', [\n@@ -153,7 +153,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.routing_setup'),\n'icon' => 'fa-directions',\n- ]\n+ ],\n]);\n$menu['Configuration']->addChild('All configuration files', [\n@@ -161,7 +161,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.all_configuration_files'),\n'icon' => 'fa-cogs',\n- ]\n+ ],\n]);\n// Maintenance submenu\n@@ -176,7 +176,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.api'),\n'icon' => 'fa-code',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Check database', [\n@@ -184,7 +184,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.check_database'),\n'icon' => 'fa-database',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Fixtures', [\n@@ -192,7 +192,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.fixtures_dummy_content'),\n'icon' => 'fa-hat-wizard',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Clear the cache', [\n@@ -200,7 +200,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.clear_cache'),\n'icon' => 'fa-eraser',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Installation checks', [\n@@ -208,7 +208,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.installation_checks'),\n'icon' => 'fa-clipboard-check',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Translations: Messages', [\n@@ -216,7 +216,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.translations'),\n'icon' => 'fa-language',\n- ]\n+ ],\n]);\n$menu['Maintenance']->addChild('Extensions', [\n@@ -224,10 +224,9 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.extensions'),\n'icon' => 'fa-plug',\n- ]\n+ ],\n]);\n-\n// File Management submenu\n$menu->addChild('File Management', ['extras' => [\n@@ -240,7 +239,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.uploaded_files'),\n'icon' => 'fa-archive',\n- ]\n+ ],\n]);\n$menu['File Management']->addChild('View/edit Templates', [\n@@ -248,7 +247,7 @@ class MenuBuilder\n'extras' => [\n'name' => $t->trans('caption.view_edit_templates'),\n'icon' => 'fa-scroll',\n- ]\n+ ],\n]);\n$this->stopwatch->stop('bolt.sidebar');\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "<span>{{group|capitalize}}</span></a>\n</li>\n{% endfor %}\n+\n+ {# Note: Record MUST be saved, before you can switch locales. #}\n+ {% if record.id %}\n+ <li class=\"nav-item\" style=\"margin-left: auto;\">\n+ {% include('editcontent/localeswitcher.twig') %}\n+ </li>\n+ {% endif %}\n+\n</ul>\n</nav>\n<div class=\"tab-content\" id=\"nav-tabContent\">\n" }, { "change_type": "ADD", "old_path": null, "new_path": "templates/editcontent/localeswitcher.twig", "diff": "+\n+<div class=\"selectize-control form-control single\" style=\"min-width: 220px;\">\n+ <select name=\"localeswitcher\" id=\"localeswitcher\" placeholder=\"{{ 'form.select_language'|trans }}\">\n+ </select>\n+</div>\n+\n+<script>\n+ document.addEventListener(\"DOMContentLoaded\", function() {\n+ $('#localeswitcher').selectize({\n+ create: false,\n+ sortField: 'name',\n+ maxItems: 1,\n+ searchField: ['name'],\n+ closeAfterSelect: true,\n+ onChange: function(value) {\n+ window.location = value;\n+ },\n+ options: [\n+ {% for locale in locales() %}\n+ { value: '{{ path('bolt_edit_record', {'id': record.id, 'locale': locale.code }) }}', flag: \"{{ locale.flag|raw }}\", name: '{{ locale.name }}'},\n+ {% endfor %}\n+ ],\n+ render: {\n+ option: function(item) {\n+ return \"<div class='option'>\" + item.flag + \" \" + item.name + \"</div>\";\n+ },\n+ item: function(item) {\n+ return \"<div class='option'>\" + item.flag + \" \" + item.name + \"</div>\";\n+ }\n+ }\n+ });\n+ });\n+</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.en.xlf", "new_path": "translations/messages.en.xlf", "diff": "<target>Installation checks</target>\n</segment>\n</unit>\n+ <unit id=\"pNPctrH\" name=\"form.select_language\">\n+ <segment>\n+ <source>form.select_language</source>\n+ <target>Select language</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" } ]
PHP
MIT License
bolt/core
Doing some work on 1i8n in core.
95,144
12.11.2018 07:33:13
-3,600
64e8172f0541f3259a9bc1c9a581d0720d53de9b
Tweaking CSS for localeswitcher
[ { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/modules/editor/_localeswitcher.scss", "diff": "+//** Editor | Locale Switcher\n+\n+.nav-item.localeswitcher {\n+ margin-left: auto;\n+\n+ .selectize-control {\n+ min-width: 220px;\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/editor.scss", "new_path": "assets/scss/modules/editor/editor.scss", "diff": "@import 'fields/fields';\n@import '_tabbar';\n+@import '_localeswitcher';\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/selectize/selectize.scss", "new_path": "assets/scss/vendor/selectize/selectize.scss", "diff": "transform: translateY(-50%);\n}\n}\n+\n+ .selectize-dropdown .selectize-dropdown-content {\n+ padding: 0;\n+\n+ .option {\n+ padding: 0.25rem 0.5rem;\n+\n+ &:first-of-type {\n+ margin-top: 0.25rem;\n+ }\n+ }\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "{# Note: Record MUST be saved, before you can switch locales. #}\n{% if record.id %}\n- <li class=\"nav-item\" style=\"margin-left: auto;\">\n+ <li class=\"nav-item localeswitcher\">\n{% include('editcontent/localeswitcher.twig') %}\n</li>\n{% endif %}\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/localeswitcher.twig", "new_path": "templates/editcontent/localeswitcher.twig", "diff": "-<div class=\"selectize-control form-control single\" style=\"min-width: 220px;\">\n+<div class=\"selectize-control form-control single\">\n<select name=\"localeswitcher\" id=\"localeswitcher\" placeholder=\"{{ 'form.select_language'|trans }}\">\n</select>\n</div>\n" } ]
PHP
MIT License
bolt/core
Tweaking CSS for localeswitcher
95,180
12.11.2018 11:12:29
-3,600
09e596aef17ef03d676efca39334ac3fd4e5b5a5
added es7 polyfill and removed title app
[ { "change_type": "DELETE", "old_path": "assets/js/app/title/Components/Title.vue", "new_path": null, "diff": "-<template>\n- <nav class=\"admin__header--topbar\">\n- <h2 class=\"admin__header--title\" v-html=\"title\"></h2>\n- </nav>\n-</template>\n-\n-<script>\n-export default {\n- name: \"bolt-title\",\n- props: [\"title\"]\n-};\n-</script>\n\\ No newline at end of file\n" }, { "change_type": "DELETE", "old_path": "assets/js/app/title/index.js", "new_path": null, "diff": "-import Vue from \"vue\";\n-/**\n- * Components\n- */\n-import Title from \"./Components/Title\";\n-\n-/**\n- * Register Components\n- */\n-\n-new Vue({\n- el: \"#title\",\n- name: \"bolt-title\",\n- components: {\n- \"bolt-title\": Title\n- }\n-});\n" }, { "change_type": "MODIFY", "old_path": "assets/js/bolt.js", "new_path": "assets/js/bolt.js", "diff": "\"use strict\";\n-\n+/**\n+ * ES7 Polyfil\n+ */\n+import \"@babel/polyfill\";\n/**\n* Vue Core | Config\n*/\n@@ -32,7 +35,6 @@ import \"./Views/user\";\nimport \"./app/notifications\";\nimport \"./app/toolbar\";\nimport \"./app/sidebar\";\n-import \"./app/title\";\nimport \"./app/listing\";\n/**\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "},\n\"css-select\": {\n\"version\": \"1.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n\"integrity\": \"sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"domelementtype\": {\n\"version\": \"1.1.3\",\n- \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n\"integrity\": \"sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=\",\n\"dev\": true\n}\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"htmlparser2\": {\n\"version\": \"3.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n\"integrity\": \"sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=\",\n\"dev\": true,\n\"requires\": {\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"media-typer\": {\n\"version\": \"0.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n\"integrity\": \"sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=\",\n\"dev\": true\n},\n\"dependencies\": {\n\"pify\": {\n\"version\": \"2.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n\"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\",\n\"dev\": true\n}\n},\n\"regjsgen\": {\n\"version\": \"0.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n\"integrity\": \"sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=\",\n\"dev\": true\n},\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"dev\": true,\n\"requires\": {\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\",\n\"dev\": true\n},\n},\n\"util\": {\n\"version\": \"0.10.3\",\n- \"resolved\": \"https://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n\"integrity\": \"sha1-evsa/lCAUkZInj23/g7TeTNqwPk=\",\n\"dev\": true,\n\"requires\": {\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.twig", "new_path": "templates/_base/layout.twig", "diff": "{% set username = user.fullName|default('Unknown user') %}\n{% set labels = jsonlabels(['about.bolt_documentation', 'action.visit_site', 'action.create_new', ['general.greeting', {'%name%': username}], 'action.logout', 'action.edit_profile']) %}\n<admin-toolbar\n+ site-name=\"{% if config is defined %}{{ config.get('general/sitename') }}{% endif %}\"\n:menu=\"{{ sidebarmenu() }}\"\nuser=\"{{user|default()}}\"\n- site-name=\"{% if config is defined %}{{ config.get('general/sitename') }}{% endif %}\"\n:labels=\"{{ labels|json_decode }}\"\n></admin-toolbar>\n</nav>\n<!-- End Admin Toolbar -->\n<!-- Admin Header -->\n- <header id=\"title\" class=\"admin__header\">\n+ <header class=\"admin__header\">\n<div class=\"container\">\n- <bolt-title title=\"{{ block('title') }}\"></bolt-title>\n+ <nav class=\"admin__header--topbar\">\n+ <h2 class=\"admin__header--title\">{{ block('title') }}</h2>\n+ </nav>\n</div>\n</header>\n<!-- End Admin Header -->\n" } ]
PHP
MIT License
bolt/core
added es7 polyfill and removed title app
95,180
12.11.2018 18:02:56
-3,600
1c195fd9b3040f8e25f19e7a52a7386ad3eb296c
added svgo optimisation
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "\"dev\": true\n},\n\"coa\": {\n- \"version\": \"1.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/coa/-/coa-1.0.4.tgz\",\n- \"integrity\": \"sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=\",\n+ \"version\": \"2.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/coa/-/coa-2.0.1.tgz\",\n+ \"integrity\": \"sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==\",\n\"dev\": true,\n\"requires\": {\n\"q\": \"^1.1.2\"\n},\n\"colors\": {\n\"version\": \"1.1.2\",\n- \"resolved\": \"https://registry.npmjs.org/colors/-/colors-1.1.2.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/colors/-/colors-1.1.2.tgz\",\n\"integrity\": \"sha1-FopHAXVran9RoSzgyXv6KMCE7WM=\",\n\"dev\": true\n},\n\"nth-check\": \"~1.0.1\"\n}\n},\n+ \"css-select-base-adapter\": {\n+ \"version\": \"0.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz\",\n+ \"integrity\": \"sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==\",\n+ \"dev\": true\n+ },\n\"css-selector-tokenizer\": {\n\"version\": \"0.7.1\",\n\"resolved\": \"https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz\",\n\"regexpu-core\": \"^1.0.0\"\n}\n},\n+ \"css-tree\": {\n+ \"version\": \"1.0.0-alpha.28\",\n+ \"resolved\": \"https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz\",\n+ \"integrity\": \"sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"mdn-data\": \"~1.1.0\",\n+ \"source-map\": \"^0.5.3\"\n+ }\n+ },\n+ \"css-url-regex\": {\n+ \"version\": \"1.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz\",\n+ \"integrity\": \"sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=\",\n+ \"dev\": true\n+ },\n\"css-what\": {\n\"version\": \"2.1.2\",\n\"resolved\": \"https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz\",\n}\n},\n\"csso\": {\n- \"version\": \"2.3.2\",\n- \"resolved\": \"https://registry.npmjs.org/csso/-/csso-2.3.2.tgz\",\n- \"integrity\": \"sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=\",\n+ \"version\": \"3.5.1\",\n+ \"resolved\": \"https://registry.npmjs.org/csso/-/csso-3.5.1.tgz\",\n+ \"integrity\": \"sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==\",\n\"dev\": true,\n\"requires\": {\n- \"clap\": \"^1.0.9\",\n+ \"css-tree\": \"1.0.0-alpha.29\"\n+ },\n+ \"dependencies\": {\n+ \"css-tree\": {\n+ \"version\": \"1.0.0-alpha.29\",\n+ \"resolved\": \"https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz\",\n+ \"integrity\": \"sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"mdn-data\": \"~1.1.0\",\n\"source-map\": \"^0.5.3\"\n}\n+ }\n+ }\n},\n\"cssom\": {\n\"version\": \"0.3.4\",\n\"safe-buffer\": \"^5.1.2\"\n}\n},\n+ \"mdn-data\": {\n+ \"version\": \"1.1.4\",\n+ \"resolved\": \"https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz\",\n+ \"integrity\": \"sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==\",\n+ \"dev\": true\n+ },\n\"media-typer\": {\n\"version\": \"0.3.0\",\n\"resolved\": \"http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n\"isobject\": \"^3.0.1\"\n}\n},\n+ \"object.values\": {\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/object.values/-/object.values-1.0.4.tgz\",\n+ \"integrity\": \"sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo=\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"define-properties\": \"^1.1.2\",\n+ \"es-abstract\": \"^1.6.1\",\n+ \"function-bind\": \"^1.1.0\",\n+ \"has\": \"^1.0.1\"\n+ }\n+ },\n\"obuf\": {\n\"version\": \"1.1.2\",\n\"resolved\": \"https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz\",\n\"postcss\": \"^5.0.14\",\n\"postcss-value-parser\": \"^3.2.3\",\n\"svgo\": \"^0.7.0\"\n+ },\n+ \"dependencies\": {\n+ \"coa\": {\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/coa/-/coa-1.0.4.tgz\",\n+ \"integrity\": \"sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"q\": \"^1.1.2\"\n+ }\n+ },\n+ \"csso\": {\n+ \"version\": \"2.3.2\",\n+ \"resolved\": \"https://registry.npmjs.org/csso/-/csso-2.3.2.tgz\",\n+ \"integrity\": \"sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"clap\": \"^1.0.9\",\n+ \"source-map\": \"^0.5.3\"\n+ }\n+ },\n+ \"svgo\": {\n+ \"version\": \"0.7.2\",\n+ \"resolved\": \"https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz\",\n+ \"integrity\": \"sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"coa\": \"~1.0.1\",\n+ \"colors\": \"~1.1.2\",\n+ \"csso\": \"~2.3.1\",\n+ \"js-yaml\": \"~3.7.0\",\n+ \"mkdirp\": \"~0.5.1\",\n+ \"sax\": \"~1.2.1\",\n+ \"whet.extend\": \"~0.9.9\"\n+ }\n+ }\n}\n},\n\"postcss-unique-selectors\": {\n\"figgy-pudding\": \"^3.5.1\"\n}\n},\n+ \"stable\": {\n+ \"version\": \"0.1.8\",\n+ \"resolved\": \"https://registry.npmjs.org/stable/-/stable-0.1.8.tgz\",\n+ \"integrity\": \"sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==\",\n+ \"dev\": true\n+ },\n\"stack-utils\": {\n\"version\": \"1.0.1\",\n\"resolved\": \"https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz\",\n\"dev\": true\n},\n\"svgo\": {\n- \"version\": \"0.7.2\",\n- \"resolved\": \"https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz\",\n- \"integrity\": \"sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=\",\n+ \"version\": \"1.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/svgo/-/svgo-1.1.1.tgz\",\n+ \"integrity\": \"sha512-GBkJbnTuFpM4jFbiERHDWhZc/S/kpHToqmZag3aEBjPYK44JAN2QBjvrGIxLOoCyMZjuFQIfTO2eJd8uwLY/9g==\",\n\"dev\": true,\n\"requires\": {\n- \"coa\": \"~1.0.1\",\n+ \"coa\": \"~2.0.1\",\n\"colors\": \"~1.1.2\",\n- \"csso\": \"~2.3.1\",\n- \"js-yaml\": \"~3.7.0\",\n+ \"css-select\": \"^2.0.0\",\n+ \"css-select-base-adapter\": \"~0.1.0\",\n+ \"css-tree\": \"1.0.0-alpha.28\",\n+ \"css-url-regex\": \"^1.1.0\",\n+ \"csso\": \"^3.5.0\",\n+ \"js-yaml\": \"^3.12.0\",\n\"mkdirp\": \"~0.5.1\",\n- \"sax\": \"~1.2.1\",\n- \"whet.extend\": \"~0.9.9\"\n+ \"object.values\": \"^1.0.4\",\n+ \"sax\": \"~1.2.4\",\n+ \"stable\": \"~0.1.6\",\n+ \"unquote\": \"~1.1.1\",\n+ \"util.promisify\": \"~1.0.0\"\n+ },\n+ \"dependencies\": {\n+ \"css-select\": {\n+ \"version\": \"2.0.2\",\n+ \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz\",\n+ \"integrity\": \"sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"boolbase\": \"^1.0.0\",\n+ \"css-what\": \"^2.1.2\",\n+ \"domutils\": \"^1.7.0\",\n+ \"nth-check\": \"^1.0.2\"\n+ }\n+ },\n+ \"domutils\": {\n+ \"version\": \"1.7.0\",\n+ \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz\",\n+ \"integrity\": \"sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"dom-serializer\": \"0\",\n+ \"domelementtype\": \"1\"\n+ }\n+ },\n+ \"esprima\": {\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n+ \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\",\n+ \"dev\": true\n+ },\n+ \"js-yaml\": {\n+ \"version\": \"3.12.0\",\n+ \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz\",\n+ \"integrity\": \"sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"argparse\": \"^1.0.7\",\n+ \"esprima\": \"^4.0.0\"\n+ }\n+ }\n+ }\n+ },\n+ \"svgo-loader\": {\n+ \"version\": \"2.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/svgo-loader/-/svgo-loader-2.2.0.tgz\",\n+ \"integrity\": \"sha512-AtIy4kmUQc1zo+QK3ZFvRrULRZAhUC63cLJxdVo1cONZ9WeYAkySUlaB05uZKKcYpsTb/9tDsBSXMab3/0QWtw==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"js-yaml\": \"^3.12.0\",\n+ \"loader-utils\": \"^1.0.3\"\n+ },\n+ \"dependencies\": {\n+ \"esprima\": {\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n+ \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\",\n+ \"dev\": true\n+ },\n+ \"js-yaml\": {\n+ \"version\": \"3.12.0\",\n+ \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz\",\n+ \"integrity\": \"sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"argparse\": \"^1.0.7\",\n+ \"esprima\": \"^4.0.0\"\n+ }\n+ }\n}\n},\n\"symbol-tree\": {\n\"integrity\": \"sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=\",\n\"dev\": true\n},\n+ \"unquote\": {\n+ \"version\": \"1.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz\",\n+ \"integrity\": \"sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=\",\n+ \"dev\": true\n+ },\n\"unset-value\": {\n\"version\": \"1.0.0\",\n\"resolved\": \"https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"regenerator-runtime\": \"^0.12.1\",\n\"register-service-worker\": \"^1.5.2\",\n\"sass-loader\": \"^7.1.0\",\n+ \"svgo\": \"^1.1.1\",\n+ \"svgo-loader\": \"^2.2.0\",\n\"vue-jest\": \"^3.0.0\",\n\"vue-loader\": \"^15.0.11\",\n\"vue-router\": \"^3.0.1\",\n" }, { "change_type": "MODIFY", "old_path": "webpack.config.js", "new_path": "webpack.config.js", "diff": "@@ -5,20 +5,37 @@ var path = require('path');\nEncore\n- // .addPlugin(new WebpackBar({\n- // profile: Encore.isProduction() ? true:false,\n- // minimal: false\n- // }))\n-\n- // .addPlugin(new webpack.ProvidePlugin({\n- // $bus: [path.resolve(__dirname, './assets/js/bus/'), 'default']\n- // }))\n+ .addPlugin(new WebpackBar({\n+ profile: Encore.isProduction() ? true:false,\n+ minimal: false\n+ }))\n+\n+ .addPlugin(new webpack.ProvidePlugin({\n+ $bus: [path.resolve(__dirname, './assets/js/bus/'), 'default']\n+ }))\n+\n+ .addLoader({\n+ test: /\\.svg$/,\n+ loader: 'svgo-loader',\n+ options: {\n+ plugins: [\n+ {removeTitle: true},\n+ {removeDesc: true},\n+ {cleanupAttrs: true},\n+ {convertColors: {shorthex: true}},\n+ {convertPathData: false},\n+ {removeEmptyAttrs: true},\n+ {minifyStyles: true},\n+ ]\n+ }\n+ })\n.setOutputPath('public/assets/')\n.setPublicPath('/assets')\n.setManifestKeyPrefix('assets')\n.copyFiles({ from: './assets/static', to: '[path][name].[ext]' })\n+\n.cleanupOutputBeforeBuild()\n.enableSingleRuntimeChunk()\n.enableSourceMaps(!Encore.isProduction())\n" } ]
PHP
MIT License
bolt/core
added svgo optimisation
95,180
12.11.2018 19:36:48
-3,600
764d334787b8676468985c1501272f1e403e0947
fixed flag loading
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/General/Language.vue", "new_path": "assets/js/app/editor/Components/General/Language.vue", "diff": ">\n<template slot=\"singleLabel\" slot-scope=\"props\">\n<span\n- class=\"flag-icon mr-1\"\n- :class=\"`flag-icon-${props.option.flag}`\"\n+ class=\"flag mr-1\"\n+ :class=\"props.option.flag|uppercase\"\n></span>\n<span>{{props.option.localisedname}}</span>\n</template>\n<template slot=\"option\" slot-scope=\"props\">\n<span\n- class=\"flag-icon mr-1\"\n- :class=\"`flag-icon-${props.option.flag}`\"\n+ class=\"flag mr-1\"\n+ :class=\"props.option.flag|uppercase\"\n></span>\n<span>{{props.option.localisedname}}</span>\n</template>\n<script>\nimport Multiselect from 'vue-multiselect'\n-import 'flag-icon-css/css/flag-icon.min.css'\nexport default {\nname: \"editor-language\",\n" }, { "change_type": "MODIFY", "old_path": "assets/js/filters/index.js", "new_path": "assets/js/filters/index.js", "diff": "@@ -31,3 +31,9 @@ Vue.filter('strip', string => {\nreturn string.replace (/(^\")|(\"$)/g, '')\n}\n})\n+\n+\n+Vue.filter('uppercase', string => {\n+ if (string)\n+ return string.toUpperCase();\n+})\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/vendor/flagkit/flagkit.scss", "diff": "+$FLAGKIT_FOLDER_PATH: '/assets/icons/flags/';\n+\n+@import 'flagkit-web/styles/flagkit.scss';\n+\n+.flag{\n+ background-size: contain;\n+ background-position: 50%;\n+ background-repeat: no-repeat;\n+ position: relative;\n+ display: inline-block;\n+ width: (4 / 3) * 1em;\n+ line-height: 1em;\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/vendor.scss", "new_path": "assets/scss/vendor/vendor.scss", "diff": "@import './baguette/baguette';\n@import './selectize/selectize';\n@import './multiselect/multiselect';\n+@import './flagkit/flagkit';\n@import './api-platform/api-platform';\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "\"integrity\": \"sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=\",\n\"dev\": true\n},\n- \"coa\": {\n- \"version\": \"2.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/coa/-/coa-2.0.1.tgz\",\n- \"integrity\": \"sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==\",\n- \"dev\": true,\n- \"requires\": {\n- \"q\": \"^1.1.2\"\n- }\n- },\n\"code-point-at\": {\n\"version\": \"1.1.0\",\n\"resolved\": \"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz\",\n},\n\"colors\": {\n\"version\": \"1.1.2\",\n- \"resolved\": \"http://registry.npmjs.org/colors/-/colors-1.1.2.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/colors/-/colors-1.1.2.tgz\",\n\"integrity\": \"sha1-FopHAXVran9RoSzgyXv6KMCE7WM=\",\n\"dev\": true\n},\n\"nth-check\": \"~1.0.1\"\n}\n},\n- \"css-select-base-adapter\": {\n- \"version\": \"0.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz\",\n- \"integrity\": \"sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==\",\n- \"dev\": true\n- },\n\"css-selector-tokenizer\": {\n\"version\": \"0.7.1\",\n\"resolved\": \"https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz\",\n\"regexpu-core\": \"^1.0.0\"\n}\n},\n- \"css-tree\": {\n- \"version\": \"1.0.0-alpha.28\",\n- \"resolved\": \"https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz\",\n- \"integrity\": \"sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==\",\n- \"dev\": true,\n- \"requires\": {\n- \"mdn-data\": \"~1.1.0\",\n- \"source-map\": \"^0.5.3\"\n- }\n- },\n- \"css-url-regex\": {\n- \"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz\",\n- \"integrity\": \"sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=\",\n- \"dev\": true\n- },\n\"css-what\": {\n\"version\": \"2.1.2\",\n\"resolved\": \"https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz\",\n}\n}\n},\n- \"csso\": {\n- \"version\": \"3.5.1\",\n- \"resolved\": \"https://registry.npmjs.org/csso/-/csso-3.5.1.tgz\",\n- \"integrity\": \"sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==\",\n- \"dev\": true,\n- \"requires\": {\n- \"css-tree\": \"1.0.0-alpha.29\"\n- },\n- \"dependencies\": {\n- \"css-tree\": {\n- \"version\": \"1.0.0-alpha.29\",\n- \"resolved\": \"https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz\",\n- \"integrity\": \"sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==\",\n- \"dev\": true,\n- \"requires\": {\n- \"mdn-data\": \"~1.1.0\",\n- \"source-map\": \"^0.5.3\"\n- }\n- }\n- }\n- },\n\"cssom\": {\n\"version\": \"0.3.4\",\n\"resolved\": \"https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz\",\n\"locate-path\": \"^2.0.0\"\n}\n},\n- \"flag-icon-css\": {\n- \"version\": \"3.2.1\",\n- \"resolved\": \"https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.2.1.tgz\",\n- \"integrity\": \"sha512-0t7zPm2crM2cBIm3epZQ+EmiHuzgFNTTSMUMkWlrztDDGL+y31D+eY8zaB9zYCzJGAsn4KEMAKY+jCU1mt9jwg==\"\n+ \"flagkit-web\": {\n+ \"version\": \"0.0.3\",\n+ \"resolved\": \"https://registry.npmjs.org/flagkit-web/-/flagkit-web-0.0.3.tgz\",\n+ \"integrity\": \"sha512-4Vec1j+Op/z/ICdphePatzg97IVkPoG9ne+NE+0zRk9kfY9iA3XUtCVXYAQMD/cCbxKck55/smLvPO+cpKFvkQ==\"\n},\n\"flat-cache\": {\n\"version\": \"1.3.0\",\n\"safe-buffer\": \"^5.1.2\"\n}\n},\n- \"mdn-data\": {\n- \"version\": \"1.1.4\",\n- \"resolved\": \"https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz\",\n- \"integrity\": \"sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==\",\n- \"dev\": true\n- },\n\"media-typer\": {\n\"version\": \"0.3.0\",\n\"resolved\": \"http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n\"isobject\": \"^3.0.1\"\n}\n},\n- \"object.values\": {\n- \"version\": \"1.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/object.values/-/object.values-1.0.4.tgz\",\n- \"integrity\": \"sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo=\",\n- \"dev\": true,\n- \"requires\": {\n- \"define-properties\": \"^1.1.2\",\n- \"es-abstract\": \"^1.6.1\",\n- \"function-bind\": \"^1.1.0\",\n- \"has\": \"^1.0.1\"\n- }\n- },\n\"obuf\": {\n\"version\": \"1.1.2\",\n\"resolved\": \"https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz\",\n\"figgy-pudding\": \"^3.5.1\"\n}\n},\n- \"stable\": {\n- \"version\": \"0.1.8\",\n- \"resolved\": \"https://registry.npmjs.org/stable/-/stable-0.1.8.tgz\",\n- \"integrity\": \"sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==\",\n- \"dev\": true\n- },\n\"stack-utils\": {\n\"version\": \"1.0.1\",\n\"resolved\": \"https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz\",\n\"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n\"dev\": true\n},\n- \"svgo\": {\n- \"version\": \"1.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/svgo/-/svgo-1.1.1.tgz\",\n- \"integrity\": \"sha512-GBkJbnTuFpM4jFbiERHDWhZc/S/kpHToqmZag3aEBjPYK44JAN2QBjvrGIxLOoCyMZjuFQIfTO2eJd8uwLY/9g==\",\n- \"dev\": true,\n- \"requires\": {\n- \"coa\": \"~2.0.1\",\n- \"colors\": \"~1.1.2\",\n- \"css-select\": \"^2.0.0\",\n- \"css-select-base-adapter\": \"~0.1.0\",\n- \"css-tree\": \"1.0.0-alpha.28\",\n- \"css-url-regex\": \"^1.1.0\",\n- \"csso\": \"^3.5.0\",\n- \"js-yaml\": \"^3.12.0\",\n- \"mkdirp\": \"~0.5.1\",\n- \"object.values\": \"^1.0.4\",\n- \"sax\": \"~1.2.4\",\n- \"stable\": \"~0.1.6\",\n- \"unquote\": \"~1.1.1\",\n- \"util.promisify\": \"~1.0.0\"\n- },\n- \"dependencies\": {\n- \"css-select\": {\n- \"version\": \"2.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz\",\n- \"integrity\": \"sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==\",\n- \"dev\": true,\n- \"requires\": {\n- \"boolbase\": \"^1.0.0\",\n- \"css-what\": \"^2.1.2\",\n- \"domutils\": \"^1.7.0\",\n- \"nth-check\": \"^1.0.2\"\n- }\n- },\n- \"domutils\": {\n- \"version\": \"1.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz\",\n- \"integrity\": \"sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==\",\n- \"dev\": true,\n- \"requires\": {\n- \"dom-serializer\": \"0\",\n- \"domelementtype\": \"1\"\n- }\n- },\n- \"esprima\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n- \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\",\n- \"dev\": true\n- },\n- \"js-yaml\": {\n- \"version\": \"3.12.0\",\n- \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz\",\n- \"integrity\": \"sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==\",\n- \"dev\": true,\n- \"requires\": {\n- \"argparse\": \"^1.0.7\",\n- \"esprima\": \"^4.0.0\"\n- }\n- }\n- }\n- },\n- \"svgo-loader\": {\n- \"version\": \"2.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/svgo-loader/-/svgo-loader-2.2.0.tgz\",\n- \"integrity\": \"sha512-AtIy4kmUQc1zo+QK3ZFvRrULRZAhUC63cLJxdVo1cONZ9WeYAkySUlaB05uZKKcYpsTb/9tDsBSXMab3/0QWtw==\",\n- \"dev\": true,\n- \"requires\": {\n- \"js-yaml\": \"^3.12.0\",\n- \"loader-utils\": \"^1.0.3\"\n- },\n- \"dependencies\": {\n- \"esprima\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n- \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\",\n- \"dev\": true\n- },\n- \"js-yaml\": {\n- \"version\": \"3.12.0\",\n- \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz\",\n- \"integrity\": \"sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==\",\n- \"dev\": true,\n- \"requires\": {\n- \"argparse\": \"^1.0.7\",\n- \"esprima\": \"^4.0.0\"\n- }\n- }\n- }\n- },\n\"symbol-tree\": {\n\"version\": \"3.2.2\",\n\"resolved\": \"https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz\",\n\"integrity\": \"sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=\",\n\"dev\": true\n},\n- \"unquote\": {\n- \"version\": \"1.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz\",\n- \"integrity\": \"sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=\",\n- \"dev\": true\n- },\n\"unset-value\": {\n\"version\": \"1.0.0\",\n\"resolved\": \"https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"baguettebox.js\": \"^1.11.0\",\n\"bootstrap\": \"^4.1.3\",\n\"codemirror\": \"^5.41.0\",\n- \"flag-icon-css\": \"^3.2.1\",\n+ \"flagkit-web\": \"0.0.3\",\n\"jquery\": \"^3.3.1\",\n\"moment\": \"^2.22.2\",\n\"no-scroll\": \"^2.1.1\",\n\"regenerator-runtime\": \"^0.12.1\",\n\"register-service-worker\": \"^1.5.2\",\n\"sass-loader\": \"^7.1.0\",\n- \"svgo\": \"^1.1.1\",\n- \"svgo-loader\": \"^2.2.0\",\n\"vue-jest\": \"^3.0.0\",\n\"vue-loader\": \"^15.0.11\",\n\"vue-router\": \"^3.0.1\",\n" }, { "change_type": "MODIFY", "old_path": "webpack.config.js", "new_path": "webpack.config.js", "diff": "@@ -14,30 +14,21 @@ Encore\n$bus: [path.resolve(__dirname, './assets/js/bus/'), 'default']\n}))\n- .addLoader({\n- test: /\\.svg$/,\n- loader: 'svgo-loader',\n- options: {\n- plugins: [\n- {removeTitle: true},\n- {removeDesc: true},\n- {cleanupAttrs: true},\n- {convertColors: {shorthex: true}},\n- {convertPathData: false},\n- {removeEmptyAttrs: true},\n- {minifyStyles: true},\n- ]\n- }\n- })\n-\n.setOutputPath('public/assets/')\n.setPublicPath('/assets')\n.setManifestKeyPrefix('assets')\n- .copyFiles({ from: './assets/static', to: '[path][name].[ext]' })\n+ .copyFiles({\n+ from: './assets/static'\n+ })\n+ .copyFiles({\n+ from: './node_modules/flagkit-web/svgs',\n+ to: 'icons/flags/[name].[ext]',\n+ pattern: /\\.(svg)$/\n+ })\n.cleanupOutputBeforeBuild()\n- .enableSingleRuntimeChunk()\n+ .disableSingleRuntimeChunk()\n.enableSourceMaps(!Encore.isProduction())\n.enableVersioning(Encore.isProduction())\n" } ]
PHP
MIT License
bolt/core
fixed flag loading
95,168
13.11.2018 13:59:28
-3,600
5057e81d7db63e594b1bb8331334f1e4e9bef9b3
Split methods(GET,POST) for 'profile_edit' route
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -7,10 +7,13 @@ namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Form\\ChangePasswordType;\nuse Bolt\\Form\\UserType;\n+use Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\n+use Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n+use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n/**\n@@ -29,7 +32,7 @@ class UserController extends BaseController\n}\n/**\n- * @Route(\"/profile-edit\", methods={\"GET\", \"POST\"}, name=\"bolt_profile_edit\")\n+ * @Route(\"/profile-edit\", methods={\"GET\"}, name=\"bolt_profile_edit\")\n*/\npublic function edit(Request $request): Response\n{\n@@ -52,6 +55,25 @@ class UserController extends BaseController\n'form' => $form->createView(),\n]);\n}\n+ /**\n+ * @Route(\"/profile-edit\", methods={\"POST\"}, name=\"bolt_profile_edit_post\")\n+ */\n+ public function edit_post(Request $request, UrlGeneratorInterface $urlGenerator, ObjectManager $manager): RedirectResponse\n+ {\n+ $user = $this->getUser();\n+\n+ $user->setFullName($request->get('user')['fullName']);\n+ $user->setEmail($request->get('user')['email']);\n+ $user->setLocale($request->get('user')['locale']);\n+ $user->setbackendTheme($request->get('user')['backendTheme']);\n+\n+ $manager->flush();\n+\n+ $url = $urlGenerator->generate('bolt_profile_edit');\n+\n+ return new RedirectResponse($url);\n+\n+ }\n/**\n* @Route(\"/change-password\", methods={\"GET\", \"POST\"}, name=\"bolt_change_password\")\n" } ]
PHP
MIT License
bolt/core
Split methods(GET,POST) for 'profile_edit' route
95,180
13.11.2018 15:45:33
-3,600
a7500c38c18991dc482d9cea7450b6eb21238636
Added in Locale switcher
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Date/Date.vue", "new_path": "assets/js/app/editor/Components/Editor/Date/Date.vue", "diff": "</template>\n<script>\n-import field from '../../../mixins/value';\n+import value from '../../../mixins/value';\nimport flatPickr from 'vue-flatpickr-component';\nimport { Spanish } from \"flatpickr/dist/l10n/es.js\"\nimport { resolve } from 'path';\nexport default {\n+\nname: \"editor-date\",\n- props: ['value', 'name', 'disabled', 'mode', 'form', 'locale'],\n- mixins: [field],\n+ mixins: [ value ],\n+\ncomponents: {\nflatPickr\n},\n+\n+ props: {\n+ value: {\n+ type: String,\n+ required: false,\n+ },\n+ name: {\n+ type: String,\n+ required: true,\n+ },\n+ disabled: {\n+ type: String,\n+ required: true,\n+ },\n+ mode: {\n+ type: String,\n+ required: true,\n+ default: \"date\"\n+ },\n+ form: {\n+ type: String,\n+ required: true\n+ },\n+ locale: {\n+ type: String,\n+ }\n+ },\n+\ncreated(){\nif(this.locale !== 'en'){\nconst lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];\n@@ -51,9 +80,11 @@ export default {\nthis.config.altFormat = `F j, Y - h:i K`;\n}\n},\n+\nmounted() {\n},\n+\ndata: () => {\nreturn {\nconfig: {\n@@ -65,5 +96,6 @@ export default {\n}\n}\n}\n+\n};\n</script>\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Date/index.md", "new_path": "assets/js/app/editor/Components/Editor/Date/index.md", "diff": "# Date & Datetime Component\n-### Props\n\\ No newline at end of file\n+#### Props\n+\n+| Name | Type |\n+| ------------- |-------------- |\n+| value | `string` |\n+| name | `string` |\n+| disabled | `boolean` |\n+| mode | `string` |\n+| form | `string` |\n+| locale | `string` |\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/General/Language.vue", "new_path": "assets/js/app/editor/Components/General/Language.vue", "diff": ":searchable=\"false\"\n:show-labels=\"false\"\nplaceholder=\"select locale\"\n+ @input=\"switchLocale()\"\n>\n<template slot=\"singleLabel\" slot-scope=\"props\">\n<span\nimport Multiselect from 'vue-multiselect'\nexport default {\n+\nname: \"editor-language\",\n- props: ['label', 'current', 'locales'],\n+\ncomponents: { Multiselect },\n+\n+ props: ['label', 'locales'],\n+\n+\nmounted(){\n+ const url = new URLSearchParams(window.location.search);\n+\n+\n+\n+ if(url.has('locale')){\n+\nlet current = this.locales.filter(locale =>\n- locale.code === this.current\n+ locale.code === url.get('locale')\n)\n+ if(current.length > 0){\nthis.locale = current[0];\n+ } else {\n+ this.locale = this.locales[0]\n+ }\n+\n+ } else {\n+\n+ this.locale = this.locales[0]\n+\n+ }\n},\n+\ndata: () =>{\nreturn {\nlocale: {}\n}\n+ },\n+\n+ methods: {\n+ switchLocale(){\n+ const locale = this.locale.link;\n+ return window.location.href = locale;\n}\n+ }\n+\n};\n</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/listing.scss", "new_path": "assets/scss/modules/listing/listing.scss", "diff": "//** Listing\n-@import 'row/row';\n+@import './row/row.scss';\n@import '_filter';\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/row/_checkbox.scss", "new_path": "assets/scss/modules/listing/row/_checkbox.scss", "diff": "+\n.listing--checkbox{\nwidth: $checkbox-row-width;\nuser-select: none;\n" }, { "change_type": "DELETE", "old_path": "assets/scss/modules/listing/row/_row.scss", "new_path": null, "diff": "-//** Lisitng | Row\n-\n-.listing__row{\n- box-shadow: $card-box-shadow;\n- background: var(--foreground);\n- border-radius: $border-radius;\n- margin-bottom: $spacer / 1.25;\n- min-height: 50px;\n- z-index: 100;\n- display: flex;\n- flex: auto;\n- justify-content: space-between;\n- position: relative;\n- &.is-small{\n- .listing__row--item{\n- display: flex;\n- align-items: center;\n- &.is-details{\n- max-width: 40%;\n- strong{\n- white-space: nowrap;\n- overflow: hidden;\n- text-overflow: ellipsis;\n- }\n- span{\n- display: none;\n- }\n- }\n- &.is-meta{\n- flex: 0 0 24%;\n- margin-left: auto;\n- }\n- &.is-actions{\n- flex: 0 0 auto;\n- }\n- }\n- .listing--actions{\n- display: flex;\n- flex-direction: row-reverse;\n- height: 100%;\n- li{\n- display: inline-flex;\n- align-items: center;\n- justify-content: center;\n- height: inherit;\n- margin-right: $spacer;\n- margin-bottom: 0;\n- &:first-child{\n- margin-right: 0;\n- }\n- }\n- }\n- }\n- &--item{\n- min-height: inherit;\n- padding: $spacer / 2 $spacer;\n- &.is-thumbnail{\n- flex: 0 0 100px;\n- max-width: 100px;\n- border-radius: $border-radius 0 0 $border-radius;\n- background-color: var(--shade-400);\n- background-repeat: no-repeat;\n- background-size: cover;\n- background-repeat: no-repeat;\n- }\n- &.is-details{\n- flex-grow: 2;\n- span{\n- color: var(--shade);\n- font-style: italic;\n- }\n- }\n- &.is-meta{\n- flex: 0 0 25%;\n- margin-left: auto;\n- }\n- &.is-actions{\n- flex: 0 0 15%;\n- background: var(--shade-100);\n- display: flex;\n- align-items: center;\n- border-radius: 0 $border-radius $border-radius 0;\n- }\n- }\n- &--list{\n- padding: 0;\n- margin: 0;\n- list-style: none;\n- font-size: 90%;\n- letter-spacing: $letter-spacing;\n- li{\n- display: flex;\n- align-items: center;\n- margin-bottom: $spacer / 4;\n- color: var(--shade);\n- text-transform: capitalize;\n- }\n- i{\n- color: theme-color('secondary');\n- }\n- }\n-\n- &--move{\n- flex: 0 0 15px;\n- padding: 0;\n- color: var(--secondary);\n- border: 0;\n- &:focus, &:hover{\n- outline: none;\n- cursor: move;\n- }\n- }\n- .listing--actions{\n- font-size: 90%;\n- margin: 0;\n- padding: 0;\n- list-style: none;\n- width: 100%;\n- text-align: right;\n- li{\n- margin-bottom: $spacer;\n- &:last-child{\n- margin-bottom: 0;\n- }\n- a{\n- color: var(--secondary);\n- }\n- }\n- &--quickedit{\n- background: transparent;\n- border: 0;\n- color: var(--primary);\n- padding: 0;\n- &:hover{\n- cursor: pointer;\n- text-decoration: underline;\n- }\n- }\n- }\n-}\n-\n-.card-enter-active, .card-leave-active {\n- transition: all 0.25s;\n-}\n-\n-.card-enter, .card-leave-to{\n- opacity: 0;\n- transform: translateX(30px);\n- transform-origin: right;\n-}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/listing/row/row.scss", "new_path": "assets/scss/modules/listing/row/row.scss", "diff": "$checkbox-row-width: 30px;\n+.listing__row{\n+ box-shadow: $card-box-shadow;\n+ background: var(--foreground);\n+ border-radius: $border-radius;\n+ margin-bottom: $spacer / 1.25;\n+ min-height: 50px;\n+ z-index: 100;\n+ display: flex;\n+ flex: auto;\n+ justify-content: space-between;\n+ position: relative;\n+ &.is-small{\n+ .listing__row--item{\n+ display: flex;\n+ align-items: center;\n+ &.is-details{\n+ max-width: 40%;\n+ strong{\n+ white-space: nowrap;\n+ overflow: hidden;\n+ text-overflow: ellipsis;\n+ }\n+ span{\n+ display: none;\n+ }\n+ }\n+ &.is-meta{\n+ flex: 0 0 24%;\n+ margin-left: auto;\n+ }\n+ &.is-actions{\n+ flex: 0 0 auto;\n+ }\n+ }\n+ .listing--actions{\n+ display: flex;\n+ flex-direction: row-reverse;\n+ height: 100%;\n+ li{\n+ display: inline-flex;\n+ align-items: center;\n+ justify-content: center;\n+ height: inherit;\n+ margin-right: $spacer;\n+ margin-bottom: 0;\n+ &:first-child{\n+ margin-right: 0;\n+ }\n+ }\n+ }\n+ }\n+ &--item{\n+ min-height: inherit;\n+ padding: $spacer / 2 $spacer;\n+ &.is-thumbnail{\n+ flex: 0 0 100px;\n+ max-width: 100px;\n+ border-radius: $border-radius 0 0 $border-radius;\n+ background-color: var(--shade-400);\n+ background-repeat: no-repeat;\n+ background-size: cover;\n+ background-repeat: no-repeat;\n+ }\n+ &.is-details{\n+ flex-grow: 2;\n+ span{\n+ color: var(--shade);\n+ font-style: italic;\n+ }\n+ }\n+ &.is-meta{\n+ flex: 0 0 25%;\n+ margin-left: auto;\n+ }\n+ &.is-actions{\n+ flex: 0 0 15%;\n+ background: var(--shade-100);\n+ display: flex;\n+ align-items: center;\n+ border-radius: 0 $border-radius $border-radius 0;\n+ }\n+ }\n+ &--list{\n+ padding: 0;\n+ margin: 0;\n+ list-style: none;\n+ font-size: 90%;\n+ letter-spacing: $letter-spacing;\n+ li{\n+ display: flex;\n+ align-items: center;\n+ margin-bottom: $spacer / 4;\n+ color: var(--shade);\n+ text-transform: capitalize;\n+ }\n+ i{\n+ color: theme-color('secondary');\n+ }\n+ }\n+ &--move{\n+ flex: 0 0 15px;\n+ padding: 0;\n+ color: var(--secondary);\n+ border: 0;\n+ &:focus, &:hover{\n+ outline: none;\n+ cursor: move;\n+ }\n+ }\n+ .listing--actions{\n+ font-size: 90%;\n+ margin: 0;\n+ padding: 0;\n+ list-style: none;\n+ width: 100%;\n+ text-align: right;\n+ li{\n+ margin-bottom: $spacer;\n+ &:last-child{\n+ margin-bottom: 0;\n+ }\n+ a{\n+ color: var(--secondary);\n+ }\n+ }\n+ &--quickedit{\n+ background: transparent;\n+ border: 0;\n+ color: var(--primary);\n+ padding: 0;\n+ &:hover{\n+ cursor: pointer;\n+ text-decoration: underline;\n+ }\n+ }\n+ }\n+}\n+\n+.card-enter-active, .card-leave-active {\n+ transition: all 0.25s;\n+}\n+\n+.card-enter, .card-leave-to{\n+ opacity: 0;\n+ transform: translateX(30px);\n+ transform-origin: right;\n+}\n+\n+\n@import '_container';\n@import '_checkbox';\n-@import '_row';\n@import '_quick-edit';\n-\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "{% if record.id %}\n<div class=\"card mb-3\">\n<div class=\"card-body\">\n- <general-language label=\"{{ 'field.locale'|trans }}\" current=\"{{ user.locale }}\" :locales=\"{{ locales() }}\"></general-language>\n+ <general-language\n+ label=\"{{ 'field.locale'|trans }}\"\n+ :locales=\"{{ locales() }}\"\n+ ></general-language>\n</div>\n</div>\n{% endif %}\n" } ]
PHP
MIT License
bolt/core
Added in Locale switcher
95,168
13.11.2018 17:23:26
-3,600
02afeb2bbbb741019bffb21a16d026a4986932c6
Update UserController to handle User update
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -37,39 +37,43 @@ class UserController extends BaseController\npublic function edit(Request $request): Response\n{\n$user = $this->getUser();\n- $form = $this->createForm(UserType::class, $user);\n- $form->handleRequest($request);\n- if ($form->isSubmitted() && $form->isValid()) {\n- $this->getDoctrine()->getManager()->flush();\n- $this->addFlash('success', 'user.updated_successfully');\n-\n- $locale = $form->getData()->getLocale();\n- $request->getSession()->set('_locale', $locale);\n- $request->setLocale($locale);\n-\n- return $this->redirectToRoute('bolt_profile_edit');\n- }\nreturn $this->renderTemplate('users/edit.twig', [\n'user' => $user,\n- 'form' => $form->createView(),\n]);\n}\n/**\n* @Route(\"/profile-edit\", methods={\"POST\"}, name=\"bolt_profile_edit_post\")\n*/\n- public function edit_post(Request $request, UrlGeneratorInterface $urlGenerator, ObjectManager $manager): RedirectResponse\n+ public function edit_post(Request $request, UrlGeneratorInterface $urlGenerator, ObjectManager $manager, UserPasswordEncoderInterface $encoder): Response\n{\n$user = $this->getUser();\n+ $url = $urlGenerator->generate('bolt_profile_edit');\n+ $locale = $request->get('user')['locale'];\n+\n+ $newPassword = $request->get('user')['password_first'];\n+ $confirmedPassword = $request->get('user')['password_second'];\n$user->setFullName($request->get('user')['fullName']);\n$user->setEmail($request->get('user')['email']);\n- $user->setLocale($request->get('user')['locale']);\n+ $user->setLocale($locale);\n$user->setbackendTheme($request->get('user')['backendTheme']);\n+ if (!empty($newPassword) || !empty($confirmedPassword))\n+ {\n+ // Set new password\n+ if($newPassword === $confirmedPassword) {\n+ $user->setPassword($encoder->encodePassword($user, $newPassword));\n+ } else{\n+ return $this->renderTemplate('users/edit.twig', [\n+ 'user' => $user,\n+ ]);\n+ }\n+ }\n+\n$manager->flush();\n- $url = $urlGenerator->generate('bolt_profile_edit');\n+ $request->getSession()->set('_locale', $locale);\nreturn new RedirectResponse($url);\n" } ]
PHP
MIT License
bolt/core
Update UserController to handle User update
95,168
13.11.2018 17:24:51
-3,600
f46f69d37e88be5c595c70bc2f51967dc7bbc110
Remove Symfony Form Builder from edit user template Add customize form(needs more work on form fields)
[ { "change_type": "MODIFY", "old_path": "templates/users/edit.twig", "new_path": "templates/users/edit.twig", "diff": "{% block body_id 'user_edit' %}\n{% block main %}\n- <div id=\"user\">\n- {% form_theme form 'bootstrap_4_layout.html.twig' %}\n- {{ form_start(form) }}\n- {{ form_widget(form) }}\n+\n+ <div>\n+ <form method=\"post\" id=\"editcontent\" >\n+\n+ <div class=\"form-group\">\n+ <label for=\"user_username\" class=\"required\">Username</label>\n+ <input type=\"text\" id=\"user_username\" name=\"user[username]\" disabled=\"disabled\" required=\"required\" value=\"{{ user.username }}\" class=\"form-control\">\n+ </div>\n+\n+ <div class=\"form-group\">\n+ <label for=\"user_fullName\" class=\"required\">Full name</label>\n+ <input type=\"text\" id=\"user_fullName\" name=\"user[fullName]\" required=\"required\" value=\"{{ user.fullName }}\" class=\"form-control\">\n+ </div>\n+\n+ <div class=\"form-group\">\n+ {% include '@bolt/editcontent/fields/password.twig' with {\n+ 'label_attr': { 'for': 'user_password_first' },\n+ 'label': 'label.password'|trans,\n+ 'label_class': 'required',\n+ 'type': 'password',\n+ 'id': 'user_password_first',\n+ 'name': 'user[password_first]',\n+ 'value': '',\n+ 'class': 'form-control',\n+ } %}\n+ </div>\n+\n+ <div class=\"form-group\">\n+ {% include '@bolt/editcontent/fields/password.twig' with {\n+ 'label_attr': { 'for': 'user_password_second' },\n+ 'label': 'label.password_confirm'|trans,\n+ 'label_class': 'required',\n+ 'type': 'password',\n+ 'id': 'user_password_second',\n+ 'name': 'user[password_second]',\n+ 'value': '',\n+ 'class': 'form-control',\n+ } %}\n+ </div>\n+\n+ <div class=\"form-group\">\n+ {% include '@bolt/editcontent/fields/email.twig' with {\n+ 'label_attr': { 'for': 'user_email' },\n+ 'label': 'label.email'|trans,\n+ 'label_class': 'required',\n+ 'type': 'email',\n+ 'id': 'user_email',\n+ 'name': 'user[email]',\n+ 'value': user.email,\n+ 'class': 'form-control',\n+ } %}\n+ </div>\n+\n+ <div class=\"form-group\">\n+ <label for=\"user_locale\" class=\"required\">Locale</label>\n+ <select id=\"user_locale\" name=\"user[locale]\" class=\"form-control\">\n+ {% for locale in locales() %}\n+ <option value=\"{{ locale.code }}\" {% if user.locale == locale.code %}selected=\"selected\"{% endif %}>{{ locale.name }} ({{ locale.localisedname }}, {{ locale.code }})</option>\n+ {% endfor %}\n+ </select>\n+ </div>\n+\n+ <div class=\"form-group\">\n+ <label for=\"user_backendTheme\" class=\"required\">Backend theme</label>\n+ <select id=\"user_backendTheme\" name=\"user[backendTheme]\" class=\"form-control\">\n+ <option value=\"default\" selected=\"selected\">The Default theme</option>\n+ <option value=\"dark\">The Default Dark theme</option>\n+ <option value=\"woordpers\">WoordPers: Kinda looks like that other CMS</option>\n+ </select>\n+ </div>\n+\n+\n+ <user-theme></user-theme>\n+\n<button type=\"submit\" class=\"btn btn-primary\">\n<i class=\"fa fa-save\" aria-hidden=\"true\"></i> {{ 'action.save'|trans }}\n</button>\n- {{ form_end(form) }}\n- <user-theme></user-theme>\n+\n+ </form>\n</div>\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Remove Symfony Form Builder from edit user template Add customize form(needs more work on form fields)
95,168
13.11.2018 17:27:09
-3,600
d24d724c79441827563395eb7f936123ceb735f7
Add email.twig and password.twig form fields
[ { "change_type": "ADD", "old_path": null, "new_path": "templates/editcontent/fields/email.twig", "diff": "+{% extends '@bolt/editcontent/fields/_base.twig' %}\n+\n+{% block label %}\n+ <label for=\"{{ label_attr.for }}\" class=\"{{ label_class }}\">{{ label }}</label>\n+{% endblock %}\n+\n+{% block field %}\n+ <input type=\"{{ type }}\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n+{% endblock %}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "templates/editcontent/fields/password.twig", "diff": "+{% extends '@bolt/editcontent/fields/_base.twig' %}\n+\n+{% block label %}\n+ <label for=\"{{ label_attr.for }}\" class=\"{{ label_class }}\">{{ label }}</label>\n+{% endblock %}\n+\n+{% block field %}\n+ <input type=\"{{ type }}\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n+{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Add email.twig and password.twig form fields
95,180
13.11.2018 18:52:44
-3,600
bc296ba200798f17100191d2d545930891ef8bf3
converted select field to vue-multiselect
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "new_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "diff": "<template>\n<div>\n- <select class=\"selectize form-control\" :id=\"id\" :name=\"fieldName\" :form=\"form\">\n- <option\n- v-for=\"(option, index) in selectOptions\"\n- :key=\"index\"\n+ <multiselect\n+ v-model=\"option\"\n+ track-by=\"key\"\n+ label=\"key\"\n+ :options=\"options\"\n+ :searchable=\"false\"\n+ :show-labels=\"false\"\n+ :limit=\"1\"\n+ >\n+ <template slot=\"singleLabel\" slot-scope=\"props\" v-if=\"name === 'status'\">\n+ <span class=\"status mr-2\" :class=\"`is-${props.option.key}`\"></span>{{props.option.key}}\n+ </template>\n+ <template slot=\"option\" slot-scope=\"props\" v-if=\"name === 'status'\">\n+ <span class=\"status mr-2\" :class=\"`is-${props.option.key}`\"></span>{{props.option.key}}\n+ </template>\n+ </multiselect>\n+ <input\n+ type=\"hidden\"\n+ :id=\"id\"\n+ :name=\"fieldName\"\n+ :form=\"form\"\n:value=\"option.key\"\n- :selected=\"option.key == value\"\n- >{{option.value}}</option>\n- </select>\n+ >\n</div>\n</template>\n<script>\nimport selectize from 'selectize';\n+import Multiselect from 'vue-multiselect'\nexport default {\nname: \"editor-select\",\n- props: ['value', 'label', 'name', 'id', 'form', 'options'],\n+ props: ['value', 'name', 'id', 'form', 'options'],\n+\n+ components: { Multiselect },\n+\nmounted(){\n- $('.selectize').selectize({\n- create: true,\n- sortField: 'text'\n- });\n+ this.option.key = this.value\n+ this.option.value = this.value\n},\n- computed:{\n- selectOptions(){\n- return JSON.parse(this.options);\n+\n+ data: () => {\n+ return {\n+ option: {\n+ key: null,\n+ selected: true,\n+ value: null\n+ }\n+ }\n},\n+\n+ computed:{\nfieldName(){\nreturn this.name + '[]'\n}\n" }, { "change_type": "RENAME", "old_path": "assets/js/app/editor/Components/General/Language.vue", "new_path": "assets/js/app/editor/Components/General/Language/Language.vue", "diff": ":options=\"locales\"\n:searchable=\"false\"\n:show-labels=\"false\"\n- placeholder=\"select locale\"\n+ :limit=\"1\"\n@input=\"switchLocale()\"\n>\n<template slot=\"singleLabel\" slot-scope=\"props\">\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/General/index.js", "new_path": "assets/js/app/editor/Components/General/index.js", "diff": "-import Language from './Language';\n+import Language from './Language/Language';\nexport {\nLanguage\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/base/_status.scss", "new_path": "assets/scss/modules/base/_status.scss", "diff": "height: 12px;\nborder-radius: 100%;\nbackground: var(--shade);\n- display: inline-block;\n+ display: inline-flex;\n&.is-published{\nbackground: var(--status-published)\n}\n" }, { "change_type": "DELETE", "old_path": "assets/scss/vendor/selectize/_variables.scss", "new_path": null, "diff": "-//** Variables\n-\n-$selectize-dropdown-option-bg-active: var(--primary);\n-$selectize-input-arrow-color: var(--body-200);\n" }, { "change_type": "DELETE", "old_path": "assets/scss/vendor/selectize/selectize.scss", "new_path": null, "diff": "-//** Selectize Theme\n-@import '_variables.scss';\n-@import \"~selectize-bootstrap4-theme/scss/selectize.bootstrap4\";\n-\n-.form-control {\n- &.selectize-control {\n- &.single {\n- &:after {\n- border-width: 0.4rem 0.3rem 0;\n- margin-top: 0;\n- transform: translateY(-50%);\n- }\n- }\n-\n- .selectize-dropdown .selectize-dropdown-content {\n- padding: 0;\n-\n- .option {\n- padding: 0.25rem 0.5rem;\n-\n- &:first-of-type {\n- margin-top: 0.25rem;\n- }\n- }\n- }\n- }\n-}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "assets/scss/vendor/simplemde/simplemde.scss", "diff": "+.CodeMirror-fullscreen,\n+.editor-toolbar.fullscreen,\n+.editor-preview-side{\n+ z-index: 10000;\n+}\n+\n+.CodeMirror-fullscreen,\n+.editor-toolbar.fullscreen{\n+ background: var(--foreground);\n+}\n+\n+.editor-toolbar {\n+ background-color: $input-disabled-bg;\n+ opacity: 1;\n+ padding: 0 $spacer / 2;\n+ border: $input-border-width solid $input-border-color;\n+ border-bottom: 0;\n+ border-radius: $input-border-radius $input-border-radius 0 0;\n+ &:hover{\n+ opacity: 1;\n+ }\n+ &:before, &:after{\n+ margin: 0;\n+ content: none;\n+ }\n+ a{\n+ padding: $spacer / 3 0;\n+ margin: 0;\n+ height: auto;\n+ border-radius: 0;\n+ &:hover{\n+ border: 0;\n+ background: var(--foreground);\n+ }\n+ }\n+}\n+\n+.CodeMirror {\n+ border: $input-border-width solid $input-border-color;\n+ border-radius: 0 0 $input-border-radius $input-border-radius;\n+ &:focus{\n+ border-color: var(--primary);\n+ box-shadow: $input-focus-box-shadow;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/vendor.scss", "new_path": "assets/scss/vendor/vendor.scss", "diff": "@import './flatpickr/flatpickr';\n@import './baguette/baguette';\n-@import './selectize/selectize';\n@import './multiselect/multiselect';\n@import './flagkit/flagkit';\n@import './api-platform/api-platform';\n+@import './simplemde/simplemde';\n" }, { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"tightenco/collect\": \"^5.7\",\n\"twig/extensions\": \"^1.5\",\n\"webmozart/path-util\": \"^2.3\",\n+ \"webonyx/graphql-php\": \"^0.12.6\",\n\"white-october/pagerfanta-bundle\": \"^1.1\"\n},\n\"require-dev\": {\n" }, { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "{\n\"_readme\": [\n\"This file locks the dependencies of your project to a known state\",\n- \"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies\",\n+ \"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file\",\n\"This file is @generated automatically\"\n],\n- \"content-hash\": \"602823ff1a906a6ec809343479c5e688\",\n+ \"content-hash\": \"b84c4cb1a700ccb8f08f344a4a8d1dc3\",\n\"packages\": [\n{\n\"name\": \"api-platform/api-pack\",\n\"description\": \"A robust cross-platform utility for normalizing, comparing and modifying file paths.\",\n\"time\": \"2015-12-17T08:42:14+00:00\"\n},\n+ {\n+ \"name\": \"webonyx/graphql-php\",\n+ \"version\": \"v0.12.6\",\n+ \"source\": {\n+ \"type\": \"git\",\n+ \"url\": \"https://github.com/webonyx/graphql-php.git\",\n+ \"reference\": \"4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95\"\n+ },\n+ \"dist\": {\n+ \"type\": \"zip\",\n+ \"url\": \"https://api.github.com/repos/webonyx/graphql-php/zipball/4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95\",\n+ \"reference\": \"4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95\",\n+ \"shasum\": \"\"\n+ },\n+ \"require\": {\n+ \"ext-mbstring\": \"*\",\n+ \"php\": \">=5.6\"\n+ },\n+ \"require-dev\": {\n+ \"phpunit/phpunit\": \"^4.8\",\n+ \"psr/http-message\": \"^1.0\",\n+ \"react/promise\": \"2.*\"\n+ },\n+ \"suggest\": {\n+ \"psr/http-message\": \"To use standard GraphQL server\",\n+ \"react/promise\": \"To leverage async resolving on React PHP platform\"\n+ },\n+ \"type\": \"library\",\n+ \"autoload\": {\n+ \"psr-4\": {\n+ \"GraphQL\\\\\": \"src/\"\n+ }\n+ },\n+ \"notification-url\": \"https://packagist.org/downloads/\",\n+ \"license\": [\n+ \"MIT\"\n+ ],\n+ \"description\": \"A PHP port of GraphQL reference implementation\",\n+ \"homepage\": \"https://github.com/webonyx/graphql-php\",\n+ \"keywords\": [\n+ \"api\",\n+ \"graphql\"\n+ ],\n+ \"time\": \"2018-09-02T14:59:54+00:00\"\n+ },\n{\n\"name\": \"white-october/pagerfanta-bundle\",\n\"version\": \"v1.2.2\",\n" }, { "change_type": "MODIFY", "old_path": "config/packages/api_platform.yaml", "new_path": "config/packages/api_platform.yaml", "diff": "api_platform:\n+ graphql:\n+ graphiql:\n+ enabled: true\nmapping:\npaths: ['%kernel.project_dir%/src/Entity']\nformats:\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"moment\": \"^2.22.2\",\n\"no-scroll\": \"^2.1.1\",\n\"popper.js\": \"^1.14.4\",\n- \"selectize\": \"^0.12.6\",\n- \"selectize-bootstrap4-theme\": \"^2.0.2\",\n\"simplemde\": \"^1.11.2\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.5.17\",\n" }, { "change_type": "MODIFY", "old_path": "symfony.lock", "new_path": "symfony.lock", "diff": "\"webmozart/path-util\": {\n\"version\": \"2.3.0\"\n},\n+ \"webonyx/graphql-php\": {\n+ \"version\": \"v0.12.6\"\n+ },\n\"white-october/pagerfanta-bundle\": {\n\"version\": \"v1.0.8\"\n},\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/select.twig", "new_path": "templates/editcontent/fields/select.twig", "diff": "{% set multiple = false %}\n{% endif %}\n+\n+\n{% block field %}\n{% if multiple %}\nMulti\n{% else %}\n<editor-select\n+\n:value=\"'{{ value }}'\"\n:name=\"'{{ name }}'\"\n:id=\"'{{ id }}'\"\n- :options=\"'{{ options|json_encode() }}'\"\n+ :options=\"{{ options|json_encode() }}\"\n:form=\"'{{ form }}'\"\n></editor-select>\n{% endif %}\n" } ]
PHP
MIT License
bolt/core
converted select field to vue-multiselect
95,180
13.11.2018 19:51:25
-3,600
520a8f940fa586bbd37bb2cd83c26cd8f0fbab2b
fixed dep issue with selectize
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "new_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "diff": "</template>\n<script>\n-import selectize from 'selectize';\nimport Multiselect from 'vue-multiselect'\nexport default {\n" }, { "change_type": "MODIFY", "old_path": "src/Form/UserType.php", "new_path": "src/Form/UserType.php", "diff": "@@ -55,9 +55,8 @@ class UserType extends AbstractType\n->add('backendTheme', ChoiceType::class, [\n'label' => 'label.backend_theme',\n'choices' => [\n- 'The Default theme' => 'default',\n- 'The Default Dark theme' => 'dark',\n- 'WoordPers: Kinda looks like that other CMS' => 'woordpers',\n+ 'Default Theme' => 'default',\n+ 'Light Theme' => 'light',\n],\n])\n;\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/edit.twig", "new_path": "templates/editcontent/edit.twig", "diff": "'label' : 'field.id' | trans,\n'name' : 'id',\n'value' : record.id,\n- 'attributes' : 'readonly form=\"editcontent\"'\n+ 'disabled' : true\n} %}\n</div>\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/text.twig", "new_path": "templates/editcontent/fields/text.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n+{# check disabled #}\n+{% if disabled is not defined %}\n+ {% set disabled = false %}\n+{% endif %}\n+\n{% block field %}\n<editor-text\n:value=\"{{ value|json_encode() }}\"\n:name=\"'{{ name }}'\"\n:type=\"'{{ class }}'\"\n+ :disabled=\"'{{ disabled }}'\"\n></editor-text>\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
fixed dep issue with selectize
95,144
14.11.2018 11:37:43
-3,600
b6bedc0dfbe05932f57a58795e0575bf915235a3
Make sure 'form' is set, so fields get saved
[ { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/_base.twig", "new_path": "templates/editcontent/fields/_base.twig", "diff": "{% set id = 'field-' ~ field.name|default(name) %}\n{% endif %}\n+{# Set the form #}\n+{% if not form|default() %}\n+ {% set form = 'editcontent' %}\n+{% endif %}\n+\n{# Set the value #}\n{% if not value|default() %}\n{% if field.value is defined %}\n" } ]
PHP
MIT License
bolt/core
Make sure 'form' is set, so fields get saved
95,144
14.11.2018 13:28:58
-3,600
86d52bdb2f6286ae6e23d39cf7566bace289991b
Make selects use key, display value.
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "new_path": "assets/js/app/editor/Components/Editor/Select/Select.vue", "diff": "<multiselect\nv-model=\"option\"\ntrack-by=\"key\"\n- label=\"key\"\n+ label=\"value\"\n:options=\"options\"\n:searchable=\"false\"\n:show-labels=\"false\"\n@@ -32,12 +32,19 @@ import Multiselect from 'vue-multiselect'\nexport default {\nname: \"editor-select\",\nprops: ['value', 'name', 'id', 'form', 'options'],\n-\ncomponents: { Multiselect },\nmounted(){\n- this.option.key = this.value\n- this.option.value = this.value\n+ let key = this.value;\n+ let value = '';\n+ this.options.forEach(function(item) {\n+ if (item.key == key) {\n+ value = item.value;\n+ }\n+ });\n+\n+ this.option.key = key;\n+ this.option.value = value;\n},\ndata: () => {\n" } ]
PHP
MIT License
bolt/core
Make selects use key, display value.
95,180
15.11.2018 10:38:10
-3,600
3a93578cb73f1195a5fe432b7e295c3237aa3d99
added number field base
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/index.js", "new_path": "assets/js/app/editor/Components/Editor/index.js", "diff": "import Text from './Text/Text';\nimport Slug from './Slug/Slug';\n+\nimport Date from './Date/Date';\nimport Select from './Select/Select';\n+import Number from './Number/Number';\n+\nimport Html from './Html/Html';\nimport Markdown from './Markdown/Markdown';\nimport Textarea from './Textarea/Textarea';\n@@ -16,6 +19,7 @@ import Label from './_Partials/Label'\nexport {\nText,\nSlug,\n+ Number,\nDate,\nSelect,\nHtml,\n" }, { "change_type": "MODIFY", "old_path": "assets/js/app/editor/index.js", "new_path": "assets/js/app/editor/index.js", "diff": "@@ -9,6 +9,7 @@ import store from './store'\nimport {\nText,\nSlug,\n+ Number,\nDate,\nSelect,\nHtml,\n@@ -31,6 +32,7 @@ new Vue({\n\"editor-text\": Text,\n\"editor-slug\": Slug,\n+ \"editor-number\": Number,\n\"editor-date\": Date,\n\"editor-select\": Select,\n\"editor-html\": Html,\n" }, { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -211,6 +211,7 @@ showcases:\nindex: true\nfloatfield:\ntype: float\n+ # step: 0.25\nselectfield:\ntype: select\nvalues: [ foo, bar, baz ]\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/FloatField.php", "new_path": "src/Entity/Field/FloatField.php", "diff": "@@ -12,13 +12,4 @@ use Doctrine\\ORM\\Mapping as ORM;\n*/\nclass FloatField extends Field\n{\n- public function __toString(): string\n- {\n- return (string) (float) ($this->value);\n- }\n-\n- public function getValue(): ?array\n- {\n- return [(float) ($this->value)];\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/IntegerField.php", "new_path": "src/Entity/Field/IntegerField.php", "diff": "@@ -12,13 +12,4 @@ use Doctrine\\ORM\\Mapping as ORM;\n*/\nclass IntegerField extends Field\n{\n- public function __toString(): string\n- {\n- return (string) (int) ($this->value);\n- }\n-\n- public function getValue(): ?array\n- {\n- return [(int) ($this->value)];\n- }\n}\n" } ]
PHP
MIT License
bolt/core
added number field base
95,180
15.11.2018 12:01:46
-3,600
e33870846b95588cce0bdffeeed0770d36e46b40
added new number field
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Number/Number.vue", "new_path": "assets/js/app/editor/Components/Editor/Number/Number.vue", "diff": ":step=\"step\"\nv-model=\"val\"\n>\n- <div class=\"input-group-append\">\n+ <!-- <div class=\"input-group-append\">\n<button\nclass=\"btn btn-sm btn-secondary\"\ntype=\"button\"\ntype=\"button\"\n@click=\"calc(val, '+')\"\n><i class=\"fas fa-plus\"></i></button>\n- </div>\n+ </div> -->\n</div>\n</template>\n" }, { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -207,11 +207,12 @@ showcases:\ndefault: \"first day of last month\"\nvariant: inline\nintegerfield:\n- type: integer\n- index: true\n+ type: number\n+ mode: integer\n+ step: 0.25\nfloatfield:\n- type: float\n- # step: 0.25\n+ type: number\n+ mode: float\nselectfield:\ntype: select\nvalues: [ foo, bar, baz ]\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -29,7 +29,6 @@ use Symfony\\Component\\Serializer\\Annotation\\Groups;\n* \"block\" = \"Bolt\\Entity\\Field\\BlockField\",\n* \"checkbox\" = \"Bolt\\Entity\\Field\\CheckboxField\",\n* \"date\" = \"Bolt\\Entity\\Field\\DateField\",\n- * \"datetime\" = \"Bolt\\Entity\\Field\\DatetimeField\",\n* \"embed\" = \"Bolt\\Entity\\Field\\EmbedField\",\n* \"file\" = \"Bolt\\Entity\\Field\\FileField\",\n* \"filelist\" = \"Bolt\\Entity\\Field\\FilelistField\",\n@@ -41,6 +40,7 @@ use Symfony\\Component\\Serializer\\Annotation\\Groups;\n* \"imagelist\" = \"Bolt\\Entity\\Field\\ImagelistField\",\n* \"integer\" = \"Bolt\\Entity\\Field\\IntegerField\",\n* \"markdown\" = \"Bolt\\Entity\\Field\\MarkdownField\",\n+ * \"number\" = \"Bolt\\Entity\\Field\\NumberField\",\n* \"repeater\" = \"Bolt\\Entity\\Field\\RepeaterField\",\n* \"select\" = \"Bolt\\Entity\\Field\\SelectField\",\n* \"slug\" = \"Bolt\\Entity\\Field\\SlugField\",\n" }, { "change_type": "RENAME", "old_path": "src/Entity/Field/DatetimeField.php", "new_path": "src/Entity/Field/NumberField.php", "diff": "@@ -10,6 +10,6 @@ use Doctrine\\ORM\\Mapping as ORM;\n/**\n* @ORM\\Entity\n*/\n-class DatetimeField extends Field\n+class NumberField extends Field\n{\n}\n" }, { "change_type": "DELETE", "old_path": "templates/editcontent/fields/float.twig", "new_path": null, "diff": "-{% extends '@bolt/editcontent/fields/_base.twig' %}\n-\n-{% block field %}\n-\n- {% if step is not defined %}\n- {% set step = define.step|default(1) %}\n- {% endif %}\n-\n- <editor-number\n- name=\"{{ name }}\"\n- :value=\"{{ value }}\"\n- :step=\"{{ step }}\"\n- ></editor-number>\n-\n-{% endblock %}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "templates/editcontent/fields/number.twig", "diff": "+{% extends '@bolt/editcontent/fields/_base.twig' %}\n+\n+{% block field %}\n+\n+ {# set mode #}\n+ {% if mode is not defined %}\n+ {% set mode = define.mode|default('float') %}\n+ {% endif %}\n+ {# set step #}\n+ {% if step is not defined and mode == 'integer' %}\n+ {% set step = define.step|default(0.5) %}\n+ {% else %}\n+ {% set step = 1 %}\n+ {% endif %}\n+\n+ <editor-number\n+ name=\"{{ name }}\"\n+ :value=\"{{ value }}\"\n+ :step=\"{{ step }}\"\n+ ></editor-number>\n+\n+{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
added new number field
95,168
15.11.2018 13:50:26
-3,600
6f0e1a4c7c8c72022d4ad3a6fb9e77ad2597e3ce
Add type pasword to password field
[ { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/password.twig", "new_path": "templates/editcontent/fields/password.twig", "diff": "{% endblock %}\n{% block field %}\n- <input type=\"{{ type }}\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n+ <input type=\"password\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Add type pasword to password field
95,168
15.11.2018 13:56:13
-3,600
a5c3621a9288557bfb4c7ce9d4c82e86a508627b
Remove change password route
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -78,33 +78,4 @@ class UserController extends BaseController\nreturn new RedirectResponse($url);\n}\n-\n- /**\n- * @Route(\"/change-password\", methods={\"GET\", \"POST\"}, name=\"bolt_change_password\")\n- *\n- * @param Request $request\n- * @param UserPasswordEncoderInterface $encoder\n- *\n- * @throws \\Twig_Error_Loader\n- * @throws \\Twig_Error_Runtime\n- * @throws \\Twig_Error_Syntax\n- *\n- * @return Response\n- */\n- public function changePassword(Request $request, UserPasswordEncoderInterface $encoder): Response\n- {\n- $user = $this->getUser();\n- $form = $this->createForm(ChangePasswordType::class);\n- $form->handleRequest($request);\n- if ($form->isSubmitted() && $form->isValid()) {\n- $user->setPassword($encoder->encodePassword($user, $form->get('newPassword')->getData()));\n- $this->getDoctrine()->getManager()->flush();\n-\n- return $this->redirectToRoute('security_logout');\n- }\n-\n- return $this->renderTemplate('users/change_password.twig', [\n- 'form' => $form->createView(),\n- ]);\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/users/edit.twig", "new_path": "templates/users/edit.twig", "diff": "</form>\n</div>\n{% endblock %}\n\\ No newline at end of file\n-\n-{% block aside %}\n- <div class=\"section\">\n- <a href=\"{{ path('bolt_change_password') }}\" class=\"btn btn-danger\">\n- <i class=\"fa fa-lock\" aria-hidden=\"true\"></i> {{ 'action.change_password'|trans }}\n- </a>\n- </div>\n-{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Remove change password route
95,144
15.11.2018 17:57:58
-3,600
9d74adfe4ce233390c207fb8bee3704dfed925b5
Fixing CS issues
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -6,7 +6,6 @@ namespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\nuse Bolt\\Form\\ChangePasswordType;\n-use Bolt\\Form\\UserType;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n@@ -42,6 +41,7 @@ class UserController extends BaseController\n'user' => $user,\n]);\n}\n+\n/**\n* @Route(\"/profile-edit\", methods={\"POST\"}, name=\"bolt_profile_edit_post\")\n*/\n@@ -59,8 +59,7 @@ class UserController extends BaseController\n$user->setLocale($locale);\n$user->setbackendTheme($request->get('user')['backendTheme']);\n- if (!empty($newPassword) || !empty($confirmedPassword))\n- {\n+ if (!empty($newPassword) || !empty($confirmedPassword)) {\n// Set new password\nif ($newPassword === $confirmedPassword) {\n$user->setPassword($encoder->encodePassword($user, $newPassword));\n@@ -76,7 +75,6 @@ class UserController extends BaseController\n$request->getSession()->set('_locale', $locale);\nreturn new RedirectResponse($url);\n-\n}\n/**\n" } ]
PHP
MIT License
bolt/core
Fixing CS issues
95,144
16.11.2018 06:47:18
-3,600
6b5e28cc25320c3a1ebb29c2cda804991636b083
Updating to Symfony 4.2 beta 2
[ { "change_type": "MODIFY", "old_path": "composer.lock", "new_path": "composer.lock", "diff": "},\n{\n\"name\": \"nesbot/carbon\",\n- \"version\": \"1.34.4\",\n+ \"version\": \"1.35.1\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/briannesbitt/Carbon.git\",\n- \"reference\": \"b9a444d829c9a16735aceca1b173e765745bcc0c\"\n+ \"reference\": \"5c05a2be472b22f63291d192410df9f0e0de3b19\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/briannesbitt/Carbon/zipball/b9a444d829c9a16735aceca1b173e765745bcc0c\",\n- \"reference\": \"b9a444d829c9a16735aceca1b173e765745bcc0c\",\n+ \"url\": \"https://api.github.com/repos/briannesbitt/Carbon/zipball/5c05a2be472b22f63291d192410df9f0e0de3b19\",\n+ \"reference\": \"5c05a2be472b22f63291d192410df9f0e0de3b19\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"datetime\",\n\"time\"\n],\n- \"time\": \"2018-11-13T08:26:10+00:00\"\n+ \"time\": \"2018-11-14T21:55:58+00:00\"\n},\n{\n\"name\": \"nikic/php-parser\",\n},\n{\n\"name\": \"symfony/asset\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/asset.git\",\n- \"reference\": \"011a0ece4fe094bb1713b71a16690bc144adc767\"\n+ \"reference\": \"fb06338fd3762f8615b51a58e5e9299ccca03876\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/asset/zipball/011a0ece4fe094bb1713b71a16690bc144adc767\",\n- \"reference\": \"011a0ece4fe094bb1713b71a16690bc144adc767\",\n+ \"url\": \"https://api.github.com/repos/symfony/asset/zipball/fb06338fd3762f8615b51a58e5e9299ccca03876\",\n+ \"reference\": \"fb06338fd3762f8615b51a58e5e9299ccca03876\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Asset Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-09-16T20:06:58+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/cache\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/cache.git\",\n- \"reference\": \"6122c7d32e02c11f017937392fb887c88acadd6e\"\n+ \"reference\": \"eed3cbe14df590db9b3e3a3fa40d4221d38666f3\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/cache/zipball/6122c7d32e02c11f017937392fb887c88acadd6e\",\n- \"reference\": \"6122c7d32e02c11f017937392fb887c88acadd6e\",\n+ \"url\": \"https://api.github.com/repos/symfony/cache/zipball/eed3cbe14df590db9b3e3a3fa40d4221d38666f3\",\n+ \"reference\": \"eed3cbe14df590db9b3e3a3fa40d4221d38666f3\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"caching\",\n\"psr6\"\n],\n- \"time\": \"2018-10-31T08:00:32+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/config\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/config.git\",\n- \"reference\": \"c003034af61cf54712d793a8cac9e8bb1f9da355\"\n+ \"reference\": \"8fc91ee223309042200a86b67b5a1a55328d2911\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/config/zipball/c003034af61cf54712d793a8cac9e8bb1f9da355\",\n- \"reference\": \"c003034af61cf54712d793a8cac9e8bb1f9da355\",\n+ \"url\": \"https://api.github.com/repos/symfony/config/zipball/8fc91ee223309042200a86b67b5a1a55328d2911\",\n+ \"reference\": \"8fc91ee223309042200a86b67b5a1a55328d2911\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Config Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-11-02T11:14:17+00:00\"\n+ \"time\": \"2018-11-15T12:17:10+00:00\"\n},\n{\n\"name\": \"symfony/console\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/console.git\",\n- \"reference\": \"0a26a2eadf8d06b48074daae9ce7e208d690e151\"\n+ \"reference\": \"f75de4cb9e4376c09e600a30174fefad9daa2272\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/console/zipball/0a26a2eadf8d06b48074daae9ce7e208d690e151\",\n- \"reference\": \"0a26a2eadf8d06b48074daae9ce7e208d690e151\",\n+ \"url\": \"https://api.github.com/repos/symfony/console/zipball/f75de4cb9e4376c09e600a30174fefad9daa2272\",\n+ \"reference\": \"f75de4cb9e4376c09e600a30174fefad9daa2272\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Console Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-31T10:56:31+00:00\"\n+ \"time\": \"2018-11-15T12:17:10+00:00\"\n},\n{\n\"name\": \"symfony/contracts\",\n},\n{\n\"name\": \"symfony/debug-bundle\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/debug-bundle.git\",\n- \"reference\": \"ff481d19a9cfd2a86bef82490b331fbd585db283\"\n+ \"reference\": \"e52fc6ac1fe1150316f9991342ac2b4a9c1e1995\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/debug-bundle/zipball/ff481d19a9cfd2a86bef82490b331fbd585db283\",\n- \"reference\": \"ff481d19a9cfd2a86bef82490b331fbd585db283\",\n+ \"url\": \"https://api.github.com/repos/symfony/debug-bundle/zipball/e52fc6ac1fe1150316f9991342ac2b4a9c1e1995\",\n+ \"reference\": \"e52fc6ac1fe1150316f9991342ac2b4a9c1e1995\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony DebugBundle\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-06-25T17:06:32+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/debug-pack\",\n},\n{\n\"name\": \"symfony/dependency-injection\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/dependency-injection.git\",\n- \"reference\": \"36cea4529e8a7ebcdccd00e4623e79230df98603\"\n+ \"reference\": \"887d5048dcd19445ef235f71042bae6b2a58bcb3\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/dependency-injection/zipball/36cea4529e8a7ebcdccd00e4623e79230df98603\",\n- \"reference\": \"36cea4529e8a7ebcdccd00e4623e79230df98603\",\n+ \"url\": \"https://api.github.com/repos/symfony/dependency-injection/zipball/887d5048dcd19445ef235f71042bae6b2a58bcb3\",\n+ \"reference\": \"887d5048dcd19445ef235f71042bae6b2a58bcb3\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony DependencyInjection Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-11-02T12:47:27+00:00\"\n+ \"time\": \"2018-11-15T12:42:54+00:00\"\n},\n{\n\"name\": \"symfony/doctrine-bridge\",\n},\n{\n\"name\": \"symfony/flex\",\n- \"version\": \"v1.1.7\",\n+ \"version\": \"v1.1.8\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/flex.git\",\n- \"reference\": \"803c49664ddc7cbc4be02f41491766be32c90a7f\"\n+ \"reference\": \"955774ecf07b10230bb5b44e150ba078b45f68fa\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/flex/zipball/803c49664ddc7cbc4be02f41491766be32c90a7f\",\n- \"reference\": \"803c49664ddc7cbc4be02f41491766be32c90a7f\",\n+ \"url\": \"https://api.github.com/repos/symfony/flex/zipball/955774ecf07b10230bb5b44e150ba078b45f68fa\",\n+ \"reference\": \"955774ecf07b10230bb5b44e150ba078b45f68fa\",\n\"shasum\": \"\"\n},\n\"require\": {\n}\n],\n\"description\": \"Composer plugin for Symfony\",\n- \"time\": \"2018-11-12T12:25:13+00:00\"\n+ \"time\": \"2018-11-15T06:11:38+00:00\"\n},\n{\n\"name\": \"symfony/form\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/form.git\",\n- \"reference\": \"dabc3c60b5e53c0652665fee2fc186a80c2e8736\"\n+ \"reference\": \"43ebe00a79d032db2c6101a72363ba0316d79540\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/form/zipball/dabc3c60b5e53c0652665fee2fc186a80c2e8736\",\n- \"reference\": \"dabc3c60b5e53c0652665fee2fc186a80c2e8736\",\n+ \"url\": \"https://api.github.com/repos/symfony/form/zipball/43ebe00a79d032db2c6101a72363ba0316d79540\",\n+ \"reference\": \"43ebe00a79d032db2c6101a72363ba0316d79540\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Form Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-30T17:11:56+00:00\"\n+ \"time\": \"2018-11-15T12:52:12+00:00\"\n},\n{\n\"name\": \"symfony/framework-bundle\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/framework-bundle.git\",\n- \"reference\": \"c3f9abc2d1ad2aa827dd1be6cb034a2d83d427a9\"\n+ \"reference\": \"e4c69e3e9659fc3358060406cbc02e53d1f6a9e1\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/framework-bundle/zipball/c3f9abc2d1ad2aa827dd1be6cb034a2d83d427a9\",\n- \"reference\": \"c3f9abc2d1ad2aa827dd1be6cb034a2d83d427a9\",\n+ \"url\": \"https://api.github.com/repos/symfony/framework-bundle/zipball/e4c69e3e9659fc3358060406cbc02e53d1f6a9e1\",\n+ \"reference\": \"e4c69e3e9659fc3358060406cbc02e53d1f6a9e1\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"phpunit/phpunit\": \"<4.8.35|<5.4.3,>=5.0\",\n\"symfony/asset\": \"<3.4\",\n\"symfony/console\": \"<3.4\",\n+ \"symfony/dotenv\": \"<4.2\",\n\"symfony/form\": \"<4.2\",\n\"symfony/messenger\": \"<4.2\",\n\"symfony/property-info\": \"<3.4\",\n- \"symfony/serializer\": \"<4.1\",\n+ \"symfony/serializer\": \"<4.2\",\n\"symfony/stopwatch\": \"<3.4\",\n\"symfony/translation\": \"<4.2\",\n\"symfony/twig-bridge\": \"<4.1.1\",\n],\n\"description\": \"Symfony FrameworkBundle\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-31T17:17:13+00:00\"\n+ \"time\": \"2018-11-15T17:25:12+00:00\"\n},\n{\n\"name\": \"symfony/http-foundation\",\n},\n{\n\"name\": \"symfony/http-kernel\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/http-kernel.git\",\n- \"reference\": \"b5213e6e1f019a2b78079a085b6d1a444212a0e2\"\n+ \"reference\": \"ee7c1051d6011ca1560df40751af90d448fe9888\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/http-kernel/zipball/b5213e6e1f019a2b78079a085b6d1a444212a0e2\",\n- \"reference\": \"b5213e6e1f019a2b78079a085b6d1a444212a0e2\",\n+ \"url\": \"https://api.github.com/repos/symfony/http-kernel/zipball/ee7c1051d6011ca1560df40751af90d448fe9888\",\n+ \"reference\": \"ee7c1051d6011ca1560df40751af90d448fe9888\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony HttpKernel Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-11-03T12:37:30+00:00\"\n+ \"time\": \"2018-11-16T05:12:50+00:00\"\n},\n{\n\"name\": \"symfony/inflector\",\n},\n{\n\"name\": \"symfony/options-resolver\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/options-resolver.git\",\n- \"reference\": \"c2fb7a4ce10bf53237ee1314d7784d9a04054f1b\"\n+ \"reference\": \"a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/options-resolver/zipball/c2fb7a4ce10bf53237ee1314d7784d9a04054f1b\",\n- \"reference\": \"c2fb7a4ce10bf53237ee1314d7784d9a04054f1b\",\n+ \"url\": \"https://api.github.com/repos/symfony/options-resolver/zipball/a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba\",\n+ \"reference\": \"a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"configuration\",\n\"options\"\n],\n- \"time\": \"2018-10-24T12:06:04+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/orm-pack\",\n},\n{\n\"name\": \"symfony/serializer\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/serializer.git\",\n- \"reference\": \"a21275abccfa16432ad3ea5320f217b8e296ab98\"\n+ \"reference\": \"830a3add86777766b4fc6490e3f5e72d693704c2\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/serializer/zipball/a21275abccfa16432ad3ea5320f217b8e296ab98\",\n- \"reference\": \"a21275abccfa16432ad3ea5320f217b8e296ab98\",\n+ \"url\": \"https://api.github.com/repos/symfony/serializer/zipball/830a3add86777766b4fc6490e3f5e72d693704c2\",\n+ \"reference\": \"830a3add86777766b4fc6490e3f5e72d693704c2\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Serializer Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-31T10:56:31+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/stopwatch\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/stopwatch.git\",\n- \"reference\": \"187946b203e26517babe4dcbc2c045dec8579376\"\n+ \"reference\": \"ec076716412274e51f8a7ea675d9515e5c311123\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/stopwatch/zipball/187946b203e26517babe4dcbc2c045dec8579376\",\n- \"reference\": \"187946b203e26517babe4dcbc2c045dec8579376\",\n+ \"url\": \"https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123\",\n+ \"reference\": \"ec076716412274e51f8a7ea675d9515e5c311123\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Stopwatch Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-02T12:43:31+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/swiftmailer-bundle\",\n},\n{\n\"name\": \"symfony/translation\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/translation.git\",\n- \"reference\": \"35acf59e7dafd3ac919e16babaae0b6378fab564\"\n+ \"reference\": \"f393c2ed9e42907ea7ccd4d8f2c55b5eb30bd0c2\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/translation/zipball/35acf59e7dafd3ac919e16babaae0b6378fab564\",\n- \"reference\": \"35acf59e7dafd3ac919e16babaae0b6378fab564\",\n+ \"url\": \"https://api.github.com/repos/symfony/translation/zipball/f393c2ed9e42907ea7ccd4d8f2c55b5eb30bd0c2\",\n+ \"reference\": \"f393c2ed9e42907ea7ccd4d8f2c55b5eb30bd0c2\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Translation Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-31T10:56:31+00:00\"\n+ \"time\": \"2018-11-14T16:25:09+00:00\"\n},\n{\n\"name\": \"symfony/twig-bridge\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/twig-bridge.git\",\n- \"reference\": \"8a597144b636d5ed80177575fb034033dcd26fe8\"\n+ \"reference\": \"fdad8d2f16d33add9be68f13ccd2d753065114ff\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/twig-bridge/zipball/8a597144b636d5ed80177575fb034033dcd26fe8\",\n- \"reference\": \"8a597144b636d5ed80177575fb034033dcd26fe8\",\n+ \"url\": \"https://api.github.com/repos/symfony/twig-bridge/zipball/fdad8d2f16d33add9be68f13ccd2d753065114ff\",\n+ \"reference\": \"fdad8d2f16d33add9be68f13ccd2d753065114ff\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"php\": \"^7.1.3\",\n+ \"symfony/contracts\": \"^1.0\",\n\"twig/twig\": \"^1.35|^2.4.4\"\n},\n\"conflict\": {\n],\n\"description\": \"Symfony Twig Bridge\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-25T06:59:49+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/twig-bundle\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/twig-bundle.git\",\n- \"reference\": \"b1986e872c7cef2c21064eceaa9d5492dd38c024\"\n+ \"reference\": \"2842f70b899ab765b3eaccdd3b8cdbb0cbb69fb6\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/twig-bundle/zipball/b1986e872c7cef2c21064eceaa9d5492dd38c024\",\n- \"reference\": \"b1986e872c7cef2c21064eceaa9d5492dd38c024\",\n+ \"url\": \"https://api.github.com/repos/symfony/twig-bundle/zipball/2842f70b899ab765b3eaccdd3b8cdbb0cbb69fb6\",\n+ \"reference\": \"2842f70b899ab765b3eaccdd3b8cdbb0cbb69fb6\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony TwigBundle\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-30T17:11:56+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/validator\",\n},\n{\n\"name\": \"symfony/var-exporter\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/var-exporter.git\",\n- \"reference\": \"e8d7abc19a0194caf288a3b761532ba83045be84\"\n+ \"reference\": \"08250457428e06289d21ed52397b0ae336abf54b\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/var-exporter/zipball/e8d7abc19a0194caf288a3b761532ba83045be84\",\n- \"reference\": \"e8d7abc19a0194caf288a3b761532ba83045be84\",\n+ \"url\": \"https://api.github.com/repos/symfony/var-exporter/zipball/08250457428e06289d21ed52397b0ae336abf54b\",\n+ \"reference\": \"08250457428e06289d21ed52397b0ae336abf54b\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"instantiate\",\n\"serialize\"\n],\n- \"time\": \"2018-10-29T10:58:48+00:00\"\n+ \"time\": \"2018-11-14T10:32:16+00:00\"\n},\n{\n\"name\": \"symfony/web-profiler-bundle\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/web-profiler-bundle.git\",\n- \"reference\": \"07f2df048ec75407a6549412a99a2408dde30e47\"\n+ \"reference\": \"56e812c4c6d38b08b539e3c85c5ee0ca1a1884b8\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/web-profiler-bundle/zipball/07f2df048ec75407a6549412a99a2408dde30e47\",\n- \"reference\": \"07f2df048ec75407a6549412a99a2408dde30e47\",\n+ \"url\": \"https://api.github.com/repos/symfony/web-profiler-bundle/zipball/56e812c4c6d38b08b539e3c85c5ee0ca1a1884b8\",\n+ \"reference\": \"56e812c4c6d38b08b539e3c85c5ee0ca1a1884b8\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony WebProfilerBundle\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-28T17:49:26+00:00\"\n+ \"time\": \"2018-11-15T12:17:10+00:00\"\n},\n{\n\"name\": \"symfony/webpack-encore-bundle\",\n},\n{\n\"name\": \"symfony/yaml\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/yaml.git\",\n- \"reference\": \"7228a3e2163ab5623231f126cf8d7701072f9d16\"\n+ \"reference\": \"c41175c801e3edfda90f32e292619d10c27103d7\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/yaml/zipball/7228a3e2163ab5623231f126cf8d7701072f9d16\",\n- \"reference\": \"7228a3e2163ab5623231f126cf8d7701072f9d16\",\n+ \"url\": \"https://api.github.com/repos/symfony/yaml/zipball/c41175c801e3edfda90f32e292619d10c27103d7\",\n+ \"reference\": \"c41175c801e3edfda90f32e292619d10c27103d7\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony Yaml Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-02T16:38:08+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"tightenco/collect\",\n},\n{\n\"name\": \"twig/extensions\",\n- \"version\": \"v1.5.2\",\n+ \"version\": \"v1.5.3\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/twigphp/Twig-extensions.git\",\n- \"reference\": \"2c1a86526d0044065220d1b51ac08348bea5ca82\"\n+ \"reference\": \"e187386bea539a2cc2726689d6b4d468672a8ab4\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/twigphp/Twig-extensions/zipball/2c1a86526d0044065220d1b51ac08348bea5ca82\",\n- \"reference\": \"2c1a86526d0044065220d1b51ac08348bea5ca82\",\n+ \"url\": \"https://api.github.com/repos/twigphp/Twig-extensions/zipball/e187386bea539a2cc2726689d6b4d468672a8ab4\",\n+ \"reference\": \"e187386bea539a2cc2726689d6b4d468672a8ab4\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"i18n\",\n\"text\"\n],\n- \"time\": \"2018-05-22T13:26:07+00:00\"\n+ \"time\": \"2018-11-16T03:34:09+00:00\"\n},\n{\n\"name\": \"twig/twig\",\n},\n{\n\"name\": \"symfony/browser-kit\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/browser-kit.git\",\n- \"reference\": \"3f9ee46589452fa760091f9b7c5cfce142752364\"\n+ \"reference\": \"5bb3199fd7aee3c1674e70b3dcd7e39e06da4ada\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/browser-kit/zipball/3f9ee46589452fa760091f9b7c5cfce142752364\",\n- \"reference\": \"3f9ee46589452fa760091f9b7c5cfce142752364\",\n+ \"url\": \"https://api.github.com/repos/symfony/browser-kit/zipball/5bb3199fd7aee3c1674e70b3dcd7e39e06da4ada\",\n+ \"reference\": \"5bb3199fd7aee3c1674e70b3dcd7e39e06da4ada\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony BrowserKit Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-28T12:36:14+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/css-selector\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/css-selector.git\",\n- \"reference\": \"3504dc5c848fe7362561fdeddaf24c2616577a43\"\n+ \"reference\": \"aa9fa526ba1b2ec087ffdfb32753803d999fcfcd\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/css-selector/zipball/3504dc5c848fe7362561fdeddaf24c2616577a43\",\n- \"reference\": \"3504dc5c848fe7362561fdeddaf24c2616577a43\",\n+ \"url\": \"https://api.github.com/repos/symfony/css-selector/zipball/aa9fa526ba1b2ec087ffdfb32753803d999fcfcd\",\n+ \"reference\": \"aa9fa526ba1b2ec087ffdfb32753803d999fcfcd\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony CssSelector Component\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-02T16:38:08+00:00\"\n+ \"time\": \"2018-11-11T19:52:12+00:00\"\n},\n{\n\"name\": \"symfony/dom-crawler\",\n},\n{\n\"name\": \"symfony/dotenv\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/dotenv.git\",\n- \"reference\": \"b9bfcb9d3f663b47351ab72841b09c536e3555cd\"\n+ \"reference\": \"64b5cde8384fd4e9ab98ce23613e2a6d56044796\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/dotenv/zipball/b9bfcb9d3f663b47351ab72841b09c536e3555cd\",\n- \"reference\": \"b9bfcb9d3f663b47351ab72841b09c536e3555cd\",\n+ \"url\": \"https://api.github.com/repos/symfony/dotenv/zipball/64b5cde8384fd4e9ab98ce23613e2a6d56044796\",\n+ \"reference\": \"64b5cde8384fd4e9ab98ce23613e2a6d56044796\",\n\"shasum\": \"\"\n},\n\"require\": {\n\"env\",\n\"environment\"\n],\n- \"time\": \"2018-10-29T07:11:34+00:00\"\n+ \"time\": \"2018-11-13T19:27:38+00:00\"\n},\n{\n\"name\": \"symfony/maker-bundle\",\n},\n{\n\"name\": \"symfony/phpunit-bridge\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/phpunit-bridge.git\",\n- \"reference\": \"973a72e0c72156fe2bbc28b6b4a9a4b9d656f409\"\n+ \"reference\": \"4ca02648fbe3ab8e6b673395cbcc702088dc8d0b\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/phpunit-bridge/zipball/973a72e0c72156fe2bbc28b6b4a9a4b9d656f409\",\n- \"reference\": \"973a72e0c72156fe2bbc28b6b4a9a4b9d656f409\",\n+ \"url\": \"https://api.github.com/repos/symfony/phpunit-bridge/zipball/4ca02648fbe3ab8e6b673395cbcc702088dc8d0b\",\n+ \"reference\": \"4ca02648fbe3ab8e6b673395cbcc702088dc8d0b\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony PHPUnit Bridge\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-02T12:43:31+00:00\"\n+ \"time\": \"2018-11-15T12:17:10+00:00\"\n},\n{\n\"name\": \"symfony/polyfill-php70\",\n},\n{\n\"name\": \"symfony/web-server-bundle\",\n- \"version\": \"v4.2.0-BETA1\",\n+ \"version\": \"v4.2.0-BETA2\",\n\"source\": {\n\"type\": \"git\",\n\"url\": \"https://github.com/symfony/web-server-bundle.git\",\n- \"reference\": \"3cba21fef496294883624d27809ec9cbbe8d838a\"\n+ \"reference\": \"6291444989fc753df2a9c86e5f6d5af4616804f5\"\n},\n\"dist\": {\n\"type\": \"zip\",\n- \"url\": \"https://api.github.com/repos/symfony/web-server-bundle/zipball/3cba21fef496294883624d27809ec9cbbe8d838a\",\n- \"reference\": \"3cba21fef496294883624d27809ec9cbbe8d838a\",\n+ \"url\": \"https://api.github.com/repos/symfony/web-server-bundle/zipball/6291444989fc753df2a9c86e5f6d5af4616804f5\",\n+ \"reference\": \"6291444989fc753df2a9c86e5f6d5af4616804f5\",\n\"shasum\": \"\"\n},\n\"require\": {\n],\n\"description\": \"Symfony WebServerBundle\",\n\"homepage\": \"https://symfony.com\",\n- \"time\": \"2018-10-10T13:54:27+00:00\"\n+ \"time\": \"2018-11-13T19:11:56+00:00\"\n}\n],\n\"aliases\": [],\n" } ]
PHP
MIT License
bolt/core
Updating to Symfony 4.2 beta 2
95,144
16.11.2018 09:09:07
-3,600
f2f1cff69f429cb3542c9ad1f2c595d96016d6a9
Add "Kitchensink" stub.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/GeneralController.php", "new_path": "src/Controller/Backend/GeneralController.php", "diff": "@@ -16,4 +16,17 @@ class GeneralController extends BaseController\n{\nreturn $this->renderTemplate('pages/about.twig');\n}\n+\n+ /**\n+ * @Route(\"/kitchensink\", name=\"bolt_kitchensink\")\n+ */\n+ public function kitchensink()\n+ {\n+ $this->addFlash('success', \"<strong>Well done!</strong> You successfully read this important alert message.\");\n+ $this->addFlash('info', \"<strong>Heads up!</strong> This alert needs your attention, but it's not super important.\");\n+ $this->addFlash('warning', \"<strong>Warning!</strong> Better check yourself, you're not looking too good.\");\n+ $this->addFlash('danger', \"<strong>Oh snap!</strong> Change a few things up and try submitting again.\");\n+\n+ return $this->renderTemplate('pages/about.twig');\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Add "Kitchensink" stub.
95,168
16.11.2018 14:02:09
-3,600
da3b160a105ebcbacce4f5b1ac2b65381da36c9a
Validate userame, password and email in edit profile
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -5,8 +5,6 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\BaseController;\n-use Bolt\\Form\\ChangePasswordType;\n-use Bolt\\Form\\UserType;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n@@ -39,37 +37,62 @@ class UserController extends BaseController\n$user = $this->getUser();\nreturn $this->renderTemplate('users/edit.twig', [\n+ 'usertitle' => $user->getFullName(),\n'user' => $user,\n]);\n}\n+\n/**\n* @Route(\"/profile-edit\", methods={\"POST\"}, name=\"bolt_profile_edit_post\")\n*/\n- public function edit_post(Request $request, UrlGeneratorInterface $urlGenerator, ObjectManager $manager, UserPasswordEncoderInterface $encoder): Response\n+ public function edit_post(Request $request, UrlGeneratorInterface $urlGenerator,\n+ ObjectManager $manager, UserPasswordEncoderInterface $encoder): Response\n{\n$user = $this->getUser();\n+ $userTitle = $user->getFullName();\n$url = $urlGenerator->generate('bolt_profile_edit');\n$locale = $request->get('user')['locale'];\n+ $newPassword = $request->get('password');\n- $newPassword = $request->get('user')['password_first'];\n- $confirmedPassword = $request->get('user')['password_second'];\n-\n- $user->setFullName($request->get('user')['fullName']);\n- $user->setEmail($request->get('user')['email']);\n+ $user->setFullName($request->get('fullName'));\n+ $user->setEmail($request->get('email'));\n$user->setLocale($locale);\n$user->setbackendTheme($request->get('user')['backendTheme']);\n- if (!empty($newPassword) || !empty($confirmedPassword))\n- {\n- // Set new password\n- if($newPassword === $confirmedPassword) {\n+ $hasError = false;\n+\n+ $usernameValidateOptions = [\n+ 'options' => [\n+ 'min_range' => 1,\n+ ],\n+ ];\n+\n+ // Validate username\n+ if (!filter_var(strlen($user->getFullName()), FILTER_VALIDATE_INT, $usernameValidateOptions)) {\n+ $this->addFlash('danger', 'user.not_valid_username');\n+ $hasError = true;\n+ }\n+\n+ // Validate password\n+ if (!empty($newPassword) && strlen($newPassword) < 6) {\n+ $this->addFlash('danger', 'user.not_valid_password');\n+ $hasError = true;\n+ } elseif(!empty($newPassword) && strlen($newPassword) > 6) {\n$user->setPassword($encoder->encodePassword($user, $newPassword));\n- } else{\n+ }\n+\n+ // Validate email\n+ if (!filter_var($user->getEmail(), FILTER_VALIDATE_EMAIL)) {\n+ $this->addFlash('danger', 'user.not_valid_email');\n+ $hasError = true;\n+ };\n+\n+ if($hasError){\nreturn $this->renderTemplate('users/edit.twig', [\n+ 'usertitle' => $userTitle,\n'user' => $user,\n]);\n}\n- }\n$manager->flush();\n" } ]
PHP
MIT License
bolt/core
Validate userame, password and email in edit profile
95,168
16.11.2018 14:06:05
-3,600
d88bd10bfa4d395e85d0dcb5f365a140cb75eef8
Set 'email' as email input type
[ { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/email.twig", "new_path": "templates/editcontent/fields/email.twig", "diff": "{% endblock %}\n{% block field %}\n- <input type=\"{{ type }}\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n+ <input type=\"email\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Set 'email' as email input type
95,168
16.11.2018 15:31:06
-3,600
00da1283ca6d67922162a235500812165234a513
Remove label blocks from email.twig and password.twig
[ { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/email.twig", "new_path": "templates/editcontent/fields/email.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n-{% block label %}\n- <label for=\"{{ label_attr.for }}\" class=\"{{ label_class }}\">{{ label }}</label>\n-{% endblock %}\n-\n{% block field %}\n<input type=\"email\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n{% endblock %}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/password.twig", "new_path": "templates/editcontent/fields/password.twig", "diff": "{% extends '@bolt/editcontent/fields/_base.twig' %}\n-{% block label %}\n- <label for=\"{{ label_attr.for }}\" class=\"{{ label_class }}\">{{ label }}</label>\n-{% endblock %}\n-\n{% block field %}\n<input type=\"password\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\" class=\"{{ class }}\">\n{% endblock %}\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Remove label blocks from email.twig and password.twig
95,168
16.11.2018 15:39:42
-3,600
83ca9c2e8c017701c66e19a99b349282574020ec
Update _label.twig template and label Vue component
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/_Partials/Label.vue", "new_path": "assets/js/app/editor/Components/Editor/_Partials/Label.vue", "diff": "<template>\n- <label for=\"\">{{label}}</label>\n+ <label :for=\"forlabel\">{{label}}</label>\n</template>\n<script>\nexport default {\nname: \"editor-label\",\n- props: ['label']\n+ props: ['label', 'forlabel']\n};\n</script>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/_partials/_label.twig", "new_path": "templates/editcontent/fields/_partials/_label.twig", "diff": "{% block label %}\n{% if type != 'checkbox' %}\n- <editor-label label=\"{{ label }}\"></editor-label>\n+ <editor-label forlabel=\"{{ id }}\" label=\"{{ label }}\"></editor-label>\n{% endif %}\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Update _label.twig template and label Vue component
95,168
16.11.2018 15:58:46
-3,600
a21b4e73b6952d5233bc05ee412ea50fd6cb9ceb
Add id attribute to text input fields
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Editor/Text/Text.vue", "new_path": "assets/js/app/editor/Components/Editor/Text/Text.vue", "diff": "<template>\n<div>\n<input\n+ :id=\"id\"\nclass=\"form-control\"\n:class=\"getType\"\n:name=\"name\"\n@@ -17,7 +18,7 @@ import field from '../../../mixins/value';\nexport default {\nname: \"editor-text\",\n- props: ['value', 'label', 'name', 'type', 'disabled'],\n+ props: ['value', 'label', 'name', 'type', 'disabled', 'id'],\nmixins: [field],\nmounted() {\nthis.$root.$on('generate-from-title', data => this.generate = data);\n" }, { "change_type": "MODIFY", "old_path": "templates/editcontent/fields/text.twig", "new_path": "templates/editcontent/fields/text.twig", "diff": "{% block field %}\n<editor-text\n+ :id=\"'{{ id }}'\"\n:value=\"{{ value|json_encode() }}\"\n:name=\"'{{ name }}'\"\n:type=\"'{{ class }}'\"\n" } ]
PHP
MIT License
bolt/core
Add id attribute to text input fields