From 88cfeae2668d6c2a41fee23fb67b675dbf0fe564 Mon Sep 17 00:00:00 2001 From: afornerot Date: Tue, 10 Jan 2023 11:13:28 +0100 Subject: [PATCH] v0 ninegate --- assets/app.js | 11 +- assets/js/app.js | 29 +- assets/styles/app.css | 210 +++++- config/packages/oneup_uploader.yaml | 4 + config/routes.yaml | 208 +++++- .../hydra-dispatcher/hydra/providers.yml | 4 +- migrations/Version20230105192629.php | 193 ++++++ package.json | 1 + public/medias/{icons => icon}/.gitkeep | 0 .../medias/{icons => icon}/icon_adminer.png | Bin public/medias/{icons => icon}/icon_anchor.png | Bin .../medias/{icons => icon}/icon_aperture.png | Bin .../{icons => icon}/icon_arrow-down.png | Bin .../medias/{icons => icon}/icon_arrow-up.png | Bin public/medias/{icons => icon}/icon_art.png | Bin public/medias/{icons => icon}/icon_balado.png | Bin .../medias/{icons => icon}/icon_bar-chart.png | Bin .../{icons => icon}/icon_batteryfull.png | Bin .../{icons => icon}/icon_batterylow.png | Bin public/medias/{icons => icon}/icon_bdd.png | Bin public/medias/{icons => icon}/icon_bike.png | Bin public/medias/{icons => icon}/icon_biker.png | Bin .../medias/{icons => icon}/icon_bikewheel.png | Bin public/medias/{icons => icon}/icon_blimp.png | Bin public/medias/{icons => icon}/icon_bolt.png | Bin public/medias/{icons => icon}/icon_bomb.png | Bin .../medias/{icons => icon}/icon_booklet.png | Bin .../medias/{icons => icon}/icon_bookshelf.png | Bin .../medias/{icons => icon}/icon_briefcase.png | Bin .../{icons => icon}/icon_brightness.png | Bin .../medias/{icons => icon}/icon_browser.png | Bin .../{icons => icon}/icon_brush-pencil.png | Bin .../medias/{icons => icon}/icon_cadoles.png | Bin .../{icons => icon}/icon_calculator.png | Bin .../medias/{icons => icon}/icon_calendar.png | Bin public/medias/{icons => icon}/icon_camera.png | Bin public/medias/{icons => icon}/icon_car.png | Bin public/medias/{icons => icon}/icon_cart.png | Bin .../medias/{icons => icon}/icon_carwheel.png | Bin .../medias/{icons => icon}/icon_caution.png | Bin public/medias/{icons => icon}/icon_chart.png | Bin .../medias/{icons => icon}/icon_chartpie.png | Bin public/medias/{icons => icon}/icon_chat.png | Bin public/medias/{icons => icon}/icon_check.png | Bin .../{icons => icon}/icon_circlecompass.png | Bin .../medias/{icons => icon}/icon_clapboard.png | Bin .../medias/{icons => icon}/icon_clipboard.png | Bin public/medias/{icons => icon}/icon_clock.png | Bin public/medias/{icons => icon}/icon_cloud.png | Bin public/medias/{icons => icon}/icon_cmyk.png | Bin .../{icons => icon}/icon_colorwheel.png | Bin .../medias/{icons => icon}/icon_compass.png | Bin .../medias/{icons => icon}/icon_compose.png | Bin .../medias/{icons => icon}/icon_computer.png | Bin public/medias/{icons => icon}/icon_cone.png | Bin .../medias/{icons => icon}/icon_contacts.png | Bin .../medias/{icons => icon}/icon_contrast.png | Bin .../medias/{icons => icon}/icon_countdown.png | Bin .../{icons => icon}/icon_creditcard.png | Bin public/medias/{icons => icon}/icon_crop.png | Bin .../{icons => icon}/icon_crossroads.png | Bin public/medias/{icons => icon}/icon_crous.png | Bin public/medias/{icons => icon}/icon_cruise.png | Bin public/medias/{icons => icon}/icon_cursor.png | Bin public/medias/{icons => icon}/icon_denied.png | Bin public/medias/{icons => icon}/icon_dev.png | Bin public/medias/{icons => icon}/icon_die.png | Bin .../medias/{icons => icon}/icon_document.png | Bin .../medias/{icons => icon}/icon_dokuwiki.png | Bin public/medias/{icons => icon}/icon_dolly.png | Bin public/medias/{icons => icon}/icon_door.png | Bin .../medias/{icons => icon}/icon_download.png | Bin public/medias/{icons => icon}/icon_easel.png | Bin .../medias/{icons => icon}/icon_econnect.png | Bin public/medias/{icons => icon}/icon_email.png | Bin .../medias/{icons => icon}/icon_etherhome.png | Bin public/medias/{icons => icon}/icon_euro.png | Bin public/medias/{icons => icon}/icon_eye.png | Bin .../{icons => icon}/icon_eyedropper.png | Bin .../medias/{icons => icon}/icon_fashion.png | Bin .../medias/{icons => icon}/icon_filmreel.png | Bin .../medias/{icons => icon}/icon_filmroll.png | Bin public/medias/{icons => icon}/icon_flag.png | Bin public/medias/{icons => icon}/icon_flame.png | Bin public/medias/{icons => icon}/icon_flash.png | Bin public/medias/{icons => icon}/icon_flower.png | Bin public/medias/{icons => icon}/icon_focus.png | Bin public/medias/{icons => icon}/icon_folder.png | Bin public/medias/{icons => icon}/icon_frames.png | Bin .../{icons => icon}/icon_gamecontroller.png | Bin public/medias/{icons => icon}/icon_gas.png | Bin public/medias/{icons => icon}/icon_gear.png | Bin public/medias/{icons => icon}/icon_genius.png | Bin public/medias/{icons => icon}/icon_gepi.png | Bin public/medias/{icons => icon}/icon_global.png | Bin public/medias/{icons => icon}/icon_globe.png | Bin public/medias/{icons => icon}/icon_gps.png | Bin public/medias/{icons => icon}/icon_grr.png | Bin public/medias/{icons => icon}/icon_hazard.png | Bin public/medias/{icons => icon}/icon_heart.png | Bin .../{icons => icon}/icon_helicopter.png | Bin public/medias/{icons => icon}/icon_hotair.png | Bin .../medias/{icons => icon}/icon_hourglass.png | Bin public/medias/{icons => icon}/icon_image.png | Bin public/medias/{icons => icon}/icon_info.png | Bin .../{icons => icon}/icon_interstate.png | Bin .../medias/{icons => icon}/icon_kanboard.png | Bin public/medias/{icons => icon}/icon_key.png | Bin .../medias/{icons => icon}/icon_keyboard.png | Bin public/medias/{icons => icon}/icon_lens.png | Bin .../medias/{icons => icon}/icon_lightbulb.png | Bin .../{icons => icon}/icon_limesurvey.png | Bin .../medias/{icons => icon}/icon_loading.png | Bin .../medias/{icons => icon}/icon_location.png | Bin public/medias/{icons => icon}/icon_locked.png | Bin public/medias/{icons => icon}/icon_loomio.png | Bin .../medias/{icons => icon}/icon_magicwand.png | Bin .../{icons => icon}/icon_magnifyingglass.png | Bin public/medias/{icons => icon}/icon_mail.png | Bin public/medias/{icons => icon}/icon_map.png | Bin .../medias/{icons => icon}/icon_mariane.png | Bin .../medias/{icons => icon}/icon_megaphone.png | Bin .../{icons => icon}/icon_megaphone2.png | Bin .../{icons => icon}/icon_memorycard.png | Bin public/medias/{icons => icon}/icon_merge.png | Bin public/medias/{icons => icon}/icon_mic.png | Bin .../{icons => icon}/icon_microphone.png | Bin .../medias/{icons => icon}/icon_mindmaps.png | Bin public/medias/{icons => icon}/icon_money.png | Bin public/medias/{icons => icon}/icon_moodle.png | Bin .../{icons => icon}/icon_motorcycle.png | Bin public/medias/{icons => icon}/icon_music.png | Bin public/medias/{icons => icon}/icon_news.png | Bin .../medias/{icons => icon}/icon_nextcloud.png | Bin .../{icons => icon}/icon_opensondage.png | Bin .../{icons => icon}/icon_paintbrush.png | Bin .../{icons => icon}/icon_paintbrush2.png | Bin .../medias/{icons => icon}/icon_paintcan.png | Bin .../{icons => icon}/icon_paintroller.png | Bin .../medias/{icons => icon}/icon_parachute.png | Bin public/medias/{icons => icon}/icon_pencil.png | Bin public/medias/{icons => icon}/icon_phone.png | Bin .../{icons => icon}/icon_phpldapadmin.png | Bin .../medias/{icons => icon}/icon_piechart.png | Bin public/medias/{icons => icon}/icon_pin.png | Bin public/medias/{icons => icon}/icon_pin2.png | Bin public/medias/{icons => icon}/icon_piwik.png | Bin public/medias/{icons => icon}/icon_plane.png | Bin public/medias/{icons => icon}/icon_play.png | Bin public/medias/{icons => icon}/icon_plugin.png | Bin .../medias/{icons => icon}/icon_polaroid.png | Bin .../{icons => icon}/icon_polaroidcamera.png | Bin .../medias/{icons => icon}/icon_polaroids.png | Bin public/medias/{icons => icon}/icon_power.png | Bin .../medias/{icons => icon}/icon_present.png | Bin public/medias/{icons => icon}/icon_profle.png | Bin public/medias/{icons => icon}/icon_quote.png | Bin .../{icons => icon}/icon_racingflags.png | Bin public/medias/{icons => icon}/icon_radio.png | Bin .../{icons => icon}/icon_radiotower.png | Bin .../medias/{icons => icon}/icon_rainbow.png | Bin .../medias/{icons => icon}/icon_recycle.png | Bin public/medias/{icons => icon}/icon_rgb.png | Bin public/medias/{icons => icon}/icon_ribbon.png | Bin .../medias/{icons => icon}/icon_roadblock.png | Bin public/medias/{icons => icon}/icon_rocket.png | Bin .../medias/{icons => icon}/icon_roundcube.png | Bin public/medias/{icons => icon}/icon_rss.png | Bin .../{icons => icon}/icon_rulertriangle.png | Bin .../medias/{icons => icon}/icon_rundeck.png | Bin .../medias/{icons => icon}/icon_running.png | Bin .../medias/{icons => icon}/icon_sacoche.png | Bin .../medias/{icons => icon}/icon_sailboat.png | Bin .../{icons => icon}/icon_schooolbus.png | Bin .../medias/{icons => icon}/icon_scissors.png | Bin .../medias/{icons => icon}/icon_scooter.png | Bin .../medias/{icons => icon}/icon_security.png | Bin .../medias/{icons => icon}/icon_selftimer.png | Bin .../medias/{icons => icon}/icon_settings.png | Bin .../medias/{icons => icon}/icon_shipwheel.png | Bin .../{icons => icon}/icon_shoeprints.png | Bin public/medias/{icons => icon}/icon_shop.png | Bin .../{icons => icon}/icon_skateboard.png | Bin public/medias/{icons => icon}/icon_slr.png | Bin .../{icons => icon}/icon_smartphone.png | Bin .../{icons => icon}/icon_spaceshuttle.png | Bin .../medias/{icons => icon}/icon_speaker.png | Bin .../{icons => icon}/icon_speedometer.png | Bin .../{icons => icon}/icon_spraypaint.png | Bin public/medias/{icons => icon}/icon_stack.png | Bin public/medias/{icons => icon}/icon_star.png | Bin .../{icons => icon}/icon_steeringwheel.png | Bin public/medias/{icons => icon}/icon_stop.png | Bin public/medias/{icons => icon}/icon_sub.png | Bin .../medias/{icons => icon}/icon_submarine.png | Bin .../medias/{icons => icon}/icon_support.png | Bin .../medias/{icons => icon}/icon_swatches.png | Bin public/medias/{icons => icon}/icon_tablet.png | Bin .../medias/{icons => icon}/icon_takeoff.png | Bin public/medias/{icons => icon}/icon_target.png | Bin public/medias/{icons => icon}/icon_taxi.png | Bin public/medias/{icons => icon}/icon_tchap.png | Bin .../medias/{icons => icon}/icon_toolbox.png | Bin public/medias/{icons => icon}/icon_tools.png | Bin .../medias/{icons => icon}/icon_tractor.png | Bin .../medias/{icons => icon}/icon_traffic.png | Bin public/medias/{icons => icon}/icon_train.png | Bin .../{icons => icon}/icon_travelerbag.png | Bin public/medias/{icons => icon}/icon_trends.png | Bin public/medias/{icons => icon}/icon_tripod.png | Bin public/medias/{icons => icon}/icon_trophy.png | Bin public/medias/{icons => icon}/icon_truck.png | Bin public/medias/{icons => icon}/icon_tv.png | Bin .../{icons => icon}/icon_typography.png | Bin public/medias/{icons => icon}/icon_ufo.png | Bin .../medias/{icons => icon}/icon_umbrella.png | Bin .../medias/{icons => icon}/icon_unicycle.png | Bin .../medias/{icons => icon}/icon_unlocked.png | Bin public/medias/{icons => icon}/icon_upload.png | Bin public/medias/{icons => icon}/icon_users.png | Bin public/medias/{icons => icon}/icon_video.png | Bin .../icon_videocameraclassic.png | Bin .../icon_videocameracompact.png | Bin public/medias/{icons => icon}/icon_volume.png | Bin public/medias/{icons => icon}/icon_water.png | Bin .../medias/{icons => icon}/icon_windsock.png | Bin public/medias/{icons => icon}/icon_windy.png | Bin .../medias/{icons => icon}/icon_wordpress.png | Bin public/medias/{icons => icon}/icon_zoomin.png | Bin .../medias/{icons => icon}/icon_zoomout.png | Bin src/Command/InitCommand.php | 16 + src/Controller/AlertController.php | 196 ++++++ src/Controller/AlertcategoryController.php | 124 ++++ src/Controller/GroupController.php | 21 + src/Controller/HomeController.php | 14 +- src/Controller/IconController.php | 180 +++++ src/Controller/ItemController.php | 182 +++++ src/Controller/ItemcategoryController.php | 131 ++++ src/Controller/MinioController.php | 17 +- src/Entity/Alert.php | 413 +++++++++++ src/Entity/Alertcategory.php | 175 +++++ src/Entity/Bookmark.php | 337 +++++++++ src/Entity/Group.php | 66 ++ src/Entity/Icon.php | 400 +++++++++++ src/Entity/Item.php | 359 ++++++++++ src/Entity/Itemcategory.php | 213 ++++++ src/Entity/Page.php | 642 ++++++++++++++++++ src/Entity/Pagecategory.php | 119 ++++ src/Entity/Pagewidget.php | 602 ++++++++++++++++ src/Entity/Slide.php | 246 +++++++ src/Entity/Widget.php | 568 ++++++++++++++++ src/Form/AlertType.php | 117 ++++ src/Form/AlertcategoryType.php | 47 ++ src/Form/IconType.php | 42 ++ src/Form/ItemType.php | 127 ++++ src/Form/ItemcategoryType.php | 46 ++ src/Repository/AlertRepository.php | 169 +++++ src/Repository/ItemRepository.php | 169 +++++ src/Repository/PageRepository.php | 66 ++ src/Repository/WidgetRepository.php | 66 ++ templates/Alert/edit.html.twig | 78 +++ templates/Alert/list.html.twig | 431 ++++++++++++ templates/Alertcategory/edit.html.twig | 91 +++ templates/Home/page.html.twig | 51 ++ templates/Icon/edit.html.twig | 78 +++ templates/Icon/list.html.twig | 25 + templates/Icon/select.html.twig | 70 ++ templates/Icon/upload.html.twig | 37 + templates/Include/sidebaradmin.html.twig | 22 + templates/Item/edit.html.twig | 143 ++++ templates/Item/list.html.twig | 223 ++++++ templates/Itemcategory/edit.html.twig | 60 ++ yarn.lock | 5 + 273 files changed, 7828 insertions(+), 16 deletions(-) create mode 100644 migrations/Version20230105192629.php rename public/medias/{icons => icon}/.gitkeep (100%) rename public/medias/{icons => icon}/icon_adminer.png (100%) rename public/medias/{icons => icon}/icon_anchor.png (100%) rename public/medias/{icons => icon}/icon_aperture.png (100%) rename public/medias/{icons => icon}/icon_arrow-down.png (100%) rename public/medias/{icons => icon}/icon_arrow-up.png (100%) rename public/medias/{icons => icon}/icon_art.png (100%) rename public/medias/{icons => icon}/icon_balado.png (100%) rename public/medias/{icons => icon}/icon_bar-chart.png (100%) rename public/medias/{icons => icon}/icon_batteryfull.png (100%) rename public/medias/{icons => icon}/icon_batterylow.png (100%) rename public/medias/{icons => icon}/icon_bdd.png (100%) rename public/medias/{icons => icon}/icon_bike.png (100%) rename public/medias/{icons => icon}/icon_biker.png (100%) rename public/medias/{icons => icon}/icon_bikewheel.png (100%) rename public/medias/{icons => icon}/icon_blimp.png (100%) rename public/medias/{icons => icon}/icon_bolt.png (100%) rename public/medias/{icons => icon}/icon_bomb.png (100%) rename public/medias/{icons => icon}/icon_booklet.png (100%) rename public/medias/{icons => icon}/icon_bookshelf.png (100%) rename public/medias/{icons => icon}/icon_briefcase.png (100%) rename public/medias/{icons => icon}/icon_brightness.png (100%) rename public/medias/{icons => icon}/icon_browser.png (100%) rename public/medias/{icons => icon}/icon_brush-pencil.png (100%) rename public/medias/{icons => icon}/icon_cadoles.png (100%) rename public/medias/{icons => icon}/icon_calculator.png (100%) rename public/medias/{icons => icon}/icon_calendar.png (100%) rename public/medias/{icons => icon}/icon_camera.png (100%) rename public/medias/{icons => icon}/icon_car.png (100%) rename public/medias/{icons => icon}/icon_cart.png (100%) rename public/medias/{icons => icon}/icon_carwheel.png (100%) rename public/medias/{icons => icon}/icon_caution.png (100%) rename public/medias/{icons => icon}/icon_chart.png (100%) rename public/medias/{icons => icon}/icon_chartpie.png (100%) rename public/medias/{icons => icon}/icon_chat.png (100%) rename public/medias/{icons => icon}/icon_check.png (100%) rename public/medias/{icons => icon}/icon_circlecompass.png (100%) rename public/medias/{icons => icon}/icon_clapboard.png (100%) rename public/medias/{icons => icon}/icon_clipboard.png (100%) rename public/medias/{icons => icon}/icon_clock.png (100%) rename public/medias/{icons => icon}/icon_cloud.png (100%) rename public/medias/{icons => icon}/icon_cmyk.png (100%) rename public/medias/{icons => icon}/icon_colorwheel.png (100%) rename public/medias/{icons => icon}/icon_compass.png (100%) rename public/medias/{icons => icon}/icon_compose.png (100%) rename public/medias/{icons => icon}/icon_computer.png (100%) rename public/medias/{icons => icon}/icon_cone.png (100%) rename public/medias/{icons => icon}/icon_contacts.png (100%) rename public/medias/{icons => icon}/icon_contrast.png (100%) rename public/medias/{icons => icon}/icon_countdown.png (100%) rename public/medias/{icons => icon}/icon_creditcard.png (100%) rename public/medias/{icons => icon}/icon_crop.png (100%) rename public/medias/{icons => icon}/icon_crossroads.png (100%) rename public/medias/{icons => icon}/icon_crous.png (100%) rename public/medias/{icons => icon}/icon_cruise.png (100%) rename public/medias/{icons => icon}/icon_cursor.png (100%) rename public/medias/{icons => icon}/icon_denied.png (100%) rename public/medias/{icons => icon}/icon_dev.png (100%) rename public/medias/{icons => icon}/icon_die.png (100%) rename public/medias/{icons => icon}/icon_document.png (100%) rename public/medias/{icons => icon}/icon_dokuwiki.png (100%) rename public/medias/{icons => icon}/icon_dolly.png (100%) rename public/medias/{icons => icon}/icon_door.png (100%) rename public/medias/{icons => icon}/icon_download.png (100%) rename public/medias/{icons => icon}/icon_easel.png (100%) rename public/medias/{icons => icon}/icon_econnect.png (100%) rename public/medias/{icons => icon}/icon_email.png (100%) rename public/medias/{icons => icon}/icon_etherhome.png (100%) rename public/medias/{icons => icon}/icon_euro.png (100%) rename public/medias/{icons => icon}/icon_eye.png (100%) rename public/medias/{icons => icon}/icon_eyedropper.png (100%) rename public/medias/{icons => icon}/icon_fashion.png (100%) rename public/medias/{icons => icon}/icon_filmreel.png (100%) rename public/medias/{icons => icon}/icon_filmroll.png (100%) rename public/medias/{icons => icon}/icon_flag.png (100%) rename public/medias/{icons => icon}/icon_flame.png (100%) rename public/medias/{icons => icon}/icon_flash.png (100%) rename public/medias/{icons => icon}/icon_flower.png (100%) rename public/medias/{icons => icon}/icon_focus.png (100%) rename public/medias/{icons => icon}/icon_folder.png (100%) rename public/medias/{icons => icon}/icon_frames.png (100%) rename public/medias/{icons => icon}/icon_gamecontroller.png (100%) rename public/medias/{icons => icon}/icon_gas.png (100%) rename public/medias/{icons => icon}/icon_gear.png (100%) rename public/medias/{icons => icon}/icon_genius.png (100%) rename public/medias/{icons => icon}/icon_gepi.png (100%) rename public/medias/{icons => icon}/icon_global.png (100%) rename public/medias/{icons => icon}/icon_globe.png (100%) rename public/medias/{icons => icon}/icon_gps.png (100%) rename public/medias/{icons => icon}/icon_grr.png (100%) rename public/medias/{icons => icon}/icon_hazard.png (100%) rename public/medias/{icons => icon}/icon_heart.png (100%) rename public/medias/{icons => icon}/icon_helicopter.png (100%) rename public/medias/{icons => icon}/icon_hotair.png (100%) rename public/medias/{icons => icon}/icon_hourglass.png (100%) rename public/medias/{icons => icon}/icon_image.png (100%) rename public/medias/{icons => icon}/icon_info.png (100%) rename public/medias/{icons => icon}/icon_interstate.png (100%) rename public/medias/{icons => icon}/icon_kanboard.png (100%) rename public/medias/{icons => icon}/icon_key.png (100%) rename public/medias/{icons => icon}/icon_keyboard.png (100%) rename public/medias/{icons => icon}/icon_lens.png (100%) rename public/medias/{icons => icon}/icon_lightbulb.png (100%) rename public/medias/{icons => icon}/icon_limesurvey.png (100%) rename public/medias/{icons => icon}/icon_loading.png (100%) rename public/medias/{icons => icon}/icon_location.png (100%) rename public/medias/{icons => icon}/icon_locked.png (100%) rename public/medias/{icons => icon}/icon_loomio.png (100%) rename public/medias/{icons => icon}/icon_magicwand.png (100%) rename public/medias/{icons => icon}/icon_magnifyingglass.png (100%) rename public/medias/{icons => icon}/icon_mail.png (100%) rename public/medias/{icons => icon}/icon_map.png (100%) rename public/medias/{icons => icon}/icon_mariane.png (100%) rename public/medias/{icons => icon}/icon_megaphone.png (100%) rename public/medias/{icons => icon}/icon_megaphone2.png (100%) rename public/medias/{icons => icon}/icon_memorycard.png (100%) rename public/medias/{icons => icon}/icon_merge.png (100%) rename public/medias/{icons => icon}/icon_mic.png (100%) rename public/medias/{icons => icon}/icon_microphone.png (100%) rename public/medias/{icons => icon}/icon_mindmaps.png (100%) rename public/medias/{icons => icon}/icon_money.png (100%) rename public/medias/{icons => icon}/icon_moodle.png (100%) rename public/medias/{icons => icon}/icon_motorcycle.png (100%) rename public/medias/{icons => icon}/icon_music.png (100%) rename public/medias/{icons => icon}/icon_news.png (100%) rename public/medias/{icons => icon}/icon_nextcloud.png (100%) rename public/medias/{icons => icon}/icon_opensondage.png (100%) rename public/medias/{icons => icon}/icon_paintbrush.png (100%) rename public/medias/{icons => icon}/icon_paintbrush2.png (100%) rename public/medias/{icons => icon}/icon_paintcan.png (100%) rename public/medias/{icons => icon}/icon_paintroller.png (100%) rename public/medias/{icons => icon}/icon_parachute.png (100%) rename public/medias/{icons => icon}/icon_pencil.png (100%) rename public/medias/{icons => icon}/icon_phone.png (100%) rename public/medias/{icons => icon}/icon_phpldapadmin.png (100%) rename public/medias/{icons => icon}/icon_piechart.png (100%) rename public/medias/{icons => icon}/icon_pin.png (100%) rename public/medias/{icons => icon}/icon_pin2.png (100%) rename public/medias/{icons => icon}/icon_piwik.png (100%) rename public/medias/{icons => icon}/icon_plane.png (100%) rename public/medias/{icons => icon}/icon_play.png (100%) rename public/medias/{icons => icon}/icon_plugin.png (100%) rename public/medias/{icons => icon}/icon_polaroid.png (100%) rename public/medias/{icons => icon}/icon_polaroidcamera.png (100%) rename public/medias/{icons => icon}/icon_polaroids.png (100%) rename public/medias/{icons => icon}/icon_power.png (100%) rename public/medias/{icons => icon}/icon_present.png (100%) rename public/medias/{icons => icon}/icon_profle.png (100%) rename public/medias/{icons => icon}/icon_quote.png (100%) rename public/medias/{icons => icon}/icon_racingflags.png (100%) rename public/medias/{icons => icon}/icon_radio.png (100%) rename public/medias/{icons => icon}/icon_radiotower.png (100%) rename public/medias/{icons => icon}/icon_rainbow.png (100%) rename public/medias/{icons => icon}/icon_recycle.png (100%) rename public/medias/{icons => icon}/icon_rgb.png (100%) rename public/medias/{icons => icon}/icon_ribbon.png (100%) rename public/medias/{icons => icon}/icon_roadblock.png (100%) rename public/medias/{icons => icon}/icon_rocket.png (100%) rename public/medias/{icons => icon}/icon_roundcube.png (100%) rename public/medias/{icons => icon}/icon_rss.png (100%) rename public/medias/{icons => icon}/icon_rulertriangle.png (100%) rename public/medias/{icons => icon}/icon_rundeck.png (100%) rename public/medias/{icons => icon}/icon_running.png (100%) rename public/medias/{icons => icon}/icon_sacoche.png (100%) rename public/medias/{icons => icon}/icon_sailboat.png (100%) rename public/medias/{icons => icon}/icon_schooolbus.png (100%) rename public/medias/{icons => icon}/icon_scissors.png (100%) rename public/medias/{icons => icon}/icon_scooter.png (100%) rename public/medias/{icons => icon}/icon_security.png (100%) rename public/medias/{icons => icon}/icon_selftimer.png (100%) rename public/medias/{icons => icon}/icon_settings.png (100%) rename public/medias/{icons => icon}/icon_shipwheel.png (100%) rename public/medias/{icons => icon}/icon_shoeprints.png (100%) rename public/medias/{icons => icon}/icon_shop.png (100%) rename public/medias/{icons => icon}/icon_skateboard.png (100%) rename public/medias/{icons => icon}/icon_slr.png (100%) rename public/medias/{icons => icon}/icon_smartphone.png (100%) rename public/medias/{icons => icon}/icon_spaceshuttle.png (100%) rename public/medias/{icons => icon}/icon_speaker.png (100%) rename public/medias/{icons => icon}/icon_speedometer.png (100%) rename public/medias/{icons => icon}/icon_spraypaint.png (100%) rename public/medias/{icons => icon}/icon_stack.png (100%) rename public/medias/{icons => icon}/icon_star.png (100%) rename public/medias/{icons => icon}/icon_steeringwheel.png (100%) rename public/medias/{icons => icon}/icon_stop.png (100%) rename public/medias/{icons => icon}/icon_sub.png (100%) rename public/medias/{icons => icon}/icon_submarine.png (100%) rename public/medias/{icons => icon}/icon_support.png (100%) rename public/medias/{icons => icon}/icon_swatches.png (100%) rename public/medias/{icons => icon}/icon_tablet.png (100%) rename public/medias/{icons => icon}/icon_takeoff.png (100%) rename public/medias/{icons => icon}/icon_target.png (100%) rename public/medias/{icons => icon}/icon_taxi.png (100%) rename public/medias/{icons => icon}/icon_tchap.png (100%) rename public/medias/{icons => icon}/icon_toolbox.png (100%) rename public/medias/{icons => icon}/icon_tools.png (100%) rename public/medias/{icons => icon}/icon_tractor.png (100%) rename public/medias/{icons => icon}/icon_traffic.png (100%) rename public/medias/{icons => icon}/icon_train.png (100%) rename public/medias/{icons => icon}/icon_travelerbag.png (100%) rename public/medias/{icons => icon}/icon_trends.png (100%) rename public/medias/{icons => icon}/icon_tripod.png (100%) rename public/medias/{icons => icon}/icon_trophy.png (100%) rename public/medias/{icons => icon}/icon_truck.png (100%) rename public/medias/{icons => icon}/icon_tv.png (100%) rename public/medias/{icons => icon}/icon_typography.png (100%) rename public/medias/{icons => icon}/icon_ufo.png (100%) rename public/medias/{icons => icon}/icon_umbrella.png (100%) rename public/medias/{icons => icon}/icon_unicycle.png (100%) rename public/medias/{icons => icon}/icon_unlocked.png (100%) rename public/medias/{icons => icon}/icon_upload.png (100%) rename public/medias/{icons => icon}/icon_users.png (100%) rename public/medias/{icons => icon}/icon_video.png (100%) rename public/medias/{icons => icon}/icon_videocameraclassic.png (100%) rename public/medias/{icons => icon}/icon_videocameracompact.png (100%) rename public/medias/{icons => icon}/icon_volume.png (100%) rename public/medias/{icons => icon}/icon_water.png (100%) rename public/medias/{icons => icon}/icon_windsock.png (100%) rename public/medias/{icons => icon}/icon_windy.png (100%) rename public/medias/{icons => icon}/icon_wordpress.png (100%) rename public/medias/{icons => icon}/icon_zoomin.png (100%) rename public/medias/{icons => icon}/icon_zoomout.png (100%) create mode 100644 src/Controller/AlertController.php create mode 100644 src/Controller/AlertcategoryController.php create mode 100644 src/Controller/IconController.php create mode 100644 src/Controller/ItemController.php create mode 100644 src/Controller/ItemcategoryController.php create mode 100755 src/Entity/Alert.php create mode 100755 src/Entity/Alertcategory.php create mode 100755 src/Entity/Bookmark.php create mode 100755 src/Entity/Icon.php create mode 100755 src/Entity/Item.php create mode 100755 src/Entity/Itemcategory.php create mode 100755 src/Entity/Page.php create mode 100755 src/Entity/Pagecategory.php create mode 100755 src/Entity/Pagewidget.php create mode 100755 src/Entity/Slide.php create mode 100755 src/Entity/Widget.php create mode 100644 src/Form/AlertType.php create mode 100644 src/Form/AlertcategoryType.php create mode 100644 src/Form/IconType.php create mode 100644 src/Form/ItemType.php create mode 100644 src/Form/ItemcategoryType.php create mode 100644 src/Repository/AlertRepository.php create mode 100644 src/Repository/ItemRepository.php create mode 100644 src/Repository/PageRepository.php create mode 100644 src/Repository/WidgetRepository.php create mode 100755 templates/Alert/edit.html.twig create mode 100644 templates/Alert/list.html.twig create mode 100755 templates/Alertcategory/edit.html.twig create mode 100644 templates/Home/page.html.twig create mode 100755 templates/Icon/edit.html.twig create mode 100644 templates/Icon/list.html.twig create mode 100644 templates/Icon/select.html.twig create mode 100755 templates/Icon/upload.html.twig create mode 100755 templates/Item/edit.html.twig create mode 100644 templates/Item/list.html.twig create mode 100755 templates/Itemcategory/edit.html.twig diff --git a/assets/app.js b/assets/app.js index 32bdd24..59b3656 100755 --- a/assets/app.js +++ b/assets/app.js @@ -1,8 +1,11 @@ -// JQuery -window.$ = window.jQuery = require('jquery'); +// jquery +import $ from 'jquery' +window.jQuery = $; +window.$ = $; -// JQueryui -require('jquery-ui'); +// jqueryui +import 'jqueryui' +import 'jqueryui/jquery-ui.min.css'; // Bootstrap require('bootstrap'); diff --git a/assets/js/app.js b/assets/js/app.js index 924fbc2..a88512f 100755 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -30,9 +30,35 @@ $(document).ready(function() { $("#"+$(this).data("modalid")).modal("show"); }); + // Item + $( ".item" ).hover(function() { + $(this).find(".item-action a").show(); + }); + + $( ".item" ).mouseleave(function() { + $(this).find(".item-action a").hide(); + }); + + $( ".item-info" ).click(function() { + parent=$(this).parent().parent().parent().parent().parent(); + if(parent.find(".item-description").hasClass("hide")) { + parent.find(".item-description").removeClass("hide"); + parent.addClass("w-100"); + parent.css("justify-content","flex-start"); + } + else { + parent.find(".item-description").addClass("hide"); + parent.removeClass("w-100"); + + if(parent.hasClass("item-large")) + parent.css("justify-content","flex-start"); + else + parent.css("justify-content","center"); + } + }); + // Resize resize(); - // Focus $("#page").focus(); @@ -43,6 +69,7 @@ $( window ).resize(function() { }); + function resize() { if($("#header").is(":visible")){ $(".navbar-logo").hide(); diff --git a/assets/styles/app.css b/assets/styles/app.css index 7a18471..f9c2120 100755 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -219,4 +219,212 @@ border-width: 1px; #page { overflow-y: auto; width:100%; -} \ No newline at end of file +} + +.ckeditor-content img { + max-width:100%; + height:auto !important; +} + +.hide { + display: none !important; +} + + +/* ITEM */ +.items-list { + display:flex; + flex-wrap: wrap; +} + +.item { + padding:10px; + display:flex; + text-align: center; + justify-content: center; + margin-right:5px; + margin-bottom:5px; + flex-wrap: wrap; + color: var(--colorftbodydark) !important; +} + +.item-action { + width: 100%; + color: var(--colorftbodydark) !important; + padding-top:10px; + height:35px; +} + +.item-action i { + font-size: 22px; +} + +.item-container { + display:flex; + flex-wrap: nowrap; + justify-content: space-around; +} + +.item-content { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex-direction: column; +} + +.item img { + margin:0px auto 10px auto; + +} + +.item h3 { + margin:0px; + color: var(--colorftbodydark); +} + +.item-subtitle { + font-size: 12px; + margin:0px; + color: var(--colorftbodydark); +} + +.item-description { + color: var(--colorftbodydark); + text-align: left; + padding: 0px 10px; +} + + +.item-verysmall { + width: 80px; + padding:5px 2px 2px 2px; +} +.item-verysmall .item-link { + width: 76px; +} +.item-verysmall img { + height:40px; +} +.item-verysmall h3{ + font-size: 10px; + font-family: var(--fontbody); + text-transform: uppercase; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.item-verysmall .item-subtitle{ + display:none; +} +.item-verysmall .item-action { + padding-top:0px; + height:25px; +} +.item-verysmall .item-action i { + font-size: 14px; +} + +.item-small { + width: 100px; + padding:10px 5px; +} +.item-small .item-link { + width: 90px; +} +.item-small img { + height:60px; +} +.item-small h3{ + font-size: 12px; + font-family: var(--fontbody); + text-transform: uppercase; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.item-small .item-subtitle{ + display:none; +} +.item-small .item-action i { + font-size: 16px; +} + + +.item-medium { + width: 150px; +} +.item-medium .item-link { + width: 130px; +} +.item-medium img { + height:90px; +} +.item-medium h3{ + font-size: 18px; +} + + +.item-large { + width:300px; + justify-content: left; +} +.item-large .item-link { + display: flex; +} +.item-large img { + height:120px; +} +.item-large .item-title { + text-align:left; + padding-left:10px; +} +.item-large h3{ + font-size: 25px; + border-bottom: 1px solid var(--colorftbodydark); +} +.item-large .item-container { + flex-direction: column; +} +.item-large .item-action { + text-align: left; +} +.item-large .item-description { + margin-top:15px; +} + +.item-list { + width:100%; + justify-content: left; + +} +.item-list .item-container { + flex-direction: column; + width:100%; +} +.item-list .item-content { + flex-wrap: nowrap; + flex-direction: row; +} +.item-list .item-link { + display:flex; + align-items: center; +} +.item-list img { + height:40px; + margin:0px; +} +.item-list .item-title { + text-align:left; + padding-left:10px; +} +.item-list h3{ + font-size: 18px; + font-family: var(--fontbody); + text-transform: uppercase; +} +.item-list .item-subtitle{ + display:none; +} +.item-list .item-action { + width:auto; +} diff --git a/config/packages/oneup_uploader.yaml b/config/packages/oneup_uploader.yaml index 0a30eb9..7fd2b2d 100755 --- a/config/packages/oneup_uploader.yaml +++ b/config/packages/oneup_uploader.yaml @@ -8,6 +8,10 @@ oneup_uploader: frontend: dropzone storage: directory: "%kernel.project_dir%/var/tmp/logo" + icon: + frontend: dropzone + storage: + directory: "%kernel.project_dir%/var/tmp/icon" header: frontend: dropzone storage: diff --git a/config/routes.yaml b/config/routes.yaml index d97162e..0aec843 100755 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -74,27 +74,27 @@ app_admin_config: defaults: { access: admin } app_admin_config_render: - path: /admin/config/render/{category} + path: /admin/admin/render/{category} controller: App\Controller\ConfigController::listrender defaults: { access: admin } app_admin_config_submit: - path: /admin/config/submit + path: /admin/admin/submit controller: App\Controller\ConfigController::submit defaults: { access: admin } app_admin_config_update: - path: /admin/config/update/{id} + path: /admin/admin/update/{id} controller: App\Controller\ConfigController::update defaults: { access: admin } app_admin_config_delete: - path: /admin/config/delete/{id} + path: /admin/admin/delete/{id} controller: App\Controller\ConfigController::delete defaults: { access: admin } app_admin_config_logo: - path: /admin/config/logo + path: /admin/admin/logo controller: App\Controller\ConfigController::logo defaults: { access: admin } @@ -231,6 +231,11 @@ app_admin_niveau01_tablelist: controller: App\Controller\Niveau01Controller::tablelist defaults: { access: admin } +app_admin_niveau01_selectlist: + path: /admin/niveau01/selectlist + controller: App\Controller\Niveau01Controller::selectlist + defaults: { access: admin } + app_admin_niveau01_submit: path: /admin/niveau01/submit controller: App\Controller\Niveau01Controller::submit @@ -246,6 +251,7 @@ app_admin_niveau01_delete: controller: App\Controller\Niveau01Controller::delete defaults: { access: admin } + #== Niveau02 ==================================================================================================== #-- Access admin app_admin_niveau02: @@ -432,6 +438,11 @@ app_admin_group_tablelist: controller: App\Controller\GroupController::tablelist defaults: { access: admin } +app_admin_group_selectlist: + path: /admin/group/selectlist + controller: App\Controller\GroupController::selectlist + defaults: { access: admin } + app_admin_group_submit: path: /admin/group/submit controller: App\Controller\GroupController::submit @@ -488,6 +499,11 @@ app_modo_group_tablelist: controller: App\Controller\GroupController::tablelist defaults: { access: modo } +app_modo_group_selectlist: + path: /modo/group/selectlist + controller: App\Controller\GroupController::selectlist + defaults: { access: modo } + app_modo_group_users: path: /modo/group/users/{id} controller: App\Controller\GroupController::users @@ -529,6 +545,11 @@ app_all_group_tablelist: controller: App\Controller\GroupController::tablelist defaults: { access: all } +app_all_group_selectlist: + path: /all/group/selectlist + controller: App\Controller\GroupController::selectlist + defaults: { access: all } + app_all_group_submit: path: /all/group/submit controller: App\Controller\GroupController::submit @@ -800,3 +821,180 @@ app_all_preference: controller: App\Controller\UserController::preference defaults: { access: all } +#== ICON ================================================================================================================================================= + +#-- Access admin +app_admin_icon: + path: /admin/icon + controller: App\Controller\IconController::list + defaults: { access: admin } + +app_admin_icon_submit: + path: /admin/icon/submit + controller: App\Controller\IconController::submit + defaults: { access: admin } + +app_admin_icon_update: + path: /admin/icon/update/{id} + controller: App\Controller\IconController::update + defaults: { access: admin } + +app_admin_icon_delete: + path: /admin/icon/delete/{id} + controller: App\Controller\IconController::delete + defaults: { access: admin } + +app_admin_icon_select: + path: /admin/icon/select + controller: App\Controller\IconController::select + defaults: { access: admin } + +app_admin_icon_upload: + path: /admin/icon/upload + controller: App\Controller\IconController::upload + defaults: { access: admin } + +#-- Access all +app_all_icon: + path: /all/icon + controller: App\Controller\IconController::list + defaults: { access: all } + +app_all_icon_submit: + path: /all/icon/submit + controller: App\Controller\IconController::submit + defaults: { access: all } + +app_all_icon_update: + path: /all/icon/update/{id} + controller: App\Controller\IconController::update + defaults: { access: all } + +app_all_icon_delete: + path: /all/icon/delete/{id} + controller: App\Controller\IconController::delete + defaults: { access: all } + +app_all_icon_select: + path: /all/icon/select + controller: App\Controller\IconController::select + defaults: { access: all } + +app_all_icon_upload: + path: /all/icon/upload + controller: App\Controller\IconController::upload + defaults: { access: all } + +#== ALERT ================================================================================================================================================ + +#-- Access admin +app_admin_alert: + path: /admin/alert + controller: App\Controller\AlertController::list + defaults: { access: admin } + +app_admin_alert_submit: + path: /admin/alert/submit + controller: App\Controller\AlertController::submit + defaults: { access: admin } + +app_admin_alert_update: + path: /admin/alert/update/{id} + controller: App\Controller\AlertController::update + defaults: { access: admin } + +app_admin_alert_delete: + path: /admin/alert/delete/{id} + controller: App\Controller\AlertController::delete + defaults: { access: admin } + +app_admin_alert_order: + path: /admin/alert/order + controller: App\Controller\AlertController::order + defaults: { access: admin } + +app_admin_ajax_alert_seleclist: + path: /admin/alert/ajax/selectlist + controller: App\Controller\AlertController::seleclist + defaults: { access: admin } + +#-- Access all +app_all_alert_read: + path: /all/alert/read + controller: App\Controller\AlertController::read + defaults: { access: all } + +#== ALERT CATEGORY ======================================================================================================================================= + +#-- Access admin +app_admin_alertcategory_submit: + path: /admin/alertcategory/submit + controller: App\Controller\AlertcategoryController::submit + defaults: { access: admin } + +app_admin_alertcategory_update: + path: /admin/alertcategory/update/{id} + controller: App\Controller\AlertcategoryController::update + defaults: { access: admin } + +app_admin_alertcategory_delete: + path: /admin/alertcategory/delete/{id} + controller: App\Controller\AlertcategoryController::delete + defaults: { access: admin } + +#== ITEM ================================================================================================================================================= + +#-- Access admin +app_admin_item: + path: /admin/item + controller: App\Controller\ItemController::list + defaults: { access: admin } + +app_admin_item_submit: + path: /admin/item/submit + controller: App\Controller\ItemController::submit + defaults: { access: admin } + +app_admin_item_update: + path: /admin/item/update/{id} + controller: App\Controller\ItemController::update + defaults: { access: admin } + +app_admin_item_delete: + path: /admin/item/delete/{id} + controller: App\Controller\ItemController::delete + defaults: { access: admin } + +app_admin_item_order: + path: /admin/item/order + controller: App\Controller\ItemController::order + defaults: { access: admin } + +app_admin_item_selectlist: + path: /admin/item/selectlist + controller: App\Controller\ItemController::seleclist + defaults: { access: admin } + + +#== ITEM CATEGORY ======================================================================================================================================== + +#-- Access admin +app_admin_itemcategory_submit: + path: /admin/itemcategory/submit + controller: App\Controller\ItemcategoryController::submit + defaults: { access: admin } + +app_admin_itemcategory_update: + path: /admin/itemcategory/update/{id} + controller: App\Controller\ItemcategoryController::update + defaults: { access: admin } + +app_admin_itemcategory_delete: + path: /admin/itemcategory/delete/{id} + controller: App\Controller\ItemcategoryController::delete + defaults: { access: admin } + +app_admin_itemcategory_order: + path: /admin/itemcategory/order + controller: App\Controller\ItemcategoryController::order + defaults: { access: admin } \ No newline at end of file diff --git a/containers/hydra-dispatcher/hydra/providers.yml b/containers/hydra-dispatcher/hydra/providers.yml index 9563da0..a95de62 100755 --- a/containers/hydra-dispatcher/hydra/providers.yml +++ b/containers/hydra-dispatcher/hydra/providers.yml @@ -7,7 +7,7 @@ hydra: description: fr: Authentification via NINESQL en: Authentication by NINESQL - icon_url: https://127.0.0.1:8000/medias/icons/icon_bdd.png + icon_url: https://127.0.0.1:8000/medias/icon/icon_bdd.png login_url: http://127.0.0.1:8000/hydra/loginsql consent_url: http://127.0.0.1:8000/hydra/consent logout_url: http://127.0.0.1:8000/hydra/logoutsql @@ -28,7 +28,7 @@ hydra: description: fr: Authentification via NINELDAP en: Authentication by NINELDAP - icon_url: https://127.0.0.1:8000/medias/icons/icon_phpldapadmin.png + icon_url: https://127.0.0.1:8000/medias/icon/icon_phpldapadmin.png login_url: http://127.0.0.1:8000/hydra/loginldap consent_url: http://127.0.0.1:8000/hydra/consent logout_url: http://127.0.0.1:8000/hydra/logoutldap diff --git a/migrations/Version20230105192629.php b/migrations/Version20230105192629.php new file mode 100644 index 0000000..fa0cc43 --- /dev/null +++ b/migrations/Version20230105192629.php @@ -0,0 +1,193 @@ +addSql('CREATE SEQUENCE alert_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE alertcategory_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE bookmark_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE icon_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE item_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE itemcategory_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE page_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE pagecategory_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE pagewidget_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE slide_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE widget_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE alert (id INT NOT NULL, category INT NOT NULL, title VARCHAR(100) NOT NULL, content TEXT DEFAULT NULL, rowOrder INT DEFAULT NULL, publishedat DATE NOT NULL, unpublishedat DATE DEFAULT NULL, fghideable BOOLEAN NOT NULL, roles TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_17FD46C164C19C1 ON alert (category)'); + $this->addSql('COMMENT ON COLUMN alert.roles IS \'(DC2Type:array)\''); + $this->addSql('CREATE TABLE alertgroupe (alert INT NOT NULL, groupe INT NOT NULL, PRIMARY KEY(alert, groupe))'); + $this->addSql('CREATE INDEX IDX_64DB975617FD46C1 ON alertgroupe (alert)'); + $this->addSql('CREATE INDEX IDX_64DB97564B98C21 ON alertgroupe (groupe)'); + $this->addSql('CREATE TABLE alertniveau01 (alert INT NOT NULL, niveau01 INT NOT NULL, PRIMARY KEY(alert, niveau01))'); + $this->addSql('CREATE INDEX IDX_87E7389C17FD46C1 ON alertniveau01 (alert)'); + $this->addSql('CREATE INDEX IDX_87E7389C6DFC7E23 ON alertniveau01 (niveau01)'); + $this->addSql('CREATE TABLE alertuserread (alert INT NOT NULL, "user" INT NOT NULL, PRIMARY KEY(alert, "user"))'); + $this->addSql('CREATE INDEX IDX_D4317FA917FD46C1 ON alertuserread (alert)'); + $this->addSql('CREATE INDEX IDX_D4317FA98D93D649 ON alertuserread ("user")'); + $this->addSql('CREATE TABLE alertitem (alert INT NOT NULL, item INT NOT NULL, PRIMARY KEY(alert, item))'); + $this->addSql('CREATE INDEX IDX_873C473817FD46C1 ON alertitem (alert)'); + $this->addSql('CREATE INDEX IDX_873C47381F1B251E ON alertitem (item)'); + $this->addSql('CREATE TABLE alertcategory (id INT NOT NULL, icon_id INT DEFAULT NULL, label VARCHAR(100) NOT NULL, color VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_EC575F7E54B9D732 ON alertcategory (icon_id)'); + $this->addSql('CREATE TABLE bookmark (id INT NOT NULL, icon_id INT DEFAULT NULL, user_id INT DEFAULT NULL, pagewidget_id INT DEFAULT NULL, item_id INT DEFAULT NULL, title VARCHAR(100) NOT NULL, subtitle VARCHAR(250) DEFAULT NULL, url VARCHAR(500) NOT NULL, target VARCHAR(32) NOT NULL, rowOrder INT DEFAULT NULL, color VARCHAR(24) DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_DA62921D54B9D732 ON bookmark (icon_id)'); + $this->addSql('CREATE INDEX IDX_DA62921DA76ED395 ON bookmark (user_id)'); + $this->addSql('CREATE INDEX IDX_DA62921D55B7C7A2 ON bookmark (pagewidget_id)'); + $this->addSql('CREATE INDEX IDX_DA62921D126F525E ON bookmark (item_id)'); + $this->addSql('CREATE TABLE icon (id INT NOT NULL, user_id INT DEFAULT NULL, label VARCHAR(250) NOT NULL, tags VARCHAR(250) DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_659429DBEA750E8 ON icon (label)'); + $this->addSql('CREATE INDEX IDX_659429DBA76ED395 ON icon (user_id)'); + $this->addSql('CREATE TABLE item (id INT NOT NULL, icon_id INT DEFAULT NULL, category INT NOT NULL, title VARCHAR(100) NOT NULL, subtitle VARCHAR(250) DEFAULT NULL, slug VARCHAR(128) DEFAULT NULL, url VARCHAR(500) NOT NULL, target VARCHAR(32) NOT NULL, content TEXT DEFAULT NULL, rowOrder INT DEFAULT NULL, essential BOOLEAN DEFAULT false, protected BOOLEAN DEFAULT false, color VARCHAR(24) DEFAULT NULL, badgeurl VARCHAR(250) DEFAULT NULL, roles TEXT DEFAULT NULL, ssoitem VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1F1B251E989D9B62 ON item (slug)'); + $this->addSql('CREATE INDEX IDX_1F1B251E54B9D732 ON item (icon_id)'); + $this->addSql('CREATE INDEX IDX_1F1B251E64C19C1 ON item (category)'); + $this->addSql('COMMENT ON COLUMN item.roles IS \'(DC2Type:array)\''); + $this->addSql('CREATE TABLE itemgroupe (item INT NOT NULL, groupe INT NOT NULL, PRIMARY KEY(item, groupe))'); + $this->addSql('CREATE INDEX IDX_A4267B6D1F1B251E ON itemgroupe (item)'); + $this->addSql('CREATE INDEX IDX_A4267B6D4B98C21 ON itemgroupe (groupe)'); + $this->addSql('CREATE TABLE itemniveau01 (item INT NOT NULL, niveau01 INT NOT NULL, PRIMARY KEY(item, niveau01))'); + $this->addSql('CREATE INDEX IDX_12E9B90A1F1B251E ON itemniveau01 (item)'); + $this->addSql('CREATE INDEX IDX_12E9B90A6DFC7E23 ON itemniveau01 (niveau01)'); + $this->addSql('CREATE TABLE itemcategory (id INT NOT NULL, icon_id INT DEFAULT NULL, label VARCHAR(100) NOT NULL, color VARCHAR(24) DEFAULT NULL, rowOrder INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_7959DEE854B9D732 ON itemcategory (icon_id)'); + $this->addSql('CREATE TABLE page (id INT NOT NULL, pagecategory_id INT DEFAULT NULL, user_id INT DEFAULT NULL, page_id INT DEFAULT NULL, name VARCHAR(100) NOT NULL, roworder INT NOT NULL, maxwidth INT NOT NULL, fonticon VARCHAR(255) DEFAULT NULL, url TEXT DEFAULT NULL, toreload BOOLEAN DEFAULT NULL, html TEXT DEFAULT NULL, template TEXT DEFAULT NULL, parentfor VARCHAR(255) DEFAULT NULL, roles TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_140AB6207AED5C04 ON page (pagecategory_id)'); + $this->addSql('CREATE INDEX IDX_140AB620A76ED395 ON page (user_id)'); + $this->addSql('CREATE INDEX IDX_140AB620C4663E4 ON page (page_id)'); + $this->addSql('COMMENT ON COLUMN page.template IS \'(DC2Type:array)\''); + $this->addSql('COMMENT ON COLUMN page.roles IS \'(DC2Type:array)\''); + $this->addSql('CREATE TABLE pagegroupe (page INT NOT NULL, groupe INT NOT NULL, PRIMARY KEY(page, groupe))'); + $this->addSql('CREATE INDEX IDX_E8009F6B140AB620 ON pagegroupe (page)'); + $this->addSql('CREATE INDEX IDX_E8009F6B4B98C21 ON pagegroupe (groupe)'); + $this->addSql('CREATE TABLE pagecategory (id INT NOT NULL, name VARCHAR(100) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE pagewidget (id INT NOT NULL, page_id INT DEFAULT NULL, widget_id INT DEFAULT NULL, icon_id INT DEFAULT NULL, name VARCHAR(100) NOT NULL, loc VARCHAR(255) NOT NULL, roworder INT NOT NULL, height INT NOT NULL, autoajust BOOLEAN DEFAULT false NOT NULL, border BOOLEAN DEFAULT true NOT NULL, opened BOOLEAN DEFAULT true NOT NULL, colorheaderback VARCHAR(255) DEFAULT NULL, colorheaderfont VARCHAR(255) DEFAULT NULL, colorbodyback VARCHAR(255) DEFAULT NULL, colorbodyfont VARCHAR(255) DEFAULT NULL, parameter TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_69400D9AC4663E4 ON pagewidget (page_id)'); + $this->addSql('CREATE INDEX IDX_69400D9AFBE885E2 ON pagewidget (widget_id)'); + $this->addSql('CREATE INDEX IDX_69400D9A54B9D732 ON pagewidget (icon_id)'); + $this->addSql('COMMENT ON COLUMN pagewidget.parameter IS \'(DC2Type:array)\''); + $this->addSql('CREATE TABLE slide (id INT NOT NULL, pagewidget_id INT DEFAULT NULL, title VARCHAR(100) DEFAULT NULL, subtitle VARCHAR(250) DEFAULT NULL, url VARCHAR(500) DEFAULT NULL, target VARCHAR(32) NOT NULL, roworder INT DEFAULT NULL, image VARCHAR(100) DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_72EFEE6255B7C7A2 ON slide (pagewidget_id)'); + $this->addSql('CREATE TABLE widget (id INT NOT NULL, icon_id INT DEFAULT NULL, roworder INT NOT NULL, name VARCHAR(100) NOT NULL, description TEXT DEFAULT NULL, routeview VARCHAR(255) NOT NULL, height INT NOT NULL, autoajust BOOLEAN DEFAULT false NOT NULL, border BOOLEAN DEFAULT true NOT NULL, opened BOOLEAN DEFAULT true NOT NULL, colorheaderback VARCHAR(255) DEFAULT NULL, colorheaderfont VARCHAR(255) DEFAULT NULL, colorbodyback VARCHAR(255) DEFAULT NULL, colorbodyfont VARCHAR(255) DEFAULT NULL, access TEXT DEFAULT NULL, parameter TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_85F91ED054B9D732 ON widget (icon_id)'); + $this->addSql('COMMENT ON COLUMN widget.access IS \'(DC2Type:array)\''); + $this->addSql('COMMENT ON COLUMN widget.parameter IS \'(DC2Type:array)\''); + $this->addSql('ALTER TABLE alert ADD CONSTRAINT FK_17FD46C164C19C1 FOREIGN KEY (category) REFERENCES alertcategory (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertgroupe ADD CONSTRAINT FK_64DB975617FD46C1 FOREIGN KEY (alert) REFERENCES alert (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertgroupe ADD CONSTRAINT FK_64DB97564B98C21 FOREIGN KEY (groupe) REFERENCES groupe (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertniveau01 ADD CONSTRAINT FK_87E7389C17FD46C1 FOREIGN KEY (alert) REFERENCES alert (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertniveau01 ADD CONSTRAINT FK_87E7389C6DFC7E23 FOREIGN KEY (niveau01) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertuserread ADD CONSTRAINT FK_D4317FA917FD46C1 FOREIGN KEY (alert) REFERENCES alert (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertuserread ADD CONSTRAINT FK_D4317FA98D93D649 FOREIGN KEY ("user") REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertitem ADD CONSTRAINT FK_873C473817FD46C1 FOREIGN KEY (alert) REFERENCES alert (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertitem ADD CONSTRAINT FK_873C47381F1B251E FOREIGN KEY (item) REFERENCES item (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE alertcategory ADD CONSTRAINT FK_EC575F7E54B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D54B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921DA76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D55B7C7A2 FOREIGN KEY (pagewidget_id) REFERENCES pagewidget (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D126F525E FOREIGN KEY (item_id) REFERENCES item (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE icon ADD CONSTRAINT FK_659429DBA76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251E54B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251E64C19C1 FOREIGN KEY (category) REFERENCES itemcategory (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE itemgroupe ADD CONSTRAINT FK_A4267B6D1F1B251E FOREIGN KEY (item) REFERENCES item (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE itemgroupe ADD CONSTRAINT FK_A4267B6D4B98C21 FOREIGN KEY (groupe) REFERENCES groupe (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE itemniveau01 ADD CONSTRAINT FK_12E9B90A1F1B251E FOREIGN KEY (item) REFERENCES item (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE itemniveau01 ADD CONSTRAINT FK_12E9B90A6DFC7E23 FOREIGN KEY (niveau01) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE itemcategory ADD CONSTRAINT FK_7959DEE854B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB6207AED5C04 FOREIGN KEY (pagecategory_id) REFERENCES pagecategory (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620A76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620C4663E4 FOREIGN KEY (page_id) REFERENCES page (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE pagegroupe ADD CONSTRAINT FK_E8009F6B140AB620 FOREIGN KEY (page) REFERENCES page (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE pagegroupe ADD CONSTRAINT FK_E8009F6B4B98C21 FOREIGN KEY (groupe) REFERENCES groupe (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE pagewidget ADD CONSTRAINT FK_69400D9AC4663E4 FOREIGN KEY (page_id) REFERENCES page (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE pagewidget ADD CONSTRAINT FK_69400D9AFBE885E2 FOREIGN KEY (widget_id) REFERENCES widget (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE pagewidget ADD CONSTRAINT FK_69400D9A54B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE slide ADD CONSTRAINT FK_72EFEE6255B7C7A2 FOREIGN KEY (pagewidget_id) REFERENCES pagewidget (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE widget ADD CONSTRAINT FK_85F91ED054B9D732 FOREIGN KEY (icon_id) REFERENCES icon (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('DROP SEQUENCE alert_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE alertcategory_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE bookmark_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE icon_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE item_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE itemcategory_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE page_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE pagecategory_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE pagewidget_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE slide_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE widget_id_seq CASCADE'); + $this->addSql('ALTER TABLE alert DROP CONSTRAINT FK_17FD46C164C19C1'); + $this->addSql('ALTER TABLE alertgroupe DROP CONSTRAINT FK_64DB975617FD46C1'); + $this->addSql('ALTER TABLE alertgroupe DROP CONSTRAINT FK_64DB97564B98C21'); + $this->addSql('ALTER TABLE alertniveau01 DROP CONSTRAINT FK_87E7389C17FD46C1'); + $this->addSql('ALTER TABLE alertniveau01 DROP CONSTRAINT FK_87E7389C6DFC7E23'); + $this->addSql('ALTER TABLE alertuserread DROP CONSTRAINT FK_D4317FA917FD46C1'); + $this->addSql('ALTER TABLE alertuserread DROP CONSTRAINT FK_D4317FA98D93D649'); + $this->addSql('ALTER TABLE alertitem DROP CONSTRAINT FK_873C473817FD46C1'); + $this->addSql('ALTER TABLE alertitem DROP CONSTRAINT FK_873C47381F1B251E'); + $this->addSql('ALTER TABLE alertcategory DROP CONSTRAINT FK_EC575F7E54B9D732'); + $this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D54B9D732'); + $this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921DA76ED395'); + $this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D55B7C7A2'); + $this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D126F525E'); + $this->addSql('ALTER TABLE icon DROP CONSTRAINT FK_659429DBA76ED395'); + $this->addSql('ALTER TABLE item DROP CONSTRAINT FK_1F1B251E54B9D732'); + $this->addSql('ALTER TABLE item DROP CONSTRAINT FK_1F1B251E64C19C1'); + $this->addSql('ALTER TABLE itemgroupe DROP CONSTRAINT FK_A4267B6D1F1B251E'); + $this->addSql('ALTER TABLE itemgroupe DROP CONSTRAINT FK_A4267B6D4B98C21'); + $this->addSql('ALTER TABLE itemniveau01 DROP CONSTRAINT FK_12E9B90A1F1B251E'); + $this->addSql('ALTER TABLE itemniveau01 DROP CONSTRAINT FK_12E9B90A6DFC7E23'); + $this->addSql('ALTER TABLE itemcategory DROP CONSTRAINT FK_7959DEE854B9D732'); + $this->addSql('ALTER TABLE page DROP CONSTRAINT FK_140AB6207AED5C04'); + $this->addSql('ALTER TABLE page DROP CONSTRAINT FK_140AB620A76ED395'); + $this->addSql('ALTER TABLE page DROP CONSTRAINT FK_140AB620C4663E4'); + $this->addSql('ALTER TABLE pagegroupe DROP CONSTRAINT FK_E8009F6B140AB620'); + $this->addSql('ALTER TABLE pagegroupe DROP CONSTRAINT FK_E8009F6B4B98C21'); + $this->addSql('ALTER TABLE pagewidget DROP CONSTRAINT FK_69400D9AC4663E4'); + $this->addSql('ALTER TABLE pagewidget DROP CONSTRAINT FK_69400D9AFBE885E2'); + $this->addSql('ALTER TABLE pagewidget DROP CONSTRAINT FK_69400D9A54B9D732'); + $this->addSql('ALTER TABLE slide DROP CONSTRAINT FK_72EFEE6255B7C7A2'); + $this->addSql('ALTER TABLE widget DROP CONSTRAINT FK_85F91ED054B9D732'); + $this->addSql('DROP TABLE alert'); + $this->addSql('DROP TABLE alertgroupe'); + $this->addSql('DROP TABLE alertniveau01'); + $this->addSql('DROP TABLE alertuserread'); + $this->addSql('DROP TABLE alertitem'); + $this->addSql('DROP TABLE alertcategory'); + $this->addSql('DROP TABLE bookmark'); + $this->addSql('DROP TABLE icon'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE itemgroupe'); + $this->addSql('DROP TABLE itemniveau01'); + $this->addSql('DROP TABLE itemcategory'); + $this->addSql('DROP TABLE page'); + $this->addSql('DROP TABLE pagegroupe'); + $this->addSql('DROP TABLE pagecategory'); + $this->addSql('DROP TABLE pagewidget'); + $this->addSql('DROP TABLE slide'); + $this->addSql('DROP TABLE widget'); + } +} diff --git a/package.json b/package.json index f9fde22..1e5f674 100755 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "file-loader": "^6.2.0", "jquery": "^3.6.0", "jquery-ui": "^1.13.1", + "jqueryui": "^1.11.1", "select2": "^4.1.0-rc.0", "spectrum-colorpicker2": "^2.0.9", "yarn": "^1.22.19" diff --git a/public/medias/icons/.gitkeep b/public/medias/icon/.gitkeep similarity index 100% rename from public/medias/icons/.gitkeep rename to public/medias/icon/.gitkeep diff --git a/public/medias/icons/icon_adminer.png b/public/medias/icon/icon_adminer.png similarity index 100% rename from public/medias/icons/icon_adminer.png rename to public/medias/icon/icon_adminer.png diff --git a/public/medias/icons/icon_anchor.png b/public/medias/icon/icon_anchor.png similarity index 100% rename from public/medias/icons/icon_anchor.png rename to public/medias/icon/icon_anchor.png diff --git a/public/medias/icons/icon_aperture.png b/public/medias/icon/icon_aperture.png similarity index 100% rename from public/medias/icons/icon_aperture.png rename to public/medias/icon/icon_aperture.png diff --git a/public/medias/icons/icon_arrow-down.png b/public/medias/icon/icon_arrow-down.png similarity index 100% rename from public/medias/icons/icon_arrow-down.png rename to public/medias/icon/icon_arrow-down.png diff --git a/public/medias/icons/icon_arrow-up.png b/public/medias/icon/icon_arrow-up.png similarity index 100% rename from public/medias/icons/icon_arrow-up.png rename to public/medias/icon/icon_arrow-up.png diff --git a/public/medias/icons/icon_art.png b/public/medias/icon/icon_art.png similarity index 100% rename from public/medias/icons/icon_art.png rename to public/medias/icon/icon_art.png diff --git a/public/medias/icons/icon_balado.png b/public/medias/icon/icon_balado.png similarity index 100% rename from public/medias/icons/icon_balado.png rename to public/medias/icon/icon_balado.png diff --git a/public/medias/icons/icon_bar-chart.png b/public/medias/icon/icon_bar-chart.png similarity index 100% rename from public/medias/icons/icon_bar-chart.png rename to public/medias/icon/icon_bar-chart.png diff --git a/public/medias/icons/icon_batteryfull.png b/public/medias/icon/icon_batteryfull.png similarity index 100% rename from public/medias/icons/icon_batteryfull.png rename to public/medias/icon/icon_batteryfull.png diff --git a/public/medias/icons/icon_batterylow.png b/public/medias/icon/icon_batterylow.png similarity index 100% rename from public/medias/icons/icon_batterylow.png rename to public/medias/icon/icon_batterylow.png diff --git a/public/medias/icons/icon_bdd.png b/public/medias/icon/icon_bdd.png similarity index 100% rename from public/medias/icons/icon_bdd.png rename to public/medias/icon/icon_bdd.png diff --git a/public/medias/icons/icon_bike.png b/public/medias/icon/icon_bike.png similarity index 100% rename from public/medias/icons/icon_bike.png rename to public/medias/icon/icon_bike.png diff --git a/public/medias/icons/icon_biker.png b/public/medias/icon/icon_biker.png similarity index 100% rename from public/medias/icons/icon_biker.png rename to public/medias/icon/icon_biker.png diff --git a/public/medias/icons/icon_bikewheel.png b/public/medias/icon/icon_bikewheel.png similarity index 100% rename from public/medias/icons/icon_bikewheel.png rename to public/medias/icon/icon_bikewheel.png diff --git a/public/medias/icons/icon_blimp.png b/public/medias/icon/icon_blimp.png similarity index 100% rename from public/medias/icons/icon_blimp.png rename to public/medias/icon/icon_blimp.png diff --git a/public/medias/icons/icon_bolt.png b/public/medias/icon/icon_bolt.png similarity index 100% rename from public/medias/icons/icon_bolt.png rename to public/medias/icon/icon_bolt.png diff --git a/public/medias/icons/icon_bomb.png b/public/medias/icon/icon_bomb.png similarity index 100% rename from public/medias/icons/icon_bomb.png rename to public/medias/icon/icon_bomb.png diff --git a/public/medias/icons/icon_booklet.png b/public/medias/icon/icon_booklet.png similarity index 100% rename from public/medias/icons/icon_booklet.png rename to public/medias/icon/icon_booklet.png diff --git a/public/medias/icons/icon_bookshelf.png b/public/medias/icon/icon_bookshelf.png similarity index 100% rename from public/medias/icons/icon_bookshelf.png rename to public/medias/icon/icon_bookshelf.png diff --git a/public/medias/icons/icon_briefcase.png b/public/medias/icon/icon_briefcase.png similarity index 100% rename from public/medias/icons/icon_briefcase.png rename to public/medias/icon/icon_briefcase.png diff --git a/public/medias/icons/icon_brightness.png b/public/medias/icon/icon_brightness.png similarity index 100% rename from public/medias/icons/icon_brightness.png rename to public/medias/icon/icon_brightness.png diff --git a/public/medias/icons/icon_browser.png b/public/medias/icon/icon_browser.png similarity index 100% rename from public/medias/icons/icon_browser.png rename to public/medias/icon/icon_browser.png diff --git a/public/medias/icons/icon_brush-pencil.png b/public/medias/icon/icon_brush-pencil.png similarity index 100% rename from public/medias/icons/icon_brush-pencil.png rename to public/medias/icon/icon_brush-pencil.png diff --git a/public/medias/icons/icon_cadoles.png b/public/medias/icon/icon_cadoles.png similarity index 100% rename from public/medias/icons/icon_cadoles.png rename to public/medias/icon/icon_cadoles.png diff --git a/public/medias/icons/icon_calculator.png b/public/medias/icon/icon_calculator.png similarity index 100% rename from public/medias/icons/icon_calculator.png rename to public/medias/icon/icon_calculator.png diff --git a/public/medias/icons/icon_calendar.png b/public/medias/icon/icon_calendar.png similarity index 100% rename from public/medias/icons/icon_calendar.png rename to public/medias/icon/icon_calendar.png diff --git a/public/medias/icons/icon_camera.png b/public/medias/icon/icon_camera.png similarity index 100% rename from public/medias/icons/icon_camera.png rename to public/medias/icon/icon_camera.png diff --git a/public/medias/icons/icon_car.png b/public/medias/icon/icon_car.png similarity index 100% rename from public/medias/icons/icon_car.png rename to public/medias/icon/icon_car.png diff --git a/public/medias/icons/icon_cart.png b/public/medias/icon/icon_cart.png similarity index 100% rename from public/medias/icons/icon_cart.png rename to public/medias/icon/icon_cart.png diff --git a/public/medias/icons/icon_carwheel.png b/public/medias/icon/icon_carwheel.png similarity index 100% rename from public/medias/icons/icon_carwheel.png rename to public/medias/icon/icon_carwheel.png diff --git a/public/medias/icons/icon_caution.png b/public/medias/icon/icon_caution.png similarity index 100% rename from public/medias/icons/icon_caution.png rename to public/medias/icon/icon_caution.png diff --git a/public/medias/icons/icon_chart.png b/public/medias/icon/icon_chart.png similarity index 100% rename from public/medias/icons/icon_chart.png rename to public/medias/icon/icon_chart.png diff --git a/public/medias/icons/icon_chartpie.png b/public/medias/icon/icon_chartpie.png similarity index 100% rename from public/medias/icons/icon_chartpie.png rename to public/medias/icon/icon_chartpie.png diff --git a/public/medias/icons/icon_chat.png b/public/medias/icon/icon_chat.png similarity index 100% rename from public/medias/icons/icon_chat.png rename to public/medias/icon/icon_chat.png diff --git a/public/medias/icons/icon_check.png b/public/medias/icon/icon_check.png similarity index 100% rename from public/medias/icons/icon_check.png rename to public/medias/icon/icon_check.png diff --git a/public/medias/icons/icon_circlecompass.png b/public/medias/icon/icon_circlecompass.png similarity index 100% rename from public/medias/icons/icon_circlecompass.png rename to public/medias/icon/icon_circlecompass.png diff --git a/public/medias/icons/icon_clapboard.png b/public/medias/icon/icon_clapboard.png similarity index 100% rename from public/medias/icons/icon_clapboard.png rename to public/medias/icon/icon_clapboard.png diff --git a/public/medias/icons/icon_clipboard.png b/public/medias/icon/icon_clipboard.png similarity index 100% rename from public/medias/icons/icon_clipboard.png rename to public/medias/icon/icon_clipboard.png diff --git a/public/medias/icons/icon_clock.png b/public/medias/icon/icon_clock.png similarity index 100% rename from public/medias/icons/icon_clock.png rename to public/medias/icon/icon_clock.png diff --git a/public/medias/icons/icon_cloud.png b/public/medias/icon/icon_cloud.png similarity index 100% rename from public/medias/icons/icon_cloud.png rename to public/medias/icon/icon_cloud.png diff --git a/public/medias/icons/icon_cmyk.png b/public/medias/icon/icon_cmyk.png similarity index 100% rename from public/medias/icons/icon_cmyk.png rename to public/medias/icon/icon_cmyk.png diff --git a/public/medias/icons/icon_colorwheel.png b/public/medias/icon/icon_colorwheel.png similarity index 100% rename from public/medias/icons/icon_colorwheel.png rename to public/medias/icon/icon_colorwheel.png diff --git a/public/medias/icons/icon_compass.png b/public/medias/icon/icon_compass.png similarity index 100% rename from public/medias/icons/icon_compass.png rename to public/medias/icon/icon_compass.png diff --git a/public/medias/icons/icon_compose.png b/public/medias/icon/icon_compose.png similarity index 100% rename from public/medias/icons/icon_compose.png rename to public/medias/icon/icon_compose.png diff --git a/public/medias/icons/icon_computer.png b/public/medias/icon/icon_computer.png similarity index 100% rename from public/medias/icons/icon_computer.png rename to public/medias/icon/icon_computer.png diff --git a/public/medias/icons/icon_cone.png b/public/medias/icon/icon_cone.png similarity index 100% rename from public/medias/icons/icon_cone.png rename to public/medias/icon/icon_cone.png diff --git a/public/medias/icons/icon_contacts.png b/public/medias/icon/icon_contacts.png similarity index 100% rename from public/medias/icons/icon_contacts.png rename to public/medias/icon/icon_contacts.png diff --git a/public/medias/icons/icon_contrast.png b/public/medias/icon/icon_contrast.png similarity index 100% rename from public/medias/icons/icon_contrast.png rename to public/medias/icon/icon_contrast.png diff --git a/public/medias/icons/icon_countdown.png b/public/medias/icon/icon_countdown.png similarity index 100% rename from public/medias/icons/icon_countdown.png rename to public/medias/icon/icon_countdown.png diff --git a/public/medias/icons/icon_creditcard.png b/public/medias/icon/icon_creditcard.png similarity index 100% rename from public/medias/icons/icon_creditcard.png rename to public/medias/icon/icon_creditcard.png diff --git a/public/medias/icons/icon_crop.png b/public/medias/icon/icon_crop.png similarity index 100% rename from public/medias/icons/icon_crop.png rename to public/medias/icon/icon_crop.png diff --git a/public/medias/icons/icon_crossroads.png b/public/medias/icon/icon_crossroads.png similarity index 100% rename from public/medias/icons/icon_crossroads.png rename to public/medias/icon/icon_crossroads.png diff --git a/public/medias/icons/icon_crous.png b/public/medias/icon/icon_crous.png similarity index 100% rename from public/medias/icons/icon_crous.png rename to public/medias/icon/icon_crous.png diff --git a/public/medias/icons/icon_cruise.png b/public/medias/icon/icon_cruise.png similarity index 100% rename from public/medias/icons/icon_cruise.png rename to public/medias/icon/icon_cruise.png diff --git a/public/medias/icons/icon_cursor.png b/public/medias/icon/icon_cursor.png similarity index 100% rename from public/medias/icons/icon_cursor.png rename to public/medias/icon/icon_cursor.png diff --git a/public/medias/icons/icon_denied.png b/public/medias/icon/icon_denied.png similarity index 100% rename from public/medias/icons/icon_denied.png rename to public/medias/icon/icon_denied.png diff --git a/public/medias/icons/icon_dev.png b/public/medias/icon/icon_dev.png similarity index 100% rename from public/medias/icons/icon_dev.png rename to public/medias/icon/icon_dev.png diff --git a/public/medias/icons/icon_die.png b/public/medias/icon/icon_die.png similarity index 100% rename from public/medias/icons/icon_die.png rename to public/medias/icon/icon_die.png diff --git a/public/medias/icons/icon_document.png b/public/medias/icon/icon_document.png similarity index 100% rename from public/medias/icons/icon_document.png rename to public/medias/icon/icon_document.png diff --git a/public/medias/icons/icon_dokuwiki.png b/public/medias/icon/icon_dokuwiki.png similarity index 100% rename from public/medias/icons/icon_dokuwiki.png rename to public/medias/icon/icon_dokuwiki.png diff --git a/public/medias/icons/icon_dolly.png b/public/medias/icon/icon_dolly.png similarity index 100% rename from public/medias/icons/icon_dolly.png rename to public/medias/icon/icon_dolly.png diff --git a/public/medias/icons/icon_door.png b/public/medias/icon/icon_door.png similarity index 100% rename from public/medias/icons/icon_door.png rename to public/medias/icon/icon_door.png diff --git a/public/medias/icons/icon_download.png b/public/medias/icon/icon_download.png similarity index 100% rename from public/medias/icons/icon_download.png rename to public/medias/icon/icon_download.png diff --git a/public/medias/icons/icon_easel.png b/public/medias/icon/icon_easel.png similarity index 100% rename from public/medias/icons/icon_easel.png rename to public/medias/icon/icon_easel.png diff --git a/public/medias/icons/icon_econnect.png b/public/medias/icon/icon_econnect.png similarity index 100% rename from public/medias/icons/icon_econnect.png rename to public/medias/icon/icon_econnect.png diff --git a/public/medias/icons/icon_email.png b/public/medias/icon/icon_email.png similarity index 100% rename from public/medias/icons/icon_email.png rename to public/medias/icon/icon_email.png diff --git a/public/medias/icons/icon_etherhome.png b/public/medias/icon/icon_etherhome.png similarity index 100% rename from public/medias/icons/icon_etherhome.png rename to public/medias/icon/icon_etherhome.png diff --git a/public/medias/icons/icon_euro.png b/public/medias/icon/icon_euro.png similarity index 100% rename from public/medias/icons/icon_euro.png rename to public/medias/icon/icon_euro.png diff --git a/public/medias/icons/icon_eye.png b/public/medias/icon/icon_eye.png similarity index 100% rename from public/medias/icons/icon_eye.png rename to public/medias/icon/icon_eye.png diff --git a/public/medias/icons/icon_eyedropper.png b/public/medias/icon/icon_eyedropper.png similarity index 100% rename from public/medias/icons/icon_eyedropper.png rename to public/medias/icon/icon_eyedropper.png diff --git a/public/medias/icons/icon_fashion.png b/public/medias/icon/icon_fashion.png similarity index 100% rename from public/medias/icons/icon_fashion.png rename to public/medias/icon/icon_fashion.png diff --git a/public/medias/icons/icon_filmreel.png b/public/medias/icon/icon_filmreel.png similarity index 100% rename from public/medias/icons/icon_filmreel.png rename to public/medias/icon/icon_filmreel.png diff --git a/public/medias/icons/icon_filmroll.png b/public/medias/icon/icon_filmroll.png similarity index 100% rename from public/medias/icons/icon_filmroll.png rename to public/medias/icon/icon_filmroll.png diff --git a/public/medias/icons/icon_flag.png b/public/medias/icon/icon_flag.png similarity index 100% rename from public/medias/icons/icon_flag.png rename to public/medias/icon/icon_flag.png diff --git a/public/medias/icons/icon_flame.png b/public/medias/icon/icon_flame.png similarity index 100% rename from public/medias/icons/icon_flame.png rename to public/medias/icon/icon_flame.png diff --git a/public/medias/icons/icon_flash.png b/public/medias/icon/icon_flash.png similarity index 100% rename from public/medias/icons/icon_flash.png rename to public/medias/icon/icon_flash.png diff --git a/public/medias/icons/icon_flower.png b/public/medias/icon/icon_flower.png similarity index 100% rename from public/medias/icons/icon_flower.png rename to public/medias/icon/icon_flower.png diff --git a/public/medias/icons/icon_focus.png b/public/medias/icon/icon_focus.png similarity index 100% rename from public/medias/icons/icon_focus.png rename to public/medias/icon/icon_focus.png diff --git a/public/medias/icons/icon_folder.png b/public/medias/icon/icon_folder.png similarity index 100% rename from public/medias/icons/icon_folder.png rename to public/medias/icon/icon_folder.png diff --git a/public/medias/icons/icon_frames.png b/public/medias/icon/icon_frames.png similarity index 100% rename from public/medias/icons/icon_frames.png rename to public/medias/icon/icon_frames.png diff --git a/public/medias/icons/icon_gamecontroller.png b/public/medias/icon/icon_gamecontroller.png similarity index 100% rename from public/medias/icons/icon_gamecontroller.png rename to public/medias/icon/icon_gamecontroller.png diff --git a/public/medias/icons/icon_gas.png b/public/medias/icon/icon_gas.png similarity index 100% rename from public/medias/icons/icon_gas.png rename to public/medias/icon/icon_gas.png diff --git a/public/medias/icons/icon_gear.png b/public/medias/icon/icon_gear.png similarity index 100% rename from public/medias/icons/icon_gear.png rename to public/medias/icon/icon_gear.png diff --git a/public/medias/icons/icon_genius.png b/public/medias/icon/icon_genius.png similarity index 100% rename from public/medias/icons/icon_genius.png rename to public/medias/icon/icon_genius.png diff --git a/public/medias/icons/icon_gepi.png b/public/medias/icon/icon_gepi.png similarity index 100% rename from public/medias/icons/icon_gepi.png rename to public/medias/icon/icon_gepi.png diff --git a/public/medias/icons/icon_global.png b/public/medias/icon/icon_global.png similarity index 100% rename from public/medias/icons/icon_global.png rename to public/medias/icon/icon_global.png diff --git a/public/medias/icons/icon_globe.png b/public/medias/icon/icon_globe.png similarity index 100% rename from public/medias/icons/icon_globe.png rename to public/medias/icon/icon_globe.png diff --git a/public/medias/icons/icon_gps.png b/public/medias/icon/icon_gps.png similarity index 100% rename from public/medias/icons/icon_gps.png rename to public/medias/icon/icon_gps.png diff --git a/public/medias/icons/icon_grr.png b/public/medias/icon/icon_grr.png similarity index 100% rename from public/medias/icons/icon_grr.png rename to public/medias/icon/icon_grr.png diff --git a/public/medias/icons/icon_hazard.png b/public/medias/icon/icon_hazard.png similarity index 100% rename from public/medias/icons/icon_hazard.png rename to public/medias/icon/icon_hazard.png diff --git a/public/medias/icons/icon_heart.png b/public/medias/icon/icon_heart.png similarity index 100% rename from public/medias/icons/icon_heart.png rename to public/medias/icon/icon_heart.png diff --git a/public/medias/icons/icon_helicopter.png b/public/medias/icon/icon_helicopter.png similarity index 100% rename from public/medias/icons/icon_helicopter.png rename to public/medias/icon/icon_helicopter.png diff --git a/public/medias/icons/icon_hotair.png b/public/medias/icon/icon_hotair.png similarity index 100% rename from public/medias/icons/icon_hotair.png rename to public/medias/icon/icon_hotair.png diff --git a/public/medias/icons/icon_hourglass.png b/public/medias/icon/icon_hourglass.png similarity index 100% rename from public/medias/icons/icon_hourglass.png rename to public/medias/icon/icon_hourglass.png diff --git a/public/medias/icons/icon_image.png b/public/medias/icon/icon_image.png similarity index 100% rename from public/medias/icons/icon_image.png rename to public/medias/icon/icon_image.png diff --git a/public/medias/icons/icon_info.png b/public/medias/icon/icon_info.png similarity index 100% rename from public/medias/icons/icon_info.png rename to public/medias/icon/icon_info.png diff --git a/public/medias/icons/icon_interstate.png b/public/medias/icon/icon_interstate.png similarity index 100% rename from public/medias/icons/icon_interstate.png rename to public/medias/icon/icon_interstate.png diff --git a/public/medias/icons/icon_kanboard.png b/public/medias/icon/icon_kanboard.png similarity index 100% rename from public/medias/icons/icon_kanboard.png rename to public/medias/icon/icon_kanboard.png diff --git a/public/medias/icons/icon_key.png b/public/medias/icon/icon_key.png similarity index 100% rename from public/medias/icons/icon_key.png rename to public/medias/icon/icon_key.png diff --git a/public/medias/icons/icon_keyboard.png b/public/medias/icon/icon_keyboard.png similarity index 100% rename from public/medias/icons/icon_keyboard.png rename to public/medias/icon/icon_keyboard.png diff --git a/public/medias/icons/icon_lens.png b/public/medias/icon/icon_lens.png similarity index 100% rename from public/medias/icons/icon_lens.png rename to public/medias/icon/icon_lens.png diff --git a/public/medias/icons/icon_lightbulb.png b/public/medias/icon/icon_lightbulb.png similarity index 100% rename from public/medias/icons/icon_lightbulb.png rename to public/medias/icon/icon_lightbulb.png diff --git a/public/medias/icons/icon_limesurvey.png b/public/medias/icon/icon_limesurvey.png similarity index 100% rename from public/medias/icons/icon_limesurvey.png rename to public/medias/icon/icon_limesurvey.png diff --git a/public/medias/icons/icon_loading.png b/public/medias/icon/icon_loading.png similarity index 100% rename from public/medias/icons/icon_loading.png rename to public/medias/icon/icon_loading.png diff --git a/public/medias/icons/icon_location.png b/public/medias/icon/icon_location.png similarity index 100% rename from public/medias/icons/icon_location.png rename to public/medias/icon/icon_location.png diff --git a/public/medias/icons/icon_locked.png b/public/medias/icon/icon_locked.png similarity index 100% rename from public/medias/icons/icon_locked.png rename to public/medias/icon/icon_locked.png diff --git a/public/medias/icons/icon_loomio.png b/public/medias/icon/icon_loomio.png similarity index 100% rename from public/medias/icons/icon_loomio.png rename to public/medias/icon/icon_loomio.png diff --git a/public/medias/icons/icon_magicwand.png b/public/medias/icon/icon_magicwand.png similarity index 100% rename from public/medias/icons/icon_magicwand.png rename to public/medias/icon/icon_magicwand.png diff --git a/public/medias/icons/icon_magnifyingglass.png b/public/medias/icon/icon_magnifyingglass.png similarity index 100% rename from public/medias/icons/icon_magnifyingglass.png rename to public/medias/icon/icon_magnifyingglass.png diff --git a/public/medias/icons/icon_mail.png b/public/medias/icon/icon_mail.png similarity index 100% rename from public/medias/icons/icon_mail.png rename to public/medias/icon/icon_mail.png diff --git a/public/medias/icons/icon_map.png b/public/medias/icon/icon_map.png similarity index 100% rename from public/medias/icons/icon_map.png rename to public/medias/icon/icon_map.png diff --git a/public/medias/icons/icon_mariane.png b/public/medias/icon/icon_mariane.png similarity index 100% rename from public/medias/icons/icon_mariane.png rename to public/medias/icon/icon_mariane.png diff --git a/public/medias/icons/icon_megaphone.png b/public/medias/icon/icon_megaphone.png similarity index 100% rename from public/medias/icons/icon_megaphone.png rename to public/medias/icon/icon_megaphone.png diff --git a/public/medias/icons/icon_megaphone2.png b/public/medias/icon/icon_megaphone2.png similarity index 100% rename from public/medias/icons/icon_megaphone2.png rename to public/medias/icon/icon_megaphone2.png diff --git a/public/medias/icons/icon_memorycard.png b/public/medias/icon/icon_memorycard.png similarity index 100% rename from public/medias/icons/icon_memorycard.png rename to public/medias/icon/icon_memorycard.png diff --git a/public/medias/icons/icon_merge.png b/public/medias/icon/icon_merge.png similarity index 100% rename from public/medias/icons/icon_merge.png rename to public/medias/icon/icon_merge.png diff --git a/public/medias/icons/icon_mic.png b/public/medias/icon/icon_mic.png similarity index 100% rename from public/medias/icons/icon_mic.png rename to public/medias/icon/icon_mic.png diff --git a/public/medias/icons/icon_microphone.png b/public/medias/icon/icon_microphone.png similarity index 100% rename from public/medias/icons/icon_microphone.png rename to public/medias/icon/icon_microphone.png diff --git a/public/medias/icons/icon_mindmaps.png b/public/medias/icon/icon_mindmaps.png similarity index 100% rename from public/medias/icons/icon_mindmaps.png rename to public/medias/icon/icon_mindmaps.png diff --git a/public/medias/icons/icon_money.png b/public/medias/icon/icon_money.png similarity index 100% rename from public/medias/icons/icon_money.png rename to public/medias/icon/icon_money.png diff --git a/public/medias/icons/icon_moodle.png b/public/medias/icon/icon_moodle.png similarity index 100% rename from public/medias/icons/icon_moodle.png rename to public/medias/icon/icon_moodle.png diff --git a/public/medias/icons/icon_motorcycle.png b/public/medias/icon/icon_motorcycle.png similarity index 100% rename from public/medias/icons/icon_motorcycle.png rename to public/medias/icon/icon_motorcycle.png diff --git a/public/medias/icons/icon_music.png b/public/medias/icon/icon_music.png similarity index 100% rename from public/medias/icons/icon_music.png rename to public/medias/icon/icon_music.png diff --git a/public/medias/icons/icon_news.png b/public/medias/icon/icon_news.png similarity index 100% rename from public/medias/icons/icon_news.png rename to public/medias/icon/icon_news.png diff --git a/public/medias/icons/icon_nextcloud.png b/public/medias/icon/icon_nextcloud.png similarity index 100% rename from public/medias/icons/icon_nextcloud.png rename to public/medias/icon/icon_nextcloud.png diff --git a/public/medias/icons/icon_opensondage.png b/public/medias/icon/icon_opensondage.png similarity index 100% rename from public/medias/icons/icon_opensondage.png rename to public/medias/icon/icon_opensondage.png diff --git a/public/medias/icons/icon_paintbrush.png b/public/medias/icon/icon_paintbrush.png similarity index 100% rename from public/medias/icons/icon_paintbrush.png rename to public/medias/icon/icon_paintbrush.png diff --git a/public/medias/icons/icon_paintbrush2.png b/public/medias/icon/icon_paintbrush2.png similarity index 100% rename from public/medias/icons/icon_paintbrush2.png rename to public/medias/icon/icon_paintbrush2.png diff --git a/public/medias/icons/icon_paintcan.png b/public/medias/icon/icon_paintcan.png similarity index 100% rename from public/medias/icons/icon_paintcan.png rename to public/medias/icon/icon_paintcan.png diff --git a/public/medias/icons/icon_paintroller.png b/public/medias/icon/icon_paintroller.png similarity index 100% rename from public/medias/icons/icon_paintroller.png rename to public/medias/icon/icon_paintroller.png diff --git a/public/medias/icons/icon_parachute.png b/public/medias/icon/icon_parachute.png similarity index 100% rename from public/medias/icons/icon_parachute.png rename to public/medias/icon/icon_parachute.png diff --git a/public/medias/icons/icon_pencil.png b/public/medias/icon/icon_pencil.png similarity index 100% rename from public/medias/icons/icon_pencil.png rename to public/medias/icon/icon_pencil.png diff --git a/public/medias/icons/icon_phone.png b/public/medias/icon/icon_phone.png similarity index 100% rename from public/medias/icons/icon_phone.png rename to public/medias/icon/icon_phone.png diff --git a/public/medias/icons/icon_phpldapadmin.png b/public/medias/icon/icon_phpldapadmin.png similarity index 100% rename from public/medias/icons/icon_phpldapadmin.png rename to public/medias/icon/icon_phpldapadmin.png diff --git a/public/medias/icons/icon_piechart.png b/public/medias/icon/icon_piechart.png similarity index 100% rename from public/medias/icons/icon_piechart.png rename to public/medias/icon/icon_piechart.png diff --git a/public/medias/icons/icon_pin.png b/public/medias/icon/icon_pin.png similarity index 100% rename from public/medias/icons/icon_pin.png rename to public/medias/icon/icon_pin.png diff --git a/public/medias/icons/icon_pin2.png b/public/medias/icon/icon_pin2.png similarity index 100% rename from public/medias/icons/icon_pin2.png rename to public/medias/icon/icon_pin2.png diff --git a/public/medias/icons/icon_piwik.png b/public/medias/icon/icon_piwik.png similarity index 100% rename from public/medias/icons/icon_piwik.png rename to public/medias/icon/icon_piwik.png diff --git a/public/medias/icons/icon_plane.png b/public/medias/icon/icon_plane.png similarity index 100% rename from public/medias/icons/icon_plane.png rename to public/medias/icon/icon_plane.png diff --git a/public/medias/icons/icon_play.png b/public/medias/icon/icon_play.png similarity index 100% rename from public/medias/icons/icon_play.png rename to public/medias/icon/icon_play.png diff --git a/public/medias/icons/icon_plugin.png b/public/medias/icon/icon_plugin.png similarity index 100% rename from public/medias/icons/icon_plugin.png rename to public/medias/icon/icon_plugin.png diff --git a/public/medias/icons/icon_polaroid.png b/public/medias/icon/icon_polaroid.png similarity index 100% rename from public/medias/icons/icon_polaroid.png rename to public/medias/icon/icon_polaroid.png diff --git a/public/medias/icons/icon_polaroidcamera.png b/public/medias/icon/icon_polaroidcamera.png similarity index 100% rename from public/medias/icons/icon_polaroidcamera.png rename to public/medias/icon/icon_polaroidcamera.png diff --git a/public/medias/icons/icon_polaroids.png b/public/medias/icon/icon_polaroids.png similarity index 100% rename from public/medias/icons/icon_polaroids.png rename to public/medias/icon/icon_polaroids.png diff --git a/public/medias/icons/icon_power.png b/public/medias/icon/icon_power.png similarity index 100% rename from public/medias/icons/icon_power.png rename to public/medias/icon/icon_power.png diff --git a/public/medias/icons/icon_present.png b/public/medias/icon/icon_present.png similarity index 100% rename from public/medias/icons/icon_present.png rename to public/medias/icon/icon_present.png diff --git a/public/medias/icons/icon_profle.png b/public/medias/icon/icon_profle.png similarity index 100% rename from public/medias/icons/icon_profle.png rename to public/medias/icon/icon_profle.png diff --git a/public/medias/icons/icon_quote.png b/public/medias/icon/icon_quote.png similarity index 100% rename from public/medias/icons/icon_quote.png rename to public/medias/icon/icon_quote.png diff --git a/public/medias/icons/icon_racingflags.png b/public/medias/icon/icon_racingflags.png similarity index 100% rename from public/medias/icons/icon_racingflags.png rename to public/medias/icon/icon_racingflags.png diff --git a/public/medias/icons/icon_radio.png b/public/medias/icon/icon_radio.png similarity index 100% rename from public/medias/icons/icon_radio.png rename to public/medias/icon/icon_radio.png diff --git a/public/medias/icons/icon_radiotower.png b/public/medias/icon/icon_radiotower.png similarity index 100% rename from public/medias/icons/icon_radiotower.png rename to public/medias/icon/icon_radiotower.png diff --git a/public/medias/icons/icon_rainbow.png b/public/medias/icon/icon_rainbow.png similarity index 100% rename from public/medias/icons/icon_rainbow.png rename to public/medias/icon/icon_rainbow.png diff --git a/public/medias/icons/icon_recycle.png b/public/medias/icon/icon_recycle.png similarity index 100% rename from public/medias/icons/icon_recycle.png rename to public/medias/icon/icon_recycle.png diff --git a/public/medias/icons/icon_rgb.png b/public/medias/icon/icon_rgb.png similarity index 100% rename from public/medias/icons/icon_rgb.png rename to public/medias/icon/icon_rgb.png diff --git a/public/medias/icons/icon_ribbon.png b/public/medias/icon/icon_ribbon.png similarity index 100% rename from public/medias/icons/icon_ribbon.png rename to public/medias/icon/icon_ribbon.png diff --git a/public/medias/icons/icon_roadblock.png b/public/medias/icon/icon_roadblock.png similarity index 100% rename from public/medias/icons/icon_roadblock.png rename to public/medias/icon/icon_roadblock.png diff --git a/public/medias/icons/icon_rocket.png b/public/medias/icon/icon_rocket.png similarity index 100% rename from public/medias/icons/icon_rocket.png rename to public/medias/icon/icon_rocket.png diff --git a/public/medias/icons/icon_roundcube.png b/public/medias/icon/icon_roundcube.png similarity index 100% rename from public/medias/icons/icon_roundcube.png rename to public/medias/icon/icon_roundcube.png diff --git a/public/medias/icons/icon_rss.png b/public/medias/icon/icon_rss.png similarity index 100% rename from public/medias/icons/icon_rss.png rename to public/medias/icon/icon_rss.png diff --git a/public/medias/icons/icon_rulertriangle.png b/public/medias/icon/icon_rulertriangle.png similarity index 100% rename from public/medias/icons/icon_rulertriangle.png rename to public/medias/icon/icon_rulertriangle.png diff --git a/public/medias/icons/icon_rundeck.png b/public/medias/icon/icon_rundeck.png similarity index 100% rename from public/medias/icons/icon_rundeck.png rename to public/medias/icon/icon_rundeck.png diff --git a/public/medias/icons/icon_running.png b/public/medias/icon/icon_running.png similarity index 100% rename from public/medias/icons/icon_running.png rename to public/medias/icon/icon_running.png diff --git a/public/medias/icons/icon_sacoche.png b/public/medias/icon/icon_sacoche.png similarity index 100% rename from public/medias/icons/icon_sacoche.png rename to public/medias/icon/icon_sacoche.png diff --git a/public/medias/icons/icon_sailboat.png b/public/medias/icon/icon_sailboat.png similarity index 100% rename from public/medias/icons/icon_sailboat.png rename to public/medias/icon/icon_sailboat.png diff --git a/public/medias/icons/icon_schooolbus.png b/public/medias/icon/icon_schooolbus.png similarity index 100% rename from public/medias/icons/icon_schooolbus.png rename to public/medias/icon/icon_schooolbus.png diff --git a/public/medias/icons/icon_scissors.png b/public/medias/icon/icon_scissors.png similarity index 100% rename from public/medias/icons/icon_scissors.png rename to public/medias/icon/icon_scissors.png diff --git a/public/medias/icons/icon_scooter.png b/public/medias/icon/icon_scooter.png similarity index 100% rename from public/medias/icons/icon_scooter.png rename to public/medias/icon/icon_scooter.png diff --git a/public/medias/icons/icon_security.png b/public/medias/icon/icon_security.png similarity index 100% rename from public/medias/icons/icon_security.png rename to public/medias/icon/icon_security.png diff --git a/public/medias/icons/icon_selftimer.png b/public/medias/icon/icon_selftimer.png similarity index 100% rename from public/medias/icons/icon_selftimer.png rename to public/medias/icon/icon_selftimer.png diff --git a/public/medias/icons/icon_settings.png b/public/medias/icon/icon_settings.png similarity index 100% rename from public/medias/icons/icon_settings.png rename to public/medias/icon/icon_settings.png diff --git a/public/medias/icons/icon_shipwheel.png b/public/medias/icon/icon_shipwheel.png similarity index 100% rename from public/medias/icons/icon_shipwheel.png rename to public/medias/icon/icon_shipwheel.png diff --git a/public/medias/icons/icon_shoeprints.png b/public/medias/icon/icon_shoeprints.png similarity index 100% rename from public/medias/icons/icon_shoeprints.png rename to public/medias/icon/icon_shoeprints.png diff --git a/public/medias/icons/icon_shop.png b/public/medias/icon/icon_shop.png similarity index 100% rename from public/medias/icons/icon_shop.png rename to public/medias/icon/icon_shop.png diff --git a/public/medias/icons/icon_skateboard.png b/public/medias/icon/icon_skateboard.png similarity index 100% rename from public/medias/icons/icon_skateboard.png rename to public/medias/icon/icon_skateboard.png diff --git a/public/medias/icons/icon_slr.png b/public/medias/icon/icon_slr.png similarity index 100% rename from public/medias/icons/icon_slr.png rename to public/medias/icon/icon_slr.png diff --git a/public/medias/icons/icon_smartphone.png b/public/medias/icon/icon_smartphone.png similarity index 100% rename from public/medias/icons/icon_smartphone.png rename to public/medias/icon/icon_smartphone.png diff --git a/public/medias/icons/icon_spaceshuttle.png b/public/medias/icon/icon_spaceshuttle.png similarity index 100% rename from public/medias/icons/icon_spaceshuttle.png rename to public/medias/icon/icon_spaceshuttle.png diff --git a/public/medias/icons/icon_speaker.png b/public/medias/icon/icon_speaker.png similarity index 100% rename from public/medias/icons/icon_speaker.png rename to public/medias/icon/icon_speaker.png diff --git a/public/medias/icons/icon_speedometer.png b/public/medias/icon/icon_speedometer.png similarity index 100% rename from public/medias/icons/icon_speedometer.png rename to public/medias/icon/icon_speedometer.png diff --git a/public/medias/icons/icon_spraypaint.png b/public/medias/icon/icon_spraypaint.png similarity index 100% rename from public/medias/icons/icon_spraypaint.png rename to public/medias/icon/icon_spraypaint.png diff --git a/public/medias/icons/icon_stack.png b/public/medias/icon/icon_stack.png similarity index 100% rename from public/medias/icons/icon_stack.png rename to public/medias/icon/icon_stack.png diff --git a/public/medias/icons/icon_star.png b/public/medias/icon/icon_star.png similarity index 100% rename from public/medias/icons/icon_star.png rename to public/medias/icon/icon_star.png diff --git a/public/medias/icons/icon_steeringwheel.png b/public/medias/icon/icon_steeringwheel.png similarity index 100% rename from public/medias/icons/icon_steeringwheel.png rename to public/medias/icon/icon_steeringwheel.png diff --git a/public/medias/icons/icon_stop.png b/public/medias/icon/icon_stop.png similarity index 100% rename from public/medias/icons/icon_stop.png rename to public/medias/icon/icon_stop.png diff --git a/public/medias/icons/icon_sub.png b/public/medias/icon/icon_sub.png similarity index 100% rename from public/medias/icons/icon_sub.png rename to public/medias/icon/icon_sub.png diff --git a/public/medias/icons/icon_submarine.png b/public/medias/icon/icon_submarine.png similarity index 100% rename from public/medias/icons/icon_submarine.png rename to public/medias/icon/icon_submarine.png diff --git a/public/medias/icons/icon_support.png b/public/medias/icon/icon_support.png similarity index 100% rename from public/medias/icons/icon_support.png rename to public/medias/icon/icon_support.png diff --git a/public/medias/icons/icon_swatches.png b/public/medias/icon/icon_swatches.png similarity index 100% rename from public/medias/icons/icon_swatches.png rename to public/medias/icon/icon_swatches.png diff --git a/public/medias/icons/icon_tablet.png b/public/medias/icon/icon_tablet.png similarity index 100% rename from public/medias/icons/icon_tablet.png rename to public/medias/icon/icon_tablet.png diff --git a/public/medias/icons/icon_takeoff.png b/public/medias/icon/icon_takeoff.png similarity index 100% rename from public/medias/icons/icon_takeoff.png rename to public/medias/icon/icon_takeoff.png diff --git a/public/medias/icons/icon_target.png b/public/medias/icon/icon_target.png similarity index 100% rename from public/medias/icons/icon_target.png rename to public/medias/icon/icon_target.png diff --git a/public/medias/icons/icon_taxi.png b/public/medias/icon/icon_taxi.png similarity index 100% rename from public/medias/icons/icon_taxi.png rename to public/medias/icon/icon_taxi.png diff --git a/public/medias/icons/icon_tchap.png b/public/medias/icon/icon_tchap.png similarity index 100% rename from public/medias/icons/icon_tchap.png rename to public/medias/icon/icon_tchap.png diff --git a/public/medias/icons/icon_toolbox.png b/public/medias/icon/icon_toolbox.png similarity index 100% rename from public/medias/icons/icon_toolbox.png rename to public/medias/icon/icon_toolbox.png diff --git a/public/medias/icons/icon_tools.png b/public/medias/icon/icon_tools.png similarity index 100% rename from public/medias/icons/icon_tools.png rename to public/medias/icon/icon_tools.png diff --git a/public/medias/icons/icon_tractor.png b/public/medias/icon/icon_tractor.png similarity index 100% rename from public/medias/icons/icon_tractor.png rename to public/medias/icon/icon_tractor.png diff --git a/public/medias/icons/icon_traffic.png b/public/medias/icon/icon_traffic.png similarity index 100% rename from public/medias/icons/icon_traffic.png rename to public/medias/icon/icon_traffic.png diff --git a/public/medias/icons/icon_train.png b/public/medias/icon/icon_train.png similarity index 100% rename from public/medias/icons/icon_train.png rename to public/medias/icon/icon_train.png diff --git a/public/medias/icons/icon_travelerbag.png b/public/medias/icon/icon_travelerbag.png similarity index 100% rename from public/medias/icons/icon_travelerbag.png rename to public/medias/icon/icon_travelerbag.png diff --git a/public/medias/icons/icon_trends.png b/public/medias/icon/icon_trends.png similarity index 100% rename from public/medias/icons/icon_trends.png rename to public/medias/icon/icon_trends.png diff --git a/public/medias/icons/icon_tripod.png b/public/medias/icon/icon_tripod.png similarity index 100% rename from public/medias/icons/icon_tripod.png rename to public/medias/icon/icon_tripod.png diff --git a/public/medias/icons/icon_trophy.png b/public/medias/icon/icon_trophy.png similarity index 100% rename from public/medias/icons/icon_trophy.png rename to public/medias/icon/icon_trophy.png diff --git a/public/medias/icons/icon_truck.png b/public/medias/icon/icon_truck.png similarity index 100% rename from public/medias/icons/icon_truck.png rename to public/medias/icon/icon_truck.png diff --git a/public/medias/icons/icon_tv.png b/public/medias/icon/icon_tv.png similarity index 100% rename from public/medias/icons/icon_tv.png rename to public/medias/icon/icon_tv.png diff --git a/public/medias/icons/icon_typography.png b/public/medias/icon/icon_typography.png similarity index 100% rename from public/medias/icons/icon_typography.png rename to public/medias/icon/icon_typography.png diff --git a/public/medias/icons/icon_ufo.png b/public/medias/icon/icon_ufo.png similarity index 100% rename from public/medias/icons/icon_ufo.png rename to public/medias/icon/icon_ufo.png diff --git a/public/medias/icons/icon_umbrella.png b/public/medias/icon/icon_umbrella.png similarity index 100% rename from public/medias/icons/icon_umbrella.png rename to public/medias/icon/icon_umbrella.png diff --git a/public/medias/icons/icon_unicycle.png b/public/medias/icon/icon_unicycle.png similarity index 100% rename from public/medias/icons/icon_unicycle.png rename to public/medias/icon/icon_unicycle.png diff --git a/public/medias/icons/icon_unlocked.png b/public/medias/icon/icon_unlocked.png similarity index 100% rename from public/medias/icons/icon_unlocked.png rename to public/medias/icon/icon_unlocked.png diff --git a/public/medias/icons/icon_upload.png b/public/medias/icon/icon_upload.png similarity index 100% rename from public/medias/icons/icon_upload.png rename to public/medias/icon/icon_upload.png diff --git a/public/medias/icons/icon_users.png b/public/medias/icon/icon_users.png similarity index 100% rename from public/medias/icons/icon_users.png rename to public/medias/icon/icon_users.png diff --git a/public/medias/icons/icon_video.png b/public/medias/icon/icon_video.png similarity index 100% rename from public/medias/icons/icon_video.png rename to public/medias/icon/icon_video.png diff --git a/public/medias/icons/icon_videocameraclassic.png b/public/medias/icon/icon_videocameraclassic.png similarity index 100% rename from public/medias/icons/icon_videocameraclassic.png rename to public/medias/icon/icon_videocameraclassic.png diff --git a/public/medias/icons/icon_videocameracompact.png b/public/medias/icon/icon_videocameracompact.png similarity index 100% rename from public/medias/icons/icon_videocameracompact.png rename to public/medias/icon/icon_videocameracompact.png diff --git a/public/medias/icons/icon_volume.png b/public/medias/icon/icon_volume.png similarity index 100% rename from public/medias/icons/icon_volume.png rename to public/medias/icon/icon_volume.png diff --git a/public/medias/icons/icon_water.png b/public/medias/icon/icon_water.png similarity index 100% rename from public/medias/icons/icon_water.png rename to public/medias/icon/icon_water.png diff --git a/public/medias/icons/icon_windsock.png b/public/medias/icon/icon_windsock.png similarity index 100% rename from public/medias/icons/icon_windsock.png rename to public/medias/icon/icon_windsock.png diff --git a/public/medias/icons/icon_windy.png b/public/medias/icon/icon_windy.png similarity index 100% rename from public/medias/icons/icon_windy.png rename to public/medias/icon/icon_windy.png diff --git a/public/medias/icons/icon_wordpress.png b/public/medias/icon/icon_wordpress.png similarity index 100% rename from public/medias/icons/icon_wordpress.png rename to public/medias/icon/icon_wordpress.png diff --git a/public/medias/icons/icon_zoomin.png b/public/medias/icon/icon_zoomin.png similarity index 100% rename from public/medias/icons/icon_zoomin.png rename to public/medias/icon/icon_zoomin.png diff --git a/public/medias/icons/icon_zoomout.png b/public/medias/icon/icon_zoomout.png similarity index 100% rename from public/medias/icons/icon_zoomout.png rename to public/medias/icon/icon_zoomout.png diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 274051e..ce9a06d 100755 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -5,6 +5,7 @@ namespace App\Command; use App\Entity\Config; use App\Entity\Cron; use App\Entity\Group; +use App\Entity\Icon; use App\Entity\Niveau01; use App\Entity\User; use Doctrine\ORM\EntityManagerInterface; @@ -16,6 +17,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Finder\Finder; class InitCommand extends Command { @@ -467,6 +469,20 @@ class InitCommand extends Command $this->em->flush(); + $finder = new Finder(); + $finder->in('public/medias/icon/'); + $finder->name('icon_*'); + foreach ($finder as $file) { + $image = 'icon/'.$file->getRelativePathname(); + $icon = $this->em->getRepository('App\Entity\Icon')->findoneby(['label' => $image]); + if (!$icon) { + $icon = new Icon(); + $icon->setLabel($image); + $this->em->persist($icon); + } + } + $this->em->flush(); + $output->writeln(''); return Command::SUCCESS; diff --git a/src/Controller/AlertController.php b/src/Controller/AlertController.php new file mode 100644 index 0000000..82329c7 --- /dev/null +++ b/src/Controller/AlertController.php @@ -0,0 +1,196 @@ +getRepository($this->entity)->findBy([], ['rowOrder' => 'asc']); + $alertcategorys = $em->getRepository('App\Entity\Alertcategory')->findAll(); + $groups = $em->getRepository('App\Entity\Group')->findBy([], ['label' => 'asc']); + + return $this->render($this->twig.'list.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data.'s' => $alerts, + 'alertcategorys' => $alertcategorys, + 'groups' => $groups, + 'access' => $access, + ]); + } + + public function selectlist($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $page_limit = $request->query->get('page_limit'); + $q = $request->query->get('q'); + + $qb = $em->getManager()->createQueryBuilder(); + $qb->select('table')->from($this->entity, 'table') + ->where('table.title LIKE :value') + ->setParameter('value', '%'.$q.'%') + ->orderBy('table.title'); + + $datas = $qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult(); + foreach ($datas as $data) { + array_push($output, ['id' => $data->getId(), 'text' => $data->getLabel()]); + } + $ret_string['results'] = $output; + + return new JsonResponse($ret_string); + } + + public function submit($access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = new Alert(); + + // Création du formulaire + $form = $this->createForm(AlertType::class, $data, ['mode' => 'submit', 'access' => $access]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'submit', + 'icons' => $em->getRepository('App\Entity\Icon')->findAll(), + 'form' => $form->createView(), + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->createForm(AlertType::class, $data, ['mode' => 'update', 'access' => $access]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Si non masquable on s'assure qu'il n'y a pas de reader + if (!$data->getFghideable()) { + $readers = $data->getReaders(); + foreach ($readers as $reader) { + $data->removeReader($reader); + } + } + + // Sauvegarde + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'form' => $form->createView(), + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Tentative de suppression + try { + $em->getManager()->remove($data); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route).'_update', ['id' => $id]); + } + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + public function order($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $id = $request->request->get('id'); + $order = $request->request->get('order'); + + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + $data->setRoworder($order); + $em->getManager()->flush(); + + return new JsonResponse($output); + } + + public function read($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $id = $request->request->get('id'); + + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + if (!$data->getReaders()->contains($this->getUser())) { + $data->addReader($this->getUser()); + $em->getManager()->flush(); + } + + return new JsonResponse($output); + } +} diff --git a/src/Controller/AlertcategoryController.php b/src/Controller/AlertcategoryController.php new file mode 100644 index 0000000..eead12b --- /dev/null +++ b/src/Controller/AlertcategoryController.php @@ -0,0 +1,124 @@ +createForm(AlertcategoryType::class, $data, ['mode' => 'submit', 'access' => $access]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_alert')); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'submit', + 'icons' => $em->getRepository('App\Entity\Icon')->findAll(), + 'form' => $form->createView(), + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->createForm(AlertcategoryType::class, $data, [ + 'mode' => 'update', + 'idicon' => ($data->getIcon() ? $data->getIcon()->getId() : null), + ]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_alert')); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'icons' => $em->getRepository('App\Entity\Icon')->findAll(), + 'form' => $form->createView(), + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Tentative de suppression + try { + $em->getManager()->remove($data); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + + return $this->redirectToRoute($this->route.'_update', ['id' => $id]); + } + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_alert')); + } +} diff --git a/src/Controller/GroupController.php b/src/Controller/GroupController.php index 25c335a..34dba55 100755 --- a/src/Controller/GroupController.php +++ b/src/Controller/GroupController.php @@ -191,6 +191,27 @@ class GroupController extends AbstractController return new JsonResponse($output); } + public function selectlist($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $page_limit = $request->query->get('page_limit'); + $q = $request->query->get('q'); + + $qb = $em->getManager()->createQueryBuilder(); + $qb->select('table')->from($this->entity, 'table') + ->where('table.label LIKE :value') + ->setParameter('value', '%'.$q.'%') + ->orderBy('table.label'); + + $datas = $qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult(); + foreach ($datas as $data) { + array_push($output, ['id' => $data->getId(), 'text' => $data->getLabel()]); + } + $ret_string['results'] = $output; + + return new JsonResponse($ret_string); + } + public function submit($access, Request $request, ManagerRegistry $em): Response { // Initialisation de l'enregistrement diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index df0d8c7..47d44a4 100755 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -5,15 +5,27 @@ namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Doctrine\Persistence\ManagerRegistry; class HomeController extends AbstractController { - public function home(Request $request) + public function home(Request $request,ManagerRegistry $em) { if ($request->getSession()->get('fgforceconnect') && !$this->getUser()) { return $this->redirectToRoute('app_login'); } + $em->getRepository("App\Entity\Item")->getUserItems($this->getUser(),$bookmarks,$items,$itemscategorys); + return $this->render('Home/page.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => false, + 'maxsize' => 1000, + 'bookmarks' => $bookmarks, + 'items' => $items, + 'itemcategorys' => $itemscategorys, + ]); + if (!$this->getUser()) { return $this->render('Home/home.html.twig', [ 'useheader' => true, diff --git a/src/Controller/IconController.php b/src/Controller/IconController.php new file mode 100644 index 0000000..bced494 --- /dev/null +++ b/src/Controller/IconController.php @@ -0,0 +1,180 @@ +get('inframe'); + + if ('admin' == $access) { + $icons = $em->getRepository($this->entity)->findBy(['user' => null], ['label' => 'ASC']); + } else { + $icons = $em->getRepository($this->entity)->findBy(['user' => $this->getUser()], ['label' => 'ASC']); + } + + return $this->render($this->twig.'list.html.twig', [ + 'useheader' => !$inframe, + 'usemenu' => false, + 'usesidebar' => ('admin' == $access && !$inframe), + 'access' => $access, + $this->data.'s' => $icons, + 'inframe' => $inframe, + ]); + } + + public function submit($access, Request $request, ManagerRegistry $em): Response + { + $inframe = $request->get('inframe'); + + // Initialisation de l'enregistrement + $data = new Icon(); + + // Création du formulaire + $form = $this->createForm(IconType::class, $data, ['mode' => 'submit']); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + if ($data->getLabel()) { + if ('all' == $access) { + $data->setUser($this->getUser()); + } + + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route), ['inframe' => $inframe]); + } + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => !$inframe, + 'usemenu' => false, + 'usesidebar' => ('admin' == $access && !$inframe), + 'access' => $access, + $this->data => $data, + 'mode' => 'submit', + 'form' => $form->createView(), + 'inframe' => $inframe, + 'issystem' => false, + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + $inframe = $request->get('inframe'); + + // Récupération de l'enregistrement courant + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->createForm(IconType::class, $data, ['mode' => 'update']); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Sauvegarde + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route), ['inframe' => $inframe]); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => !$inframe, + 'usemenu' => false, + 'usesidebar' => ('admin' == $access && !$inframe), + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'form' => $form->createView(), + 'refresh' => false, + 'inframe' => $inframe, + 'issystem' => (0 === stripos($data->getLabel(), 'icon/icon_')), + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + $inframe = $request->get('inframe'); + + // Récupération de l'enregistrement courant + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Vérifier que cet enregistrement est supprimable + if (0 === stripos($data->getLabel(), 'icon/icon_')) { + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route).'_update', ['id' => $id, 'inframe' => $inframe]); + } + + // Tentative de suppression + try { + $em->getManager()->remove($data); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route).'_update', ['id' => $id, 'inframe' => $inframe]); + } + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + public function select($access, Request $request, ManagerRegistry $em): Response + { + // Affichage du formulaire + $icons = $em->getRepository($this->entity)->findBy(['user' => null], ['label' => 'ASC']); + $iconsuser = null; + if ('all' == $access) { + $iconsuser = $em->getRepository($this->entity)->findBy(['user' => $this->getUser()], ['label' => 'ASC']); + } + + return $this->render($this->twig.'select.html.twig', [ + 'useheader' => false, + 'usemenu' => false, + 'usesidebar' => false, + 'access' => $access, + $this->data.'s' => $icons, + 'iconsuser' => $iconsuser, + ]); + } + + public function upload($access): Response + { + return $this->render($this->twig.'upload.html.twig', [ + 'useheader' => false, + 'usemenu' => false, + 'usesidebar' => false, + ]); + } +} diff --git a/src/Controller/ItemController.php b/src/Controller/ItemController.php new file mode 100644 index 0000000..e476227 --- /dev/null +++ b/src/Controller/ItemController.php @@ -0,0 +1,182 @@ +getRepository('App\Entity\Itemcategory')->findBy([], ['rowOrder' => 'asc']); + $groups = $em->getRepository('App\Entity\Group')->findBy([], ['label' => 'asc']); + + return $this->render($this->twig.'list.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + 'itemcategorys' => $itemcategorys, + 'groups' => $groups, + ]); + } + + public function selectlist($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $page_limit = $request->query->get('page_limit'); + $q = $request->query->get('q'); + + $qb = $em->getManager()->createQueryBuilder(); + $qb->select('table')->from($this->entity, 'table') + ->where('table.title LIKE :value') + ->setParameter('value', '%'.$q.'%') + ->orderBy('table.title'); + + $datas = $qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult(); + foreach ($datas as $data) { + array_push($output, ['id' => $data->getId(), 'text' => $data->getLabel()]); + } + $ret_string['results'] = $output; + + return new JsonResponse($ret_string); + } + + public function submit($access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = new Item(); + + // Création du formulaire + $form = $this->createForm(ItemType::class, $data, ['mode' => 'submit','access'=>$access]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur erreur + $this->getErrorForm(null, $form, $request, $data, 'submit'); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'submit', + 'icons' => $em->getRepository('App\Entity\Icon')->findAll(), + 'form' => $form->createView(), + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->createForm(ItemType::class, $data, ['mode' => 'update', 'access' => $access,'idicon' => ($data->getIcon() ? $data->getIcon()->getId() : null)]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'icons' => $em->getRepository('App\Entity\Icon')->findAll(), + 'form' => $form->createView(), + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Tentative de suppression + try { + $em->getManager()->remove($data); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route).'_update', ['id' => $id]); + } + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', $this->route)); + } + + public function order($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $id = $request->request->get('id'); + $categoryid = $request->request->get('categoryid'); + $order = $request->request->get('order'); + + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + $data->setRoworder($order); + $itemcategory=$em->getRepository("App\Entity\Itemcategory")->find($categoryid); + if($itemcategory) $data->setItemcategory($itemcategory); + + $em->getManager()->flush(); + + return new JsonResponse($output); + } +} diff --git a/src/Controller/ItemcategoryController.php b/src/Controller/ItemcategoryController.php new file mode 100644 index 0000000..0e5e5ad --- /dev/null +++ b/src/Controller/ItemcategoryController.php @@ -0,0 +1,131 @@ +createForm(ItemcategoryType::class, $data, ['mode' => 'submit', 'access' => $access]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_item')); + } + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'submit', + 'form' => $form->createView(), + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->createForm(ItemcategoryType::class,$data,array("mode"=>"update")); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Sauvegarde + $em->getManager()->flush(); + + // Retour à la liste + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_item')); + } + + + // Affichage du formulaire + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'form' => $form->createView() + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + // Initialisation de l'enregistrement + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Tentative de suppression + try { + $em->getManager()->remove($data); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + + return $this->redirectToRoute($this->route.'_update', ['id' => $id]); + } + + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_item')); + } + + public function order($access, Request $request, ManagerRegistry $em): Response + { + $output = []; + $id = $request->request->get('id'); + $order = $request->request->get('order'); + + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + $data->setRoworder($order); + $em->getManager()->flush(); + + return new JsonResponse($output); + } +} diff --git a/src/Controller/MinioController.php b/src/Controller/MinioController.php index e4c3d95..65f6018 100755 --- a/src/Controller/MinioController.php +++ b/src/Controller/MinioController.php @@ -5,6 +5,7 @@ namespace App\Controller; use App\Service\MinioService; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\KernelInterface; @@ -62,12 +63,24 @@ class MinioController extends AbstractController case 'logo/logo.png': $file = 'medias/'.$file; $filePath = $file; - $content = file_get_contents($file); + $response = new BinaryFileResponse($filePath); + $response->headers->set('Content-Type', mime_content_type($filePath)); + + return $response; break; default: + // Icons ? + if (0 === stripos($file, 'icon/icon_')) { + $file = 'medias/'.$file; + $filePath = $file; + $response = new BinaryFileResponse($filePath); + $response->headers->set('Content-Type', mime_content_type($filePath)); + + return $response; + } // C'est une url = on affiche l'url - if (0 === stripos($file, 'http')) { + elseif (0 === stripos($file, 'http')) { $filePath = $file; $content = file_get_contents($file); } diff --git a/src/Entity/Alert.php b/src/Entity/Alert.php new file mode 100755 index 0000000..5d2189d --- /dev/null +++ b/src/Entity/Alert.php @@ -0,0 +1,413 @@ +unpublishedat && + $this->publishedat->getTimestamp() <= $today->getTimestamp() + ) { + return true; + } + if ( + $this->publishedat->getTimestamp() <= $today->getTimestamp() && + $this->unpublishedat->getTimestamp() >= $today->getTimestamp() + ) { + return true; + } + + return false; + } + + // IsPending + public function isPending() + { + $today = new \DateTime(); + if ($this->publishedat->getTimestamp() > $today->getTimestamp()) { + return true; + } + + return false; + } + + // IsArchived + public function isArchived() + { + $today = new \DateTime(); + if (null === $this->unpublishedat) { + return false; + } + if ($this->unpublishedat->getTimestamp() < $today->getTimestamp()) { + return true; + } + + return false; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->groups = new \Doctrine\Common\Collections\ArrayCollection(); + $this->readers = new ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set title. + * + * @param string $title + * + * @return Alert + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set content. + * + * @param string $content + * + * @return Alert + */ + public function setContent($content) + { + $this->content = $content; + + return $this; + } + + /** + * Get content. + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Set rowOrder. + * + * @param int $rowOrder + * + * @return Alert + */ + public function setRowOrder($rowOrder) + { + $this->rowOrder = $rowOrder; + + return $this; + } + + /** + * Get rowOrder. + * + * @return int + */ + public function getRowOrder() + { + return $this->rowOrder; + } + + /** + * Set publishedat. + * + * @param \DateTime $publishedat + * + * @return Alert + */ + public function setpublishedat($publishedat) + { + $this->publishedat = $publishedat; + + return $this; + } + + /** + * Get publishedat. + * + * @return \DateTime + */ + public function getpublishedat() + { + return $this->publishedat; + } + + /** + * Set unpublishedat. + * + * @param \DateTime $unpublishedat + * + * @return Alert + */ + public function setUnpublishedat($unpublishedat) + { + $this->unpublishedat = $unpublishedat; + + return $this; + } + + /** + * Get unpublishedat. + * + * @return \DateTime + */ + public function getUnpublishedat() + { + return $this->unpublishedat; + } + + /** + * Set roles. + * + * @param array $roles + * + * @return Alert + */ + public function setRoles($roles) + { + $this->roles = $roles; + + return $this; + } + + /** + * Get roles. + * + * @return array + */ + public function getRoles() + { + return $this->roles; + } + + /** + * Set alertcategory. + * + * @return Alert + */ + public function setAlertcategory(Alertcategory $alertcategory) + { + $this->alertcategory = $alertcategory; + + return $this; + } + + /** + * Get alertcategory. + * + * @return Alertcategory + */ + public function getAlertcategory() + { + return $this->alertcategory; + } + + /** + * Add group. + * + * @return Alert + */ + public function addGroup(Group $group) + { + $this->groups[] = $group; + + return $this; + } + + /** + * Remove group. + */ + public function removeGroup(Group $group) + { + $this->groups->removeElement($group); + } + + /** + * Get groups. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getGroups() + { + return $this->groups; + } + + /** + * Set fghideable. + * + * @param bool $fghideable + * + * @return Alert + */ + public function setFghideable($fghideable) + { + $this->fghideable = $fghideable; + + return $this; + } + + /** + * Get fghideable. + * + * @return bool + */ + public function getFghideable() + { + return $this->fghideable; + } + + /** + * Add reader. + * + * @return Alert + */ + public function addReader(User $reader) + { + $this->readers[] = $reader; + + return $this; + } + + /** + * Remove reader. + */ + public function removeReader(User $reader) + { + $this->readers->removeElement($reader); + } + + /** + * Get readers. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getReaders() + { + return $this->readers; + } + + public function isFghideable(): ?bool + { + return $this->fghideable; + } +} diff --git a/src/Entity/Alertcategory.php b/src/Entity/Alertcategory.php new file mode 100755 index 0000000..9bc7682 --- /dev/null +++ b/src/Entity/Alertcategory.php @@ -0,0 +1,175 @@ +id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->alerts = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set label. + * + * @param string $label + * + * @return Alertcategory + */ + public function setLabel($label) + { + $this->label = $label; + + return $this; + } + + /** + * Get label. + * + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Set color. + * + * @param string $color + * + * @return Alertcategory + */ + public function setColor($color) + { + $this->color = $color; + + return $this; + } + + /** + * Get color. + * + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Set icon. + * + * @param Icon $icon + * + * @return Alertcategory + */ + public function setIcon(Icon $icon = null) + { + $this->icon = $icon; + + return $this; + } + + /** + * Get icon. + * + * @return Icon + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Add alert. + * + * @return Alertcategory + */ + public function addAlert(Alert $alert) + { + $this->alerts[] = $alert; + + return $this; + } + + /** + * Remove alert. + */ + public function removeAlert(Alert $alert) + { + $this->alerts->removeElement($alert); + } + + /** + * Get alerts. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getAlerts() + { + return $this->alerts; + } +} diff --git a/src/Entity/Bookmark.php b/src/Entity/Bookmark.php new file mode 100755 index 0000000..71053e5 --- /dev/null +++ b/src/Entity/Bookmark.php @@ -0,0 +1,337 @@ +id; + } + + /** + * Set title. + * + * @param string $title + * + * @return Bookmark + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set subtitle. + * + * @param string $subtitle + * + * @return Bookmark + */ + public function setSubtitle($subtitle) + { + $this->subtitle = $subtitle; + + return $this; + } + + /** + * Get subtitle. + * + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Set url. + * + * @param string $url + * + * @return Bookmark + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Get url. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set target. + * + * @param string $target + * + * @return Bookmark + */ + public function setTarget($target) + { + $this->target = $target; + + return $this; + } + + /** + * Get target. + * + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Set rowOrder. + * + * @param int $rowOrder + * + * @return Bookmark + */ + public function setRowOrder($rowOrder) + { + $this->rowOrder = $rowOrder; + + return $this; + } + + /** + * Get rowOrder. + * + * @return int + */ + public function getRowOrder() + { + return $this->rowOrder; + } + + /** + * Set color. + * + * @param string $color + * + * @return Bookmark + */ + public function setColor($color) + { + $this->color = $color; + + return $this; + } + + /** + * Get color. + * + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Set icon. + * + * @param Icon $icon + * + * @return Bookmark + */ + public function setIcon(Icon $icon = null) + { + $this->icon = $icon; + + return $this; + } + + /** + * Get icon. + * + * @return Icon + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Set user. + * + * @param User $user + * + * @return Bookmark + */ + public function setUser(User $user = null) + { + $this->user = $user; + + return $this; + } + + /** + * Get user. + * + * @return User + */ + public function getUser() + { + return $this->user; + } + + /** + * Set pagewidget. + * + * @param Pagewidget $pagewidget + * + * @return Bookmark + */ + public function setPagewidget(Pagewidget $pagewidget = null) + { + $this->pagewidget = $pagewidget; + + return $this; + } + + /** + * Get pagewidget. + * + * @return Pagewidget + */ + public function getPagewidget() + { + return $this->pagewidget; + } + + /** + * Set item. + * + * @param Item $item + * + * @return Bookmark + */ + public function setItem(Item $item = null) + { + $this->item = $item; + + return $this; + } + + /** + * Get item. + * + * @return Item + */ + public function getItem() + { + return $this->item; + } +} diff --git a/src/Entity/Group.php b/src/Entity/Group.php index f76a812..f2d2460 100755 --- a/src/Entity/Group.php +++ b/src/Entity/Group.php @@ -88,9 +88,21 @@ class Group */ private $users; + /** + * @ORM\ManyToMany(targetEntity="Alert", mappedBy="groups") + */ + protected $alerts; + + /** + * @ORM\ManyToMany(targetEntity="Item", mappedBy="groups") + */ + protected $items; + public function __construct() { $this->users = new ArrayCollection(); + $this->alerts = new ArrayCollection(); + $this->items = new ArrayCollection(); } // == CODE A NE PAS REGENERER @@ -256,4 +268,58 @@ class Group return $this; } + + /** + * @return Collection + */ + public function getAlerts(): Collection + { + return $this->alerts; + } + + public function addAlert(Alert $alert): self + { + if (!$this->alerts->contains($alert)) { + $this->alerts->add($alert); + $alert->addGroup($this); + } + + return $this; + } + + public function removeAlert(Alert $alert): self + { + if ($this->alerts->removeElement($alert)) { + $alert->removeGroup($this); + } + + return $this; + } + + /** + * @return Collection + */ + public function getItems(): Collection + { + return $this->items; + } + + public function addItem(Item $item): self + { + if (!$this->items->contains($item)) { + $this->items->add($item); + $item->addGroup($this); + } + + return $this; + } + + public function removeItem(Item $item): self + { + if ($this->items->removeElement($item)) { + $item->removeGroup($this); + } + + return $this; + } } diff --git a/src/Entity/Icon.php b/src/Entity/Icon.php new file mode 100755 index 0000000..4ddbb74 --- /dev/null +++ b/src/Entity/Icon.php @@ -0,0 +1,400 @@ +items = new \Doctrine\Common\Collections\ArrayCollection(); + $this->itemcategorys = new \Doctrine\Common\Collections\ArrayCollection(); + $this->alertcategorys = new \Doctrine\Common\Collections\ArrayCollection(); + $this->pagewidgets = new \Doctrine\Common\Collections\ArrayCollection(); + $this->widgets = new \Doctrine\Common\Collections\ArrayCollection(); + $this->bookmarks = new \Doctrine\Common\Collections\ArrayCollection(); + $this->groups = new ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set label. + * + * @param string $label + * + * @return Icon + */ + public function setLabel($label) + { + $this->label = $label; + + return $this; + } + + /** + * Get label. + * + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Set user. + * + * @param User $user + * + * @return Icon + */ + public function setUser(User $user = null) + { + $this->user = $user; + + return $this; + } + + /** + * Get user. + * + * @return User + */ + public function getUser() + { + return $this->user; + } + + /** + * Add item. + * + * @return Icon + */ + public function addItem(Item $item) + { + $this->items[] = $item; + + return $this; + } + + /** + * Remove item. + */ + public function removeItem(Item $item) + { + $this->items->removeElement($item); + } + + /** + * Get items. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getItems() + { + return $this->items; + } + + /** + * Add itemcategory. + * + * @return Icon + */ + public function addItemcategory(Itemcategory $itemcategory) + { + $this->itemcategorys[] = $itemcategory; + + return $this; + } + + /** + * Remove itemcategory. + */ + public function removeItemcategory(Itemcategory $itemcategory) + { + $this->itemcategorys->removeElement($itemcategory); + } + + /** + * Get itemcategorys. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getItemcategorys() + { + return $this->itemcategorys; + } + + /** + * Add alertcategory. + * + * @return Icon + */ + public function addAlertcategory(Alertcategory $alertcategory) + { + $this->alertcategorys[] = $alertcategory; + + return $this; + } + + /** + * Remove alertcategory. + */ + public function removeAlertcategory(Alertcategory $alertcategory) + { + $this->alertcategorys->removeElement($alertcategory); + } + + /** + * Get alertcategorys. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getAlertcategorys() + { + return $this->alertcategorys; + } + + /** + * Add pagewidget. + * + * @return Icon + */ + public function addPagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets[] = $pagewidget; + + return $this; + } + + /** + * Remove pagewidget. + */ + public function removePagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets->removeElement($pagewidget); + } + + /** + * Get pagewidgets. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPagewidgets() + { + return $this->pagewidgets; + } + + /** + * Add widget. + * + * @return Icon + */ + public function addWidget(Widget $widget) + { + $this->widgets[] = $widget; + + return $this; + } + + /** + * Remove widget. + */ + public function removeWidget(Widget $widget) + { + $this->widgets->removeElement($widget); + } + + /** + * Get widgets. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * Add bookmark. + * + * @return Icon + */ + public function addBookmark(Bookmark $bookmark) + { + $this->bookmarks[] = $bookmark; + + return $this; + } + + /** + * Remove bookmark. + */ + public function removeBookmark(Bookmark $bookmark) + { + $this->bookmarks->removeElement($bookmark); + } + + /** + * Get bookmarks. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getBookmarks() + { + return $this->bookmarks; + } + + /** + * Add group. + * + * @return Icon + */ + public function addGroup(Group $group) + { + $this->groups[] = $group; + + return $this; + } + + /** + * Remove group. + */ + public function removeGroup(Group $group) + { + $this->groups->removeElement($group); + } + + /** + * Get groups. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getGroups() + { + return $this->groups; + } + + /** + * Set tags. + * + * @param string $tags + * + * @return Icon + */ + public function setTags($tags) + { + $this->tags = $tags; + + return $this; + } + + /** + * Get tags. + * + * @return string + */ + public function getTags() + { + return $this->tags; + } +} diff --git a/src/Entity/Item.php b/src/Entity/Item.php new file mode 100755 index 0000000..ebc4006 --- /dev/null +++ b/src/Entity/Item.php @@ -0,0 +1,359 @@ +bookmarks = new ArrayCollection(); + $this->groups = new ArrayCollection(); + } + + // A garder pour forcer l'id en init + public function setId($id) + { + $this->id = $id; + + return $this; + } + + public function getId(): ?int + { + return $this->id; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + public function getSubtitle(): ?string + { + return $this->subtitle; + } + + public function setSubtitle(?string $subtitle): self + { + $this->subtitle = $subtitle; + + return $this; + } + + public function getSlug(): ?string + { + return $this->slug; + } + + public function setSlug(?string $slug): self + { + $this->slug = $slug; + + return $this; + } + + public function getUrl(): ?string + { + return $this->url; + } + + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + public function getTarget(): ?string + { + return $this->target; + } + + public function setTarget(string $target): self + { + $this->target = $target; + + return $this; + } + + public function getContent(): ?string + { + return $this->content; + } + + public function setContent(?string $content): self + { + $this->content = $content; + + return $this; + } + + public function getRowOrder(): ?int + { + return $this->rowOrder; + } + + public function setRowOrder(?int $rowOrder): self + { + $this->rowOrder = $rowOrder; + + return $this; + } + + public function isEssential(): ?bool + { + return $this->essential; + } + + public function setEssential(?bool $essential): self + { + $this->essential = $essential; + + return $this; + } + + public function isProtected(): ?bool + { + return $this->protected; + } + + public function setProtected(?bool $protected): self + { + $this->protected = $protected; + + return $this; + } + + public function getColor(): ?string + { + return $this->color; + } + + public function setColor(?string $color): self + { + $this->color = $color; + + return $this; + } + + public function getRoles(): array + { + return $this->roles; + } + + public function setRoles(?array $roles): self + { + $this->roles = $roles; + + return $this; + } + + public function getIcon(): ?Icon + { + return $this->icon; + } + + public function setIcon(?Icon $icon): self + { + $this->icon = $icon; + + return $this; + } + + /** + * @return Collection + */ + public function getBookmarks(): Collection + { + return $this->bookmarks; + } + + public function addBookmark(Bookmark $bookmark): self + { + if (!$this->bookmarks->contains($bookmark)) { + $this->bookmarks->add($bookmark); + $bookmark->setItem($this); + } + + return $this; + } + + public function removeBookmark(Bookmark $bookmark): self + { + if ($this->bookmarks->removeElement($bookmark)) { + // set the owning side to null (unless already changed) + if ($bookmark->getItem() === $this) { + $bookmark->setItem(null); + } + } + + return $this; + } + + public function getItemcategory(): ?Itemcategory + { + return $this->itemcategory; + } + + public function setItemcategory(?Itemcategory $itemcategory): self + { + $this->itemcategory = $itemcategory; + + return $this; + } + + /** + * @return Collection + */ + public function getGroups(): Collection + { + return $this->groups; + } + + public function addGroup(Group $group): self + { + if (!$this->groups->contains($group)) { + $this->groups->add($group); + } + + return $this; + } + + public function removeGroup(Group $group): self + { + $this->groups->removeElement($group); + + return $this; + } +} diff --git a/src/Entity/Itemcategory.php b/src/Entity/Itemcategory.php new file mode 100755 index 0000000..424a2c0 --- /dev/null +++ b/src/Entity/Itemcategory.php @@ -0,0 +1,213 @@ +id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->items = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set label. + * + * @param string $label + * + * @return Itemcategory + */ + public function setLabel($label) + { + $this->label = $label; + + return $this; + } + + /** + * Get label. + * + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Set color. + * + * @param string $color + * + * @return Itemcategory + */ + public function setColor($color) + { + $this->color = $color; + + return $this; + } + + /** + * Get color. + * + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Set rowOrder. + * + * @param int $rowOrder + * + * @return Itemcategory + */ + public function setRowOrder($rowOrder) + { + $this->rowOrder = $rowOrder; + + return $this; + } + + /** + * Get rowOrder. + * + * @return int + */ + public function getRowOrder() + { + return $this->rowOrder; + } + + /** + * Set icon. + * + * @param Icon $icon + * + * @return Itemcategory + */ + public function setIcon(Icon $icon = null) + { + $this->icon = $icon; + + return $this; + } + + /** + * Get icon. + * + * @return Icon + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Add item. + * + * @return Itemcategory + */ + public function addItem(Item $item) + { + $this->items[] = $item; + + return $this; + } + + /** + * Remove item. + */ + public function removeItem(Item $item) + { + $this->items->removeElement($item); + } + + /** + * Get items. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getItems() + { + return $this->items; + } +} diff --git a/src/Entity/Page.php b/src/Entity/Page.php new file mode 100755 index 0000000..174745f --- /dev/null +++ b/src/Entity/Page.php @@ -0,0 +1,642 @@ +canupdate; + } + + public function setCanupdate($canupdate) + { + $this->canupdate = $canupdate; + + return $this; + } + + /* champs calculé non stocké en base */ + private $counterread; + + public function getCounterRead() + { + return $this->counterread; + } + + public function setCounterRead($counterread) + { + $this->counterread = $counterread; + + return $this; + } + + // A garder pour forcer l'id en init + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->groups = new \Doctrine\Common\Collections\ArrayCollection(); + $this->pagewidgets = new \Doctrine\Common\Collections\ArrayCollection(); + $this->pages = new \Doctrine\Common\Collections\ArrayCollection(); + $this->templategroups = new ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set name. + * + * @param string $name + * + * @return Page + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set roworder. + * + * @param int $roworder + * + * @return Page + */ + public function setRoworder($roworder) + { + $this->roworder = $roworder; + + return $this; + } + + /** + * Get roworder. + * + * @return int + */ + public function getRoworder() + { + return $this->roworder; + } + + /** + * Set maxwidth. + * + * @param int $maxwidth + * + * @return Page + */ + public function setMaxwidth($maxwidth) + { + $this->maxwidth = $maxwidth; + + return $this; + } + + /** + * Get maxwidth. + * + * @return int + */ + public function getMaxwidth() + { + return $this->maxwidth; + } + + /** + * Set url. + * + * @param string $url + * + * @return Page + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Get url. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set html. + * + * @param string $html + * + * @return Page + */ + public function setHtml($html) + { + $this->html = $html; + + return $this; + } + + /** + * Get html. + * + * @return string + */ + public function getHtml() + { + return $this->html; + } + + /** + * Set template. + * + * @param array $template + * + * @return Page + */ + public function setTemplate($template) + { + $this->template = $template; + + return $this; + } + + /** + * Get template. + * + * @return array + */ + public function getTemplate() + { + return $this->template; + } + + /** + * Set parentfor. + * + * @param string $parentfor + * + * @return Page + */ + public function setParentfor($parentfor) + { + $this->parentfor = $parentfor; + + return $this; + } + + /** + * Get parentfor. + * + * @return string + */ + public function getParentfor() + { + return $this->parentfor; + } + + /** + * Set roles. + * + * @param array $roles + * + * @return Page + */ + public function setRoles($roles) + { + $this->roles = $roles; + + return $this; + } + + /** + * Get roles. + * + * @return array + */ + public function getRoles() + { + return $this->roles; + } + + /** + * Set pagecategory. + * + * @param Pagecategory $pagecategory + * + * @return Page + */ + public function setPagecategory(Pagecategory $pagecategory = null) + { + $this->pagecategory = $pagecategory; + + return $this; + } + + /** + * Get pagecategory. + * + * @return Pagecategory + */ + public function getPagecategory() + { + return $this->pagecategory; + } + + /** + * Add group. + * + * @return Page + */ + public function addGroup(Group $group) + { + $this->groups[] = $group; + + return $this; + } + + /** + * Remove group. + */ + public function removeGroup(Group $group) + { + $this->groups->removeElement($group); + } + + /** + * Get groups. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getGroups() + { + return $this->groups; + } + + /** + * Set user. + * + * @param User $user + * + * @return Page + */ + public function setUser(User $user = null) + { + $this->user = $user; + + return $this; + } + + /** + * Get user. + * + * @return User + */ + public function getUser() + { + return $this->user; + } + + /** + * Add pagewidget. + * + * @return Page + */ + public function addPagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets[] = $pagewidget; + + return $this; + } + + /** + * Remove pagewidget. + */ + public function removePagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets->removeElement($pagewidget); + } + + /** + * Get pagewidgets. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPagewidgets() + { + return $this->pagewidgets; + } + + /** + * Set page. + * + * @param Page $page + * + * @return Page + */ + public function setPage(Page $page = null) + { + $this->page = $page; + + return $this; + } + + /** + * Get page. + * + * @return Page + */ + public function getPage() + { + return $this->page; + } + + /** + * Add page. + * + * @return Page + */ + public function addPage(Page $page) + { + $this->pages[] = $page; + + return $this; + } + + /** + * Remove page. + */ + public function removePage(Page $page) + { + $this->pages->removeElement($page); + } + + /** + * Get pages. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPages() + { + return $this->pages; + } + + /** + * Add templategroup. + * + * @return Page + */ + public function addTemplategroup(Group $templategroup) + { + $this->templategroups[] = $templategroup; + + return $this; + } + + /** + * Remove templategroup. + */ + public function removeTemplategroup(Group $templategroup) + { + $this->templategroups->removeElement($templategroup); + } + + /** + * Get templategroups. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getTemplategroups() + { + return $this->templategroups; + } + + /** + * Set fonticon. + * + * @param string $fonticon + * + * @return Page + */ + public function setFonticon($fonticon) + { + $this->fonticon = $fonticon; + + return $this; + } + + /** + * Get fonticon. + * + * @return string + */ + public function getFonticon() + { + return $this->fonticon; + } + + /** + * Set toreload. + * + * @param bool $toreload + * + * @return Page + */ + public function setToreload($toreload) + { + $this->toreload = $toreload; + + return $this; + } + + /** + * Get toreload. + * + * @return bool + */ + public function getToreload() + { + return $this->toreload; + } + + public function isToreload(): ?bool + { + return $this->toreload; + } +} diff --git a/src/Entity/Pagecategory.php b/src/Entity/Pagecategory.php new file mode 100755 index 0000000..a26cae4 --- /dev/null +++ b/src/Entity/Pagecategory.php @@ -0,0 +1,119 @@ +id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->pages = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set name. + * + * @param string $name + * + * @return Pagecategory + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Add page. + * + * @return Pagecategory + */ + public function addPage(Page $page) + { + $this->pages[] = $page; + + return $this; + } + + /** + * Remove page. + */ + public function removePage(Page $page) + { + $this->pages->removeElement($page); + } + + /** + * Get pages. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPages() + { + return $this->pages; + } +} diff --git a/src/Entity/Pagewidget.php b/src/Entity/Pagewidget.php new file mode 100755 index 0000000..a55b170 --- /dev/null +++ b/src/Entity/Pagewidget.php @@ -0,0 +1,602 @@ +id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->bookmarks = new \Doctrine\Common\Collections\ArrayCollection(); + $this->slides = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set name. + * + * @param string $name + * + * @return Pagewidget + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set loc. + * + * @param string $loc + * + * @return Pagewidget + */ + public function setLoc($loc) + { + $this->loc = $loc; + + return $this; + } + + /** + * Get loc. + * + * @return string + */ + public function getLoc() + { + return $this->loc; + } + + /** + * Set roworder. + * + * @param int $roworder + * + * @return Pagewidget + */ + public function setRoworder($roworder) + { + $this->roworder = $roworder; + + return $this; + } + + /** + * Get roworder. + * + * @return int + */ + public function getRoworder() + { + return $this->roworder; + } + + /** + * Set height. + * + * @param int $height + * + * @return Pagewidget + */ + public function setHeight($height) + { + $this->height = $height; + + return $this; + } + + /** + * Get height. + * + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set autoajust. + * + * @param bool $autoajust + * + * @return Pagewidget + */ + public function setAutoajust($autoajust) + { + $this->autoajust = $autoajust; + + return $this; + } + + /** + * Get autoajust. + * + * @return bool + */ + public function getAutoajust() + { + return $this->autoajust; + } + + /** + * Set border. + * + * @param bool $border + * + * @return Pagewidget + */ + public function setBorder($border) + { + $this->border = $border; + + return $this; + } + + /** + * Get border. + * + * @return bool + */ + public function getBorder() + { + return $this->border; + } + + /** + * Set opened. + * + * @param bool $opened + * + * @return Pagewidget + */ + public function setOpened($opened) + { + $this->opened = $opened; + + return $this; + } + + /** + * Get opened. + * + * @return bool + */ + public function getOpened() + { + return $this->opened; + } + + /** + * Set colorheaderback. + * + * @param string $colorheaderback + * + * @return Pagewidget + */ + public function setColorheaderback($colorheaderback) + { + $this->colorheaderback = $colorheaderback; + + return $this; + } + + /** + * Get colorheaderback. + * + * @return string + */ + public function getColorheaderback() + { + return $this->colorheaderback; + } + + /** + * Set colorheaderfont. + * + * @param string $colorheaderfont + * + * @return Pagewidget + */ + public function setColorheaderfont($colorheaderfont) + { + $this->colorheaderfont = $colorheaderfont; + + return $this; + } + + /** + * Get colorheaderfont. + * + * @return string + */ + public function getColorheaderfont() + { + return $this->colorheaderfont; + } + + /** + * Set colorbodyback. + * + * @param string $colorbodyback + * + * @return Pagewidget + */ + public function setColorbodyback($colorbodyback) + { + $this->colorbodyback = $colorbodyback; + + return $this; + } + + /** + * Get colorbodyback. + * + * @return string + */ + public function getColorbodyback() + { + return $this->colorbodyback; + } + + /** + * Set colorbodyfont. + * + * @param string $colorbodyfont + * + * @return Pagewidget + */ + public function setColorbodyfont($colorbodyfont) + { + $this->colorbodyfont = $colorbodyfont; + + return $this; + } + + /** + * Get colorbodyfont. + * + * @return string + */ + public function getColorbodyfont() + { + return $this->colorbodyfont; + } + + /** + * Set parameter. + * + * @param array $parameter + * + * @return Pagewidget + */ + public function setParameter($parameter) + { + $this->parameter = $parameter; + + return $this; + } + + /** + * Get parameter. + * + * @return array + */ + public function getParameter() + { + return $this->parameter; + } + + /** + * Set page. + * + * @param Page $page + * + * @return Pagewidget + */ + public function setPage(Page $page = null) + { + $this->page = $page; + + return $this; + } + + /** + * Get page. + * + * @return Page + */ + public function getPage() + { + return $this->page; + } + + /** + * Set widget. + * + * @param Widget $widget + * + * @return Pagewidget + */ + public function setWidget(Widget $widget = null) + { + $this->widget = $widget; + + return $this; + } + + /** + * Get widget. + * + * @return Widget + */ + public function getWidget() + { + return $this->widget; + } + + /** + * Set icon. + * + * @param Icon $icon + * + * @return Pagewidget + */ + public function setIcon(Icon $icon = null) + { + $this->icon = $icon; + + return $this; + } + + /** + * Get icon. + * + * @return Icon + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Add bookmark. + * + * @return Pagewidget + */ + public function addBookmark(Bookmark $bookmark) + { + $this->bookmarks[] = $bookmark; + + return $this; + } + + /** + * Remove bookmark. + */ + public function removeBookmark(Bookmark $bookmark) + { + $this->bookmarks->removeElement($bookmark); + } + + /** + * Get bookmarks. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getBookmarks() + { + return $this->bookmarks; + } + + /** + * Add slide. + * + * @return Pagewidget + */ + public function addSlide(Slide $slide) + { + $this->slides[] = $slide; + + return $this; + } + + /** + * Remove slide. + */ + public function removeSlide(Slide $slide) + { + $this->slides->removeElement($slide); + } + + /** + * Get slides. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getSlides() + { + return $this->slides; + } + + public function isAutoajust(): ?bool + { + return $this->autoajust; + } + + public function isBorder(): ?bool + { + return $this->border; + } + + public function isOpened(): ?bool + { + return $this->opened; + } +} diff --git a/src/Entity/Slide.php b/src/Entity/Slide.php new file mode 100755 index 0000000..ec7caf6 --- /dev/null +++ b/src/Entity/Slide.php @@ -0,0 +1,246 @@ +id; + } + + /** + * Set title. + * + * @param string $title + * + * @return Slide + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set subtitle. + * + * @param string $subtitle + * + * @return Slide + */ + public function setSubtitle($subtitle) + { + $this->subtitle = $subtitle; + + return $this; + } + + /** + * Get subtitle. + * + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * Set url. + * + * @param string $url + * + * @return Slide + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Get url. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set target. + * + * @param string $target + * + * @return Slide + */ + public function setTarget($target) + { + $this->target = $target; + + return $this; + } + + /** + * Get target. + * + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Set roworder. + * + * @param int $roworder + * + * @return Slide + */ + public function setRoworder($roworder) + { + $this->roworder = $roworder; + + return $this; + } + + /** + * Get roworder. + * + * @return int + */ + public function getRoworder() + { + return $this->roworder; + } + + /** + * Set image. + * + * @param string $image + * + * @return Slide + */ + public function setImage($image) + { + $this->image = $image; + + return $this; + } + + /** + * Get image. + * + * @return string + */ + public function getImage() + { + return $this->image; + } + + /** + * Set pagewidget. + * + * @param Pagewidget $pagewidget + * + * @return Slide + */ + public function setPagewidget(Pagewidget $pagewidget = null) + { + $this->pagewidget = $pagewidget; + + return $this; + } + + /** + * Get pagewidget. + * + * @return Pagewidget + */ + public function getPagewidget() + { + return $this->pagewidget; + } +} diff --git a/src/Entity/Widget.php b/src/Entity/Widget.php new file mode 100755 index 0000000..cc5c82a --- /dev/null +++ b/src/Entity/Widget.php @@ -0,0 +1,568 @@ +id = $id; + + return $this; + } + + /** + * Constructor. + */ + public function __construct() + { + $this->pagewidgets = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set roworder. + * + * @param int $roworder + * + * @return Widget + */ + public function setRoworder($roworder) + { + $this->roworder = $roworder; + + return $this; + } + + /** + * Get roworder. + * + * @return int + */ + public function getRoworder() + { + return $this->roworder; + } + + /** + * Set name. + * + * @param string $name + * + * @return Widget + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set description. + * + * @param string $description + * + * @return Widget + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set routeview. + * + * @param string $routeview + * + * @return Widget + */ + public function setRouteview($routeview) + { + $this->routeview = $routeview; + + return $this; + } + + /** + * Get routeview. + * + * @return string + */ + public function getRouteview() + { + return $this->routeview; + } + + /** + * Set height. + * + * @param int $height + * + * @return Widget + */ + public function setHeight($height) + { + $this->height = $height; + + return $this; + } + + /** + * Get height. + * + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set autoajust. + * + * @param bool $autoajust + * + * @return Widget + */ + public function setAutoajust($autoajust) + { + $this->autoajust = $autoajust; + + return $this; + } + + /** + * Get autoajust. + * + * @return bool + */ + public function getAutoajust() + { + return $this->autoajust; + } + + /** + * Set border. + * + * @param bool $border + * + * @return Widget + */ + public function setBorder($border) + { + $this->border = $border; + + return $this; + } + + /** + * Get border. + * + * @return bool + */ + public function getBorder() + { + return $this->border; + } + + /** + * Set opened. + * + * @param bool $opened + * + * @return Widget + */ + public function setOpened($opened) + { + $this->opened = $opened; + + return $this; + } + + /** + * Get opened. + * + * @return bool + */ + public function getOpened() + { + return $this->opened; + } + + /** + * Set colorheaderback. + * + * @param string $colorheaderback + * + * @return Widget + */ + public function setColorheaderback($colorheaderback) + { + $this->colorheaderback = $colorheaderback; + + return $this; + } + + /** + * Get colorheaderback. + * + * @return string + */ + public function getColorheaderback() + { + return $this->colorheaderback; + } + + /** + * Set colorheaderfont. + * + * @param string $colorheaderfont + * + * @return Widget + */ + public function setColorheaderfont($colorheaderfont) + { + $this->colorheaderfont = $colorheaderfont; + + return $this; + } + + /** + * Get colorheaderfont. + * + * @return string + */ + public function getColorheaderfont() + { + return $this->colorheaderfont; + } + + /** + * Set colorbodyback. + * + * @param string $colorbodyback + * + * @return Widget + */ + public function setColorbodyback($colorbodyback) + { + $this->colorbodyback = $colorbodyback; + + return $this; + } + + /** + * Get colorbodyback. + * + * @return string + */ + public function getColorbodyback() + { + return $this->colorbodyback; + } + + /** + * Set colorbodyfont. + * + * @param string $colorbodyfont + * + * @return Widget + */ + public function setColorbodyfont($colorbodyfont) + { + $this->colorbodyfont = $colorbodyfont; + + return $this; + } + + /** + * Get colorbodyfont. + * + * @return string + */ + public function getColorbodyfont() + { + return $this->colorbodyfont; + } + + /** + * Set access. + * + * @param string $access + * + * @return Widget + */ + public function setAccess($access) + { + $this->access = $access; + + return $this; + } + + /** + * Get access. + * + * @return string + */ + public function getAccess() + { + return $this->access; + } + + /** + * Set parameter. + * + * @param array $parameter + * + * @return Widget + */ + public function setParameter($parameter) + { + $this->parameter = $parameter; + + return $this; + } + + /** + * Get parameter. + * + * @return array + */ + public function getParameter() + { + return $this->parameter; + } + + /** + * Set icon. + * + * @param Icon $icon + * + * @return Widget + */ + public function setIcon(Icon $icon = null) + { + $this->icon = $icon; + + return $this; + } + + /** + * Get icon. + * + * @return Icon + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Add pagewidget. + * + * @return Widget + */ + public function addPagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets[] = $pagewidget; + + return $this; + } + + /** + * Remove pagewidget. + */ + public function removePagewidget(Pagewidget $pagewidget) + { + $this->pagewidgets->removeElement($pagewidget); + } + + /** + * Get pagewidgets. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPagewidgets() + { + return $this->pagewidgets; + } + + public function isAutoajust(): ?bool + { + return $this->autoajust; + } + + public function isBorder(): ?bool + { + return $this->border; + } + + public function isOpened(): ?bool + { + return $this->opened; + } +} diff --git a/src/Form/AlertType.php b/src/Form/AlertType.php new file mode 100644 index 0000000..8331f90 --- /dev/null +++ b/src/Form/AlertType.php @@ -0,0 +1,117 @@ +add('submit', SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ]) + + ->add('title', TextType::class, [ + 'label' => 'Titre', + ]) + + ->add('content', CKEditorType::class, [ + 'config_name' => 'full_config', + 'label' => 'Description', + 'required' => false, + 'disabled' => ('delete' == $options['mode'] ? true : false), + 'config' => ['height' => '500px', 'filebrowserUploadRoute' => 'app_ckeditor_upload'], + ]) + + ->add('fghideable', ChoiceType::class, [ + 'label' => "Permettre aux utilisateurs de masquer l'annonce", + 'choices' => ['non' => '0', 'oui' => '1'], + ]) + + ->add('alertcategory', EntityType::class, [ + 'label' => 'Catégorie', + 'class' => 'App\Entity\Alertcategory', + 'choice_label' => 'label', + 'placeholder' => '-- Sélectionnez une Catégorie --', + ]) + + ->add('roles', ChoiceType::class, [ + 'label' => 'Visible pour les Rôles', + 'choices' => [ + 'Visiteur' => 'ROLE_ANONYME', + 'Utilisateur' => 'ROLE_USER', + 'Manager' => 'ROLE_MANAGER', + 'Master' => 'ROLE_MASTER', + 'Modérateur' => 'ROLE_MODO', + 'Administateur' => 'ROLE_ADMIN', + ], + 'multiple' => true, + 'expanded' => true, + ]) + + ->add('groups', Select2EntityType::class, [ + 'label' => 'Visible pour les Groupes', + 'class' => 'App\Entity\Group', + 'text_property' => 'label', + 'multiple' => true, + 'remote_route' => 'app_'.$options['access'].'_group_selectlist', + 'primary_key' => 'id', + 'text_property' => 'label', + 'minimum_input_length' => 0, + 'page_limit' => 100, + 'allow_clear' => true, + 'delay' => 250, + 'cache' => false, + 'cache_timeout' => 60000, + 'language' => 'fr', + 'placeholder' => 'Selectionner des groupes', + ]) + + ->add('publishedat', DateType::class, [ + 'label' => 'Publier du', + 'widget' => 'single_text', + ]) + + ->add('unpublishedat', DateType::class, [ + 'label' => 'Jusqu\'au', + 'required' => false, + 'widget' => 'single_text', + ]); + + $builder->get('publishedat')->addModelTransformer(new CallbackTransformer( + function ($value) { + if (!$value) { + return new \DateTime('now'); + } + + return $value; + }, + function ($value) { + return $value; + } + )); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Alert', + 'mode' => 'string', + 'appNiveau01labels' => 'string', + 'access' => 'string', + ]); + } +} diff --git a/src/Form/AlertcategoryType.php b/src/Form/AlertcategoryType.php new file mode 100644 index 0000000..d1e1367 --- /dev/null +++ b/src/Form/AlertcategoryType.php @@ -0,0 +1,47 @@ +add('submit', + SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ] + ); + + $builder->add('label', + TextType::class, [ + 'label' => 'Label', + ] + ); + + $builder->add('idicon', HiddenType::class, ['mapped' => false, 'data' => $options['idicon']]); + + $builder->add('color', TextType::class, [ + 'label' => 'Couleur', + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Alertcategory', + 'mode' => 'string', + 'idicon' => null, + 'access' => 'string', + ]); + } +} diff --git a/src/Form/IconType.php b/src/Form/IconType.php new file mode 100644 index 0000000..eb00723 --- /dev/null +++ b/src/Form/IconType.php @@ -0,0 +1,42 @@ +add('submit', + SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ] + ); + + $builder->add('label', + HiddenType::class, [ + 'label' => 'Label', + ] + ); + + $builder->add('tags', TextType::class, [ + 'label' => 'Tags', + 'required' => false, + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Icon', + 'mode' => 'string', + ]); + } +} diff --git a/src/Form/ItemType.php b/src/Form/ItemType.php new file mode 100644 index 0000000..7aed9f4 --- /dev/null +++ b/src/Form/ItemType.php @@ -0,0 +1,127 @@ +add("submit", SubmitType::class, [ + "label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Valider"), + "attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success")) + ]) + + ->add("title", TextType::class, [ + "label" => "Titre", + "disabled" => ($options["mode"]=="delete"?true:false), + ]) + + ->add("subtitle", TextareaType::class, [ + "label" => 'Sous Titre', + "required" => false, + "disabled" => ($options["mode"]=="delete"?true:false), + "attr" => array("rows" => '4') + ]) + + ->add("content",CKEditorType::class,[ + "config_name" => 'full_config', + "label" => 'Description', + "required" => false, + "disabled" => ($options["mode"]=="delete"?true:false), + "config" => array("height" => "500px",'filebrowserUploadRoute' => 'app_ckeditor_upload') + ]) + + ->add("itemcategory", EntityType::class, [ + "label" => 'Catégorie', + "class" => 'App\Entity\Itemcategory', + "choice_label" => 'label', + "placeholder" => '-- Sélectionnez une Catégorie --', + "disabled" => ($options["mode"]=="delete"?true:false), + ]) + + ->add('roles', ChoiceType::class, [ + "label" => 'Visible pour les Rôles', + "choices" => [ + "Visiteur" => 'ROLE_ANONYME', + "Utilisateur" => 'ROLE_USER', + "Animateur de Groupe" => 'ROLE_ANIM', + "Modérateur" => 'ROLE_MODO', + "Administateur" => 'ROLE_ADMIN', + ], + "multiple" => true, + "expanded" => true, + "disabled" => ($options["mode"]=="delete"?true:false), + ]) + + ->add('groups', Select2EntityType::class, [ + 'label' => 'Visible pour les Groupes', + 'class' => 'App\Entity\Group', + 'text_property' => 'label', + 'multiple' => true, + 'remote_route' => 'app_'.$options['access'].'_group_selectlist', + 'primary_key' => 'id', + 'text_property' => 'label', + 'minimum_input_length' => 0, + 'page_limit' => 100, + 'allow_clear' => true, + 'delay' => 250, + 'cache' => false, + 'cache_timeout' => 60000, + 'language' => 'fr', + 'placeholder' => 'Selectionner des groupes', + ]) + + ->add('color', TextType::class, [ + 'label' => "Couleur", + 'required' => false, + 'attr' => array("class" => "pick-a-color") + ]) + + ->add('url') + + ->add('protected', CheckboxType::class, [ + "label" => "Force l'authentification de l'utilisateur ?", + "required" => false + ]) + + ->add('essential', CheckboxType::class, [ + "label" => "Item essentiel ?", + "required" => false + ]) + + ->add('target', ChoiceType::class, [ + "label" => 'Ouvrir le lien dans', + "choices" => [ + "Nouvel onglet/fenêtre" => '_blank', + "iFrame" => 'frame', + "Onglet courant" => '_self', + ] + ]) + + ->add('idicon', HiddenType::class,['mapped'=> false,'data' => $options["idicon"]]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Item', + 'mode' => "string", + 'access' => "string", + 'idicon' => null, + ]); + } +} diff --git a/src/Form/ItemcategoryType.php b/src/Form/ItemcategoryType.php new file mode 100644 index 0000000..53871ab --- /dev/null +++ b/src/Form/ItemcategoryType.php @@ -0,0 +1,46 @@ +add('submit', + SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ] + ); + + $builder->add('label', + TextType::class, [ + 'label' => 'Label', + ] + ); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'App\Entity\Itemcategory', + 'mode' => "string", + 'access' => 'string', + )); + } +} diff --git a/src/Repository/AlertRepository.php b/src/Repository/AlertRepository.php new file mode 100644 index 0000000..6ee2b06 --- /dev/null +++ b/src/Repository/AlertRepository.php @@ -0,0 +1,169 @@ +createQueryBuilder('a'); + $qb->join('a.roles', 'r'); + + if (count($roles)) { + $ids = []; + + foreach ($roles as $r) { + $ids[] = (int) $r->getId(); + } + + $qb->andWhere($qb->expr()->in('r.id', $ids)); + } + + $qb->andWhere('a.publishedat <= :today') + ->andWhere($qb->expr()->orX( + $qb->expr()->gt('a.unpublishedat', ':today'), + $qb->expr()->isNull('a.unpublishedat') + )) + ->orderBy('a.rowOrder', $order); + + return $qb->getQuery() + ->setParameter('today', date('Y-m-d')) + ->getResult() + ; + } + + public function getUserAlerts($user, $idalertcategory, $alertcategoryfilter, $ssoitems) + { + // Profilage + $roles = ($user ? $user->getRoles() : ['ROLE_ANONYME']); + $niveau01 = ($user ? $user->getNiveau01() : null); + $groups = ($user ? $user->getGroups() : []); + + $userreads = ($user ? $user->getAlertreaders() : new ArrayCollection()); + + // Initialisation du calcul des alerts + $alerts = new ArrayCollection(); + + // Récupération des alerts par rôles + foreach ($roles as $role) { + $qb = $this->createQueryBuilder('a'); + $qb->select('alert') + ->from('App:Alert', 'alert') + ->where($qb->expr()->like('alert.roles', $qb->expr()->literal("%$role%"))) + ->andWhere('alert.publishedat <= :today') + ->andWhere($qb->expr()->orX( + $qb->expr()->gt('alert.unpublishedat', ':today'), + $qb->expr()->isNull('alert.unpublishedat') + )) + ->setParameter('today', date('Y-m-d')); + + if ($idalertcategory && $alertcategoryfilter) { + $qb->andWhere('alert.alertcategory=:alertcategory') + ->setParameter('alertcategory', $alertcategoryfilter); + } + $alertsroles = $qb->getQuery()->getResult(); + + foreach ($alertsroles as $alertrole) { + if (!$alerts->contains($alertrole) && !$userreads->contains($alertrole)) { + $alerts->add($alertrole); + } + } + } + + // Récupération par Niveau01 + $qb = $this->createQueryBuilder('a'); + $qb->select('alert') + ->from('App:Alert', 'alert') + ->where(':niveau01 MEMBER OF alert.niveau01s') + ->andWhere('alert.publishedat <= :today') + ->andWhere($qb->expr()->orX( + $qb->expr()->gt('alert.unpublishedat', ':today'), + $qb->expr()->isNull('alert.unpublishedat') + )) + ->setParameter('niveau01', $niveau01) + ->setParameter('today', date('Y-m-d')); + + if ($idalertcategory && $alertcategoryfilter) { + $qb->andWhere('alert.alertcategory=:alertcategory') + ->setParameter('alertcategory', $alertcategoryfilter); + } + $alertsniveau01s = $qb->getQuery()->getResult(); + foreach ($alertsniveau01s as $alertniveau01) { + if (!$alerts->contains($alertniveau01) && !$userreads->contains($alertniveau01)) { + $alerts->add($alertniveau01); + } + } + + // Récupération des alerts par group + foreach ($groups as $group) { + $qb = $this->createQueryBuilder('a'); + $qb->select('alert') + ->from('App:Alert', 'alert') + ->where(':group MEMBER OF alert.groups') + ->andWhere('alert.publishedat <= :today') + ->andWhere($qb->expr()->orX( + $qb->expr()->gt('alert.unpublishedat', ':today'), + $qb->expr()->isNull('alert.unpublishedat') + )) + ->setParameter('group', $group->getGroup()) + ->setParameter('today', date('Y-m-d')); + + if ($idalertcategory && $alertcategoryfilter) { + $qb->andWhere('alert.alertcategory=:alertcategory') + ->setParameter('alertcategory', $alertcategoryfilter); + } + $alertsgroups = $qb->getQuery()->getResult(); + foreach ($alertsgroups as $alertgroup) { + if (!$alerts->contains($alertgroup) && !$userreads->contains($alertgroup)) { + $alerts->add($alertgroup); + } + } + } + + // Récupération des alerts par item + $bookmarks = null; + $items = null; + $itemcategorys = null; + $this->getEntityManager()->getRepository('App:Item')->getUserItems($user, $bookmarks, $items, $itemcategorys, null, $ssoitems, 4); + foreach ($items as $item) { + $qb = $this->createQueryBuilder('a'); + $qb->select('alert') + ->from('App:Alert', 'alert') + ->where(':item MEMBER OF alert.items') + ->andWhere('alert.publishedat <= :today') + ->andWhere($qb->expr()->orX( + $qb->expr()->gt('alert.unpublishedat', ':today'), + $qb->expr()->isNull('alert.unpublishedat') + )) + ->setParameter('item', $item) + ->setParameter('today', date('Y-m-d')); + + if ($idalertcategory && $alertcategoryfilter) { + $qb->andWhere('alert.alertcategory=:alertcategory') + ->setParameter('alertcategory', $alertcategoryfilter); + } + $alertsitems = $qb->getQuery()->getResult(); + foreach ($alertsitems as $alertitem) { + if (!$alerts->contains($alertitem) && !$userreads->contains($alertitem)) { + $alerts->add($alertitem); + } + } + } + + // Trie des alerts + $alertsordered = $alerts->getIterator(); + $alertsordered->uasort(function ($first, $second) { + return (int) $first->getRowOrder() > (int) $second->getRowOrder() ? 1 : -1; + }); + + return $alertsordered; + } +} diff --git a/src/Repository/ItemRepository.php b/src/Repository/ItemRepository.php new file mode 100644 index 0000000..0f92df5 --- /dev/null +++ b/src/Repository/ItemRepository.php @@ -0,0 +1,169 @@ + + * + * @method Item|null find($id, $lockMode = null, $lockVersion = null) + * @method Item|null findOneBy(array $criteria, array $orderBy = null) + * @method Item[] findAll() + * @method Item[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ItemRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Item::class); + } + + public function save(Item $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Item $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function getUserItems($user,&$bookmarks,&$itemsordered,&$itemcategorys,$iditemcategory=null,$withbookmark=1,$fgessential=false) { + // Profilage + $roles=($user?$user->getRoles():["ROLE_ANONYME"]); + $groups=($user?$user->getGroups():[]); + + // Bookmark de l'utilisateur + $bookmarks = array(); + if($user) + $bookmarks=$this->getEntityManager()->getRepository("App\Entity\Bookmark")->findBy(["user"=>$user]); + + + $itemcategoryfilter=null; + if($iditemcategory) $itemcategoryfilter=$this->getEntityManager()->getRepository("App\Entity\Itemcategory")->findBy(["id"=>$iditemcategory]); + + // Bookmark lié à un item + $bookmarksitems=new ArrayCollection(); + if($withbookmark==0) { + foreach($bookmarks as $bookmark) { + if($bookmark->getItem()) $bookmarksitems->add($bookmark->getItem()); + } + } + + // Initialisation du calcul des items + $items=new ArrayCollection(); + $itemalls=new ArrayCollection(); + + // Récupération des items par rôles + $itemsroles=[]; + + foreach($roles as $role) { + $qb = $this->getEntityManager()->createQueryBuilder(); + $qb->select('item') + ->from("App\Entity\Item", 'item') + ->where($qb->expr()->like('item.roles', $qb->expr()->literal("%$role%"))); + + if($iditemcategory && $itemcategoryfilter) { + $qb->andWhere("item.itemcategory=:itemcategory") + ->setParameter("itemcategory",$itemcategoryfilter); + } + + $itemsroles=$qb->getQuery()->getResult(); + foreach($itemsroles as $itemrole) { + if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) { + if(!$fgessential || ($fgessential && $itemrole->getEssential())) + $items->add($itemrole); + } + + if(!$itemalls->contains($itemrole)) $itemalls->add($itemrole); + } + } + + // Récupération des items par group + $itemsgroups=[]; + foreach($groups as $group) { + $qb = $this->getEntityManager()->createQueryBuilder(); + $qb->select('item') + ->from("App\Entity\Item", 'item') + ->where(":group MEMBER OF item.groups") + ->setParameter("group",$group->getGroup()); + + if($iditemcategory && $itemcategoryfilter) { + $qb->andWhere("item.itemcategory=:itemcategory") + ->setParameter("itemcategory",$itemcategoryfilter); + } + + $itemsgroups=$qb->getQuery()->getResult(); + foreach($itemsgroups as $itemgroup) { + if(!$bookmarksitems->contains($itemgroup) && !$items->contains($itemgroup)) { + if(!$fgessential || ($fgessential && $itemgroup->getEssential())) + $items->add($itemgroup); + } + + if(!$itemalls->contains($itemgroup)) $itemalls->add($itemgroup); + } + } + + // Pour chaque bookmark lié à un item : on vérifie qu'il est tjr la permission de voir cet item sinon on l'enlève de ses fav + foreach($bookmarks as $key => $bookmark) { + $item=$bookmark->getItem(); + if($item) { + if(!$itemalls->contains($item) ) { + unset($bookmarks[$key]); + } + } + } + + // Trie des items + $itemsordered = $items->getIterator(); + $itemsordered->uasort(function ($first, $second) { + if((int) $first->getRowOrder() > (int) $second->getRowOrder()) + $return=1; + elseif((int) $first->getRowOrder() == (int) $second->getRowOrder()) { + if($first->getTitle() > $second->getTitle()) + $return=1; + else + $return=-1; + } + else + $return=-1; + + return $return; + }); + + $itemsordered=iterator_to_array($itemsordered); + + // Catégories affichées + $itemcategorys = $this->getEntityManager()->getRepository('App\Entity\Itemcategory')->findBy([], ['rowOrder' => 'asc']); + if($iditemcategory && $itemcategoryfilter) $itemcategorys = $itemcategoryfilter; + else { + // On eleve les category sans item + foreach($itemcategorys as $key => $category) { + foreach($category->getItems() as $item) { + if(!in_array($item,$itemsordered)) { + unset($itemcategorys[$key]); + } + } + } + } + switch($withbookmark) { + // items uniquement + case 1: $bookmarks=null; break; + + // bookmarks uniquement + case 2: $itemsordered=null; break; + } + } +} diff --git a/src/Repository/PageRepository.php b/src/Repository/PageRepository.php new file mode 100644 index 0000000..f6ca4d0 --- /dev/null +++ b/src/Repository/PageRepository.php @@ -0,0 +1,66 @@ + + * + * @method Page|null find($id, $lockMode = null, $lockVersion = null) + * @method Page|null findOneBy(array $criteria, array $orderBy = null) + * @method Page[] findAll() + * @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class PageRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Page::class); + } + + public function save(Page $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Page $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return Page[] Returns an array of Page objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('p') +// ->andWhere('p.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('p.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Page +// { +// return $this->createQueryBuilder('p') +// ->andWhere('p.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/WidgetRepository.php b/src/Repository/WidgetRepository.php new file mode 100644 index 0000000..6515064 --- /dev/null +++ b/src/Repository/WidgetRepository.php @@ -0,0 +1,66 @@ + + * + * @method Widget|null find($id, $lockMode = null, $lockVersion = null) + * @method Widget|null findOneBy(array $criteria, array $orderBy = null) + * @method Widget[] findAll() + * @method Widget[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class WidgetRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Widget::class); + } + + public function save(Widget $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Widget $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return Widget[] Returns an array of Widget objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('w') +// ->andWhere('w.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('w.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Widget +// { +// return $this->createQueryBuilder('w') +// ->andWhere('w.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/templates/Alert/edit.html.twig b/templates/Alert/edit.html.twig new file mode 100755 index 0000000..a7bac28 --- /dev/null +++ b/templates/Alert/edit.html.twig @@ -0,0 +1,78 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Annonces = {{alert.title}} + {% elseif mode=="submit" %} + Création Annonces + {% endif %} +

+ + {{ form_widget(form.submit) }} + Annuler + + {% if mode=="update" %} + + Supprimer + + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + +
+
+
+
+ Informations +
+ +
+ {{ form_row(form.title) }} + {{ form_row(form.fghideable) }} + {{ form_row(form.publishedat) }} + {{ form_row(form.unpublishedat) }} + {{ form_row(form.content) }} +
+
+
+ +
+
+
+ Affectations +
+ +
+ {{ form_row(form.alertcategory) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+
+
+
+{{ form_end(form) }} +{% endblock %} diff --git a/templates/Alert/list.html.twig b/templates/Alert/list.html.twig new file mode 100644 index 0000000..d573b23 --- /dev/null +++ b/templates/Alert/list.html.twig @@ -0,0 +1,431 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

+ Gestion des Annonces +

+ +

+ Ajouter une Annonce + Ajouter une Catégorie +

+ +
+
+
+

En Attente Publication

+
    + {% for alert in alerts %} + {% if alert.isPending %} +
    +
    +
    + + + {% if alert.alertcategory.icon %} + + {% else %} + + {% endif %} + + + {{ alert.title }} + +
    + + +
    + +
    + {{ alert.content|raw }} +
    +
    + {% endif %} + {% endfor %} +
+
+ +
+

En Ligne

+ +
    + {% for alert in alerts %} + {% if alert.isOnline %} +
    +
    +
    + + + {% if alert.alertcategory.icon %} + + {% else %} + + {% endif %} + + + {{ alert.title }} + +
    + + +
    + +
    + {{ alert.content|raw }} +
    +
    + {% endif %} + {% endfor %} +
+
+ +
+

Archivées

+ +
    + {% for alert in alerts %} + {% if alert.isArchived %} +
    +
    +
    + + + {% if alert.alertcategory.icon %} + + {% else %} + + {% endif %} + + + {{ alert.title }} + +
    + + +
    + +
    + {{ alert.content|raw }} +
    +
    + {% endif %} + {% endfor %} +
+
+
+ +
+
+
+ + Afficher par Catégorie +
+ +
+ {% for alertcategory in alertcategorys %} + + {% endfor %} +
+
+ + + +
+
+ + Afficher par Groupes +
+ + +
+ + +
+
+{% endblock %} + +{% block localscript %} + + +{% endblock %} + + diff --git a/templates/Alertcategory/edit.html.twig b/templates/Alertcategory/edit.html.twig new file mode 100755 index 0000000..f7d6293 --- /dev/null +++ b/templates/Alertcategory/edit.html.twig @@ -0,0 +1,91 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Catégorie d'Annonce = {{alertcategory.label}} + {% elseif mode=="submit" %} + Création Catégorie d'Annonce + {% endif %} +

+ +

+ {{ form_widget(form.submit) }} + Annuler + {% if mode=="update" %} + + Supprimer + + {% endif %} +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} +
+
+ Informations +
+ +
+ {{ form_row(form.label) }} + {{ form_row(form.color) }} + +
+ {% if alertcategory.icon %} + + {% endif %} +
+ +
+ {{ form_row(form.idicon) }} + Selectionner un Icône + Détacher l'Icône +
+
+
+ +{{ form_end(form) }} +{% endblock %} + +{% block localscript %} + +{% endblock %} + diff --git a/templates/Home/page.html.twig b/templates/Home/page.html.twig new file mode 100644 index 0000000..bff26f8 --- /dev/null +++ b/templates/Home/page.html.twig @@ -0,0 +1,51 @@ +{% extends "base.html.twig" %} + +{% block body %} + {% if app.user %} + {% set username = app.user.username %} + {% else %} + {% set username = "" %} + {% endif %} + + {% for bookmark in bookmarks %} + + {% endfor %} + + {% for itemcategory in itemcategorys %} + {% if itemcategorys|length > 1 %}

{{itemcategory.label}}

{% endif %} + +
+ {% for item in items %} + {% if item.itemcategory==itemcategory %} +
+
+ + +
{{ item.content|raw }}
+
+
+ {% endif %} + {% endfor %} +
+ {% endfor %} + +{% endblock %} diff --git a/templates/Icon/edit.html.twig b/templates/Icon/edit.html.twig new file mode 100755 index 0000000..662cd54 --- /dev/null +++ b/templates/Icon/edit.html.twig @@ -0,0 +1,78 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} + {% if not inframe %} +

+ {% if mode=="update" %} + Modification Icône + {% elseif mode=="submit" %} + Création Icône + {% endif %} +

+ {%endif%} + + {{ form_widget(form.submit) }} + Annuler + + {% if mode=="update" and not issystem %} + + Supprimer + + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} +
+
+ Informations +
+ +
+
+ + {{ form_widget(form.label) }} + {% if mode=="submit" or not issystem %} + Modifier + {%endif%} +
+ + {% if mode=="submit" or not issystem %} +
+ Privilégiez des images carrées de minimum 90px par 90px et avec un fond transparent +
+ {%endif%} + + {{ form_row(form.tags) }} + +
+
+ + + {% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %} +
+ {{ render(path("app_"~access~"_audit_renderid",{entityname:"Icon",entityid:icon.id})) }} +
+ {% endif %} +{{ form_end(form) }} +{% endblock %} diff --git a/templates/Icon/list.html.twig b/templates/Icon/list.html.twig new file mode 100644 index 0000000..3dd930c --- /dev/null +++ b/templates/Icon/list.html.twig @@ -0,0 +1,25 @@ +{% extends "base.html.twig" %} + +{% block body %} + {% if not inframe %} +

Gestion des Icônes

+ {% endif %} + {% if auditUse and (access=="admin" or access=="audit") %} + Audit + {% endif %} + +

+ Ajouter + {% if inframe %} + Fermer + {% endif %} +

+ +
+ {% for icon in icons %} + + {% endfor %} +
+{% endblock %} + + diff --git a/templates/Icon/select.html.twig b/templates/Icon/select.html.twig new file mode 100644 index 0000000..6224f66 --- /dev/null +++ b/templates/Icon/select.html.twig @@ -0,0 +1,70 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+ + +
+ + + + {% if iconsuser is not empty %} +

Mes Icônes

+ {% for icon in iconsuser %} + {% set tag = "" %} + {% if icon.tags %} + {% set tag = icon.tags %} + {% endif %} + {% if icon.label starts with 'icon/icon_' %} + {% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %} + {% endif %} + + + {% endfor %} + +

Icônes Communs

+ {% endif %} + {% for icon in icons %} + {% set tag = "" %} + {% if icon.tags %} + {% set tag = icon.tags %} + {% endif %} + {% if icon.label starts with 'icon/icon_' %} + {% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %} + {% endif %} + + {% endfor %} +
+
+{% endblock %} + +{% block localscript %} + +{% endblock %} + + diff --git a/templates/Icon/upload.html.twig b/templates/Icon/upload.html.twig new file mode 100755 index 0000000..09d8eac --- /dev/null +++ b/templates/Icon/upload.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block encoretags %} + {{ encore_entry_link_tags('dropzone') }} +{% endblock %} + +{% block body %} + Annuler + +
+
+{% endblock %} + + + +{% block localscript %} + {{ encore_entry_script_tags('dropzone') }} + + +{% endblock %} diff --git a/templates/Include/sidebaradmin.html.twig b/templates/Include/sidebaradmin.html.twig index bbddea2..cc84ce6 100755 --- a/templates/Include/sidebaradmin.html.twig +++ b/templates/Include/sidebaradmin.html.twig @@ -64,6 +64,28 @@ }, ] }, + { + 'id': 'sidebar-portal', + 'icon': 'fa fa-door-closed', + 'name' : 'PORTAIL', + 'items' : [ + { + icon: 'fa fa-bell', + route: 'app_admin_alert', + name: 'Annonces', + }, + { + icon: 'fa fa-desktop', + route: 'app_admin_item', + name: 'Items', + }, + { + icon: 'fa fa-bug', + route: 'app_admin_icon', + name: 'Icônes', + }, + ] + }, { 'id': 'sidebar-cron', 'icon': 'fa fa-wrench', diff --git a/templates/Item/edit.html.twig b/templates/Item/edit.html.twig new file mode 100755 index 0000000..6ff1c70 --- /dev/null +++ b/templates/Item/edit.html.twig @@ -0,0 +1,143 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Item = {{item.title}} + {% elseif mode=="submit" %} + Création Item + {% endif %} +

+ + {{ form_widget(form.submit) }} + Annuler + + {% if mode=="update" %} + + Supprimer + + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + +
+
+
+
+ Informations +
+ +
+ {{ form_row(form.title) }} + {{ form_row(form.subtitle) }} + {{ form_row(form.url) }} +
le mot clé #login# sera remplacé par le login de l'utilisateur
+ {{ form_row(form.target) }} +
Attention certains sites n'acceptent pas d'être encapsulés dans une frame. Si vous ne voyez pas votre site apparaître, veuillez changer de cible.
+ + {{ form_row(form.essential) }} + {{ form_row(form.protected) }} + {{ form_row(form.content) }} +
+
+
+ + +
+
+
+ Affectations +
+ +
+ {{ form_row(form.itemcategory) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+
+ +
+
+ Appararence +
+ +
+ {{ form_row(form.color) }} + + +
+ {% if item.icon %} + + {% endif %} +
+ + +
+ {{ form_row(form.idicon) }} + Selectionner un Icône + Détacher l'Icône +
+
+
+
+
+{{ form_end(form) }} +{% endblock %} + +{% block localscript %} + +{% endblock %} diff --git a/templates/Item/list.html.twig b/templates/Item/list.html.twig new file mode 100644 index 0000000..191cddd --- /dev/null +++ b/templates/Item/list.html.twig @@ -0,0 +1,223 @@ +{% extends 'base.html.twig' %} + +{% block localstyle %} + +{% endblock %} + +{% block body %} +

+ Gestion des Items +

+ +

+ Ajouter un Item + Ajouter une Categorie +

+ +
+
+ {% for itemcategory in itemcategorys %} +
+ + +
+ {% for item in itemcategory.items %} + + {% endfor %} +
+
+ {% endfor %} +
+ + + +
+ +{% endblock %} + +{% block localscript %} + +{% endblock %} + diff --git a/templates/Itemcategory/edit.html.twig b/templates/Itemcategory/edit.html.twig new file mode 100755 index 0000000..1445def --- /dev/null +++ b/templates/Itemcategory/edit.html.twig @@ -0,0 +1,60 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Catégorie d'Item = {{itemcategory.label}} + {% elseif mode=="submit" %} + Création Catégorie d'Item + {% endif %} +

+ +

+ {{ form_widget(form.submit) }} + Annuler + {% if mode=="update" %} + + Supprimer + + {% endif %} +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + +
+
+ Informations +
+ +
+ {{ form_row(form.label) }} +
+
+ + + +{{ form_end(form) }} +{% endblock %} + +{% block localjavascript %} +{% endblock %} diff --git a/yarn.lock b/yarn.lock index 6001c83..11ed3b0 100755 --- a/yarn.lock +++ b/yarn.lock @@ -3212,6 +3212,11 @@ jquery@>=1.7, "jquery@>=1.8.0 <4.0.0", jquery@^3.6.0: resolved "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz" integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw== +jqueryui@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/jqueryui/-/jqueryui-1.11.1.tgz#8718550705f5568d1199196169094db73b2291bc" + integrity sha512-w3k80seYwcirTMG7fhd1MfqYx2dMO9fEi+I0vUN5hbX5+y7YIWySJkFsCBj4UBNuFcYOfUk6I63sUG/hCawdZA== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"