919 Commits
Author SHA1 Message Date
Michal Kváček 8098288139 FIX: fix path to admin routes 2018-09-20 00:14:53 +02:00
Michal Kváček cf90d1b91e FEATURE: make nested margin on subpages 2018-04-11 23:04:16 +02:00
Michal Kváček 8acfcabb3c FEATURE: add infinite content pages depth into overview 2018-04-11 22:48:00 +02:00
Michal Kváček b91b80debb FEATURE: allow infinite subpages depth 2018-04-11 22:36:25 +02:00
Michal Kváček ae29c49acf Merge branch 'master' of binarity.cz:/opt/git/internal/cms/minicms 2018-03-25 11:23:38 +02:00
Michal Kváček 7e4507e9e4 FEATURE: add template to menu widget 2018-03-25 11:23:12 +02:00
Peter Hrdlica f0bb159efb Merge branch 'master' of binarity.cz:/opt/git/internal/cms/minicms 2017-10-15 15:54:57 +02:00
Peter Hrdlica ddae98d233 multiselect component 2017-10-15 15:54:21 +02:00
Michal Kváček b1ca6e4cfb FEATURE: allow multiple ckEditor instances 2017-10-09 00:14:48 +02:00
Michal Kváček c69bd9bcf7 FEATURE: add bootstrap datepicker. All elements with .date class are now datepicker holders 2017-09-25 23:22:25 +02:00
Michal Kváček 271e7f5170 FIX: fix insanely low file previews 2017-09-25 15:29:54 +02:00
Michal Kváček 1ecef555ef FIX: fix minor bug in content overview and module installation 2017-09-25 14:37:30 +02:00
Michal Kváček 4ef5e3e3cd FEATURE: make top menu extendable 2017-09-25 11:20:57 +02:00
Michal Kváček 1388383bb6 FEATURE: update Font Awesome and add bottom border and margin to submenus in admin 2017-09-24 16:44:36 +02:00
Michal Kváček f1ff45cfb1 FIX: do not fire error when module service provider is not found. Log it and let it go 2017-09-24 13:57:03 +02:00
Michal Kváček 6d723f026d FIX: remove template service provider from core repository 2017-09-23 00:52:35 +02:00
Michal Kváček b99f70c269 FEATURE: move profiler into own repository 2017-09-23 00:51:24 +02:00
Michal Kváček 680edb14c1 Merge branch 'dev' into module_profiler 2017-09-23 00:45:51 +02:00
Michal Kváček ced920505a FIX #2556: fix user edit 2017-09-22 21:32:47 +02:00
Michal Kváček a1c4a19a59 FEATURE: add cache into public/.htaccess 2017-09-22 21:25:14 +02:00
Michal Kváček 62f73c51e6 FEATURE: add input for setting preview size and quality 2017-09-19 14:18:15 +02:00
Michal Kváček ba55702585 FEATURE: make own page for template overview 2017-09-15 13:32:09 +02:00
Michal Kváček 4d68156a73 FIX: add missing cache forget after disabling module 2017-09-14 20:32:21 +02:00
Michal Kváček f10847dede FIX: just another bugfix 2017-09-14 20:17:16 +02:00
Michal Kváček 73681a5a4d FIX: minor bugfix 2017-09-14 11:34:08 +02:00
Michal Kváček a2d83ce3fa REFACTORING: split javascripts 2017-09-14 10:14:11 +02:00
Michal Kváček a0c31c7a5f FIX: fix error in translation 2017-09-13 14:34:11 +02:00
Michal Kváček 422339b313 MAINTENANCE: update laravel, dependencies, fix few bugs 2017-09-13 14:02:39 +02:00
Michal Kváček 3fdae2669b FEATURE: add page ordering 2017-09-13 14:02:07 +02:00
Michal Kváček d90ca08ba6 FEATURE: add new relationship to Content model - only visible subpages 2017-09-08 00:33:46 +02:00
Michal Kváček e8cbc1b537 FIX: fix permissions for publishing content pages 2017-09-07 23:53:34 +02:00
Michal Kváček 983efad9f0 TESTING #1931: do something with tests.. Not really usefull 2017-09-02 00:35:52 +02:00
Michal Kváček 2d66cf672a FEATURE #2520: add template for creating new table 2017-09-01 23:49:34 +02:00
Michal Kváček a5b6f6fa0d FEATURE #2520: add commands for creating new migration and running migrations in modules 2017-09-01 23:25:26 +02:00
Michal Kváček c92ba41def FIX: fix registering service providers in templates 2017-08-26 22:34:40 +02:00
Michal Kváček 6468c8f49c FEATURE: conditionally publish views in module, fix confirm dialog for forms 2017-08-25 11:40:34 +02:00
Michal Kváček 8bae8a43f9 FEATURE: add SITE_URL into installer 2017-08-24 14:29:06 +02:00
Michal Kváček 0e535c3ed1 FIX: fix few bugs in generating new module 2017-08-24 14:28:52 +02:00
Michal Kváček ce183d4805 FEATURE #2503: add easier installer 2017-08-24 14:15:08 +02:00
Michal Kváček 8946ef7441 FEATURE: update dependencies 2017-08-24 03:52:21 +02:00
Michal Kváček 295e8927a9 FIX: lots of bugfixes 2017-08-24 03:48:17 +02:00
Michal Kváček 029d84fed1 FEATURE: remove unused tables (custom fields) from database 2017-08-24 03:17:49 +02:00
Michal Kváček 862f49771f FEATURE: move templates into their own repositories 2017-08-24 03:05:30 +02:00
Michal Kváček 5abd7d9151 FIX: fix content dependency on categories 2017-08-24 02:50:30 +02:00
Michal Kváček ac8e3aeacc FEATURE: do not require template to be set in admin 2017-08-24 02:08:28 +02:00
Michal Kváček 49bd38db50 FEATURE: hopefully last changes about permissions 2017-08-24 02:04:20 +02:00
Michal Kváček b35149ad67 FEATURE: add permissions into widgets and fix few bugs 2017-08-24 01:54:58 +02:00
Michal Kváček e0f5cba9a4 FEATURE: add form for setting default permissions and fix few bugs 2017-08-23 21:34:56 +02:00
Michal Kváček 0aaa626124 FEATURE: add another permissions 2017-08-22 23:27:23 +02:00
Michal Kváček 1050271915 Merge branch 'authorization' into separate_modules 2017-08-22 22:36:00 +02:00
Michal Kváček e0b5559b96 FEATURE: hide menu entry when no content modules are available 2017-08-22 22:35:48 +02:00
Michal Kváček 3955d7290f FEATURE: remove gallery and move it into own repository 2017-08-22 20:19:06 +02:00
Michal Kváček 81ef15b8d6 FEATURE: remove contact form and move it into own repository 2017-08-22 20:18:20 +02:00
Michal Kváček f06d9b35d8 FEATURE: remove static pages and move it into own repository 2017-08-22 20:16:56 +02:00
Michal Kváček c4c328d21d FEATURE: add /modules into .gitignore 2017-08-22 14:11:57 +02:00
Michal Kváček fc8b76960a FEATURE: move categories into own repository 2017-08-22 14:11:48 +02:00
Michal Kváček b2e99bef05 FEATURE: move module blog into own repository 2017-08-22 14:08:28 +02:00
Michal Kváček 7d847cbab9 FIX: fix few bugs in routes 2017-08-11 04:13:33 +02:00
Michal Kváček ef432702b4 FEATURE #2048: add missing policies 2017-08-11 02:57:54 +02:00
Michal Kváček 7f43316602 FEATURE #2048: another work done on permissions 2017-08-11 02:24:44 +02:00
Michal Kváček 335ec4a167 FEATURE #2048: prepare routes for ACL, add some more permissions 2017-08-11 02:07:31 +02:00
Michal Kváček cccdbda543 FEATURE #2048: add basics of permissions management 2017-08-10 23:18:53 +02:00
Michal Kváček f702ba3a29 FEATURE #1854: add widget settings 2017-08-10 21:27:39 +02:00
Michal Kváček 6af0c16a9a FEATURE #1853: move widget areas 'views' into middleware 2017-08-10 19:59:40 +02:00
Michal Kváček c2209538db FEATURE: refactorize code little bit more 2017-08-04 18:43:18 +02:00
Michal Kváček 25d9ded124 FIX: fix bug related to settings cache 2017-08-02 18:35:48 +02:00
Michal Kváček 3a1e4b9c5b FIX #2056: areYouSure now reacts also on changes in CKEditor 2017-08-02 14:10:37 +02:00
Michal Kváček 3d73bffa6e FIX: fix minor bug in user management 2017-08-02 13:52:19 +02:00
Michal Kváček a4c020daa0 FEATURE #2047: use laravel's authorization 2017-08-02 13:33:26 +02:00
Michal Kváček 67fb3c6945 FEATURE #2039 @15m: clean up the code 2017-08-02 10:39:15 +02:00
Michal Kváček e8065c99c7 FEATURE: refactorize settings 2017-08-02 10:27:58 +02:00
Michal Kváček e5d9ce682d FEATURE #1865: add logging for uploaded file 2017-08-01 23:33:01 +02:00
Michal Kváček 7a38f357dc FEATURE #2045: generate thumbnails in queue 2017-08-01 23:00:44 +02:00
Michal Kváček 8c15a63c2a FEATURE #1753: add commands for enablind/disabling modules 2017-08-01 22:58:59 +02:00
Michal Kváček c2502a2355 FIX: fix invalid pingpong parent classes in few controllers 2017-08-01 19:56:01 +02:00
Michal Kváček 2d60010f9e FEATURE: use even more route model binding 2017-08-01 19:51:12 +02:00
Michal Kváček 3275e5aeed FEATURE: use more route model binding 2017-08-01 19:10:55 +02:00
Michal Kváček a7e91ef499 FEATURE #2472: fix few minor bugs in template management 2017-07-31 18:26:26 +02:00
Michal Kváček 638f6ef134 FEATURE #2472: update to laravel 5.4 - not stable at allg a -A 2017-07-31 16:10:23 +02:00
Michal Kváček e9e9f0976c FEATURE #1753: remove pingpong menus and install nwidart laravel-menus 2017-07-31 15:46:24 +02:00
Michal Kváček 5707750f5b FEATURE #1753: change parent class of module service providers 2017-07-31 15:35:40 +02:00
Michal Kváček 72c64dc6d1 FEATURE #1753: remove pingpong/modules and use custom solution 2017-07-31 15:32:33 +02:00
Michal Kváček f876a08429 REFACTORING: move creating directories into repository 2017-07-30 16:06:28 +02:00
Michal Kváček f48c0cfac3 FIX: fix setting same height 2017-04-24 00:26:28 +02:00
Michal Kváček e262473f36 FEATURE #2042: refactorize widgets 2017-04-24 00:01:03 +02:00
Michal Kváček 4a5c9ab1e6 FEATURE #1831: add recaptcha module 2017-04-24 00:00:42 +02:00
Michal Kváček e41c589225 FEATURE: move recaptcha config into core application 2017-04-05 02:01:20 +02:00
Michal Kváček 870ca540c4 FEATURE: make content list in admin nicer 2017-04-05 01:40:47 +02:00
Michal Kváček 7d6a3737e3 FEATURE #2389 @20m: add deleting all data from profiler 2017-03-28 01:01:21 +02:00
Michal Kváček aa55ffe46a FEATURE #2389 @2h: group http request by url 2017-03-28 00:27:31 +02:00
Michal Kváček 848fa7b7cb Merge branch 'dev' into module_profiler 2017-03-27 21:24:31 +02:00
Michal Kváček 2e8f8dca1f Merge branch 'pragtenniscamp.eu' into dev 2017-03-24 01:51:02 +01:00
Michal Kváček 8167b151d5 FIX: upload all title photos into root directory 2017-03-24 01:38:23 +01:00
Michal Kváček 05c9e56973 FEATURE #2389 @2h: add request detail into profiler 2017-03-24 01:28:21 +01:00
Michal Kváček 52e02d67c6 Merge branch 'dev' into module_profiler 2017-03-23 23:18:01 +01:00
Michal Kváček ad8a6e3c61 FEATURE: add title photo to contact template and change background image 2017-03-23 08:06:02 +01:00
Michal Kváček 74f1501af6 Merge branch 'pragtenniscamp.eu' into dev 2017-03-23 01:34:06 +01:00
Michal Kváček 217d78f214 FIX: fix year in footer in binarity template 2017-03-23 01:11:43 +01:00
Michal Kváček 16532faa5b FEATURE: remove trainer team from homepage 2017-03-23 01:04:53 +01:00
Michal Kváček ead55a8165 FIX: fix comments overview 2017-03-23 01:01:26 +01:00
Michal Kváček e943120dc6 FIX: fix blog overview template 2017-03-23 00:52:51 +01:00
Michal Kváček dd978c05f7 FIX: fix blog overview template 2017-03-23 00:51:28 +01:00
Michal Kváček 348883603a FIX: fix blocked javascript with ad block 2017-03-23 00:43:59 +01:00
Michal Kváček 5de8e01d77 FIX: fix year in footer 2017-03-23 00:38:08 +01:00
Michal Kváček 5d623a1a62 FIX: fix typo in service provider name 2017-03-23 00:21:09 +01:00
Michal Kváček 69253693ce FEATURE: add shortcodes into binarity template 2017-03-23 00:19:05 +01:00
Michal Kváček 42066d4ae9 FIX: fix paginated results in root pages in content editor 2017-03-23 00:01:47 +01:00
Michal Kváček 52f39fda0c FIX: fix reference list 2017-03-22 23:51:39 +01:00
Michal Kváček 9cb4deecd4 FEATURE: add success message after sending e-mail from contact form 2017-03-13 21:55:56 +01:00
Michal Kváček fcd7651841 FEATURE: add template for email from contactform 2017-03-13 21:48:34 +01:00
Michal Kváček 09daba1dc1 FEATURE: style little bit contact form for pragtenniscamp.eu 2017-03-13 19:41:25 +01:00
Michal Kváček 66e5d649be FEATURE: make smaller line height in trainee team 2017-03-13 13:55:56 +01:00
Michal Kváček 78532a6832 FIX: fix typos in template 2017-03-13 13:50:26 +01:00
Michal Kváček 1f633c3281 FEATURE: add template for hotels 2017-03-13 13:27:49 +01:00
Michal Kváček 8658ea1d39 FEATURE: prepare hotels template 2017-03-13 12:08:45 +01:00
Michal Kváček ce58b325c8 FIX: fix latent bug in save pipeline - trim backslashes from handler name 2017-03-13 12:08:26 +01:00
Michal Kváček ed8e2565ff FIX: fix template edit 2017-03-13 11:48:32 +01:00
Michal Kváček 87af6a018c FEATURE #2351 @45m: minor UI tweaks, add error templates 2017-03-10 13:42:55 +01:00
Michal Kváček 0e2aecb529 FEATURE: add pipeline for saving also into prague-tennis-camp template 2017-03-10 09:52:31 +01:00
Michal Kváček 9bec808d38 FEATURE #2354 @2h30m: add pipeline for edit and create new content 2017-03-10 09:52:12 +01:00
Michal Kváček 55f9c0a679 FEATURE #2350 @1h: move beforeRender methods into pipeline 2017-03-09 00:09:26 +01:00
Michal Kváček 03ce64a731 FEATURE #2350: remove not-used functions from handlers 2017-03-09 00:09:03 +01:00
Michal Kváček 450000fadd FEATURE #2350 @2h: add pipeline for displaying content 2017-03-08 23:38:37 +01:00
Michal Kváček 44fb6b1be5 Merge branch 'praguetenniscamp.cz' into dev 2017-03-08 19:54:50 +01:00
Michal Kváček 09c87661d3 FEATURE: temporarily load trainees into all pages 2017-03-03 00:17:17 +01:00
Michal Kváček 0007425c86 FEATURE #2351 @10m: add template for photo as background on homepage 2017-03-03 00:16:10 +01:00
Michal Kváček 2a15f3eab5 FEATURE #2351 @30m: modify responsive version 2017-03-02 23:47:27 +01:00
Michal Kváček 57f9c21a43 FIX: fix saving address widget 2017-03-02 23:16:58 +01:00
Michal Kváček eff61a1481 FEATURE #2351 @3h: add colors 2017-03-02 23:16:42 +01:00
Michal Kváček 9c90e844b0 FEATURE: add simple view for requests and queries 2017-03-02 20:04:35 +01:00
Michal Kváček d99c046103 Merge branch 'dev' into module_profiler 2017-03-02 12:29:21 +01:00
Michal Kváček 4128fcf88e FEATURE: move creating thumbnails into event listener 2017-03-02 10:33:45 +01:00
Michal Kváček 4353345b3e FEATURE: try to color template 2017-03-02 10:27:22 +01:00
Michal Kváček 455b9d6d4e FIX: fix creating widgets 2017-02-23 18:26:59 +01:00
Michal Kváček 77685b491e Merge some fix into praguetenniscamp.cz 2017-02-23 18:26:43 +01:00
Michal Kváček f90df0f4bc FIX: fix unassigning related files 2017-02-23 18:24:35 +01:00
Michal Kváček 93fc9316a4 FEATURE: add command for displaying info about currently set template 2017-02-23 18:23:59 +01:00
Michal Kváček 26854b7207 FIX: fix contact form widget 2017-02-23 18:23:30 +01:00
Michal Kváček 8db748089b FIX: fix unassigning related files 2017-02-23 18:23:06 +01:00
Michal Kváček 507e186713 FEATURE #2341 @4h: add basics for template 2017-02-23 18:22:33 +01:00
Michal Kváček c027ffe2df FEATURE: add first basics of profiler 2017-02-22 08:54:26 +01:00
Michal Kváček 5132278ee1 FIX: fix installer 2017-02-22 02:33:43 +01:00
Michal Kváček c64f825886 FIX: fix saving 'viewed' column with updated_at 2017-02-22 01:46:13 +01:00
Michal Kváček f3b1951d25 FEATURE: cache most used SQL queries 2017-02-22 01:40:26 +01:00
Michal Kváček cad205960d Merge branch 'dobrotyzpece.cz' into dev 2017-02-22 01:17:29 +01:00
Michal Kváček 73e049e47d Merge branch 'binarity.cz' into refactoring 2017-02-22 01:16:42 +01:00
Michal Kváček 0ae3e4fe08 FEATURE: improve little bit update script 2017-02-11 01:24:28 +01:00
Michal Kváček 28addf5e33 FIX: fix typos 2017-02-10 14:20:49 +01:00
Michal Kváček d5a33b382e Merge branch 'refactoring' into binarity.cz 2017-02-10 14:01:49 +01:00
Michal Kváček 2fdec0a65f FIX: add dependencies into bower.json and package.json 2017-02-10 14:01:37 +01:00
Michal Kváček 6fb6aef199 Merge branch 'refactoring' into binarity.cz 2017-02-10 13:49:36 +01:00
Michal Kváček f69b8f39ad FEATURE: rename alias in database 2017-02-10 13:49:17 +01:00
Michal Kváček 35bda2828c FEATURE: merge template namespace and module alias 2017-02-10 13:45:41 +01:00
Michal Kváček bda659b910 FIX: fix article detail 2017-02-10 13:45:23 +01:00
Michal Kváček c8ec9c4eeb Merge branch 'refactoring' into binarity.cz 2017-02-10 11:41:40 +01:00
Michal Kváček 9451357e02 FIX: fix registering template paths 2017-02-10 11:41:17 +01:00
Michal Kváček 727e449ebc FIX: fix path to blog templates in binarity template 2017-02-10 11:41:03 +01:00
Michal Kváček b5425423d6 Merge branch 'refactoring' into binarity.cz 2017-02-10 02:49:20 +01:00
Michal Kváček 66e78aff6a FIX: fix content edit 2017-02-10 02:49:14 +01:00
Michal Kváček 497ff1b96d FIX: fix few minor bugs 2017-02-10 02:48:13 +01:00
Michal Kváček c429024a54 FIX: fix typo in template 2017-02-10 02:27:08 +01:00
Michal Kváček 0778a1d30c FIX: fix template handler according to refactoring 2017-02-10 02:24:38 +01:00
Michal Kváček 3748d00c2f FEATURE: hide user name when empty 2017-02-10 02:19:44 +01:00
Michal Kváček a525d9c085 REFACTORING: delete old admin assets 2017-02-10 02:16:35 +01:00
Michal Kváček dff8dcf565 FIX: fix typo in content search handler 2017-02-10 02:15:50 +01:00
Michal Kváček 0d22a14604 FEATURE: add scripts and styles into gulpfile 2017-02-10 02:13:03 +01:00
Michal Kváček 724478d0c9 Merge branch 'refactoring' into elixir 2017-02-09 23:42:23 +01:00
Michal Kváček 0ba0d1c15d FIX: fix few minor bugs 2017-02-09 23:42:07 +01:00
Michal Kváček 9593b6502e FIX: fix file manager 2017-02-09 23:25:21 +01:00
Michal Kváček e53283da65 FIX: fix logging 2017-02-09 23:25:08 +01:00
Michal Kváček f0d1cb8020 FIX: add middleware for queuing cookies 2017-02-09 23:24:50 +01:00
Michal Kváček 9076f81185 FEATURE: add widget for social buttons 2017-02-09 23:24:30 +01:00
Michal Kváček b7d4ab9515 FIX: lots of bugfixes, sorry for ugly commit 2017-02-09 23:10:11 +01:00
Michal Kváček 2b98c60d2a FIX #2228: change font from Lato to Open Sans 2017-02-03 01:32:57 +01:00
Michal Kváček 99ed8806da REFACTORING #2039 @1h: clean a little bit file manager 2016-11-28 01:46:05 +01:00
Michal Kváček d0fbce13fb REFACTORING #1880 @15m: remove custom fields 2016-11-23 03:21:23 +01:00
Michal Kváček 675aec669b REFACTORING #1880 @40m: move creating new directory into interaction 2016-11-23 01:30:28 +01:00
Michal Kváček ca718a5efe Merge branch 'dev' into refactoring 2016-11-23 01:05:22 +01:00
Michal Kváček 3aabb8fa7b REFACTORING #1880 @20m: move action log logic into repository 2016-11-23 01:03:37 +01:00
Michal Kváček 2fffea39fa FIX: fix content observer - ignore viewed 2016-11-23 00:49:55 +01:00
Michal Kvacek 7584491ff5 FIX: fix html widget 2016-11-21 11:16:44 +01:00
Michal Kvacek 84b2902613 FIX: fix one page menu widget 2016-11-21 11:13:39 +01:00
Michal Kvacek 2d6be0cb2e Merge branch 'dobrotyzpece.cz' of binarity.cz:/opt/git/internal/cms/minicms into dobrotyzpece.cz 2016-11-21 11:09:38 +01:00
Michal Kváček e6c02617e6 Merge branch 'dev' into dobrotyzpece.cz 2016-11-21 11:02:34 +01:00
root 0b56b41c3c Merge remote-tracking branch 'origin/dev' into dobrotyzpece.cz 2016-11-21 09:38:12 +01:00
Peter Hrdlica f89e11b5fb FEATURE: dobrotyzpece stylings 2016-11-03 22:06:55 +01:00
Michal Kváček 785168ecc2 FEATURE: somehow glued Elixir and SASS. Still not even nearly finished, still really experimental 2016-10-27 11:26:15 +02:00
Michal Kváček 9f430cee11 FEATURE #1933 @1h: add basic SASS structure and configure gulp/elixir 2016-10-26 03:31:20 +02:00
Michal Kváček 785387b796 FIX: fix gallery handler 2016-10-25 20:13:46 +02:00
Michal Kváček f940930c66 FEATURE: improve logging 2016-10-25 20:13:34 +02:00
Michal Kváček 8cb06bf641 REFACTORING #1880 @1h: move content actions into interactions 2016-10-25 20:13:12 +02:00
Michal Kváček 000352052d FEATURE: make nicer URL uniqueness check 2016-10-25 20:11:58 +02:00
Michal Kváček 988f153d9f FEATURE: add line breaks into diff 2016-10-25 19:55:07 +02:00
Michal Kváček 6dd452317b Merge branch 'dev' into refactoring 2016-10-25 19:16:18 +02:00
Michal Kváček 34feaac2ac FIX: fix editing menu widget 2016-10-25 18:04:07 +02:00
Michal Kváček e25f47a511 TESTING #1931 @1h: add few tests 2016-10-25 16:51:11 +02:00
Michal Kváček cc999dd24e REFACTORING #1880 @4h30m: another ugly refactoring commit 2016-10-25 16:50:04 +02:00
Michal Kváček 28f67ffe3c REFACTORING: another ugly commit full of refactored code 2016-10-19 00:28:44 +02:00
Michal Kváček 4f6a006ad9 FEATURE: add another repositories 2016-10-18 22:35:06 +02:00
Michal Kváček 662700b4f2 REFACTORING: move part of content business logic into repository 2016-10-18 15:36:26 +02:00
Michal Kváček eabbf48ee0 REFACTORING: move content update and create logic into separate interactions 2016-10-17 02:52:30 +02:00
Michal Kváček 6ec692bd1c FIX: fix uploading file without directory 2016-10-17 01:10:04 +02:00
Michal Kváček aa0ef7ccc6 REFACTORING: remove gravatar from user model 2016-10-17 01:07:25 +02:00
Michal Kváček e26e6fd460 FEATURE: move bussiness logic out of models 2016-10-17 01:05:20 +02:00
Michal Kváček 2ded2924a1 FEATURE: change directory structure 2016-10-17 00:07:21 +02:00
Michal Kváček 87f1920373 FEATURE: temporarily display large image as thumbnail in reference detail 2016-10-13 01:14:24 +02:00
Michal Kváček b7f911c9b8 FIX: fix encoding in translations 2016-10-13 01:06:08 +02:00
Michal Kváček 84aea5c847 FEATURE: add missing czech translations 2016-10-13 00:58:04 +02:00
Michal Kváček 98fc287f10 FIX: remove comments overview from submenu 2016-10-12 21:24:27 +02:00
Michal Kváček 686edf1c6f FIX: fix error on comments overview when article was deleted 2016-10-12 21:22:28 +02:00
Michal Kváček deb094b5c9 FEATURE: add uploader into CKEditor 2016-10-12 18:22:12 +02:00
Michal Kváček d425133cae REFACTORING: refactor module service providers to reduce amoount of duplicated code 2016-10-12 17:38:06 +02:00
Michal Kváček 9b6ae9f9f8 FIX: fix saving published_from and published_to fields 2016-10-12 17:15:58 +02:00
Michal Kváček 4a95a9692d FIX: fix saving new widget without container ID 2016-10-12 16:33:07 +02:00
Michal Kváček 06439bc9a0 Merge branch 'dev' into dobrotyzpece.cz 2016-10-12 16:09:44 +02:00
Michal Kváček 12683df0ab FIX: fix error when rendering not-existing widget area 2016-10-12 16:09:39 +02:00
Michal Kváček 0cb53b2d80 FEATURE: add template for widget with contact form 2016-10-12 16:01:05 +02:00
Michal Kváček 5fd9b1871f FIX: fix editing widget with container ID 2016-10-12 16:00:39 +02:00
Michal Kváček fb51ae80ac FEATURE: add widget for displaying contact form 2016-10-12 15:36:24 +02:00
Michal Kváček b9d141c4f1 FEATURE: add widget with address block 2016-10-12 15:12:42 +02:00
Michal Kváček af4edac469 FEATURE: json_decode widget settings before calling handler 2016-10-12 15:12:18 +02:00
Michal Kváček 0451f9942c FIX: fix error when trying to render widget preview with json_decoded settings 2016-10-12 15:11:55 +02:00
Michal Kváček 657c030033 DOC: add phpdoc 2016-10-12 15:11:29 +02:00
Michal Kváček d761914786 Merge branch 'dev' into binarity.cz 2016-10-11 19:12:18 +02:00
Michal Kváček 625bdbb2e2 FEATURE: add functionality for rendering widgets via shortcode [widget] 2016-10-11 19:10:03 +02:00
Michal Kváček d5f9e1fc2b Merge branch 'dobrotyzpece.cz' into dev 2016-10-11 16:38:05 +02:00
Michal Kváček ce058ae824 FEATURE: include commont parts of widget forms 2016-10-11 16:24:16 +02:00
Michal Kváček dee5060a24 FEATURE: add unique code to widgets 2016-10-11 16:16:16 +02:00
Michal Kváček c70e8a6b0d FEATURE: minor changes in template for dobrotyzpece.cz 2016-10-11 15:57:29 +02:00
Michal Kváček cb9b96c861 FIX: fix one page menu 2016-10-11 15:40:42 +02:00
Michal Kváček 4bd5a61fde FEATURE: add artisan shortcut for publishing assets and views 2016-10-11 15:32:06 +02:00
Michal Kváček 46ff310b01 FIX: fix meta information in header 2016-10-10 23:42:23 +02:00
Michal Kváček 96b05a7b25 FEATURE: add meta robots into head 2016-10-10 23:40:21 +02:00
Michal Kváček 563528cdc6 FEATURE: add meta author into head 2016-10-10 23:37:10 +02:00
Michal Kváček efa3289491 FEATURE: make list of directories nicer 2016-10-10 23:19:13 +02:00
Michal Kváček 3460f607b5 FEATURE: make history overview nicer 2016-10-10 23:09:38 +02:00
Michal Kváček 0384fab421 FIX: fix published_from and published_to 2016-10-10 21:45:31 +02:00
Michal Kváček b3ac9b9eec Merge branch 'binarity.cz' of binarity.cz:/opt/git/internal/cms/minicms into binarity.cz 2016-10-10 21:42:03 +02:00
Michal Kváček bfa0685f2e FIX: display only published pages - respect published_* settings 2016-10-10 21:41:32 +02:00
Peter Hrdlica 59226dbdc4 FEATURE: more changes to article and article list 2016-10-10 21:36:55 +02:00
Peter Hrdlica 446e8352b5 FEATURE: changed graphics of articles 2016-10-10 21:04:25 +02:00
Michal Kváček 190ca25b2a FIX: fix published_from and published_to fields 2016-10-10 20:31:59 +02:00
Michal Kváček f121ee356b Merge branch 'dobrotyzpece.cz' into binarity.cz 2016-10-10 20:25:17 +02:00
Michal Kváček b3d59fc182 FIX: fix date in articles 2016-10-10 20:19:00 +02:00
Michal Kváček 20f6295f84 "FEATURE: add categories into article detail and article list"
This reverts commit 08e97fe2cb.
2016-10-10 20:15:10 +02:00
Michal Kváček 2c36203690 FEATURE: check translation for lockUrl 2016-10-10 20:13:03 +02:00
Michal Kváček 458d8ec61c FIX: fix translations for template paths in blog 2016-10-10 19:08:59 +02:00
Michal Kváček 284dfa3fe8 Merge branch 'dev' into binarity.cz 2016-10-10 19:03:55 +02:00
Michal Kváček 08e97fe2cb Revert "FEATURE: add categories into article detail and article list"
This reverts commit bceef69a72.
2016-10-10 19:03:32 +02:00
Michal Kváček 7e63047313 FEATURE: swap created_at and published_from in template for blog 2016-10-10 19:00:42 +02:00
Michal Kváček d9834fe068 REFACTORING: split ArticleList::render into few smaller methods 2016-10-10 18:29:37 +02:00
Michal Kváček dc43a9503d FEATURE: add basic template for dobrotyzpece.cz 2016-10-10 01:25:36 +02:00
Michal Kváček a75425ca12 Merge branch 'dev' into dobrotyzpece.cz 2016-10-09 23:20:13 +02:00
Michal Kváček 8c20654280 Merge branch 'dev' into dobrotyzpece.cz 2016-10-09 23:18:11 +02:00
Michal Kváček bceef69a72 FEATURE: add categories into article detail and article list 2016-10-07 10:32:46 +02:00
Michal Kváček 1e310f0da5 FIX: add with methods to selecting comments and content pages 2016-10-04 13:14:21 +02:00
Michal Kváček ab90b907f8 FIX: hide protected pages from menu widget 2016-10-04 13:09:32 +02:00
Michal Kváček f1aacf8008 FEATURE: style little bit comments 2016-10-04 13:04:24 +02:00
Michal Kváček ce82b67c47 FEATURE: hide comments when article does not allow them 2016-10-04 12:58:42 +02:00
Michal Kváček 3024ae8b23 FEATURE: turn website off and on during update 2016-10-04 12:40:31 +02:00
Michal Kváček 7dcb8e280c FIX: fix exception when accessing protected page 2016-10-04 11:33:38 +02:00
Michal Kváček f9dfe076a0 Merge branch 'dev' into binarity.cz 2016-10-04 11:27:55 +02:00
Michal Kváček db88079f26 FIX: fix template loading for article list 2016-10-04 11:27:49 +02:00
Michal Kváček 3f1ae0f5a1 Merge branch 'dev' into binarity.cz 2016-10-04 11:16:59 +02:00
Michal Kváček f699d2c569 FIX: fix minor bugs in blog module 2016-10-04 11:16:04 +02:00
Michal Kváček fdb63fcd8a FEATURE: minor updates in binarity template 2016-10-04 11:14:17 +02:00
Michal Kváček 52fb27b4fe FEATURE: style comments and comments form 2016-10-04 06:59:46 +02:00
Michal Kváček 7234fa0810 Merge branch 'dev' into binarity.cz 2016-10-04 00:44:40 +02:00
Michal Kváček 581e32e98b FEATURE: add new helper Date 2016-10-04 00:44:36 +02:00
Michal Kváček 06780015d4 FEATURE: create model for articles 2016-10-04 00:44:24 +02:00
Michal Kváček 35bdd38f4c FEATURE: add new macros for date manipulation 2016-10-04 00:43:59 +02:00
Michal Kváček eacba1bec3 FIX: fix logging creating comments 2016-10-04 00:43:28 +02:00
Michal Kváček 975cc50272 FIX: fix routes namespaces 2016-10-04 00:43:04 +02:00
Michal Kváček 52b0ec7c72 FEATURE: add template for blog 2016-10-04 00:42:20 +02:00
Michal Kváček de02944d0d FIX: check if method is callable before calling it 2016-10-03 03:09:04 +02:00
Michal Kváček da1c8652e6 FEATURE: prepare support for blog 2016-10-03 03:04:03 +02:00
Michal Kváček 012ba1fd36 Merge branch 'dev' into binarity.cz 2016-10-03 02:41:57 +02:00
Michal Kváček cbfc5fcee5 DELETE: do some cleanup of repository 2016-10-03 02:37:19 +02:00
Michal Kváček 232e1d5ec9 Merge branch 'dev' into binarity.cz 2016-10-03 01:40:09 +02:00
Michal Kváček aca3c778e0 FEATURE: add same height to all templates 2016-10-03 01:40:04 +02:00
Michal Kváček 88a2463d13 FIX: render menu link to index when page is set as homepage 2016-10-03 01:36:52 +02:00
Michal Kváček f3e797a59a FIX: minor fixes in styles 2016-10-03 01:25:11 +02:00
Michal Kváček 0869ac7c24 Merge branch 'dev' into binarity.cz 2016-10-03 01:09:53 +02:00
Michal Kváček 304518fbe7 FEATURE: make bigger line-height in .off-canvas-content div 2016-10-03 01:09:51 +02:00
Michal Kváček 49577a7e1a FEATURE: add warning before leaving form with unsaved changes 2016-10-03 01:04:31 +02:00
Michal Kváček 606ee2016d FEATURE: add translations for emails dir in contact form templates 2016-10-03 00:34:07 +02:00
Michal Kváček 8608a2d67b Merge branch 'dev' into binarity.cz 2016-10-03 00:07:50 +02:00
Michal Kváček 3bac8dc09b FEATURE: add missing translations 2016-10-03 00:07:46 +02:00
Michal Kváček f61b8a7bcc Merge branch 'dev' into binarity.cz 2016-10-02 23:58:55 +02:00
Michal Kváček b6d3daaa35 FEATURE: add settings for linkedIn profile 2016-10-02 23:58:50 +02:00
Michal Kváček 33a928febb Merge branch 'dev' into binarity.cz 2016-10-02 23:33:53 +02:00
Michal Kváček 06c84867ec FEATURE: add error pages 2016-10-02 23:33:43 +02:00
Michal Kváček 8a9543cd2d FIX: fix gravatar http/https path 2016-10-02 23:11:30 +02:00
Michal Kváček 4f67b69984 FIX: fix creating new menu 2016-10-02 22:41:20 +02:00
Michal Kváček 28df8681e4 FEATURE: change default image for og:image 2016-10-02 22:21:49 +02:00
Michal Kváček 4222dbc243 Merge branch 'dev' into doucovanineratovice.cz 2016-10-02 22:16:33 +02:00
Michal Kváček 2f27e7f5c9 Merge branch 'dev' into binarity.cz 2016-10-02 22:16:21 +02:00
Michal Kváček c5fb951546 FIX: fix warning in update script 2016-10-02 22:16:16 +02:00
Michal Kváček ecd7aa27f0 Merge branch 'dev' into binarity.cz 2016-10-02 22:14:48 +02:00
Michal Kváček ecd01e1396 FIX: fix saving menu widget 2016-10-02 22:14:41 +02:00
Michal Kváček 76b226629f FEATURE: display references in descending order 2016-10-02 22:14:28 +02:00
Michal Kváček 97fae9bf9d FIX: fix selecting pages - exclude pages from disabled modules 2016-10-02 21:58:56 +02:00
Michal Kváček 5621b5acba FEATURE: add error message and meta information into contact form template 2016-10-02 21:24:51 +02:00
Michal Kváček ff237599a8 FEATURE: add meta information to all static pages 2016-10-02 21:22:47 +02:00
Michal Kváček 679ca91fc9 FEATURE: make homepage and default static page templates HTML5 valid 2016-10-02 21:16:41 +02:00
Michal Kváček 1dea234cb7 Merge branch 'dev' into binarity.cz 2016-10-02 20:47:27 +02:00
Michal Kváček e42d06904e FEATURE: add current URL into all views 2016-10-02 20:47:22 +02:00
Michal Kváček cb2fa84ade FEATURE: few mostly minor fixes in layout 2016-10-02 20:47:00 +02:00
Michal Kváček 0a0b0e7518 Merge branch 'dev' into binarity.cz 2016-10-02 20:16:06 +02:00
Michal Kváček 65dc4fd37e FIX: allow using same url after page was deleted 2016-10-02 20:15:02 +02:00
Michal Kváček b13f6bbea9 Merge branch 'dev' into binarity.cz 2016-10-02 20:03:23 +02:00
Michal Kváček 10e463b8b4 Merge branch 'dev' into doucovanineratovice.cz 2016-10-02 20:03:16 +02:00
Michal Kváček 316f7a9a16 FIX: fix sending status after sending e-mail from contact form 2016-10-02 20:03:09 +02:00
Michal Kváček 5e79d0208a FEATURE: add error message to contact form 2016-10-02 20:02:49 +02:00
Michal Kváček 5cdca60cce FIX: fix success message after sending e-mail 2016-10-02 20:00:05 +02:00
Michal Kváček 86a2d277f6 FEATURE: change colors 2016-10-02 19:51:00 +02:00
Michal Kváček ad59bc0adc FEATURE: change color of title page and navbar 2016-10-02 19:01:20 +02:00
Michal Kváček 556d863b45 FEATURE: add page title into tab header 2016-10-02 18:46:33 +02:00
Michal Kváček 673531ae22 FEATURE: add missing templates 2016-10-02 16:28:37 +02:00
Michal Kváček a9d5c0de28 Merge branch 'dev' into binarity.cz 2016-10-02 16:28:24 +02:00
Michal Kváček b43e37fa83 FEATURE: add support for shortcodes 2016-10-02 16:28:12 +02:00
Michal Kváček 6c4b30f1f7 FETURE: add default template for static pages 2016-10-02 15:14:18 +02:00
Michal Kváček c4a4354aff Merge branch 'dev' into binarity.cz 2016-10-02 14:49:43 +02:00
Michal Kváček ad77de0424 Merge branch 'dev' into binarity.cz 2016-10-02 14:49:13 +02:00
Michal Kváček c4d4ac2bfe FEATURE: add notification after sending mail from contact form 2016-10-02 14:46:54 +02:00
Michal Kváček 0718772740 FIX: delete mainMenu widget area when uninstalling template 2016-10-02 14:31:57 +02:00
Michal Kváček 0ace8c9cb6 FIX: fix template installation 2016-10-02 14:31:24 +02:00
Michal Kváček 0482121441 Merge branch 'dev' of binarity.cz:/opt/git/internal/cms/minicms into dev 2016-10-02 13:50:33 +02:00
Michal Kvacek 0df8eaa2e3 Merge branch 'master' into dev 2016-10-01 22:06:13 +02:00
Michal Kvacek 66a570bbf7 FIX fix redirect after sending message 2016-10-01 22:05:17 +02:00
Michal Kváček 0badc52f17 Merge branch 'dev' into binarity.cz 2016-10-01 14:18:10 +02:00
Peter Hrdlica 4cf1fedc61 FEATURE: more translations 2016-09-29 23:11:42 +02:00
Peter Hrdlica 341b5dc9ec FEATURE: translations 2016-09-29 23:04:26 +02:00
Michal Kváček f5e2aec818 REFORMATTING: reformatted whitespaces in contactform template 2016-09-29 00:13:02 +02:00
Michal Kváček 77a65b71a2 FIX: remove duplicated CSS rules 2016-09-29 00:11:40 +02:00
Michal Kváček 5f1cf06e36 FEATURE: add template for contact 2016-09-28 23:53:43 +02:00
Michal Kváček b734c3de18 FEATURE: add 'load more references' button into reference list 2016-09-28 23:27:59 +02:00
Michal Kváček 808bb0eb86 FEATURE: add template for reference detail 2016-09-28 23:07:34 +02:00
Michal Kváček 682f3b75bf FEATURE: add binarity template - currently only homepage 2016-09-28 22:12:58 +02:00
Michal Kváček 5b9b5c0d38 FIX: fix template path registrator 2016-09-28 00:14:18 +02:00
Michal Kváček 3a0a132701 FEATURE: add tag to homepage in overview 2016-09-27 23:39:44 +02:00
Michal Kváček 60c3582947 FEATURE: add filter to action log 2016-09-27 23:24:03 +02:00
Michal Kváček 9039334138 FEATURE: add widgets for assigning into area into edit form 2016-09-27 23:13:21 +02:00
Michal Kváček 5ee403ab28 FEATURE: hide language selection when only one language is installed 2016-09-27 23:05:09 +02:00
Michal Kváček fdf44e8b4a Merge branch 'dev' into doucovanineratovice.cz 2016-09-27 22:52:57 +02:00
Michal Kváček 91cdbec3af FIX: fix template install and other minor bugs 2016-09-27 22:52:55 +02:00
Michal Kváček 45354a3192 FEATURE: move installing widget into base template 2016-09-27 22:52:40 +02:00
Michal Kváček 846cfef1b8 FEATURE: add reset() method to CurrentTemplate helper 2016-09-27 22:27:53 +02:00
Michal Kváček 80dba6d9b7 FEATURE: add missing czech translations 2016-09-27 22:10:33 +02:00
Michal Kváček bf615f8494 FIX: fix contact e-mail saving in contact form 2016-09-27 22:08:24 +02:00
Michal Kváček 4c67d442d6 FIX: fix searching in name and overflowin of no-data message 2016-09-27 22:04:09 +02:00
Michal Kváček 36615aac21 FEATURE: add missing translation for actionLog.createUser 2016-09-27 22:00:42 +02:00
Michal Kváček 4e6fc7c074 FEATURE: add translatable titles to static pages and contact form modules 2016-09-27 21:57:25 +02:00
Michal Kváček e0357d0003 FEATURE: fix redirecting after edit to be more logical 2016-09-27 21:48:06 +02:00
Michal Kváček 8533c8cdc6 FEATURE: make template not mandatory in content editor 2016-09-27 21:34:39 +02:00
Michal Kváček bb3d000e5e FEATURE: display page status as tag in overview 2016-09-27 21:31:32 +02:00
Michal Kváček 842b54d879 FEATURE: add missing czech translations 2016-09-26 21:29:51 +02:00
Michal Kváček 256e24c5a4 FIX: fix typo in Blade macro 2016-09-26 21:01:05 +02:00
Michal Kváček 07df49c481 FEATURE: use thumbnails in content overview and Appearance tab 2016-09-26 20:58:59 +02:00
Michal Kváček a11a29de19 Merge branch 'doucovanineratovice.cz' into dev 2016-09-26 16:54:34 +02:00
Michal Kváček 044eb7e532 FIX: fix order of pages on homepage 2016-09-26 16:54:27 +02:00
Michal Kváček 7f93a5035c FIX: register also /resources/views/visitor 2016-09-26 16:33:43 +02:00
Michal Kváček 358027a8e0 FIX: fix duplicate :: in template names 2016-09-26 16:31:49 +02:00
Michal Kváček 98fe43e12c FIX: hopefully fix broken foreign keys management in migrations 2016-09-26 16:20:22 +02:00
Michal Kváček c096a30b81 Merge branch 'dev' into doucovanineratovice.cz 2016-09-26 15:36:07 +02:00
Michal Kváček 02157f332e FIX: remove on update current_timestamp from content column updated_at 2016-09-26 15:29:49 +02:00
Michal Kváček cd28625309 FEATURE: make thumbnails from uploaded image 2016-09-26 15:21:30 +02:00
Michal Kváček 6868af609f FIX: fix removing image after resaving page 2016-09-26 14:20:06 +02:00
Michal Kváček 445f369ff2 FEATURE: add ViewerJS to preview pdf and odf files in file manager 2016-09-26 12:17:53 +02:00
Michal Kváček 2a1ffb4259 FIX: fix page colors 2016-09-26 11:38:29 +02:00
Michal Kváček 4876cb631e FEATURE: make file overview nicer 2016-09-25 17:33:58 +02:00
Michal Kváček 4c35d95a73 FEATURE: simplify routes 2016-09-25 13:48:12 +02:00
Michal Kváček 8f4e6268a4 FEATURE: move widget and template dir installation into middleware, optimize middleware groups 2016-09-25 12:42:26 +02:00
Michal Kváček d7b60690b2 FEATURE: finish template 2016-09-25 02:52:20 +02:00
Michal Kváček 4de93f9fd9 FEATURE: add basics of template 2016-09-25 02:02:59 +02:00
Michal Kváček f26c384257 Merge branch 'template_support' into doucovanineratovice.cz 2016-09-25 02:01:43 +02:00
Michal Kváček 78213e6f41 Merge branch 'dev' into template_support 2016-09-25 02:01:31 +02:00
Michal Kváček a188c707d8 FEATURE: ignore errors on pages during rendering, display error message for logged user 2016-09-25 02:01:24 +02:00
Michal Kváček ff4585327e FEATURE: add helper function asset_path() 2016-09-25 02:00:50 +02:00
Michal Kváček fa1d302ea6 Merge branch 'dev' into doucovanineratovice.cz 2016-09-25 02:00:18 +02:00
Michal Kváček 52394c6289 FEATURE: add widget association in new admin layout - hopefully last try of doing this 2016-09-25 01:57:45 +02:00
Michal Kváček 76fa76a5af Merge branch 'template_support' into dev 2016-09-25 01:37:24 +02:00
Michal Kváček d6a441cb96 FEATURE: add template_id and module_id into in WidgetType model 2016-09-25 01:36:18 +02:00
Michal Kváček 85bbc384a7 FEATURE: add getJson method to Settings helper 2016-09-25 01:35:52 +02:00
Michal Kváček 80105c857e FEATURE: extend registering widgets by setting template and module ID 2016-09-25 01:35:39 +02:00
Michal Kváček 09151e97d1 FEATURE: prepare widget for displaying menu on onepage templates 2016-09-25 01:35:03 +02:00
Michal Kváček 9802161af1 FIX: add deletable fields into in widgets and widget area models 2016-09-25 00:21:18 +02:00
Michal Kváček 00d7bd562c FEATURE: make user id not mandatory in widgets table 2016-09-25 00:19:20 +02:00
Michal Kváček 124ad2f061 Merge branch 'template_support' into doucovanineratovice.cz 2016-09-24 23:00:57 +02:00
Michal Kváček a37767c2e8 Merge branch 'dev' into template_support 2016-09-24 23:00:44 +02:00
Michal Kváček d5950d9cd7 FEATURE: add removing settings into uninstall method for template 2016-09-24 20:29:07 +02:00
Michal Kváček 82283e65be FEATURE: add translations for comment logged events 2016-09-24 20:19:21 +02:00
Michal Kváček 2f760fd56d FEATURE: minor UI tweaks in template settings + add events into OnePage base template 2016-09-24 19:48:39 +02:00
Michal Kváček 939610cf9d FIX: fix homepage settings for one-page template when no template is set 2016-09-24 03:23:35 +02:00
Michal Kváček 6d107d0881 FEATURE: add customizable settings for create/edit/overview of content pages 2016-09-24 02:55:51 +02:00
Michal Kváček b7434d0a0b FIX: fix translating submodules 2016-09-24 02:55:01 +02:00
Michal Kváček 55ef5e4af1 FEATURE: add testing template files into testing template Jednostrankovka 2016-09-24 02:10:10 +02:00
Michal Kváček dc289723a9 FIX: fix contact form edit 2016-09-24 02:09:07 +02:00
Michal Kváček b15bbae037 FEATURE: add base support for displaying multiple pages on one-page template 2016-09-24 01:53:43 +02:00
Michal Kváček 7cd084e621 FIX: fix setting homepage pages - omitted file for one of previous commits 2016-09-24 00:00:30 +02:00
Michal Kváček 0857b4efd9 FEATURE: add template parameters into rendering page in visitor area 2016-09-23 23:59:39 +02:00
Michal Kváček 0c01b35188 FEATURE: make snippet for bootstrap cards 2016-09-23 23:58:59 +02:00
Michal Kváček 9d33ae6d49 FEATURE: move default Handler::render() into parent class 2016-09-23 23:57:23 +02:00
Michal Kváček a9aaf797cd FEATURE: add few czech translations 2016-09-23 23:41:22 +02:00
Michal Kváček 4b6f0b14ad FEATURE: make shortcut for getting currently installed template 2016-09-23 23:28:04 +02:00
Michal Kváček a111b67c53 DOC: add link to improvement 2016-09-23 22:55:18 +02:00
Michal Kváček 91ef424bd0 FEATURE: extend translation command for translating also templates 2016-09-23 22:54:46 +02:00
Michal Kváček 7589051216 FEATURE: add homepage settings for base of one page pages 2016-09-23 22:27:58 +02:00
Michal Kváček fbb59277b9 FEATURE: add events to comments 2016-09-23 00:41:38 +02:00
Michal Kváček 0d8e927b08 FIX: fix localization in categories 2016-09-23 00:08:53 +02:00
Michal Kváček 72f7b9a047 FIX: fix localization of comments 2016-09-23 00:02:25 +02:00
Michal Kváček 139373145a FEATURE: split controllers/admin into more smaller directories 2016-09-22 23:35:53 +02:00
Michal Kváček 0357417163 FEATURE: add soft deletes to users 2016-09-22 22:13:15 +02:00
Michal Kváček d5d4216a80 FEATURE: add soft deletes to content pages 2016-09-22 21:57:45 +02:00
Michal Kváček b982831fbf FEATURE: make settings accessible only using helper class/function 2016-09-22 21:09:48 +02:00
Peter Hrdlica 75c4a4a649 #1573: added full slovakian localization, some fixes in czech one. 2016-09-21 15:59:35 +02:00
Michal Kváček fb977ce1b9 FEATURE: few mostly minor UI tweaks in admin 2016-09-21 01:15:32 +02:00
Michal Kváček 7d051d1f6a FEATURE: make templates not-editable 2016-09-21 00:58:03 +02:00
Michal Kváček f5e1e24df8 FIX: minor fixed in chmod 2016-09-20 23:44:11 +02:00
Michal Kváček 5ddb31b57b FIX: do not prevent running ModuleManager in CLI mode 2016-09-20 23:37:32 +02:00
Michal Kváček 01a28fc65a FIX: minor fixes in installation 2016-09-20 23:25:45 +02:00
Michal Kváček 67cd7fb36f FEATURE: make installation working again 2016-09-20 23:06:42 +02:00
Michal Kváček 5f8dab0068 FIX: remove Article module from template 2016-09-20 20:59:47 +02:00
Michal Kváček 40949eaa90 FIX: fix update from migrations 2016-09-20 20:58:52 +02:00
Michal Kváček f25ef4ab1b Merge branch 'template_support' into dev 2016-09-20 20:17:06 +02:00
Michal Kváček f3873ed61c FEATURE: add functionality for modifying content page on template level 2016-09-20 20:14:02 +02:00
Michal Kváček bbffbd5616 Merge branch 'module_blog' into dev 2016-09-20 15:34:44 +02:00
Michal Kváček d9feb92612 FEATURE: add template into page rendering 2016-09-20 15:25:18 +02:00
Michal Kváček 5662dc7cf7 FIX: fix determination of invalid template 2016-09-20 15:23:07 +02:00
Michal Kváček 39279a1633 FEATURE: delete all template paths from template_path table on template uninstall 2016-09-20 14:54:43 +02:00
Michal Kváček e8b91db6f2 FEATURE: add template check on content overview 2016-09-20 14:47:38 +02:00
Michal Kváček df9ff7b259 REFACTORING: reformatt code 2016-09-20 14:30:11 +02:00
Michal Kváček a0f3409f82 FEATURE: make widgets not deletable 2016-09-20 14:24:40 +02:00
Michal Kváček 694724945d FEATURE: make widget areas not deletable 2016-09-20 14:16:33 +02:00
Michal Kváček 5cbe19064b FEATURE: delete commented-out sections with template registration 2016-09-20 12:09:37 +02:00
Michal Kváček 4ac084139c DELETE: delete old admin templates 2016-09-20 11:57:17 +02:00
Michal Kváček f92c1d0089 FEATURE: simplify template handler - move un/install and registerAdminMenu into base class 2016-09-20 11:54:23 +02:00
Michal Kváček bcd19058ea DELETE: remove views/visitor/cwbs -- will be converted into template 2016-09-20 11:51:16 +02:00
Michal Kváček d43073a011 FEATURE: add blade template registration into templates 2016-09-20 11:50:41 +02:00
Michal Kváček 8bd30d0301 FEATURE: add number of views in page 2016-09-20 01:04:23 +02:00
Michal Kváček f087da1b43 FEATURE: prepare for installing templates 2016-09-20 00:46:32 +02:00
Michal Kváček 7a681fd7f7 FEATURE: remove modularAdmin logo from login and layout 2016-09-19 20:43:23 +02:00
Michal Kváček 2e483c7598 FEATURE: add html template 2016-09-19 20:35:59 +02:00
Michal Kváček f98065e849 FEATURE: delete unnecessary templates 2016-09-17 19:47:46 +02:00
Michal Kváček 48294842bf FEATURE: rewrite widgets management into new layout 2016-09-15 23:52:01 +02:00
Michal Kváček 65e9ca1c32 FEATURE: minor change in icon (remove->trash) 2016-09-14 20:29:25 +02:00
Peter Hrdlica 233f2007b0 Initial Dobroty z pece 2016-09-14 09:34:57 +02:00
Michal Kváček 5b29082ca6 Merge branch 'dev' into module_blog 2016-09-13 03:53:29 +02:00
Michal Kváček 48c0abbe89 FEATURE: add few czech translations 2016-09-13 03:52:44 +02:00
Michal Kváček 8476d5fbd7 FEATURE: add working confirm dialog 2016-09-13 03:51:50 +02:00
Michal Kváček ea5aa8d873 FEATURE: make content pages list responsive 2016-09-13 03:51:34 +02:00
Michal Kváček 3229a84ee5 FEATURE: make user list vertical 2016-09-13 02:57:42 +02:00
Michal Kváček f8127f3ed6 FEATURE: add article list -- advanced options 2016-09-07 02:21:30 +02:00
Michal Kváček 44677aea78 FEATURE: add basic article list 2016-09-07 00:47:57 +02:00
Michal Kváček 5b7b81ff4d FIX: remove echo from TemplateRegistrator 2016-09-07 00:28:03 +02:00
Michal Kváček 68d37e87f6 FIX: fix module installator to skip Database directory in subdmodules 2016-09-07 00:06:44 +02:00
Michal Kváček 51d6850cd6 FEATURE: add selecting comments into template in visitors area 2016-09-06 12:47:54 +02:00
Michal Kváček 8f66a96ec0 FEATURE: add comments management 2016-09-05 16:05:14 +02:00
Michal Kváček 9ce9f62a45 FEATURE: add creating comments 2016-09-05 12:50:04 +02:00
Michal Kváček a33023a4aa FEATURE: remove not used templates 2016-09-05 12:49:44 +02:00
Michal Kváček d2d0a48e9c FEATURE: add czech translation to article submodule 2016-09-05 00:10:46 +02:00
Michal Kváček e55672bdcd FEATURE: support submodules in translation helper command 2016-09-05 00:10:31 +02:00
Michal Kváček 5ef2630810 FEATURE: make title in contents overview translatable and modifiable by module 2016-09-05 00:00:52 +02:00
Michal Kváček 8c4b1ad69b FIX: fix saving title photo in content pages 2016-09-04 23:33:56 +02:00
Michal Kváček 59dede6049 FEATURE: add comments into articles 2016-09-04 23:20:07 +02:00
Michal Kváček f304ef0141 FEATURE: add nice checkbox into settings 2016-09-04 21:47:22 +02:00
Michal Kváček 3cfadc380d FIX: fix default settings for language 2016-09-04 21:41:22 +02:00
Michal Kváček b73b575b71 FEATURE: make user management nicer 2016-09-04 21:31:56 +02:00
Michal Kváček 9b64b54d7b FEATURE: update project dependencies 2016-09-04 05:04:26 +02:00
Michal Kváček e826b474b8 FEATURE: tweak a little bit footer 2016-09-04 04:23:49 +02:00
Michal Kváček 9d63c8d8b0 FEATURE: add link to index page and move template management into system submenu 2016-09-04 04:16:46 +02:00
Michal Kváček aa4161e451 FEATURE: add search 2016-09-04 03:56:35 +02:00
Michal Kváček 9029f14523 FEATURE: add file detail/edit form in file manager 2016-09-04 03:40:45 +02:00
Michal Kváček 98c8313475 FIX: fix active state in sidebar menu 2016-09-04 03:40:32 +02:00
Michal Kváček 8351137206 FEATURE: add settings 2016-09-04 03:31:07 +02:00
Michal Kváček 79ec8e1d2e FEATURE: add action log in bootstrap 2016-09-04 03:08:58 +02:00
Michal Kváček 418d9ac4ca FEATURE: style templates management 2016-09-04 02:42:55 +02:00
Michal Kváček d0be4d1e49 FEATURE: style categories 2016-09-04 02:28:06 +02:00
Michal Kváček 4cfd93161b FIX: fix rendering dividers in submenus 2016-09-04 02:21:58 +02:00
Michal Kváček 05efb6b9f2 FEATURE: add divider before list of all content pages 2016-09-04 02:21:44 +02:00
Michal Kváček 66caf7ce05 FEATURE: ugly commit - rewritten widgets, menu made more compact, added profile menu, few bugfixes etc. Sorry.. 2016-09-04 01:52:17 +02:00
Michal Kváček 9c02c63704 FEATURE: style user management 2016-08-28 00:24:38 +02:00
Michal Kváček 8458622e32 FEATURE: redirect to last page when session has expired 2016-08-25 01:03:35 +02:00
Michal Kváček f1121107c5 FEATURE: add users overview 2016-08-23 23:36:54 +02:00
Michal Kváček d954743e8b FIX: fix route to user edit 2016-08-23 23:36:36 +02:00
Michal Kváček 0a6528a845 FEATURE: style file manager 2016-08-23 23:07:44 +02:00
Michal Kváček f744ca81ca FEATURE: add login form title 2016-08-23 23:06:52 +02:00
Michal Kváček 3a82696d62 FEATURE: rewrite contact form admin into new theme 2016-08-23 00:34:01 +02:00
Michal Kváček cd6f1b4cfa FEATURE: style buttons in content edit 2016-08-23 00:14:17 +02:00
Michal Kváček 28478ba165 FEATURE: add templates for content history 2016-08-23 00:14:06 +02:00
Michal Kváček d746d5b52b FEATURE: add content page overview 2016-08-22 23:29:04 +02:00
Michal Kváček f6fd924cbd FEATURE #1435: few smaller UI tweaks in creating new content page 2016-08-19 13:20:16 +02:00
Michal Kváček 0d1d692c45 Merge branch 'module_blog' into admin_theme 2016-08-19 13:19:14 +02:00
Michal Kváček 6f6497d540 FEATURE #1435: add base of content overview and creating new content 2016-08-18 13:21:35 +02:00
Michal Kváček 7889548a7e FEATURE #1435: small changes in layout 2016-08-18 13:21:05 +02:00
Michal Kváček fc1141184c FEATURE #1435: add login and layout of new admin theme 2016-08-16 16:07:14 +02:00
Michal Kváček 0993d812cb FIX: fix routes to writing new blog and blog post overview 2016-08-16 13:20:30 +02:00
Michal Kváček be81834aad FEATURE: add stub of module for comments 2016-08-16 13:20:07 +02:00
Michal Kváček e389760204 Merge branch 'dev' into module_blog 2016-08-16 00:53:35 +02:00
Michal Kváček 6f799f00bb FEATURE: add support for writing blog posts 2016-08-16 00:52:09 +02:00
Michal Kváček debe80a314 FEATURE: implement loadExtraData as empty function in Handler 2016-08-16 00:51:17 +02:00
Michal Kváček af3db57b29 FEATURE: add translation for history.columnCategory 2016-08-16 00:50:37 +02:00
Michal Kváček 8edde44c0d FIX: fix saving new content without category 2016-08-16 00:50:00 +02:00
Michal Kváček cd369c327f FEATURE: add templates to blog/article 2016-08-15 23:16:06 +02:00
Michal Kváček 206e5201b8 FIX: reset namespace and module ID after each registered path 2016-08-15 22:24:23 +02:00
Michal Kváček aa462c2454 FIX: make artisan install-module really work with submodules 2016-08-15 21:39:18 +02:00
Michal Kváček ae1123ba39 FEATURE: add blog module stub 2016-08-15 20:49:12 +02:00
Michal Kváček bd06797c24 FEATURE: do not use Module::enabled() in registering admin menu 2016-08-15 20:48:17 +02:00
Michal Kváček 5b79fd4323 FIX: ignore enumeration duplicities with null as key 2016-08-15 20:47:52 +02:00
Michal Kváček 53d532da82 FEATURE: make artisan command for installing work with submodules 2016-08-15 20:47:34 +02:00
Michal Kváček fa21c407b4 FEATURE: add support for submodules 2016-08-15 20:46:54 +02:00
Michal Kváček d54f160d6a FIX: fix showing/hiding categories when categories module is not enabled 2016-08-14 17:13:20 +02:00
Michal Kváček 5df5fa8480 FIX: fix module install - manages_content field 2016-08-13 20:35:57 +02:00
Michal Kváček ddd3530993 Merge branch 'module_categories' into dev 2016-08-13 19:03:16 +02:00
Michal Kváček befb95a4ac FEATURE: add relationship methods to categories and content 2016-08-13 19:02:58 +02:00
Michal Kváček dc185bdc2e FEATURE: log not writable module.json in modules 2016-08-13 18:59:14 +02:00
Michal Kváček 42967e72cd Merge branch 'module_categories' into dev 2016-08-13 17:55:23 +02:00
Michal Kváček 85e10b5631 Merge branch 'module_static_pages' into dev 2016-08-13 17:55:16 +02:00
Michal Kváček 54e5927bb1 FEATURE: add support for categories into content save/edit 2016-08-13 17:48:44 +02:00
Michal Kváček 9517d07692 REFACTORING: delete not used files 2016-08-13 16:58:37 +02:00
Michal Kváček 93abfd2485 REFATORING: delete not used files 2016-08-13 16:57:16 +02:00
Michal Kváček 5aec27478a FEATURE: add translations and more friendly look to categories 2016-08-13 16:51:53 +02:00
Michal Kváček 9f955d4544 FEATURE: add category edit and overview 2016-08-11 23:47:24 +02:00
Michal Kváček 597d161a38 FEATURE: add tree view into creating new category 2016-08-11 00:49:05 +02:00
Michal Kváček 48d301330f FEATURE: add basic form for adding new category 2016-08-11 00:27:22 +02:00
Michal Kváček 03f0d71dbb FEATURE: add structure for categories 2016-08-11 00:26:52 +02:00
Michal Kváček 778c87ffa3 FEATURE: install franzose/closure-tables 2016-08-11 00:26:06 +02:00
Michal Kváček ed0b35f9d7 FEATURE: initial commit of module for categories 2016-08-09 01:14:02 +02:00
Michal Kváček cfc3a148e7 FEATURE: prepare handlers for categories 2016-08-09 01:13:44 +02:00
Michal Kváček a698d7a7db FEATURE: add marks for modules 2016-08-09 01:04:03 +02:00
Michal Kváček ba107184e1 FIX: fix missing FK in contents->templates 2016-08-08 23:00:24 +02:00
Michal Kváček 7abd60e785 FEATURE: change collation of all non-utf8_unicode_ci tables 2016-08-01 23:19:13 +02:00
Michal Kváček 0d5e6d4133 FEATURE: add possibilityy to upload and assign files to content pages 2016-07-29 01:22:49 +02:00
Michal Kváček 790cc772a9 FIX: fix missing settings in login form 2016-07-28 15:14:43 +02:00
Michal Kváček 0d8148f22d FEATURE: allow multiple uploads 2016-07-26 15:31:01 +02:00
Michal Kváček bef37a5cce FIX: fix saving content pages - typo in save method 2016-07-26 14:39:48 +02:00
Michal Kváček be4a136476 FEATURE: add lock to URL 2016-07-26 14:39:27 +02:00
Michal Kváček 5fc4393729 FEATURE: add rest of missing czech translations 2016-07-26 12:55:06 +02:00
Michal Kváček 097d76de93 FEATURE: first few czech translations 2016-07-24 00:12:17 +02:00
Michal Kváček 0076cfba2e FIX: use LaravelLocalizationServiceProvider in CLI, but do not throw exceptions when table languages is missing 2016-07-23 23:54:57 +02:00
Michal Kváček 6b24c8a461 FIX: do not use localization service provider in CLI 2016-07-23 22:28:54 +02:00
Michal Kváček 3733d24da8 Merge branch 'multilanguage' into dev 2016-07-23 21:56:30 +02:00
Michal Kváček b2b8084cfe DOC: add few comments 2016-07-23 21:51:59 +02:00
Michal Kváček ab3d8eab41 FEATURE: make settings translatable 2016-07-23 21:47:20 +02:00
Michal Kváček b89941b909 FIX: fix saving and displaying menu with non-existing pages 2016-07-22 16:30:20 +02:00
Michal Kváček bce98e6eaf FEATURE: Add language into widgets 2016-07-22 15:30:03 +02:00
Michal Kváček f90aee4108 FEATURE: add language to content pages 2016-07-22 14:55:51 +02:00
Michal Kváček 2189bbed5e FEATURE: language switch works - changes translations 2016-07-22 11:57:13 +02:00
Michal Kváček ebc7330717 FEATURE: show diff as escaped HTML 2016-07-22 01:01:38 +02:00
Michal Kváček bab897f01e FEATURE: add language selector in admin 2016-07-22 00:44:40 +02:00
Michal Kváček fb2c705ac4 FEATURE: add service provider for registering languages 2016-07-22 00:44:27 +02:00
Michal Kváček 6021f1ea9a FEATURE: add fields for languages 2016-07-22 00:43:52 +02:00
Michal Kváček 181e1fb721 FEATURE: create directory for translations if not exist 2016-07-22 00:42:45 +02:00
Michal Kváček 5b54f6d45f FEATURE: install laravel-localization 2016-07-21 23:47:19 +02:00
Michal Kváček 15a29de894 UPDATE: update dependencies 2016-07-21 23:22:26 +02:00
Michal Kváček db912c4c91 FEATURE: add language table 2016-07-21 23:11:05 +02:00
Michal Kváček 949b1f7c61 FEATURE: add translation command into Artisan 2016-07-21 22:46:48 +02:00
Michal Kváček fc88a82888 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-20 19:23:50 +02:00
Michal Kváček bfcab20dad Merge branch 'dev' into test.customwristbands.cz 2016-04-20 19:23:38 +02:00
Michal Kváček 93bafee2e7 FIX: redirect to directory detail after file delete 2016-04-20 19:23:26 +02:00
Michal Kváček 3a6211c875 FIX: fix escaped pagination in content overview 2016-04-20 19:22:57 +02:00
peter e072e0e4af FEATURE: added some more changes for client 2016-04-19 00:16:38 +02:00
peter 070e929bf7 FEATURE: changes according to client mostly in texts and some graphical changes. HTML code validation changes 2016-04-18 23:48:40 +02:00
Michal Kváček 6dd6394ff1 Merge branch 'dev' into test.customwristbands.cz 2016-04-11 02:09:22 +02:00
Michal Kváček 5c6b72f83a Merge branch 'module_gallery' into dev 2016-04-11 01:35:28 +02:00
Michal Kváček 6a4cbb0a5c FEATURE: display only modules, which manages content in Web content tab 2016-04-11 01:35:09 +02:00
Michal Kváček 098ea3e7b1 FEATURE #1551: add deleting directory after page deletion. 2016-04-11 01:34:01 +02:00
Michal Kváček a48bed04b1 FEATURE: add content id to directory name (only for galleries) 2016-04-11 01:33:27 +02:00
Michal Kváček 288b1043b5 FEATURE #1551: add method for deleting extra content 2016-04-11 01:20:11 +02:00
Michal Kváček 492225e176 Merge branch 'dev' into test.customwristbands.cz 2016-04-08 14:14:40 +02:00
Michal Kváček 951a8314b7 FIX: fix escaping latin accents to HTML entities 2016-04-08 01:21:44 +02:00
Michal Kváček c99cee7a27 FEATURE: make CKEditor look nicer 2016-04-08 01:08:04 +02:00
Michal Kváček e94fff384a Merge branch 'sitemap' into dev 2016-04-08 00:17:06 +02:00
Michal Kváček 08026b286a FEATURE: remove config from .gitignore and turn on cache 2016-04-08 00:16:56 +02:00
Michal Kváček 5b97335536 REFACTORING: remove unnecessary files from public directory 2016-04-08 00:16:29 +02:00
Michal Kváček 8b157052e0 FEATURE: move robots.txt from public into root directory 2016-04-08 00:14:06 +02:00
Michal Kváček 01d9df4dd0 FEATURE: add all directories and files into .htaccess to be prevented from viewing from website 2016-04-08 00:13:46 +02:00
Michal Kváček 971fc796a8 FEATURE #1550: compute changefreq for entries in sitemap 2016-04-07 23:45:53 +02:00
Michal Kváček fa28de48ca DOCUMENTATION: add documentation for controller with sitemap 2016-04-07 23:17:48 +02:00
Michal Kváček 037d0c8dff FIX: remove spaces BEFORE <?php tagg a index.php 2016-04-07 23:00:05 +02:00
Michal Kváček 18ead80b5f FEATURE #1550: add basic sitemap
Probably will not work, because Laravel prepends first line of document with some spaces or what. However maybe its just behavior on my localhost.
2016-04-07 22:18:11 +02:00
peter d75c2838d3 FIX: homepage assortment list 2016-04-07 19:50:01 +02:00
peter 25860ae501 Merge branch 'test.customwristbands.cz' into customwristbands.cz 2016-04-07 19:47:47 +02:00
peter 56e2636e6c FEATURE: changes according to client 2016-04-07 19:47:29 +02:00
peter 509ae17fca Merge branch 'customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into customwristbands.cz 2016-04-07 18:16:01 +02:00
peter a20b9144a5 FEATURE: binarity footer for default layout 2016-04-07 18:15:12 +02:00
peter 59503baa9c Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-07 18:13:53 +02:00
peter b996ef493d FEATURES: changed layout according to what clients asked for, added binarity link into footer, some other small changes 2016-04-07 18:13:29 +02:00
Michal Kváček 5bc077989f Merge branch 'test.customwristbands.cz' into dev 2016-04-07 00:24:04 +02:00
Michal Kváček 725c379cd7 Merge branch 'customwristbands.cz' into dev 2016-04-07 00:23:51 +02:00
Michal Kváček eb8e7badd6 Merge branch 'customwristbands.cz' into test.customwristbands.cz 2016-04-07 00:23:30 +02:00
peter 0cc1916346 Merge branch 'test.customwristbands.cz' into customwristbands.cz 2016-04-07 00:14:49 +02:00
peter 5116fedac0 FIX: contact layout lat and long changes from parseInt to parseFloat 2016-04-07 00:14:21 +02:00
Michal Kváček 474405c69d FIX: fix ambiguous module_handler in content overview 2016-04-06 23:55:18 +02:00
Michal Kváček 74838f96fa FEATURE: remove page name from button in overview 2016-04-06 20:33:10 +02:00
Michal Kváček d231065fb8 Merge branch 'dev' into test.customwristbands.cz 2016-04-06 20:31:02 +02:00
Michal Kváček 7fc01fa1ec FIX: fix typo in COALESCE and escaping 2016-04-06 20:30:55 +02:00
Michal Kváček 5858820cb7 Merge branch 'dev' into test.customwristbands.cz 2016-04-06 20:28:22 +02:00
Michal Kváček 43051501bd FIX: when user did not fill his name, use email for content overview 2016-04-06 20:28:16 +02:00
Michal Kváček e3d715d2d0 Merge branch 'dev' into test.customwristbands.cz 2016-04-06 20:23:54 +02:00
Michal Kváček a4af5e2bac FIX: fix content page overview - changed join to left join 2016-04-06 20:23:47 +02:00
Michal Kváček 666557b585 Merge branch 'dev' into test.customwristbands.cz 2016-04-06 20:19:27 +02:00
Michal Kváček 85c33e9ada FEATURE: make overview in content pages little bit cleaner 2016-04-06 20:19:11 +02:00
Michal Kváček 6690d7423e FEATURE: swap date and action name in log 2016-04-06 19:13:46 +02:00
Michal Kváček d996c4c800 FIX: fix menu 'active' status when homepage is displayed 2016-04-06 19:10:33 +02:00
Michal Kváček de287abf24 OPTIMALIZATION: cache widget area content for one pageload 2016-04-06 19:06:03 +02:00
Michal Kváček fc9f3a403b FEATURE #1544: add social profile links into settings 2016-04-06 18:55:56 +02:00
Michal Kváček dcce436c59 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-06 18:02:25 +02:00
Michal Kváček 543cce17fa FIX: fix exception when debug bar was not installed 2016-04-06 18:01:31 +02:00
peter 2f7a3790b9 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-06 17:45:30 +02:00
peter d721aaf185 FEATURES: changes according to clients requests, simple mail template, some other small changes 2016-04-06 17:45:05 +02:00
Michal Kváček 303a84904e Merge branch 'dev' into test.customwristbands.cz 2016-04-06 17:26:15 +02:00
Michal Kváček e2f6fed4b1 Merge branch 'customwristbands.cz' into test.customwristbands.cz 2016-04-06 17:26:12 +02:00
Michal Kváček 87e4e96ca5 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-06 17:26:03 +02:00
Michal Kváček d7e5351d5b Merge branch 'widget_menu' into dev 2016-04-06 17:25:01 +02:00
Michal Kváček 1efaaaa4e0 FIX: fix failing menu on non-existing page 2016-04-06 17:24:29 +02:00
Michal Kváček 2eeb3227d3 FEATURE #1546: add subject for contact form 2016-04-06 17:23:46 +02:00
Michal Kváček b7c70bab7e FIX: fix duplicate url
In this way, deleted page will no longer "occupy" url.
2016-04-06 02:13:15 +02:00
Michal Kváček c3085180c0 Merge branch 'customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into customwristbands.cz 2016-04-06 02:03:44 +02:00
Michal Kváček 885dc691b2 Merge branch 'dev' into test.customwristbands.cz 2016-04-06 02:03:20 +02:00
Michal Kváček 4594e84945 FIX: change url to something random after content delete.
In this way, deleted page will no longer "occupy" url.
2016-04-06 01:48:14 +02:00
peter c42f860e9f Merge branch 'test.customwristbands.cz' into customwristbands.cz 2016-04-05 23:51:03 +02:00
peter 0ba38d146c FEATURE: removed some data from gallery 2016-04-05 23:48:59 +02:00
peter a42c1fb6c7 Merge branch 'customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into customwristbands.cz 2016-04-05 23:38:59 +02:00
peter b46c99efc4 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-05 23:38:03 +02:00
peter dddabe7724 FEATURE: added sortiment subpage template 2016-04-05 23:37:40 +02:00
Michal Kváček afc2af6e9b Merge branch 'customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into customwristbands.cz 2016-04-05 22:28:44 +02:00
Michal Kváček 9fe7e04e2f Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-05 22:28:16 +02:00
Michal Kváček ced6f978a8 FEATURE: add check for failed git pull in update 2016-04-05 22:27:22 +02:00
peter 522110aea1 FIX: homepage error 2016-04-05 22:06:15 +02:00
peter 5d1254da18 FEATURE: changed homepage template 2016-04-05 21:53:52 +02:00
Michal Kváček 7446e2f4ef FEATURE: add unlimited depth of subpages 2016-04-05 21:42:22 +02:00
Michal Kváček 9570ad3da3 FIX: fix view method in creating new user 2016-04-05 21:01:33 +02:00
peter 54f0566ee2 FEATURE: functional gallery template and lightbox 2016-04-05 19:26:56 +02:00
Michal Kváček d17a0ec8ef Merge branch 'dev' into test.customwristbands.cz 2016-04-04 23:40:22 +02:00
Michal Kváček ae1772652f FEATURE: add switch for installing on true - without git@binarity.cz: 2016-04-04 23:02:12 +02:00
Michal Kváček 19ad81a432 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-04 22:56:19 +02:00
Michal Kváček dac9de0024 FEATURE: add script for update and improve little bit installation 2016-04-04 22:53:17 +02:00
peter 281a1ed0ba FEATURE: defaults for address 2016-04-04 22:14:55 +02:00
Michal Kváček 9d2488e589 FEATURE: sort settings extensions 2016-04-04 22:00:47 +02:00
peter d3437aa2de FEATURE: functional contact page 2016-04-04 22:00:17 +02:00
Michal Kváček 1a33c74c6d REFACTORING: return / instaed of DIRECTORY_SEPARATOR in service providers 2016-04-04 21:48:05 +02:00
Michal Kváček 439b048590 FEATURE: add groups to published views in modules 2016-04-04 21:44:15 +02:00
Michal Kváček 743c6bdb07 FEATURE: add info about not-set homepage into contents overview 2016-04-04 21:43:11 +02:00
Michal Kváček 51b60440be FIX: catch exceptions on homepage 2016-04-04 21:42:13 +02:00
Michal Kváček ceaf9e7d6a FIX: fix saving new column type for content 2016-04-04 21:19:32 +02:00
Michal Kváček 30dcd045a6 FEATURE: add blade macro @upload 2016-04-04 21:15:54 +02:00
Michal Kváček a020e72dc5 FIX: fix publishing module views 2016-04-04 20:55:08 +02:00
Michal Kváček 3c90e20dd3 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-04 20:45:20 +02:00
Michal Kváček 33bd049d92 Merge branch 'dev' into test.customwristbands.cz 2016-04-04 20:45:04 +02:00
peter b06c2bf5a0 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-04 20:42:00 +02:00
Michal Kváček 090aed23cb FEATURE: add template helper for uploaded files url 2016-04-04 20:41:46 +02:00
peter d0411feebf FEATURE #1525: functional contact form template 2016-04-04 20:41:33 +02:00
Michal Kváček 3613c0fcf5 Merge branch 'test.customwristbands.cz' of binarity.cz:/opt/git/internal/cms/minicms into test.customwristbands.cz 2016-04-04 20:29:58 +02:00
Michal Kváček aff8e992d6 Merge branch 'module_contact_form' into dev 2016-04-04 20:29:24 +02:00
Michal Kváček 2d25e00d76 FEATURE: add second email into contact form
This commit adds second email into contact form - this one may be different from email used for delivering messages.
2016-04-04 20:26:51 +02:00
Michal Kváček 0f18b6361e FEATURE: add ajax response to contact form 2016-04-04 20:26:25 +02:00
Michal Kváček f27ad7c421 FIX: fix theme:set command.
This command did not set theme properly, when THEME was in .env file, but with no value (THEME= only - as default in .env.example).
2016-04-04 20:20:33 +02:00
peter 753b0cf2e2 FEATURE #1525: fully functional homepage design 2016-04-04 19:07:51 +02:00
peter 85dcf29c41 FIX: returned back .env.example 2016-04-04 11:13:11 +02:00
peter 503d209319 FIX: removed echo 2016-04-04 11:12:04 +02:00
peter ccf71dba81 FEATURE: more directory separators for static pages provider 2016-04-04 11:05:09 +02:00
peter 3646c79e1d Merge branch 'dev' into test.customwristbands.cz 2016-04-04 11:02:48 +02:00
peter 1f3cc2eebb FEATURE: directory separator for static pages provider 2016-04-04 11:01:49 +02:00
Michal Kváček 8a33f1b4c7 FIX: convert / to DIRECTORY_SEPARATOR for gallery and contact form 2016-04-04 10:59:52 +02:00
Michal Kváček 08cb40b004 Merge branch 'module_gallery' into dev 2016-04-03 02:39:09 +02:00
Michal Kváček 96d6f517dc FEATURE: add translation for template path 2016-04-03 02:39:03 +02:00
Michal Kváček d4ad1406bf Merge branch 'module_contact_form' into dev 2016-04-03 02:37:04 +02:00
Michal Kváček 9b2451fd98 FEATURE: add directory name for error pages 2016-04-03 02:36:30 +02:00
Michal Kváček 90b6979237 FIX: fix template path name for contact form 2016-04-03 02:35:44 +02:00
Michal Kváček 97ba21df98 FIX: remove link to non-existing controller 2016-04-03 02:35:14 +02:00
Michal Kváček c481f374a0 FIX: fix forgotten var_dump & die in EditContent 2016-04-03 02:20:56 +02:00
Michal Kváček d3f31c578f Merge branch 'module_static_pages' into dev 2016-04-03 02:16:46 +02:00
Michal Kváček 7947926f8d REFACTORING: remove not-used events and listeners in static pages 2016-04-03 02:16:36 +02:00
Michal Kváček a989421036 REFACTORING: remove some unneccessary files 2016-04-03 02:16:07 +02:00
Michal Kváček d0438f56dd FEATURE: add content page logging 2016-04-03 02:14:55 +02:00
Michal Kváček 7de45fe377 FEATURE #1532: add ip and user agent into logged information 2016-04-03 02:13:46 +02:00
Michal Kváček 9f8eb230e8 FIX: add .woff into supported extensions from assets 2016-04-03 00:47:00 +02:00
Michal Kváček 1914c17deb Merge branch 'test.customwristbands.cz' into dev 2016-04-03 00:45:44 +02:00
Michal Kváček 181f8a7e23 FIX: fix typo in homepage subpages 2016-04-02 21:25:14 +02:00
Michal Kváček 3a84279916 FIX: fix .htaccess so it can work properly with assets directory 2016-04-02 20:44:18 +02:00
Michal Kváček cfa9e2b09c Merge branch 'module_gallery' into dev 2016-04-02 20:26:49 +02:00
Michal Kváček 5178c7236b Merge branch 'dev' into test.customwristbands.cz 2016-04-02 20:09:27 +02:00
Michal Kváček 1e6bc86800 FEATURE: add basic templates for errors handling 2016-04-02 20:09:24 +02:00
Michal Kváček a620bf9e32 FEATURE: add possibility to style errors (404, 503 and unavailable homepage) 2016-04-02 20:08:55 +02:00
Michal Kváček 7cc04bc9ce FIX: fix exception cathing when registering template path 2016-04-02 20:08:02 +02:00
Michal Kváček a56fdfb6ce Merge branch 'dev' into test.customwristbands.cz 2016-04-02 19:20:37 +02:00
Michal Kváček 213283b51f Merge branch 'widget_orbit_slider' into dev 2016-04-02 19:20:19 +02:00
Michal Kváček 369cefe15f FEATURE: add blade template for homepage 2016-04-02 19:19:26 +02:00
Michal Kváček 284837bf12 REFACTORING: change p to button in slider 2016-04-02 19:17:31 +02:00
Michal Kváček a0ec4fc02f FIX: do not forget old values when creating slider 2016-04-02 19:14:48 +02:00
Michal Kváček f11c673173 FIX: fix widget saving - cast array to object when needed 2016-04-02 19:13:13 +02:00
Michal Kváček ce030a40d4 FEATURE: cache results for Content::subpages() 2016-04-02 19:11:46 +02:00
Michal Kváček 31c1648597 FEATURE #1530: make urls without /public
This change consist in renaming server.php to index.php, tweaking /.htaccess and replacing all asset('../resources....') with asset('resource/...') path. Everything should work fine now.
2016-04-02 16:56:53 +02:00
Michal Kváček 7bb63aca3f Merge branch 'cwbs_template' into dev 2016-04-02 13:26:21 +02:00
Michal Kváček 497708283f FEATURE #1528: add button for creating slider from gallery 2016-04-02 13:14:58 +02:00
Michal Kváček 2797ff0a89 REFACTORING: move method prepareSettings from presenter into widget handler 2016-04-02 10:35:48 +02:00
Michal Kváček 307dbe0459 FEATURE: add settings for displaying/hiding bullets in slider 2016-04-02 10:15:13 +02:00
Michal Kváček 9f4cc158db FEATURE #1527: add settings for displaying more images per row 2016-04-02 09:56:53 +02:00
Michal Kváček 19e0977bbb FEATURE #1496: add simple menu 2016-04-02 08:03:35 +02:00
peter 3900462229 FEATURE #1525: responsive menu 2016-04-02 00:53:51 +02:00
peter c48b99eaf0 Merge branch 'cwbs_template' of binarity.cz:/opt/git/internal/cms/minicms into cwbs_template 2016-04-01 23:33:57 +02:00
peter 34060ebf2e FEATURE #1525: responsive designs for small devices 2016-04-01 23:32:40 +02:00
Michal Kváček bc73fbc208 Merge branch 'dev' into widget_menu 2016-04-01 21:57:44 +02:00
Michal Kváček 32604653fb FEATURE: add default template for gallery 2016-04-01 21:51:15 +02:00
Michal Kváček 8de2c67323 Merge branch 'module_gallery' into cwbs_template 2016-04-01 21:50:55 +02:00
Michal Kváček f9afcae389 FEATURE #1526: add simple photogallery
Photogallery currently works with directories, UI is terrible, but it works.
2016-04-01 21:50:05 +02:00
Michal Kváček b9f721006d Merge branch 'search' into dev 2016-04-01 20:52:26 +02:00
Michal Kváček 3f7c048ad0 Merge branch 'dev' into module_contact_form 2016-04-01 20:49:00 +02:00
Michal Kváček acd85a1cad FEATURE: add editation to contact form 2016-04-01 20:48:44 +02:00
Michal Kváček 811f2162c9 FEATURE: force history to save even module_settings fields 2016-04-01 20:47:55 +02:00
Michal Kváček 3f03af7e03 FIX: copy-paste error - content editation used form for creating content 2016-04-01 20:47:43 +02:00
peter 7a71bbe90e Merge branch 'cwbs_template' of binarity.cz:/opt/git/internal/cms/minicms into cwbs_template 2016-04-01 19:37:29 +02:00
peter 5e51edcd48 FEATURE #1525: Added responsive version of contacts page for 1000px 2016-04-01 19:34:50 +02:00
Michal Kváček f0f95cc04f FEATURE: add basic for contact form 2016-04-01 17:52:10 +02:00
Michal Kváček 7a23ca1d3f Merge branch 'dev' into cwbs_template 2016-04-01 17:51:50 +02:00
Michal Kváček 9cda47f93d Merge branch 'module_contact_form' into dev 2016-04-01 17:51:03 +02:00
Michal Kváček a478f1491e FEATURE: make email sending working 2016-04-01 17:50:49 +02:00
Michal Kváček 5f050a7dea FEATURE: set config for sending emails 2016-04-01 17:48:23 +02:00
peter c2f024f8b8 FEATURE #1525: homepage for 1000px version ready 2016-04-01 17:10:45 +02:00
Michal Kváček f90f43fcd6 FEATURE: create module for contact form.
Currently contact form can be created, edit is not done yet. And also email sending neither work, now.
2016-04-01 17:04:10 +02:00
Michal Kváček 8838ecc6b1 FIX: fix ModuleManager service provider.
This service provider checked, if FILE was writable. When no file existed, it could not be writtable and therefore no module.json was created.
2016-04-01 17:03:04 +02:00
Michal Kváček efd2465b8b FIX: fix saving settings
Until now, only existing settings could be saved. No new records, only updates.
2016-04-01 17:00:55 +02:00
Michal Kváček 0c1162589c FIX: fix content edit
Content edit was strongly limited only on static pages. This limit was removed in this commit.
2016-04-01 17:00:10 +02:00
Michal Kváček 509ef1752e FEATURE: add publishing assets and views into installer 2016-04-01 12:06:59 +02:00
Michal Kváček 10dfe6b22e FEATURE: temporarily hide custom fields 2016-04-01 02:31:42 +02:00
Michal Kváček 5661a3d849 FIX #1438: disable role and status change for logged user 2016-04-01 02:06:22 +02:00
Michal Kváček cf2b4ac529 FEATURE: temporarily hide dashboard. 2016-04-01 02:04:09 +02:00
Michal Kváček 2b61709ade FEATURE #1522: add orbit slider
Had to change some things in global widgets management and also in html code widget. Sorry for this ugly commit..
2016-04-01 01:59:16 +02:00
Michal Kváček 6378d17753 FEATURE #1424: add title photo to list of all pages 2016-03-31 22:56:31 +02:00
Michal Kváček 590e1eeaca FEATURE #1423: add uploading of title photo for content pages 2016-03-31 22:39:38 +02:00
Michal Kváček 7d674357fe FEATURE #1518: split templates for content and for homepage 2016-03-31 21:15:24 +02:00
Michal Kváček e789b02a93 FEATURE #1523: add subpages for content 2016-03-31 21:12:54 +02:00
Michal Kváček acc7541ab9 FIX: fix history handling - null values were not updated 2016-03-31 21:11:51 +02:00
Michal Kváček 5045dca3d4 Merge branch 'cwbs_template' into dev 2016-03-31 20:07:03 +02:00
Michal Kváček c99e7c156d FEATURE: move views for default_theme into resource directory 2016-03-31 16:50:42 +02:00
Michal Kváček bc80ccc8e5 Merge branch 'dev' into cwbs_template 2016-03-31 16:50:14 +02:00
Michal Kváček 5494121dfb FEATURE #1518: add assets and views for static pages 2016-03-31 16:50:00 +02:00
Michal Kváček 26e5a52943 FEATURE: provide default template for displaying content of static pages 2016-03-31 16:48:50 +02:00
Michal Kváček 7a51c913d3 FEATURE #1524: merge views into one directory 2016-03-31 16:47:40 +02:00
Michal Kváček c49f4f2c5f Merge branch 'dev' into cwbs_template 2016-03-31 15:42:24 +02:00
Michal Kváček 980fec83c0 FEATURE: add config stubs into .env.example 2016-03-31 15:42:03 +02:00
Michal Kváček 473342490c FEATURE: add new blade macro @asset
This macro is used for loading path for assets on visitor page
2016-03-31 15:35:23 +02:00
peter b40815eec7 FEATURE: added contact template 2016-03-25 21:51:25 +01:00
peter 7317a51a24 FEATURE: added about us template 2016-03-25 21:16:54 +01:00
peter b228fe4615 FEATURE: added gallery template 2016-03-25 20:53:58 +01:00
peter c0f3c2cf07 FEATURE: some small changes in homepage, added assortment layout 2016-03-25 20:44:53 +01:00
peter 9b9362b8e9 FEATURE: initial cwbs template for homepage 2016-03-25 18:46:04 +01:00
Michal Kváček 7ef09ec326 FIX: make installator push created branch even into remote 2016-03-22 21:59:54 +01:00
Michal Kváček 86d7ffdab9 Merge branch 'dev' of binarity.cz:/opt/git/internal/cms/minicms into dev 2016-03-22 21:58:40 +01:00
Michal Kváček d6f0489b5f FEATURE: add installator for this CMS
Installator is written in bash as interactive script.
2016-03-22 21:58:05 +01:00
Michal Kváček 64aec15c8a FIX: fix seed for custom field resources 2016-03-22 16:05:58 +01:00
Michal Kváček 28c065e106 FEATURE: prevent running some service providers in artisan 2016-03-22 16:02:08 +01:00
Michal Kváček 98090f69df FEATURE: add artisan commands for creating db structure 2016-03-22 15:54:47 +01:00
Michal Kváček c2463f5e59 FEATURE: move theme into .env file 2016-03-22 15:53:45 +01:00
Michal Kváček 7788a598f4 FEATURE: *in progress* working on menu widgets 2016-03-22 15:53:23 +01:00
Michal Kváček 6c7122b494 FEATURE: prepare class structure for menu widget. 2016-03-15 15:02:36 +01:00
Michal Kváček 29b0eab314 FEATURE: divide search engines into admin and visitor ones.
After this separation, search engine may be registered once for visitor area (with one presenter) and once for admin area (with different presenter).
2016-03-15 14:12:03 +01:00
Michal Kváček 12f05586ed Merge branch 'search' into dev 2016-03-15 14:03:45 +01:00
Michal Kváček 35fe7aada3 FIX: fix saving meta keywords in content pages.
Keywords were not saved, instaed description was saved two times.
2016-03-15 14:03:10 +01:00
Michal Kváček 55ee35d14b FIX: remove spaces before and after searched string in input 2016-03-15 14:02:01 +01:00
Michal Kváček 3c9c53e04d DOCUMENTATION: add documentation for Search controller 2016-03-15 14:01:24 +01:00
Michal Kváček 6f50549072 FEATURE: register file searching 2016-03-15 14:00:53 +01:00
Michal Kváček b3da43921b FEATURE: prevent searching empty string.
This commit adds exception handling for serching empty string
2016-03-15 14:00:19 +01:00
Michal Kváček c4e65e18c4 FEATURE: add parent class for all search engines 2016-03-15 13:57:40 +01:00
Michal Kváček afbf3d1327 FEATURE: use overviewTiles for list of content pages 2016-03-14 23:27:16 +01:00
Michal Kváček 4d19d4388a FEATURE: add search form to top of page 2016-03-14 23:26:22 +01:00
Michal Kváček 81f6f4e46f FEATURE: add search form with results 2016-03-14 23:26:05 +01:00
Michal Kváček 72d00c8e64 FEATURE: add searching in content pages 2016-03-14 23:25:07 +01:00
Michal Kváček 8a94f1dbab FEATURE: add registering for new search engines. 2016-03-14 17:10:14 +01:00
Michal Kváček a237133227 DOCUMENTATION: add documentantion for installation commands 2016-03-14 13:23:57 +01:00
Michal Kváček 9ac8c24673 Merge branch 'static_pages' into dev 2016-03-14 13:16:26 +01:00
Michal Kváček bee7e732cc FEATURE: move module configuration into database 2016-03-14 13:16:04 +01:00
Michal Kváček e7c5a69f81 FEATURE: add commands for installing modules 2016-03-14 13:15:43 +01:00
Michal Kváček 6d13576185 FEATURE: use module_settings field instaed of config().
This way should be more reliable, because config() is available only after publishing module, however I can't publish module when it does not have config (module.json). In this way I can select all modules from database and generate module.json for each of them.
2016-03-14 13:14:01 +01:00
Michal Kváček 14f2673842 FEATURE: add module_settings to modules table 2016-03-14 13:13:18 +01:00
Michal Kváček 1bd00f1a4f Merge branch 'static_pages' into dev 2016-03-14 10:14:50 +01:00
Michal Kváček 4326105304 Merge branch 'edit' into dev 2016-03-14 10:14:19 +01:00
Michal Kváček c3008f3dcc FEATURE: add extended modules database structure 2016-03-14 10:12:28 +01:00
Michal Kváček e6880c82ec FIX: fix error when module does not have ID yet 2016-03-14 10:11:15 +01:00
Michal Kváček ca2318a529 REFACTORING: make .gitignore nicer 2016-03-14 10:11:15 +01:00
Michal Kváček b707d27c3f FEATURE: add service provider for generating module.json 2016-03-14 10:11:15 +01:00
Michal Kváček f9562d55aa FEATURE: remove published (unwanted) config from /config directory 2016-03-14 10:11:15 +01:00
Michal Kváček a39a402011 FEATURE: add extended modules database structure
FEATURE: add extended modules database structure

squash
2016-03-14 10:11:01 +01:00
Michal Kváček 892a597912 FEATURE: allow enabling of static pages via database 2016-03-14 10:10:00 +01:00
Michal Kváček 85e9e6ebb6 Merge branch 'settings' into dev 2016-03-14 00:53:48 +01:00
Michal Kváček 2941d694da FEATURE: remove hard-coded shared variable "vendorName" 2016-03-14 00:53:04 +01:00
Michal Kváček 2a6672934d FEATURE: add automacally loaded settings into all views 2016-03-14 00:47:06 +01:00
Michal Kváček 0313a1239f FEATURE: add saving settings 2016-03-14 00:46:09 +01:00
Michal Kváček 603e989b1e FEATURE: add registrators for settings form 2016-03-14 00:26:17 +01:00
Michal Kváček 62a600b5fc FEATURE: seed settings table with some basic data 2016-03-14 00:25:56 +01:00
Michal Kváček 1353fbfd79 FEATURE: add settings table 2016-03-14 00:25:46 +01:00
Michal Kváček df3bc22954 FEATURE #1508: merge files and directories overview.
This commit merges list of all uploaded files and created directories into one page. It also modifies way of uploading files. Special page for uploading files was removed (because of no support for directories) and files can be uploaded only via overview.
2016-03-13 22:50:20 +01:00
Michal Kváček 069367a816 FEATURE #1508: add directories to uploaded files
This commit contains both creating and editing directories.
2016-03-13 22:49:29 +01:00
Michal Kváček 8af9943100 FEATURE: remove link to uploading image
Image upload and normal file uploads are same functions. Image can be uploaded via uploading normal file.
2016-03-13 15:24:12 +01:00
Michal Kváček 97fc32c3ae FEATURE #1508: add database structure for directories 2016-03-13 14:41:05 +01:00
Michal Kváček 063ba90ce8 FIX: allow menu registration only for logged user
This funcionality should be acomplished using "auth" middleware, however I am not sure if order of middlewares matter. For this case I have added one if to this middleware.
2016-03-12 11:17:12 +01:00
Michal Kváček 141df72356 FEATURE #1509: remove admin menu from vistors area
Moved middleware providing registration of menu into admin area
2016-03-11 16:48:18 +01:00
Michal Kváček a9a4cb70f0 FIX: fixing some missing translations and other minor bugs 2016-03-11 16:27:26 +01:00
Michal Kváček 0a1a25b300 Merge branch 'static_pages' into dev 2016-03-11 15:48:51 +01:00
Michal Kváček d0601c4fdd FEATURE: add links from history detail back to edit form 2016-03-11 15:48:15 +01:00
Michal Kváček eed7e15650 FEATURE #1507: adapt static pages for new modular content management 2016-03-11 15:47:27 +01:00
Michal Kváček 9f5bd46ca3 FEATURE #1507: modularize content management 2016-03-11 15:43:11 +01:00
Michal Kváček 3407707046 FEATURE: display content with given template 2016-03-09 22:27:43 +01:00
Michal Kváček 03dbf22eb0 FEATURE: add saving templates to static pages 2016-03-09 22:27:43 +01:00
Michal Kváček 661d5c486d REFACTORING: refactor code a little bit.
Removed redundant empty lines, merging config made little bit "cleaner"
2016-03-09 22:24:01 +01:00
Michal Kváček d52dcbcf55 FEATURE: add registering template path 2016-03-09 22:23:31 +01:00
Michal Kváček d7565ec7bf FEATURE: update project dependencies 2016-03-09 22:19:02 +01:00
Michal Kváček d7b247a2e3 FEATURE: add translation of "template" for content history 2016-03-09 22:17:46 +01:00
Michal Kváček a67417380f FEATURE: add enumeration for translating module handlers for their ids
This feature will need bit more optimalization. This is somehow weird approach.
2016-03-09 22:11:49 +01:00
Michal Kváček f79fc78868 FIX: supress error when trying to open non-existing template 2016-03-09 22:09:42 +01:00
Michal Kváček fc58a4d31c FEATURE: allow copying only when directory is wirtable 2016-03-09 22:09:24 +01:00
Michal Kváček fe9e76bf28 FEATURE: add namespaces for copied templates 2016-03-09 22:08:28 +01:00
Michal Kváček 8aa2ebd0b0 FEATURE: add support for registering template paths with module id 2016-03-09 22:07:50 +01:00
Michal Kváček bb7106d706 FEATURE: add module id into contents table 2016-03-09 21:55:27 +01:00
Michal Kváček 464eaf8b17 REFACTORING: remove unneeded AdminMenusProvider 2016-03-08 23:42:16 +01:00
Michal Kváček b6a1a4d444 FIX: fixed broken namespaced translations.
Translations was broken because namespace "staticpages" was loaded (registered) after first usage of this namespace. I do not understand this bug, however it should be fixed now.
2016-03-08 23:42:06 +01:00
Michal Kváček f97ac0e868 FEATURE: remove adding new template 2016-03-08 11:00:00 +01:00
Michal Kváček b8f8c75146 FIX: fixed template numbering.
This commit fixes numbering of edited templates.
2016-03-07 16:37:00 +01:00
Michal Kváček 6723381384 FIX: fix saving template created as copy
Copied templates are automatically stored *only* into custom directory. They cannot be under control of VCS (while they would need to be commited after creating) and therefore are stored only localy. Previous version contained bug, that "previous" template was taken from "original" destination.
2016-03-07 16:34:56 +01:00
Michal Kváček 6e6be7f790 FEATURE: add copying of templates 2016-03-07 16:27:00 +01:00
Michal Kváček fa97ccc032 FEATURE: add basic funcionality for template copies.
This commit contains only basic funcionality.
2016-02-29 18:02:22 +01:00
Michal Kváček 57e08b76a8 FEATURE #1431: add template edit 2016-02-19 15:10:39 +01:00
Michal Kváček 53395bc47a FEATURE #1454: add Ace editor 2016-02-19 15:09:45 +01:00
Michal Kváček d082cee7b5 FEATURE #1455: add template path overview 2016-02-18 18:19:52 +01:00
Michal Kváček f3dde68481 FIX: fix typos in registrating templates 2016-02-18 17:46:15 +01:00
Michal Kváček 66c9d7907a FEATURE #1453: add registration of templates 2016-02-18 16:28:32 +01:00
Michal Kváček 214cc9f3f9 FEATURE #1452: add parent id and name to template_paths table 2016-02-18 14:45:15 +01:00
Michal Kváček 2c95acfe76 FEATURE #1453: add model of template_paths table 2016-02-18 11:39:16 +01:00
Michal Kváček 4e85799403 FEATURE #1452: add table for template paths.
We will not store template directories along with the templates. Templates are now binded to their paths using ID of row in database
2016-02-18 11:35:09 +01:00
Michal Kváček ad457db740 FEATURE #1452: add database migration for adding templates into database 2016-02-17 16:14:26 +01:00
Michal Kváček 6a7402248a Merge branch 'homepage' into dev 2016-02-17 14:15:34 +01:00
Michal Kváček d7c7e642a4 FIX: fix namespace in template name 2016-02-17 14:15:21 +01:00
Michal Kváček 03086f7fd3 FEATURE: add handler for displaying static pages 2016-02-17 13:29:30 +01:00
Michal Kváček 37a698b631 FEATURE #1427: add homepage functionality.
Displaying homepage now depends on module handler
2016-02-17 13:24:16 +01:00
Michal Kváček 6d0e6e26f6 FEATURE #1427: add basic homepage support 2016-02-15 17:09:50 +01:00
Michal Kváček 36fc280f55 FEATURE #1428: add migration for adding flag "is_homepage" to contents 2016-02-15 16:54:08 +01:00
Michal Kváček 9269d8c0b9 Merge branch 'widgets' into dev 2016-02-15 14:30:33 +01:00
Michal Kváček c75a6bd364 FEATURE #1451: add logging to all actions in widget management 2016-02-15 14:30:00 +01:00
Michal Kváček 3b1ca7c1a7 Merge branch 'user_management' into dev 2016-02-15 12:26:44 +01:00
Michal Kváček b344c928b4 REFACTORING: minor changes in new lines and spaces 2016-02-15 12:26:12 +01:00
Michal Kváček b5b41a0888 FEATURE: add link to list of all widgets 2016-02-15 12:26:12 +01:00
Michal Kváček 81a0fc83b9 FEATURE: add widget and widget area preview into Blade template 2016-02-15 12:26:12 +01:00
Michal Kváček c1e65d5651 FEATURE: add events and listeners stubs 2016-02-15 12:26:12 +01:00
Michal Kváček e8f994ff5f FEATURE #1449: assign widget to some widget area 2016-02-15 12:26:12 +01:00
Michal Kváček 1d553d1a15 FEATURE #1450: add widget overview 2016-02-15 12:25:56 +01:00
Michal Kváček 8ba8a45938 FEATURE: add commands for creating new user and changing password of existing one.
This commit adds two new artisan commants user:new and user:change-password.
2016-02-15 12:24:23 +01:00
Michal Kváček ccc2d918c9 FEATURE: add functionality for creating new widget.
This commit adds functionality for creating widget of whatever type. Controller calls widget admin handler, which renders and handles input form.
2016-02-15 12:19:54 +01:00
Michal Kváček 043c842aef FEATURE #1446: add html code widget 2016-02-15 12:19:54 +01:00
Michal Kváček da3046c990 FEATURE #1422: prepare application for registering widgets 2016-02-15 12:19:40 +01:00
Michal Kváček 677acf3dcb FEATURE: add delete functionality for widget areas 2016-02-15 10:28:36 +01:00
Michal Kváček 88d9ca48a3 FEATURE #1420: add functionality for editing widget area 2016-02-15 10:27:33 +01:00
Michal Kváček b290fb3ff5 FEATURE #1421: add widget area overview 2016-02-15 10:27:21 +01:00
Michal Kváček 012b8b7588 FEATURE #1419: add admin for creating new widget area 2016-02-15 10:26:39 +01:00
Michal Kváček d7dbdf7fc5 FEATURE: add routes for widgets and widget areas 2016-02-15 10:26:02 +01:00
Michal Kváček 4a1ca1fcd8 FEATURE: tune a little bit composer.json
Enable optimizing autoloader and setup minimum stability to "dev"
2016-02-15 01:02:51 +01:00
Michal Kváček 2ab3896ee7 FEATURE #1426: add log of all users 2016-02-08 23:05:32 +01:00
Michal Kváček 9de95c24c8 FEATURE: #1425: add user log actions 2016-02-08 21:53:30 +01:00
Michal Kváček 39591c11c3 FIX #1440: fix translation string 2016-02-08 20:54:29 +01:00
Michal Kváček 5f38ad2e3a FEATURE: add icons to static page menu 2016-02-08 20:45:27 +01:00
Michal Kváček c73bc1452b Merge branch 'file_manager' into static_pages 2016-02-08 19:59:07 +01:00
Michal Kváček a5e8eb8fc4 FEATURE #1417: add working buttons.
Buttons for editing and deleting file works as expected. I have also added link to image preview.
2016-02-08 19:56:33 +01:00
Michal Kváček 1a8b07971e FEATURE #1442: add uploaded file detail
This commit adds functionality for editing keywords and description of selected file. This commit also includes JS library for syntax highlighting (https://highlighjs.org)
2016-02-08 19:55:09 +01:00
Michal Kváček 3e9477ddc3 FEATURE #1417: add filtering for file overview 2016-02-08 16:15:03 +01:00
Michal Kváček bd38e3fd98 FEATURE #1417: add uploaded files overview 2016-02-08 16:06:44 +01:00
Michal Kváček e98032a3e1 FEATURE: add file size to uploaded files 2016-02-08 14:50:44 +01:00
Michal Kváček eb28696d82 FEATURE #1442: add stubs for file edit 2016-02-08 14:37:38 +01:00
Michal Kváček df1e1390e7 FEATURE #1417: add stubs for file overview 2016-02-08 14:37:06 +01:00
Michal Kváček d414e53789 FEATURE #1337: add stubs for uploading images 2016-02-08 14:35:56 +01:00
Michal Kváček 24144f6aa4 FEATURE #1337: add file upload
This commit registers new items into admin menu and adds functionality for uploading files.
2016-02-08 14:27:43 +01:00
Michal Kváček 58a3386277 FEATURE #1377: add stubs for uploading files 2016-02-05 22:34:41 +01:00
Michal Kváček 8763a5da95 FEATURE #1413: static pages switched to Ckeditor.
Currently only the basic configuration is used.
2016-02-05 17:32:48 +01:00
Michal Kváček fc33c06613 FEATURE: optimize composer.json
This commit removed unneccessary packages. It also moves some of development packages into require-dev section.
2016-02-05 17:16:34 +01:00
Michal Kváček 1c14bdd390 FEATURE #1413: add Ckeditor 2016-02-05 17:15:43 +01:00
Michal Kváček 8fe0558374 Merge branch 'dev' into history 2016-02-05 17:03:22 +01:00
Michal Kváček 2e276335af FEATURE: module history handler is not called only for module_settings 2016-02-05 17:02:49 +01:00
Michal Kváček aeabe03911 FEATURE #1373: add link to history for static pages 2016-02-05 16:18:18 +01:00
Michal Kváček 620a5545d8 FEATURE #1373: add history of content
This commit contains only core funcionality of displaying history. Module settings must be implemented in each module.
2016-02-05 16:06:13 +01:00
Michal Kváček 0216d923d4 Merge branch 'dev' into user_management 2016-01-29 12:27:03 +01:00
Michal Kváček f262be1dcb FEATURE: allow user edit only for admin 2016-01-29 12:26:39 +01:00
Michal Kváček 780ee89d21 FEATURE #1387: divide routes into groups - one for admin, the rest for other users 2016-01-29 12:25:53 +01:00
Michal Kváček 270f77f451 Merge branch 'static_pages' into dev 2016-01-29 12:00:58 +01:00
Michal Kváček 3a0f7c7cd4 FEATURE: move menu registration into handler class. 2016-01-29 12:00:39 +01:00
Michal Kváček a880ab9e15 FEATURE #1401: add middleware for registering modules 2016-01-29 11:59:57 +01:00
Michal Kváček ee55715093 FEATURE #1374: add logging for static pages 2016-01-29 01:57:12 +01:00
Michal Kváček 593506c646 Merge branch 'user_management' into dev 2016-01-29 00:40:32 +01:00
Michal Kváček 3902a75b2c Merge branch 'static_pages' into dev 2016-01-29 00:40:23 +01:00
Michal Kváček b7d0258f06 Merge branch 'action_log' into dev 2016-01-29 00:40:17 +01:00
Michal Kváček b3c543f06c FEATURE: prepare logging for settings (once it will exist) 2016-01-29 00:37:45 +01:00
Michal Kváček 4a8facc046 FEATURE #1400: add logging for custom fields 2016-01-29 00:36:20 +01:00
Michal Kváček 7054ce53b6 FEATURE #1375: add logging for user edit and creating 2016-01-29 00:22:46 +01:00
Michal Kváček 5fabc08a99 FEATURE #1367: add log of login and logout 2016-01-29 00:20:40 +01:00
Michal Kváček 859d3ce753 FEATURE: add string id into seeder of action log types. 2016-01-28 22:44:03 +01:00
Michal Kváček 26873a2db4 FEATURE: add string id for action log types.
This string ID will be used in each logger for better readability (we will use string identifier except the "magical" integer constant)
2016-01-28 22:42:06 +01:00
Michal Kváček 527b482ab8 FEATURE: make users overview look less ugly 2016-01-28 21:25:13 +01:00
Michal Kváček da23bb4100 TESTING: add tests for writing into bootstrap/cache and storage directories 2016-01-28 20:51:35 +01:00
Michal Kváček 0c7a138e43 FEATURE: add seed and enumeration for action log types 2016-01-28 17:01:54 +01:00
Michal Kváček 703adfcb78 FEATURE #1386: catch CSRF token exception 2016-01-28 16:00:31 +01:00
Michal Kváček 73ff4e9331 FEATURE #1372: add feature for editing static pages.
User can edit static pages. The edit itself also stores history of changed columns.
2016-01-28 15:51:41 +01:00
Michal Kváček 1b2d7db8f3 FEATURE: add quick actions to static page overview 2016-01-28 13:38:30 +01:00
Michal Kváček 0f4ad90cd8 FEATURE: add overview to all static pages 2016-01-28 12:49:27 +01:00
Michal Kváček d9b678036a FEATURE: add overview to all static pages 2016-01-27 20:13:57 +01:00
Michal Kváček 8210eafad5 FEATURE: add displaying errors 2016-01-27 16:25:42 +01:00
Michal Kváček e63f78e67b FEATURE: add content status and wysiwyg editor 2016-01-27 16:07:30 +01:00
Michal Kváček ff80cbca4f Merge branch 'enumerations' into static_pages 2016-01-27 16:03:03 +01:00
Michal Kváček 4506b62387 FEATURE: add enumeration for content statuses 2016-01-27 16:02:45 +01:00
Michal Kváček 63c05ba6f9 Merge branch 'dev' into static_pages 2016-01-27 15:45:36 +01:00
Michal Kváček cac5b1dfb9 FEATURE: init trumbowyg editor 2016-01-27 15:45:14 +01:00
Michal Kváček 19ee504075 FEATURE: add translation for static page 2016-01-27 15:42:35 +01:00
Michal Kváček 5db999e3b1 FEATURE: move static page handler into config 2016-01-27 15:36:11 +01:00
Michal Kváček 35a93091ff FEATURE #1394: init static page module
Module is now installed and ready to be used
2016-01-27 15:28:41 +01:00
Michal Kváček 79d5277a13 Merge branch 'enumerations' into static_pages 2016-01-27 15:27:36 +01:00
Michal Kváček 686ce63ca7 FIX: fix enumerations - empty init caused error 2016-01-27 15:27:15 +01:00
Michal Kváček 76f865566e Merge branch 'enumerations' into static_pages 2016-01-27 15:17:08 +01:00
Michal Kváček c4dd6cc229 FIX: fix enumeration for modules.
Module does not have ID field. Instead, it has handler field.
2016-01-27 15:16:15 +01:00
Michal Kváček cc832d5249 FEATURE #1394: add modules enumeration class 2016-01-27 15:02:22 +01:00
Michal Kváček 195ba54005 FEATURE #1370: add form for creating new static page 2016-01-27 14:55:59 +01:00
Michal Kváček 0302de734b Merge branch 'user_management' into dev 2016-01-27 02:00:27 +01:00
Michal Kváček 452280a6fe FEATURE: remove @lang() from blade templates when translating enumerations.
Enumerations are translated right after inserting into collection, so there is no need to translate it again.
2016-01-27 01:58:57 +01:00
3813 changed files with 122943 additions and 21242 deletions
+12 -16
View File
@@ -1,23 +1,19 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_KEY=
APP_ENV=
APP_DEBUG=
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_HOST=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_USERNAME=@binarity.cz
MAIL_PASSWORD=
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SITE_URL=/
UPLOAD_URL=/public/uploads
THUMBNAIL_URL=/public/uploads/thumbnails
+32 -5
View File
@@ -1,9 +1,36 @@
/modules
/templates
# published files from modules
/public/modules
/public/assets
/resources/views/modules
/resources/views/visitor
/resources/views/vendor
!/resources/views/vendor/.gitkeep
# directories with custom templates
**/views/**/custom/*
!**/views/**/custom/.gitkeep
# uploaded files
/public/uploads/*
!/public/uploads/.gitkeep
# environment settings
/.env
# dependecies - installed using Composer
/vendor
# PhpStorm project directory
/.idea
/node_modules
Homestead.yaml
Homestead.json
.env
# meta information created by installer
.install
/node_modules/
/public/css/
/public/js
/public/fonts
/bower_components
.sass-cache
!/resources/views/vendor/
+35
View File
@@ -0,0 +1,35 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|\.woff|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(assets)/(.*)$ public/$1/$2 [L,NC]
# disable viewing all hiden files
RedirectMatch 403 /\..*$
# disable browsing other files in root
RedirectMatch 403 /composer.*
RedirectMatch 403 /artisan
RedirectMatch 403 /phpunit.xml
# disable browsing directories
# this should be solved also with Option -Indexes, however...
RedirectMatch 403 ^/app
RedirectMatch 403 ^/artisan
RedirectMatch 403 ^/bootstrap
RedirectMatch 403 ^/config
RedirectMatch 403 ^/database
RedirectMatch 403 ^/modules
RedirectMatch 403 ^/scripts
RedirectMatch 403 ^/storage
RedirectMatch 403 ^/tests
RedirectMatch 403 ^/vendor
@@ -0,0 +1,18 @@
<?php
namespace App\CMS\Contracts\Content;
use App\Http\Requests\Request;
use App\Models\Content\Content;
interface AdvancedContentModifier {
/**
* Method called right after content page is marked as deleted
*
* This method is supposed to clean after "deleted" page.
*
* @param Content $content
*
* @return mixed
*/
public static function delete(Content $content);
}
@@ -0,0 +1,40 @@
<?php
namespace App\CMS\Contracts\Content;
use App\Models\Content\Content;
/**
* Interface ContentTitles
*
* Classes which implement this interface get the ability to rewrite default text on edit/create/overview of content
* page.
*
* @package App\CMS\Handlers\Contracts
*/
interface ContentTitles
{
/**
* Get translated title for pages overview of given type.
*
* This value is used for rendering list of all content pages of given type in administration.
*
* @return string
*/
public static function getOverviewTitle();
/**
* Title displayed above for for creating new content page
*
* @return string
*/
public static function getCreateNewTitle();
/**
* Title for form displayed for editin content page
*
* @param Content $content
*
* @return mixed
*/
public static function getEditTitle(Content $content);
}
@@ -0,0 +1,16 @@
<?php
namespace App\CMS\Contracts\Content\DisplayPipeline;
use App\Models\Content\Content;
interface Pipeline {
/**
* Add new process into pipeline
*
* @param string $process
*
* @return void
*/
function add($process);
function run(Content $page);
}
@@ -0,0 +1,15 @@
<?php
namespace App\CMS\Contracts\Content\DisplayPipeline;
use App\Models\Content\Content;
interface Process {
/**
* Process and modify given page
*
* @param Content $page
*
* @return mixed
*/
function handle(Content & $page);
}
@@ -0,0 +1,9 @@
<?php
namespace App\CMS\Handlers\Contracts;
interface HistoryHandler
{
public static function parseColumnName($name);
public static function parseChangedValue($changeset);
}
@@ -0,0 +1,25 @@
<?php
namespace App\CMS\Contracts\Content\SavePipeline;
use App\Models\Content\Content;
interface Pipeline {
/**
* Add new process into pipeline
*
* @param string $process
*
* @return void
*/
function add($process);
/**
* Save content page
*
* @param Content $page
* @param array $input
*
* @return Content
*/
function run(Content & $page, array $input);
}
@@ -0,0 +1,16 @@
<?php
namespace App\CMS\Contracts\Content\SavePipeline;
use App\Models\Content\Content;
interface Process {
/**
* Process and modify given page
*
* @param Content $page
* @param array $input
*
* @return mixed
*/
function handle(Content & $page, array & $input);
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Contracts;
interface Interaction {
/**
* Perform given action
*
* @param $data array input data
* @param $parameters array parameters
*
* @return mixed
*/
public function handle($data, $parameters);
/**
* @param $data array input data
*
* @return array
*/
public function getValidationRules($data = []);
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\CMS\Contracts\Modules;
use App\Http\Requests\Request;
use App\Models\Content\Content;
interface AppHandler extends BaseModuleHandler
{
public static function getHistoryHandler();
/**
* Getter for section names in creating/editing content resource
*
* @return mixed
*/
public static function getExtendedFormSections();
/**
* Getter for views used in extended part of form for creating new content
*
* This method should return pairs <section, view-name>. View is returned only as name in plain text
*
* @return array of views/templates/html codes divided into section
*/
public static function getExtendedFormInputsCreate();
/**
* Getter for extended part of form for editing existing content
*
* Basically, this method may be
*
* @return array of views/templates/html codes divided into section
*/
public static function getExtendedFormInputsEdit();
/**
* Does this module support categories?
*
* @return boolean
*/
public static function supportCategories();
}
@@ -0,0 +1,18 @@
<?php
namespace App\CMS\Contracts\Modules;
use App\Models\User;
interface BaseModuleHandler
{
/**
* Register admin menu (or multiple ones)
*
* This cannot be in ServiceProvider because Session is started at middleware. And ServiceProvider is called before
* starting any middleware..
*
* @param User $user model of logged user
*/
public static function registerAdminMenu(User $user);
}
@@ -0,0 +1,23 @@
<?php
namespace App\CMS\Contracts\Modules;
use App\Models\Module;
interface InstallableModule {
/**
* Install module.
*
* This method is called after inserting info about module into database. It can be called only using Artisan in
* CLI.
*/
public static function install();
/**
* Uninstalls module
*
* @param Module $module
*
* @return mixed
*/
public static function uninstall(Module $module);
}
@@ -0,0 +1,30 @@
<?php
namespace App\CMS\Contracts\Modules;
use App\Http\Requests\Request;
use App\Models\Content\Content;
/**
* Interface TemplateHandler
*
* Inerface used for registering template into CMS core.
*
* @package App\CMS\Handlers\Contracts
*/
interface TemplateHandler extends BaseModuleHandler
{
/**
* Get list of registered templates and supported modules.
*
* Returned array is expected to be array of arrays with following items: module, namespace and templateName.
* Example:
* return [
* ['module' => 'Article', 'templateName' => 'article::template.name']
* ];
*
* When no "namespace" is specified, value strtolower(module) is used instaed.
*
* @return array
*/
public static function getPublicTemplatePaths();
}
@@ -0,0 +1,7 @@
<?php
namespace App\CMS\Contracts\Repositories;
interface BaseRepository {
public function getOne($id = null);
public function all();
}
@@ -0,0 +1,15 @@
<?php
namespace App\CMS\Contracts\Repositories;
interface Content extends BaseRepository
{
const STATUS_DRAFT = 'draft';
const STATUS_PROTECTED = 'protected';
const STATUS_PUBLIC = 'public';
public function getOverview($handler = null, $statuses = null);
public function getHomepage();
public function getByURL($url);
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\CMS\Contracts\Repositories;
use App\Models\Content\Content as ContentModel;
use App\Models\Module as ModuleModel;
interface Module extends BaseRepository
{
public function getCreateContentTitle(ModuleModel $module);
public function getUpdateContentTitle(ModuleModel $module, ContentModel $content = null);
public function getOverviewTitle(ModuleModel $module = null);
public function getByHandler($handler);
public function call(ModuleModel $module, $method, $parameters = []);
public function callOnString($moduleHandler, $method, $parameters = []);
}
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Contracts\Repositories;
use App\Models\Module as ModuleModel;
use App\Models\Templates\Template as TemplateModel;
interface Template
{
const EDITED_TEMPLATES_DIRECTORY = 'custom';
const ASSETS_DIRECTORY = 'assets';
const MODULES_DIRECTORY = 'modules';
const TEMPLATE_SUFFIX = '.blade.php';
const CUSTOM_EDIT_DIRECTORY = 1;
const ORIGINAL_DIRECTORY = 2;
public function setModel(TemplateModel $model);
public function getPathToTemplate($mode = null);
public function getForModule(ModuleModel $module);
}
@@ -0,0 +1,17 @@
<?php
namespace App\CMS\Handlers\Contracts;
interface SearchHandler {
public function getId();
public function getName();
/**
* Search for given patttern/term
*
* @param string $term searched word
*
* @return array list of found objects
*/
public function search($term);
}
@@ -0,0 +1,14 @@
<?php
namespace App\CMS\Handlers\Contracts;
interface SearchPresenterHandler
{
/**
* Method for rendering list of found results
*
* @param $foundItems
*
* @return mixed
*/
public function render($foundItems);
}
@@ -0,0 +1,12 @@
<?php
namespace App\CMS\Contracts\Widgets;
interface AdminDashboardWidget extends PublicWidget
{
/**
* Getter for list of all roles which are allowed to display the widget
*
* @return array
*/
public static function renderForRoles();
}
@@ -0,0 +1,17 @@
<?php
namespace App\CMS\Contracts\Widgets;
interface InstallableWidget extends PublicWidget {
/**
* Function for installing given widget
*
* @return mixed
*/
public static function install();
/**
* Function for uninstalling widget
*/
public static function uninstall();
}
@@ -0,0 +1,15 @@
<?php
namespace App\CMS\Widgets\Contracts;
interface MenuExtensionHandler {
public function getName();
public function getDescription();
public function getId();
public function getPossibleValues();
public function getFormExtensionTemplate();
public function save();
}
@@ -0,0 +1,38 @@
<?php
namespace App\CMS\Contracts\Widgets;
use App\Http\Requests\Request;
use App\Models\Widgets\Widget;
interface PublicWidget
{
/**
* Name getter
*
* @return string
*/
public static function getName();
/**
* Getter for description
*
* @return string
*/
public static function getDescription();
/**
* Getter for presenter/renderer of this widget
*
* @return WidgetRenderer
*/
public static function getPresenter();
/**
* Get widget settings for saving into database
*
* @param Request $request
*
* @return array
*/
public static function save(Request $request);
}
@@ -0,0 +1,37 @@
<?php
namespace App\CMS\Contracts\Widgets;
use App\Models\Widgets\Widget;
use App\Models\Widgets\WidgetType;
interface WidgetRenderer
{
/**
* Method used for displaying widget.
*
* This method renders some HTML code for displaying.
*
* @param Widget $settings
*
* @return mixed
*/
public static function render(Widget $settings);
/**
* Display form for creating new instance of widget
*
* @param WidgetType $type
*
* @return mixed
*/
public static function renderAddForm(WidgetType $type);
/**
* Display form for editing already existing widget
*
* @param Widget $widget
*
* @return mixed
*/
public static function renderEditForm(Widget $widget);
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\ActionLogType;
class ActionLogTypes extends BaseEnumeration
{
/**
* Init list of all action log types
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$types = ActionLogType::all(['id', 'name']);
foreach ($types as $type) {
self::push($type->id, $type->name);
}
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\ActionLog\ActionLogType;
class ActionLogTypesForLogger extends BaseEnumeration
{
protected static function init()
{
$types = ActionLogType::all(['string_id', 'id']);
foreach ($types as $type) {
self::push($type->string_id, $type->id);
}
}
}
@@ -1,7 +1,7 @@
<?php
namespace App\Enumerations;
namespace App\CMS\Enumerations;
use App\Enumerations\Exceptions\EnumerationExistsException;
use App\CMS\Exceptions\Enumerations\EnumerationExistsException;
abstract class BaseEnumeration
{
@@ -26,6 +26,11 @@ abstract class BaseEnumeration
$className::init();
}
// it can happen that even after init no enumerations are available
if (empty(self::$items[$className])) {
self::$items[$className] = [];
}
self::$initiliazed[] = $className;
}
}
@@ -42,7 +47,7 @@ abstract class BaseEnumeration
public static function push($key, $translation, $overwrite = false)
{
// item exists and we do not want to overwrite items
if (!$overwrite && isset(self::$items[get_called_class()][$key])) {
if (!$overwrite && !is_null($key) && isset(self::$items[get_called_class()][$key])) {
throw new EnumerationExistsException(get_called_class() . ': ' . $key . ' already in ' . $translation);
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\CMS\Contracts\Repositories\Content;
class ContentStatuses extends BaseEnumeration
{
protected static function init()
{
$roles = [
Content::STATUS_DRAFT => 'admin/contents.status_' . Content::STATUS_DRAFT,
Content::STATUS_PROTECTED => 'admin/contents.status_' . Content::STATUS_PROTECTED,
Content::STATUS_PUBLIC => 'admin/contents.status_' . Content::STATUS_PUBLIC
];
foreach ($roles as $role => $translation) {
self::push($role, $translation);
}
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\Module;
class ModuleNamesWithIds extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$modules = Module::all(['id', 'name']);
foreach ($modules as $module) {
self::push($module->id, $module->name);
}
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\Module;
class Modules extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$modules = Module::all(['handler', 'name']);
foreach ($modules as $module) {
self::push($module->handler, $module->name);
}
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\Module;
use Illuminate\Support\Facades\Cache;
class ModulesHandlerToId extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$modules = Cache::rememberForever('module-handler-to-id-enumeration', function () {
return Module::all(['handler', 'id']);
});
foreach ($modules as $module) {
self::push($module->handler, $module->id);
}
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
/**
* Created by PhpStorm.
* User: michal
* Date: 18.2.16
* Time: 10:33
*/
namespace App\CMS\Enumerations;
use App\Models\Templates\TemplatePath;
class TemplatePaths extends BaseEnumeration
{
protected static function init()
{
$paths = TemplatePath::all(['id', 'path']);
foreach ($paths as $path) {
self::push($path->id, $path->path);
}
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Created by PhpStorm.
* User: michal
* Date: 18.2.16
* Time: 10:33
*/
namespace App\CMS\Enumerations;
use App\Models\Templates\TemplatePath;
class TemplatePathsHumanReadable extends BaseEnumeration
{
protected static function init()
{
$paths = TemplatePath::all(['id', 'name']);
foreach ($paths as $path) {
self::push($path->id, $path->name);
}
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Created by PhpStorm.
* User: michal
* Date: 18.2.16
* Time: 10:33
*/
namespace App\CMS\Enumerations;
use App\Models\Templates\TemplatePath;
class TemplatePathsHumanReadableRootOnly extends BaseEnumeration
{
protected static function init()
{
$paths = TemplatePath::where('parent_id', null)
->select(['id', 'name'])
->get();
foreach ($paths as $path) {
self::push($path->id, $path->name);
}
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
/**
* Created by PhpStorm.
* User: michal
* Date: 18.2.16
* Time: 15:50
*/
namespace App\CMS\Enumerations;
use App\Models\Templates\Template;
class Templates extends BaseEnumeration
{
protected static function init()
{
$templates = Template::all(['id', 'template_name']);
foreach ($templates as $template) {
self::push($template->id, $template->template_name);
}
}
}
@@ -1,5 +1,5 @@
<?php
namespace App\Enumerations;
namespace App\CMS\Enumerations;
use App\Models\User;
@@ -9,7 +9,7 @@ class UserRoles extends BaseEnumeration
{
$roles = [
User::ROLE_ADMIN => 'admin/userManagement.role_' . User::ROLE_ADMIN,
User::ROLE_EDITOR => 'admin/userManagement.role_' . User::ROLE_EDITOR,
// User::ROLE_EDITOR => 'admin/userManagement.role_' . User::ROLE_EDITOR,
User::ROLE_VISITOR => 'admin/userManagement.role_' . User::ROLE_VISITOR
];
@@ -6,7 +6,7 @@
* Time: 23:20
*/
namespace App\Enumerations;
namespace App\CMS\Enumerations;
use App\Models\User;
@@ -15,7 +15,6 @@ class UserStates extends BaseEnumeration
public static function init()
{
$items = [
User::STATE_DELETED => 'admin/userManagement.status_' . User::STATE_DELETED,
User::STATE_BLOCKED => 'admin/userManagement.status_' . User::STATE_BLOCKED,
User::STATE_ACTIVE => 'admin/userManagement.status_' . User::STATE_ACTIVE
];
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\Widgets\WidgetType;
class WidgetTypes extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$widgets = WidgetType::all(['id', 'name']);
foreach ($widgets as $widget) {
self::push($widget->id, $widget->name);
}
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\CMS\Enumerations;
use App\Models\Widgets\WidgetType;
class WidgetTypesWithHandlers extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$modules = WidgetType::all(['handler', 'name']);
foreach ($modules as $module) {
self::push($module->handler, $module->name);
}
}
}
@@ -1,5 +1,5 @@
<?php
namespace App\Enumerations\Exceptions;
namespace App\CMS\Exceptions\Enumerations;
class EnumerationExistsException extends \Exception {
@@ -0,0 +1,6 @@
<?php
namespace App\CMS\Exceptions\FileManager;
class SubdirectoryExistsInDirectory extends \Exception
{
}
@@ -0,0 +1,19 @@
<?php
namespace App\CMS\Exceptions\Validation;
use Exception;
class ValidationFailedException extends \Exception {
protected $validator;
public function __construct($validator, $message = null, $code = null, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
$this->validator = $validator;
}
public function getValidator(){
return $this->validator;
}
}
@@ -0,0 +1,14 @@
<?php
namespace App\CMS\Widgets\Exceptions;
use Exception;
class MissingParameterException extends \Exception
{
public function __construct($message = "", $code = 0, Exception $previous = null)
{
$message = trans('admin/widgets.missingValue', ['field' => $message]);
parent::__construct($message, $code, $previous);
}
}
@@ -0,0 +1,14 @@
<?php
namespace App\CMS\Widgets\Exceptions;
use Exception;
class WidgetExistsException extends \Exception
{
public function __construct($message = "", $code = 0, Exception $previous = null)
{
$message = trans('admin/widgets.widgetExists', ['id' => $message]);
parent::__construct($message, $code, $previous);
}
}
+59
View File
@@ -0,0 +1,59 @@
<?php
namespace App\CMS\Handlers;
use App\CMS\Contracts\Modules\AppHandler;
use App\Models\FileManager\File;
/**
* Class Handler
* Handler is a class which handles module-specific behaviour which cannot be done by module itself, resp. cannot be
* done by some abstract magic.
* @package App\CMS\Handlers\
*/
abstract class AdminHandler extends BaseHandler implements AppHandler
{
public static function getHistoryHandler()
{
return History::class;
}
public static function getExtendedFormSections()
{
$formParts = [
'basicInfo' => trans('admin/contents.basicInfo'),
'meta' => trans('admin/contents.metaOptions'),
'publication' => trans('admin/contents.publicationOptions'),
'appearance' => trans('admin/contents.appearance'),
'files' => trans('admin/contents.files')
];
if (\Auth::user()->cannot('upload', File::class)) {
unset($formParts['files']);
}
return $formParts;
}
public static function getExtendedFormInputsCreate()
{
$formParts = [
'basicInfo' => 'admin.content.formParts.basicInformation',
'meta' => 'admin.content.formParts.metaInformation',
'publication' => 'admin.content.formParts.publicationSetup',
'appearance' => 'admin.content.formParts.appearance',
'files' => 'admin.content.formParts.files'
];
if (\Auth::user()->cannot('upload', File::class)) {
unset($formParts['files']);
}
return $formParts;
}
public static function getExtendedFormInputsEdit()
{
return self::getExtendedFormInputsCreate();
}
}
+155
View File
@@ -0,0 +1,155 @@
<?php
namespace App\CMS\Handlers;
use App\CMS\Contracts\Modules\BaseModuleHandler;
use App\CMS\Enumerations\WidgetTypes;
use App\CMS\Repositories\Module;
use App\Models\ActionLog\ActionLog;
use App\Models\Content\Content;
use App\Models\FileManager\File;
use App\Models\Settings;
use App\Models\Templates\Template;
use App\Models\User;
use App\Models\Widgets\Widget;
use App\Models\Widgets\WidgetArea;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
abstract class BaseHandler implements BaseModuleHandler
{
/**
* Register admin menu (or multiple ones)
* This cannot be in ServiceProvider because Session is started at middleware. And ServiceProvider is called before
* starting any middleware..
*
* @param User $user model of logged user
*/
public static function registerAdminMenu(User $user)
{
$menu = \Menu::instance('mainMenu');
if (!is_null($menu)) {
// menus were already defined
return;
}
// create instance of main menu
\Menu::create('mainMenu', function ($menu) use ($user) {
// $menu->route('admin.dashboard', trans('admin/mainMenu.dashboard'), [], 10, ['icon' => 'fa fa-fw fa-dashboard']);
/**
* Content pages
* Submenus can be registered later
*/
$contentModules = app(Module::class)->getContentModules();
if ($user->can('manage', Content::class) && !$contentModules->isEmpty()) {
$menu->dropdown(trans('admin/mainMenu.contentPages'), function ($sub) {
$sub->route('content.order', trans('admin/mainMenu.contentOrder'), [], 999, ['icon' => 'fa fa-fw fa-reorder']);
$sub->route('content.overview', trans('admin/mainMenu.contentPageOverview'), [], 10000, ['icon' => 'fa fa-fw fa-list']);
}, 20, ['icon' => 'fa fa-fw fa-database']);
}
/**
* File manager
*/
if ($user->can('manage', File::class)) {
$menu->route('upload.overview', trans('admin/mainMenu.fileManager'), [], 40, ['icon' => 'fa fa-fw fa-folder']);
}
/**
* Widgets and widget areas
*/
if ($user->can('manage', Widget::class) || $user->can('manage', WidgetArea::class)) {
$menu->dropdown(trans('admin/mainMenu.widgets'), function ($sub) use ($user) {
// create list of all widget types
$widgets = WidgetTypes::getWithTranslations();
if (!empty($widgets) && $user->can('create', Widget::class)) {
$sub->dropdown(trans('admin/mainMenu.newWidget'), function ($sub) use ($widgets) {
$i = 1;
foreach ($widgets as $type => $name) {
$sub->route('widgets.new', $name, ['type' => $type], $i++);
}
}, 10, ['icon' => 'fa fa-fw fa-plus']);
}
if ($user->can('manage', Widget::class)) {
$sub->route('widgets.overview', trans('admin/mainMenu.widgetsOverview'), [], 20, ['icon' => 'fa fa-fw fa-list']);
}
// menu for widget areas
if ($user->can('manage', WidgetArea::class)) {
$sub->dropdown(trans('admin/mainMenu.widgetAreas'), function ($sub) use ($user) {
if ($user->can('create', WidgetArea::class)) {
$sub->route('widgetareas.new', trans('admin/mainMenu.newWidgetArea'), [], 1, ['icon' => 'fa fa-fw fa-plus']);
}
$sub->route('widgetareas.overview', trans('admin/mainMenu.widgetAreaOverview'), [], 2, ['icon' => 'fa fa-fw fa-list']);
}, 50, ['icon' => 'fa fa-fw fa-object-group']);
}
}, 50, ['icon' => 'fa fa-fw fa-puzzle-piece']);
}
/**
* Divide system entries and other links in menu
*/
$menu->addDivider(9999);
$menu->dropdown(trans('admin/mainMenu.system'), function ($sub) use ($user) {
/**
* User management
*/
if ($user->can('manage', User::class)) {
$sub->dropdown(trans('admin/mainMenu.userManagement'), function ($sub) use ($user) {
if ($user->can('create', User::class)) {
$sub->route('users.new', trans('admin/mainMenu.newUser'), [], 10, ['icon' => 'fa fa-fw fa-user-plus']);
}
$sub->route('users.overview', trans('admin/mainMenu.usersOverview'), [], 30, ['icon' => 'fa fa-fw fa-users']);
}, 20, ['icon' => 'fa fa-fw fa-users']);
}
/**
* Templates
*/
if ($user->can('manage', Template::class)) {
$sub->route('templates.index', trans('admin/mainMenu.templates'), [], 70, ['icon' => 'fa fa-fw fa-file-code-o']);
}
if ($user->can('manage', ActionLog::class)) {
$sub->route('log.overview', trans('admin/mainMenu.actionLog'), [], 70, ['icon' => 'fa fa-fw fa-history']);
}
if ($user->can('manage', Settings::class)) {
$sub->route('settings.overview', trans('admin/mainMenu.settings'), [], 80, ['icon' => 'fa fa-fw fa-gear']);
$sub->route('permissions.index', trans('admin/mainMenu.permissions'), [], 90, ['icon' => 'fa fa-fw fa-key']);
}
}, 10000, ['icon' => 'fa fa-fw fa-gears']);
});
\Menu::create('topMenu', function ($menu) use ($user) {
if (count(LaravelLocalization::getSupportedLocales()) > 1) {
$menu->dropdown(trans(LaravelLocalization::getCurrentLocaleName()), function ($menu) use ($user) {
foreach (LaravelLocalization::getSupportedLocales() as $localeCode => $properties) {
$menu->url(LaravelLocalization::getLocalizedURL($localeCode), $properties['native']);
}
});
}
if ($user->can('manage', Content::class)) {
$menu->route('page.index', '', [], 10, [
'icon' => 'fa fa-fw fa-globe',
'title' => trans('common.goToWeb'),
'target' => '_blank',
'data-toggle' => 'tooltip',
'data-placement' => 'left'
]);
}
});
// create menu with user profile
\Menu::create('profileMenu', function ($menu) use ($user) {
$menu->route('users.detail', trans('admin/userManagement.profile'), ['user' => $user], 10, ['icon' => 'fa fa-fw fa-user icon']);
$menu->addDivider(999);
$menu->route('logout', trans('admin/common.logout'), [], 1000, ['icon' => 'fa fa-fw fa-power-off icon']);
});
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
namespace App\CMS\Handlers;
use App\CMS\Enumerations\ContentStatuses;
use App\CMS\Handlers\Contracts\HistoryHandler;
use App\CMS\Helpers\Differ;
class History implements HistoryHandler
{
public static function parseColumnName($column)
{
return trans('admin/history.column' . ucfirst($column));
}
public static function parseChangedValue($changeset)
{
switch ($changeset->column) {
case 'pageContent':
$route = route('history.diff', [
'revision' => $changeset->id
]);
return "(<a href='" . $route . "'>" . trans('admin/history.diff') . "</a>)";
break;
case 'metaDescription':
return Differ::htmlDiff($changeset->old_value, $changeset->new_value);
break;
case 'file':
if (!$changeset->old_value) {
// old value is null -> new file was uploaded
return trans('admin/history.uploadedFile', ['file' => $changeset->new_value]);
} else {
return trans('admin/history.deletedFile', ['file' => $changeset->old_value]);
}
break;
case 'status':
$statuses = ContentStatuses::getWithTranslations();
return trans('admin/history.changedFromTo', [
'from' => $statuses[$changeset->old_value],
'to' => $statuses[$changeset->new_value]
]);
break;
case 'isHomepage':
return trans('admin/history.setupAsHomepage');
break;
default:
return trans('admin/history.changedFromTo', [
'from' => empty($changeset->old_value) ? trans('admin/history.emptyValue') : $changeset->old_value,
'to' => empty($changeset->new_value) ? trans('admin/history.emptyValue') : $changeset->new_value,
]);
break;
}
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Cms\Handlers\Interactions;
use App\CMS\Contracts\Interaction as InteractionContract;
use App\CMS\Exceptions\Validation\ValidationFailedException;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Validator;
class Interaction
{
/**
* Handle interaction with application
*
* @param string $interactionClass
* @param array $data
* @param array $extraParameters
*
* @return mixed
* @throws ValidationFailedException
*/
public static function handle($interactionClass, $data, ...$extraParameters)
{
/**
* @var $interaction InteractionContract
*/
$interaction = app($interactionClass);
// validate interaction
$validator = Validator::make($data, $interaction->getValidationRules($extraParameters));
if ($validator->fails()) {
throw new ValidationFailedException($validator);
}
// handle it
return $interaction->handle($data, $extraParameters);
}
}
@@ -0,0 +1,68 @@
<?php
namespace App\CMS\Handlers\Registrators\Items;
class SettingExtension
{
/**
* @var string human readable ID of settings section (used e.g. as ID parameter in html)
*/
protected $id;
/**
* @var string translations string used for describing briefly settings section
*/
protected $name;
/**
* @var string view used for rendering given settings part
*/
protected $view;
protected $order;
/**
* SettingExtension constructor.
*
* @param string $id
* @param string $name
* @param string $view
*/
public function __construct($id, $name, $view, $order)
{
$this->id = $id;
$this->name = $name;
$this->view = $view;
$this->order = $order;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return string
*/
public function getView()
{
return $this->view;
}
/**
* @return mixed
*/
public function getOrder()
{
return $this->order;
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\CMS\Handlers\Registrators;
use App\CMS\Widgets\Contracts\MenuExtensionHandler;
class MenuExtensionRegistrator {
protected $menuExtensions;
/**
* @param MenuExtensionHandler $handler
*/
public function register(MenuExtensionHandler $handler) {
$this->menuExtensions[] = $handler;
}
public function get(){
return $this->menuExtensions;
}
}
@@ -0,0 +1,72 @@
<?php
namespace App\CMS\Handlers\Registrators;
use App\CMS\Exceptions\Enumerations\EnumerationExistsException;
use App\CMS\Handlers\Contracts\SearchHandler;
use App\CMS\Handlers\Contracts\SearchPresenterHandler;
use App\CMS\Handlers\Registrators\Items\SearchEngine;
use Symfony\Component\Process\Exception\InvalidArgumentException;
class SearchEngineRegistrator
{
const ADMIN = 'admin';
const VISITOR = 'visitor';
protected $searchEngines;
function __construct($app)
{
$this->searchEngines = [
self::ADMIN => [],
self::VISITOR => []
];
}
/**
* Method for registering new settings extensions/parts
*
* @param SearchHandler $search
* @param SearchPresenterHandler $presenter
*
* @param $type
*
* @throws EnumerationExistsException
*/
public function register(SearchHandler $search, SearchPresenterHandler $presenter, $type)
{
$this->checkIfRegistered($type, $search->getId());
// register new extension
$this->searchEngines[$type][$search->getId()] = [$search, $presenter];
}
/**
* Getter for all registered extensions
*
* @param $type
*
* @return array
*/
public function get($type)
{
if (!isset($this->searchEngines[$type])) {
throw new InvalidArgumentException('Invalid type ' . $type);
}
return $this->searchEngines[$type];
}
/**
* Checks if this section is not already defined
*
* @param $type
* @param $id
*
* @throws EnumerationExistsException
*/
private function checkIfRegistered($type, $id)
{
if (isset($this->searchEngines[$type][$id])) {
throw new EnumerationExistsException('Already existing search engine ' . $id . ' in ' . $type);
}
}
}
@@ -0,0 +1,77 @@
<?php
namespace App\CMS\Handlers\Registrators;
use App\CMS\Exceptions\Enumerations\EnumerationExistsException;
use App\CMS\Handlers\Registrators\Items\SettingExtension;
class SettingsExtensionRegistrator
{
protected $settingsExtensions;
function __construct($app)
{
$this->settingsExtensions = [];
}
/**
* Method for registering new settings extensions/parts
*
* @param $sectionId
* @param $sectionName
* @param $sectionView
*
* @throws EnumerationExistsException
*/
public function register($sectionId, $sectionName, $sectionView, $order = null)
{
$this->checkIfRegistered($sectionId);
if (is_null($order)) {
$order = count($this->settingsExtensions);
}
// register new extension
$this->settingsExtensions[$sectionId] = new SettingExtension($sectionId, $sectionName, $sectionView, $order);
}
/**
* Registers new setting part - only as SettingExtension directly
*
* @param SettingExtension $extension
*/
public function registerObject(SettingExtension $extension)
{
$this->checkIfRegistered($extension->getId());
$this->settingsExtensions[$extension->getId()] = $extension;
}
/**
* Getter for all registered extensions
* @return array
*/
public function get()
{
// sort registered extensions
uasort($this->settingsExtensions, function (SettingExtension $a, SettingExtension $b) {
return $a->getOrder() - $b->getOrder();
});
return $this->settingsExtensions;
}
/**
* Checks if this section is not already defined
*
* @param $sectionId
*
* @throws EnumerationExistsException
*/
private function checkIfRegistered($sectionId)
{
if (isset($this->settingsExtensions[$sectionId])) {
throw new EnumerationExistsException('Already existing key ' . $sectionId);
}
}
}
@@ -0,0 +1,329 @@
<?php
namespace App\CMS\Handlers\Registrators;
use App\CMS\Contracts\Repositories\Template;
use App\CMS\Enumerations\TemplatePaths;
use App\CMS\Enumerations\Templates;
use App\Models\Templates\Template as TemplateModel;
use App\Models\Templates\TemplatePath;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use Symfony\Component\Process\Exception\InvalidArgumentException;
class TemplateRegistrator
{
/**
* @var string absolute path to base directory of registered template paths
*/
protected $baseDirectory;
/**
* @var string namespace of registered templates
*/
protected $namespace;
/**
* @var string absolute path to currently registered directory
* This variable is set in register() method as $baseDirectory/$path
*/
protected $registeredPath;
/**
* @var int ID of module
*/
protected $moduleId;
/**
* @var array list of all registered template paths
*/
protected $paths = [];
/**
* Set base path
*
* @param mixed $baseDirectory
*/
public function setBaseDirectory($baseDirectory)
{
$baseDirectory = str_replace('/', DIRECTORY_SEPARATOR, $baseDirectory);
$baseDirectory = base_path($baseDirectory);
$baseDirectory = rtrim($baseDirectory, DIRECTORY_SEPARATOR);
if (!is_dir($baseDirectory)) {
throw new InvalidArgumentException('Invalid path ' . $baseDirectory);
}
$this->baseDirectory = $baseDirectory;
}
/**
* Set module ID for registered path
*
* @param int $moduleId
*/
public function setModuleId($moduleId)
{
$this->moduleId = $moduleId;
}
/**
* Set namespace for registered template path
*
* @param string $namespace
*/
public function setNamespace($namespace)
{
$this->namespace = $namespace;
}
/**
* Resets namespace
*/
public function unsetNamespace()
{
$this->namespace = null;
$this->setModuleId(null);
}
/**
* Registers new template path.
* This method registeres given path itself with all subdirectories
*
* @param $baseDirectory
* @param string $path path relatively to root of the project
* @param string $name human readable identification of given template path
*
* @throws \Exception
*/
public function register($baseDirectory, $path, $name)
{
$this->paths[] = [
'namespace' => $this->namespace,
'moduleId' => $this->moduleId,
'baseDirectory' => $baseDirectory,
'path' => $this->baseDirectory . DIRECTORY_SEPARATOR . $path,
'name' => $name
];
$this->unsetNamespace();
}
/**
* Save templates into database
*/
public function saveTemplates()
{
if (!is_array($this->paths) || empty($this->paths)) {
return;
}
foreach ($this->paths as $path) {
if (!empty($path['namespace'])) {
$this->setNamespace($path['namespace'] . '::');
}
$this->setModuleId($path['moduleId']);
$this->setBaseDirectory($path['baseDirectory']);
$this->registeredPath = $this->baseDirectory . DIRECTORY_SEPARATOR . $path['path'];
// register path
$this->registerPath($this->registeredPath, $path['name']);
$this->unsetNamespace();
}
}
/**
* Get relative path to project root
*
* @param $directory
*
* @return string
*/
protected function relativePath($directory)
{
$directory = str_replace('/', DIRECTORY_SEPARATOR, $directory);
$directory = str_replace('\\', DIRECTORY_SEPARATOR, $directory);
return trim(str_replace(base_path(), '', $directory), '\\/');
}
/**
* Crawl subdirectories and register them
*
* @param string $directory path relative to $baseDirectory variable
* @param string $name name of parent directory
*/
protected function scanForSubdirectories($directory, $name)
{
if (!is_dir($directory)) {
return;
}
$directories = File::directories($directory);
foreach ($directories as $dir) {
$base = basename($dir);
$name = preg_replace('/\.(.+)/', '.' . $base, $name);
$this->registerPath($dir, $name, $directory);
}
}
/**
* Registers template path and templates into system
*
* @param string $path relative path to $baseDirectory variable
* @param string $name human readable name of this path (used in overview)
* @param null|string $parent path to parent directory
*/
protected function registerPath($path, $name, $parent = null)
{
// skip custom directories (contains updated templates only)
$dirName = basename($path);
$ignoredDirectories = [
Template::EDITED_TEMPLATES_DIRECTORY,
Template::ASSETS_DIRECTORY,
Template::MODULES_DIRECTORY
];
if (in_array($dirName, $ignoredDirectories)) {
return;
}
// save template path into database
$templatePathId = $this->saveTemplatePath($path, $name, $parent);
// save all templates into database
$this->registerTemplates($path, $templatePathId);
// try to find some subdirectories and other templates
$this->scanForSubdirectories($path, $name);
}
/**
* Registers all templates
* This method takes all templates in given directory and registers them into database. Templates registered in
* this way may be used for further manipulation.
*
* @param $path
* @param $templatePathId
*
* @throws \App\CMS\Enumerations\Exceptions\EnumerationExistsException
*/
protected function registerTemplates($path, $templatePathId)
{
$templates = File::files($path);
$registeredTemplates = Templates::getWithTranslations();
foreach ($templates as $template) {
// skip all non-template files - we assume that every file with suffix ".blade.php" is Blade template
if (!Str::endsWith($template, Template::TEMPLATE_SUFFIX)) {
continue;
}
// get all templates and template name (path/to/template.blade.php -> path.to.template)
$templateName = $this->getTemplateName($template);
if (!in_array($templateName, $registeredTemplates)) {
$params = [
'template_name' => $templateName,
'name' => $templateName,
'path' => $templatePathId,
'module_id' => $this->moduleId,
'description' => '',
'editable' => 1
];
// save template into database
$newTemplate = TemplateModel::create($params);
// push template into enumeration - so it will not be registered again
Templates::push($newTemplate->id, $templateName);
}
}
}
/**
* Save template into database and return its ID
*
* @param $path
* @param $name
* @param null $parent
*
* @return mixed|null
* @throws \App\CMS\Enumerations\Exceptions\EnumerationExistsException
*/
protected function saveTemplatePath($path, $name, $parent = null)
{
$registeredPaths = TemplatePaths::getWithTranslations();
$relativePath = $this->relativePath($path);
if (!in_array($relativePath, $registeredPaths)) {
$parentId = $this->getId($this->relativePath($parent));
$params = [
'path' => $relativePath,
'name' => $name,
'namespace' => $this->namespace,
'parent_id' => $parentId
];
// save into database
$path = TemplatePath::create($params);
// add to enumeration
TemplatePaths::push($path->id, $relativePath);
return $path->id;
}
return $this->getId($relativePath);
}
/**
* Get ID of registered template
*
* @param $path
*
* @return null|int null when parent not found, ID of parent otherwise
*/
private function getId($path)
{
// get registered paths
$paths = TemplatePaths::getWithTranslations();
$paths = array_flip($paths);
if (is_null($path) || !isset($paths[$path])) {
return null;
}
return $paths[$path];
}
/**
* Get template name
* Converts path to template to corresponding name
*
* @param $template
*
* @return string
*/
protected function getTemplateName($template)
{
$templateName = $template;
$templateName = str_replace($this->registeredPath, '', $templateName);
$templateName = str_replace('\\', DIRECTORY_SEPARATOR, $templateName);
$templateName = str_replace('/', DIRECTORY_SEPARATOR, $templateName);
$templateName = str_replace(DIRECTORY_SEPARATOR, '.', $templateName);
$templateName = str_replace(Template::TEMPLATE_SUFFIX, '', $templateName);
$templateName = preg_replace('/\.{2,}/', '.', $templateName);
return $this->namespace . trim($templateName, '.');
}
public function deleteNonExistingPaths()
{
$paths = TemplatePath::all();
foreach ($paths as $path) {
if (!is_dir(base_path($path->path)))
\File::deleteDirectory($path->path);
}
}
}
@@ -0,0 +1,59 @@
<?php
namespace App\CMS\Handlers\Registrators;
use App\CMS\Enumerations\WidgetTypesWithHandlers;
use App\Models\Widgets\WidgetType;
class WidgetRegistrator
{
protected $registeredWidgets = [];
/**
* Method used for registering new widgets
*
* @param $classname
* @param null $templateId
* @param null $moduleId
*/
public function register($classname, $templateId = null, $moduleId = null)
{
$this->registeredWidgets[] = [
'class' => $classname,
'templateId' => $templateId,
'moduleId' => $moduleId
];
}
/**
* Install all non-installed widgets
*/
public function installWidgets()
{
$installed = WidgetTypesWithHandlers::getSimple();
foreach ($this->registeredWidgets as $registeredWidget) {
$classname = $registeredWidget['class'];
$templateId = $registeredWidget['templateId'];
$moduleId = $registeredWidget['moduleId'];
// register widget as new widget type
if (!in_array($classname, $installed)) {
$widgetName = call_user_func($classname . '::getName');
$widgetDescription = call_user_func($classname . '::getDescription');
// create row in widget types
WidgetType::create([
'handler' => $classname,
'name' => $widgetName,
'module_id' => $moduleId,
'template_id' => $templateId,
'description' => $widgetDescription
]);
// install widget (if neccessary)
if (is_callable([$classname, 'install'])) {
call_user_func($classname . '::install');
}
}
}
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\CMS\Handlers\Search;
use App\Models\Content\Content as ContentModel;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
class Content extends Search
{
/**
* Search for given patttern/term
*
* @param string $term searched word
*
* @return array|\Illuminate\Database\Eloquent\Collection|Collection|static[]
*/
public function search($term)
{
if (Auth::user()
->cannot('manage', ContentModel::class)) {
return new Collection();
}
$token = $this->tokenize($term);
return ContentModel::where('pageContent', 'LIKE', $token)
->orWhere('metaDescription', 'LIKE', $token)
->orWhere('metaKeywords', 'LIKE', $token)
->orWhere('title', 'LIKE', $token)
->orWhere('url', 'LIKE', $token)
->get();
}
public function getId()
{
return 'content';
}
public function getName()
{
return trans('search.content');
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\CMS\Handlers\Search;
use App\Models\FileManager\File;
use Illuminate\Support\Collection;
class Files extends Search
{
public function getId()
{
return "files";
}
public function getName()
{
return trans('search.files');
}
/**
* Search for given patttern/term
*
* @param string $term searched word
*
* @return array list of found objects
*/
public function search($term)
{
if (\Auth::user()
->cannot('manage', File::class)) {
return new Collection();
}
$token = $this->tokenize($term);
return File::where('original_filename', 'LIKE', $token)
->orWhere('name', 'LIKE', $token)
->orWhere('keywords', 'LIKE', $token)
->orWhere('description', 'LIKE', $token)
->orWhere('mime_type', 'LIKE', $token)
->get();
}
}
@@ -0,0 +1,22 @@
<?php
namespace App\CMS\Handlers\Search\Presenters;
use App\CMS\Enumerations\ContentStatuses;
use App\CMS\Handlers\Contracts\SearchPresenterHandler;
use App\Models\Content\Content;
class AdminContent implements SearchPresenterHandler
{
public function render($foundItems)
{
if (\Auth::user()
->cannot('manage', Content::class)) {
return null;
}
return view('admin.search.results.content', [
'pages' => $foundItems,
'statuses' => ContentStatuses::getWithTranslations(),
]);
}
}
@@ -0,0 +1,25 @@
<?php
namespace App\CMS\Handlers\Search\Presenters;
use App\CMS\Handlers\Contracts\SearchPresenterHandler;
use App\Models\FileManager\File;
class AdminFiles implements SearchPresenterHandler
{
/**
* Method for rendering list of found results
*
* @param $foundItems
*
* @return mixed
*/
public function render($foundItems)
{
if (\Auth::user()
->cannot('manage', File::class)) {
return null;
}
return view('admin.fileManager.filesTiles', ['files' => $foundItems, 'hideDelete' => true]);
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\CMS\Handlers\Search;
use App\CMS\Handlers\Contracts\SearchHandler;
use Symfony\Component\Process\Exception\InvalidArgumentException;
abstract class Search implements SearchHandler
{
/**
* Tokenize string for usage in LIKE clausules
*
* @param $term
*
* @return string
*/
protected function tokenize($term)
{
$term = trim($term);
if (empty($term)) {
throw new InvalidArgumentException(trans('search.emptyString'));
}
return '%' . str_replace(' ', '%', $term) . '%';
}
}
+92
View File
@@ -0,0 +1,92 @@
<?php
namespace App\CMS\Helpers;
use App\CMS\Contracts\Modules\TemplateHandler;
use App\Models\Content\Content;
use App\Models\Module;
use App\Models\User;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Cache;
class CurrentTemplate implements TemplateHandler
{
protected static $template;
protected static $initialized = false;
/**
* Getter for currently set template
* @return Module
* @throws \ErrorException
*/
public static function get()
{
if (!self::$initialized) {
self::$template = Cache::rememberForever('current-template', function () {
return Module::where('is_template', true)
->where('enabled', true)
->first();
});
self::$initialized = true;
}
return self::$template;
}
/**
* Shortcut for getting template handler
*
* @return string
* @throws \ErrorException
*/
public static function handler()
{
$template = self::get();
if (!$template) {
throw new \ErrorException('No template selected, no handler available!');
}
return $template->handler;
}
/**
* Reset currently set template and load another one on next call of get() method.
*/
public static function reset()
{
self::$initialized = false;
}
/**
* Register admin menu (or multiple ones)
*
* This cannot be in ServiceProvider because Session is started at middleware. And ServiceProvider is called before
* starting any middleware..
*
* @param User $user model of logged user
*/
public static function registerAdminMenu(User $user)
{
call_user_func_array([self::handler(), 'registerAdminMenu'], [$user]);
}
/**
* Get list of registered templates and supported modules.
*
* Returned array is expected to be array of arrays with following items: module, namespace and templateName.
* Example:
* return [
* ['module' => 'Article', 'templateName' => 'article::template.name']
* ];
*
* When no "namespace" is specified, value strtolower(module) is used instaed.
*
* @return array
*/
public static function getPublicTemplatePaths()
{
return call_user_func([self::handler(), 'getPublicTemplatePaths']);
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
namespace App\CMS\Helpers;
class Date
{
/**
* Print date in configured format
*
* @param $datestamp
* @param bool $withTime
*
* @return false|string
*/
public static function date($datestamp, $withTime = true)
{
$timestamp = strtotime($datestamp);
if ($timestamp <= 0) {
return '';
}
$format = $withTime ? config('app.datetime_format') : config('app.date_format');
return date($format, $timestamp);
}
public static function dateFormatted($format, $datestamp)
{
$timestamp = strtotime($datestamp);
if ($timestamp <= 0) {
return '';
}
return date($format, $timestamp);
}
public static function monthName($datestamp) {
$timestamp = strtotime($datestamp);
if ($timestamp <= 0) {
return '';
}
$months = [
trans('common.months.january'),
trans('common.months.february'),
trans('common.months.march'),
trans('common.months.april'),
trans('common.months.may'),
trans('common.months.june'),
trans('common.months.july'),
trans('common.months.august'),
trans('common.months.semptember'),
trans('common.months.october'),
trans('common.months.november'),
trans('common.months.december'),
];
$monthNumber = date('n', $timestamp);
return $months[$monthNumber - 1];
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
namespace App\CMS\Helpers;
/*
Paul's Simple Differ Algorithm v 0.1
(C) Paul Butler 2007 <http://www.paulbutler.org/>
May be used and distributed under the zlib/libpng license.
This code is intended for learning purposes; it was written with short
code taking priority over performance. It could be used in a practical
application, but there are a few ways it could be optimized.
Given two arrays, the function diff will return an array of the changes.
I won't describe the format of the array, but it will be obvious
if you use print_r() on the result of a diff on some test data.
htmlDiff is a wrapper for the diff command, it takes two strings and
returns the differences in HTML. The tags used are <ins> and <del>,
which can easily be styled with CSS.
@url https://github.com/paulgb/simplediff/blob/master/php/simplediff.php
Sorry for this kind of magic, I have no idea how this works.. :(
*/
class Differ
{
public static function diff($old, $new)
{
$matrix = [];
$maxlen = 0;
foreach ($old as $oindex => $ovalue) {
$nkeys = array_keys($new, $ovalue);
foreach ($nkeys as $nindex) {
$matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex - 1]) ? $matrix[$oindex - 1][$nindex - 1] + 1 : 1;
if ($matrix[$oindex][$nindex] > $maxlen) {
$maxlen = $matrix[$oindex][$nindex];
$omax = $oindex + 1 - $maxlen;
$nmax = $nindex + 1 - $maxlen;
}
}
}
if ($maxlen == 0) {
return [['d' => $old, 'i' => $new]];
}
return array_merge(self::diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)), array_slice($new, $nmax, $maxlen), self::diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen)));
}
public static function htmlDiff($old, $new)
{
$ret = '';
$diff = self::diff(preg_split("/[\s]+/", $old), preg_split("/[\s]+/", $new));
foreach ($diff as $k) {
if (is_array($k)) {
$ret .= (!empty($k['d']) ? "<del>" . implode(' ', $k['d']) . "</del> " : '') . (!empty($k['i']) ? "<ins>" . implode(' ', $k['i']) . "</ins> " : '');
} else {
$ret .= $k . ' ';
}
}
return $ret;
}
}
+133
View File
@@ -0,0 +1,133 @@
<?php
namespace App\CMS\Helpers;
use App\Models\FileManager\File;
class FileManager
{
/**
* @param File $file
*
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
*/
public static function getPreview(File $file)
{
list($type, $subtype) = explode('/', $file->mime_type);
switch ($type) {
case 'image':
$url = Path::thumbnail($file->filename);
return '<img src="' . $url . '" alt="' . $file->description . '" />';
break;
case 'text':
return self::getIcon($file, 'fa-file-text-o');
break;
case 'application':
switch ($subtype) {
case 'pdf':
return self::getIcon($file, 'fa-file-pdf-o');
break;
default:
return self::getIcon($file, 'fa-newspaper-o');
break;
}
break;
default:
return self::getIcon($file, 'fa-question');
break;
}
}
/**
* Shortcut for displaying icons
*
* @param $file
* @param $icon
*
* @return string
*/
protected static function getIcon($file, $icon)
{
return '<p><i class="fa fa-2x ' . $icon . '"></i><br /><span>' . e(str_limit($file->original_filename, 15)) . '</span></p>';
}
/**
*
*
* @param File $file
*
* @return string
*/
public static function getFormattedSize(File $file)
{
$bytes = $file->file_size;
$label = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
for ($i = 0; $bytes >= 1024 && $i < (count($label) - 1); $bytes /= 1024, $i++) {
;
}
return (round($bytes, 2) . " " . $label[$i]);
}
/**
* Get preview for file detail
*
* @param File $file
*
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
*/
public static function getLargePreview(File $file)
{
list($type, $subtype) = explode('/', $file->mime_type);
$url = config('app.upload_url') . '/' . $file->filename;
$path = config('app.upload_path') . DIRECTORY_SEPARATOR . $file->filename;
switch ($type) {
case 'image':
return '<img src="' . $url . '" alt="' . $file->description . '" />';
break;
case 'text':
$string = '<pre><code>';
$string .= htmlspecialchars(file_get_contents($path));
$string .= '</pre></code>';
return $string;
break;
case 'application':
return '<iframe src = "'.asset('resources/assets/admin/js/viewerJs/').'/#'.Path::upload($file->filename).'" style="width: 100%; height: 50em" allowfullscreen webkitallowfullscreen></iframe>';
break;
default:
return self::getPreview($file);
break;
}
}
/**
* @param File $file
*
* @return array
*/
public static function getAdditionalInfo(File $file)
{
list($type, $subtype) = explode('/', $file->mime_type);
$path = config('app.upload_path') . DIRECTORY_SEPARATOR . $file->filename;
switch ($type) {
case 'text':
return [trans('admin/fileManager.encoding') => mb_detect_encoding(file_get_contents($path))];
break;
case 'image':
list ($width, $height) = getimagesize($path);
return [trans('admin/fileManager.resolution') => $height . ' x ' . $width,];
break;
}
return [];
}
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\CMS\Helpers;
class Gravatar
{
public static function img($email, $size = 50)
{
return "//www.gravatar.com/avatar/" . md5(strtolower(trim($email))) . "?s=" . $size;
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
namespace App\CMS\Helpers;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Process\Exception\InvalidArgumentException;
class Path
{
/**
* Get URL to uploaded file
*
* @param $filename
*
* @return string
*/
public static function upload($filename)
{
// for debug environment check if file exists
if (env('APP_DEBUG') && !file_exists(config('app.upload_path') . '/' . $filename)) {
throw new NotFoundHttpException('File ' . $filename . ' cannot be found in ' . config('app.upload_path') . '.');
}
// return url to uploaded file
return config('app.upload_url') . '/' . $filename;
}
public static function thumbnail($filename)
{
// try to check if file have thumbnail
if (file_exists(config('app.thumbnail_path') . '/' . $filename)) {
$url = config('app.thumbnail_url') . '/' . $filename;
} else {
$url = self::upload($filename);
}
return $url;
}
/**
* Get path to given asset
*
* @param $path
*
* @return string
*/
public static function asset($path)
{
if (env('APP_DEBUG')) {
if (empty($path)) {
throw new InvalidArgumentException('No asset name defined!');
}
// check if asset exists and is file
if (!file_exists(public_path('assets/' . config('app.theme') . '/' . $path))) {
throw new NotFoundHttpException('Cannot find any asset in ' . public_path('assets/' . config('app.theme') . '/' . $path) . '. Try to check your paths.');
}
}
return config('app.url') . '/assets/' . config('app.theme') . '/' . $path;
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\CMS\Helpers;
use App\Models\FileManager\Directory;
use App\Models\FileManager\File;
class RootDirectory
{
protected static $directory;
/**
* Create root directory
*
* @return Directory
*/
protected static function create()
{
$directory = new Directory();
$directory->name = 'Root';
$directory->is_root = true;
$directory->save();
Directory::whereNull('parent_id')
->where('is_root', false)
->update(['parent_id' => $directory->id]);
File::where('directory_id', null)
->update(['directory_id' => $directory->id]);
return $directory;
}
/**
* Get root directory
*
* @return Directory
*/
public static function get()
{
self::$directory = Directory::where('is_root', true)
->first();
if (is_null(self::$directory)) {
self::$directory = self::create();
}
return self::$directory;
}
}
+86
View File
@@ -0,0 +1,86 @@
<?php
namespace App\CMS\Helpers;
use App\CMS\Repositories\Settings\Settings as SettingsRepository;
use App\Models\Settings as SettingsModel;
use Illuminate\Support\Facades\Cache;
/**
* Class Settings
*
* Helper class for easier obtaining system settings
*
* @package App\CMS\Helpers
*/
class Settings
{
/**
* @var array List of all used settings
*/
protected static $settings;
/**
* @var bool Are data already initialized?
*/
protected static $initialized = false;
/**
* Getter for settings determined with key.
*
* @param string $key settings key
* @param string|null $default default value, which will be returned when given key does not exist
*
* @param null $exists
*
* @return null|string
*/
public static function get($key, $default = null, & $exists = null)
{
self::init();
if (isset(self::$settings->$key)) {
$exists = true;
self::$initialized = true;
return self::$settings->$key;
}
$exists = false;
return $default;
}
/**
* Shortcut for obtaining settings saved as JSON
*
* @param $key
*
* @return mixed
*/
public static function getJson($key)
{
return json_decode(self::get($key, '{}'));
}
/**
* Get all settings
*
* @return array
*/
public static function all()
{
self::init();
return self::$settings;
}
/**
* Initialize settings array
*/
private static function init()
{
if (!self::$initialized) {
self::$settings = Cache::remember('settings', config('cache.settingCacheLifetime'), function () {
return app(SettingsRepository::class)->getAll();
});
}
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\CMS\Helpers;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Process\Exception\InvalidArgumentException;
class Template
{
/**
* Getter for real template name
*
* @param $template
*
* @param bool $throwExceptions
*
* @return null|string
*/
public static function name($template, $throwExceptions = true)
{
$namespace = null;
if (strpos($template, '::')) {
list($namespace, $template) = explode('::', $template);
$namespace .= '::';
}
// list of prefixes
$prefixes = ['custom.', ''];
$view = null;
foreach ($prefixes as $prefix) {
if (view()->exists($namespace . 'visitor.' . $prefix . $template)) {
$view = $namespace . 'visitor.' . $prefix . $template;
break;
}
}
if (is_null($view)) {
if ($throwExceptions) {
throw new InvalidArgumentException('Cannot find template for ' . $namespace . $template);
} else {
return false;
}
}
return $view;
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\CMS\Helpers\Traits;
use Carbon\Carbon;
/**
* Class Nullable
*
* @package App\CMS\Helpers\Traits
*/
trait Nullable {
/**
* Get null or parsed date
*
* @param $date
*
* @return null|string
*/
public function nullableDate($date) {
return empty($date) ? null : Carbon::createFromFormat(config('app.date_format'), $date)->toDateTimeString();
}
/**
* Get null or input value
*
* @param $string
*
* @return null
*/
public function nullable($string) {
return empty($string) ? null : $string;
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\CMS\Helpers;
class Widget
{
public static function render(\App\Models\Widgets\Widget $widget)
{
$handler = $widget->widget_type_handler;
if (is_string($widget->settings)) {
$widget->settings = json_decode($widget->settings);
}
$presenter = call_user_func([$handler, 'getPresenter']);
return call_user_func([$presenter, 'render'], $widget);
}
}
+84
View File
@@ -0,0 +1,84 @@
<?php
namespace App\CMS\Helpers;
use App\CMS\Repositories\Widgets\WidgetArea as WidgetAreaRepository;
use Illuminate\Support\Facades\Cache;
class WidgetAreas
{
/**
* @var array list of inicialized widget areas
*/
protected static $widgetAreas = [];
protected static $initialized = false;
protected static function saveRenderedWidgetArea($widgets)
{
foreach ($widgets as $widget) {
if (!isset(self::$widgetAreas[$widget->widget_area_code])) {
self::$widgetAreas[$widget->widget_area_code] = '';
}
self::$widgetAreas[$widget->widget_area_code] .= Widget::render($widget);
}
}
protected static function loadWidgetArea($uniqueCode)
{
$widgets = Cache::remember('widget-area-' . $uniqueCode, setting('widgetCacheLifetime', 5), function () use ($uniqueCode) {
$widgetArea = app(\App\CMS\Repositories\Widgets\WidgetArea::class);
return $widgetArea->getWidgets($uniqueCode)
->get();
});
self::saveRenderedWidgetArea($widgets);
}
protected static function initWidgetAreas()
{
if (self::$initialized) {
return;
}
$widgets = Cache::remember('widgets', setting('widgetCacheLifetime', 5), function () {
$widgetArea = app(WidgetAreaRepository::class);
return $widgetArea->getWidgets()
->get();
});
self::saveRenderedWidgetArea($widgets);
self::$initialized = true;
}
/**
* Renderer for whole widget area.
*
* @param $uniqueCode
*
* @return void
*/
public static function render($uniqueCode)
{
if (!self::$initialized) {
self::initWidgetAreas();
}
if (!isset(self::$widgetAreas[$uniqueCode])) {
self::loadWidgetArea($uniqueCode);
}
echo isset(self::$widgetAreas[$uniqueCode]) ? self::$widgetAreas[$uniqueCode] : null;
}
/**
* Get list of loaded widgets and areas
*
* @return array
*/
public static function getLoadedWidgets()
{
return ['areas' => array_keys(self::$widgetAreas)];
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* Define function for escaping characters.
*
* This funcion prevents of creating build-in function, which escapes also accents...
*
* @param $value
*
* @return string
*/
function e($value)
{
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
}
/**
* Shortcut for \App\CMS\Helpers\Settings::get()
*
* @param $key
* @param null $default
*
* @return null|string
*/
function setting($key, $default = null) {
return \App\CMS\Helpers\Settings::get($key, $default);
}
function asset_path($path) {
return env('SITE_URL').'/assets/'.$path;
}
function template_name($name, $throwExceptions = true) {
return \App\CMS\Helpers\Template::name($name, $throwExceptions);
}
@@ -0,0 +1,38 @@
<?php
namespace App\CMS\Interactions\Admin\Content;
use App\CMS\Contracts\Interaction;
use App\CMS\Enumerations\ContentStatuses;
class ChangeStatus implements Interaction
{
/**
* Change status of content page
*
* @param array $data
* @param array $parameters
*
* @return mixed|void
*/
public function handle($data, $parameters)
{
list ($page) = $parameters;
$page->status = $data['status'];
$page->save();
}
/**
* Check if status is valid
*
* @param array $parameters
*
* @return array
*/
public function getValidationRules($parameters = [])
{
$statuses = ContentStatuses::getWithTranslations();
return ['status' => 'in:' . implode(',', array_keys($statuses))];
}
}
@@ -0,0 +1,45 @@
<?php
namespace App\CMS\Interactions\Admin\Content;
use App\CMS\Contracts\Interaction;
use App\CMS\Contracts\Repositories\Module;
use App\Models\Content\Content;
use Illuminate\Support\Facades\App;
class DeletePage implements Interaction
{
/**
* Perform given action
*
* @param $data array input data
* @param $parameters array parameters
*
* @return void
*/
public function handle($data, $parameters)
{
/**
* @var $page Content
* @var $module Module
*/
$module = App::make(Module::class);
list ($page) = $parameters;
// delete page
$page->delete();
// let module to delete some extra content created during page's life
$module->callOnString($page->moduleHandler, 'delete', [$page]);
}
/**
* @param $data array input data
*
* @return array
*/
public function getValidationRules($data = [])
{
return [];
}
}
@@ -0,0 +1,78 @@
<?php
namespace App\Cms\Interactions\Admin\Content;
use App\CMS\Contracts\Interaction;
use App\CMS\Contracts\Repositories\Module;
use App\CMS\Enumerations\ContentStatuses;
use App\CMS\Helpers\CurrentTemplate;
use App\Events\EditContent as EditContentEvent;
use App\Http\Requests\Request;
use App\Models\Content\Content;
use App\Models\FileManager\File;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Str;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
class EditContent implements Interaction
{
/**
* @var Module
*/
protected $module;
/**
* @var File
*/
protected $file;
public function __construct()
{
$this->module = App::make(Module::class);
$this->file = App::make(File::class);
}
/**
* Edit page
*
* @param array $data
* @param array $parameters
*
* @return mixed
*/
public function handle($data, $parameters)
{
/**
* @var $page Content
*/
list($page) = $parameters;
app('saveContentPipeline')->run($page, $data);
return $page;
}
/**
* Validate this interaction
*
* @param array $parameters
*
* @return array
*/
public function getValidationRules($parameters = [])
{
$id = $parameters[0]->id;
// get all available statuses
$statuses = ContentStatuses::getSimple();
$statuses = implode(',', $statuses);
return [
'title' => 'required',
'url' => 'required|unique:contents,url,' . $id.',id,deleted_at,NULL,language,' . LaravelLocalization::getCurrentLocale(),
'publishedFrom' => 'date',
'publishedTo' => 'date',
'status' => 'required|in:' . $statuses,
'parentPage' => 'exists:contents,id'
];
}
}
@@ -0,0 +1,74 @@
<?php
namespace App\Cms\Interactions\Admin\Content;
use App\CMS\Contracts\Interaction;
use App\CMS\Contracts\Repositories\Content as ContentRepository;
use App\CMS\Contracts\Repositories\Module;
use App\CMS\Enumerations\ContentStatuses;
use App\CMS\Helpers\CurrentTemplate;
use App\Models\Content\Content;
use App\Models\FileManager\File;
use Illuminate\Support\Facades\App;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
class NewContent implements Interaction
{
/**
* @var ContentRepository
*/
protected $content;
/**
* @var File
*/
protected $file;
/**
* @var Module
*/
protected $module;
public function __construct()
{
$this->content = App::make(ContentRepository::class);
$this->module = App::make(Module::class);
$this->file = App::make(File::class);
}
/**
* Create new content page
*
* @param array $data
* @param $parameters
*
* @return Content
*/
public function handle($data, $parameters)
{
list($moduleHandler) = $parameters;
$data['userId'] = \Auth::user()->id;
$data['language'] = LaravelLocalization::getCurrentLocale();
$data['moduleHandler'] = $moduleHandler;
$page = new Content();
app('saveContentPipeline')->run($page, $data);
return $page;
}
public function getValidationRules($parameters = [])
{
// get all available statuses
$statuses = ContentStatuses::getSimple();
$statuses = implode(',', $statuses);
return [
'titlePhoto' => 'image',
'title' => 'required',
'url' => 'required|unique:contents,url,NULL,id,deleted_at,NULL,language,' . LaravelLocalization::getCurrentLocale(),
'status' => 'required|in:'.$statuses,
'parentPage' => 'exists:contents,id',
'publishedFrom' => 'date',
'publishedTo' => 'date',
];
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\CMS\Interactions\Admin\Content;
use App\CMS\Contracts\Interaction;
use App\CMS\Enumerations\ContentStatuses;
use App\Models\Content\Content;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
class SetHomepage implements Interaction
{
/**
* Set homepage of given page
*
* @param array $data
* @param array $parameters
*
* @return void
*/
public function handle($data, $parameters)
{
list ($page) = $parameters;
// disable any other existing homepage
Content::where('isHomepage', true)
->where('language', LaravelLocalization::getCurrentLocale())
->update(['isHomepage' => false]);
// set new homepage
$page->isHomepage = true;
$page->save();
}
/**
* Check if status is valid
*
* @param array $parameters
*
* @return array
*/
public function getValidationRules($parameters = [])
{
return [];
}
}
@@ -0,0 +1,56 @@
<?php
namespace App\CMS\Interactions\Admin\FileManager;
use App\CMS\Contracts\Interaction;
use App\CMS\Exceptions\FileManager\SubdirectoryExistsInDirectory;
use App\CMS\Repositories\FileManager\Directory as DirectoryRepository;
use App\Models\FileManager\Directory;
class CreateDirectory implements Interaction
{
/**
* @var DirectoryRepository
*/
private $repository;
public function __construct(DirectoryRepository $repository)
{
$this->repository = $repository;
}
/**
* Perform given action
*
* @param $data array input data
* @param $parameters array parameters
*
* @return Directory
* @throws SubdirectoryExistsInDirectory
*/
public function handle($data, $parameters)
{
$data['parentDirectory'] = isset($data['parentDirectory']) ? $data['parentDirectory'] : null;
// check if created folder does not exist in current directory
if ($this->repository->checkIfNameExists($data['name'], $data['parentDirectory'])) {
throw new SubdirectoryExistsInDirectory();
}
// create new database entry
return $this->repository->create($data);
}
/**
* @param $data array input data
*
* @return array
* @throws SubdirectoryExistsInDirectory
*/
public function getValidationRules($data = [])
{
return [
'name' => 'required|max:255',
'parentDirectory' => 'exists:directories,id'
];
}
}
@@ -1,17 +1,18 @@
<?php
namespace App\MenuPresenters;
use Pingpong\Menus\MenuItem;
use Pingpong\Menus\Presenters\Presenter;
namespace App\CMS\MenuPresenters;
class FoundationDrilldownMenuPresenter extends Presenter
use Nwidart\Menus\MenuItem;
use Nwidart\Menus\Presenters\Presenter;
class MetismenuPresenter extends Presenter
{
/**
* {@inheritdoc }
*/
public function getOpenTagWrapper()
{
return PHP_EOL . '<ul class="vertical menu" data-drilldown>' . PHP_EOL;
return PHP_EOL . '<ul class="nav metismenu" id="sidebar-menu">' . PHP_EOL;
}
/**
@@ -27,6 +28,10 @@ class FoundationDrilldownMenuPresenter extends Presenter
*/
public function getMenuWithoutDropdownWrapper($item)
{
if (!is_string($item->getUrl())) {
return null;
}
return '<li' . $this->getActiveState($item) . '><a href="' . $item->getUrl() . '">' . $item->getIcon() . ' ' . $item->title . '</a></li>' . PHP_EOL;
}
@@ -35,6 +40,10 @@ class FoundationDrilldownMenuPresenter extends Presenter
*/
public function getActiveState(MenuItem $item)
{
if ($item->isDivider()) {
return null;
}
$active = ' class="active"';
if (empty($item->getChilds())) {
@@ -60,18 +69,22 @@ class FoundationDrilldownMenuPresenter extends Presenter
return '<li class="divider"></li>' . PHP_EOL;
}
public function getMultiLevelDropdownWrapper($item)
{
return $this->getMenuWithDropDownWrapper($item);
}
/**
* {@inheritdoc }
*/
public function getMenuWithDropDownWrapper($item)
{
$active = $this->getActiveState($item);
return '<li>
<a ' . $active . ' href="#">' . $item->getIcon() . ' ' . $item->title . '</a>
<ul class="vertical menu">
return '<li' . $active . '>
<a href="#">' . $item->getIcon() . ' ' . $item->title . ' <i class="fa arrow"></i></a>
<ul>
' . $this->getChildMenuItems($item) . '
</ul>
</li>' . PHP_EOL;;
</li>' . PHP_EOL;
}
}
@@ -0,0 +1,62 @@
<?php
namespace App\CMS\MenuPresenters;
use Nwidart\Menus\MenuItem;
use Nwidart\Menus\Presenters\Presenter;
class ProfileMenuPresenter extends Presenter
{
/**
* {@inheritdoc }
*/
public function getOpenTagWrapper()
{
return PHP_EOL . '<div class="dropdown-menu profile-dropdown-menu">' . PHP_EOL;
}
/**
* {@inheritdoc }
*/
public function getCloseTagWrapper()
{
return PHP_EOL . '</div>' . PHP_EOL;
}
/**
* {@inheritdoc }
*/
public function getMenuWithoutDropdownWrapper($item)
{
return '<a href="' . $item->getUrl() . '" class="dropdown-item">' . $item->getIcon() . ' ' . $item->title . '</a>' . PHP_EOL;
}
/**
* {@inheritdoc }
*/
public function getActiveState(MenuItem $item)
{
return null;
}
/**
* {@inheritdoc }
*/
public function getDividerWrapper()
{
return '<div class="dropdown-divider"></div>' . PHP_EOL;
}
public function getMultiLevelDropdownWrapper($item)
{
return null;//$this->getMenuWithDropDownWrapper($item);
}
/**
* {@inheritdoc }
*/
public function getMenuWithDropDownWrapper($item)
{
return null;
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\CMS\MenuPresenters;
use Nwidart\Menus\Presenters\Bootstrap\NavbarPresenter;
class TopMenuPresenter extends NavbarPresenter {
public function getOpenTagWrapper()
{
return '';
}
public function getCloseTagWrapper()
{
return '';
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
namespace App\CMS\ModuleManager;
use App\CMS\Contracts\Modules\AppHandler;
use App\CMS\Contracts\Modules\TemplateHandler;
use App\Models\Module;
use Illuminate\Support\Facades\App;
class Installer
{
/**
* Create new module in database
*
* @param $name
* @param $alias
* @param string $description
* @param null $handler
* @param $parentModuleId
* @param array $settings
*
* @return Module
* @throws \ErrorException
*/
public static function install($name, $alias, $staticName, $description, $handler, $parentModuleId, $settings)
{
// check if user does not want to install module in runtime
if (!App::runningInConsole()) {
throw new \ErrorException('Modules can be installed only via Artisan!');
}
$managesContent = $handler ? in_array(AppHandler::class, class_implements($handler)) : false;
$isTemplate = $handler ? in_array(TemplateHandler::class, class_implements($handler)) : false;
$supportCategories = $managesContent ? call_user_func([$handler, 'supportCategories']) : false;
if ($parentModuleId) {
$parentModule = Module::findOrFail($parentModuleId);
$parentModule->has_submodules = true;
$parentModule->save();
}
// insert module into database
$module = Module::create([
'name' => $name,
'description' => $description,
'handler' => $handler,
'static_name' => $staticName,
'manages_content' => $managesContent,
'support_categories' => $supportCategories,
'alias' => $alias,
'module_settings' => $settings,
'parent_id' => $parentModuleId ? $parentModuleId : null,
'enabled' => 1,
'is_template' => $isTemplate
]);
// install something module-specific
if ($handler && is_callable([$handler, 'install'])) {
call_user_func([$handler, 'install']);
}
return $module;
}
}
@@ -0,0 +1,61 @@
<?php
namespace App\CMS\ModuleManager\Providers;
use App\CMS\Repositories\Module as ModuleRepository;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
class ModuleManager extends ServiceProvider
{
/**
* Bootstrap the application services.
* @return void
*/
public function boot()
{
// this service provider needs published config - config is merged right after this service provider
try {
$modules = app(ModuleRepository::class)->all();
} catch (QueryException $e) {
return;
}
// iterate over all modules and enable or disable them
foreach ($modules as $module) {
if (isset($module->module_settings['providers']) && !empty($module->module_settings['providers'])) {
foreach ($module->module_settings['providers'] as $provider) {
if (!class_exists($provider)) {
Log::warning($provider.' does not exists. Skipping');
continue;
}
$this->app->register($provider);
}
}
// include files (if any)
if (isset($module->module_settings['files']) && !empty($module->module_settings['files'])) {
foreach ($module->module_settings['files'] as $file) {
$path = config('modules.paths.modules') . '/' . $module->static_name . '/' . $file;
if (!file_exists($path)) {
$path = base_path($file);
}
@include_once $path;
}
}
}
}
/**
* Register the application services.
* @return void
*/
public function register()
{
}
}
+60
View File
@@ -0,0 +1,60 @@
<?php
namespace App\CMS\ModuleManager;
use App\Models\Module;
use App\Models\Templates\TemplatePath;
use Illuminate\Support\Facades\App;
class Uninstaller {
/**
* Delete module from database and uninstall its dependencies
*
* @param Module $module
*
* @throws \ErrorException
*/
public static function uninstall(Module $module)
{
// check if user does not want to install module in runtime
if (!App::runningInConsole()) {
throw new \ErrorException('Modules can be uninstalled only via Artisan!');
}
// delete everything in /resources/views/visitor
if ($module->is_template) {
self::deleteDirectory(resource_path('views/visitor'));
self::deleteDirectory(resource_path('views/modules'));
self::deleteDirectory(public_path('assets'));
// delete all template paths
TemplatePath::getQuery()
->delete();
}
if ($module->handler && is_callable([$module->handler, 'uninstall'])) {
call_user_func([$module->handler, 'uninstall'], $module);
}
$module->delete();
}
/**
* Delete directory when uninstalling module.
*
* @param $directory
*
* @throws \ErrorException
*/
private static function deleteDirectory($directory)
{
if (!is_dir($directory)) {
return;
}
$success = \File::deleteDirectory($directory, true);
if (!$success) {
throw new \ErrorException('Cannot delete ' . $directory);
}
}
}
@@ -0,0 +1,76 @@
<?php
namespace App\CMS\Modules\ServiceProviders;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
abstract class ServiceProvider extends LaravelServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
* @var bool
*/
protected $defer = false;
protected $alias = false;
protected $path = false;
protected $publishViews = true;
abstract protected function setModuleAlias();
abstract protected function setModulePath();
/**
* Boot the application events.
* @return void
*/
public function boot()
{
$this->setModuleAlias();
$this->setModulePath();
$this->registerTranslations();
$this->registerConfig();
$this->registerViews();
}
/**
* Register config.
* @return void
*/
protected function registerConfig()
{
$this->publishes([$this->path . '/../Config/config.php' => config_path($this->alias . '.php')]);
$this->mergeConfigFrom($this->path . '/../Config/config.php', $this->alias);
}
public function register()
{
}
/**
* Register views.
* @return void
*/
protected function registerViews()
{
$viewPath = base_path('resources/views/modules/' . $this->alias);
$sourcePath = $this->path . '/../Resources/views';
$this->loadViewsFrom(array_merge(array_map(function ($path) {
return $path . '/modules/' . $this->alias;
}, \Config::get('view.paths')), [$sourcePath]), $this->alias);
if (is_dir($sourcePath) && $this->publishViews) {
$this->publishes([$sourcePath => $viewPath], 'module-views');
}
}
/**
* Register translations.
* @return void
*/
protected function registerTranslations()
{
$this->loadTranslationsFrom($this->path . '/../Resources/lang', $this->alias);
}
}
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class $MigrationName$ extends Migration
{
/**
* Run migration
*/
public function up()
{
Schema::create('$TableName$', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Rollback migration
*/
public function down()
{
Schema::dropIfExists('$TableName$');
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class $MigrationName$ extends Migration
{
/**
* Run migration
*/
public function up()
{
Schema::table('$TableName$', function (Blueprint $table) {
});
}
/**
* Rollback migration
*/
public function down()
{
Schema::table('$TableName$', function (Blueprint $table) {
});
}
}
@@ -0,0 +1,12 @@
<?php
return [
'name' => '$Module$',
'translatedName' => '$module$::$module$.name',
'translatedDescription' => '$module$::$module$.description',
'alias' => strtolower('$Module$'),
'handler' => \Modules\$Module$\Handlers\$Module$Handler::class,
'providers' => [\Modules\$Module$\Providers\$Module$ServiceProvider::class],
'files' => ['Http/routes.php'],
'order' => 0,
];
@@ -0,0 +1,10 @@
<?php
namespace Modules\$ModuleNamespace$\Entities;
use Illuminate\Database\Eloquent\Model;
class $Entity$ extends Model {
protected $table = 'contents';
// ...
}
@@ -0,0 +1,40 @@
<?php
namespace Modules\$ModuleNamespace$\Handlers;
use App\CMS\Contracts\Content\ContentTitles;
use App\Models\Content\Content;
class $Module$ContentHandler extends $Module$Handler implements ContentTitles
{
/**
* Get translated title for pages overview of given type.
* This value is used for rendering list of all content pages of given type in administration.
* @return string
*/
public static function getOverviewTitle()
{
// TODO: Implement getOverviewTitle() method.
}
/**
* Title displayed above for for creating new content page
* @return string
*/
public static function getCreateNewTitle()
{
// TODO: Implement getCreateNewTitle() method.
}
/**
* Title for form displayed for editin content page
*
* @param Content $content
*
* @return mixed
*/
public static function getEditTitle(Content $content)
{
// TODO: Implement getEditTitle() method.
}
}
@@ -0,0 +1,38 @@
<?php
namespace Modules\$ModuleNamespace$\Handlers;
use App\CMS\Handlers\BaseHandler;
use App\Models\User;
class $Module$Handler extends BaseHandler
{
/**
* Register admin menu
*
* @param User $user
*/
public static function registerAdminMenu(User $user)
{
// register links in admin menu
$menu = \Menu::instance('mainMenu');
$menu->dropdown(trans('$module$::$module$.name'), function ($submenu) use ($user) {
$submenu->route('$module$.overview', trans('$module$::$module$.overview'), [], 20, ['icon' => 'fa fa-fw fa-list']);
$submenu->route('$module$.new', trans('$module$::$module$.new'), [], 21, ['icon' => 'fa fa-fw fa-plus']);
}, 15, ['icon' => 'fa fa-fw']);
// TODO: add admin menu entries
}
/**
* Does this module support categories?
* @return boolean
*/
public static function supportCategories()
{
return true;
}
}
@@ -0,0 +1,103 @@
<?php
namespace Modules\$ModuleNamespace$\Http\Controllers\Admin;
use App\Http\Controllers\Admin\Controller;
use Modules\$ModuleNamespace$\Http\Requests\Update$Entity$;
use Modules\$ModuleNamespace$\Http\Requests\Create$Entity$;
use Modules\$ModuleNamespace$\Repositories\$Module$Repository;
use $EntityNamespace$$Entity$ as $Entity$Entity;
class $Module$ extends Controller
{
/**
* @var $Module$Repository
*/
private $$module$Repository;
public function __construct($Module$Repository $$module$Repository)
{
$this->$module$Repository = $$module$Repository;
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$items = $Entity$Entity::all();
return view('$module$::admin/index', compact('items'));
}
/**
* Display form for updating entity
*
* @param $Entity$Entity $entity
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function edit($Entity$Entity $entity)
{
return view('$module$::admin/update', compact('entity'));
}
/**
* Update existing entity
*
* @param Update$Entity$ $request
* @param $Entity$Entity $item
*
* @return \Illuminate\Http\RedirectResponse
*/
public function update(Update$Entity$ $request, $Entity$Entity $entity)
{
// ...
$this->$module$Repository->update($entity, $request->all());
return redirect()
->back()
->with('success', trans('$module$.$module.successfullyUpdated'));
}
/**
* Display form for creating new entity
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function create() {
$entity = new $Entity$Entity();
return view('$module$::admin/create', compact('entity'));
}
/**
* Create new instance of entity
*/
public function store(Create$Entity$ $request) {
// ...
$this->$module$Repository->create($request->all());
return redirect()
->back()
->with('success', trans('$module$.$module.successfullyUpdated'));
}
/**
* Delete entity
*
* @param $Entity$ $entity
*
* @return \Illuminate\Http\RedirectResponse
*/
public function destroy($Entity$ $entity) {
$entity->delete();
return redirect()
->back()
->with('success', trans('$module$.$module.successfullyDeleted'));
}
}
@@ -0,0 +1,11 @@
<?php
namespace Modules\$ModuleNamespace$\Http\Requests;
use App\Http\Requests\Request;
class Create$Entity$ extends Request {
public function rules()
{
return parent::rules();
}
}
@@ -0,0 +1,11 @@
<?php
namespace Modules\$ModuleNamespace$\Http\Requests;
use App\Http\Requests\Request;
class Update$Entity$ extends Request {
public function rules()
{
return parent::rules();
}
}
@@ -0,0 +1,25 @@
<?php
\Route::group([
'prefix' => \LaravelLocalization::setLocale() . '/admin/$module$',
'middleware' => ['admin'],
'namespace' => 'Modules\$Module$\Http\Controllers\Admin'
], function () {
Route::get('/', '$Module$@index')
->name('$module$.overview');
Route::get('/new', '$Module$@create')
->name('$module$.new');
Route::post('/new', '$Module$@store')
->name('$module$.postNew');
Route::get('/edit/{id}', '$Module$@edit')
->name('$module$.edit');
Route::post('/edit/{id}', '$Module$@update')
->name('$module$.postEdit');
Route::get('/delete/{id}', '$Module$@delete')
->name('$module$.delete');
});
@@ -0,0 +1,31 @@
<?php
namespace Modules\$Module$\Providers;
use App\CMS\Modules\ServiceProviders\ServiceProvider;
/**
* Class $Module$ServiceProvider
*
* Service provider for module $Module$
*
* @package Modules\$Module$\Providers
*/
class $Module$ServiceProvider extends ServiceProvider
{
/**
* Set module Alias
*/
protected function setModuleAlias()
{
$this->alias = strtolower('$module$');
}
/**
* Set path to module
*/
protected function setModulePath()
{
$this->path = __DIR__;
}
}
@@ -0,0 +1,24 @@
<?php
namespace Modules\$ModuleNamespace$\Repositories;
use $EntityNamespace$$Entity$ as $Entity$Entity;
class $Module$Repository {
/**
* Create new instance of entity
*
* @param $data
*/
public function create($data) {
$Entity$Entity::create($data);
}
/**
* Update entity
*
* @param $Entity$Entity $entity
*/
public function update($Entity$Entity $entity, $data) {
$entity->update($data);
}
}

Some files were not shown because too many files have changed in this diff Show More