From 5c4961748bf1f475c8f07ef0e05f351071dff7e1 Mon Sep 17 00:00:00 2001 From: Arnaud Fornerot Date: Thu, 21 Jul 2022 16:15:47 +0200 Subject: [PATCH] first commit symfony 6 --- .env | 119 + .gitignore | 27 + assets/app.js | 51 + assets/bootstrap.js | 11 + .../html5video/dialogs/html5video.js | 259 + .../ckplugins/html5video/icons/html5video.png | Bin 0 -> 14773 bytes assets/ckplugins/html5video/lang/bg.js | 20 + assets/ckplugins/html5video/lang/ca.js | 20 + assets/ckplugins/html5video/lang/de.js | 17 + assets/ckplugins/html5video/lang/en.js | 20 + assets/ckplugins/html5video/lang/es.js | 18 + assets/ckplugins/html5video/lang/eu.js | 17 + assets/ckplugins/html5video/lang/fa.js | 18 + assets/ckplugins/html5video/lang/fr.js | 17 + assets/ckplugins/html5video/lang/he.js | 18 + assets/ckplugins/html5video/lang/ko.js | 20 + assets/ckplugins/html5video/lang/pl.js | 18 + assets/ckplugins/html5video/lang/pt-br.js | 18 + assets/ckplugins/html5video/lang/pt.js | 18 + assets/ckplugins/html5video/lang/ru.js | 21 + assets/ckplugins/html5video/lang/uk.js | 17 + assets/ckplugins/html5video/lang/uz.js | 17 + assets/ckplugins/html5video/lang/zh-cn.js | 18 + assets/ckplugins/html5video/plugin.js | 196 + assets/ckplugins/youtube/images/icon-hdpi.png | Bin 0 -> 1258 bytes assets/ckplugins/youtube/images/icon.png | Bin 0 -> 1165 bytes assets/ckplugins/youtube/lang/ar.js | 24 + assets/ckplugins/youtube/lang/bg.js | 25 + assets/ckplugins/youtube/lang/cs.js | 25 + assets/ckplugins/youtube/lang/de.js | 24 + assets/ckplugins/youtube/lang/el.js | 23 + assets/ckplugins/youtube/lang/en.js | 25 + assets/ckplugins/youtube/lang/es.js | 24 + assets/ckplugins/youtube/lang/et.js | 24 + assets/ckplugins/youtube/lang/eu.js | 25 + assets/ckplugins/youtube/lang/fi.js | 24 + assets/ckplugins/youtube/lang/fr.js | 25 + assets/ckplugins/youtube/lang/he.js | 24 + assets/ckplugins/youtube/lang/hu.js | 25 + assets/ckplugins/youtube/lang/it.js | 24 + assets/ckplugins/youtube/lang/ja.js | 24 + assets/ckplugins/youtube/lang/ko.js | 25 + assets/ckplugins/youtube/lang/nb.js | 24 + assets/ckplugins/youtube/lang/nl.js | 25 + assets/ckplugins/youtube/lang/nn.js | 24 + assets/ckplugins/youtube/lang/pl.js | 24 + assets/ckplugins/youtube/lang/pt-br.js | 25 + assets/ckplugins/youtube/lang/pt.js | 25 + assets/ckplugins/youtube/lang/ru.js | 25 + assets/ckplugins/youtube/lang/sk.js | 24 + assets/ckplugins/youtube/lang/tr.js | 24 + assets/ckplugins/youtube/lang/uk.js | 25 + assets/ckplugins/youtube/lang/vi.js | 24 + assets/ckplugins/youtube/lang/zh.js | 24 + assets/ckplugins/youtube/plugin.js | 449 + assets/controllers.json | 4 + assets/controllers/hello_controller.js | 16 + assets/dropzone.js | 19 + assets/fonts/ABeeZee-Regular.ttf | Bin 0 -> 43748 bytes assets/fonts/Acme-Regular-webfont.ttf | Bin 0 -> 36096 bytes assets/fonts/AlfaSlabOne-Regular.ttf | Bin 0 -> 92320 bytes assets/fonts/Anton-Regular.ttf | Bin 0 -> 74560 bytes assets/fonts/Baloo-Regular.ttf | Bin 0 -> 626588 bytes assets/fonts/Bebas-webfont.ttf | Bin 0 -> 25168 bytes assets/fonts/CarterOne-Regular.ttf | Bin 0 -> 64792 bytes assets/fonts/Chewy-Regular.ttf | Bin 0 -> 40212 bytes assets/fonts/Courgette-Regular.ttf | Bin 0 -> 118784 bytes assets/fonts/FredokaOne-Regular.ttf | Bin 0 -> 42152 bytes assets/fonts/Grandstander-Black.ttf | Bin 0 -> 104636 bytes .../fonts/Justanotherhand-Regular-webfont.ttf | Bin 0 -> 80132 bytes assets/fonts/Lato-Regular.ttf | Bin 0 -> 120196 bytes assets/fonts/LexendDeca-Regular.ttf | Bin 0 -> 67740 bytes assets/fonts/LuckiestGuy-Regular.ttf | Bin 0 -> 57940 bytes assets/fonts/Overpass-Black.ttf | Bin 0 -> 108224 bytes assets/fonts/PassionOne-Regular.ttf | Bin 0 -> 23076 bytes assets/fonts/Peacesans-webfont.ttf | Bin 0 -> 52576 bytes assets/fonts/Redressed-webfont.ttf | Bin 0 -> 61256 bytes assets/fonts/Righteous-Regular.ttf | Bin 0 -> 40348 bytes assets/fonts/Roboto-Regular-webfont.ttf | Bin 0 -> 34524 bytes assets/fonts/RubikMonoOne-Regular.ttf | Bin 0 -> 117136 bytes assets/fonts/SigmarOne-Regular.ttf | Bin 0 -> 166448 bytes assets/fonts/Signika-Regular.ttf | Bin 0 -> 111224 bytes assets/fonts/Snickles-webfont.ttf | Bin 0 -> 27800 bytes assets/fonts/Teko-Bold.ttf | Bin 0 -> 282300 bytes assets/fonts/Viga-Regular.ttf | Bin 0 -> 25524 bytes assets/fonts/theboldfont.ttf | Bin 0 -> 42968 bytes assets/js/app.js | 62 + assets/js/datatables.init.js | 30 + assets/styles/app.css | 203 + assets/styles/font.css | 181 + bin/console | 17 + bin/phpunit | 19 + composer.json | 124 + composer.lock | 12883 ++++++++++++++++ config/bundles.php | 24 + config/packages/cache.yaml | 19 + config/packages/debug.yaml | 5 + config/packages/doctrine.yaml | 42 + config/packages/doctrine_migrations.yaml | 6 + config/packages/fos_ckeditor.yaml | 37 + config/packages/fos_rest.yaml | 11 + config/packages/framework.yaml | 26 + config/packages/lock.yaml | 2 + config/packages/mailer.yaml | 3 + config/packages/mercure.yaml | 8 + config/packages/messenger.yaml | 24 + config/packages/monolog.yaml | 61 + config/packages/nelmio_api_doc.yaml | 9 + config/packages/notifier.yaml | 16 + config/packages/oneup_uploader.yaml | 17 + config/packages/routing.yaml | 12 + config/packages/security.yaml | 50 + config/packages/sensio_framework_extra.yaml | 3 + config/packages/sentry.yaml | 20 + config/packages/translation.yaml | 13 + config/packages/twig.yaml | 21 + config/packages/validator.yaml | 13 + config/packages/web_profiler.yaml | 15 + config/packages/webpack_encore.yaml | 49 + config/preload.php | 5 + config/routes.yaml | 575 + config/routes/annotations.yaml | 4 + config/routes/framework.yaml | 4 + config/routes/nelmio_api_doc.yaml | 7 + config/routes/oneup_uploader.yaml | 3 + config/routes/web_profiler.yaml | 8 + config/services.yaml | 201 + docker-compose.yml | 41 + migrations/.gitignore | 0 migrations/Version20220721140447.php | 122 + package.json | 33 + phpunit.xml.dist | 56 + public/index.php | 9 + public/uploads/avatar/62d94b338f0be.jpg | Bin 0 -> 118261 bytes public/uploads/avatar/62d94b6d7157b.jpg | Bin 0 -> 92559 bytes public/uploads/avatar/62d94b8011c67.jpg | Bin 0 -> 143185 bytes public/uploads/avatar/62d94b95bab62.jpg | Bin 0 -> 91547 bytes public/uploads/avatar/admin.jpg | Bin 0 -> 4039 bytes public/uploads/avatar/noavatar.png | Bin 0 -> 936 bytes public/uploads/avatar/system.jpg | Bin 0 -> 1080 bytes public/uploads/avatar/thumb_62d94b338f0be.jpg | Bin 0 -> 118218 bytes public/uploads/avatar/thumb_62d94b6d7157b.jpg | Bin 0 -> 86643 bytes public/uploads/avatar/thumb_62d94b8011c67.jpg | Bin 0 -> 140014 bytes public/uploads/avatar/thumb_62d94b95bab62.jpg | Bin 0 -> 57471 bytes public/uploads/ckeditor/62add89fdf769.png | Bin 0 -> 379892 bytes public/uploads/ckeditor/62add922193b2.png | Bin 0 -> 347092 bytes public/uploads/header/62b422b1cd4ae.jpg | Bin 0 -> 77831 bytes public/uploads/header/62b42431194a5.jpg | Bin 0 -> 240546 bytes public/uploads/header/62b4681237b95.jpg | Bin 0 -> 218181 bytes public/uploads/header/62b4689c05267.jpg | Bin 0 -> 191498 bytes public/uploads/header/62b4692c299b3.jpg | Bin 0 -> 240613 bytes public/uploads/header/62b46960ec996.jpg | Bin 0 -> 176734 bytes public/uploads/header/62b4699658fd6.jpg | Bin 0 -> 240617 bytes public/uploads/header/62bd9632694cd.jpeg | Bin 0 -> 366926 bytes public/uploads/header/62c2a1e53a85c.jpg | Bin 0 -> 403795 bytes public/uploads/header/header.jpg | Bin 0 -> 82776 bytes public/uploads/header/thumb_62b4692c299b3.jpg | Bin 0 -> 72203 bytes public/uploads/header/thumb_62b4699658fd6.jpg | Bin 0 -> 66619 bytes .../uploads/header/thumb_62bd9632694cd.jpeg | Bin 0 -> 44824 bytes public/uploads/header/thumb_62c2a1e53a85c.jpg | Bin 0 -> 78505 bytes public/uploads/logo/62adf551bf817.png | Bin 0 -> 342344 bytes public/uploads/logo/62b41820565ce.png | Bin 0 -> 80198 bytes public/uploads/logo/62b41a40d94e8.png | Bin 0 -> 80198 bytes public/uploads/logo/62b41adf71457.png | Bin 0 -> 8263 bytes public/uploads/logo/62bd95ef74702.jpg | Bin 0 -> 41080 bytes public/uploads/logo/62c2a1b22799d.png | Bin 0 -> 5525 bytes public/uploads/logo/logo.png | Bin 0 -> 14180 bytes src/Command/CleanCommand.php | 102 + src/Command/CleanRegistrationCommand.php | 81 + src/Command/CronCommand.php | 136 + src/Command/InitCommand.php | 571 + src/Command/SetPasswordCommand.php | 83 + src/Command/SynchroCommand.php | 912 ++ src/Controller/.gitignore | 0 src/Controller/ConfigController.php | 85 + src/Controller/CronController.php | 184 + src/Controller/CropController.php | 244 + src/Controller/GroupController.php | 827 + src/Controller/HomeController.php | 81 + src/Controller/Niveau01Controller.php | 198 + src/Controller/Niveau02Controller.php | 326 + src/Controller/PublishController.php | 27 + src/Controller/RegistrationController.php | 737 + src/Controller/RestController.php | 468 + src/Controller/SecurityController.php | 496 + src/Controller/UserController.php | 670 + src/Controller/WhitelistController.php | 199 + src/Entity/.gitignore | 0 src/Entity/Config.php | 227 + src/Entity/Cron.php | 210 + src/Entity/Group.php | 268 + src/Entity/Niveau01.php | 292 + src/Entity/Niveau02.php | 169 + src/Entity/Registration.php | 416 + src/Entity/User.php | 626 + src/Entity/UserGroup.php | 132 + src/Entity/UserModo.php | 62 + src/Entity/Whitelist.php | 45 + src/EventListener/AllSubscriber.php | 28 + src/EventListener/GroupSubscriber.php | 138 + src/EventListener/Niveau01Subscriber.php | 118 + src/EventListener/Niveau02Subscriber.php | 112 + src/EventListener/UserGroupSubscriber.php | 67 + src/EventListener/UserSubscriber.php | 126 + src/Form/ConfigType.php | 189 + src/Form/CronType.php | 66 + src/Form/GroupType.php | 142 + src/Form/LoginType.php | 37 + src/Form/Niveau01Type.php | 81 + src/Form/Niveau02Type.php | 70 + src/Form/RegistrationType.php | 212 + src/Form/ResetpwdType.php | 55 + src/Form/UserType.php | 232 + src/Form/WhitelistType.php | 35 + src/Kernel.php | 11 + src/Repository/.gitignore | 0 src/Repository/ConfigRepository.php | 33 + src/Repository/CronRepository.php | 51 + src/Repository/GroupRepository.php | 98 + src/Repository/Niveau01Repository.php | 83 + src/Repository/Niveau02Repository.php | 33 + src/Repository/RegistrationRepository.php | 33 + src/Repository/StatisticRepository.php | 33 + src/Repository/UserGroupRepository.php | 33 + src/Repository/UserRepository.php | 33 + src/Service/ApiService.php | 89 + src/Service/AppSession.php | 155 + src/Service/LdapService.php | 841 + src/Service/MailService.php | 57 + src/Service/PasswordEncoder.php | 36 + src/Service/UploadListener.php | 87 + src/Twig/AppExtension.php | 31 + src/Validator/Grouplabel.php | 12 + src/Validator/GrouplabelValidator.php | 29 + src/Validator/Niveau01unique.php | 13 + src/Validator/Niveau01uniqueValidator.php | 32 + src/Validator/Niveau02unique.php | 13 + src/Validator/Niveau02uniqueValidator.php | 32 + src/Validator/Password.php | 12 + src/Validator/PasswordValidator.php | 29 + src/Validator/Userusername.php | 13 + src/Validator/UserusernameValidator.php | 41 + symfony.lock | 378 + templates/Config/edit.html.twig | 94 + templates/Config/list.html.twig | 66 + templates/Config/logo.html.twig | 35 + templates/Config/render.html.twig | 85 + templates/Cron/edit.html.twig | 58 + templates/Cron/list.html.twig | 47 + templates/Cron/logs.html.twig | 16 + templates/Crop/crop01.html.twig | 36 + templates/Crop/crop02.html.twig | 125 + templates/Form/fields.html.twig | 124 + templates/Group/edit.html.twig | 98 + templates/Group/list.html.twig | 47 + templates/Group/users.html.twig | 161 + templates/Home/docrest.html.twig | 18 + templates/Home/home.html.twig | 82 + templates/Home/loginLDAP.html.twig | 36 + templates/Home/loginSQL.html.twig | 46 + templates/Home/mail.html.twig | 9 + templates/Include/sidebaradmin.html.twig | 105 + templates/Include/sidebarmodo.html.twig | 64 + templates/Include/style.css.twig | 24 + templates/Niveau01/edit.html.twig | 120 + templates/Niveau01/list.html.twig | 47 + templates/Niveau02/edit.html.twig | 60 + templates/Niveau02/list.html.twig | 41 + templates/Registration/edit.html.twig | 222 + templates/Registration/info.html.twig | 33 + templates/Registration/list.html.twig | 44 + templates/Registration/resetpwd01.html.twig | 54 + templates/Registration/resetpwd02.html.twig | 62 + templates/User/edit.html.twig | 482 + templates/User/list.html.twig | 64 + templates/Whitelist/edit.html.twig | 54 + templates/Whitelist/list.html.twig | 42 + templates/base.html.twig | 194 + tests/bootstrap.php | 11 + translations/.gitignore | 0 webpack.config.js | 89 + yarn.lock | 4325 ++++++ 282 files changed, 37482 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 assets/app.js create mode 100644 assets/bootstrap.js create mode 100644 assets/ckplugins/html5video/dialogs/html5video.js create mode 100644 assets/ckplugins/html5video/icons/html5video.png create mode 100644 assets/ckplugins/html5video/lang/bg.js create mode 100644 assets/ckplugins/html5video/lang/ca.js create mode 100644 assets/ckplugins/html5video/lang/de.js create mode 100644 assets/ckplugins/html5video/lang/en.js create mode 100644 assets/ckplugins/html5video/lang/es.js create mode 100644 assets/ckplugins/html5video/lang/eu.js create mode 100644 assets/ckplugins/html5video/lang/fa.js create mode 100644 assets/ckplugins/html5video/lang/fr.js create mode 100644 assets/ckplugins/html5video/lang/he.js create mode 100644 assets/ckplugins/html5video/lang/ko.js create mode 100644 assets/ckplugins/html5video/lang/pl.js create mode 100644 assets/ckplugins/html5video/lang/pt-br.js create mode 100644 assets/ckplugins/html5video/lang/pt.js create mode 100644 assets/ckplugins/html5video/lang/ru.js create mode 100644 assets/ckplugins/html5video/lang/uk.js create mode 100644 assets/ckplugins/html5video/lang/uz.js create mode 100644 assets/ckplugins/html5video/lang/zh-cn.js create mode 100644 assets/ckplugins/html5video/plugin.js create mode 100644 assets/ckplugins/youtube/images/icon-hdpi.png create mode 100644 assets/ckplugins/youtube/images/icon.png create mode 100644 assets/ckplugins/youtube/lang/ar.js create mode 100644 assets/ckplugins/youtube/lang/bg.js create mode 100644 assets/ckplugins/youtube/lang/cs.js create mode 100644 assets/ckplugins/youtube/lang/de.js create mode 100644 assets/ckplugins/youtube/lang/el.js create mode 100644 assets/ckplugins/youtube/lang/en.js create mode 100644 assets/ckplugins/youtube/lang/es.js create mode 100644 assets/ckplugins/youtube/lang/et.js create mode 100644 assets/ckplugins/youtube/lang/eu.js create mode 100644 assets/ckplugins/youtube/lang/fi.js create mode 100644 assets/ckplugins/youtube/lang/fr.js create mode 100644 assets/ckplugins/youtube/lang/he.js create mode 100644 assets/ckplugins/youtube/lang/hu.js create mode 100644 assets/ckplugins/youtube/lang/it.js create mode 100644 assets/ckplugins/youtube/lang/ja.js create mode 100644 assets/ckplugins/youtube/lang/ko.js create mode 100644 assets/ckplugins/youtube/lang/nb.js create mode 100644 assets/ckplugins/youtube/lang/nl.js create mode 100644 assets/ckplugins/youtube/lang/nn.js create mode 100644 assets/ckplugins/youtube/lang/pl.js create mode 100644 assets/ckplugins/youtube/lang/pt-br.js create mode 100644 assets/ckplugins/youtube/lang/pt.js create mode 100644 assets/ckplugins/youtube/lang/ru.js create mode 100644 assets/ckplugins/youtube/lang/sk.js create mode 100644 assets/ckplugins/youtube/lang/tr.js create mode 100644 assets/ckplugins/youtube/lang/uk.js create mode 100644 assets/ckplugins/youtube/lang/vi.js create mode 100644 assets/ckplugins/youtube/lang/zh.js create mode 100644 assets/ckplugins/youtube/plugin.js create mode 100644 assets/controllers.json create mode 100644 assets/controllers/hello_controller.js create mode 100644 assets/dropzone.js create mode 100644 assets/fonts/ABeeZee-Regular.ttf create mode 100644 assets/fonts/Acme-Regular-webfont.ttf create mode 100644 assets/fonts/AlfaSlabOne-Regular.ttf create mode 100644 assets/fonts/Anton-Regular.ttf create mode 100644 assets/fonts/Baloo-Regular.ttf create mode 100644 assets/fonts/Bebas-webfont.ttf create mode 100644 assets/fonts/CarterOne-Regular.ttf create mode 100644 assets/fonts/Chewy-Regular.ttf create mode 100644 assets/fonts/Courgette-Regular.ttf create mode 100644 assets/fonts/FredokaOne-Regular.ttf create mode 100644 assets/fonts/Grandstander-Black.ttf create mode 100644 assets/fonts/Justanotherhand-Regular-webfont.ttf create mode 100644 assets/fonts/Lato-Regular.ttf create mode 100644 assets/fonts/LexendDeca-Regular.ttf create mode 100644 assets/fonts/LuckiestGuy-Regular.ttf create mode 100644 assets/fonts/Overpass-Black.ttf create mode 100644 assets/fonts/PassionOne-Regular.ttf create mode 100644 assets/fonts/Peacesans-webfont.ttf create mode 100644 assets/fonts/Redressed-webfont.ttf create mode 100644 assets/fonts/Righteous-Regular.ttf create mode 100644 assets/fonts/Roboto-Regular-webfont.ttf create mode 100644 assets/fonts/RubikMonoOne-Regular.ttf create mode 100644 assets/fonts/SigmarOne-Regular.ttf create mode 100644 assets/fonts/Signika-Regular.ttf create mode 100644 assets/fonts/Snickles-webfont.ttf create mode 100644 assets/fonts/Teko-Bold.ttf create mode 100644 assets/fonts/Viga-Regular.ttf create mode 100644 assets/fonts/theboldfont.ttf create mode 100644 assets/js/app.js create mode 100644 assets/js/datatables.init.js create mode 100644 assets/styles/app.css create mode 100644 assets/styles/font.css create mode 100755 bin/console create mode 100755 bin/phpunit create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 config/bundles.php create mode 100644 config/packages/cache.yaml create mode 100644 config/packages/debug.yaml create mode 100644 config/packages/doctrine.yaml create mode 100644 config/packages/doctrine_migrations.yaml create mode 100644 config/packages/fos_ckeditor.yaml create mode 100644 config/packages/fos_rest.yaml create mode 100644 config/packages/framework.yaml create mode 100644 config/packages/lock.yaml create mode 100644 config/packages/mailer.yaml create mode 100644 config/packages/mercure.yaml create mode 100644 config/packages/messenger.yaml create mode 100644 config/packages/monolog.yaml create mode 100644 config/packages/nelmio_api_doc.yaml create mode 100644 config/packages/notifier.yaml create mode 100644 config/packages/oneup_uploader.yaml create mode 100644 config/packages/routing.yaml create mode 100644 config/packages/security.yaml create mode 100644 config/packages/sensio_framework_extra.yaml create mode 100644 config/packages/sentry.yaml create mode 100644 config/packages/translation.yaml create mode 100644 config/packages/twig.yaml create mode 100644 config/packages/validator.yaml create mode 100644 config/packages/web_profiler.yaml create mode 100644 config/packages/webpack_encore.yaml create mode 100644 config/preload.php create mode 100644 config/routes.yaml create mode 100644 config/routes/annotations.yaml create mode 100644 config/routes/framework.yaml create mode 100644 config/routes/nelmio_api_doc.yaml create mode 100644 config/routes/oneup_uploader.yaml create mode 100644 config/routes/web_profiler.yaml create mode 100644 config/services.yaml create mode 100644 docker-compose.yml create mode 100644 migrations/.gitignore create mode 100644 migrations/Version20220721140447.php create mode 100644 package.json create mode 100644 phpunit.xml.dist create mode 100644 public/index.php create mode 100644 public/uploads/avatar/62d94b338f0be.jpg create mode 100644 public/uploads/avatar/62d94b6d7157b.jpg create mode 100644 public/uploads/avatar/62d94b8011c67.jpg create mode 100644 public/uploads/avatar/62d94b95bab62.jpg create mode 100644 public/uploads/avatar/admin.jpg create mode 100644 public/uploads/avatar/noavatar.png create mode 100644 public/uploads/avatar/system.jpg create mode 100644 public/uploads/avatar/thumb_62d94b338f0be.jpg create mode 100644 public/uploads/avatar/thumb_62d94b6d7157b.jpg create mode 100644 public/uploads/avatar/thumb_62d94b8011c67.jpg create mode 100644 public/uploads/avatar/thumb_62d94b95bab62.jpg create mode 100644 public/uploads/ckeditor/62add89fdf769.png create mode 100644 public/uploads/ckeditor/62add922193b2.png create mode 100644 public/uploads/header/62b422b1cd4ae.jpg create mode 100644 public/uploads/header/62b42431194a5.jpg create mode 100644 public/uploads/header/62b4681237b95.jpg create mode 100644 public/uploads/header/62b4689c05267.jpg create mode 100644 public/uploads/header/62b4692c299b3.jpg create mode 100644 public/uploads/header/62b46960ec996.jpg create mode 100644 public/uploads/header/62b4699658fd6.jpg create mode 100644 public/uploads/header/62bd9632694cd.jpeg create mode 100644 public/uploads/header/62c2a1e53a85c.jpg create mode 100644 public/uploads/header/header.jpg create mode 100644 public/uploads/header/thumb_62b4692c299b3.jpg create mode 100644 public/uploads/header/thumb_62b4699658fd6.jpg create mode 100644 public/uploads/header/thumb_62bd9632694cd.jpeg create mode 100644 public/uploads/header/thumb_62c2a1e53a85c.jpg create mode 100644 public/uploads/logo/62adf551bf817.png create mode 100644 public/uploads/logo/62b41820565ce.png create mode 100644 public/uploads/logo/62b41a40d94e8.png create mode 100644 public/uploads/logo/62b41adf71457.png create mode 100644 public/uploads/logo/62bd95ef74702.jpg create mode 100644 public/uploads/logo/62c2a1b22799d.png create mode 100644 public/uploads/logo/logo.png create mode 100644 src/Command/CleanCommand.php create mode 100644 src/Command/CleanRegistrationCommand.php create mode 100644 src/Command/CronCommand.php create mode 100644 src/Command/InitCommand.php create mode 100644 src/Command/SetPasswordCommand.php create mode 100644 src/Command/SynchroCommand.php create mode 100644 src/Controller/.gitignore create mode 100644 src/Controller/ConfigController.php create mode 100644 src/Controller/CronController.php create mode 100644 src/Controller/CropController.php create mode 100644 src/Controller/GroupController.php create mode 100644 src/Controller/HomeController.php create mode 100644 src/Controller/Niveau01Controller.php create mode 100644 src/Controller/Niveau02Controller.php create mode 100644 src/Controller/PublishController.php create mode 100755 src/Controller/RegistrationController.php create mode 100644 src/Controller/RestController.php create mode 100755 src/Controller/SecurityController.php create mode 100644 src/Controller/UserController.php create mode 100644 src/Controller/WhitelistController.php create mode 100644 src/Entity/.gitignore create mode 100644 src/Entity/Config.php create mode 100644 src/Entity/Cron.php create mode 100644 src/Entity/Group.php create mode 100644 src/Entity/Niveau01.php create mode 100644 src/Entity/Niveau02.php create mode 100644 src/Entity/Registration.php create mode 100644 src/Entity/User.php create mode 100644 src/Entity/UserGroup.php create mode 100644 src/Entity/UserModo.php create mode 100644 src/Entity/Whitelist.php create mode 100644 src/EventListener/AllSubscriber.php create mode 100644 src/EventListener/GroupSubscriber.php create mode 100644 src/EventListener/Niveau01Subscriber.php create mode 100644 src/EventListener/Niveau02Subscriber.php create mode 100644 src/EventListener/UserGroupSubscriber.php create mode 100644 src/EventListener/UserSubscriber.php create mode 100644 src/Form/ConfigType.php create mode 100644 src/Form/CronType.php create mode 100644 src/Form/GroupType.php create mode 100644 src/Form/LoginType.php create mode 100644 src/Form/Niveau01Type.php create mode 100644 src/Form/Niveau02Type.php create mode 100644 src/Form/RegistrationType.php create mode 100644 src/Form/ResetpwdType.php create mode 100644 src/Form/UserType.php create mode 100644 src/Form/WhitelistType.php create mode 100644 src/Kernel.php create mode 100644 src/Repository/.gitignore create mode 100644 src/Repository/ConfigRepository.php create mode 100644 src/Repository/CronRepository.php create mode 100644 src/Repository/GroupRepository.php create mode 100644 src/Repository/Niveau01Repository.php create mode 100644 src/Repository/Niveau02Repository.php create mode 100644 src/Repository/RegistrationRepository.php create mode 100644 src/Repository/StatisticRepository.php create mode 100644 src/Repository/UserGroupRepository.php create mode 100644 src/Repository/UserRepository.php create mode 100644 src/Service/ApiService.php create mode 100644 src/Service/AppSession.php create mode 100644 src/Service/LdapService.php create mode 100644 src/Service/MailService.php create mode 100644 src/Service/PasswordEncoder.php create mode 100644 src/Service/UploadListener.php create mode 100644 src/Twig/AppExtension.php create mode 100644 src/Validator/Grouplabel.php create mode 100644 src/Validator/GrouplabelValidator.php create mode 100644 src/Validator/Niveau01unique.php create mode 100644 src/Validator/Niveau01uniqueValidator.php create mode 100644 src/Validator/Niveau02unique.php create mode 100644 src/Validator/Niveau02uniqueValidator.php create mode 100644 src/Validator/Password.php create mode 100644 src/Validator/PasswordValidator.php create mode 100644 src/Validator/Userusername.php create mode 100644 src/Validator/UserusernameValidator.php create mode 100644 symfony.lock create mode 100755 templates/Config/edit.html.twig create mode 100644 templates/Config/list.html.twig create mode 100644 templates/Config/logo.html.twig create mode 100644 templates/Config/render.html.twig create mode 100644 templates/Cron/edit.html.twig create mode 100644 templates/Cron/list.html.twig create mode 100644 templates/Cron/logs.html.twig create mode 100644 templates/Crop/crop01.html.twig create mode 100644 templates/Crop/crop02.html.twig create mode 100644 templates/Form/fields.html.twig create mode 100755 templates/Group/edit.html.twig create mode 100644 templates/Group/list.html.twig create mode 100644 templates/Group/users.html.twig create mode 100644 templates/Home/docrest.html.twig create mode 100644 templates/Home/home.html.twig create mode 100755 templates/Home/loginLDAP.html.twig create mode 100755 templates/Home/loginSQL.html.twig create mode 100644 templates/Home/mail.html.twig create mode 100644 templates/Include/sidebaradmin.html.twig create mode 100644 templates/Include/sidebarmodo.html.twig create mode 100644 templates/Include/style.css.twig create mode 100755 templates/Niveau01/edit.html.twig create mode 100644 templates/Niveau01/list.html.twig create mode 100755 templates/Niveau02/edit.html.twig create mode 100644 templates/Niveau02/list.html.twig create mode 100755 templates/Registration/edit.html.twig create mode 100644 templates/Registration/info.html.twig create mode 100644 templates/Registration/list.html.twig create mode 100755 templates/Registration/resetpwd01.html.twig create mode 100755 templates/Registration/resetpwd02.html.twig create mode 100755 templates/User/edit.html.twig create mode 100644 templates/User/list.html.twig create mode 100755 templates/Whitelist/edit.html.twig create mode 100644 templates/Whitelist/list.html.twig create mode 100644 templates/base.html.twig create mode 100644 tests/bootstrap.php create mode 100644 translations/.gitignore create mode 100644 webpack.config.js create mode 100644 yarn.lock diff --git a/.env b/.env new file mode 100644 index 0000000..97c5fee --- /dev/null +++ b/.env @@ -0,0 +1,119 @@ +# Symfony +APP_ENV=prod +APP_SECRET=changeme + +# Messenger +MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 + +# Database +DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/app?serverVersion=13&charset=utf8" + +# Mailer +MAILER_METHOD=smtp +MAILER_DSN=smtp://127.0.0.1:1025 +MAILER_NOREPLY=noreply@noreply.fr + +# Basic +APP_WEBURL= +APP_MASTERIDENTITY=SQL # SQL | SSO à faire | LDAP +APP_AUTH=SQL # SQL | CAS à faire | LDAP | OPENID | SAML +APP_ALIAS=/ +APP_NAME=Nineskeletor +APP_MASTERURL= +APP_MASTERKEY= +APP_MODEREGISTRATION= # null | BYADMIN | BYUSER +APP_ADMINS='["admin"]' +APP_NIVEAU01LABEL="Niveau 01" +APP_NIVEAU02LABEL="Niveau 02" + +# Synchronisation +APP_SYNCHRO= # Synchronisation null | LDAP2NINE | NINE2LDAP | NINE2NINE +APP_SYNDCHROPURGENIVEAU01=1 # Purger les niveau01s obsolète en cas de synchronisation +APP_SYNDCHROPURGENIVEAU02=1 # Purger les niveau02s obsolète en cas de synchronisation +APP_SYNDCHROPURGEGROUP=1 # Purger les groups obsolète en cas de synchronisation +APP_SYNDCHROPURGEUSER=1 # Purger les groups obsolète en cas de synchronisation + +# LDAP +LDAP_HOST= # host du serveur ldap +LDAP_PORT= # port du serveur ldap +LDAP_USETLS=0 # connection TLS 0/1 +LDAP_USERWRITER=0 # LDAP_USER compte writer ? 0/1 +LDAP_USER= # DN compte access ldap +LDAP_PASSWORD= # Password comte access ldap +LDAP_BASEDN= # Base DN ex:o=gouv,c=fr +LDAP_BASEORGANISATION= # Base Organisation ex:ou=nine,o=gouv,c=fr +LDAP_BASENIVEAU01= # Base Niveau01 ex:ou=niveau01,ou=nine,o=gouv,c=fr +LDAP_BASENIVEAU02= # Base Niveau02 ex:ou=niveau02,ou=nine,o=gouv,c=fr +LDAP_BASEGROUP= # Base Group ex:ou=groups,ou=nine,o=gouv,c=fr +LDAP_BASEUSER= # Base User ex:ou=users,ou=nine,o=gouv,c=fr +LDAP_USERNAME=uid # Attribut id d'un user +LDAP_FIRSTNAME=givenname # Attribut firstname d'un user +LDAP_LASTNAME=sn # Attribut lastname d'un user +LDAP_EMAIL=mail # Attribut email d'un user +LDAP_AVATAR= # Attribut avatar d'un user +LDAP_MEMBEROF=memberof # Attribut memberof d'un user +LDAP_GROUPGID=gidnumber # Attribut gid d'un groupe +LDAP_GROUPNAME=cn # Attribut name d'un groupe +LDAP_GROUPMEMBER=memberuid # Attribut stockant les membres d'un groupe +LDAP_GROUPMEMBERISDN=0 # LDAP_GROUPMEMBER stocke un uid ou un dn ? 0/1 +LDAP_FILTERGROUP=(cn=*) # requete ldap pour rechercher les groupes +LDAP_FILTERUSER=(uid=*) # requete ldap pour rechercher les users + +# If APP_AUTH = CAS +CAS_HOST= +CAS_PORT= +CAS_PATH= +CAS_USERNAME=username +CAS_EMAIL=email +CAS_LASTNAME=lastname +CAS_FIRSTNAME=firstname +CAS_AVATAR= +CAS_NIVEAU01= +CAS_GROUP= + +# If APP_AUTH = OPENID +OAUTH_CLIENTID= +OAUTH_CLIENTSECRET= +OAUTH_LOGINURL= +OAUTH_LOGOUTURL= +OAUTH_TOKENURL= +OAUTH_USERINFO= +OAUTH_USERNAME=username +OAUTH_EMAIL=email +OAUTH_LASTNAME=lastname +OAUTH_FIRSTNAME=firstname +OAUTH_AVATAR= +OAUTH_NIVEAU01= +OAUTH_GROUP= + +# IF APP_SYNCHRO=NINE2NINE +NINE_URL= +NINE_SECRET= + +# If APP_MODEREGISTRATION != NULL +APP_MODEREGISTRATIONTERM=6 # Temps en heure de la durée de validité de l'inscription + +# Proxy +PROXY_USE=0 +PROXY_HOST= +PROXY_PORT= + +# Sonde statistic +SONDE_USE=0 +SONDE_URL= + +# Mercure +MERCURE_URL=https://example.com/.well-known/mercure +MERCURE_PUBLIC_URL=https://example.com/.well-known/mercure +MERCURE_JWT_SECRET="!ChangeMe!" + +# Messenger +# MESSENGER_TRANSPORT_DSN=doctrine://default +# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages +# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages + +# Lock +LOCK_DSN="postgresql://symfony:ChangeMe@127.0.0.1:5432/app?serverVersion=13&charset=utf8" + +# Sentry +SENTRY_DSN= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b072513 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ +/vendor/ +###< symfony/framework-bundle ### + +###> symfony/webpack-encore-bundle ### +/node_modules/ +/public/build/ +npm-debug.log +yarn-error.log +###< symfony/webpack-encore-bundle ### + +###> phpunit/phpunit ### +/phpunit.xml +.phpunit.result.cache +###< phpunit/phpunit ### + +###> symfony/phpunit-bridge ### +.phpunit.result.cache +/phpunit.xml +###< symfony/phpunit-bridge ### diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..32bdd24 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,51 @@ +// JQuery +window.$ = window.jQuery = require('jquery'); + +// JQueryui +require('jquery-ui'); + +// Bootstrap +require('bootstrap'); +require('bootstrap/dist/css/bootstrap.css'); + +// Fontawesome +require('@fortawesome/fontawesome-free/css/all.css'); + +// Datatables +require('datatables.net-bs4'); +require('datatables.net-bs4/css/dataTables.bootstrap4.min.css'); +require('./js/datatables.init.js'); + +// Select2 +require('select2'); +require('select2/dist/js/i18n/fr.js'); +require('select2/dist/css/select2.css'); +require('@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css'); +$(() => { + $('.select2entity').select2( + { + theme: 'bootstrap4', + language: "fr" + } + ); +}); + +// Spectrum-colorpicker2 +require('spectrum-colorpicker2/dist/spectrum.min.js'); +require('spectrum-colorpicker2/dist/spectrum.min.css'); + +// CropSelectJs +require('crop-select-js/crop-select-js.min.css'); +window.CropSelectJs = require('crop-select-js/crop-select-js.min.js'); + +// Start the Stimulus application +import './bootstrap'; + +// App sytle +import './styles/font.css'; +import './styles/app.css'; + +// App js +require('./js/app.js'); + + diff --git a/assets/bootstrap.js b/assets/bootstrap.js new file mode 100644 index 0000000..4ab2df6 --- /dev/null +++ b/assets/bootstrap.js @@ -0,0 +1,11 @@ +import { startStimulusApp } from '@symfony/stimulus-bridge'; + +// Registers Stimulus controllers from controllers.json and in the controllers/ directory +export const app = startStimulusApp(require.context( + '@symfony/stimulus-bridge/lazy-controller-loader!./controllers', + true, + /\.[jt]sx?$/ +)); + +// register any custom, 3rd party controllers here +// app.register('some_controller_name', SomeImportedController); diff --git a/assets/ckplugins/html5video/dialogs/html5video.js b/assets/ckplugins/html5video/dialogs/html5video.js new file mode 100644 index 0000000..c11e055 --- /dev/null +++ b/assets/ckplugins/html5video/dialogs/html5video.js @@ -0,0 +1,259 @@ +CKEDITOR.dialog.add( 'html5video', function( editor ) { + return { + title: editor.lang.html5video.title, + minWidth: 500, + minHeight: 100, + contents: [ { + id: 'info', + label: editor.lang.html5video.infoLabel, + elements: [ + { + type: 'vbox', + padding: 0, + children: [ + { + type: 'hbox', + widths: [ '365px', '110px' ], + align: 'right', + children: [ { + type: 'text', + id: 'url', + label: editor.lang.html5video.allowed, + required: true, + validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5video.urlMissing ), + setup: function( widget ) { + this.setValue( widget.data.src ); + }, + commit: function( widget ) { + widget.setData( 'src', this.getValue() ); + } + }, + { + type: 'button', + id: 'browse', + // v-align with the 'txtUrl' field. + // TODO: We need something better than a fixed size here. + style: 'display:inline-block;margin-top:14px;', + align: 'center', + label: editor.lang.common.browseServer, + hidden: true, + filebrowser: 'info:url' + } ] + } ] + }, + { + type: 'checkbox', + id: 'responsive', + label: editor.lang.html5video.responsive, + setup: function( widget ) { + this.setValue( widget.data.responsive ); + }, + commit: function( widget ) { + widget.setData( 'responsive', this.getValue()?'true':'' ); + } + }, + { + type: 'vbox', + padding: 0, + + children: [{ + type: 'hbox', + widths: [ '365px', '110px' ], + align: 'right', + children: [ { + type: 'text', + id: 'poster', + label: editor.lang.html5video.poster, + setup: function( widget ) { + this.setValue( widget.data.poster ); + }, + commit: function( widget ) { + widget.setData( 'poster', this.getValue() ); + } + }, + { + type: 'button', + id: 'browseposter', + // v-align with the 'txtUrl' field. + // TODO: We need something better than a fixed size here. + style: 'display:inline-block;margin-top:14px;', + align: 'center', + label: editor.lang.common.browseServer, + hidden: true, + filebrowser:{action:"Browse",target:"info:poster",url:editor.config.filebrowserImageBrowseUrl} + } ] + }] + }, + { + type: 'checkbox', + id: 'controls', + label: editor.lang.html5video.controls, + setup: function (widget) { + this.setValue(widget.data.controls); + }, + commit: function (widget) { + widget.setData('controls', this.getValue() ? 'true' : ''); + } + }, + { + type: 'hbox', + id: 'size', + children: [ { + type: 'text', + id: 'width', + label: editor.lang.common.width, + setup: function( widget ) { + if ( widget.data.width ) { + this.setValue( widget.data.width ); + } + }, + commit: function( widget ) { + widget.setData( 'width', this.getValue() ); + } + }, + { + type: 'text', + id: 'height', + label: editor.lang.common.height, + setup: function( widget ) { + if ( widget.data.height ) { + this.setValue( widget.data.height ); + } + }, + commit: function( widget ) { + widget.setData( 'height', this.getValue() ); + } + }, + ] + }, + + { + type: 'hbox', + id: 'alignment', + children: [ { + type: 'radio', + id: 'align', + label: editor.lang.common.align, + items: [ + [editor.lang.common.alignCenter, 'center'], + [editor.lang.common.alignLeft, 'left'], + [editor.lang.common.alignRight, 'right'], + [editor.lang.common.alignNone, 'none'] + ], + 'default': 'center', + setup: function( widget ) { + if ( widget.data.align ) { + this.setValue( widget.data.align ); + } + }, + commit: function( widget ) { + widget.setData( 'align', this.getValue() ); + } + } ] + } ] + }, + { + id: 'Upload', + hidden: true, + filebrowser: 'uploadButton', + label: editor.lang.html5video.upload, + elements: [ { + type: 'file', + id: 'upload', + label: editor.lang.html5video.btnUpload, + style: 'height:40px', + size: 38 + }, + { + type: 'fileButton', + id: 'uploadButton', + filebrowser: 'info:url', + label: editor.lang.html5video.btnUpload, + 'for': [ 'Upload', 'upload' ] + } ] + }, + { + id: 'advanced', + label: editor.lang.html5video.advanced, + elements: [ { + type: 'vbox', + padding: 10, + children: [ { + type: 'hbox', + widths: ["33%", "33%", "33%"], + children: [ { + type: 'radio', + id: 'autoplay', + label: editor.lang.html5video.autoplay, + items: [ + [editor.lang.html5video.yes, 'yes'], + [editor.lang.html5video.no, 'no'] + ], + 'default': 'no', + setup: function( widget ) { + if ( widget.data.autoplay ) { + this.setValue( widget.data.autoplay ); + } + }, + commit: function( widget ) { + widget.setData( 'autoplay', this.getValue() ); + } + }, + { + type: 'radio', + id: 'loop', + label: editor.lang.html5video.loop, + items: [ + [editor.lang.html5video.yes, 'yes'], + [editor.lang.html5video.no, 'no'] + ], + 'default': 'no', + setup: function( widget ) { + if ( widget.data.loop ) { + this.setValue( widget.data.loop ); + } + }, + commit: function( widget ) { + widget.setData( 'loop', this.getValue() ); + } + }, + { + type: 'radio', + id: 'allowdownload', + label: editor.lang.html5video.allowdownload, + items: [ + [editor.lang.html5video.yes, 'yes'], + [editor.lang.html5video.no, 'no'] + ], + 'default': 'no', + setup: function( widget ) { + if ( widget.data.allowdownload ) { + this.setValue(widget.data.allowdownload); + } + }, + commit: function( widget ) { + widget.setData( 'allowdownload', this.getValue() ); + } + } ] + }, + { + type: 'hbox', + children: [ { + type: "text", + id: 'advisorytitle', + label: editor.lang.html5video.advisorytitle, + 'default': '', + setup: function( widget ) { + if ( widget.data.advisorytitle ) { + this.setValue(widget.data.advisorytitle); + } + }, + commit: function( widget ) { + widget.setData( 'advisorytitle', this.getValue() ); + } + } ] + } ] + } ] + } ] + }; +} ); diff --git a/assets/ckplugins/html5video/icons/html5video.png b/assets/ckplugins/html5video/icons/html5video.png new file mode 100644 index 0000000000000000000000000000000000000000..a2465177448241d4c3988ae25c22cd3690a80fff GIT binary patch literal 14773 zcmeI3Z)_7~9LJ9dW)3zKP>_h61ryY@ch`UGUAmId4pyaOY*o5Jbhqo%?p)hD?rv*0 z0>P<7UJwbIXkgJ-NTP-qBfu7_kp;aYPMW{@0f*_qs^90 zt`Hki{h(iN8__`5NPAcs8Ibs>Wwo!)n-QQv5*Q+#NhVUdkZHDLeFYes&5VW4N{oSK zON&{Mj)XdBzoG%!Wpi02*3QvQyp3}?d5&wO?JVbDIF_;VR*n;#O#twRt&9%;o)Jv^)erW5GO zpeBLVA$Th*D&4&y$BL6v;$-$z9XrU#Rnp9!Tv~Q1khM=zq*wSMuPY4eEg?%RS)MiHe5!pIlHa;uDpGn4%>`!zU-jIAGLN+{+Xj5oKXP34SG^ zXmD7-=kPL>nvtyRA`^ls-4Ig}2nKwx!6wU5f#q4=E;hNWY>ahV?QW;jDgw9_C6CMP z5P64N5~2Hy^cmIxMH)0WO5Qqpoz_VD4C@V=3=cUmfoROpUvG&DHZw}K$vRw`!^o0_ z3paa=b%Cv=teB+EQ+b0ld71L&@{A5S0}_#d47aXsE=bOu z&nfSynAlw{5$VV$=B5hy5zo$Kt`$Baz^4$%Q>|gM;E7-C$$Xjub&@U}J&{ ziwG4ETqq4}OmJZlp#p*nrGbqJE-WHcKyaZnura}fMT80nE|dl~Cb+POPyxY((!j<9 z7ZwpJAh=K(*qGqLB0>cO7fJ&g6I@tCsDR)?X<%c53yTO95L_q?Y)o)r5upNt3#EaL z2`(%mR6uZ{G_Wzjg++u42riTcHYT{Rh)@B+h0?&r1Q!+&Dj>K}8rYcN!XiQi1Q$vJ z8xveuM5ut^LTO-Qf(wfX6%bq~4QxzsVG*GMf(xaAjR`I+B2++dp)|1ZHF4DyU-$zl z_?BN9zRvgQ<~-Gpm2`^C8V&&_e<$EdE z5Dc`0GiS%X_~4;YanYQgU+(dbZfx1+Ia(X4|LLBM6JLGa7|_p6d^!H@)alg|XD7ao zU2Jp)dUq_^?N>hA-m>!Qk-77|%YPW#cKIDIzvV*1<+qQ&a_qbMqmglbrN_@tc0a;< zf(_eW|Ld`NzeLvFG=B-8_tbn-dwBN8nM8cmv1Mm0`)YnXbNr5mHx}&ddcQCJ>S)a_ zPs^Nl9rlB3{?5Gg#HACSPa+2vytW?rPNmNce01lbyPw~2rMIV-nf>U6Ep=lXoL81K z9ICn0pT6SUI(6HbnEG4n*Yr~d_=T4aTEi#bYTv~T)ogCv_pE*Vj|aEyUl{Bi-+Qw6 z#Hm*4#rr2u_ndPa8GWwt{L G(SHGko*mBs literal 0 HcmV?d00001 diff --git a/assets/ckplugins/html5video/lang/bg.js b/assets/ckplugins/html5video/lang/bg.js new file mode 100644 index 0000000..0def1ce --- /dev/null +++ b/assets/ckplugins/html5video/lang/bg.js @@ -0,0 +1,20 @@ +CKEDITOR.plugins.setLang( 'html5video', 'bg', { + button: 'Вмъква HTML5 видео', + title: 'HTML5 видео', + infoLabel: 'Видео', + allowed: 'Допустими файлови разширения: MP4, WebM, Ogv', + urlMissing: 'URL адресът на източника на видео липсва.', + videoProperties: 'Свойства на видео', + upload: 'Качване', + btnUpload: 'Изпрати на сървъра', + advanced: 'Разширено', + autoplay: 'Автоматично изпълнение', + allowdownload: 'Позволено изтегляне?', + advisorytitle: 'Заглавие', + yes: 'Да', + no: 'Не', + loop: 'Циклично изпълнение', + responsive: 'Адаптивна ширина', + controls: 'Показване на контролите', + poster: 'URL миниатюра' +} ); diff --git a/assets/ckplugins/html5video/lang/ca.js b/assets/ckplugins/html5video/lang/ca.js new file mode 100644 index 0000000..0369d48 --- /dev/null +++ b/assets/ckplugins/html5video/lang/ca.js @@ -0,0 +1,20 @@ +CKEDITOR.plugins.setLang( 'html5video', 'ca', { + button: "Insereix un vídeo HTML5", + title: "Vídeo HTML5", + infoLabel: "Informació del vídeo", + allowed: "Extensions d'arxius permeses: MP4, WebM, Ogv", + urlMissing: "Falta l'URL de la font de vídeo.", + videoProperties: "Propietats de vídeo", + upload: "Pujar", + btnUpload: "Envia-lo al servidor", + advanced: "Avançat", + autoplay: "Reproducció automàtica?", + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: "Sí", + no: "No", + loop: "Bucle?", + responsive: "Ample adaptatiu", + controls: "Mostra els controls", + poster: "Miniatura" +} ); diff --git a/assets/ckplugins/html5video/lang/de.js b/assets/ckplugins/html5video/lang/de.js new file mode 100644 index 0000000..ff4f781 --- /dev/null +++ b/assets/ckplugins/html5video/lang/de.js @@ -0,0 +1,17 @@ +CKEDITOR.plugins.setLang( 'html5video', 'de', { + button: 'HTML5 Video einfügen', + title: 'HTML5 Video', + infoLabel: 'Video Infos', + allowed: 'Erlaubte Dateierweiterungen: MP4, WebM, Ogv', + urlMissing: 'Sie haben keine URL zur Video-Datei angegeben.', + videoProperties: 'Video-Einstellungen', + upload: 'Hochladen', + btnUpload: 'Zum Server senden', + advanced: 'Erweitert', + autoplay: 'Autoplay?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Ja', + no: 'Nein', + controls: 'Steuerelemente anzeigen' +} ); diff --git a/assets/ckplugins/html5video/lang/en.js b/assets/ckplugins/html5video/lang/en.js new file mode 100644 index 0000000..d196bc5 --- /dev/null +++ b/assets/ckplugins/html5video/lang/en.js @@ -0,0 +1,20 @@ +CKEDITOR.plugins.setLang( 'html5video', 'en', { + button: 'Insert HTML5 video', + title: 'HTML5 video', + infoLabel: 'Video info', + allowed: 'Allowed file extensions: MP4, WebM, Ogv', + urlMissing: 'Video source URL is missing.', + videoProperties: 'Video properties', + upload: 'Upload', + btnUpload: 'Send it to the server', + advanced: 'Advanced', + autoplay: 'Autoplay?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Yes', + no: 'No', + loop: 'Loop?', + responsive: 'Responsive width', + controls: 'Show controls', + poster: 'Thumbnail' +} ); diff --git a/assets/ckplugins/html5video/lang/es.js b/assets/ckplugins/html5video/lang/es.js new file mode 100644 index 0000000..54dd5d5 --- /dev/null +++ b/assets/ckplugins/html5video/lang/es.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'es', { + button: 'Insertar video HTML5', + title: 'Video HTML5', + infoLabel: 'Información del video', + allowed: 'Extensiones de archivo permitidas: MP4, WebM, Ogv', + urlMissing: 'La URL del video no puede estar vacía.', + videoProperties: 'Propiedades del video', + upload: 'Cargar', + btnUpload: 'Enviar al servidor', + advanced: 'Avanzado', + autoplay: '¿Reproducir automáticamente?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Sí', + no: 'No', + responsive: '¿Responsive?', + controls: 'Mostrar controles' +} ); diff --git a/assets/ckplugins/html5video/lang/eu.js b/assets/ckplugins/html5video/lang/eu.js new file mode 100644 index 0000000..5b90be7 --- /dev/null +++ b/assets/ckplugins/html5video/lang/eu.js @@ -0,0 +1,17 @@ +CKEDITOR.plugins.setLang( 'html5video', 'eu', { + button: 'Txertatu HTML5 bideoa', + title: 'HTML5 bideoa', + infoLabel: 'Bideoaren informazioa', + allowed: 'Baimendutako fitxategi luzapenak: MP4, WebM, Ogv', + urlMissing: 'Bideoaren URLak ezin du hutsik egon.', + videoProperties: 'Bideoaren propietateak', + upload: 'Kargatu', + btnUpload: 'Bidali zerbitzarira', + advanced: 'Aurreratua', + autoplay: 'Automatikoki erreproduzitu?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Bai', + no: 'Ez', + controls: 'Erakutsi kontrolak?' +} ); diff --git a/assets/ckplugins/html5video/lang/fa.js b/assets/ckplugins/html5video/lang/fa.js new file mode 100644 index 0000000..df5dfb6 --- /dev/null +++ b/assets/ckplugins/html5video/lang/fa.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'fa', { + button: 'وارد کردن ویدیوی HTML5', + title: 'ویدیوی HTML5', + infoLabel: 'اطلاعات ویدیو', + allowed: 'پسوندهای مجاز فایل: MP4, WebM, Ogv', + urlMissing: 'URL منبع ویدیو پیدا نشد.', + videoProperties: 'خواهص ویدیو', + upload: 'بارگذاری', + btnUpload: 'ارسال به سرور', + advanced: 'پیشرفته', + autoplay: 'پخش خودکار؟', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'بله', + no: 'خیر', + responsive: 'عرض واکنشگرا', + controls: 'نمایش کنترل؟' +} ); diff --git a/assets/ckplugins/html5video/lang/fr.js b/assets/ckplugins/html5video/lang/fr.js new file mode 100644 index 0000000..7014239 --- /dev/null +++ b/assets/ckplugins/html5video/lang/fr.js @@ -0,0 +1,17 @@ +CKEDITOR.plugins.setLang( 'html5video', 'fr', { + button: 'Insérer un lecteur video HTML5', + title: 'HTML5 video', + infoLabel: 'Informations video', + allowed: 'Extensions de fichiers autorisées: MP4, WebM, Ogv', + urlMissing: 'URL de la source video manquante. Veuillez la renseigner.', + videoProperties: 'Propriétés Video', + upload: 'Télécharger', + btnUpload: 'Envoyer vers le serveur', + advanced: 'Avancé', + autoplay: 'Jouer automatiquement ?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Oui', + no: 'Non', + controls: 'Afficher les contrôles ?' +} ); diff --git a/assets/ckplugins/html5video/lang/he.js b/assets/ckplugins/html5video/lang/he.js new file mode 100644 index 0000000..9bea57b --- /dev/null +++ b/assets/ckplugins/html5video/lang/he.js @@ -0,0 +1,18 @@ + +CKEDITOR.plugins.setLang('html5video', 'he', { + button: 'הוסף וידאו HTML5', + title: 'וידאו HTML5', + infoLabel: 'מידע וידאו', + allowed: 'סוגי קבצים מורשים: MP4, WebM, Ogv', + urlMissing: 'כתובת הוידאו חסרה', + videoProperties: 'מאפייני וידאו', + upload: 'העלה', + btnUpload: 'שלח לשרת', + advanced: 'מתקדם', + autoplay: 'ניגון אוטומטי?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'כן', + no: 'לא', + responsive: 'רוחב רספונסיבי' +}); diff --git a/assets/ckplugins/html5video/lang/ko.js b/assets/ckplugins/html5video/lang/ko.js new file mode 100644 index 0000000..0e68c24 --- /dev/null +++ b/assets/ckplugins/html5video/lang/ko.js @@ -0,0 +1,20 @@ +CKEDITOR.plugins.setLang( 'html5video', 'ko', { + button: 'HTML5 비디오 추가하기', + title: 'HTML5 비디오', + infoLabel: '비디오 정보', + allowed: '허용된 파일 확장자들: MP4, WebM, Ogv', + urlMissing: '비디오 Url이 없습니다.', + videoProperties: '비디오 속성', + upload: '업로드', + btnUpload: '서버로 전송', + advanced: '고급', + autoplay: '자동재생?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: '네', + no: '아니오', + loop: '무한반복?', + responsive: '반응형 너비', + controls: '컨트롤 보여주기', + poster: '썸네일' +} ); diff --git a/assets/ckplugins/html5video/lang/pl.js b/assets/ckplugins/html5video/lang/pl.js new file mode 100644 index 0000000..3528fba --- /dev/null +++ b/assets/ckplugins/html5video/lang/pl.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'pl', { + button: 'Wstaw HTML5 video', + title: 'HTML5 video', + infoLabel: 'Informacje', + allowed: 'Dozwolone typy plików: MP4, WebM, Ogv', + urlMissing: 'Nie znaleziono URL do pliku video.', + videoProperties: 'Właściwości', + upload: 'Wrzuć plik', + btnUpload: 'Wyślij na serwer', + advanced: 'Zaawansowane', + autoplay: 'Autoodtwarzanie?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Tak', + no: 'Nie', + responsive: 'Szerokość responsywna', + controls: 'Pokaż kontrolki' +} ); diff --git a/assets/ckplugins/html5video/lang/pt-br.js b/assets/ckplugins/html5video/lang/pt-br.js new file mode 100644 index 0000000..1874303 --- /dev/null +++ b/assets/ckplugins/html5video/lang/pt-br.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'pt-br', { + button: 'Inserir vídeo HTML5', + title: 'HTML5 video', + infoLabel: 'Informações do Vídeo', + allowed: 'Extensões permitidas: MP4, WebM, Ogv', + urlMissing: 'O URL do vídeo está faltando.', + videoProperties: 'Propriedades do vídeo', + upload: 'Upload', + btnUpload: 'Enviar para o servidor', + advanced: 'Avançado', + autoplay: 'Autoplay?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Sim', + no: 'Não', + responsive: 'Largura responsiva', + controls: 'Exibir controles' +} ); diff --git a/assets/ckplugins/html5video/lang/pt.js b/assets/ckplugins/html5video/lang/pt.js new file mode 100644 index 0000000..5c4213e --- /dev/null +++ b/assets/ckplugins/html5video/lang/pt.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'pt', { + button: 'Inserir vídeo HTML5', + title: 'HTML5 video', + infoLabel: 'Informações do Vídeo', + allowed: 'Extensões permitidas: MP4, WebM, Ogv', + urlMissing: 'O URL do vídeo está faltando.', + videoProperties: 'Propriedades do vídeo', + upload: 'Upload', + btnUpload: 'Enviar para o servidor', + advanced: 'Avançado', + autoplay: 'Autoplay?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Sim', + no: 'Não', + responsive: 'Largura responsiva', + controls: 'Exibir controles' +} ); diff --git a/assets/ckplugins/html5video/lang/ru.js b/assets/ckplugins/html5video/lang/ru.js new file mode 100644 index 0000000..bea81ed --- /dev/null +++ b/assets/ckplugins/html5video/lang/ru.js @@ -0,0 +1,21 @@ +CKEDITOR.plugins.setLang( 'html5video', 'ru', { + button: 'Вставить HTML5 видео', + title: 'HTML5 видео', + infoLabel: 'Видео', + allowed: 'Допустимые расширения файлов: MP4, WebM, Ogv', + urlMissing: 'Не выбран источник видео', + videoProperties: 'Свойства видео', + upload: 'Загрузить', + btnUpload: 'Загрузить на сервер', + advanced: 'Дополнительно', + autoplay: 'Автовоспроизведение', + allowdownload: 'Разрешить загрузку', + advisorytitle: 'Заголовок', + yes: 'Да', + no: 'Нет', + responsive: 'Адаптивная ширина', + controls: 'Показать элементы управления', + loop: 'Зациклить', + poster: 'Постер', + advisorytitle: 'Пояснительный текст' +} ); diff --git a/assets/ckplugins/html5video/lang/uk.js b/assets/ckplugins/html5video/lang/uk.js new file mode 100644 index 0000000..a115440 --- /dev/null +++ b/assets/ckplugins/html5video/lang/uk.js @@ -0,0 +1,17 @@ +CKEDITOR.plugins.setLang( 'html5video', 'uk', { + button: 'Вставити HTML5 відео', + title: 'HTML5 відео', + infoLabel: 'Інформація', + allowed: 'Допустимі розширення файлів: MP4, WebM, Ogv', + urlMissing: 'Не обрано джерела відео', + videoProperties: 'Властивості відео', + upload: 'Відвантажити', + btnUpload: 'Відвантажити на сервер', + advanced: 'Додатково', + autoplay: 'Автовідтворення?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Так', + no: 'Ні', + controls: 'Показати елементи керування?' +} ); diff --git a/assets/ckplugins/html5video/lang/uz.js b/assets/ckplugins/html5video/lang/uz.js new file mode 100644 index 0000000..10d1f66 --- /dev/null +++ b/assets/ckplugins/html5video/lang/uz.js @@ -0,0 +1,17 @@ +CKEDITOR.plugins.setLang( 'html5video', 'uz', { + button: 'HTML5 video qo‘shing', + title: 'HTML5 video', + infoLabel: 'Video ma\'lumot', + allowed: 'Ruxsat etilgan kengaytmalar: MP4, WebM, Ogv', + urlMissing: 'Video\'ning URL manbasi topilmadi.', + videoProperties: 'Video xususiyatlari', + upload: 'Yuklash', + btnUpload: 'Serverga jo‘natish', + advanced: 'Kengaytrilgan', + autoplay: 'Avtoijro?', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: 'Ha', + no: 'Yo‘q', + controls: 'Tekshiruvlarni ko‘rsatish' +} ); diff --git a/assets/ckplugins/html5video/lang/zh-cn.js b/assets/ckplugins/html5video/lang/zh-cn.js new file mode 100644 index 0000000..3ea9ad4 --- /dev/null +++ b/assets/ckplugins/html5video/lang/zh-cn.js @@ -0,0 +1,18 @@ +CKEDITOR.plugins.setLang( 'html5video', 'zh-cn', { + button: '发布HTML5视频', + title: 'HTML5视频', + infoLabel: '视频信息', + allowed: '支持格式: MP4, WebM, Ogv', + urlMissing: '视频url', + videoProperties: '视频属性', + upload: '上传视频', + btnUpload: '上传', + advanced: '高级', + autoplay: '自动播放', + allowdownload: 'Allow download?', + advisorytitle: 'Advisory title', + yes: '是', + no: '否', + responsive: '自动宽度', + controls: '显示控件?' +} ); diff --git a/assets/ckplugins/html5video/plugin.js b/assets/ckplugins/html5video/plugin.js new file mode 100644 index 0000000..9a71e49 --- /dev/null +++ b/assets/ckplugins/html5video/plugin.js @@ -0,0 +1,196 @@ +CKEDITOR.plugins.add( 'html5video', { + requires: 'widget', + lang: 'bg,ca,de,en,eu,es,ru,uk,fr,ko,pt,pt-br,pl', + icons: 'html5video', + init: function( editor ) { + editor.widgets.add( 'html5video', { + button: editor.lang.html5video.button, + template: '
', + /* + * Allowed content rules (http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules): + * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-video class. + * - video tags with src, controls, width and height attributes. + */ + allowedContent: 'div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,poster,controls,autoplay,width, height,loop]{max-width,height};', + requiredContent: 'div(ckeditor-html5-video); video[src];', + upcast: function( element ) { + return element.name === 'div' && element.hasClass( 'ckeditor-html5-video' ); + }, + dialog: 'html5video', + init: function() { + var src = ''; + var autoplay = ''; + var loop = ''; + var controls = ''; + var align = this.element.getStyle( 'text-align' ); + + var width = ''; + var height = ''; + var poster = ''; + + // If there's a child (the video element) + if ( this.element.getChild( 0 ) ) { + // get it's attributes. + src = this.element.getChild( 0 ).getAttribute( 'src' ); + width = this.element.getChild( 0 ).getAttribute( 'width' ); + height = this.element.getChild( 0 ).getAttribute( 'height' ); + autoplay = this.element.getChild(0).getAttribute('autoplay'); + allowdownload = !this.element.getChild( 0 ).getAttribute( 'controlslist' ); + loop = this.element.getChild( 0 ).getAttribute( 'loop' ); + advisorytitle = this.element.getChild( 0 ).getAttribute( 'title' ); + controls = this.element.getChild(0).getAttribute('controls'); + responsive = this.element.getAttribute( 'data-responsive' ); + poster = this.element.getChild( 0 ).getAttribute( 'poster' ); + } + + if ( src ) { + this.setData( 'src', src ); + + if ( align ) { + this.setData( 'align', align ); + } else { + this.setData( 'align', 'none' ); + } + + if ( width ) { + this.setData( 'width', width ); + } + + if ( height ) { + this.setData( 'height', height ); + } + + if ( autoplay ) { + this.setData( 'autoplay', 'yes' ); + } + + if ( allowdownload ) { + this.setData( 'allowdownload', 'yes' ); + } + + if ( loop ) { + this.setData( 'loop', 'yes' ); + } + + if ( advisorytitle ) { + this.setData( 'advisorytitle', advisorytitle ); + } + + if ( responsive ) { + this.setData( 'responsive', responsive ); + } + + if (controls) { + this.setData('controls', controls); + } + + if ( poster ) { + this.setData('poster', poster); + } + } + }, + data: function() { + // If there is an video source + if ( this.data.src ) { + // and there isn't a child (the video element) + if ( !this.element.getChild( 0 ) ) { + // Create a new