diff --git a/assets/js/app.js b/assets/js/app.js index a88512f..901a68b 100755 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -84,6 +84,6 @@ function resize() { $("main").css("height",$(window).height()-$(".header").height()); $("#page").css("height",$(window).height()-$(".header").height()); - $("#sidebar").css("min-height",$("body").height()-$(".header").height()); + $("#sidebar").css("min-height",$("body").height()-$(".header").height()); } diff --git a/assets/styles/app.css b/assets/styles/app.css index f9c2120..e696e6c 100755 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -232,6 +232,10 @@ border-width: 1px; /* ITEM */ +.itemframe { + width: 100% +} + .items-list { display:flex; flex-wrap: wrap; @@ -243,7 +247,7 @@ border-width: 1px; text-align: center; justify-content: center; margin-right:5px; - margin-bottom:5px; + margin-top:5px; flex-wrap: wrap; color: var(--colorftbodydark) !important; } @@ -395,6 +399,7 @@ border-width: 1px; .item-list { width:100%; justify-content: left; + margin-right: 0px; } .item-list .item-container { diff --git a/config/routes.yaml b/config/routes.yaml index 0aec843..18e917b 100755 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -997,4 +997,647 @@ app_admin_itemcategory_delete: app_admin_itemcategory_order: path: /admin/itemcategory/order controller: App\Controller\ItemcategoryController::order - defaults: { access: admin } \ No newline at end of file + defaults: { access: admin } + +#== BOOKMARK ============================================================================================================================================= + +#-- Access config +app_admin_bookmark_submit: + path: /admin/bookmark/submit/{idpage}/{idwidget}/{touser} + controller: App\Controller\BookmarkController::order + defaults: { access: admin } + +app_admin_bookmark_update: + path: /admin/bookmark/update/{idpage}/{id} + controller: App\Controller\BookmarkController::update + defaults: { access: admin } + +app_admin_bookmark_delete: + path: /admin/bookmark/delete/{idpage}/{id} + controller: App\Controller\BookmarkController::delete + defaults: { access: admin } + +#-- Access all +app_all_bookmark_submit: + path: /all/bookmark/submit/{idpage}/{idwidget}/{touser} + controller: App\Controller\BookmarkController::submit + defaults: { access: all } + +app_all_bookmark_update: + path: /all/bookmark/update/{idpage}/{id} + controller: App\Controller\BookmarkController::update + defaults: { access: all } + +app_all_bookmark_delete: + path: /all/bookmark/delete/{idpage}/{id} + controller: App\Controller\BookmarkController::delete + defaults: { access: all } + +app_all_bookmark_heart: + path: /all/bookmark/heart + controller: App\Controller\BookmarkController::heart + defaults: { access: all } + + +#== FILE ================================================================================================================= + +#-- Access admin +app_admin_file_list: + path: /admin/file/list/{directory} + controller: App\Controller\FileController::list + defaults: { access: admin } + +app_admin_file_upload: + path: /admin/file/upload/{id}/{type} + controller: App\Controller\FileController::upload + defaults: { access: admin } + +app_admin_file_subdirectory: + path: /admin/file/subdirectory/{id}/{type} + controller: App\Controller\FileController::subdirectory + defaults: { access: admin } + +app_admin_file_rename: + path: /admin/file/rename/{id}/{oldname} + controller: App\Controller\FileController::rename + defaults: { access: admin } + +app_admin_file_trash: + path: /admin/file/trash/ + controller: App\Controller\FileController::trash + defaults: { access: admin } + +app_admin_file_restaure: + path: /admin/file/restaure/ + controller: App\Controller\FileController::restaure + defaults: { access: admin } + +app_admin_file_purgetrash: + path: /admin/file/purgetrash/{directory} + controller: App\Controller\FileController::purgetrash + defaults: { access: admin } + +app_admin_file_delete: + path: /admin/file/delete/ + controller: App\Controller\FileController::delete + defaults: { access: admin } + +app_admin_file_move: + path: /admin/file/move/ + controller: App\Controller\FileController::move + defaults: { access: admin } + +app_admin_file_view: + path: /admin/file/view/{directory}/{filename} + controller: App\Controller\FileController::view + defaults: { access: admin } + +app_admin_file_show: + path: /admin/file/show/{directory}/{filename} + controller: App\Controller\FileController::show + defaults: { access: admin } + +app_admin_file_download: + path: /admin/file/download/{directory}/{filename} + controller: App\Controller\FileController::download + defaults: { access: admin } + +#-- Access all +app_all_file_list: + path: /all/file/list/{directory} + controller: App\Controller\FileController::list + defaults: { access: all } + +app_all_file_upload: + path: /all/file/upload/{id}/{type} + controller: App\Controller\FileController::upload + defaults: { access: all } + +app_all_file_subdirectory: + path: /all/file/subdirectory/{id}/{type} + controller: App\Controller\FileController::subdirectory + defaults: { access: all } + +app_all_file_rename: + path: /all/file/rename/{id}/{oldname} + controller: App\Controller\FileController::rename + defaults: { access: all } + +app_all_file_trash: + path: /all/file/trash/ + controller: App\Controller\FileController::trash + defaults: { access: all } + +app_all_file_restaure: + path: /all/file/restaure/ + controller: App\Controller\FileController::restaure + defaults: { access: all } + +app_all_file_purgetrash: + path: /all/file/purgetrash/{directory} + controller: App\Controller\FileController::purgetrash + defaults: { access: all } + +app_all_file_delete: + path: /all/file/delete + controller: App\Controller\FileController::delete + +app_all_file_move: + path: /all/file/move/ + controller: App\Controller\FileController::move + defaults: { access: all } + +app_all_file_view: + path: /all/file/view/{directory}/{filename} + controller: App\Controller\FileController::view + defaults: { access: all } + +app_all_file_download: + path: /all/file/download/{directory}/{filename} + controller: App\Controller\FileController::download + defaults: { access: all } + +app_all_file_show: + path: /all/file/show/{directory}/{filename} + controller: App\Controller\FileController::show + defaults: { access: all } + +#== SLIDE ================================================================================================================================================ + +#-- Access admin +app_admin_slide_list: + path: /config/slide/{idpage}/{idwidget} + controller: App\Controller\SlideController::list + defaults: { access: admin } + +app_admin_slide_submit: + path: /config/slide/submit/{idpage}/{idwidget} + controller: App\Controller\SlideController::submit + defaults: { access: admin } + +app_admin_slide_update: + path: /config/slide/update/{idpage}/{id} + controller: App\Controller\SlideController::update + defaults: { access: admin } + +app_admin_slide_delete: + path: /config/slide/delete/{idpage}/{id} + controller: App\Controller\SlideController::delete + defaults: { access: admin } + +app_admin_slide_upload: + path: /config/slide/upload + controller: App\Controller\SlideController::upload + defaults: { access: admin } + +#-- Access all +app_all_slide_list: + path: /user/slide/{idpage}/{idwidget} + controller: App\Controller\SlideController::list + defaults: { access: all } + +app_all_slide_submit: + path: /user/slide/submit/{idpage}/{idwidget} + controller: App\Controller\SlideController::submit + defaults: { access: all } + +app_all_slide_update: + path: /user/slide/update/{idpage}/{id} + controller: App\Controller\SlideController::update + defaults: { access: all } + +app_all_slide_delete: + path: /user/slide/delete/{idpage}/{id} + controller: App\Controller\SlideController::delete + defaults: { access: all } + +app_all_slide_upload: + path: /user/slide/upload + controller: App\Controller\SlideController::upload + defaults: { access: all } + +#== MESSAGE ================================================================================================================== + +# Access all +app_all_message_chat: + path: /all/message/chat/{id} + controller: App\Controller\WebsocketController::chat + defaults: { access: all } + +app_all_message_see: + path: /all/message/see + controller: App\Controller\WebsocketController::see + defaults: { access: all } + + +#== PAGE TEMPLATE ======================================================================================================================================== + +#-- Access admin +app_admin_pagetemplate: + path: /admin/template + controller: App\Controller\PagetemplateController::list + defaults: { access: admin } + +app_admin_pagetemplate_tablelist: + path: /admin/template/tablelist + controller: App\Controller\PagetemplateController::tablelist + defaults: { access: admin } + +app_admin_pagetemplate_submit: + path: /admin/template/submit + controller: App\Controller\PagetemplateController::submit + defaults: { access: admin } + +app_admin_pagetemplate_update: + path: /admin/template/update/{id} + controller: App\Controller\PagetemplateController::update + defaults: { access: admin } + +app_admin_pagetemplate_delete: + path: /admin/template/delete/{id} + controller: App\Controller\PagetemplateController::delete + defaults: { access: admin } + +app_admin_pagetemplate_view: + path: /admin/template/view/{id} + controller: App\Controller\PagetemplateController::view + defaults: { access: admin } + +#-- Access all +app_all_pagetemplate_selectlist: + path: /all/template/selectlist + controller: App\Controller\PagetemplateController::selectlist + defaults: { access: admin } + + +#== PAGE ================================================================================================================================================= + +#-- Access admin +app_admin_page: + path: /admin/page/ + controller: App\Controller\PageController::list + defaults: { access: admin } + +app_admin_page_ajax_list: + path: /admin/page/ajax/list + controller: App\Controller\PageController::tablelist + defaults: { access: admin } + +app_admin_ajax_page_seleclist: + path: /admin/page//ajax/selectlist + controller: App\Controller\PageController::selectlist + defaults: { access: admin } + +app_admin_page_submit: + path: /admin/page/submit + controller: App\Controller\PageController::submit + defaults: { access: admin } + +app_admin_page_update: + path: /admin/page/update/{id} + controller: App\Controller\PageController::update + defaults: { access: admin } + +app_admin_page_delete: + path: /admin/page/delete/{id} + controller: App\Controller\PageController::delete + defaults: { access: admin } + +app_admin_page_view: + path: /admin/page/view/{id} + controller: App\Controller\PageController::view + defaults: { access: admin } + +app_admin_page_order: + path: /admin/page/order + controller: App\Controller\PageController::order + defaults: { access: admin } + +app_admin_page_upload: + path: /admin/page/upload + controller: App\Controller\PageController::upload + defaults: { access: admin } + +app_admin_page_upload_direct: + path: /admin/page//upload&responseType=json + controller: App\Controller\PageController::upload + defaults: { access: admin } + +#-- Access all +app_all_page_submit: + path: /all/page/submit + controller: App\Controller\PageController::submit + defaults: { access: all } + +app_all_page_update: + path: /all/page/update/{id} + controller: App\Controller\PageController::update + defaults: { access: all } + +app_all_page_delete: + path: /all/page/delete/{id} + controller: App\Controller\PageController::delete + defaults: { access: all } + +app_all_page_share: + path: /all/page/share/{id} + controller: App\Controller\PageController::share + defaults: { access: all } + +app_all_page_view: + path: /page/view/{id} + controller: App\Controller\PageController::view + defaults: { access: all } + +app_all_page_order: + path: /all/page/order + controller: App\Controller\PageController::order + defaults: { access: all } + +app_all_page_upload: + path: /all/page/upload + controller: App\Controller\PageController::selectlist + defaults: { access: all } + +app_all_page_upload_direct: + path: /all/page/upload&responseType=json + controller: App\Controller\PageController::upload + defaults: { access: all } + +# Page spécifique +app_all_page_application: + path: /page/application + controller: App\Controller\PageController::application + defaults: { access: all } + +app_all_page_ajax_msgcounter: + path: /page/msgcounter + controller: App\Controller\PageController::msgcounter + defaults: { access: all } + + + +#== PAGE WIDGET ========================================================================================================================================== + +#-- Access admin +app_admin_pagewidget_widget_sumbit: + path: /admin/pagewidget/submit/{idpage}/{idwidgettype} + controller: App\Controller\PagewidgetController::submit + defaults: { access: admin } + +app_admin_pagewidget_widget_update: + path: /admin/pagewidget/update/{idpage}/{idwidget} + controller: App\Controller\PagewidgetController::update + defaults: { access: admin } + +app_admin_pagewidget_delete: + path: /admin/pagewidget/delete/{idwidget} + controller: App\Controller\PagewidgetController::delete + defaults: { access: admin } + +app_admin_pagewidget_order: + path: /admin/pagewidget/order + controller: App\Controller\PageController::order + defaults: { access: admin } + +app_admin_pagewidget_upload: + path: /admin/pagewidget/upload + controller: App\Controller\PagewidgetController::upload + defaults: { access: admin } + +app_admin_pagewidget_upload_direct: + path: /admin/pagewidget/upload&responseType=json + controller: App\Controller\PagewidgetController::upload + defaults: { access: admin } + +app_admin_pagewidget_view_url: + path: /admin/pagewidget/view/url/{id} + controller: App\Controller\PageController::viewurl + defaults: { access: admin } + +app_admin_pagewidget_view_urlfixe: + path: /admin/pagewidget/view/urlfixe/{id} + controller: App\Controller\PagewidgetController::viewurlfixe + defaults: { access: admin } + +app_admin_pagewidget_view_item: + path: /admin/pagewidget/view/item/{id} + controller: App\Controller\PagewidgetController::viewitem + defaults: { access: admin } + +app_admin_pagewidget_view_itemessential: + path: /admin/pagewidget/view/itemessential/{id} + controller: App\Controller\PagewidgetController::viewitemessential + defaults: { access: admin } + +app_admin_pagewidget_view_alert: + path: /admin/pagewidget/view/alert/{id} + controller: App\Controller\PagewidgetController::viewalert + defaults: { access: admin } + +app_admin_pagewidget_view_flux: + path: /admin/pagewidget/view/flux/{id} + controller: App\Controller\PagewidgetController::viewflux + defaults: { access: admin } + +app_admin_pagewidget_view_rss: + path: /admin/pagewidget/view/rss/{id} + controller: App\Controller\PagewidgetController::viewrss + defaults: { access: admin } + +app_admin_pagewidget_view_bookmark: + path: /admin/pagewidget/view/bookmark/{id} + controller: App\Controller\PagewidgetController::viewbookmark + defaults: { access: admin } + +app_admin_pagewidget_view_link: + path: /admin/pagewidget/view/link/{id} + controller: App\Controller\PagewidgetController::viewlink + defaults: { access: admin } + +app_admin_pagewidget_view_editor: + path: /admin/pagewidget/view/editor/{id} + controller: App\Controller\PagewidgetController::vieweditor + defaults: { access: admin } + +app_admin_pagewidget_view_slide: + path: /admin/pagewidget/view/slide/{id} + controller: App\Controller\PagewidgetController::viewslide + defaults: { access: admin } + +app_admin_pagewidget_view_file: + path: /admin/pagewidget/view/file/{id} + controller: App\Controller\PagewidgetController::viewfile + defaults: { access: admin } + +app_admin_pagewidget_view_galery: + path: /admin/pagewidget/view/galery/{id} + controller: App\Controller\PagewidgetController::viewgalery + defaults: { access: admin } + +app_admin_pagewidget_view_calendar: + path: /admin/pagewidget/view/calendar/{id} + controller: App\Controller\PagewidgetController::viewcalendar + defaults: { access: admin } + +app_admin_pagewidget_view_blog: + path: /admin/pagewidget/view/blog/{id} + controller: App\Controller\PagewidgetController::viewblog + defaults: { access: admin } + +app_admin_pagewidget_view_project: + path: /admin/pagewidget/view/project/{id} + controller: App\Controller\PagewidgetController::viewproject + defaults: { access: admin } + +app_admin_pagewidget_view_info: + path: /admin/pagewidget/view/info/{id} + controller: App\Controller\PagewidgetController::viewinfo + defaults: { access: admin } + +app_admin_pagewidget_view_chat: + path: /admin/pagewidget/view/chat/{id} + controller: App\Controller\PagewidgetController::viewchat + defaults: { access: admin } + +app_admin_pagewidget_view_group: + path: /admin/pagewidget/view/group/{id} + controller: App\Controller\PagewidgetController::viewgroup + defaults: { access: admin } + +app_admin_pagewidget_view_groupmessage: + path: /admin/pagewidget/view/groupmessage/{id} + controller: App\Controller\PagewidgetController::viewgroupmessage + defaults: { access: admin } + +#-- Access all +app_all_pagewidget_widget_sumbit: + path: /user/pagewidget/submit/{idpage}/{idwidgettype} + controller: App\Controller\PagewidgetController::submit + defaults: { access: all } + +app_all_pagewidget_widget_update: + path: /user/pagewidget/update/{idpage}/{idwidget} + controller: App\Controller\PagewidgetController::update + defaults: { access: all } + +app_all_pagewidget_delete: + path: /user/pagewidget/delete/{idwidget} + controller: App\Controller\PagewidgetController::delete + defaults: { access: all } + +app_all_pagewidget_order: + path: /user/pagewidget/order + controller: App\Controller\PagewidgetController::order + defaults: { access: all } + +app_all_pagewidget_upload: + path: /user/pagewidget/upload + controller: App\Controller\PagewidgetController::upload + defaults: { access: all } + +app_all_pagewidget_upload_direct: + path: /user/pagewidget/upload&responseType=json + controller: App\Controller\PagewidgetController::upload + defaults: { access: all } + +app_all_pagewidget_view_url: + path: /pagewidget/view/url/{id} + controller: App\Controller\PagewidgetController::viewurl + defaults: { access: all } + +app_all_pagewidget_view_urlfixe: + path: /pagewidget/view/urlfixe/{id} + controller: App\Controller\PagewidgetController::viewurlfixe + defaults: { access: all } + +app_all_pagewidget_view_item: + path: /pagewidget/view/item/{id} + controller: App\Controller\PagewidgetController::viewitem + defaults: { access: all } + +app_all_pagewidget_view_itemessential: + path: /pagewidget/view/itemessential/{id} + controller: App\Controller\PagewidgetController::viewitemessential + defaults: { access: all } + +app_all_pagewidget_view_alert: + path: /pagewidget/view/alert/{id} + controller: App\Controller\PagewidgetController::viewalert + defaults: { access: all } + +app_all_pagewidget_view_flux: + path: /pagewidget/view/flux/{id} + controller: App\Controller\PagewidgetController::viewflux + defaults: { access: all } + +app_all_pagewidget_view_rss: + path: /pagewidget/view/rss/{id} + controller: App\Controller\PagewidgetController::viewrss + defaults: { access: all } + +app_all_pagewidget_view_bookmark: + path: /pagewidget/view/bookmark/{id} + controller: App\Controller\PagewidgetController::viewbookmark + defaults: { access: all } + +app_all_pagewidget_view_link: + path: /pagewidget/view/link/{id} + controller: App\Controller\PagewidgetController::viewlink + defaults: { access: all } + +app_all_pagewidget_view_editor: + path: /pagewidget/view/editor/{id} + controller: App\Controller\PagewidgetController::vieweditor + defaults: { access: all } + +app_all_pagewidget_view_slide: + path: /pagewidget/view/slide/{id} + controller: App\Controller\PagewidgetController::viewslide + defaults: { access: all } + +app_all_pagewidget_view_file: + path: /pagewidget/view/file/{id} + controller: App\Controller\PagewidgetController::viewfile + defaults: { access: all } + +app_all_pagewidget_view_galery: + path: /pagewidget/view/galery/{id} + controller: App\Controller\PagewidgetController::viewgalery + defaults: { access: all } + +app_all_pagewidget_view_calendar: + path: /pagewidget/view/calendar/{id} + controller: App\Controller\PagewidgetController::viewcalendar + defaults: { access: all } + +app_all_pagewidget_view_blog: + path: /pagewidget/view/blog/{id} + controller: App\Controller\PagewidgetController::viewblog + defaults: { access: all } + +app_all_pagewidget_view_project: + path: /pagewidget/view/project/{id} + controller: App\Controller\PagewidgetController::viewproject + defaults: { access: all } + +app_all_pagewidget_view_info: + path: /pagewidget/view/info/{id} + controller: App\Controller\PagewidgetController::viewinfo + defaults: { access: all } + +app_all_pagewidget_view_chat: + path: /pagewidget/view/chat/{id} + controller: App\Controller\PagewidgetController::viewchat + defaults: { access: all } + +app_all_pagewidget_view_group: + path: /pagewidget/view/group/{id} + controller: App\Controller\PagewidgetController::viewgroup + defaults: { access: all } + +app_all_pagewidget_view_groupmessage: + path: /pagewidget/view/groupmessage/{id} + controller: App\Controller\PagewidgetController::viewgroupmessage + defaults: { access: all } + \ No newline at end of file diff --git a/config/services.yaml b/config/services.yaml index e3e41c4..f6bde1a 100755 --- a/config/services.yaml +++ b/config/services.yaml @@ -266,4 +266,12 @@ services: arguments: ["%kernel.project_dir%","%minioUrl%","%minioKey%","%minioSecret%","%minioBucket%","%minioRoot%","%minioPathstyle%","%minioSecure%","%kernel.environment%"] App\Controller\RestController: - public: true \ No newline at end of file + public: true + + App\Form\PagewidgetType: + arguments: ["@service_container"] + + App\Form\Type\FaChoiceType: + arguments: ["%kernel.project_dir%/public/medias/icons-fa5.json"] + tags: + - { name: form.type } \ No newline at end of file diff --git a/migrations/Version20230111095833.php b/migrations/Version20230111095833.php new file mode 100644 index 0000000..4d20f6f --- /dev/null +++ b/migrations/Version20230111095833.php @@ -0,0 +1,64 @@ +addSql('ALTER TABLE alertniveau01 DROP CONSTRAINT fk_87e7389c17fd46c1'); + $this->addSql('ALTER TABLE alertniveau01 DROP CONSTRAINT fk_87e7389c6dfc7e23'); + $this->addSql('ALTER TABLE itemniveau01 DROP CONSTRAINT fk_12e9b90a1f1b251e'); + $this->addSql('ALTER TABLE itemniveau01 DROP CONSTRAINT fk_12e9b90a6dfc7e23'); + $this->addSql('ALTER TABLE alertitem DROP CONSTRAINT fk_873c473817fd46c1'); + $this->addSql('ALTER TABLE alertitem DROP CONSTRAINT fk_873c47381f1b251e'); + $this->addSql('DROP TABLE alertniveau01'); + $this->addSql('DROP TABLE itemniveau01'); + $this->addSql('DROP TABLE alertitem'); + $this->addSql('ALTER TABLE groupe ADD pagetemplate_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE groupe ADD CONSTRAINT FK_4B98C216D71CE5E FOREIGN KEY (pagetemplate_id) REFERENCES page (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_4B98C216D71CE5E ON groupe (pagetemplate_id)'); + $this->addSql('ALTER TABLE item DROP badgeurl'); + $this->addSql('ALTER TABLE item DROP ssoitem'); + } + + 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('CREATE TABLE alertniveau01 (alert INT NOT NULL, niveau01 INT NOT NULL, PRIMARY KEY(alert, niveau01))'); + $this->addSql('CREATE INDEX idx_87e7389c6dfc7e23 ON alertniveau01 (niveau01)'); + $this->addSql('CREATE INDEX idx_87e7389c17fd46c1 ON alertniveau01 (alert)'); + $this->addSql('CREATE TABLE itemniveau01 (item INT NOT NULL, niveau01 INT NOT NULL, PRIMARY KEY(item, niveau01))'); + $this->addSql('CREATE INDEX idx_12e9b90a6dfc7e23 ON itemniveau01 (niveau01)'); + $this->addSql('CREATE INDEX idx_12e9b90a1f1b251e ON itemniveau01 (item)'); + $this->addSql('CREATE TABLE alertitem (alert INT NOT NULL, item INT NOT NULL, PRIMARY KEY(alert, item))'); + $this->addSql('CREATE INDEX idx_873c47381f1b251e ON alertitem (item)'); + $this->addSql('CREATE INDEX idx_873c473817fd46c1 ON alertitem (alert)'); + $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 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 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 groupe DROP CONSTRAINT FK_4B98C216D71CE5E'); + $this->addSql('DROP INDEX IDX_4B98C216D71CE5E'); + $this->addSql('ALTER TABLE groupe DROP pagetemplate_id'); + $this->addSql('ALTER TABLE item ADD badgeurl VARCHAR(250) DEFAULT NULL'); + $this->addSql('ALTER TABLE item ADD ssoitem VARCHAR(255) DEFAULT NULL'); + } +} diff --git a/migrations/Version20230112085854.php b/migrations/Version20230112085854.php new file mode 100644 index 0000000..f9ae911 --- /dev/null +++ b/migrations/Version20230112085854.php @@ -0,0 +1,34 @@ +addSql('ALTER TABLE pagewidget ADD viewheader BOOLEAN DEFAULT true NOT NULL'); + $this->addSql('ALTER TABLE widget ADD viewheader BOOLEAN DEFAULT true NOT NULL'); + } + + 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('ALTER TABLE widget DROP viewheader'); + $this->addSql('ALTER TABLE pagewidget DROP viewheader'); + } +} diff --git a/public/medias/icon/icon_add.png b/public/medias/icon/icon_add.png new file mode 100644 index 0000000..a66eca6 Binary files /dev/null and b/public/medias/icon/icon_add.png differ diff --git a/public/medias/icons-fa5.json b/public/medias/icons-fa5.json new file mode 100644 index 0000000..608e133 --- /dev/null +++ b/public/medias/icons-fa5.json @@ -0,0 +1 @@ +{"500px":{"type":"fab","name":"500px","unicode":"\\f26e"},"accessible-icon":{"type":"fab","name":"accessible-icon","unicode":"\\f368"},"accusoft":{"type":"fab","name":"accusoft","unicode":"\\f369"},"acquisitions-incorporated":{"type":"fab","name":"acquisitions-incorporated","unicode":"\\f6af"},"ad":{"type":"fas","name":"ad","unicode":"\\f641"},"address-book":{"type":"fas","name":"address-book","unicode":"\\f2b9"},"address-card":{"type":"fas","name":"address-card","unicode":"\\f2bb"},"adjust":{"type":"fas","name":"adjust","unicode":"\\f042"},"adn":{"type":"fab","name":"adn","unicode":"\\f170"},"adversal":{"type":"fab","name":"adversal","unicode":"\\f36a"},"affiliatetheme":{"type":"fab","name":"affiliatetheme","unicode":"\\f36b"},"air-freshener":{"type":"fas","name":"air-freshener","unicode":"\\f5d0"},"airbnb":{"type":"fab","name":"airbnb","unicode":"\\f834"},"algolia":{"type":"fab","name":"algolia","unicode":"\\f36c"},"align-center":{"type":"fas","name":"align-center","unicode":"\\f037"},"align-justify":{"type":"fas","name":"align-justify","unicode":"\\f039"},"align-left":{"type":"fas","name":"align-left","unicode":"\\f036"},"align-right":{"type":"fas","name":"align-right","unicode":"\\f038"},"alipay":{"type":"fab","name":"alipay","unicode":"\\f642"},"allergies":{"type":"fas","name":"allergies","unicode":"\\f461"},"amazon":{"type":"fab","name":"amazon","unicode":"\\f270"},"amazon-pay":{"type":"fab","name":"amazon-pay","unicode":"\\f42c"},"ambulance":{"type":"fas","name":"ambulance","unicode":"\\f0f9"},"american-sign-language-interpreting":{"type":"fas","name":"american-sign-language-interpreting","unicode":"\\f2a3"},"amilia":{"type":"fab","name":"amilia","unicode":"\\f36d"},"anchor":{"type":"fas","name":"anchor","unicode":"\\f13d"},"android":{"type":"fab","name":"android","unicode":"\\f17b"},"angellist":{"type":"fab","name":"angellist","unicode":"\\f209"},"angle-double-down":{"type":"fas","name":"angle-double-down","unicode":"\\f103"},"angle-double-left":{"type":"fas","name":"angle-double-left","unicode":"\\f100"},"angle-double-right":{"type":"fas","name":"angle-double-right","unicode":"\\f101"},"angle-double-up":{"type":"fas","name":"angle-double-up","unicode":"\\f102"},"angle-down":{"type":"fas","name":"angle-down","unicode":"\\f107"},"angle-left":{"type":"fas","name":"angle-left","unicode":"\\f104"},"angle-right":{"type":"fas","name":"angle-right","unicode":"\\f105"},"angle-up":{"type":"fas","name":"angle-up","unicode":"\\f106"},"angry":{"type":"fas","name":"angry","unicode":"\\f556"},"angrycreative":{"type":"fab","name":"angrycreative","unicode":"\\f36e"},"angular":{"type":"fab","name":"angular","unicode":"\\f420"},"ankh":{"type":"fas","name":"ankh","unicode":"\\f644"},"app-store":{"type":"fab","name":"app-store","unicode":"\\f36f"},"app-store-ios":{"type":"fab","name":"app-store-ios","unicode":"\\f370"},"apper":{"type":"fab","name":"apper","unicode":"\\f371"},"apple":{"type":"fab","name":"apple","unicode":"\\f179"},"apple-alt":{"type":"fas","name":"apple-alt","unicode":"\\f5d1"},"apple-pay":{"type":"fab","name":"apple-pay","unicode":"\\f415"},"archive":{"type":"fas","name":"archive","unicode":"\\f187"},"archway":{"type":"fas","name":"archway","unicode":"\\f557"},"arrow-alt-circle-down":{"type":"fas","name":"arrow-alt-circle-down","unicode":"\\f358"},"arrow-alt-circle-left":{"type":"fas","name":"arrow-alt-circle-left","unicode":"\\f359"},"arrow-alt-circle-right":{"type":"fas","name":"arrow-alt-circle-right","unicode":"\\f35a"},"arrow-alt-circle-up":{"type":"fas","name":"arrow-alt-circle-up","unicode":"\\f35b"},"arrow-circle-down":{"type":"fas","name":"arrow-circle-down","unicode":"\\f0ab"},"arrow-circle-left":{"type":"fas","name":"arrow-circle-left","unicode":"\\f0a8"},"arrow-circle-right":{"type":"fas","name":"arrow-circle-right","unicode":"\\f0a9"},"arrow-circle-up":{"type":"fas","name":"arrow-circle-up","unicode":"\\f0aa"},"arrow-down":{"type":"fas","name":"arrow-down","unicode":"\\f063"},"arrow-left":{"type":"fas","name":"arrow-left","unicode":"\\f060"},"arrow-right":{"type":"fas","name":"arrow-right","unicode":"\\f061"},"arrow-up":{"type":"fas","name":"arrow-up","unicode":"\\f062"},"arrows-alt":{"type":"fas","name":"arrows-alt","unicode":"\\f0b2"},"arrows-alt-h":{"type":"fas","name":"arrows-alt-h","unicode":"\\f337"},"arrows-alt-v":{"type":"fas","name":"arrows-alt-v","unicode":"\\f338"},"artstation":{"type":"fab","name":"artstation","unicode":"\\f77a"},"assistive-listening-systems":{"type":"fas","name":"assistive-listening-systems","unicode":"\\f2a2"},"asterisk":{"type":"fas","name":"asterisk","unicode":"\\f069"},"asymmetrik":{"type":"fab","name":"asymmetrik","unicode":"\\f372"},"at":{"type":"fas","name":"at","unicode":"\\f1fa"},"atlas":{"type":"fas","name":"atlas","unicode":"\\f558"},"atlassian":{"type":"fab","name":"atlassian","unicode":"\\f77b"},"atom":{"type":"fas","name":"atom","unicode":"\\f5d2"},"audible":{"type":"fab","name":"audible","unicode":"\\f373"},"audio-description":{"type":"fas","name":"audio-description","unicode":"\\f29e"},"autoprefixer":{"type":"fab","name":"autoprefixer","unicode":"\\f41c"},"avianex":{"type":"fab","name":"avianex","unicode":"\\f374"},"aviato":{"type":"fab","name":"aviato","unicode":"\\f421"},"award":{"type":"fas","name":"award","unicode":"\\f559"},"aws":{"type":"fab","name":"aws","unicode":"\\f375"},"baby":{"type":"fas","name":"baby","unicode":"\\f77c"},"baby-carriage":{"type":"fas","name":"baby-carriage","unicode":"\\f77d"},"backspace":{"type":"fas","name":"backspace","unicode":"\\f55a"},"backward":{"type":"fas","name":"backward","unicode":"\\f04a"},"bacon":{"type":"fas","name":"bacon","unicode":"\\f7e5"},"bacteria":{"type":"fas","name":"bacteria","unicode":"\\e059"},"bacterium":{"type":"fas","name":"bacterium","unicode":"\\e05a"},"bahai":{"type":"fas","name":"bahai","unicode":"\\f666"},"balance-scale":{"type":"fas","name":"balance-scale","unicode":"\\f24e"},"balance-scale-left":{"type":"fas","name":"balance-scale-left","unicode":"\\f515"},"balance-scale-right":{"type":"fas","name":"balance-scale-right","unicode":"\\f516"},"ban":{"type":"fas","name":"ban","unicode":"\\f05e"},"band-aid":{"type":"fas","name":"band-aid","unicode":"\\f462"},"bandcamp":{"type":"fab","name":"bandcamp","unicode":"\\f2d5"},"barcode":{"type":"fas","name":"barcode","unicode":"\\f02a"},"bars":{"type":"fas","name":"bars","unicode":"\\f0c9"},"baseball-ball":{"type":"fas","name":"baseball-ball","unicode":"\\f433"},"basketball-ball":{"type":"fas","name":"basketball-ball","unicode":"\\f434"},"bath":{"type":"fas","name":"bath","unicode":"\\f2cd"},"battery-empty":{"type":"fas","name":"battery-empty","unicode":"\\f244"},"battery-full":{"type":"fas","name":"battery-full","unicode":"\\f240"},"battery-half":{"type":"fas","name":"battery-half","unicode":"\\f242"},"battery-quarter":{"type":"fas","name":"battery-quarter","unicode":"\\f243"},"battery-three-quarters":{"type":"fas","name":"battery-three-quarters","unicode":"\\f241"},"battle-net":{"type":"fab","name":"battle-net","unicode":"\\f835"},"bed":{"type":"fas","name":"bed","unicode":"\\f236"},"beer":{"type":"fas","name":"beer","unicode":"\\f0fc"},"behance":{"type":"fab","name":"behance","unicode":"\\f1b4"},"behance-square":{"type":"fab","name":"behance-square","unicode":"\\f1b5"},"bell":{"type":"fas","name":"bell","unicode":"\\f0f3"},"bell-slash":{"type":"fas","name":"bell-slash","unicode":"\\f1f6"},"bezier-curve":{"type":"fas","name":"bezier-curve","unicode":"\\f55b"},"bible":{"type":"fas","name":"bible","unicode":"\\f647"},"bicycle":{"type":"fas","name":"bicycle","unicode":"\\f206"},"biking":{"type":"fas","name":"biking","unicode":"\\f84a"},"bimobject":{"type":"fab","name":"bimobject","unicode":"\\f378"},"binoculars":{"type":"fas","name":"binoculars","unicode":"\\f1e5"},"biohazard":{"type":"fas","name":"biohazard","unicode":"\\f780"},"birthday-cake":{"type":"fas","name":"birthday-cake","unicode":"\\f1fd"},"bitbucket":{"type":"fab","name":"bitbucket","unicode":"\\f171"},"bitcoin":{"type":"fab","name":"bitcoin","unicode":"\\f379"},"bity":{"type":"fab","name":"bity","unicode":"\\f37a"},"black-tie":{"type":"fab","name":"black-tie","unicode":"\\f27e"},"blackberry":{"type":"fab","name":"blackberry","unicode":"\\f37b"},"blender":{"type":"fas","name":"blender","unicode":"\\f517"},"blender-phone":{"type":"fas","name":"blender-phone","unicode":"\\f6b6"},"blind":{"type":"fas","name":"blind","unicode":"\\f29d"},"blog":{"type":"fas","name":"blog","unicode":"\\f781"},"blogger":{"type":"fab","name":"blogger","unicode":"\\f37c"},"blogger-b":{"type":"fab","name":"blogger-b","unicode":"\\f37d"},"bluetooth":{"type":"fab","name":"bluetooth","unicode":"\\f293"},"bluetooth-b":{"type":"fab","name":"bluetooth-b","unicode":"\\f294"},"bold":{"type":"fas","name":"bold","unicode":"\\f032"},"bolt":{"type":"fas","name":"bolt","unicode":"\\f0e7"},"bomb":{"type":"fas","name":"bomb","unicode":"\\f1e2"},"bone":{"type":"fas","name":"bone","unicode":"\\f5d7"},"bong":{"type":"fas","name":"bong","unicode":"\\f55c"},"book":{"type":"fas","name":"book","unicode":"\\f02d"},"book-dead":{"type":"fas","name":"book-dead","unicode":"\\f6b7"},"book-medical":{"type":"fas","name":"book-medical","unicode":"\\f7e6"},"book-open":{"type":"fas","name":"book-open","unicode":"\\f518"},"book-reader":{"type":"fas","name":"book-reader","unicode":"\\f5da"},"bookmark":{"type":"fas","name":"bookmark","unicode":"\\f02e"},"bootstrap":{"type":"fab","name":"bootstrap","unicode":"\\f836"},"border-all":{"type":"fas","name":"border-all","unicode":"\\f84c"},"border-none":{"type":"fas","name":"border-none","unicode":"\\f850"},"border-style":{"type":"fas","name":"border-style","unicode":"\\f853"},"bowling-ball":{"type":"fas","name":"bowling-ball","unicode":"\\f436"},"box":{"type":"fas","name":"box","unicode":"\\f466"},"box-open":{"type":"fas","name":"box-open","unicode":"\\f49e"},"box-tissue":{"type":"fas","name":"box-tissue","unicode":"\\e05b"},"boxes":{"type":"fas","name":"boxes","unicode":"\\f468"},"braille":{"type":"fas","name":"braille","unicode":"\\f2a1"},"brain":{"type":"fas","name":"brain","unicode":"\\f5dc"},"bread-slice":{"type":"fas","name":"bread-slice","unicode":"\\f7ec"},"briefcase":{"type":"fas","name":"briefcase","unicode":"\\f0b1"},"briefcase-medical":{"type":"fas","name":"briefcase-medical","unicode":"\\f469"},"broadcast-tower":{"type":"fas","name":"broadcast-tower","unicode":"\\f519"},"broom":{"type":"fas","name":"broom","unicode":"\\f51a"},"brush":{"type":"fas","name":"brush","unicode":"\\f55d"},"btc":{"type":"fab","name":"btc","unicode":"\\f15a"},"buffer":{"type":"fab","name":"buffer","unicode":"\\f837"},"bug":{"type":"fas","name":"bug","unicode":"\\f188"},"building":{"type":"fas","name":"building","unicode":"\\f1ad"},"bullhorn":{"type":"fas","name":"bullhorn","unicode":"\\f0a1"},"bullseye":{"type":"fas","name":"bullseye","unicode":"\\f140"},"burn":{"type":"fas","name":"burn","unicode":"\\f46a"},"buromobelexperte":{"type":"fab","name":"buromobelexperte","unicode":"\\f37f"},"bus":{"type":"fas","name":"bus","unicode":"\\f207"},"bus-alt":{"type":"fas","name":"bus-alt","unicode":"\\f55e"},"business-time":{"type":"fas","name":"business-time","unicode":"\\f64a"},"buy-n-large":{"type":"fab","name":"buy-n-large","unicode":"\\f8a6"},"buysellads":{"type":"fab","name":"buysellads","unicode":"\\f20d"},"calculator":{"type":"fas","name":"calculator","unicode":"\\f1ec"},"calendar":{"type":"fas","name":"calendar","unicode":"\\f133"},"calendar-alt":{"type":"fas","name":"calendar-alt","unicode":"\\f073"},"calendar-check":{"type":"fas","name":"calendar-check","unicode":"\\f274"},"calendar-day":{"type":"fas","name":"calendar-day","unicode":"\\f783"},"calendar-minus":{"type":"fas","name":"calendar-minus","unicode":"\\f272"},"calendar-plus":{"type":"fas","name":"calendar-plus","unicode":"\\f271"},"calendar-times":{"type":"fas","name":"calendar-times","unicode":"\\f273"},"calendar-week":{"type":"fas","name":"calendar-week","unicode":"\\f784"},"camera":{"type":"fas","name":"camera","unicode":"\\f030"},"camera-retro":{"type":"fas","name":"camera-retro","unicode":"\\f083"},"campground":{"type":"fas","name":"campground","unicode":"\\f6bb"},"canadian-maple-leaf":{"type":"fab","name":"canadian-maple-leaf","unicode":"\\f785"},"candy-cane":{"type":"fas","name":"candy-cane","unicode":"\\f786"},"cannabis":{"type":"fas","name":"cannabis","unicode":"\\f55f"},"capsules":{"type":"fas","name":"capsules","unicode":"\\f46b"},"car":{"type":"fas","name":"car","unicode":"\\f1b9"},"car-alt":{"type":"fas","name":"car-alt","unicode":"\\f5de"},"car-battery":{"type":"fas","name":"car-battery","unicode":"\\f5df"},"car-crash":{"type":"fas","name":"car-crash","unicode":"\\f5e1"},"car-side":{"type":"fas","name":"car-side","unicode":"\\f5e4"},"caravan":{"type":"fas","name":"caravan","unicode":"\\f8ff"},"caret-down":{"type":"fas","name":"caret-down","unicode":"\\f0d7"},"caret-left":{"type":"fas","name":"caret-left","unicode":"\\f0d9"},"caret-right":{"type":"fas","name":"caret-right","unicode":"\\f0da"},"caret-square-down":{"type":"fas","name":"caret-square-down","unicode":"\\f150"},"caret-square-left":{"type":"fas","name":"caret-square-left","unicode":"\\f191"},"caret-square-right":{"type":"fas","name":"caret-square-right","unicode":"\\f152"},"caret-square-up":{"type":"fas","name":"caret-square-up","unicode":"\\f151"},"caret-up":{"type":"fas","name":"caret-up","unicode":"\\f0d8"},"carrot":{"type":"fas","name":"carrot","unicode":"\\f787"},"cart-arrow-down":{"type":"fas","name":"cart-arrow-down","unicode":"\\f218"},"cart-plus":{"type":"fas","name":"cart-plus","unicode":"\\f217"},"cash-register":{"type":"fas","name":"cash-register","unicode":"\\f788"},"cat":{"type":"fas","name":"cat","unicode":"\\f6be"},"cc-amazon-pay":{"type":"fab","name":"cc-amazon-pay","unicode":"\\f42d"},"cc-amex":{"type":"fab","name":"cc-amex","unicode":"\\f1f3"},"cc-apple-pay":{"type":"fab","name":"cc-apple-pay","unicode":"\\f416"},"cc-diners-club":{"type":"fab","name":"cc-diners-club","unicode":"\\f24c"},"cc-discover":{"type":"fab","name":"cc-discover","unicode":"\\f1f2"},"cc-jcb":{"type":"fab","name":"cc-jcb","unicode":"\\f24b"},"cc-mastercard":{"type":"fab","name":"cc-mastercard","unicode":"\\f1f1"},"cc-paypal":{"type":"fab","name":"cc-paypal","unicode":"\\f1f4"},"cc-stripe":{"type":"fab","name":"cc-stripe","unicode":"\\f1f5"},"cc-visa":{"type":"fab","name":"cc-visa","unicode":"\\f1f0"},"centercode":{"type":"fab","name":"centercode","unicode":"\\f380"},"centos":{"type":"fab","name":"centos","unicode":"\\f789"},"certificate":{"type":"fas","name":"certificate","unicode":"\\f0a3"},"chair":{"type":"fas","name":"chair","unicode":"\\f6c0"},"chalkboard":{"type":"fas","name":"chalkboard","unicode":"\\f51b"},"chalkboard-teacher":{"type":"fas","name":"chalkboard-teacher","unicode":"\\f51c"},"charging-station":{"type":"fas","name":"charging-station","unicode":"\\f5e7"},"chart-area":{"type":"fas","name":"chart-area","unicode":"\\f1fe"},"chart-bar":{"type":"fas","name":"chart-bar","unicode":"\\f080"},"chart-line":{"type":"fas","name":"chart-line","unicode":"\\f201"},"chart-pie":{"type":"fas","name":"chart-pie","unicode":"\\f200"},"check":{"type":"fas","name":"check","unicode":"\\f00c"},"check-circle":{"type":"fas","name":"check-circle","unicode":"\\f058"},"check-double":{"type":"fas","name":"check-double","unicode":"\\f560"},"check-square":{"type":"fas","name":"check-square","unicode":"\\f14a"},"cheese":{"type":"fas","name":"cheese","unicode":"\\f7ef"},"chess":{"type":"fas","name":"chess","unicode":"\\f439"},"chess-bishop":{"type":"fas","name":"chess-bishop","unicode":"\\f43a"},"chess-board":{"type":"fas","name":"chess-board","unicode":"\\f43c"},"chess-king":{"type":"fas","name":"chess-king","unicode":"\\f43f"},"chess-knight":{"type":"fas","name":"chess-knight","unicode":"\\f441"},"chess-pawn":{"type":"fas","name":"chess-pawn","unicode":"\\f443"},"chess-queen":{"type":"fas","name":"chess-queen","unicode":"\\f445"},"chess-rook":{"type":"fas","name":"chess-rook","unicode":"\\f447"},"chevron-circle-down":{"type":"fas","name":"chevron-circle-down","unicode":"\\f13a"},"chevron-circle-left":{"type":"fas","name":"chevron-circle-left","unicode":"\\f137"},"chevron-circle-right":{"type":"fas","name":"chevron-circle-right","unicode":"\\f138"},"chevron-circle-up":{"type":"fas","name":"chevron-circle-up","unicode":"\\f139"},"chevron-down":{"type":"fas","name":"chevron-down","unicode":"\\f078"},"chevron-left":{"type":"fas","name":"chevron-left","unicode":"\\f053"},"chevron-right":{"type":"fas","name":"chevron-right","unicode":"\\f054"},"chevron-up":{"type":"fas","name":"chevron-up","unicode":"\\f077"},"child":{"type":"fas","name":"child","unicode":"\\f1ae"},"chrome":{"type":"fab","name":"chrome","unicode":"\\f268"},"chromecast":{"type":"fab","name":"chromecast","unicode":"\\f838"},"church":{"type":"fas","name":"church","unicode":"\\f51d"},"circle":{"type":"fas","name":"circle","unicode":"\\f111"},"circle-notch":{"type":"fas","name":"circle-notch","unicode":"\\f1ce"},"city":{"type":"fas","name":"city","unicode":"\\f64f"},"clinic-medical":{"type":"fas","name":"clinic-medical","unicode":"\\f7f2"},"clipboard":{"type":"fas","name":"clipboard","unicode":"\\f328"},"clipboard-check":{"type":"fas","name":"clipboard-check","unicode":"\\f46c"},"clipboard-list":{"type":"fas","name":"clipboard-list","unicode":"\\f46d"},"clock":{"type":"fas","name":"clock","unicode":"\\f017"},"clone":{"type":"fas","name":"clone","unicode":"\\f24d"},"closed-captioning":{"type":"fas","name":"closed-captioning","unicode":"\\f20a"},"cloud":{"type":"fas","name":"cloud","unicode":"\\f0c2"},"cloud-download-alt":{"type":"fas","name":"cloud-download-alt","unicode":"\\f381"},"cloud-meatball":{"type":"fas","name":"cloud-meatball","unicode":"\\f73b"},"cloud-moon":{"type":"fas","name":"cloud-moon","unicode":"\\f6c3"},"cloud-moon-rain":{"type":"fas","name":"cloud-moon-rain","unicode":"\\f73c"},"cloud-rain":{"type":"fas","name":"cloud-rain","unicode":"\\f73d"},"cloud-showers-heavy":{"type":"fas","name":"cloud-showers-heavy","unicode":"\\f740"},"cloud-sun":{"type":"fas","name":"cloud-sun","unicode":"\\f6c4"},"cloud-sun-rain":{"type":"fas","name":"cloud-sun-rain","unicode":"\\f743"},"cloud-upload-alt":{"type":"fas","name":"cloud-upload-alt","unicode":"\\f382"},"cloudflare":{"type":"fab","name":"cloudflare","unicode":"\\e07d"},"cloudscale":{"type":"fab","name":"cloudscale","unicode":"\\f383"},"cloudsmith":{"type":"fab","name":"cloudsmith","unicode":"\\f384"},"cloudversify":{"type":"fab","name":"cloudversify","unicode":"\\f385"},"cocktail":{"type":"fas","name":"cocktail","unicode":"\\f561"},"code":{"type":"fas","name":"code","unicode":"\\f121"},"code-branch":{"type":"fas","name":"code-branch","unicode":"\\f126"},"codepen":{"type":"fab","name":"codepen","unicode":"\\f1cb"},"codiepie":{"type":"fab","name":"codiepie","unicode":"\\f284"},"coffee":{"type":"fas","name":"coffee","unicode":"\\f0f4"},"cog":{"type":"fas","name":"cog","unicode":"\\f013"},"cogs":{"type":"fas","name":"cogs","unicode":"\\f085"},"coins":{"type":"fas","name":"coins","unicode":"\\f51e"},"columns":{"type":"fas","name":"columns","unicode":"\\f0db"},"comment":{"type":"fas","name":"comment","unicode":"\\f075"},"comment-alt":{"type":"fas","name":"comment-alt","unicode":"\\f27a"},"comment-dollar":{"type":"fas","name":"comment-dollar","unicode":"\\f651"},"comment-dots":{"type":"fas","name":"comment-dots","unicode":"\\f4ad"},"comment-medical":{"type":"fas","name":"comment-medical","unicode":"\\f7f5"},"comment-slash":{"type":"fas","name":"comment-slash","unicode":"\\f4b3"},"comments":{"type":"fas","name":"comments","unicode":"\\f086"},"comments-dollar":{"type":"fas","name":"comments-dollar","unicode":"\\f653"},"compact-disc":{"type":"fas","name":"compact-disc","unicode":"\\f51f"},"compass":{"type":"fas","name":"compass","unicode":"\\f14e"},"compress":{"type":"fas","name":"compress","unicode":"\\f066"},"compress-alt":{"type":"fas","name":"compress-alt","unicode":"\\f422"},"compress-arrows-alt":{"type":"fas","name":"compress-arrows-alt","unicode":"\\f78c"},"concierge-bell":{"type":"fas","name":"concierge-bell","unicode":"\\f562"},"confluence":{"type":"fab","name":"confluence","unicode":"\\f78d"},"connectdevelop":{"type":"fab","name":"connectdevelop","unicode":"\\f20e"},"contao":{"type":"fab","name":"contao","unicode":"\\f26d"},"cookie":{"type":"fas","name":"cookie","unicode":"\\f563"},"cookie-bite":{"type":"fas","name":"cookie-bite","unicode":"\\f564"},"copy":{"type":"fas","name":"copy","unicode":"\\f0c5"},"copyright":{"type":"fas","name":"copyright","unicode":"\\f1f9"},"cotton-bureau":{"type":"fab","name":"cotton-bureau","unicode":"\\f89e"},"couch":{"type":"fas","name":"couch","unicode":"\\f4b8"},"cpanel":{"type":"fab","name":"cpanel","unicode":"\\f388"},"creative-commons":{"type":"fab","name":"creative-commons","unicode":"\\f25e"},"creative-commons-by":{"type":"fab","name":"creative-commons-by","unicode":"\\f4e7"},"creative-commons-nc":{"type":"fab","name":"creative-commons-nc","unicode":"\\f4e8"},"creative-commons-nc-eu":{"type":"fab","name":"creative-commons-nc-eu","unicode":"\\f4e9"},"creative-commons-nc-jp":{"type":"fab","name":"creative-commons-nc-jp","unicode":"\\f4ea"},"creative-commons-nd":{"type":"fab","name":"creative-commons-nd","unicode":"\\f4eb"},"creative-commons-pd":{"type":"fab","name":"creative-commons-pd","unicode":"\\f4ec"},"creative-commons-pd-alt":{"type":"fab","name":"creative-commons-pd-alt","unicode":"\\f4ed"},"creative-commons-remix":{"type":"fab","name":"creative-commons-remix","unicode":"\\f4ee"},"creative-commons-sa":{"type":"fab","name":"creative-commons-sa","unicode":"\\f4ef"},"creative-commons-sampling":{"type":"fab","name":"creative-commons-sampling","unicode":"\\f4f0"},"creative-commons-sampling-plus":{"type":"fab","name":"creative-commons-sampling-plus","unicode":"\\f4f1"},"creative-commons-share":{"type":"fab","name":"creative-commons-share","unicode":"\\f4f2"},"creative-commons-zero":{"type":"fab","name":"creative-commons-zero","unicode":"\\f4f3"},"credit-card":{"type":"fas","name":"credit-card","unicode":"\\f09d"},"critical-role":{"type":"fab","name":"critical-role","unicode":"\\f6c9"},"crop":{"type":"fas","name":"crop","unicode":"\\f125"},"crop-alt":{"type":"fas","name":"crop-alt","unicode":"\\f565"},"cross":{"type":"fas","name":"cross","unicode":"\\f654"},"crosshairs":{"type":"fas","name":"crosshairs","unicode":"\\f05b"},"crow":{"type":"fas","name":"crow","unicode":"\\f520"},"crown":{"type":"fas","name":"crown","unicode":"\\f521"},"crutch":{"type":"fas","name":"crutch","unicode":"\\f7f7"},"css3":{"type":"fab","name":"css3","unicode":"\\f13c"},"css3-alt":{"type":"fab","name":"css3-alt","unicode":"\\f38b"},"cube":{"type":"fas","name":"cube","unicode":"\\f1b2"},"cubes":{"type":"fas","name":"cubes","unicode":"\\f1b3"},"cut":{"type":"fas","name":"cut","unicode":"\\f0c4"},"cuttlefish":{"type":"fab","name":"cuttlefish","unicode":"\\f38c"},"d-and-d":{"type":"fab","name":"d-and-d","unicode":"\\f38d"},"d-and-d-beyond":{"type":"fab","name":"d-and-d-beyond","unicode":"\\f6ca"},"dailymotion":{"type":"fab","name":"dailymotion","unicode":"\\e052"},"dashcube":{"type":"fab","name":"dashcube","unicode":"\\f210"},"database":{"type":"fas","name":"database","unicode":"\\f1c0"},"deaf":{"type":"fas","name":"deaf","unicode":"\\f2a4"},"deezer":{"type":"fab","name":"deezer","unicode":"\\e077"},"delicious":{"type":"fab","name":"delicious","unicode":"\\f1a5"},"democrat":{"type":"fas","name":"democrat","unicode":"\\f747"},"deploydog":{"type":"fab","name":"deploydog","unicode":"\\f38e"},"deskpro":{"type":"fab","name":"deskpro","unicode":"\\f38f"},"desktop":{"type":"fas","name":"desktop","unicode":"\\f108"},"dev":{"type":"fab","name":"dev","unicode":"\\f6cc"},"deviantart":{"type":"fab","name":"deviantart","unicode":"\\f1bd"},"dharmachakra":{"type":"fas","name":"dharmachakra","unicode":"\\f655"},"dhl":{"type":"fab","name":"dhl","unicode":"\\f790"},"diagnoses":{"type":"fas","name":"diagnoses","unicode":"\\f470"},"diaspora":{"type":"fab","name":"diaspora","unicode":"\\f791"},"dice":{"type":"fas","name":"dice","unicode":"\\f522"},"dice-d20":{"type":"fas","name":"dice-d20","unicode":"\\f6cf"},"dice-d6":{"type":"fas","name":"dice-d6","unicode":"\\f6d1"},"dice-five":{"type":"fas","name":"dice-five","unicode":"\\f523"},"dice-four":{"type":"fas","name":"dice-four","unicode":"\\f524"},"dice-one":{"type":"fas","name":"dice-one","unicode":"\\f525"},"dice-six":{"type":"fas","name":"dice-six","unicode":"\\f526"},"dice-three":{"type":"fas","name":"dice-three","unicode":"\\f527"},"dice-two":{"type":"fas","name":"dice-two","unicode":"\\f528"},"digg":{"type":"fab","name":"digg","unicode":"\\f1a6"},"digital-ocean":{"type":"fab","name":"digital-ocean","unicode":"\\f391"},"digital-tachograph":{"type":"fas","name":"digital-tachograph","unicode":"\\f566"},"directions":{"type":"fas","name":"directions","unicode":"\\f5eb"},"discord":{"type":"fab","name":"discord","unicode":"\\f392"},"discourse":{"type":"fab","name":"discourse","unicode":"\\f393"},"disease":{"type":"fas","name":"disease","unicode":"\\f7fa"},"divide":{"type":"fas","name":"divide","unicode":"\\f529"},"dizzy":{"type":"fas","name":"dizzy","unicode":"\\f567"},"dna":{"type":"fas","name":"dna","unicode":"\\f471"},"dochub":{"type":"fab","name":"dochub","unicode":"\\f394"},"docker":{"type":"fab","name":"docker","unicode":"\\f395"},"dog":{"type":"fas","name":"dog","unicode":"\\f6d3"},"dollar-sign":{"type":"fas","name":"dollar-sign","unicode":"\\f155"},"dolly":{"type":"fas","name":"dolly","unicode":"\\f472"},"dolly-flatbed":{"type":"fas","name":"dolly-flatbed","unicode":"\\f474"},"donate":{"type":"fas","name":"donate","unicode":"\\f4b9"},"door-closed":{"type":"fas","name":"door-closed","unicode":"\\f52a"},"door-open":{"type":"fas","name":"door-open","unicode":"\\f52b"},"dot-circle":{"type":"fas","name":"dot-circle","unicode":"\\f192"},"dove":{"type":"fas","name":"dove","unicode":"\\f4ba"},"download":{"type":"fas","name":"download","unicode":"\\f019"},"draft2digital":{"type":"fab","name":"draft2digital","unicode":"\\f396"},"drafting-compass":{"type":"fas","name":"drafting-compass","unicode":"\\f568"},"dragon":{"type":"fas","name":"dragon","unicode":"\\f6d5"},"draw-polygon":{"type":"fas","name":"draw-polygon","unicode":"\\f5ee"},"dribbble":{"type":"fab","name":"dribbble","unicode":"\\f17d"},"dribbble-square":{"type":"fab","name":"dribbble-square","unicode":"\\f397"},"dropbox":{"type":"fab","name":"dropbox","unicode":"\\f16b"},"drum":{"type":"fas","name":"drum","unicode":"\\f569"},"drum-steelpan":{"type":"fas","name":"drum-steelpan","unicode":"\\f56a"},"drumstick-bite":{"type":"fas","name":"drumstick-bite","unicode":"\\f6d7"},"drupal":{"type":"fab","name":"drupal","unicode":"\\f1a9"},"dumbbell":{"type":"fas","name":"dumbbell","unicode":"\\f44b"},"dumpster":{"type":"fas","name":"dumpster","unicode":"\\f793"},"dumpster-fire":{"type":"fas","name":"dumpster-fire","unicode":"\\f794"},"dungeon":{"type":"fas","name":"dungeon","unicode":"\\f6d9"},"dyalog":{"type":"fab","name":"dyalog","unicode":"\\f399"},"earlybirds":{"type":"fab","name":"earlybirds","unicode":"\\f39a"},"ebay":{"type":"fab","name":"ebay","unicode":"\\f4f4"},"edge":{"type":"fab","name":"edge","unicode":"\\f282"},"edge-legacy":{"type":"fab","name":"edge-legacy","unicode":"\\e078"},"edit":{"type":"fas","name":"edit","unicode":"\\f044"},"egg":{"type":"fas","name":"egg","unicode":"\\f7fb"},"eject":{"type":"fas","name":"eject","unicode":"\\f052"},"elementor":{"type":"fab","name":"elementor","unicode":"\\f430"},"ellipsis-h":{"type":"fas","name":"ellipsis-h","unicode":"\\f141"},"ellipsis-v":{"type":"fas","name":"ellipsis-v","unicode":"\\f142"},"ello":{"type":"fab","name":"ello","unicode":"\\f5f1"},"ember":{"type":"fab","name":"ember","unicode":"\\f423"},"empire":{"type":"fab","name":"empire","unicode":"\\f1d1"},"envelope":{"type":"fas","name":"envelope","unicode":"\\f0e0"},"envelope-open":{"type":"fas","name":"envelope-open","unicode":"\\f2b6"},"envelope-open-text":{"type":"fas","name":"envelope-open-text","unicode":"\\f658"},"envelope-square":{"type":"fas","name":"envelope-square","unicode":"\\f199"},"envira":{"type":"fab","name":"envira","unicode":"\\f299"},"equals":{"type":"fas","name":"equals","unicode":"\\f52c"},"eraser":{"type":"fas","name":"eraser","unicode":"\\f12d"},"erlang":{"type":"fab","name":"erlang","unicode":"\\f39d"},"ethereum":{"type":"fab","name":"ethereum","unicode":"\\f42e"},"ethernet":{"type":"fas","name":"ethernet","unicode":"\\f796"},"etsy":{"type":"fab","name":"etsy","unicode":"\\f2d7"},"euro-sign":{"type":"fas","name":"euro-sign","unicode":"\\f153"},"evernote":{"type":"fab","name":"evernote","unicode":"\\f839"},"exchange-alt":{"type":"fas","name":"exchange-alt","unicode":"\\f362"},"exclamation":{"type":"fas","name":"exclamation","unicode":"\\f12a"},"exclamation-circle":{"type":"fas","name":"exclamation-circle","unicode":"\\f06a"},"exclamation-triangle":{"type":"fas","name":"exclamation-triangle","unicode":"\\f071"},"expand":{"type":"fas","name":"expand","unicode":"\\f065"},"expand-alt":{"type":"fas","name":"expand-alt","unicode":"\\f424"},"expand-arrows-alt":{"type":"fas","name":"expand-arrows-alt","unicode":"\\f31e"},"expeditedssl":{"type":"fab","name":"expeditedssl","unicode":"\\f23e"},"external-link-alt":{"type":"fas","name":"external-link-alt","unicode":"\\f35d"},"external-link-square-alt":{"type":"fas","name":"external-link-square-alt","unicode":"\\f360"},"eye":{"type":"fas","name":"eye","unicode":"\\f06e"},"eye-dropper":{"type":"fas","name":"eye-dropper","unicode":"\\f1fb"},"eye-slash":{"type":"fas","name":"eye-slash","unicode":"\\f070"},"facebook":{"type":"fab","name":"facebook","unicode":"\\f09a"},"facebook-f":{"type":"fab","name":"facebook-f","unicode":"\\f39e"},"facebook-messenger":{"type":"fab","name":"facebook-messenger","unicode":"\\f39f"},"facebook-square":{"type":"fab","name":"facebook-square","unicode":"\\f082"},"fan":{"type":"fas","name":"fan","unicode":"\\f863"},"fantasy-flight-games":{"type":"fab","name":"fantasy-flight-games","unicode":"\\f6dc"},"fast-backward":{"type":"fas","name":"fast-backward","unicode":"\\f049"},"fast-forward":{"type":"fas","name":"fast-forward","unicode":"\\f050"},"faucet":{"type":"fas","name":"faucet","unicode":"\\e005"},"fax":{"type":"fas","name":"fax","unicode":"\\f1ac"},"feather":{"type":"fas","name":"feather","unicode":"\\f52d"},"feather-alt":{"type":"fas","name":"feather-alt","unicode":"\\f56b"},"fedex":{"type":"fab","name":"fedex","unicode":"\\f797"},"fedora":{"type":"fab","name":"fedora","unicode":"\\f798"},"female":{"type":"fas","name":"female","unicode":"\\f182"},"fighter-jet":{"type":"fas","name":"fighter-jet","unicode":"\\f0fb"},"figma":{"type":"fab","name":"figma","unicode":"\\f799"},"file":{"type":"fas","name":"file","unicode":"\\f15b"},"file-alt":{"type":"fas","name":"file-alt","unicode":"\\f15c"},"file-archive":{"type":"fas","name":"file-archive","unicode":"\\f1c6"},"file-audio":{"type":"fas","name":"file-audio","unicode":"\\f1c7"},"file-code":{"type":"fas","name":"file-code","unicode":"\\f1c9"},"file-contract":{"type":"fas","name":"file-contract","unicode":"\\f56c"},"file-csv":{"type":"fas","name":"file-csv","unicode":"\\f6dd"},"file-download":{"type":"fas","name":"file-download","unicode":"\\f56d"},"file-excel":{"type":"fas","name":"file-excel","unicode":"\\f1c3"},"file-export":{"type":"fas","name":"file-export","unicode":"\\f56e"},"file-image":{"type":"fas","name":"file-image","unicode":"\\f1c5"},"file-import":{"type":"fas","name":"file-import","unicode":"\\f56f"},"file-invoice":{"type":"fas","name":"file-invoice","unicode":"\\f570"},"file-invoice-dollar":{"type":"fas","name":"file-invoice-dollar","unicode":"\\f571"},"file-medical":{"type":"fas","name":"file-medical","unicode":"\\f477"},"file-medical-alt":{"type":"fas","name":"file-medical-alt","unicode":"\\f478"},"file-pdf":{"type":"fas","name":"file-pdf","unicode":"\\f1c1"},"file-powerpoint":{"type":"fas","name":"file-powerpoint","unicode":"\\f1c4"},"file-prescription":{"type":"fas","name":"file-prescription","unicode":"\\f572"},"file-signature":{"type":"fas","name":"file-signature","unicode":"\\f573"},"file-upload":{"type":"fas","name":"file-upload","unicode":"\\f574"},"file-video":{"type":"fas","name":"file-video","unicode":"\\f1c8"},"file-word":{"type":"fas","name":"file-word","unicode":"\\f1c2"},"fill":{"type":"fas","name":"fill","unicode":"\\f575"},"fill-drip":{"type":"fas","name":"fill-drip","unicode":"\\f576"},"film":{"type":"fas","name":"film","unicode":"\\f008"},"filter":{"type":"fas","name":"filter","unicode":"\\f0b0"},"fingerprint":{"type":"fas","name":"fingerprint","unicode":"\\f577"},"fire":{"type":"fas","name":"fire","unicode":"\\f06d"},"fire-alt":{"type":"fas","name":"fire-alt","unicode":"\\f7e4"},"fire-extinguisher":{"type":"fas","name":"fire-extinguisher","unicode":"\\f134"},"firefox":{"type":"fab","name":"firefox","unicode":"\\f269"},"firefox-browser":{"type":"fab","name":"firefox-browser","unicode":"\\e007"},"first-aid":{"type":"fas","name":"first-aid","unicode":"\\f479"},"first-order":{"type":"fab","name":"first-order","unicode":"\\f2b0"},"first-order-alt":{"type":"fab","name":"first-order-alt","unicode":"\\f50a"},"firstdraft":{"type":"fab","name":"firstdraft","unicode":"\\f3a1"},"fish":{"type":"fas","name":"fish","unicode":"\\f578"},"fist-raised":{"type":"fas","name":"fist-raised","unicode":"\\f6de"},"flag":{"type":"fas","name":"flag","unicode":"\\f024"},"flag-checkered":{"type":"fas","name":"flag-checkered","unicode":"\\f11e"},"flag-usa":{"type":"fas","name":"flag-usa","unicode":"\\f74d"},"flask":{"type":"fas","name":"flask","unicode":"\\f0c3"},"flickr":{"type":"fab","name":"flickr","unicode":"\\f16e"},"flipboard":{"type":"fab","name":"flipboard","unicode":"\\f44d"},"flushed":{"type":"fas","name":"flushed","unicode":"\\f579"},"fly":{"type":"fab","name":"fly","unicode":"\\f417"},"folder":{"type":"fas","name":"folder","unicode":"\\f07b"},"folder-minus":{"type":"fas","name":"folder-minus","unicode":"\\f65d"},"folder-open":{"type":"fas","name":"folder-open","unicode":"\\f07c"},"folder-plus":{"type":"fas","name":"folder-plus","unicode":"\\f65e"},"font":{"type":"fas","name":"font","unicode":"\\f031"},"font-awesome":{"type":"fab","name":"font-awesome","unicode":"\\f2b4"},"font-awesome-alt":{"type":"fab","name":"font-awesome-alt","unicode":"\\f35c"},"font-awesome-flag":{"type":"fab","name":"font-awesome-flag","unicode":"\\f425"},"fonticons":{"type":"fab","name":"fonticons","unicode":"\\f280"},"fonticons-fi":{"type":"fab","name":"fonticons-fi","unicode":"\\f3a2"},"football-ball":{"type":"fas","name":"football-ball","unicode":"\\f44e"},"fort-awesome":{"type":"fab","name":"fort-awesome","unicode":"\\f286"},"fort-awesome-alt":{"type":"fab","name":"fort-awesome-alt","unicode":"\\f3a3"},"forumbee":{"type":"fab","name":"forumbee","unicode":"\\f211"},"forward":{"type":"fas","name":"forward","unicode":"\\f04e"},"foursquare":{"type":"fab","name":"foursquare","unicode":"\\f180"},"free-code-camp":{"type":"fab","name":"free-code-camp","unicode":"\\f2c5"},"freebsd":{"type":"fab","name":"freebsd","unicode":"\\f3a4"},"frog":{"type":"fas","name":"frog","unicode":"\\f52e"},"frown":{"type":"fas","name":"frown","unicode":"\\f119"},"frown-open":{"type":"fas","name":"frown-open","unicode":"\\f57a"},"fulcrum":{"type":"fab","name":"fulcrum","unicode":"\\f50b"},"funnel-dollar":{"type":"fas","name":"funnel-dollar","unicode":"\\f662"},"futbol":{"type":"fas","name":"futbol","unicode":"\\f1e3"},"galactic-republic":{"type":"fab","name":"galactic-republic","unicode":"\\f50c"},"galactic-senate":{"type":"fab","name":"galactic-senate","unicode":"\\f50d"},"gamepad":{"type":"fas","name":"gamepad","unicode":"\\f11b"},"gas-pump":{"type":"fas","name":"gas-pump","unicode":"\\f52f"},"gavel":{"type":"fas","name":"gavel","unicode":"\\f0e3"},"gem":{"type":"fas","name":"gem","unicode":"\\f3a5"},"genderless":{"type":"fas","name":"genderless","unicode":"\\f22d"},"get-pocket":{"type":"fab","name":"get-pocket","unicode":"\\f265"},"gg":{"type":"fab","name":"gg","unicode":"\\f260"},"gg-circle":{"type":"fab","name":"gg-circle","unicode":"\\f261"},"ghost":{"type":"fas","name":"ghost","unicode":"\\f6e2"},"gift":{"type":"fas","name":"gift","unicode":"\\f06b"},"gifts":{"type":"fas","name":"gifts","unicode":"\\f79c"},"git":{"type":"fab","name":"git","unicode":"\\f1d3"},"git-alt":{"type":"fab","name":"git-alt","unicode":"\\f841"},"git-square":{"type":"fab","name":"git-square","unicode":"\\f1d2"},"github":{"type":"fab","name":"github","unicode":"\\f09b"},"github-alt":{"type":"fab","name":"github-alt","unicode":"\\f113"},"github-square":{"type":"fab","name":"github-square","unicode":"\\f092"},"gitkraken":{"type":"fab","name":"gitkraken","unicode":"\\f3a6"},"gitlab":{"type":"fab","name":"gitlab","unicode":"\\f296"},"gitter":{"type":"fab","name":"gitter","unicode":"\\f426"},"glass-cheers":{"type":"fas","name":"glass-cheers","unicode":"\\f79f"},"glass-martini":{"type":"fas","name":"glass-martini","unicode":"\\f000"},"glass-martini-alt":{"type":"fas","name":"glass-martini-alt","unicode":"\\f57b"},"glass-whiskey":{"type":"fas","name":"glass-whiskey","unicode":"\\f7a0"},"glasses":{"type":"fas","name":"glasses","unicode":"\\f530"},"glide":{"type":"fab","name":"glide","unicode":"\\f2a5"},"glide-g":{"type":"fab","name":"glide-g","unicode":"\\f2a6"},"globe":{"type":"fas","name":"globe","unicode":"\\f0ac"},"globe-africa":{"type":"fas","name":"globe-africa","unicode":"\\f57c"},"globe-americas":{"type":"fas","name":"globe-americas","unicode":"\\f57d"},"globe-asia":{"type":"fas","name":"globe-asia","unicode":"\\f57e"},"globe-europe":{"type":"fas","name":"globe-europe","unicode":"\\f7a2"},"gofore":{"type":"fab","name":"gofore","unicode":"\\f3a7"},"golf-ball":{"type":"fas","name":"golf-ball","unicode":"\\f450"},"goodreads":{"type":"fab","name":"goodreads","unicode":"\\f3a8"},"goodreads-g":{"type":"fab","name":"goodreads-g","unicode":"\\f3a9"},"google":{"type":"fab","name":"google","unicode":"\\f1a0"},"google-drive":{"type":"fab","name":"google-drive","unicode":"\\f3aa"},"google-pay":{"type":"fab","name":"google-pay","unicode":"\\e079"},"google-play":{"type":"fab","name":"google-play","unicode":"\\f3ab"},"google-plus":{"type":"fab","name":"google-plus","unicode":"\\f2b3"},"google-plus-g":{"type":"fab","name":"google-plus-g","unicode":"\\f0d5"},"google-plus-square":{"type":"fab","name":"google-plus-square","unicode":"\\f0d4"},"google-wallet":{"type":"fab","name":"google-wallet","unicode":"\\f1ee"},"gopuram":{"type":"fas","name":"gopuram","unicode":"\\f664"},"graduation-cap":{"type":"fas","name":"graduation-cap","unicode":"\\f19d"},"gratipay":{"type":"fab","name":"gratipay","unicode":"\\f184"},"grav":{"type":"fab","name":"grav","unicode":"\\f2d6"},"greater-than":{"type":"fas","name":"greater-than","unicode":"\\f531"},"greater-than-equal":{"type":"fas","name":"greater-than-equal","unicode":"\\f532"},"grimace":{"type":"fas","name":"grimace","unicode":"\\f57f"},"grin":{"type":"fas","name":"grin","unicode":"\\f580"},"grin-alt":{"type":"fas","name":"grin-alt","unicode":"\\f581"},"grin-beam":{"type":"fas","name":"grin-beam","unicode":"\\f582"},"grin-beam-sweat":{"type":"fas","name":"grin-beam-sweat","unicode":"\\f583"},"grin-hearts":{"type":"fas","name":"grin-hearts","unicode":"\\f584"},"grin-squint":{"type":"fas","name":"grin-squint","unicode":"\\f585"},"grin-squint-tears":{"type":"fas","name":"grin-squint-tears","unicode":"\\f586"},"grin-stars":{"type":"fas","name":"grin-stars","unicode":"\\f587"},"grin-tears":{"type":"fas","name":"grin-tears","unicode":"\\f588"},"grin-tongue":{"type":"fas","name":"grin-tongue","unicode":"\\f589"},"grin-tongue-squint":{"type":"fas","name":"grin-tongue-squint","unicode":"\\f58a"},"grin-tongue-wink":{"type":"fas","name":"grin-tongue-wink","unicode":"\\f58b"},"grin-wink":{"type":"fas","name":"grin-wink","unicode":"\\f58c"},"grip-horizontal":{"type":"fas","name":"grip-horizontal","unicode":"\\f58d"},"grip-lines":{"type":"fas","name":"grip-lines","unicode":"\\f7a4"},"grip-lines-vertical":{"type":"fas","name":"grip-lines-vertical","unicode":"\\f7a5"},"grip-vertical":{"type":"fas","name":"grip-vertical","unicode":"\\f58e"},"gripfire":{"type":"fab","name":"gripfire","unicode":"\\f3ac"},"grunt":{"type":"fab","name":"grunt","unicode":"\\f3ad"},"guilded":{"type":"fab","name":"guilded","unicode":"\\e07e"},"guitar":{"type":"fas","name":"guitar","unicode":"\\f7a6"},"gulp":{"type":"fab","name":"gulp","unicode":"\\f3ae"},"h-square":{"type":"fas","name":"h-square","unicode":"\\f0fd"},"hacker-news":{"type":"fab","name":"hacker-news","unicode":"\\f1d4"},"hacker-news-square":{"type":"fab","name":"hacker-news-square","unicode":"\\f3af"},"hackerrank":{"type":"fab","name":"hackerrank","unicode":"\\f5f7"},"hamburger":{"type":"fas","name":"hamburger","unicode":"\\f805"},"hammer":{"type":"fas","name":"hammer","unicode":"\\f6e3"},"hamsa":{"type":"fas","name":"hamsa","unicode":"\\f665"},"hand-holding":{"type":"fas","name":"hand-holding","unicode":"\\f4bd"},"hand-holding-heart":{"type":"fas","name":"hand-holding-heart","unicode":"\\f4be"},"hand-holding-medical":{"type":"fas","name":"hand-holding-medical","unicode":"\\e05c"},"hand-holding-usd":{"type":"fas","name":"hand-holding-usd","unicode":"\\f4c0"},"hand-holding-water":{"type":"fas","name":"hand-holding-water","unicode":"\\f4c1"},"hand-lizard":{"type":"fas","name":"hand-lizard","unicode":"\\f258"},"hand-middle-finger":{"type":"fas","name":"hand-middle-finger","unicode":"\\f806"},"hand-paper":{"type":"fas","name":"hand-paper","unicode":"\\f256"},"hand-peace":{"type":"fas","name":"hand-peace","unicode":"\\f25b"},"hand-point-down":{"type":"fas","name":"hand-point-down","unicode":"\\f0a7"},"hand-point-left":{"type":"fas","name":"hand-point-left","unicode":"\\f0a5"},"hand-point-right":{"type":"fas","name":"hand-point-right","unicode":"\\f0a4"},"hand-point-up":{"type":"fas","name":"hand-point-up","unicode":"\\f0a6"},"hand-pointer":{"type":"fas","name":"hand-pointer","unicode":"\\f25a"},"hand-rock":{"type":"fas","name":"hand-rock","unicode":"\\f255"},"hand-scissors":{"type":"fas","name":"hand-scissors","unicode":"\\f257"},"hand-sparkles":{"type":"fas","name":"hand-sparkles","unicode":"\\e05d"},"hand-spock":{"type":"fas","name":"hand-spock","unicode":"\\f259"},"hands":{"type":"fas","name":"hands","unicode":"\\f4c2"},"hands-helping":{"type":"fas","name":"hands-helping","unicode":"\\f4c4"},"hands-wash":{"type":"fas","name":"hands-wash","unicode":"\\e05e"},"handshake":{"type":"fas","name":"handshake","unicode":"\\f2b5"},"handshake-alt-slash":{"type":"fas","name":"handshake-alt-slash","unicode":"\\e05f"},"handshake-slash":{"type":"fas","name":"handshake-slash","unicode":"\\e060"},"hanukiah":{"type":"fas","name":"hanukiah","unicode":"\\f6e6"},"hard-hat":{"type":"fas","name":"hard-hat","unicode":"\\f807"},"hashtag":{"type":"fas","name":"hashtag","unicode":"\\f292"},"hat-cowboy":{"type":"fas","name":"hat-cowboy","unicode":"\\f8c0"},"hat-cowboy-side":{"type":"fas","name":"hat-cowboy-side","unicode":"\\f8c1"},"hat-wizard":{"type":"fas","name":"hat-wizard","unicode":"\\f6e8"},"hdd":{"type":"fas","name":"hdd","unicode":"\\f0a0"},"head-side-cough":{"type":"fas","name":"head-side-cough","unicode":"\\e061"},"head-side-cough-slash":{"type":"fas","name":"head-side-cough-slash","unicode":"\\e062"},"head-side-mask":{"type":"fas","name":"head-side-mask","unicode":"\\e063"},"head-side-virus":{"type":"fas","name":"head-side-virus","unicode":"\\e064"},"heading":{"type":"fas","name":"heading","unicode":"\\f1dc"},"headphones":{"type":"fas","name":"headphones","unicode":"\\f025"},"headphones-alt":{"type":"fas","name":"headphones-alt","unicode":"\\f58f"},"headset":{"type":"fas","name":"headset","unicode":"\\f590"},"heart":{"type":"fas","name":"heart","unicode":"\\f004"},"heart-broken":{"type":"fas","name":"heart-broken","unicode":"\\f7a9"},"heartbeat":{"type":"fas","name":"heartbeat","unicode":"\\f21e"},"helicopter":{"type":"fas","name":"helicopter","unicode":"\\f533"},"highlighter":{"type":"fas","name":"highlighter","unicode":"\\f591"},"hiking":{"type":"fas","name":"hiking","unicode":"\\f6ec"},"hippo":{"type":"fas","name":"hippo","unicode":"\\f6ed"},"hips":{"type":"fab","name":"hips","unicode":"\\f452"},"hire-a-helper":{"type":"fab","name":"hire-a-helper","unicode":"\\f3b0"},"history":{"type":"fas","name":"history","unicode":"\\f1da"},"hive":{"type":"fab","name":"hive","unicode":"\\e07f"},"hockey-puck":{"type":"fas","name":"hockey-puck","unicode":"\\f453"},"holly-berry":{"type":"fas","name":"holly-berry","unicode":"\\f7aa"},"home":{"type":"fas","name":"home","unicode":"\\f015"},"hooli":{"type":"fab","name":"hooli","unicode":"\\f427"},"hornbill":{"type":"fab","name":"hornbill","unicode":"\\f592"},"horse":{"type":"fas","name":"horse","unicode":"\\f6f0"},"horse-head":{"type":"fas","name":"horse-head","unicode":"\\f7ab"},"hospital":{"type":"fas","name":"hospital","unicode":"\\f0f8"},"hospital-alt":{"type":"fas","name":"hospital-alt","unicode":"\\f47d"},"hospital-symbol":{"type":"fas","name":"hospital-symbol","unicode":"\\f47e"},"hospital-user":{"type":"fas","name":"hospital-user","unicode":"\\f80d"},"hot-tub":{"type":"fas","name":"hot-tub","unicode":"\\f593"},"hotdog":{"type":"fas","name":"hotdog","unicode":"\\f80f"},"hotel":{"type":"fas","name":"hotel","unicode":"\\f594"},"hotjar":{"type":"fab","name":"hotjar","unicode":"\\f3b1"},"hourglass":{"type":"fas","name":"hourglass","unicode":"\\f254"},"hourglass-end":{"type":"fas","name":"hourglass-end","unicode":"\\f253"},"hourglass-half":{"type":"fas","name":"hourglass-half","unicode":"\\f252"},"hourglass-start":{"type":"fas","name":"hourglass-start","unicode":"\\f251"},"house-damage":{"type":"fas","name":"house-damage","unicode":"\\f6f1"},"house-user":{"type":"fas","name":"house-user","unicode":"\\e065"},"houzz":{"type":"fab","name":"houzz","unicode":"\\f27c"},"hryvnia":{"type":"fas","name":"hryvnia","unicode":"\\f6f2"},"html5":{"type":"fab","name":"html5","unicode":"\\f13b"},"hubspot":{"type":"fab","name":"hubspot","unicode":"\\f3b2"},"i-cursor":{"type":"fas","name":"i-cursor","unicode":"\\f246"},"ice-cream":{"type":"fas","name":"ice-cream","unicode":"\\f810"},"icicles":{"type":"fas","name":"icicles","unicode":"\\f7ad"},"icons":{"type":"fas","name":"icons","unicode":"\\f86d"},"id-badge":{"type":"fas","name":"id-badge","unicode":"\\f2c1"},"id-card":{"type":"fas","name":"id-card","unicode":"\\f2c2"},"id-card-alt":{"type":"fas","name":"id-card-alt","unicode":"\\f47f"},"ideal":{"type":"fab","name":"ideal","unicode":"\\e013"},"igloo":{"type":"fas","name":"igloo","unicode":"\\f7ae"},"image":{"type":"fas","name":"image","unicode":"\\f03e"},"images":{"type":"fas","name":"images","unicode":"\\f302"},"imdb":{"type":"fab","name":"imdb","unicode":"\\f2d8"},"inbox":{"type":"fas","name":"inbox","unicode":"\\f01c"},"indent":{"type":"fas","name":"indent","unicode":"\\f03c"},"industry":{"type":"fas","name":"industry","unicode":"\\f275"},"infinity":{"type":"fas","name":"infinity","unicode":"\\f534"},"info":{"type":"fas","name":"info","unicode":"\\f129"},"info-circle":{"type":"fas","name":"info-circle","unicode":"\\f05a"},"innosoft":{"type":"fab","name":"innosoft","unicode":"\\e080"},"instagram":{"type":"fab","name":"instagram","unicode":"\\f16d"},"instagram-square":{"type":"fab","name":"instagram-square","unicode":"\\e055"},"instalod":{"type":"fab","name":"instalod","unicode":"\\e081"},"intercom":{"type":"fab","name":"intercom","unicode":"\\f7af"},"internet-explorer":{"type":"fab","name":"internet-explorer","unicode":"\\f26b"},"invision":{"type":"fab","name":"invision","unicode":"\\f7b0"},"ioxhost":{"type":"fab","name":"ioxhost","unicode":"\\f208"},"italic":{"type":"fas","name":"italic","unicode":"\\f033"},"itch-io":{"type":"fab","name":"itch-io","unicode":"\\f83a"},"itunes":{"type":"fab","name":"itunes","unicode":"\\f3b4"},"itunes-note":{"type":"fab","name":"itunes-note","unicode":"\\f3b5"},"java":{"type":"fab","name":"java","unicode":"\\f4e4"},"jedi":{"type":"fas","name":"jedi","unicode":"\\f669"},"jedi-order":{"type":"fab","name":"jedi-order","unicode":"\\f50e"},"jenkins":{"type":"fab","name":"jenkins","unicode":"\\f3b6"},"jira":{"type":"fab","name":"jira","unicode":"\\f7b1"},"joget":{"type":"fab","name":"joget","unicode":"\\f3b7"},"joint":{"type":"fas","name":"joint","unicode":"\\f595"},"joomla":{"type":"fab","name":"joomla","unicode":"\\f1aa"},"journal-whills":{"type":"fas","name":"journal-whills","unicode":"\\f66a"},"js":{"type":"fab","name":"js","unicode":"\\f3b8"},"js-square":{"type":"fab","name":"js-square","unicode":"\\f3b9"},"jsfiddle":{"type":"fab","name":"jsfiddle","unicode":"\\f1cc"},"kaaba":{"type":"fas","name":"kaaba","unicode":"\\f66b"},"kaggle":{"type":"fab","name":"kaggle","unicode":"\\f5fa"},"key":{"type":"fas","name":"key","unicode":"\\f084"},"keybase":{"type":"fab","name":"keybase","unicode":"\\f4f5"},"keyboard":{"type":"fas","name":"keyboard","unicode":"\\f11c"},"keycdn":{"type":"fab","name":"keycdn","unicode":"\\f3ba"},"khanda":{"type":"fas","name":"khanda","unicode":"\\f66d"},"kickstarter":{"type":"fab","name":"kickstarter","unicode":"\\f3bb"},"kickstarter-k":{"type":"fab","name":"kickstarter-k","unicode":"\\f3bc"},"kiss":{"type":"fas","name":"kiss","unicode":"\\f596"},"kiss-beam":{"type":"fas","name":"kiss-beam","unicode":"\\f597"},"kiss-wink-heart":{"type":"fas","name":"kiss-wink-heart","unicode":"\\f598"},"kiwi-bird":{"type":"fas","name":"kiwi-bird","unicode":"\\f535"},"korvue":{"type":"fab","name":"korvue","unicode":"\\f42f"},"landmark":{"type":"fas","name":"landmark","unicode":"\\f66f"},"language":{"type":"fas","name":"language","unicode":"\\f1ab"},"laptop":{"type":"fas","name":"laptop","unicode":"\\f109"},"laptop-code":{"type":"fas","name":"laptop-code","unicode":"\\f5fc"},"laptop-house":{"type":"fas","name":"laptop-house","unicode":"\\e066"},"laptop-medical":{"type":"fas","name":"laptop-medical","unicode":"\\f812"},"laravel":{"type":"fab","name":"laravel","unicode":"\\f3bd"},"lastfm":{"type":"fab","name":"lastfm","unicode":"\\f202"},"lastfm-square":{"type":"fab","name":"lastfm-square","unicode":"\\f203"},"laugh":{"type":"fas","name":"laugh","unicode":"\\f599"},"laugh-beam":{"type":"fas","name":"laugh-beam","unicode":"\\f59a"},"laugh-squint":{"type":"fas","name":"laugh-squint","unicode":"\\f59b"},"laugh-wink":{"type":"fas","name":"laugh-wink","unicode":"\\f59c"},"layer-group":{"type":"fas","name":"layer-group","unicode":"\\f5fd"},"leaf":{"type":"fas","name":"leaf","unicode":"\\f06c"},"leanpub":{"type":"fab","name":"leanpub","unicode":"\\f212"},"lemon":{"type":"fas","name":"lemon","unicode":"\\f094"},"less":{"type":"fab","name":"less","unicode":"\\f41d"},"less-than":{"type":"fas","name":"less-than","unicode":"\\f536"},"less-than-equal":{"type":"fas","name":"less-than-equal","unicode":"\\f537"},"level-down-alt":{"type":"fas","name":"level-down-alt","unicode":"\\f3be"},"level-up-alt":{"type":"fas","name":"level-up-alt","unicode":"\\f3bf"},"life-ring":{"type":"fas","name":"life-ring","unicode":"\\f1cd"},"lightbulb":{"type":"fas","name":"lightbulb","unicode":"\\f0eb"},"line":{"type":"fab","name":"line","unicode":"\\f3c0"},"link":{"type":"fas","name":"link","unicode":"\\f0c1"},"linkedin":{"type":"fab","name":"linkedin","unicode":"\\f08c"},"linkedin-in":{"type":"fab","name":"linkedin-in","unicode":"\\f0e1"},"linode":{"type":"fab","name":"linode","unicode":"\\f2b8"},"linux":{"type":"fab","name":"linux","unicode":"\\f17c"},"lira-sign":{"type":"fas","name":"lira-sign","unicode":"\\f195"},"list":{"type":"fas","name":"list","unicode":"\\f03a"},"list-alt":{"type":"fas","name":"list-alt","unicode":"\\f022"},"list-ol":{"type":"fas","name":"list-ol","unicode":"\\f0cb"},"list-ul":{"type":"fas","name":"list-ul","unicode":"\\f0ca"},"location-arrow":{"type":"fas","name":"location-arrow","unicode":"\\f124"},"lock":{"type":"fas","name":"lock","unicode":"\\f023"},"lock-open":{"type":"fas","name":"lock-open","unicode":"\\f3c1"},"long-arrow-alt-down":{"type":"fas","name":"long-arrow-alt-down","unicode":"\\f309"},"long-arrow-alt-left":{"type":"fas","name":"long-arrow-alt-left","unicode":"\\f30a"},"long-arrow-alt-right":{"type":"fas","name":"long-arrow-alt-right","unicode":"\\f30b"},"long-arrow-alt-up":{"type":"fas","name":"long-arrow-alt-up","unicode":"\\f30c"},"low-vision":{"type":"fas","name":"low-vision","unicode":"\\f2a8"},"luggage-cart":{"type":"fas","name":"luggage-cart","unicode":"\\f59d"},"lungs":{"type":"fas","name":"lungs","unicode":"\\f604"},"lungs-virus":{"type":"fas","name":"lungs-virus","unicode":"\\e067"},"lyft":{"type":"fab","name":"lyft","unicode":"\\f3c3"},"magento":{"type":"fab","name":"magento","unicode":"\\f3c4"},"magic":{"type":"fas","name":"magic","unicode":"\\f0d0"},"magnet":{"type":"fas","name":"magnet","unicode":"\\f076"},"mail-bulk":{"type":"fas","name":"mail-bulk","unicode":"\\f674"},"mailchimp":{"type":"fab","name":"mailchimp","unicode":"\\f59e"},"male":{"type":"fas","name":"male","unicode":"\\f183"},"mandalorian":{"type":"fab","name":"mandalorian","unicode":"\\f50f"},"map":{"type":"fas","name":"map","unicode":"\\f279"},"map-marked":{"type":"fas","name":"map-marked","unicode":"\\f59f"},"map-marked-alt":{"type":"fas","name":"map-marked-alt","unicode":"\\f5a0"},"map-marker":{"type":"fas","name":"map-marker","unicode":"\\f041"},"map-marker-alt":{"type":"fas","name":"map-marker-alt","unicode":"\\f3c5"},"map-pin":{"type":"fas","name":"map-pin","unicode":"\\f276"},"map-signs":{"type":"fas","name":"map-signs","unicode":"\\f277"},"markdown":{"type":"fab","name":"markdown","unicode":"\\f60f"},"marker":{"type":"fas","name":"marker","unicode":"\\f5a1"},"mars":{"type":"fas","name":"mars","unicode":"\\f222"},"mars-double":{"type":"fas","name":"mars-double","unicode":"\\f227"},"mars-stroke":{"type":"fas","name":"mars-stroke","unicode":"\\f229"},"mars-stroke-h":{"type":"fas","name":"mars-stroke-h","unicode":"\\f22b"},"mars-stroke-v":{"type":"fas","name":"mars-stroke-v","unicode":"\\f22a"},"mask":{"type":"fas","name":"mask","unicode":"\\f6fa"},"mastodon":{"type":"fab","name":"mastodon","unicode":"\\f4f6"},"maxcdn":{"type":"fab","name":"maxcdn","unicode":"\\f136"},"mdb":{"type":"fab","name":"mdb","unicode":"\\f8ca"},"medal":{"type":"fas","name":"medal","unicode":"\\f5a2"},"medapps":{"type":"fab","name":"medapps","unicode":"\\f3c6"},"medium":{"type":"fab","name":"medium","unicode":"\\f23a"},"medium-m":{"type":"fab","name":"medium-m","unicode":"\\f3c7"},"medkit":{"type":"fas","name":"medkit","unicode":"\\f0fa"},"medrt":{"type":"fab","name":"medrt","unicode":"\\f3c8"},"meetup":{"type":"fab","name":"meetup","unicode":"\\f2e0"},"megaport":{"type":"fab","name":"megaport","unicode":"\\f5a3"},"meh":{"type":"fas","name":"meh","unicode":"\\f11a"},"meh-blank":{"type":"fas","name":"meh-blank","unicode":"\\f5a4"},"meh-rolling-eyes":{"type":"fas","name":"meh-rolling-eyes","unicode":"\\f5a5"},"memory":{"type":"fas","name":"memory","unicode":"\\f538"},"mendeley":{"type":"fab","name":"mendeley","unicode":"\\f7b3"},"menorah":{"type":"fas","name":"menorah","unicode":"\\f676"},"mercury":{"type":"fas","name":"mercury","unicode":"\\f223"},"meteor":{"type":"fas","name":"meteor","unicode":"\\f753"},"microblog":{"type":"fab","name":"microblog","unicode":"\\e01a"},"microchip":{"type":"fas","name":"microchip","unicode":"\\f2db"},"microphone":{"type":"fas","name":"microphone","unicode":"\\f130"},"microphone-alt":{"type":"fas","name":"microphone-alt","unicode":"\\f3c9"},"microphone-alt-slash":{"type":"fas","name":"microphone-alt-slash","unicode":"\\f539"},"microphone-slash":{"type":"fas","name":"microphone-slash","unicode":"\\f131"},"microscope":{"type":"fas","name":"microscope","unicode":"\\f610"},"microsoft":{"type":"fab","name":"microsoft","unicode":"\\f3ca"},"minus":{"type":"fas","name":"minus","unicode":"\\f068"},"minus-circle":{"type":"fas","name":"minus-circle","unicode":"\\f056"},"minus-square":{"type":"fas","name":"minus-square","unicode":"\\f146"},"mitten":{"type":"fas","name":"mitten","unicode":"\\f7b5"},"mix":{"type":"fab","name":"mix","unicode":"\\f3cb"},"mixcloud":{"type":"fab","name":"mixcloud","unicode":"\\f289"},"mixer":{"type":"fab","name":"mixer","unicode":"\\e056"},"mizuni":{"type":"fab","name":"mizuni","unicode":"\\f3cc"},"mobile":{"type":"fas","name":"mobile","unicode":"\\f10b"},"mobile-alt":{"type":"fas","name":"mobile-alt","unicode":"\\f3cd"},"modx":{"type":"fab","name":"modx","unicode":"\\f285"},"monero":{"type":"fab","name":"monero","unicode":"\\f3d0"},"money-bill":{"type":"fas","name":"money-bill","unicode":"\\f0d6"},"money-bill-alt":{"type":"fas","name":"money-bill-alt","unicode":"\\f3d1"},"money-bill-wave":{"type":"fas","name":"money-bill-wave","unicode":"\\f53a"},"money-bill-wave-alt":{"type":"fas","name":"money-bill-wave-alt","unicode":"\\f53b"},"money-check":{"type":"fas","name":"money-check","unicode":"\\f53c"},"money-check-alt":{"type":"fas","name":"money-check-alt","unicode":"\\f53d"},"monument":{"type":"fas","name":"monument","unicode":"\\f5a6"},"moon":{"type":"fas","name":"moon","unicode":"\\f186"},"mortar-pestle":{"type":"fas","name":"mortar-pestle","unicode":"\\f5a7"},"mosque":{"type":"fas","name":"mosque","unicode":"\\f678"},"motorcycle":{"type":"fas","name":"motorcycle","unicode":"\\f21c"},"mountain":{"type":"fas","name":"mountain","unicode":"\\f6fc"},"mouse":{"type":"fas","name":"mouse","unicode":"\\f8cc"},"mouse-pointer":{"type":"fas","name":"mouse-pointer","unicode":"\\f245"},"mug-hot":{"type":"fas","name":"mug-hot","unicode":"\\f7b6"},"music":{"type":"fas","name":"music","unicode":"\\f001"},"napster":{"type":"fab","name":"napster","unicode":"\\f3d2"},"neos":{"type":"fab","name":"neos","unicode":"\\f612"},"network-wired":{"type":"fas","name":"network-wired","unicode":"\\f6ff"},"neuter":{"type":"fas","name":"neuter","unicode":"\\f22c"},"newspaper":{"type":"fas","name":"newspaper","unicode":"\\f1ea"},"nimblr":{"type":"fab","name":"nimblr","unicode":"\\f5a8"},"node":{"type":"fab","name":"node","unicode":"\\f419"},"node-js":{"type":"fab","name":"node-js","unicode":"\\f3d3"},"not-equal":{"type":"fas","name":"not-equal","unicode":"\\f53e"},"notes-medical":{"type":"fas","name":"notes-medical","unicode":"\\f481"},"npm":{"type":"fab","name":"npm","unicode":"\\f3d4"},"ns8":{"type":"fab","name":"ns8","unicode":"\\f3d5"},"nutritionix":{"type":"fab","name":"nutritionix","unicode":"\\f3d6"},"object-group":{"type":"fas","name":"object-group","unicode":"\\f247"},"object-ungroup":{"type":"fas","name":"object-ungroup","unicode":"\\f248"},"octopus-deploy":{"type":"fab","name":"octopus-deploy","unicode":"\\e082"},"odnoklassniki":{"type":"fab","name":"odnoklassniki","unicode":"\\f263"},"odnoklassniki-square":{"type":"fab","name":"odnoklassniki-square","unicode":"\\f264"},"oil-can":{"type":"fas","name":"oil-can","unicode":"\\f613"},"old-republic":{"type":"fab","name":"old-republic","unicode":"\\f510"},"om":{"type":"fas","name":"om","unicode":"\\f679"},"opencart":{"type":"fab","name":"opencart","unicode":"\\f23d"},"openid":{"type":"fab","name":"openid","unicode":"\\f19b"},"opera":{"type":"fab","name":"opera","unicode":"\\f26a"},"optin-monster":{"type":"fab","name":"optin-monster","unicode":"\\f23c"},"orcid":{"type":"fab","name":"orcid","unicode":"\\f8d2"},"osi":{"type":"fab","name":"osi","unicode":"\\f41a"},"otter":{"type":"fas","name":"otter","unicode":"\\f700"},"outdent":{"type":"fas","name":"outdent","unicode":"\\f03b"},"page4":{"type":"fab","name":"page4","unicode":"\\f3d7"},"pagelines":{"type":"fab","name":"pagelines","unicode":"\\f18c"},"pager":{"type":"fas","name":"pager","unicode":"\\f815"},"paint-brush":{"type":"fas","name":"paint-brush","unicode":"\\f1fc"},"paint-roller":{"type":"fas","name":"paint-roller","unicode":"\\f5aa"},"palette":{"type":"fas","name":"palette","unicode":"\\f53f"},"palfed":{"type":"fab","name":"palfed","unicode":"\\f3d8"},"pallet":{"type":"fas","name":"pallet","unicode":"\\f482"},"paper-plane":{"type":"fas","name":"paper-plane","unicode":"\\f1d8"},"paperclip":{"type":"fas","name":"paperclip","unicode":"\\f0c6"},"parachute-box":{"type":"fas","name":"parachute-box","unicode":"\\f4cd"},"paragraph":{"type":"fas","name":"paragraph","unicode":"\\f1dd"},"parking":{"type":"fas","name":"parking","unicode":"\\f540"},"passport":{"type":"fas","name":"passport","unicode":"\\f5ab"},"pastafarianism":{"type":"fas","name":"pastafarianism","unicode":"\\f67b"},"paste":{"type":"fas","name":"paste","unicode":"\\f0ea"},"patreon":{"type":"fab","name":"patreon","unicode":"\\f3d9"},"pause":{"type":"fas","name":"pause","unicode":"\\f04c"},"pause-circle":{"type":"fas","name":"pause-circle","unicode":"\\f28b"},"paw":{"type":"fas","name":"paw","unicode":"\\f1b0"},"paypal":{"type":"fab","name":"paypal","unicode":"\\f1ed"},"peace":{"type":"fas","name":"peace","unicode":"\\f67c"},"pen":{"type":"fas","name":"pen","unicode":"\\f304"},"pen-alt":{"type":"fas","name":"pen-alt","unicode":"\\f305"},"pen-fancy":{"type":"fas","name":"pen-fancy","unicode":"\\f5ac"},"pen-nib":{"type":"fas","name":"pen-nib","unicode":"\\f5ad"},"pen-square":{"type":"fas","name":"pen-square","unicode":"\\f14b"},"pencil-alt":{"type":"fas","name":"pencil-alt","unicode":"\\f303"},"pencil-ruler":{"type":"fas","name":"pencil-ruler","unicode":"\\f5ae"},"penny-arcade":{"type":"fab","name":"penny-arcade","unicode":"\\f704"},"people-arrows":{"type":"fas","name":"people-arrows","unicode":"\\e068"},"people-carry":{"type":"fas","name":"people-carry","unicode":"\\f4ce"},"pepper-hot":{"type":"fas","name":"pepper-hot","unicode":"\\f816"},"perbyte":{"type":"fab","name":"perbyte","unicode":"\\e083"},"percent":{"type":"fas","name":"percent","unicode":"\\f295"},"percentage":{"type":"fas","name":"percentage","unicode":"\\f541"},"periscope":{"type":"fab","name":"periscope","unicode":"\\f3da"},"person-booth":{"type":"fas","name":"person-booth","unicode":"\\f756"},"phabricator":{"type":"fab","name":"phabricator","unicode":"\\f3db"},"phoenix-framework":{"type":"fab","name":"phoenix-framework","unicode":"\\f3dc"},"phoenix-squadron":{"type":"fab","name":"phoenix-squadron","unicode":"\\f511"},"phone":{"type":"fas","name":"phone","unicode":"\\f095"},"phone-alt":{"type":"fas","name":"phone-alt","unicode":"\\f879"},"phone-slash":{"type":"fas","name":"phone-slash","unicode":"\\f3dd"},"phone-square":{"type":"fas","name":"phone-square","unicode":"\\f098"},"phone-square-alt":{"type":"fas","name":"phone-square-alt","unicode":"\\f87b"},"phone-volume":{"type":"fas","name":"phone-volume","unicode":"\\f2a0"},"photo-video":{"type":"fas","name":"photo-video","unicode":"\\f87c"},"php":{"type":"fab","name":"php","unicode":"\\f457"},"pied-piper":{"type":"fab","name":"pied-piper","unicode":"\\f2ae"},"pied-piper-alt":{"type":"fab","name":"pied-piper-alt","unicode":"\\f1a8"},"pied-piper-hat":{"type":"fab","name":"pied-piper-hat","unicode":"\\f4e5"},"pied-piper-pp":{"type":"fab","name":"pied-piper-pp","unicode":"\\f1a7"},"pied-piper-square":{"type":"fab","name":"pied-piper-square","unicode":"\\e01e"},"piggy-bank":{"type":"fas","name":"piggy-bank","unicode":"\\f4d3"},"pills":{"type":"fas","name":"pills","unicode":"\\f484"},"pinterest":{"type":"fab","name":"pinterest","unicode":"\\f0d2"},"pinterest-p":{"type":"fab","name":"pinterest-p","unicode":"\\f231"},"pinterest-square":{"type":"fab","name":"pinterest-square","unicode":"\\f0d3"},"pizza-slice":{"type":"fas","name":"pizza-slice","unicode":"\\f818"},"place-of-worship":{"type":"fas","name":"place-of-worship","unicode":"\\f67f"},"plane":{"type":"fas","name":"plane","unicode":"\\f072"},"plane-arrival":{"type":"fas","name":"plane-arrival","unicode":"\\f5af"},"plane-departure":{"type":"fas","name":"plane-departure","unicode":"\\f5b0"},"plane-slash":{"type":"fas","name":"plane-slash","unicode":"\\e069"},"play":{"type":"fas","name":"play","unicode":"\\f04b"},"play-circle":{"type":"fas","name":"play-circle","unicode":"\\f144"},"playstation":{"type":"fab","name":"playstation","unicode":"\\f3df"},"plug":{"type":"fas","name":"plug","unicode":"\\f1e6"},"plus":{"type":"fas","name":"plus","unicode":"\\f067"},"plus-circle":{"type":"fas","name":"plus-circle","unicode":"\\f055"},"plus-square":{"type":"fas","name":"plus-square","unicode":"\\f0fe"},"podcast":{"type":"fas","name":"podcast","unicode":"\\f2ce"},"poll":{"type":"fas","name":"poll","unicode":"\\f681"},"poll-h":{"type":"fas","name":"poll-h","unicode":"\\f682"},"poo":{"type":"fas","name":"poo","unicode":"\\f2fe"},"poo-storm":{"type":"fas","name":"poo-storm","unicode":"\\f75a"},"poop":{"type":"fas","name":"poop","unicode":"\\f619"},"portrait":{"type":"fas","name":"portrait","unicode":"\\f3e0"},"pound-sign":{"type":"fas","name":"pound-sign","unicode":"\\f154"},"power-off":{"type":"fas","name":"power-off","unicode":"\\f011"},"pray":{"type":"fas","name":"pray","unicode":"\\f683"},"praying-hands":{"type":"fas","name":"praying-hands","unicode":"\\f684"},"prescription":{"type":"fas","name":"prescription","unicode":"\\f5b1"},"prescription-bottle":{"type":"fas","name":"prescription-bottle","unicode":"\\f485"},"prescription-bottle-alt":{"type":"fas","name":"prescription-bottle-alt","unicode":"\\f486"},"print":{"type":"fas","name":"print","unicode":"\\f02f"},"procedures":{"type":"fas","name":"procedures","unicode":"\\f487"},"product-hunt":{"type":"fab","name":"product-hunt","unicode":"\\f288"},"project-diagram":{"type":"fas","name":"project-diagram","unicode":"\\f542"},"pump-medical":{"type":"fas","name":"pump-medical","unicode":"\\e06a"},"pump-soap":{"type":"fas","name":"pump-soap","unicode":"\\e06b"},"pushed":{"type":"fab","name":"pushed","unicode":"\\f3e1"},"puzzle-piece":{"type":"fas","name":"puzzle-piece","unicode":"\\f12e"},"python":{"type":"fab","name":"python","unicode":"\\f3e2"},"qq":{"type":"fab","name":"qq","unicode":"\\f1d6"},"qrcode":{"type":"fas","name":"qrcode","unicode":"\\f029"},"question":{"type":"fas","name":"question","unicode":"\\f128"},"question-circle":{"type":"fas","name":"question-circle","unicode":"\\f059"},"quidditch":{"type":"fas","name":"quidditch","unicode":"\\f458"},"quinscape":{"type":"fab","name":"quinscape","unicode":"\\f459"},"quora":{"type":"fab","name":"quora","unicode":"\\f2c4"},"quote-left":{"type":"fas","name":"quote-left","unicode":"\\f10d"},"quote-right":{"type":"fas","name":"quote-right","unicode":"\\f10e"},"quran":{"type":"fas","name":"quran","unicode":"\\f687"},"r-project":{"type":"fab","name":"r-project","unicode":"\\f4f7"},"radiation":{"type":"fas","name":"radiation","unicode":"\\f7b9"},"radiation-alt":{"type":"fas","name":"radiation-alt","unicode":"\\f7ba"},"rainbow":{"type":"fas","name":"rainbow","unicode":"\\f75b"},"random":{"type":"fas","name":"random","unicode":"\\f074"},"raspberry-pi":{"type":"fab","name":"raspberry-pi","unicode":"\\f7bb"},"ravelry":{"type":"fab","name":"ravelry","unicode":"\\f2d9"},"react":{"type":"fab","name":"react","unicode":"\\f41b"},"reacteurope":{"type":"fab","name":"reacteurope","unicode":"\\f75d"},"readme":{"type":"fab","name":"readme","unicode":"\\f4d5"},"rebel":{"type":"fab","name":"rebel","unicode":"\\f1d0"},"receipt":{"type":"fas","name":"receipt","unicode":"\\f543"},"record-vinyl":{"type":"fas","name":"record-vinyl","unicode":"\\f8d9"},"recycle":{"type":"fas","name":"recycle","unicode":"\\f1b8"},"red-river":{"type":"fab","name":"red-river","unicode":"\\f3e3"},"reddit":{"type":"fab","name":"reddit","unicode":"\\f1a1"},"reddit-alien":{"type":"fab","name":"reddit-alien","unicode":"\\f281"},"reddit-square":{"type":"fab","name":"reddit-square","unicode":"\\f1a2"},"redhat":{"type":"fab","name":"redhat","unicode":"\\f7bc"},"redo":{"type":"fas","name":"redo","unicode":"\\f01e"},"redo-alt":{"type":"fas","name":"redo-alt","unicode":"\\f2f9"},"registered":{"type":"fas","name":"registered","unicode":"\\f25d"},"remove-format":{"type":"fas","name":"remove-format","unicode":"\\f87d"},"renren":{"type":"fab","name":"renren","unicode":"\\f18b"},"reply":{"type":"fas","name":"reply","unicode":"\\f3e5"},"reply-all":{"type":"fas","name":"reply-all","unicode":"\\f122"},"replyd":{"type":"fab","name":"replyd","unicode":"\\f3e6"},"republican":{"type":"fas","name":"republican","unicode":"\\f75e"},"researchgate":{"type":"fab","name":"researchgate","unicode":"\\f4f8"},"resolving":{"type":"fab","name":"resolving","unicode":"\\f3e7"},"restroom":{"type":"fas","name":"restroom","unicode":"\\f7bd"},"retweet":{"type":"fas","name":"retweet","unicode":"\\f079"},"rev":{"type":"fab","name":"rev","unicode":"\\f5b2"},"ribbon":{"type":"fas","name":"ribbon","unicode":"\\f4d6"},"ring":{"type":"fas","name":"ring","unicode":"\\f70b"},"road":{"type":"fas","name":"road","unicode":"\\f018"},"robot":{"type":"fas","name":"robot","unicode":"\\f544"},"rocket":{"type":"fas","name":"rocket","unicode":"\\f135"},"rocketchat":{"type":"fab","name":"rocketchat","unicode":"\\f3e8"},"rockrms":{"type":"fab","name":"rockrms","unicode":"\\f3e9"},"route":{"type":"fas","name":"route","unicode":"\\f4d7"},"rss":{"type":"fas","name":"rss","unicode":"\\f09e"},"rss-square":{"type":"fas","name":"rss-square","unicode":"\\f143"},"ruble-sign":{"type":"fas","name":"ruble-sign","unicode":"\\f158"},"ruler":{"type":"fas","name":"ruler","unicode":"\\f545"},"ruler-combined":{"type":"fas","name":"ruler-combined","unicode":"\\f546"},"ruler-horizontal":{"type":"fas","name":"ruler-horizontal","unicode":"\\f547"},"ruler-vertical":{"type":"fas","name":"ruler-vertical","unicode":"\\f548"},"running":{"type":"fas","name":"running","unicode":"\\f70c"},"rupee-sign":{"type":"fas","name":"rupee-sign","unicode":"\\f156"},"rust":{"type":"fab","name":"rust","unicode":"\\e07a"},"sad-cry":{"type":"fas","name":"sad-cry","unicode":"\\f5b3"},"sad-tear":{"type":"fas","name":"sad-tear","unicode":"\\f5b4"},"safari":{"type":"fab","name":"safari","unicode":"\\f267"},"salesforce":{"type":"fab","name":"salesforce","unicode":"\\f83b"},"sass":{"type":"fab","name":"sass","unicode":"\\f41e"},"satellite":{"type":"fas","name":"satellite","unicode":"\\f7bf"},"satellite-dish":{"type":"fas","name":"satellite-dish","unicode":"\\f7c0"},"save":{"type":"fas","name":"save","unicode":"\\f0c7"},"schlix":{"type":"fab","name":"schlix","unicode":"\\f3ea"},"school":{"type":"fas","name":"school","unicode":"\\f549"},"screwdriver":{"type":"fas","name":"screwdriver","unicode":"\\f54a"},"scribd":{"type":"fab","name":"scribd","unicode":"\\f28a"},"scroll":{"type":"fas","name":"scroll","unicode":"\\f70e"},"sd-card":{"type":"fas","name":"sd-card","unicode":"\\f7c2"},"search":{"type":"fas","name":"search","unicode":"\\f002"},"search-dollar":{"type":"fas","name":"search-dollar","unicode":"\\f688"},"search-location":{"type":"fas","name":"search-location","unicode":"\\f689"},"search-minus":{"type":"fas","name":"search-minus","unicode":"\\f010"},"search-plus":{"type":"fas","name":"search-plus","unicode":"\\f00e"},"searchengin":{"type":"fab","name":"searchengin","unicode":"\\f3eb"},"seedling":{"type":"fas","name":"seedling","unicode":"\\f4d8"},"sellcast":{"type":"fab","name":"sellcast","unicode":"\\f2da"},"sellsy":{"type":"fab","name":"sellsy","unicode":"\\f213"},"server":{"type":"fas","name":"server","unicode":"\\f233"},"servicestack":{"type":"fab","name":"servicestack","unicode":"\\f3ec"},"shapes":{"type":"fas","name":"shapes","unicode":"\\f61f"},"share":{"type":"fas","name":"share","unicode":"\\f064"},"share-alt":{"type":"fas","name":"share-alt","unicode":"\\f1e0"},"share-alt-square":{"type":"fas","name":"share-alt-square","unicode":"\\f1e1"},"share-square":{"type":"fas","name":"share-square","unicode":"\\f14d"},"shekel-sign":{"type":"fas","name":"shekel-sign","unicode":"\\f20b"},"shield-alt":{"type":"fas","name":"shield-alt","unicode":"\\f3ed"},"shield-virus":{"type":"fas","name":"shield-virus","unicode":"\\e06c"},"ship":{"type":"fas","name":"ship","unicode":"\\f21a"},"shipping-fast":{"type":"fas","name":"shipping-fast","unicode":"\\f48b"},"shirtsinbulk":{"type":"fab","name":"shirtsinbulk","unicode":"\\f214"},"shoe-prints":{"type":"fas","name":"shoe-prints","unicode":"\\f54b"},"shopify":{"type":"fab","name":"shopify","unicode":"\\e057"},"shopping-bag":{"type":"fas","name":"shopping-bag","unicode":"\\f290"},"shopping-basket":{"type":"fas","name":"shopping-basket","unicode":"\\f291"},"shopping-cart":{"type":"fas","name":"shopping-cart","unicode":"\\f07a"},"shopware":{"type":"fab","name":"shopware","unicode":"\\f5b5"},"shower":{"type":"fas","name":"shower","unicode":"\\f2cc"},"shuttle-van":{"type":"fas","name":"shuttle-van","unicode":"\\f5b6"},"sign":{"type":"fas","name":"sign","unicode":"\\f4d9"},"sign-in-alt":{"type":"fas","name":"sign-in-alt","unicode":"\\f2f6"},"sign-language":{"type":"fas","name":"sign-language","unicode":"\\f2a7"},"sign-out-alt":{"type":"fas","name":"sign-out-alt","unicode":"\\f2f5"},"signal":{"type":"fas","name":"signal","unicode":"\\f012"},"signature":{"type":"fas","name":"signature","unicode":"\\f5b7"},"sim-card":{"type":"fas","name":"sim-card","unicode":"\\f7c4"},"simplybuilt":{"type":"fab","name":"simplybuilt","unicode":"\\f215"},"sink":{"type":"fas","name":"sink","unicode":"\\e06d"},"sistrix":{"type":"fab","name":"sistrix","unicode":"\\f3ee"},"sitemap":{"type":"fas","name":"sitemap","unicode":"\\f0e8"},"sith":{"type":"fab","name":"sith","unicode":"\\f512"},"skating":{"type":"fas","name":"skating","unicode":"\\f7c5"},"sketch":{"type":"fab","name":"sketch","unicode":"\\f7c6"},"skiing":{"type":"fas","name":"skiing","unicode":"\\f7c9"},"skiing-nordic":{"type":"fas","name":"skiing-nordic","unicode":"\\f7ca"},"skull":{"type":"fas","name":"skull","unicode":"\\f54c"},"skull-crossbones":{"type":"fas","name":"skull-crossbones","unicode":"\\f714"},"skyatlas":{"type":"fab","name":"skyatlas","unicode":"\\f216"},"skype":{"type":"fab","name":"skype","unicode":"\\f17e"},"slack":{"type":"fab","name":"slack","unicode":"\\f198"},"slack-hash":{"type":"fab","name":"slack-hash","unicode":"\\f3ef"},"slash":{"type":"fas","name":"slash","unicode":"\\f715"},"sleigh":{"type":"fas","name":"sleigh","unicode":"\\f7cc"},"sliders-h":{"type":"fas","name":"sliders-h","unicode":"\\f1de"},"slideshare":{"type":"fab","name":"slideshare","unicode":"\\f1e7"},"smile":{"type":"fas","name":"smile","unicode":"\\f118"},"smile-beam":{"type":"fas","name":"smile-beam","unicode":"\\f5b8"},"smile-wink":{"type":"fas","name":"smile-wink","unicode":"\\f4da"},"smog":{"type":"fas","name":"smog","unicode":"\\f75f"},"smoking":{"type":"fas","name":"smoking","unicode":"\\f48d"},"smoking-ban":{"type":"fas","name":"smoking-ban","unicode":"\\f54d"},"sms":{"type":"fas","name":"sms","unicode":"\\f7cd"},"snapchat":{"type":"fab","name":"snapchat","unicode":"\\f2ab"},"snapchat-ghost":{"type":"fab","name":"snapchat-ghost","unicode":"\\f2ac"},"snapchat-square":{"type":"fab","name":"snapchat-square","unicode":"\\f2ad"},"snowboarding":{"type":"fas","name":"snowboarding","unicode":"\\f7ce"},"snowflake":{"type":"fas","name":"snowflake","unicode":"\\f2dc"},"snowman":{"type":"fas","name":"snowman","unicode":"\\f7d0"},"snowplow":{"type":"fas","name":"snowplow","unicode":"\\f7d2"},"soap":{"type":"fas","name":"soap","unicode":"\\e06e"},"socks":{"type":"fas","name":"socks","unicode":"\\f696"},"solar-panel":{"type":"fas","name":"solar-panel","unicode":"\\f5ba"},"sort":{"type":"fas","name":"sort","unicode":"\\f0dc"},"sort-alpha-down":{"type":"fas","name":"sort-alpha-down","unicode":"\\f15d"},"sort-alpha-down-alt":{"type":"fas","name":"sort-alpha-down-alt","unicode":"\\f881"},"sort-alpha-up":{"type":"fas","name":"sort-alpha-up","unicode":"\\f15e"},"sort-alpha-up-alt":{"type":"fas","name":"sort-alpha-up-alt","unicode":"\\f882"},"sort-amount-down":{"type":"fas","name":"sort-amount-down","unicode":"\\f160"},"sort-amount-down-alt":{"type":"fas","name":"sort-amount-down-alt","unicode":"\\f884"},"sort-amount-up":{"type":"fas","name":"sort-amount-up","unicode":"\\f161"},"sort-amount-up-alt":{"type":"fas","name":"sort-amount-up-alt","unicode":"\\f885"},"sort-down":{"type":"fas","name":"sort-down","unicode":"\\f0dd"},"sort-numeric-down":{"type":"fas","name":"sort-numeric-down","unicode":"\\f162"},"sort-numeric-down-alt":{"type":"fas","name":"sort-numeric-down-alt","unicode":"\\f886"},"sort-numeric-up":{"type":"fas","name":"sort-numeric-up","unicode":"\\f163"},"sort-numeric-up-alt":{"type":"fas","name":"sort-numeric-up-alt","unicode":"\\f887"},"sort-up":{"type":"fas","name":"sort-up","unicode":"\\f0de"},"soundcloud":{"type":"fab","name":"soundcloud","unicode":"\\f1be"},"sourcetree":{"type":"fab","name":"sourcetree","unicode":"\\f7d3"},"spa":{"type":"fas","name":"spa","unicode":"\\f5bb"},"space-shuttle":{"type":"fas","name":"space-shuttle","unicode":"\\f197"},"speakap":{"type":"fab","name":"speakap","unicode":"\\f3f3"},"speaker-deck":{"type":"fab","name":"speaker-deck","unicode":"\\f83c"},"spell-check":{"type":"fas","name":"spell-check","unicode":"\\f891"},"spider":{"type":"fas","name":"spider","unicode":"\\f717"},"spinner":{"type":"fas","name":"spinner","unicode":"\\f110"},"splotch":{"type":"fas","name":"splotch","unicode":"\\f5bc"},"spotify":{"type":"fab","name":"spotify","unicode":"\\f1bc"},"spray-can":{"type":"fas","name":"spray-can","unicode":"\\f5bd"},"square":{"type":"fas","name":"square","unicode":"\\f0c8"},"square-full":{"type":"fas","name":"square-full","unicode":"\\f45c"},"square-root-alt":{"type":"fas","name":"square-root-alt","unicode":"\\f698"},"squarespace":{"type":"fab","name":"squarespace","unicode":"\\f5be"},"stack-exchange":{"type":"fab","name":"stack-exchange","unicode":"\\f18d"},"stack-overflow":{"type":"fab","name":"stack-overflow","unicode":"\\f16c"},"stackpath":{"type":"fab","name":"stackpath","unicode":"\\f842"},"stamp":{"type":"fas","name":"stamp","unicode":"\\f5bf"},"star":{"type":"fas","name":"star","unicode":"\\f005"},"star-and-crescent":{"type":"fas","name":"star-and-crescent","unicode":"\\f699"},"star-half":{"type":"fas","name":"star-half","unicode":"\\f089"},"star-half-alt":{"type":"fas","name":"star-half-alt","unicode":"\\f5c0"},"star-of-david":{"type":"fas","name":"star-of-david","unicode":"\\f69a"},"star-of-life":{"type":"fas","name":"star-of-life","unicode":"\\f621"},"staylinked":{"type":"fab","name":"staylinked","unicode":"\\f3f5"},"steam":{"type":"fab","name":"steam","unicode":"\\f1b6"},"steam-square":{"type":"fab","name":"steam-square","unicode":"\\f1b7"},"steam-symbol":{"type":"fab","name":"steam-symbol","unicode":"\\f3f6"},"step-backward":{"type":"fas","name":"step-backward","unicode":"\\f048"},"step-forward":{"type":"fas","name":"step-forward","unicode":"\\f051"},"stethoscope":{"type":"fas","name":"stethoscope","unicode":"\\f0f1"},"sticker-mule":{"type":"fab","name":"sticker-mule","unicode":"\\f3f7"},"sticky-note":{"type":"fas","name":"sticky-note","unicode":"\\f249"},"stop":{"type":"fas","name":"stop","unicode":"\\f04d"},"stop-circle":{"type":"fas","name":"stop-circle","unicode":"\\f28d"},"stopwatch":{"type":"fas","name":"stopwatch","unicode":"\\f2f2"},"stopwatch-20":{"type":"fas","name":"stopwatch-20","unicode":"\\e06f"},"store":{"type":"fas","name":"store","unicode":"\\f54e"},"store-alt":{"type":"fas","name":"store-alt","unicode":"\\f54f"},"store-alt-slash":{"type":"fas","name":"store-alt-slash","unicode":"\\e070"},"store-slash":{"type":"fas","name":"store-slash","unicode":"\\e071"},"strava":{"type":"fab","name":"strava","unicode":"\\f428"},"stream":{"type":"fas","name":"stream","unicode":"\\f550"},"street-view":{"type":"fas","name":"street-view","unicode":"\\f21d"},"strikethrough":{"type":"fas","name":"strikethrough","unicode":"\\f0cc"},"stripe":{"type":"fab","name":"stripe","unicode":"\\f429"},"stripe-s":{"type":"fab","name":"stripe-s","unicode":"\\f42a"},"stroopwafel":{"type":"fas","name":"stroopwafel","unicode":"\\f551"},"studiovinari":{"type":"fab","name":"studiovinari","unicode":"\\f3f8"},"stumbleupon":{"type":"fab","name":"stumbleupon","unicode":"\\f1a4"},"stumbleupon-circle":{"type":"fab","name":"stumbleupon-circle","unicode":"\\f1a3"},"subscript":{"type":"fas","name":"subscript","unicode":"\\f12c"},"subway":{"type":"fas","name":"subway","unicode":"\\f239"},"suitcase":{"type":"fas","name":"suitcase","unicode":"\\f0f2"},"suitcase-rolling":{"type":"fas","name":"suitcase-rolling","unicode":"\\f5c1"},"sun":{"type":"fas","name":"sun","unicode":"\\f185"},"superpowers":{"type":"fab","name":"superpowers","unicode":"\\f2dd"},"superscript":{"type":"fas","name":"superscript","unicode":"\\f12b"},"supple":{"type":"fab","name":"supple","unicode":"\\f3f9"},"surprise":{"type":"fas","name":"surprise","unicode":"\\f5c2"},"suse":{"type":"fab","name":"suse","unicode":"\\f7d6"},"swatchbook":{"type":"fas","name":"swatchbook","unicode":"\\f5c3"},"swift":{"type":"fab","name":"swift","unicode":"\\f8e1"},"swimmer":{"type":"fas","name":"swimmer","unicode":"\\f5c4"},"swimming-pool":{"type":"fas","name":"swimming-pool","unicode":"\\f5c5"},"symfony":{"type":"fab","name":"symfony","unicode":"\\f83d"},"synagogue":{"type":"fas","name":"synagogue","unicode":"\\f69b"},"sync":{"type":"fas","name":"sync","unicode":"\\f021"},"sync-alt":{"type":"fas","name":"sync-alt","unicode":"\\f2f1"},"syringe":{"type":"fas","name":"syringe","unicode":"\\f48e"},"table":{"type":"fas","name":"table","unicode":"\\f0ce"},"table-tennis":{"type":"fas","name":"table-tennis","unicode":"\\f45d"},"tablet":{"type":"fas","name":"tablet","unicode":"\\f10a"},"tablet-alt":{"type":"fas","name":"tablet-alt","unicode":"\\f3fa"},"tablets":{"type":"fas","name":"tablets","unicode":"\\f490"},"tachometer-alt":{"type":"fas","name":"tachometer-alt","unicode":"\\f3fd"},"tag":{"type":"fas","name":"tag","unicode":"\\f02b"},"tags":{"type":"fas","name":"tags","unicode":"\\f02c"},"tape":{"type":"fas","name":"tape","unicode":"\\f4db"},"tasks":{"type":"fas","name":"tasks","unicode":"\\f0ae"},"taxi":{"type":"fas","name":"taxi","unicode":"\\f1ba"},"teamspeak":{"type":"fab","name":"teamspeak","unicode":"\\f4f9"},"teeth":{"type":"fas","name":"teeth","unicode":"\\f62e"},"teeth-open":{"type":"fas","name":"teeth-open","unicode":"\\f62f"},"telegram":{"type":"fab","name":"telegram","unicode":"\\f2c6"},"telegram-plane":{"type":"fab","name":"telegram-plane","unicode":"\\f3fe"},"temperature-high":{"type":"fas","name":"temperature-high","unicode":"\\f769"},"temperature-low":{"type":"fas","name":"temperature-low","unicode":"\\f76b"},"tencent-weibo":{"type":"fab","name":"tencent-weibo","unicode":"\\f1d5"},"tenge":{"type":"fas","name":"tenge","unicode":"\\f7d7"},"terminal":{"type":"fas","name":"terminal","unicode":"\\f120"},"text-height":{"type":"fas","name":"text-height","unicode":"\\f034"},"text-width":{"type":"fas","name":"text-width","unicode":"\\f035"},"th":{"type":"fas","name":"th","unicode":"\\f00a"},"th-large":{"type":"fas","name":"th-large","unicode":"\\f009"},"th-list":{"type":"fas","name":"th-list","unicode":"\\f00b"},"the-red-yeti":{"type":"fab","name":"the-red-yeti","unicode":"\\f69d"},"theater-masks":{"type":"fas","name":"theater-masks","unicode":"\\f630"},"themeco":{"type":"fab","name":"themeco","unicode":"\\f5c6"},"themeisle":{"type":"fab","name":"themeisle","unicode":"\\f2b2"},"thermometer":{"type":"fas","name":"thermometer","unicode":"\\f491"},"thermometer-empty":{"type":"fas","name":"thermometer-empty","unicode":"\\f2cb"},"thermometer-full":{"type":"fas","name":"thermometer-full","unicode":"\\f2c7"},"thermometer-half":{"type":"fas","name":"thermometer-half","unicode":"\\f2c9"},"thermometer-quarter":{"type":"fas","name":"thermometer-quarter","unicode":"\\f2ca"},"thermometer-three-quarters":{"type":"fas","name":"thermometer-three-quarters","unicode":"\\f2c8"},"think-peaks":{"type":"fab","name":"think-peaks","unicode":"\\f731"},"thumbs-down":{"type":"fas","name":"thumbs-down","unicode":"\\f165"},"thumbs-up":{"type":"fas","name":"thumbs-up","unicode":"\\f164"},"thumbtack":{"type":"fas","name":"thumbtack","unicode":"\\f08d"},"ticket-alt":{"type":"fas","name":"ticket-alt","unicode":"\\f3ff"},"tiktok":{"type":"fab","name":"tiktok","unicode":"\\e07b"},"times":{"type":"fas","name":"times","unicode":"\\f00d"},"times-circle":{"type":"fas","name":"times-circle","unicode":"\\f057"},"tint":{"type":"fas","name":"tint","unicode":"\\f043"},"tint-slash":{"type":"fas","name":"tint-slash","unicode":"\\f5c7"},"tired":{"type":"fas","name":"tired","unicode":"\\f5c8"},"toggle-off":{"type":"fas","name":"toggle-off","unicode":"\\f204"},"toggle-on":{"type":"fas","name":"toggle-on","unicode":"\\f205"},"toilet":{"type":"fas","name":"toilet","unicode":"\\f7d8"},"toilet-paper":{"type":"fas","name":"toilet-paper","unicode":"\\f71e"},"toilet-paper-slash":{"type":"fas","name":"toilet-paper-slash","unicode":"\\e072"},"toolbox":{"type":"fas","name":"toolbox","unicode":"\\f552"},"tools":{"type":"fas","name":"tools","unicode":"\\f7d9"},"tooth":{"type":"fas","name":"tooth","unicode":"\\f5c9"},"torah":{"type":"fas","name":"torah","unicode":"\\f6a0"},"torii-gate":{"type":"fas","name":"torii-gate","unicode":"\\f6a1"},"tractor":{"type":"fas","name":"tractor","unicode":"\\f722"},"trade-federation":{"type":"fab","name":"trade-federation","unicode":"\\f513"},"trademark":{"type":"fas","name":"trademark","unicode":"\\f25c"},"traffic-light":{"type":"fas","name":"traffic-light","unicode":"\\f637"},"trailer":{"type":"fas","name":"trailer","unicode":"\\e041"},"train":{"type":"fas","name":"train","unicode":"\\f238"},"tram":{"type":"fas","name":"tram","unicode":"\\f7da"},"transgender":{"type":"fas","name":"transgender","unicode":"\\f224"},"transgender-alt":{"type":"fas","name":"transgender-alt","unicode":"\\f225"},"trash":{"type":"fas","name":"trash","unicode":"\\f1f8"},"trash-alt":{"type":"fas","name":"trash-alt","unicode":"\\f2ed"},"trash-restore":{"type":"fas","name":"trash-restore","unicode":"\\f829"},"trash-restore-alt":{"type":"fas","name":"trash-restore-alt","unicode":"\\f82a"},"tree":{"type":"fas","name":"tree","unicode":"\\f1bb"},"trello":{"type":"fab","name":"trello","unicode":"\\f181"},"trophy":{"type":"fas","name":"trophy","unicode":"\\f091"},"truck":{"type":"fas","name":"truck","unicode":"\\f0d1"},"truck-loading":{"type":"fas","name":"truck-loading","unicode":"\\f4de"},"truck-monster":{"type":"fas","name":"truck-monster","unicode":"\\f63b"},"truck-moving":{"type":"fas","name":"truck-moving","unicode":"\\f4df"},"truck-pickup":{"type":"fas","name":"truck-pickup","unicode":"\\f63c"},"tshirt":{"type":"fas","name":"tshirt","unicode":"\\f553"},"tty":{"type":"fas","name":"tty","unicode":"\\f1e4"},"tumblr":{"type":"fab","name":"tumblr","unicode":"\\f173"},"tumblr-square":{"type":"fab","name":"tumblr-square","unicode":"\\f174"},"tv":{"type":"fas","name":"tv","unicode":"\\f26c"},"twitch":{"type":"fab","name":"twitch","unicode":"\\f1e8"},"twitter":{"type":"fab","name":"twitter","unicode":"\\f099"},"twitter-square":{"type":"fab","name":"twitter-square","unicode":"\\f081"},"typo3":{"type":"fab","name":"typo3","unicode":"\\f42b"},"uber":{"type":"fab","name":"uber","unicode":"\\f402"},"ubuntu":{"type":"fab","name":"ubuntu","unicode":"\\f7df"},"uikit":{"type":"fab","name":"uikit","unicode":"\\f403"},"umbraco":{"type":"fab","name":"umbraco","unicode":"\\f8e8"},"umbrella":{"type":"fas","name":"umbrella","unicode":"\\f0e9"},"umbrella-beach":{"type":"fas","name":"umbrella-beach","unicode":"\\f5ca"},"uncharted":{"type":"fab","name":"uncharted","unicode":"\\e084"},"underline":{"type":"fas","name":"underline","unicode":"\\f0cd"},"undo":{"type":"fas","name":"undo","unicode":"\\f0e2"},"undo-alt":{"type":"fas","name":"undo-alt","unicode":"\\f2ea"},"uniregistry":{"type":"fab","name":"uniregistry","unicode":"\\f404"},"unity":{"type":"fab","name":"unity","unicode":"\\e049"},"universal-access":{"type":"fas","name":"universal-access","unicode":"\\f29a"},"university":{"type":"fas","name":"university","unicode":"\\f19c"},"unlink":{"type":"fas","name":"unlink","unicode":"\\f127"},"unlock":{"type":"fas","name":"unlock","unicode":"\\f09c"},"unlock-alt":{"type":"fas","name":"unlock-alt","unicode":"\\f13e"},"unsplash":{"type":"fab","name":"unsplash","unicode":"\\e07c"},"untappd":{"type":"fab","name":"untappd","unicode":"\\f405"},"upload":{"type":"fas","name":"upload","unicode":"\\f093"},"ups":{"type":"fab","name":"ups","unicode":"\\f7e0"},"usb":{"type":"fab","name":"usb","unicode":"\\f287"},"user":{"type":"fas","name":"user","unicode":"\\f007"},"user-alt":{"type":"fas","name":"user-alt","unicode":"\\f406"},"user-alt-slash":{"type":"fas","name":"user-alt-slash","unicode":"\\f4fa"},"user-astronaut":{"type":"fas","name":"user-astronaut","unicode":"\\f4fb"},"user-check":{"type":"fas","name":"user-check","unicode":"\\f4fc"},"user-circle":{"type":"fas","name":"user-circle","unicode":"\\f2bd"},"user-clock":{"type":"fas","name":"user-clock","unicode":"\\f4fd"},"user-cog":{"type":"fas","name":"user-cog","unicode":"\\f4fe"},"user-edit":{"type":"fas","name":"user-edit","unicode":"\\f4ff"},"user-friends":{"type":"fas","name":"user-friends","unicode":"\\f500"},"user-graduate":{"type":"fas","name":"user-graduate","unicode":"\\f501"},"user-injured":{"type":"fas","name":"user-injured","unicode":"\\f728"},"user-lock":{"type":"fas","name":"user-lock","unicode":"\\f502"},"user-md":{"type":"fas","name":"user-md","unicode":"\\f0f0"},"user-minus":{"type":"fas","name":"user-minus","unicode":"\\f503"},"user-ninja":{"type":"fas","name":"user-ninja","unicode":"\\f504"},"user-nurse":{"type":"fas","name":"user-nurse","unicode":"\\f82f"},"user-plus":{"type":"fas","name":"user-plus","unicode":"\\f234"},"user-secret":{"type":"fas","name":"user-secret","unicode":"\\f21b"},"user-shield":{"type":"fas","name":"user-shield","unicode":"\\f505"},"user-slash":{"type":"fas","name":"user-slash","unicode":"\\f506"},"user-tag":{"type":"fas","name":"user-tag","unicode":"\\f507"},"user-tie":{"type":"fas","name":"user-tie","unicode":"\\f508"},"user-times":{"type":"fas","name":"user-times","unicode":"\\f235"},"users":{"type":"fas","name":"users","unicode":"\\f0c0"},"users-cog":{"type":"fas","name":"users-cog","unicode":"\\f509"},"users-slash":{"type":"fas","name":"users-slash","unicode":"\\e073"},"usps":{"type":"fab","name":"usps","unicode":"\\f7e1"},"ussunnah":{"type":"fab","name":"ussunnah","unicode":"\\f407"},"utensil-spoon":{"type":"fas","name":"utensil-spoon","unicode":"\\f2e5"},"utensils":{"type":"fas","name":"utensils","unicode":"\\f2e7"},"vaadin":{"type":"fab","name":"vaadin","unicode":"\\f408"},"vector-square":{"type":"fas","name":"vector-square","unicode":"\\f5cb"},"venus":{"type":"fas","name":"venus","unicode":"\\f221"},"venus-double":{"type":"fas","name":"venus-double","unicode":"\\f226"},"venus-mars":{"type":"fas","name":"venus-mars","unicode":"\\f228"},"vest":{"type":"fas","name":"vest","unicode":"\\e085"},"vest-patches":{"type":"fas","name":"vest-patches","unicode":"\\e086"},"viacoin":{"type":"fab","name":"viacoin","unicode":"\\f237"},"viadeo":{"type":"fab","name":"viadeo","unicode":"\\f2a9"},"viadeo-square":{"type":"fab","name":"viadeo-square","unicode":"\\f2aa"},"vial":{"type":"fas","name":"vial","unicode":"\\f492"},"vials":{"type":"fas","name":"vials","unicode":"\\f493"},"viber":{"type":"fab","name":"viber","unicode":"\\f409"},"video":{"type":"fas","name":"video","unicode":"\\f03d"},"video-slash":{"type":"fas","name":"video-slash","unicode":"\\f4e2"},"vihara":{"type":"fas","name":"vihara","unicode":"\\f6a7"},"vimeo":{"type":"fab","name":"vimeo","unicode":"\\f40a"},"vimeo-square":{"type":"fab","name":"vimeo-square","unicode":"\\f194"},"vimeo-v":{"type":"fab","name":"vimeo-v","unicode":"\\f27d"},"vine":{"type":"fab","name":"vine","unicode":"\\f1ca"},"virus":{"type":"fas","name":"virus","unicode":"\\e074"},"virus-slash":{"type":"fas","name":"virus-slash","unicode":"\\e075"},"viruses":{"type":"fas","name":"viruses","unicode":"\\e076"},"vk":{"type":"fab","name":"vk","unicode":"\\f189"},"vnv":{"type":"fab","name":"vnv","unicode":"\\f40b"},"voicemail":{"type":"fas","name":"voicemail","unicode":"\\f897"},"volleyball-ball":{"type":"fas","name":"volleyball-ball","unicode":"\\f45f"},"volume-down":{"type":"fas","name":"volume-down","unicode":"\\f027"},"volume-mute":{"type":"fas","name":"volume-mute","unicode":"\\f6a9"},"volume-off":{"type":"fas","name":"volume-off","unicode":"\\f026"},"volume-up":{"type":"fas","name":"volume-up","unicode":"\\f028"},"vote-yea":{"type":"fas","name":"vote-yea","unicode":"\\f772"},"vr-cardboard":{"type":"fas","name":"vr-cardboard","unicode":"\\f729"},"vuejs":{"type":"fab","name":"vuejs","unicode":"\\f41f"},"walking":{"type":"fas","name":"walking","unicode":"\\f554"},"wallet":{"type":"fas","name":"wallet","unicode":"\\f555"},"warehouse":{"type":"fas","name":"warehouse","unicode":"\\f494"},"watchman-monitoring":{"type":"fab","name":"watchman-monitoring","unicode":"\\e087"},"water":{"type":"fas","name":"water","unicode":"\\f773"},"wave-square":{"type":"fas","name":"wave-square","unicode":"\\f83e"},"waze":{"type":"fab","name":"waze","unicode":"\\f83f"},"weebly":{"type":"fab","name":"weebly","unicode":"\\f5cc"},"weibo":{"type":"fab","name":"weibo","unicode":"\\f18a"},"weight":{"type":"fas","name":"weight","unicode":"\\f496"},"weight-hanging":{"type":"fas","name":"weight-hanging","unicode":"\\f5cd"},"weixin":{"type":"fab","name":"weixin","unicode":"\\f1d7"},"whatsapp":{"type":"fab","name":"whatsapp","unicode":"\\f232"},"whatsapp-square":{"type":"fab","name":"whatsapp-square","unicode":"\\f40c"},"wheelchair":{"type":"fas","name":"wheelchair","unicode":"\\f193"},"whmcs":{"type":"fab","name":"whmcs","unicode":"\\f40d"},"wifi":{"type":"fas","name":"wifi","unicode":"\\f1eb"},"wikipedia-w":{"type":"fab","name":"wikipedia-w","unicode":"\\f266"},"wind":{"type":"fas","name":"wind","unicode":"\\f72e"},"window-close":{"type":"fas","name":"window-close","unicode":"\\f410"},"window-maximize":{"type":"fas","name":"window-maximize","unicode":"\\f2d0"},"window-minimize":{"type":"fas","name":"window-minimize","unicode":"\\f2d1"},"window-restore":{"type":"fas","name":"window-restore","unicode":"\\f2d2"},"windows":{"type":"fab","name":"windows","unicode":"\\f17a"},"wine-bottle":{"type":"fas","name":"wine-bottle","unicode":"\\f72f"},"wine-glass":{"type":"fas","name":"wine-glass","unicode":"\\f4e3"},"wine-glass-alt":{"type":"fas","name":"wine-glass-alt","unicode":"\\f5ce"},"wix":{"type":"fab","name":"wix","unicode":"\\f5cf"},"wizards-of-the-coast":{"type":"fab","name":"wizards-of-the-coast","unicode":"\\f730"},"wodu":{"type":"fab","name":"wodu","unicode":"\\e088"},"wolf-pack-battalion":{"type":"fab","name":"wolf-pack-battalion","unicode":"\\f514"},"won-sign":{"type":"fas","name":"won-sign","unicode":"\\f159"},"wordpress":{"type":"fab","name":"wordpress","unicode":"\\f19a"},"wordpress-simple":{"type":"fab","name":"wordpress-simple","unicode":"\\f411"},"wpbeginner":{"type":"fab","name":"wpbeginner","unicode":"\\f297"},"wpexplorer":{"type":"fab","name":"wpexplorer","unicode":"\\f2de"},"wpforms":{"type":"fab","name":"wpforms","unicode":"\\f298"},"wpressr":{"type":"fab","name":"wpressr","unicode":"\\f3e4"},"wrench":{"type":"fas","name":"wrench","unicode":"\\f0ad"},"x-ray":{"type":"fas","name":"x-ray","unicode":"\\f497"},"xbox":{"type":"fab","name":"xbox","unicode":"\\f412"},"xing":{"type":"fab","name":"xing","unicode":"\\f168"},"xing-square":{"type":"fab","name":"xing-square","unicode":"\\f169"},"y-combinator":{"type":"fab","name":"y-combinator","unicode":"\\f23b"},"yahoo":{"type":"fab","name":"yahoo","unicode":"\\f19e"},"yammer":{"type":"fab","name":"yammer","unicode":"\\f840"},"yandex":{"type":"fab","name":"yandex","unicode":"\\f413"},"yandex-international":{"type":"fab","name":"yandex-international","unicode":"\\f414"},"yarn":{"type":"fab","name":"yarn","unicode":"\\f7e3"},"yelp":{"type":"fab","name":"yelp","unicode":"\\f1e9"},"yen-sign":{"type":"fas","name":"yen-sign","unicode":"\\f157"},"yin-yang":{"type":"fas","name":"yin-yang","unicode":"\\f6ad"},"yoast":{"type":"fab","name":"yoast","unicode":"\\f2b1"},"youtube":{"type":"fab","name":"youtube","unicode":"\\f167"},"youtube-square":{"type":"fab","name":"youtube-square","unicode":"\\f431"},"zhihu":{"type":"fab","name":"zhihu","unicode":"\\f63f"}} \ No newline at end of file diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index ce9a06d..30b0f5c 100755 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -7,7 +7,9 @@ use App\Entity\Cron; use App\Entity\Group; use App\Entity\Icon; use App\Entity\Niveau01; +use App\Entity\Pagecategory; use App\Entity\User; +use App\Entity\Widget; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Id\AssignedGenerator; use Doctrine\ORM\Mapping\ClassMetadata; @@ -54,10 +56,29 @@ class InitCommand extends Command $this->writeln('APP = Default Data'); - // On s'assure que le groupe tout le monde existe $metadata = $this->em->getClassMetaData('App\Entity\Group'); $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); $metadata->setIdGenerator(new AssignedGenerator()); + + $metadata = $this->em->getClassMetaData('App\Entity\Niveau01'); + $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + $metadata->setIdGenerator(new AssignedGenerator()); + + $metadata = $this->em->getClassMetaData('App\Entity\User'); + $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + $metadata->setIdGenerator(new AssignedGenerator()); + + $metadata = $this->em->getClassMetaData('App\Entity\Pagecategory'); + $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + $metadata->setIdGenerator(new AssignedGenerator()); + + $metadata = $this->em->getClassMetaData('App\Entity\Widget'); + $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + $metadata->setIdGenerator(new AssignedGenerator()); + + // == ORGANISATION ======================================================================================================================================== + + // On s'assure que le groupe tout le monde existe $group = $this->em->getRepository('App\Entity\Group')->findOneBy(['id' => '-1']); if (!$group) { $group = new Group(); @@ -71,9 +92,6 @@ class InitCommand extends Command } // On s'assure qu'il exite un niveau01 - $metadata = $this->em->getClassMetaData('App\Entity\Niveau01'); - $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); - $metadata->setIdGenerator(new AssignedGenerator()); $niveau01 = $this->em->getRepository('App\Entity\Niveau01')->findOneBy(['id' => '-1']); if (!$niveau01) { $niveau01 = new Niveau01(); @@ -85,9 +103,6 @@ class InitCommand extends Command } // On s'assure que le user admin existe - $metadata = $this->em->getClassMetaData('App\Entity\User'); - $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); - $metadata->setIdGenerator(new AssignedGenerator()); $user = $this->em->getRepository('App\Entity\User')->findOneBy(['id' => '-1']); if (!$user) { $user = new User(); @@ -116,6 +131,7 @@ class InitCommand extends Command } } + // == CONFIG ============================================================================================================================================== // colorbgbody = Couleur des fonds de page $this->insertConfig( 1, // order @@ -437,7 +453,8 @@ class InitCommand extends Command '', // grouped 'Image de fond de la bannière' ); - $output->writeln(''); + + // == CRON ================================================================================================================================================ // Job synchronisation des comptes utilisateur // Toute les 24h à 3h00 @@ -469,6 +486,8 @@ class InitCommand extends Command $this->em->flush(); + // == ICON ================================================================================================================================================ + $finder = new Finder(); $finder->in('public/medias/icon/'); $finder->name('icon_*'); @@ -483,11 +502,108 @@ class InitCommand extends Command } $this->em->flush(); + // == PAGECATEGORY ======================================================================================================================================== + + $entityPagecategory = $this->em->getRepository('App\Entity\Pagecategory')->find(1); + if (!$entityPagecategory) { + $entityPagecategory = new Pagecategory(); + $entityPagecategory->setId(1); + $entityPagecategory->setName('URL'); + $this->em->persist($entityPagecategory); + } + + $entityPagecategory = $this->em->getRepository('App\Entity\Pagecategory')->find(2); + if (!$entityPagecategory) { + $entityPagecategory = new Pagecategory(); + $entityPagecategory->setId(2); + $entityPagecategory->setName('Widget'); + $this->em->persist($entityPagecategory); + } + + $entityPagecategory = $this->em->getRepository('App\Entity\Pagecategory')->find(3); + if (!$entityPagecategory) { + $entityPagecategory = new Pagecategory(); + $entityPagecategory->setId(3); + $entityPagecategory->setName('Editeur'); + $this->em->persist($entityPagecategory); + } + + // == WIDGET ============================================================================================================================================== + // Widget Page web + $entityWidget = $this->em->getRepository('App\Entity\Widget')->find(-2000); + if (!$entityWidget) { + $entityWidget = new Widget(); + } + $entityicon = $this->em->getRepository('App\Entity\Icon')->findoneby(['label' => 'icon/icon_ribbon.png']); + $entityWidget->setId(-2000); + $entityWidget->setRoworder(0); + $entityWidget->setIcon($entityicon); + $entityWidget->setName('Page web'); + $entityWidget->setDescription("Affiche le contenu d'une page web"); + $entityWidget->setRouteview('app_admin_pagewidget_view_url'); + $entityWidget->setHeight('630'); + $entityWidget->setAutoajust(false); + $entityWidget->setBorder(true); + $entityWidget->setOpened(true); + $entityWidget->setViewheader(true); + $entityWidget->setAccess(['admin', 'all', 'group']); + $parameter = ['fields' => [['id' => 'url', 'loc' => 'col1', 'type' => 'string', 'label' => 'URL', 'value' => '', 'mandatory' => 'true']]]; + $entityWidget->setParameter($parameter); + $this->em->persist($entityWidget); + + // Widget Bureau + $entityWidget = $this->em->getRepository('App\Entity\Widget')->find(-1990); + if (!$entityWidget) { + $entityWidget = new Widget(); + } + $entityicon = $this->em->getRepository('App\Entity\Icon')->findoneby(['label' => 'icon/icon_computer.png']); + $entityWidget->setId(-1990); + $entityWidget->setRoworder(0); + $entityWidget->setIcon($entityicon); + $entityWidget->setName('Bureau'); + $entityWidget->setDescription('Affiche vos items de bureau'); + $entityWidget->setRouteview('app_admin_pagewidget_view_item'); + $entityWidget->setHeight('630'); + $entityWidget->setAutoajust(true); + $entityWidget->setBorder(false); + $entityWidget->setOpened(true); + $entityWidget->setViewheader(true); + $entityWidget->setAccess(['admin', 'all', 'group']); + $parameter = ['fields' => [['id' => 'modedesktop', 'loc' => 'col1', 'type' => 'desktopmode', 'label' => 'Mode Affichage', 'value' => '2', 'mandatory' => 'true'], ['id' => 'withbookmark', 'loc' => 'col1', 'type' => 'withbookmark', 'label' => 'Avec Favoris', 'value' => '0', 'mandatory' => 'true'], ['id' => 'itemcategory', 'loc' => 'col1', 'type' => 'itemcategory', 'label' => 'Catégorie Affichée', 'value' => '', 'mandatory' => 'false'], ['id' => 'search', 'loc' => 'col4', 'type' => 'boolean', 'label' => 'Zone de Recherche', 'value' => '0', 'mandatory' => 'true'], ['id' => 'menu', 'loc' => 'col4', 'type' => 'boolean', 'label' => 'Menu des Catégories', 'value' => '0', 'mandatory' => 'true'], ['id' => 'menuall', 'loc' => 'col4', 'type' => 'boolean', 'label' => 'Menu toutes les Catégories', 'value' => '1', 'mandatory' => 'true']]]; + $entityWidget->setParameter($parameter); + $this->em->persist($entityWidget); + + // Widget Annonce + $entityWidget = $this->em->getRepository('App\Entity\Widget')->find(-1980); + if (!$entityWidget) { + $entityWidget = new Widget(); + } + $entityicon = $this->em->getRepository('App\Entity\Icon')->findoneby(['label' => 'icon/icon_megaphone.png']); + $entityWidget->setId(-1980); + $entityWidget->setRoworder(0); + $entityWidget->setIcon($entityicon); + $entityWidget->setName('Annonces'); + $entityWidget->setDescription('Affiche vos annonces'); + $entityWidget->setRouteview('app_admin_pagewidget_view_alert'); + $entityWidget->setHeight('630'); + $entityWidget->setAutoajust(true); + $entityWidget->setBorder(false); + $entityWidget->setOpened(true); + $entityWidget->setViewheader(true); + $entityWidget->setAccess(['admin', 'all', 'group']); + $parameter = ['fields' => [['id' => 'alertcategory', 'loc' => 'col1', 'type' => 'alertcategory', 'label' => 'Catégorie Affichée', 'value' => '', 'mandatory' => 'false']]]; + $entityWidget->setParameter($parameter); + $this->em->persist($entityWidget); + + $this->em->flush(); + $output->writeln(''); return Command::SUCCESS; } + // == FUNCTIONS =========================================================================================================================================== + private function insertConfig($order, $category, $id, $title, $value, $default, $type, $visible, $changeable, $required, $grouped, $help) { $entity = $this->em->getRepository("App\Entity\Config")->find($id); diff --git a/src/Controller/BookmarkController.php b/src/Controller/BookmarkController.php new file mode 100644 index 0000000..14e495f --- /dev/null +++ b/src/Controller/BookmarkController.php @@ -0,0 +1,341 @@ +query->get('usage'); + $group = $request->query->get('group'); + + // Initialisation de l'enregistrement + $em = $this->getDoctrine()->getManager(); + $data = new Bookmark(); + + // On s'assure que le widget existe + $pagewidget = null; + if ('false' == $touser) { + $pagewidget = $em->getRepository('CadolesPortalBundle:Pagewidget')->find($idwidget); + if (!$pagewidget) { + throw $this->createNotFoundException('Unable to find entity.'); + } + } + + // Vérifier que cet enregistrement est modifiable + if ('user' == $access) { + if ('user' == $usage) { + $user = $pagewidget->getPage()->getUser(); + if ($user != $this->getUser()) { + throw $this->createNotFoundException('Permission denied'); + } + } elseif ('group' == $usage) { + $groupentity = $this->getDoctrine()->getRepository('CadolesCoreBundle:Group')->find($group); + $usergroup = $this->getDoctrine()->getRepository('CadolesCoreBundle:UserGroup')->findoneby(['user' => $this->getUser(), 'group' => $groupentity]); + if (!$usergroup or $usergroup->getRolegroup() < 50) { + throw $this->createNotFoundException('Permission denied'); + } + } + } + + // Création du formulaire + $form = $this->createForm(BookmarkType::class, $data, ['mode' => 'submit']); + + // 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(); + + // Bookmark widget ou desktop + if ('true' == $touser) { + $data->setUser($this->getUser()); + } else { + $data->setPagewidget($pagewidget); + } + + // Icon + $idicon = $form->get('idicon')->getData(); + $icon = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->persist($data); + $em->flush(); + + if ($pagewidget) { + foreach ($pagewidget->getPage()->getGroups() as $groupchat) { + if ($groupchat->getFgcanshare()) { + $message = "Création favoris
".$data->getTitle().''; + $usergroup = $em->getRepository('CadolesCoreBundle:Usergroup')->findOneBy(['group' => $groupchat, 'user' => $this->getUser()]); + if ($usergroup) { + $key = $usergroup->getKeyvalue(); + $websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key, $this->getUser()->getId(), $groupchat->getId(), $message); + } + } + } + } + + // Retour à la page + return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view', ['id' => $idpage, 'usage' => $usage, 'group' => $group])); + } + + $icons = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findBy(['user' => null]); + $iconsuser = null; + if ('user' == $access) { + $iconsuser = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findBy(['user' => $this->getUser()]); + } + + return $this->render($this->labelentity.':edit.html.twig', [ + 'useheader' => ('config' == $access), + 'usemenu' => false, + 'usesidebar' => ('config' == $access), + 'entity' => $data, + 'icons' => $icons, + 'iconsuser' => $iconsuser, + 'mode' => 'submit', + 'access' => $access, + 'idpage' => $idpage, + 'form' => $form->createView(), + 'usage' => $usage, + 'group' => $group, + ]); + } + + public function updateAction(Request $request, $idpage, $id, $access = 'config') + { + $usage = $request->query->get('usage'); + $group = $request->query->get('group'); + + // Récupération de l'enregistrement courant + $em = $this->getDoctrine()->getManager(); + $data = $this->getData($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Vérifier que cet enregistrement est modifiable + $user = $data->getUser(); + if ($user) { + if ('user' == $usage) { + if ($user != $this->getUser()) { + throw $this->createNotFoundException('Permission denied'); + } + } + } elseif ('user' == $access) { + if ('user' == $usage) { + $user = $data->getPagewidget()->getPage()->getUser(); + if ($user != $this->getUser()) { + throw $this->createNotFoundException('Permission denied'); + } + } else { + $groupentity = $this->getDoctrine()->getRepository('CadolesCoreBundle:Group')->find($group); + $usergroup = $this->getDoctrine()->getRepository('CadolesCoreBundle:UserGroup')->findoneby(['user' => $this->getUser(), 'group' => $groupentity]); + if (!$usergroup or $usergroup->getRolegroup() < 50) { + throw $this->createNotFoundException('Permission denied'); + } + } + } + + // Création du formulaire + $form = $this->createForm(BookmarkType::class, $data, [ + 'mode' => 'update', + 'idicon' => ($data->getIcon() ? $data->getIcon()->getId() : null), + ]); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur erreur + $this->getErrorForm($id, $form, $request, $data, 'update'); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + + // Icon + $idicon = $form->get('idicon')->getData(); + $icon = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findoneby(['id' => $idicon]); + $data->setIcon($icon); + + // Sauvegarde + $em->persist($data); + $em->flush(); + + $pagewidget = $data->getPagewidget(); + if ($pagewidget) { + foreach ($pagewidget->getPage()->getGroups() as $groupchat) { + if ($groupchat->getFgcanshare()) { + $message = "Modification favoris
".$data->getTitle().''; + $usergroup = $em->getRepository('CadolesCoreBundle:Usergroup')->findOneBy(['group' => $groupchat, 'user' => $this->getUser()]); + if ($usergroup) { + $key = $usergroup->getKeyvalue(); + $websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key, $this->getUser()->getId(), $groupchat->getId(), $message); + } + } + } + } + + // Retour à la page + return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view', ['id' => $idpage, 'usage' => $usage, 'group' => $group])); + } + + $icons = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findBy(['user' => null]); + $iconsuser = null; + if ('user' == $access) { + $iconsuser = $this->getDoctrine()->getRepository('CadolesPortalBundle:Icon')->findBy(['user' => $this->getUser()]); + } + + // Affichage du formulaire + return $this->render($this->labelentity.':edit.html.twig', [ + 'useheader' => ('config' == $access), + 'usemenu' => false, + 'usesidebar' => ('config' == $access), + 'entity' => $data, + 'icons' => $icons, + 'iconsuser' => $iconsuser, + 'mode' => 'update', + 'access' => $access, + 'idpage' => $idpage, + 'form' => $form->createView(), + 'usage' => $usage, + 'group' => $group, + ]); + } + + public function deleteAction(Request $request, $idpage, $id, $access = 'config') + { + $usage = $request->query->get('usage'); + $group = $request->query->get('group'); + + // Récupération de l'enregistrement courant + $em = $this->getDoctrine()->getManager(); + $data = $this->getData($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Vérifier que cet enregistrement est supprimable + $user = $data->getUser(); + if ($user) { + if ($user != $this->getUser()) { + throw $this->createNotFoundException('Permission denied'); + } + } elseif ('user' == $access) { + if ('user' == $usage) { + $user = $data->getPagewidget()->getPage()->getUser(); + if ($user != $this->getUser()) { + throw $this->createNotFoundException('Permission denied'); + } + } else { + $groupentity = $this->getDoctrine()->getRepository('CadolesCoreBundle:Group')->find($group); + $usergroup = $this->getDoctrine()->getRepository('CadolesCoreBundle:UserGroup')->findoneby(['user' => $this->getUser(), 'group' => $groupentity]); + if (!$usergroup or $usergroup->getRolegroup() < 50) { + throw $this->createNotFoundException('Permission denied'); + } + } + } + + // Supprimer la donnée + $em = $this->getDoctrine()->getManager(); + $em->remove($data); + $em->flush(); + + // Retour à la page + return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view', ['id' => $idpage, 'usage' => $usage, 'group' => $group])); + } + + public function heart(Request $request, ManagerRegistry $em): Response + { + $output = []; + $iditem = $request->request->get('iditem'); + + // On s'assure que l'item existe + $item = $em->getRepository("App\Entity\Item")->find($iditem); + if (!$item) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // On s'assure que l'item n'existe pas déjà dans les bookmark de l'utilisateur + $user = $this->getUser(); + $bookmark = $em->getRepository($this->entity)->findOneBy(['user' => $user, 'item' => $item]); + if (!$bookmark) { + $bookmark = new Bookmark(); + $bookmark->setTitle($item->getTitle()); + $bookmark->setSubtitle($item->getSubtitle()); + $bookmark->setUrl($item->getUrl()); + $bookmark->setIcon($item->getIcon()); + $bookmark->setColor($item->getColor()); + $bookmark->setTarget($item->getTarget()); + $bookmark->setItem($item); + $bookmark->setUser($user); + + $em->getManager()->persist($bookmark); + $em->getManager()->flush(); + } + + $output = $bookmark->getId(); + + return new JsonResponse($output); + } + + protected function getDatas() + { + $em = $this->getDoctrine()->getManager(); + $datas = $em->getRepository($this->labelentity)->findAll(); + + return $datas; + } + + protected function getData($id) + { + $em = $this->getDoctrine()->getManager(); + $data = $em->getRepository($this->labelentity)->find($id); + + if (!$data) { + throw $this->createNotFoundException('Unable to find '.$this->labeldata); + } + + return $data; + } + + protected function getErrorForm($id, $form, $request, $data, $mode) + { + if ($form->get('submit')->isClicked() && 'delete' == $mode) { + } + + if ($form->get('submit')->isClicked() && 'submit' == $mode) { + } + + if ($form->get('submit')->isClicked() && !$form->isValid()) { + $this->get('session')->getFlashBag()->clear(); + $validator = $this->get('validator'); + $errors = $validator->validate($data); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + + $errors = $form->getErrors(); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + } + } +} diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index d244598..513170c 100755 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -2,22 +2,21 @@ namespace App\Controller; +use Doctrine\Persistence\ManagerRegistry; 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,ManagerRegistry $em) + 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); - dump($items); - dump($itemscategorys); + $em->getRepository("App\Entity\Item")->getUserItems($this->getUser(), $bookmarks, $items, $itemscategorys); + return $this->render('Home/page.html.twig', [ 'useheader' => true, 'usemenu' => false, diff --git a/src/Controller/ItemController.php b/src/Controller/ItemController.php index f52939f..ecf31ca 100644 --- a/src/Controller/ItemController.php +++ b/src/Controller/ItemController.php @@ -59,7 +59,7 @@ class ItemController extends AbstractController $data = new Item(); // Création du formulaire - $form = $this->createForm(ItemType::class, $data, ['mode' => 'submit','access'=>$access]); + $form = $this->createForm(ItemType::class, $data, ['mode' => 'submit', 'access' => $access]); // Récupération des data du formulaire $form->handleRequest($request); @@ -102,7 +102,7 @@ class ItemController extends AbstractController } // Création du formulaire - $form = $this->createForm(ItemType::class, $data, ['mode' => 'update', 'access' => $access,'idicon' => ($data->getIcon() ? $data->getIcon()->getId() : null)]); + $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); @@ -169,11 +169,13 @@ class ItemController extends AbstractController } $data->setRoworder($order); - $itemcategory=$em->getRepository("App\Entity\Itemcategory")->find($categoryid); - if($itemcategory) $data->setItemcategory($itemcategory); - + $itemcategory = $em->getRepository("App\Entity\Itemcategory")->find($categoryid); + if ($itemcategory) { + $data->setItemcategory($itemcategory); + } + $em->getManager()->flush(); - return new JsonResponse($output); - } + return new JsonResponse($output); + } } diff --git a/src/Controller/ItemcategoryController.php b/src/Controller/ItemcategoryController.php index 0e5e5ad..91342db 100644 --- a/src/Controller/ItemcategoryController.php +++ b/src/Controller/ItemcategoryController.php @@ -2,14 +2,13 @@ namespace App\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\JsonResponse; -use Doctrine\Persistence\ManagerRegistry; - use App\Entity\Itemcategory; use App\Form\ItemcategoryType; +use Doctrine\Persistence\ManagerRegistry; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; class ItemcategoryController extends AbstractController { @@ -60,34 +59,33 @@ class ItemcategoryController extends AbstractController if (!$data) { throw $this->createNotFoundException('Unable to find entity.'); } - + // Création du formulaire - $form = $this->createForm(ItemcategoryType::class,$data,array("mode"=>"update")); + $form = $this->createForm(ItemcategoryType::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.'_', '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() + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + $this->data => $data, + 'mode' => 'update', + 'form' => $form->createView(), ]); } @@ -108,7 +106,7 @@ class ItemcategoryController extends AbstractController return $this->redirectToRoute($this->route.'_update', ['id' => $id]); } - + return $this->redirectToRoute(str_replace('_admin_', '_'.$access.'_', 'app_admin_item')); } @@ -126,6 +124,6 @@ class ItemcategoryController extends AbstractController $data->setRoworder($order); $em->getManager()->flush(); - return new JsonResponse($output); - } + return new JsonResponse($output); + } } diff --git a/src/Controller/PagetemplateController.php b/src/Controller/PagetemplateController.php new file mode 100644 index 0000000..ed8aab1 --- /dev/null +++ b/src/Controller/PagetemplateController.php @@ -0,0 +1,322 @@ +render($this->twig.'list.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + 'access' => $access, + ]); + } + + public function tablelist($access, Request $request, ManagerRegistry $em): Response + { + $query = $request->query->all(); + $start = $query['start']; + $length = $query['length']; + $search = $query['search']; + $draw = $query['draw']; + $ordercolumn = $query['order'][0]['column']; + $orderdir = $query['order'][0]['dir']; + + // Query de base + $qbase = $em->getManager()->createQueryBuilder()->from($this->entity, 'table'); + $qsearch = $em->getManager()->createQueryBuilder()->from($this->entity, 'table'); + + $qbase->where('table.user is null'); + $qbase->andWhere('table.parentfor is not null'); + $qsearch->where('table.user is null'); + $qsearch->andWhere('table.parentfor is not null'); + $qsearch->andwhere('table.id LIKE :value OR table.name LIKE :value OR table.parentfor LIKE :value'); + $qsearch->setParameter('value', '%'.$search['value'].'%'); + + // Nombre total d'enregistrement + $total = $qbase->select('COUNT(table)')->getQuery()->getSingleScalarResult(); + + // Nombre d'enregistrement filtré + if ('' == $search['value']) { + $totalf = $total; + } else { + $totalf = $qsearch->select('COUNT(table)')->getQuery()->getSingleScalarResult(); + } + + // Parcours des Enregistrement + if ('' == $search['value']) { + $qb = $qbase->select('table'); + } else { + $qb = $qsearch->select('table'); + } + + // Order + if ($ordercolumn) { + switch ($ordercolumn) { + case 1: + $qb->orderBy('table.roworder', $orderdir); + break; + case 2: + $qb->orderBy('table.name', $orderdir); + break; + case 3: + $qb->orderBy('table.parentfor', $orderdir); + break; + } + } + + // Execution de la requete d'affichage + $datas = $qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult(); + + // Construction du tableau de retour + $output = [ + 'draw' => $draw, + 'recordsFiltered' => $totalf, + 'recordsTotal' => $total, + 'data' => [], + ]; + foreach ($datas as $data) { + $route = str_replace('_admin_', '_'.$access.'_', $this->route); + $action = ''; + $action .= " $data->getId()])."'>"; + $action .= " $data->getId()])."'>"; + + array_push($output['data'], [ + $action, + $data->getRoworder(), + $data->getName(), + $data->getParentfor(), + ]); + } + + // Retour + return new Response(json_encode($output), 200); + } + + private function entityForm(Page $entity, $access, $em) + { + $route = str_replace('_admin_', '_'.$access.'_', $this->route); + + if ($em->getManager()->contains($entity)) { + return $this->createForm(PageUpdateWidgetType::class, $entity, [ + 'mode' => 'update', + 'access' => $access, + 'for' => $entity->getParentfor(), + ]); + } else { + return $this->createForm(PagetemplateSubmitType::class, $entity, [ + 'mode' => 'update', + 'access' => $access, + ]); + } + } + + public function submit($access, Request $request, ManagerRegistry $em): Response + { + $pagecategory = $em->getRepository("App\Entity\Pagecategory")->find(2); + $data = new Page(); + $data->setMaxwidth(0); + $data->setRoworder(0); + $data->setParentfor('user'); + $data->setPagecategory($pagecategory); + + $form = $this->entityForm($data, $access, $em); + $form->handleRequest($request); + + // Sur erreur + if ('app' == $data->getParentfor()) { + $tmp = $em->getRepository($this->entity)->findOneBy(['parentfor' => 'app']); + if ($tmp) { + $form->addError(new FormError("Il ne peut avoir qu'un seul template de type Application")); + } + } + + $data = $form->getData(); + + if ($form->get('submit')->isClicked() && $form->isValid()) { + // Sauvegarde + $em->getManager()->persist($data); + $em->getManager()->flush(); + + $route = str_replace('_admin_', '_'.$access.'_', $this->route); + + return $this->redirect($this->generateUrl($route.'_update', ['id' => $data->getId()])); + } + + return $this->render('Pagetemplate\submit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + $this->data => $data, + 'mode' => 'submit', + 'access' => $access, + 'form' => $form->createView(), + ]); + } + + public function update($id, $access, Request $request, ManagerRegistry $em): Response + { + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Création du formulaire + $form = $this->entityForm($data, $access, $em); + $form->handleRequest($request); + + if ($form->get('submit')->isClicked() && $form->isValid()) { + $em->getManager()->flush(); + $route = str_replace('_admin_', '_'.$access.'_', $this->route); + + return $this->redirect($this->generateUrl($route.'_view', ['id' => $id])); + } + + return $this->render('Page\updatewidget.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + $this->data => $data, + 'access' => $access, + 'mode' => 'updatetemplate', + 'form' => $form->createView(), + ]); + } + + public function delete($id, $access, Request $request, ManagerRegistry $em): Response + { + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // On s'assure que l'utilisateur à la permission de supprimer + if ('all' == $access) { + $em->getRepository($this->entity)->getPermission($this->getUser(), $data, $cansee, $canupdate); + if (!$canupdate) { + throw $this->createNotFoundException('Permission denied'); + } + } + + // Tentative de suppression + try { + $group = $em->getRepository("App\Entity\Group")->findOneBy(['pagetemplate' => $data]); + if ($group) { + throw new \Exception('Impossible de supprimer ce modèle, il est utilisé par au moins un groupe'); + } + + if ('app' == $data->getParentfor()) { + throw new \Exception('Vous ne pouvez pas supprimer un template de type Application'); + } + + $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]); + } + + // Retour + return $this->redirect($this->generateUrl($this->route)); + } + + public function seleclist(Request $request) + { + // S'assurer que c'est un appel ajax + if (!$request->isXmlHttpRequest()) { + return new JsonResponse(['message' => 'Interdit'], 400); + } + + $output = []; + $em = $this->getDoctrine()->getManager(); + $page_limit = $request->query->get('page_limit'); + $q = $request->query->get('q'); + $usage = $request->query->get('usage'); + + $qb = $em->createQueryBuilder(); + $qb->select('table')->from('App:Page', 'table') + ->where('table.name LIKE :value') + ->andWhere('table.parentfor=:usage') + ->setParameter('value', '%'.$q.'%') + ->setParameter('usage', $usage) + ->orderBy('table.name'); + + $datas = $qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult(); + foreach ($datas as $data) { + array_push($output, ['id' => $data->getId(), 'text' => $data->getName()]); + } + + $response = new Response(json_encode($output)); + $response->headers->set('Content-Type', 'application/json'); + + return $response; + } + + public function view($id, $access, Request $request, ManagerRegistry $em): Response + { + $data = $em->getRepository($this->entity)->find($id); + if (!$data) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Permissions + $canupdate = true; + + dump($em->getRepository("App\Entity\Widget")->getWidgetAccess($access)); + + return $this->render('Page\viewwidget.html.twig', [ + 'useheader' => true, + 'usemenu' => true, + 'usesidebar' => true, + $this->data => $data, + 'access' => $access, + 'canupdate' => $canupdate, + 'mode' => 'viewtemplate', + 'widgets' => $em->getRepository("App\Entity\Widget")->getWidgetAccess($access), + 'usage' => 'config', + 'group' => '', + 'look' => 'view', + 'selwidget' => null, + ]); + } + + protected function getErrorForm($id, $form, $request, $data, $mode) + { + if ($form->get('submit')->isClicked() && 'delete' == $mode) { + } + + if ($form->get('submit')->isClicked() && ('submit' == $mode)) { + } + + if ($form->get('submit')->isClicked() && !$form->isValid()) { + $this->get('session')->getFlashBag()->clear(); + $validator = $this->get('validator'); + $errors = $validator->validate($data); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + + $errors = $form->getErrors(); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + } + } +} diff --git a/src/Controller/PagewidgetController.php b/src/Controller/PagewidgetController.php new file mode 100644 index 0000000..0829c4f --- /dev/null +++ b/src/Controller/PagewidgetController.php @@ -0,0 +1,1799 @@ +searchArray($subarray, $key, $value)); + } + } + + return $results; + } + + private function entityForm(ManagerRegistry $em, Pagewidget $entity, $idpage, $id, $access = 'config', $by = 'view') + { + if ($em->getManager()->contains($entity)) { + $widgettype = $em->getRepository('App\Entity\Pagewidget')->find($id)->getWidget(); + $params = $widgettype->getParameter(); + $values = $entity->getParameter(); + + foreach ($params['fields'] as $key => $param) { + $tmp = $this->searchArray($values, 'id', $param['id']); + if (is_array($tmp) && !empty($tmp)) { + $params['fields'][$key]['value'] = $tmp[0]['value']; + } else { + $params['fields'][$key]['value'] = $param['value']; + } + } + + return $this->createForm(PagewidgetType::class, $entity, [ + 'param' => $params, + 'mode' => 'update', + 'access' => $access, + 'idicon' => ($entity->getIcon() ? $entity->getIcon()->getId() : $widgettype->getIcon()->getId()), + 'method' => 'POST', + ]); + } else { + $widgettype = $em->getManager()->getRepository("App\Entity\Widget")->find($id); + $entity->setName($widgettype->getName()); + $entity->setHeight($widgettype->getHeight()); + $entity->setAutoajust($widgettype->isAutoajust()); + $entity->setBorder($widgettype->isBorder()); + $entity->setViewheader($widgettype->isViewheader()); + $entity->setColorheaderback($widgettype->getColorheaderback()); + $entity->setColorheaderfont($widgettype->getColorheaderfont()); + $entity->setColorbodyback($widgettype->getColorbodyback()); + $entity->setColorbodyfont($widgettype->getColorbodyfont()); + $entity->setIcon($widgettype->getIcon()); + + $param = $widgettype->getParameter(); + + return $this->createForm(PagewidgetType::class, $entity, [ + 'param' => $param, + 'mode' => ('view' == $by ? 'submit' : 'submittemplate'), + 'access' => $access, + 'idicon' => $widgettype->getIcon()->getId(), + 'method' => 'POST', + ]); + } + } + + public function submit($access, $idpage, $idwidgettype, Request $request, ManagerRegistry $em): Response + { + $by = $request->query->get('by'); + $entity = new Pagewidget(); + $form = $this->entityForm($em, $entity, $idpage, $idwidgettype, $access, $by); + $form->handleRequest($request); + + // On s'assure que la page où l'on souhaite insérer un widget est bien du bon type + $page = $em->getRepository("App\Entity\Page")->findoneby(['id' => $idpage]); + if (!$page) { + throw $this->createNotFoundException('Unable to find entity.'); + } + if (2 != $page->getPagecategory()->getId()) { + throw $this->createNotFoundException('Permission denied'); + } + + // Sur erreur + $this->getErrorForm(null, $form, $request, $idwidgettype, $page, $entity, 'submit'); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $widgettype = $em->getRepository('App\Entity\Widget')->findoneby(['id' => $idwidgettype]); + + // Localisation par défaut en R1C1 + $entity->setLoc('R1C1'); + $entity->setRoworder('1'); + + // Rattachement icon / panel / widgettype + $entity->setIcon($icon); + $entity->setPage($page); + $entity->setWidget($widgettype); + + // Récupération des paramétres + $jsons = $widgettype->getParameter(); + $param = []; + $param['fields'] = []; + foreach ($jsons['fields'] as $field) { + $tmp = []; + $tmp['id'] = $field['id']; + $tmp['value'] = ('hidden' != $field['type'] ? $form->get($field['id'])->getData() : ''); + array_push($param['fields'], $tmp); + } + + $entity->setParameter($param); + + $em = $em->getManager(); + $em->persist($entity); + $em->flush(); + + // Notification création widget + $groups = $page->getGroups(); + if ($groups[0]) { + if ($groups[0]->getFgcanshare()) { + $message = 'Création Widget '.$entity->getName(); + $this->wss->addMessage($this->getuser()->getApikey(), $groups[0]->getId(), $message); + } + } + + if ('admin' == $access) { + if ('view' == $by) { + return $this->redirect($this->generateUrl('app_admin_page_view', ['id' => $idpage])); + } else { + return $this->redirect($this->generateUrl('app_admin_pagetemplate_view', ['id' => $idpage])); + } + } else { + return $this->redirect($this->generateUrl('app_home', ['id' => $idpage])); + } + } + + $icons = $em->getRepository('App\Entity\Icon')->findBy(['user' => null]); + $iconsuser = null; + if ('all' == $access) { + $iconsuser = $em->getRepository('App\Entity\Icon')->findBy(['user' => $this->getUser()]); + } + + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => ('config' == $access), + 'maxwidth' => ('user' == $access), + 'entity' => $entity, + 'icons' => $icons, + 'iconsuser' => $iconsuser, + 'mode' => ('view' == $by ? 'submit' : 'submittemplate'), + 'access' => $access, + 'idpage' => $idpage, + 'form' => $form->createView(), + ]); + } + + public function update($access, $idpage, $idwidget, Request $request, ManagerRegistry $em): Response + { + $by = $request->query->get('by'); + $usage = $request->query->get('usage'); + $group = $request->query->get('group'); + + // Recherche du pagewidget + $entity = $em->getRepository($this->labelentity)->find($idwidget); + if (!$entity) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // On s'assure que l'utilisateur à la permission de modifier + if ('all' == $access) { + $em->getRepository('App\Entity\Page')->getPermission($this->getUser(), $entity->getPage(), $cansee, $canupdate, $canadd); + if (!$canupdate) { + throw $this->createNotFoundException('Permission denied'); + } + } + + // Création du formulaire + $form = $this->entityForm($em, $entity, $idpage, $idwidget, $access, $by); + $form->handleRequest($request); + + // Validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $idicon = $form->get('idicon')->getData(); + $icon = $em->getRepository('App\Entity\Icon')->findoneby(['id' => $idicon]); + $entity->setIcon($icon); + + // Récupération des paramétres + $widgettype = $entity->getWidget(); + $jsons = $widgettype->getParameter(); + $param = []; + $param['fields'] = []; + foreach ($jsons['fields'] as $field) { + $tmp = []; + $tmp['id'] = $field['id']; + + $tmp['value'] = ('hidden' != $field['type'] ? $form->get($field['id'])->getData() : ''); + array_push($param['fields'], $tmp); + } + + $entity->setParameter($param); + + $em->getManager()->flush(); + + // Si widget RSS On supprime le potentiel cache de ce flux + if (-1880 == $entity->getWidget()->getId()) { + $dir = $this->container->getParameter('kernel.root_dir').'/../web/uploads/flux/'; + $mask = $dir.'widget-'.$entity->getId().'.*'; + array_map('unlink', glob($mask)); + } + + // Retour + if ('view' == $by) { + return $this->redirect($this->generateUrl('app_'.$access.'_page_view', ['id' => $idpage, 'usage' => $usage, 'group' => $group])); + } else { + return $this->redirect($this->generateUrl('app_'.$access.'_pagetemplate_view', ['id' => $idpage])); + } + } + + $icons = $em->getRepository('App\Entity\Icon')->findBy(['user' => null]); + $iconsuser = null; + if ('all' == $access) { + $iconsuser = $this->getDoctrine()->getRepository('App:Icon')->findBy(['user' => $this->getUser()]); + } + + return $this->render($this->twig.'edit.html.twig', [ + 'useheader' => ('admin' == $access), + 'usemenu' => false, + 'usesidebar' => ('admin' == $access), + 'maxwidth' => ('all' == $access), + 'entity' => $entity, + 'icons' => $icons, + 'iconsuser' => $iconsuser, + 'mode' => ('view' == $by ? 'update' : 'updatetemplate'), + 'access' => $access, + 'idpage' => $idpage, + 'form' => $form->createView(), + 'usage' => $usage, + 'group' => $group, + ]); + } + + public function delete($access, $idwidget, Request $request, ManagerRegistry $em): Response + { + // Récupération des parametres + $output = []; + + // Recherche du pagetwidget + $entity = $em->getRepository($this->labelentity)->find($idwidget); + if (!$entity) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // On s'assure que l'utilisateur à la permission de supprimer + if ('all' == $access) { + $em->getRepository('App\Entity\Page')->getPermission($this->getUser(), $entity->getPage(), $cansee, $canupdate, $canadd); + if (!$canupdate) { + throw $this->createNotFoundException('Permission denied'); + } + } + + // Tentative de suppression + try { + $em->getManager()->remove($entity); + $em->getManager()->flush(); + } catch (\Exception $e) { + $request->getSession()->getFlashBag()->add('error', $e->getMessage()); + throw $this->createNotFoundException('Permission denied'); + } + + return new JsonResponse($output); + } + + public function order(Request $request) + { + // S'assurer que c'est un appel ajax + if (!$request->isXmlHttpRequest()) { + return new JsonResponse(['message' => 'Interdit'], 400); + } + + $output = []; + $idwidget = $request->request->get('idwidget'); + $order = $request->request->get('order'); + $idloc = $request->request->get('idloc'); + + $em = $this->getDoctrine()->getManager(); + $entity = $em->getRepository($this->labelentity)->find($idwidget); + if (!$entity) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + $entity->setRoworder($order); + $entity->setLoc($idloc); + $em->persist($entity); + $em->flush(); + + $response = new Response(json_encode($output)); + $response->headers->set('Content-Type', 'application/json'); + + return $response; + } + + public function upload(Request $request, $access = null) + { + // Fichier temporaire uploadé + $tmpfile = $request->files->get('upload'); + $extention = $tmpfile->getClientOriginalExtension(); + + // Répertoire de Destination + $fs = new Filesystem(); + $rootdir = $this->get('kernel')->getRootDir().'/../web'; + $fs->mkdir($rootdir.'/uploads/ckeditor'); + + // Fichier cible + $targetName = uniqid().'.'.$extention; + $targetFile = $rootdir.'/uploads/ckeditor/'.$targetName; + $targetUrl = '/'.$this->getParameter('alias').'/uploads/ckeditor/'.$targetName; + $message = ''; + + move_uploaded_file($tmpfile, $targetFile); + + $output['uploaded'] = 1; + $output['fileName'] = $targetName; + $output['url'] = $targetUrl; + + return new Response(json_encode($output)); + } + + protected function getErrorForm($id, $form, $request, $idwidgettype, $page, $data, $mode) + { + if ($form->get('submit')->isClicked() && 'delete' == $mode) { + } + + if ($form->get('submit')->isClicked() && ('submit' == $mode || 'update' == $mode)) { + // Interdire l'insertion de 2 chat dans la meme page + if (-1840 == $idwidgettype) { + $pagewidget = $this->getDoctrine()->getRepository('App\Entity\Pagewidget')->findoneby(['page' => $page, 'widget' => -1840]); + if ($pagewidget) { + $form->addError(new FormError('Vous ne pouvez pas insérer deux widgets de type Chat dans la même page')); + } + } + } + + if ($form->get('submit')->isClicked() && !$form->isValid()) { + $this->get('session')->getFlashBag()->clear(); + $validator = $this->get('validator'); + $errors = $validator->validate($data); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + + $errors = $form->getErrors(); + foreach ($errors as $error) { + $request->getSession()->getFlashBag()->add('error', $error->getMessage()); + } + } + } + + protected function setRequest($em, $request, $id, $access) + { + $this->em = $em; + $this->user = $this->getUser(); + $this->id = $id; + $this->access = $access; + $this->look = $request->query->get('look'); + $this->selwidget = $request->query->get('selwidget'); + $this->usage = $request->query->get('usage'); + $this->group = $request->query->get('group'); + + // Le widget existe-t-il ? + $this->entity = $this->em->getRepository($this->labelentity)->find($this->id); + if (!$this->entity) { + throw $this->createNotFoundException('Unable to find entity.'); + } + + // Permissions + if ('admin' == $this->access) { + $this->canupdate = true; + } else { + // On s'assure que l'utilisateur à la permission de voir + $this->page = $this->entity->getPage(); + $this->em->getRepository('App\Entity\Page')->getPermission($this->user, $this->page, $this->cansee, $this->canupdate, $this->canadd); + if (!$this->cansee) { + throw $this->createNotFoundException('Permission denied'); + } + } + + // Affichage miniature ? + $this->mini = ('list' == $this->look && $this->entity->getId() != $this->selwidget); + + // Préference utilisateur + if (!$this->mini) { + $this->getPreference($this->entity); + } + } + + protected function getPreference(&$entity) + { + $user = $this->getUser(); + if ($user) { + $preference = $user->getPreference(); + $id = $entity->getId(); + + // Preference widgetshowhide + if ('list' == $this->look) { + $entity->setOpened(true); + $entity->setBorder(false); + } else { + if (is_array($preference)) { + if (array_key_exists('widgetshowhide', $preference)) { + if (array_key_exists($id, $preference['widgetshowhide'])) { + $entity->setOpened('true' == $preference['widgetshowhide'][$id]); + } + } + } + } + } + } + + protected function getKeyPreference(&$entity, $key, $value) + { + $user = $this->getUser(); + if (!$user) { + return $value; + } + + $preference = $user->getPreference(); + $id = $entity->getId(); + + if (!is_array($preference)) { + return $value; + } + + if (!array_key_exists($key, $preference)) { + return $value; + } + + if (!array_key_exists($id, $preference[$key])) { + return $value; + } + + return $preference[$key][$id]; + } + + protected function getRender($view, $params) + { + // Paramétres toujours présent dans un rendu de widget + $allways = [ + 'entity' => $this->entity, + 'canupdate' => $this->canupdate, + 'access' => $this->access, + 'look' => $this->look, + 'mini' => $this->mini, + ]; + + // Parametres spéficiques + $params = array_merge($allways, $params); + + // Rendu + return $this->render($this->twig.'\\'.$view, $params); + } + + public function viewurl($id, $access, Request $request) + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $url = ''; + $imagemedia = false; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + foreach ($this->entity->getParameter()['fields'] as $parameter) { + if ('url' == $parameter['id']) { + $url = $parameter['value']; + } + } + + // Gestion des url youtuve + $url = str_replace('http://www.youtube.com', 'https://www.youtube.com', $url); + $url = str_replace('https://www.youtube.com/watch?v=', 'https://www.youtube.com/embed/', $url); + + // Detecter le type de lien + $pathinfo = pathinfo($url); + + // Type image + if (array_key_exists('extension', $pathinfo)) { + if ('jpg' == $pathinfo['extension'] || 'gif' == $pathinfo['extension'] || 'png' == $pathinfo['extension']) { + $imagemedia = true; + } + } + // Si url classique on igonore l'usage de la sonde dnma + else { + if (false === stripos($url, '?')) { + $url .= '?notsondednma=true'; + } else { + $url .= '¬sondednma=true'; + } + } + + // Spécifique Deviant Art + if (false !== strpos($url, 'images-wixmp')) { + $imagemedia = true; + } + } + + return $this->getRender('viewurl.html.twig', [ + 'url' => $url, + 'imagemedia' => $imagemedia, + ]); + } + + public function viewurlfixe(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $url = ''; + $imagemedia = false; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + $widgettype = $this->entity->getWidget(); + $jsons = $widgettype->getParameter(); + $param = []; + $param['fields'] = []; + foreach ($jsons->fields as $field) { + if ('url' == $field->id) { + $url = $field->value; + } + } + + // Gestion des url youtuve + $url = str_replace('http://www.youtube.com', 'https://www.youtube.com', $url); + $url = str_replace('https://www.youtube.com/watch?v=', 'https://www.youtube.com/embed/', $url); + + // Detecter le type de lien + $pathinfo = pathinfo($url); + + // Type image + if (array_key_exists('extension', $pathinfo)) { + if ('jpg' == $pathinfo['extension'] || 'gif' == $pathinfo['extension'] || 'png' == $pathinfo['extension']) { + $imagemedia = true; + } + } + + // Spécifique Deviant Art + if (false !== strpos($url, 'images-wixmp')) { + $imagemedia = true; + } + } + + return $this->getRender('viewurl.html.twig', [ + 'url' => $url, + 'imagemedia' => $imagemedia, + ]); + } + + public function viewitem($access, $id, Request $request, ManagerRegistry $em) + { + // Récupération de la requete + $this->setRequest($em, $request, $id, $access); + + // Valeur par défaut + $modedesktop = 0; + $menu = false; + $menuall = true; + $search = false; + $withbookmark = true; + $bookmarks = null; + $itemsordered = null; + $itemcategorys = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + $iditemcategory = null; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modedesktop': + $modedesktop = $parameter['value']; + break; + + case 'withbookmark': + $withbookmark = $parameter['value']; + break; + + case 'itemcategory': + $iditemcategory = $parameter['value']; + break; + + case 'search': + $search = (1 == $parameter['value']); + break; + + case 'menu': + $menu = (1 == $parameter['value']); + break; + + case 'menuall': + $menuall = (1 == $parameter['value']); + break; + } + } + + // Préference utilisateur + $modedesktop = $this->getKeyPreference($this->entity, 'modedesktop', $modedesktop); + + // Profilage + $this->em->getRepository('App\Entity\Item')->getUserItems($this->user, $bookmarks, $items, $itemcategorys, $iditemcategory, $withbookmark, false); + } + + // Render + return $this->getRender('viewitem.html.twig', [ + 'canadd' => $this->user, + 'modedesktop' => $modedesktop, + 'search' => $search, + 'menu' => $menu, + 'menuall' => $menuall, + 'withbookmark' => $withbookmark, + 'bookmarks' => $bookmarks, + 'items' => $items, + 'itemcategorys' => $itemcategorys, + ]); + } + + public function viewitemessential(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $modedesktop = 0; + $itemsordered = null; + $bookmarks = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modedesktop': + $modedesktop = $parameter['value']; + break; + } + } + + // Préference utilisateur + $modedesktop = $this->getKeyPreference($this->entity, 'modedesktop', $modedesktop); + + // Profilage + $itemsordered = $this->em->getRepository('App:Item')->getUserItems($this->user, $bookmarks, $items, $itemcategorys, null, $this->get('session')->get('ssoitems'), 0, true); + } + + // Render + return $this->getRender('viewitemessential.html.twig', [ + 'canadd' => $this->user, + 'modedesktop' => $modedesktop, + 'items' => $itemsordered, + 'bookmarks' => $bookmarks, + ]); + } + + public function viewalert(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $alertsordered = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + $idalertcategory = null; + $alertcategoryfilter = null; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'alertcategory': + $idalertcategory = $parameter['value']; + if ($idalertcategory) { + $alertcategoryfilter = $this->em->getRepository('App:Alertcategory')->find($idalertcategory); + } + break; + } + } + + // Profilage + $alertsordered = $this->em->getRepository('App:Alert')->getUserAlerts($this->user, $idalertcategory, $alertcategoryfilter, $this->get('session')->get('ssoitems')); + } + + // Render + return $this->getRender('viewalert.html.twig', [ + 'alerts' => $alertsordered, + ]); + } + + public function viewflux(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $modelist = 0; + $fluxsordered = null; + $feeds = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modelist': + $modelist = $parameter['value']; + break; + } + } + + // Profilage + $fluxs = $this->em->getRepository('App:Flux')->getUserFluxs($this->user); + + $feeds = []; + $filesystem = new Filesystem(); + + // Généraltion du cache associés aux flux + foreach ($fluxs as $keyflux => $flux) { + // On regarde si le flux a été lu il y a peu + $toregen = true; + $url = $flux->getUrl(); + + // Feed lié à un user interne + $filecache = 'uploads/flux/flux-'.$flux->getId().'.txt'; + if (false !== stripos($url, '##userid##')) { + if ($user) { + $url = str_replace('##userid##', $user->getId(), $url); + $filecache = $filecache = 'uploads/flux/flux-'.$user->getId().'-'.$flux->getId().'.txt'; + } + } + + // Si le fichie cache existe + if ($filesystem->exists($filecache)) { + // On récupère la date de modification du fichier + $timestampfile = filemtime($filecache); + $datetimeFormat = 'Y-m-d H:i:s'; + $datefile = new \DateTime(); + $datefile->setTimestamp($timestampfile); + + // On ajoute 30mn + $datefile->add(new \DateInterval('PT30M')); + + // Si la date est inférieur à maintenant on regénère le flux + $now = new \DateTime(); + if ($datefile >= $now) { + $toregen = false; + $backup = unserialize(file_get_contents($filecache)); + $feeds = array_merge($feeds, $backup); + if (empty($backup)) { + unset($fluxs[$keyflux]); + } + } + } + + // Si le fichier est trop ancien on relit le flus + if ($toregen) { + $PROXYactivate = $this->em->getRepository('App:Config')->find('PROXYactivate')->getValue(); + $weburl = $this->getParameter('weburl'); + + if (0 == stripos($url, '/')) { + $url = 'https://'.$weburl.$url; + $PROXYactivate = false; + } + if (0 === stripos($url, 'https://'.$weburl)) { + $PROXYactivate = false; + } + if (0 === stripos($url, 'http://'.$weburl)) { + $PROXYactivate = false; + } + + if ($PROXYactivate) { + $PROXYserver = $this->em->getRepository('App:Config')->find('PROXYserver')->getValue(); + $PROXYport = $this->em->getRepository('App:Config')->find('PROXYport')->getValue(); + $clientguzzle = new \GuzzleHttp\Client(['timeout' => 3, 'verify' => false, 'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport, 'https' => 'http://'.$PROXYserver.':'.$PROXYport]]); + } else { + $clientguzzle = new \GuzzleHttp\Client(['timeout' => 3, 'verify' => false]); + } + + try { + $clientguzzle->request('GET', $url); + } catch (RequestException $e) { + if ($e->hasResponse()) { + continue; + } + } + + // On lit le flux rss + $client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle); + $logger = new \Psr\Log\NullLogger(); + $feedIo = new \FeedIo\FeedIo($client, $logger); + + try { + $result = $feedIo->read($url); + } catch (\Exception $e) { + $result = null; + } + + if ($result) { + $feedtitle = $result->getFeed()->getTitle(); + + $backup = []; + + // Pour chaque articles + $nbflux = 0; + foreach ($result->getFeed() as $item) { + $title = $item->getTitle(); + $link = $item->getLink(); + $description = substr(strip_tags($item->getDescription()), 0, 250); + $description = str_replace('¶', '', $description); + $date = $item->getLastModified(); + $dateformat = ($date ? $item->getLastModified()->format('d/m/Y H:i:s') : ''); + $content = $item->getDescription(); + $media = $item->getMedias(); + $mediaurl = ''; + + foreach ($item->getMedias() as $itemMedia) { + if ('image/jpeg' == $itemMedia->getType()) { + $mediaurl = $itemMedia->getUrl(); + } + } + + foreach ($item->getAllElements() as $element) { + if ('content:encoded' == $element->getName()) { + $content = $element->getValue(); + } + } + + if ('' != $mediaurl) { + $imgurl = $mediaurl; + } else { + // Récupérer la première image du contenu + $imgcontent = ''; + $imgurl = ''; + $imgstart = stripos($content, '', $imgstart); + $imgcontent = substr($content, $imgstart, $imgend - $imgstart + 1); + + $imgstart = stripos($imgcontent, 'src='); + $imgurl = substr($imgcontent, $imgstart + 5); + $imgend = stripos($imgurl, '"'); + + if (false === $imgend) { + $imgend = stripos($imgurl, "'"); + } + $imgurl = substr($imgurl, 0, $imgend); + } + } + + // Garder le flux + $tmp = [ + 'feedtitle' => $feedtitle, + 'title' => $title, + 'link' => $link, + 'description' => $description, + 'date' => $date, + 'dateformat' => $dateformat, + 'content' => $content, + 'image' => $imgurl, + 'color' => $flux->getColor(), + 'fluxid' => $flux->getId(), + 'fluxtitle' => $flux->getTitle(), + ]; + + array_push($feeds, $tmp); + array_push($backup, $tmp); + + ++$nbflux; + if ($nbflux >= $flux->getMaxread() && $flux->getMaxread() > 0) { + break; + } + } + + if (0 == $nbflux) { + unset($fluxs[$keyflux]); + } + + // On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn + $filesystem->dumpFile($filecache, serialize($backup)); + } + } + } + + // Trie des fluxs + $fluxsordered = $fluxs->getIterator(); + $fluxsordered->uasort(function ($first, $second) { + return (int) $first->getRowOrder() > (int) $second->getRowOrder() ? 1 : -1; + }); + + // Trie des feeds + $libelle = []; + foreach ($feeds as $key => $valeur) { + $libelle[$key] = $valeur['date']; + } + array_multisort($libelle, SORT_DESC, $feeds); + } + + // Render + return $this->getRender('viewflux.html.twig', [ + 'modelist' => $modelist, + 'fluxs' => $fluxsordered, + 'feeds' => $feeds, + ]); + } + + public function viewrss(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $modelist = 0; + $fluxs = ['id' => 0]; + $feeds = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + $url = ''; + $nbarticle = '_blank'; + $modelist = 0; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'url': + $url = $parameter['value']; + break; + case 'nbarticle': + $nbarticle = $parameter['value']; + break; + case 'modelist': + $modelist = $parameter['value']; + break; + } + } + + // On regarde si le flux a été lu il y a peu + $toregen = true; + $filecache = $filecache = 'uploads/flux/widget-'.$id.'.txt'; + $user = $this->getUser(); + if (false !== stripos($url, '##userid##')) { + if ($user) { + $url = str_replace('##userid##', $user->getId(), $url); + $filecache = $filecache = 'uploads/flux/widget-'.$user->getId().'-'.$id.'.txt'; + } + } + + $filesystem = new Filesystem(); + if ($filesystem->exists($filecache)) { + // On récupère la date de modification du fichier + $timestampfile = filemtime($filecache); + $datetimeFormat = 'Y-m-d H:i:s'; + $datefile = new \DateTime(); + $datefile->setTimestamp($timestampfile); + + // On ajoute 30mn + $datefile->add(new \DateInterval('PT30M')); + + // Si la date est inférieur à maintenant on regénère le flux + $now = new \DateTime(); + if ($datefile >= $now) { + $toregen = false; + $feeds = unserialize(file_get_contents($filecache)); + } + } + + // Si le fichier est trop ancien on relit le flus + if ($toregen) { + // Connexion au client + $PROXYactivate = $this->em->getRepository('App:Config')->find('PROXYactivate')->getValue(); + $weburl = $this->getParameter('weburl'); + if (0 == stripos($url, '/')) { + $url = 'https://'.$weburl.$url; + $PROXYactivate = false; + } + if (0 === stripos($url, 'https://'.$weburl)) { + $PROXYactivate = false; + } + if (0 === stripos($url, 'http://'.$weburl)) { + $PROXYactivate = false; + } + + if ($PROXYactivate) { + $PROXYserver = $this->em->getRepository('App:Config')->find('PROXYserver')->getValue(); + $PROXYport = $this->em->getRepository('App:Config')->find('PROXYport')->getValue(); + $clientguzzle = new \GuzzleHttp\Client(['timeout' => 3, 'verify' => false, 'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport, 'https' => 'http://'.$PROXYserver.':'.$PROXYport]]); + } else { + $clientguzzle = new \GuzzleHttp\Client(['timeout' => 3, 'verify' => false]); + } + + try { + $clientguzzle->request('GET', $url); + } catch (RequestException $e) { + if ($e->hasResponse()) { + // Render + $feeds = []; + + return $this->getRender('viewflux.html.twig', [ + 'fluxs' => $fluxs, + 'feeds' => $feeds, + 'modelist' => $modelist, + ]); + } + } + + $client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle); + $logger = new \Psr\Log\NullLogger(); + $feedIo = new \FeedIo\FeedIo($client, $logger); + + $feeds = []; + + // On lit le flux rss + try { + $result = $feedIo->read($url); + } catch (\Exception $e) { + $result = null; + } + + if ($result) { + $feedtitle = $result->getFeed()->getTitle(); + + // Pour chaque articles + $nbflux = 0; + foreach ($result->getFeed() as $item) { + $title = $item->getTitle(); + $link = $item->getLink(); + $description = substr(strip_tags($item->getDescription()), 0, 250); + $description = str_replace('¶', '', $description); + $date = $item->getLastModified(); + $dateformat = ($date ? $item->getLastModified()->format('d/m/Y H:i:s') : ''); + $content = $item->getDescription(); + $media = $item->getMedias(); + $mediaurl = ''; + + foreach ($item->getMedias() as $itemMedia) { + if ('image/jpeg' == $itemMedia->getType()) { + $mediaurl = $itemMedia->getUrl(); + } + } + + foreach ($item->getAllElements() as $element) { + if ('content:encoded' == $element->getName()) { + $content = $element->getValue(); + } + } + + if ('' != $mediaurl) { + $imgurl = $mediaurl; + } else { + // Récupérer la première image du contenu + $imgcontent = ''; + $imgurl = ''; + $imgstart = stripos($content, '', $imgstart); + $imgcontent = substr($content, $imgstart, $imgend - $imgstart + 1); + + $imgstart = stripos($imgcontent, 'src='); + $imgurl = substr($imgcontent, $imgstart + 5); + $imgend = stripos($imgurl, '"'); + + if (false === $imgend) { + $imgend = stripos($imgurl, "'"); + } + $imgurl = substr($imgurl, 0, $imgend); + } + } + + // Garder le flux + array_push($feeds, [ + 'feedtitle' => $feedtitle, + 'title' => $title, + 'link' => $link, + 'description' => $description, + 'date' => $date, + 'dateformat' => $dateformat, + 'content' => $content, + 'image' => $imgurl, + // "color" => $flux->getColor(), + 'fluxid' => 0, + 'fluxtitle' => $this->entity->getName(), + ]); + + ++$nbflux; + if ($nbflux >= $nbarticle && $nbarticle > 0) { + break; + } + } + + $libelle = []; + foreach ($feeds as $key => $valeur) { + $libelle[$key] = $valeur['date']; + } + array_multisort($libelle, SORT_DESC, $feeds); + + // On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn + $filesystem->dumpFile($filecache, serialize($feeds)); + } + } + } + + // Render + return $this->getRender('viewflux.html.twig', [ + 'fluxs' => $fluxs, + 'feeds' => $feeds, + 'modelist' => $modelist, + ]); + } + + public function viewbookmark(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Valeur par défaut + $modedesktop = 0; + $bookmarks = null; + + // Datas associées au widget + if (!$this->mini) { + // Récupération des paramétres du widget + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modedesktop': + $modedesktop = $parameter['value']; + break; + } + } + + // Bookmark du widget + $bookmarks = $this->em->getRepository('App:Bookmark')->findBy(['pagewidget' => $this->entity]); + } + + // Render + return $this->getRender('viewbookmark.html.twig', [ + 'canadd' => $this->canadd, + 'modedesktop' => $modedesktop, + 'bookmarks' => $bookmarks, + ]); + } + + public function viewlink(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $url = ''; + $target = '_blank'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'url': + $url = $parameter['value']; + break; + case 'target': + $target = $parameter['value']; + break; + } + } + + // Render + return $this->getRender('viewlink.html.twig', [ + 'canadd' => false, + 'url' => $url, + 'target' => $target, + ]); + } + + public function vieweditor(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $html = ''; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'html': + $html = $parameter['value']; + break; + } + } + + // Render + return $this->getRender('vieweditor.html.twig', [ + 'canadd' => false, + 'html' => $html, + ]); + } + + public function viewslide(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $interval = '2'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'interval': + $interval = $parameter['value']; + break; + } + } + + // Récupération des slides + $slides = $this->em->getRepository('App:Slide')->findBy(['pagewidget' => $this->entity], ['roworder' => 'ASC', 'title' => 'ASC']); + + // Render + return $this->getRender('viewslide.html.twig', [ + 'canadd' => $this->canadd, + 'slides' => $slides, + 'interval' => $interval, + ]); + } + + public function viewfile(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $view = 'small'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modelist': + $view = (0 == $parameter['value'] ? 'small' : 'list'); + break; + } + } + + // Render + return $this->getRender('viewfile.html.twig', [ + 'canadd' => $this->canadd, + 'directory' => 'widget-'.$id, + 'view' => $view, + ]); + } + + public function viewgalery(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + $directory = $this->get('kernel')->getRootDir().'/../uploads/file/widget-'.$id; + $files = []; + $fs = new Filesystem(); + + if ($fs->exists($directory)) { + $finder = new Finder(); + $finder->sortByName()->in($directory)->exclude('thumb')->exclude('thumbmini'); + + foreach ($finder as $file) { + $tmp = []; + $tmp['name'] = $file->getRelativePathname(); + $tmp['extension'] = $file->getExtension(); + $fileinfo = new file($file->getPathname()); + $tmp['minetype'] = $fileinfo->getMimeType(); + $tmp['minefamily'] = explode('/', $tmp['minetype'])[0]; + + $tmp['thumb'] = ''; + if ($fs->exists($directory.'/thumb/'.$tmp['name'])) { + $data = file_get_contents($directory.'/thumb/'.$tmp['name']); + $tmp['thumb'] = 'data:image/'.$tmp['extension'].';base64,'.base64_encode($data); + } + + array_push($files, $tmp); + } + } + + // Render + return $this->getRender('viewgalery.html.twig', [ + 'canadd' => $this->canadd, + 'files' => $files, + ]); + } + + public function viewcalendar(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $nbday = '0'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'nbday': + $nbday = $parameter['value']; + break; + } + } + + // Récupérer les events de l'utilisateur + $user = $this->getUser(); + $events = $this->em->getRepository('App:Calendarevent')->getUserCalendarevents($user, $this->get('session')->get('color')['main'], $this->usage, $this->group, $firstcalendar); + + // Render + return $this->getRender('viewcalendar.html.twig', [ + 'canadd' => $this->canadd, + 'events' => $events, + 'nbday' => $nbday, + 'firstcalendar' => $firstcalendar, + 'usage' => $this->usage, + ]); + } + + public function viewblog(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $nbarticle = 10; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'nbarticle': + $nbarticle = $parameter['value']; + break; + } + } + + // On récupère soit les blogs du group en cours soit l'ensemble des blogs de l'utilisateur + if ('group' == $this->usage) { + $blogs = $this->em->getRepository('App:Blog')->getBlogsGroup($this->getUser(), $this->group); + if ($blogs) { + $firstblog = $blogs[0]->getId(); + } + } else { + $this->em->getRepository('App:Blog')->getBlogsUser($this->getUser(), $blogsuser, $blogsadmin, $blogsshared); + $blogs = array_merge($blogsuser, $blogsadmin->toArray(), $blogsshared); + $firstblog = 'all'; + } + + // On récupère les nbarticle de ses blogs + $this->em->getRepository('App:Blogarticle')->getBlogsArticles($blogs, 0, $nbarticle, $count, $blogarticles); + + // Render + return $this->getRender('viewblog.html.twig', [ + 'canadd' => $this->canadd, + 'blogarticles' => $blogarticles, + 'nbarticle' => $nbarticle, + 'firstblog' => $firstblog, + 'usage' => $this->usage, + ]); + } + + public function viewproject(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Parametres + $nbarticle = 10; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'nbarticle': + $nbarticle = $parameter['value']; + break; + } + } + + // On récupère soit les projects du group en cours soit l'ensemble des projects de l'utilisateur + $user = $this->getUser(); + if ('group' == $this->usage) { + $projects = $this->em->getRepository('App:Project')->getProjectsGroup($this->getUser(), $this->group); + if ($projects) { + $firstproject = $projects[0]->getId(); + } + } else { + $this->em->getRepository('App:Project')->getProjectsUser($user, $projectsuser, $projectsadmin, $projectsshared); + $projects = array_merge($projectsuser, $projectsadmin->toArray(), $projectsshared); + $firstproject = 'all'; + } + + // On récupère les nbarticle de ses projects + $this->em->getRepository('App:Projecttask')->getProjectsTasks($projects, 0, $nbarticle, $count, $projecttasks); + + foreach ($projecttasks as $key => $projecttask) { + if (100 == $projecttask->getPercentage()) { + unset($projecttasks[$key]); + } + } + + if ('group' != $this->usage) { + foreach ($projecttasks as $key => $projecttask) { + if (!$user) { + unset($projecttasks[$key]); + } else { + if ($projecttask->getUser() && $projecttask->getUser() != $user) { + unset($projecttasks[$key]); + } elseif (!$projecttask->getUser() && $projecttask->getOwner() && $projecttask->getOwner() != $user) { + unset($projecttasks[$key]); + } + } + } + } + + // Render + return $this->getRender('viewproject.html.twig', [ + 'canadd' => $this->canupdate, + 'projecttasks' => $projecttasks, + 'nbarticle' => $nbarticle, + 'firstproject' => $firstproject, + 'usage' => $this->usage, + ]); + } + + public function viewseparator(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Parametres + $seetitle = false; + $seeicon = false; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'seetitle': + $seetitle = boolval($parameter['value']); + break; + case 'seeicon': + $seeicon = boolval($parameter['value']); + break; + } + } + + // Render + return $this->getRender('viewseparator.html.twig', [ + 'canadd' => $this->canupdate, + 'seetitle' => $seetitle, + 'seeicon' => $seeicon, + ]); + } + + public function viewclock(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Parametres + $clock = '0'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'clock': + $clock = $parameter['value']; + break; + } + } + + // Render + return $this->getRender('viewframe.html.twig', [ + 'canadd' => $this->canupdate, + 'onheader' => true, + 'tool' => (0 == $clock ? 'app_user_tool_clockanalogique' : 'app_user_tool_clocknumerique'), + ]); + } + + public function viewcalculator(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Render + return $this->getRender('viewframe.html.twig', [ + 'canadd' => $this->canupdate, + 'onheader' => true, + 'tool' => 'app_user_tool_calculator', + ]); + } + + public function viewappexternal(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $idappexternal = null; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'appexternal': + $idappexternal = $parameter['value']; + break; + case 'modedesktop': + $modedesktop = $parameter['value']; + break; + } + } + + $user = $this->getUser(); + $items = []; + $itemcategorys = []; + if ($user) { + if ($idappexternal) { + $appextenals = $this->em->getRepository('App:Appexternal')->findBy(['id' => $idappexternal]); + } else { + $appextenals = $this->em->getRepository('App:Appexternal')->findAll(); + } + foreach ($appextenals as $appexternal) { + switch ($appexternal->getName()) { + case 'Limesurvey': + $category = ['id' => 0, 'label' => 'Limesurvey']; + array_push($itemcategorys, $category); + + $directory = $this->get('kernel')->getRootDir().'/../uploads/limesurvey/'.$user->getId(); + $files = []; + $fs = new Filesystem(); + + if ($fs->exists($directory.'/invitation.json')) { + $file = file_get_contents($directory.'/invitation.json'); + $json = substr($file, 0, -2); // sup dernier , + $surveys = json_decode('{'.$json.'}', true); + if (is_array($surveys)) { + foreach ($surveys as $id => $survey) { + array_push($items, ['id' => $id, 'title' => $survey['title'], 'subtitle' => 'Sondage', 'url' => $survey['url'], 'itemcategory' => $category, 'color' => '328637', 'icon' => 'icon_limesurvey.png']); + } + } + } + + break; + + case 'Moodle': + $category = ['id' => 1, 'label' => 'Moodle']; + array_push($itemcategorys, $category); + + $directory = $this->get('kernel')->getRootDir().'/../uploads/moodle/'.$user->getId(); + $files = []; + $fs = new Filesystem(); + + if ($fs->exists($directory.'/invitation.json')) { + $file = file_get_contents($directory.'/invitation.json'); + $json = substr($file, 0, -2); // sup dernier , + $courses = json_decode('{'.$json.'}', true); + if (is_array($courses)) { + foreach ($courses as $id => $course) { + array_push($items, ['id' => $id, 'title' => $course['title'], 'subtitle' => 'Cours', 'url' => $course['url'], 'itemcategory' => $category, 'color' => 'f77f11', 'icon' => 'icon_moodle.png']); + } + } + } + + break; + } + } + } + + // Trier les item par title + $title = array_column($items, 'title'); + array_multisort($title, SORT_ASC, $items); + + // Render + return $this->getRender('viewappexternal.html.twig', [ + 'canadd' => $user, + 'modedesktop' => $modedesktop, + 'items' => $items, + 'itemcategorys' => $itemcategorys, + ]); + } + + public function viewinfo(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + $icon = null; + $title = null; + $description = null; + $members = []; + if ('group' == $this->usage) { + $groupentity = $this->em->getRepository('App:Group')->find($this->group); + if ($groupentity) { + $title = $this->entity->getPage()->getName(); + $id = $groupentity->getId(); + if ($groupentity->getDescription()) { + $description = 'Description
'.$groupentity->getDescription(); + } + if ($groupentity->getIcon()) { + $icon = '/'.$groupentity->getIcon()->getLabel(); + } else { + $icon = '/uploads/icon/icon_users.png'; + } + + foreach ($groupentity->getUsers() as $usergroup) { + array_push($members, $usergroup); + } + } + } else { + $title = $this->entity->getPage()->getName(); + $proprio = $this->entity->getPage()->getUser(); + $id = 0; + if ($proprio) { + $description = 'Propriétaire de la page
'.$proprio->getLastname().' '.$proprio->getLastname(); + $icon = '/uploads/avatar/'.$proprio->getAvatar(); + } else { + $icon = '/uploads/avatar/noavatar.png'; + } + } + + // Render + return $this->getRender('viewinfo.html.twig', [ + 'canadd' => $this->canupdate, + 'usage' => $this->usage, + 'icon' => $icon, + 'title' => $title, + 'description' => $description, + 'members' => $members, + 'id' => $id, + 'idpage' => $this->entity->getPage()->getId(), + ]); + } + + public function viewchat(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + $group = $this->group; + if ('group' != $this->usage || !$group) { + $group = $this->em->getRepository('App:Group')->findOneBy(['fgall' => true])->getId(); + } + + // Render + return $this->getRender('viewchat.html.twig', [ + 'canadd' => $this->canupdate, + 'onheader' => false, + 'tool' => 'app_websocket_chat', + 'usage' => $this->usage, + 'group' => $group, + ]); + } + + public function viewgroup(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + $user = $this->getUser(); + $mygroups = []; + $this->getDoctrine()->getRepository('App\Entity\Page')->getPagesUser($user, null, $default, $pagesuser, $pagesadmin, $groupsshared); + if (is_array($groupsshared)) { + foreach ($groupsshared as $groupshared) { + $title = $groupshared->getLabel(); + $idpage = $groupshared->pagesshared[0]->getId(); + $color = $groupshared->getColor(); + $icon = null; + if ($groupshared->getIcon()) { + $icon = '/'.$groupshared->getIcon()->getLabel(); + } + + array_push($mygroups, ['title' => $title, 'icon' => $icon, 'id' => $idpage, 'color' => $color]); + } + } + + // Render + return $this->getRender('viewgroup.html.twig', [ + 'canadd' => $user, + 'usage' => $this->usage, + 'groups' => $mygroups, + ]); + } + + public function viewgroupmessage(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $modelist = 1; + $nbarticle = 5; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'modelist': + $modelist = $parameter['value']; + break; + case 'nbarticle': + $nbarticle = $parameter['value']; + break; + } + } + + $mymsg = []; + $user = $this->getUser(); + $this->getDoctrine()->getRepository('App\Entity\Page')->getPagesUser($user, null, $default, $pagesuser, $pagesadmin, $groupsshared); + if (is_array($groupsshared)) { + foreach ($groupsshared as $groupshared) { + // On récupère les info du groupe + $title = $groupshared->getLabel(); + $idpage = $groupshared->pagesshared[0]->getId(); + $color = $groupshared->getColor(); + + // On récupère l'ensemble des messages du groupes + $messages = $this->getDoctrine()->getRepository('CadolesWebsocketBundle:Message')->findBy(['group' => $groupshared]); + foreach ($messages as $key => $message) { + // persistante collection à revoir + if ($message->getSees()->count() > 0) { + if ($message->getSees()->contains($user)) { + unset($messages[$key]); + } + } + } + + foreach ($messages as $key => $message) { + $tmp = ['id' => $message->getId(), 'user' => $message->getUser(), 'date' => $message->getSubmitdate(), 'topic' => $message->getTopic(), 'pageid' => $idpage, 'pagetitle' => $title, 'color' => $color]; + array_push($mymsg, $tmp); + } + } + + $ord = []; + foreach ($mymsg as $key => $value) { + $ord[] = $value['date']; + } + array_multisort($ord, SORT_DESC, $mymsg); + } + + // Render + return $this->getRender('viewgroupmessage.html.twig', [ + 'canadd' => $user, + 'usage' => $this->usage, + 'modelist' => $modelist, + 'messages' => $mymsg, + 'nbarticle' => $nbarticle, + ]); + } + + public function viewOnlydoc(Request $request, $id, $access = 'config') + { + // Récupération de la requete + $this->setRequest($request, $id, $access); + + // Récupération des paramétres du widget + $apponly = 0; + $view = 'small'; + foreach ($this->entity->getParameter()['fields'] as $parameter) { + switch ($parameter['id']) { + case 'apponly': + $apponly = $parameter['value']; + break; + case 'modelist': + $view = (0 == $parameter['value'] ? 'small' : 'list'); + break; + } + } + + return $this->getRender('viewonlydoc.html.twig', [ + 'canadd' => $this->canupdate, + 'directory' => $id, + 'view' => $view, + ]); + } +} diff --git a/src/Entity/Group.php b/src/Entity/Group.php index f2d2460..16d1266 100755 --- a/src/Entity/Group.php +++ b/src/Entity/Group.php @@ -80,6 +80,11 @@ class Group */ private $owner; + /** + * @ORM\ManyToOne(targetEntity="Page", inversedBy="templategroups") + */ + private $pagetemplate; + /** * @var ArrayCollection * @var UserGroup @@ -322,4 +327,16 @@ class Group return $this; } + + public function getPagetemplate(): ?Page + { + return $this->pagetemplate; + } + + public function setPagetemplate(?Page $pagetemplate): self + { + $this->pagetemplate = $pagetemplate; + + return $this; + } } diff --git a/src/Entity/Pagewidget.php b/src/Entity/Pagewidget.php index a55b170..e0cb6df 100755 --- a/src/Entity/Pagewidget.php +++ b/src/Entity/Pagewidget.php @@ -3,6 +3,7 @@ namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** @@ -71,6 +72,13 @@ class Pagewidget */ protected $opened; + /** + * @var bool + * + * @ORM\Column(name="viewheader", type="boolean", options={"default":true}) + */ + protected $viewheader; + /** * @var string * @@ -138,6 +146,12 @@ class Pagewidget */ private $slides; + public function __construct() + { + $this->bookmarks = new ArrayCollection(); + $this->slides = new ArrayCollection(); + } + // A garder pour forcer l'id en init public function setId($id) { @@ -146,457 +160,260 @@ class Pagewidget 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() + public function getId(): ?int { return $this->id; } - /** - * Set name. - * - * @param string $name - * - * @return Pagewidget - */ - public function setName($name) + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): self { $this->name = $name; return $this; } - /** - * Get name. - * - * @return string - */ - public function getName() + public function getLoc(): ?string { - return $this->name; + return $this->loc; } - /** - * Set loc. - * - * @param string $loc - * - * @return Pagewidget - */ - public function setLoc($loc) + public function setLoc(string $loc): self { $this->loc = $loc; return $this; } - /** - * Get loc. - * - * @return string - */ - public function getLoc() + public function getRoworder(): ?int { - return $this->loc; + return $this->roworder; } - /** - * Set roworder. - * - * @param int $roworder - * - * @return Pagewidget - */ - public function setRoworder($roworder) + public function setRoworder(int $roworder): self { $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() + public function getHeight(): ?int { return $this->height; } - /** - * Set autoajust. - * - * @param bool $autoajust - * - * @return Pagewidget - */ - public function setAutoajust($autoajust) + public function setHeight(int $height): self { - $this->autoajust = $autoajust; + $this->height = $height; 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 setAutoajust(bool $autoajust): self + { + $this->autoajust = $autoajust; + + return $this; + } + public function isBorder(): ?bool { return $this->border; } + public function setBorder(bool $border): self + { + $this->border = $border; + + return $this; + } + public function isOpened(): ?bool { return $this->opened; } + + public function setOpened(bool $opened): self + { + $this->opened = $opened; + + return $this; + } + + public function isViewheader(): ?bool + { + return $this->viewheader; + } + + public function setViewheader(bool $viewheader): self + { + $this->viewheader = $viewheader; + + return $this; + } + + public function getColorheaderback(): ?string + { + return $this->colorheaderback; + } + + public function setColorheaderback(?string $colorheaderback): self + { + $this->colorheaderback = $colorheaderback; + + return $this; + } + + public function getColorheaderfont(): ?string + { + return $this->colorheaderfont; + } + + public function setColorheaderfont(?string $colorheaderfont): self + { + $this->colorheaderfont = $colorheaderfont; + + return $this; + } + + public function getColorbodyback(): ?string + { + return $this->colorbodyback; + } + + public function setColorbodyback(?string $colorbodyback): self + { + $this->colorbodyback = $colorbodyback; + + return $this; + } + + public function getColorbodyfont(): ?string + { + return $this->colorbodyfont; + } + + public function setColorbodyfont(?string $colorbodyfont): self + { + $this->colorbodyfont = $colorbodyfont; + + return $this; + } + + public function getParameter(): array + { + return $this->parameter; + } + + public function setParameter(?array $parameter): self + { + $this->parameter = $parameter; + + return $this; + } + + public function getPage(): ?Page + { + return $this->page; + } + + public function setPage(?Page $page): self + { + $this->page = $page; + + return $this; + } + + public function getWidget(): ?Widget + { + return $this->widget; + } + + public function setWidget(?Widget $widget): self + { + $this->widget = $widget; + + 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->setPagewidget($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->getPagewidget() === $this) { + $bookmark->setPagewidget(null); + } + } + + return $this; + } + + /** + * @return Collection + */ + public function getSlides(): Collection + { + return $this->slides; + } + + public function addSlide(Slide $slide): self + { + if (!$this->slides->contains($slide)) { + $this->slides->add($slide); + $slide->setPagewidget($this); + } + + return $this; + } + + public function removeSlide(Slide $slide): self + { + if ($this->slides->removeElement($slide)) { + // set the owning side to null (unless already changed) + if ($slide->getPagewidget() === $this) { + $slide->setPagewidget(null); + } + } + + return $this; + } } diff --git a/src/Entity/Widget.php b/src/Entity/Widget.php index cc5c82a..de1f2d5 100755 --- a/src/Entity/Widget.php +++ b/src/Entity/Widget.php @@ -3,6 +3,7 @@ namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** @@ -79,6 +80,13 @@ class Widget */ protected $opened; + /** + * @var bool + * + * @ORM\Column(name="viewheader", type="boolean", options={"default":true}) + */ + protected $viewheader; + /** * @var string * @@ -135,6 +143,11 @@ class Widget */ private $pagewidgets; + public function __construct() + { + $this->pagewidgets = new ArrayCollection(); + } + // A garder pour forcer l'id en init public function setId($id) { @@ -143,426 +156,230 @@ class Widget return $this; } - /** - * Constructor. - */ - public function __construct() - { - $this->pagewidgets = new \Doctrine\Common\Collections\ArrayCollection(); - } - - /** - * Get id. - * - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } - /** - * Set roworder. - * - * @param int $roworder - * - * @return Widget - */ - public function setRoworder($roworder) + public function getRoworder(): ?int + { + return $this->roworder; + } + + public function setRoworder(int $roworder): self { $this->roworder = $roworder; return $this; } - /** - * Get roworder. - * - * @return int - */ - public function getRoworder() + public function getName(): ?string { - return $this->roworder; + return $this->name; } - /** - * Set name. - * - * @param string $name - * - * @return Widget - */ - public function setName($name) + public function setName(string $name): self { $this->name = $name; return $this; } - /** - * Get name. - * - * @return string - */ - public function getName() + public function getDescription(): ?string { - return $this->name; + return $this->description; } - /** - * Set description. - * - * @param string $description - * - * @return Widget - */ - public function setDescription($description) + public function setDescription(?string $description): self { $this->description = $description; return $this; } - /** - * Get description. - * - * @return string - */ - public function getDescription() + public function getRouteview(): ?string { - return $this->description; + return $this->routeview; } - /** - * Set routeview. - * - * @param string $routeview - * - * @return Widget - */ - public function setRouteview($routeview) + public function setRouteview(string $routeview): self { $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() + public function getHeight(): ?int { return $this->height; } - /** - * Set autoajust. - * - * @param bool $autoajust - * - * @return Widget - */ - public function setAutoajust($autoajust) + public function setHeight(int $height): self { - $this->autoajust = $autoajust; + $this->height = $height; 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 setAutoajust(bool $autoajust): self + { + $this->autoajust = $autoajust; + + return $this; + } + public function isBorder(): ?bool { return $this->border; } + public function setBorder(bool $border): self + { + $this->border = $border; + + return $this; + } + public function isOpened(): ?bool { return $this->opened; } + + public function setOpened(bool $opened): self + { + $this->opened = $opened; + + return $this; + } + + public function isViewheader(): ?bool + { + return $this->viewheader; + } + + public function setViewheader(bool $viewheader): self + { + $this->viewheader = $viewheader; + + return $this; + } + + public function getColorheaderback(): ?string + { + return $this->colorheaderback; + } + + public function setColorheaderback(?string $colorheaderback): self + { + $this->colorheaderback = $colorheaderback; + + return $this; + } + + public function getColorheaderfont(): ?string + { + return $this->colorheaderfont; + } + + public function setColorheaderfont(?string $colorheaderfont): self + { + $this->colorheaderfont = $colorheaderfont; + + return $this; + } + + public function getColorbodyback(): ?string + { + return $this->colorbodyback; + } + + public function setColorbodyback(?string $colorbodyback): self + { + $this->colorbodyback = $colorbodyback; + + return $this; + } + + public function getColorbodyfont(): ?string + { + return $this->colorbodyfont; + } + + public function setColorbodyfont(?string $colorbodyfont): self + { + $this->colorbodyfont = $colorbodyfont; + + return $this; + } + + public function getAccess(): array + { + return $this->access; + } + + public function setAccess(?array $access): self + { + $this->access = $access; + + return $this; + } + + public function getParameter(): array + { + return $this->parameter; + } + + public function setParameter(?array $parameter): self + { + $this->parameter = $parameter; + + return $this; + } + + public function getIcon(): ?Icon + { + return $this->icon; + } + + public function setIcon(?Icon $icon): self + { + $this->icon = $icon; + + return $this; + } + + /** + * @return Collection + */ + public function getPagewidgets(): Collection + { + return $this->pagewidgets; + } + + public function addPagewidget(Pagewidget $pagewidget): self + { + if (!$this->pagewidgets->contains($pagewidget)) { + $this->pagewidgets->add($pagewidget); + $pagewidget->setWidget($this); + } + + return $this; + } + + public function removePagewidget(Pagewidget $pagewidget): self + { + if ($this->pagewidgets->removeElement($pagewidget)) { + // set the owning side to null (unless already changed) + if ($pagewidget->getWidget() === $this) { + $pagewidget->setWidget(null); + } + } + + return $this; + } } diff --git a/src/Form/ItemType.php b/src/Form/ItemType.php index 7aed9f4..48a5ec9 100644 --- a/src/Form/ItemType.php +++ b/src/Form/ItemType.php @@ -2,125 +2,125 @@ namespace App\Form; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\Extension\Core\Type\SubmitType; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\TextType; -use Symfony\Component\Form\Extension\Core\Type\TextareaType; -use Symfony\Component\Form\Extension\Core\Type\HiddenType; -use Tetranz\Select2EntityBundle\Form\Type\Select2EntityType; use FOS\CKEditorBundle\Form\Type\CKEditorType; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\HiddenType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\Extension\Core\Type\TextareaType; +use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Tetranz\Select2EntityBundle\Form\Type\Select2EntityType; class ItemType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->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('submit', SubmitType::class, [ + 'label' => ('delete' == $options['mode'] ? 'Confirmer la Suppression' : 'Valider'), + 'attr' => ('delete' == $options['mode'] ? ['class' => 'btn btn-danger'] : ['class' => 'btn btn-success']), ]) - ->add("title", TextType::class, [ - "label" => "Titre", - "disabled" => ($options["mode"]=="delete"?true:false), + ->add('title', TextType::class, [ + 'label' => 'Titre', + 'disabled' => ('delete' == $options['mode'] ? 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('subtitle', TextareaType::class, [ + 'label' => 'Sous Titre', + 'required' => false, + 'disabled' => ('delete' == $options['mode'] ? true : false), + 'attr' => ['rows' => '4'], ]) - ->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('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('itemcategory', EntityType::class, [ + 'label' => 'Catégorie', + 'class' => 'App\Entity\Itemcategory', + 'choice_label' => 'label', + 'placeholder' => '-- Sélectionnez une Catégorie --', + 'disabled' => ('delete' == $options['mode'] ? 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), + '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' => ('delete' == $options['mode'] ? 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', + '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") - ]) + 'label' => 'Couleur', + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]) ->add('url') ->add('protected', CheckboxType::class, [ - "label" => "Force l'authentification de l'utilisateur ?", - "required" => false + 'label' => "Force l'authentification de l'utilisateur ?", + 'required' => false, ]) - + ->add('essential', CheckboxType::class, [ - "label" => "Item essentiel ?", - "required" => false + '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', - ] + 'label' => 'Ouvrir le lien dans', + 'choices' => [ + 'Nouvel onglet/fenêtre' => '_blank', + 'iFrame' => 'frame', + 'Onglet courant' => '_top', + ], ]) - ->add('idicon', HiddenType::class,['mapped'=> false,'data' => $options["idicon"]]); + ->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", + 'mode' => 'string', + 'access' => 'string', 'idicon' => null, ]); } diff --git a/src/Form/ItemcategoryType.php b/src/Form/ItemcategoryType.php index 53871ab..5439656 100644 --- a/src/Form/ItemcategoryType.php +++ b/src/Form/ItemcategoryType.php @@ -1,21 +1,12 @@ setDefaults(array( + $resolver->setDefaults([ 'data_class' => 'App\Entity\Itemcategory', - 'mode' => "string", + 'mode' => 'string', 'access' => 'string', - )); + ]); } } diff --git a/src/Form/PageUpdateWidgetType.php b/src/Form/PageUpdateWidgetType.php new file mode 100644 index 0000000..93fb64e --- /dev/null +++ b/src/Form/PageUpdateWidgetType.php @@ -0,0 +1,113 @@ +add('submit', SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ]) + + ->add('name', TextType::class, [ + 'label' => 'Nom', + ]) + + ->add('roworder', IntegerType::class, [ + 'label' => 'Ordre', + ]) + + ->add('fonticon', FaChoiceType::class, [ + 'label' => 'Icône', + 'required' => false, + ]) + + ->add('maxwidth', IntegerType::class, [ + 'label' => "Largeur maximum (0 pour largeur de l'écran)", + ]) + + ->add('template', HiddenType::class, [ + 'label' => 'Template', + 'required' => false, + ]); + + if ('config' == $options['access'] && 'group' != $options['for']) { + $builder + ->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' => ('delete' == $options['mode'] ? true : false), + ]) + + ->add('groups', Select2EntityType::class, [ + 'label' => 'Visible pour les Groupes', + 'class' => 'App:Group', + 'text_property' => 'label', + 'multiple' => true, + 'remote_route' => 'app_ajax_group_list', + '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 un groupe', + ]) + + ->add('user', Select2EntityType::class, [ + 'label' => 'Propriétaire', + 'disabled' => ('delete' == $options['mode'] ? true : false), + 'required' => false, + 'multiple' => false, + 'remote_route' => 'app_config_user_ajax_selectlist', + 'class' => 'App\Entity\User', + 'primary_key' => 'id', + 'text_property' => 'username', + 'minimum_input_length' => 2, + 'page_limit' => 10, + 'allow_clear' => true, + 'delay' => 250, + 'cache' => false, + 'cache_timeout' => 60000, // if 'cache' is true + 'language' => 'fr', + 'placeholder' => 'Selectionner un propriétaire', + 'attr' => ['class' => 'form-control', 'style' => 'margin-bottom:15px'], + ]); + } + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Page', + 'access' => 'string', + 'mode' => 'string', + 'for' => 'string', + ]); + } +} diff --git a/src/Form/PagetemplateSubmitType.php b/src/Form/PagetemplateSubmitType.php new file mode 100644 index 0000000..11c972a --- /dev/null +++ b/src/Form/PagetemplateSubmitType.php @@ -0,0 +1,53 @@ +add('submit', SubmitType::class, [ + 'label' => 'Valider', + 'attr' => ['class' => 'btn btn-success'], + ]) + + ->add('name', TextType::class, [ + 'label' => 'Nom', + ]) + + ->add('parentfor', ChoiceType::class, [ + 'label' => 'Modèle pour les', + 'choices' => [ + 'Utilisateurs' => 'user', + 'Groupes' => 'group', + 'Application' => 'app', + ], + ]) + + ->add('roworder', IntegerType::class, [ + 'label' => 'Ordre', + ]) + + ->add('maxwidth', IntegerType::class, [ + 'label' => "Largeur maximum (0 pour largeur de l'écran)", + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Page', + 'mode' => 'string', + 'access' => 'string', + ]); + } +} diff --git a/src/Form/PagewidgetType.php b/src/Form/PagewidgetType.php new file mode 100644 index 0000000..1269cc6 --- /dev/null +++ b/src/Form/PagewidgetType.php @@ -0,0 +1,248 @@ +container = $container; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + // Ajout des champs commun à tout les widgets + $builder + ->add('submit', SubmitType::class, [ + 'label' => ('delete' == $options['mode'] ? 'Confirmer la Suppression' : 'Valider'), + 'attr' => ('delete' == $options['mode'] ? ['class' => 'btn btn-danger'] : ['class' => 'btn btn-success']), + ]) + + ->add('name', TextType::class, [ + 'label' => 'Nom', + ]) + ->add('height', IntegerType::class, [ + 'label' => 'Hauteur du Widget', + ]) + ->add('border', ChoiceType::class, [ + 'label' => 'Afficher les Bords', + 'choices' => ['oui' => '1', 'non' => '0'], + ]) + ->add('autoajust', ChoiceType::class, [ + 'label' => 'Ajuster la Hauteur au Contenu', + 'choices' => ['oui' => '1', 'non' => '0'], + ]) + ->add('opened', ChoiceType::class, [ + 'label' => "Afficher le corps du widget à l'ouverture", + 'choices' => ['oui' => '1', 'non' => '0'], + ]) + ->add('viewheader', ChoiceType::class, [ + 'label' => "Afficher l'Entête", + 'choices' => ['oui' => '1', 'non' => '0'], + ]) + ->add('colorheaderback', TextType::class, [ + 'label' => "Couleur de Fond de l'Entête", + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]) + ->add('colorheaderfont', TextType::class, [ + 'label' => "Couleur du Texte de l'Entête", + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]) + ->add('colorbodyback', TextType::class, [ + 'label' => 'Couleur de Fond du Corps', + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]) + ->add('colorbodyfont', TextType::class, [ + 'label' => 'Couleur du Texte du Corps', + 'required' => false, + 'attr' => ['class' => 'pick-a-color'], + ]) + + ->add('idicon', HiddenType::class, ['mapped' => false, 'data' => $options['idicon']]); + + foreach ($options['param']['fields'] as $field) { + dump($field); + if ('string' == $field['type']) { + $builder + ->add($field['id'], TextType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + ]); + } elseif ('integer' == $field['type']) { + $builder + ->add($field['id'], IntegerType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + ]); + } elseif ('boolean' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Non' => 0, 'Oui' => 1], + ]); + } elseif ('desktopmode' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Très Petit' => '0', 'Petit' => '1', 'Moyen' => '2', 'Grand' => '3', 'Liste' => '4'], + ]); + } elseif ('modelist' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Pavet' => '0', 'Liste' => '1'], + ]); + } elseif ('withbookmark' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Favoris + Items' => '0', 'Items uniquement' => '1', 'Favoris uniquement' => '2'], + ]); + } elseif ('itemcategory' == $field['type']) { + $id = $field['value']; + $categorys = $this->container->get('doctrine.orm.entity_manager')->getRepository("App\Entity\Itemcategory")->findAll(); + $choices = []; + foreach ($categorys as $category) { + $choices[$category->getLabel()] = $category->getId(); + } + + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $id, + 'required' => ('true' == $field['mandatory']), + 'choices' => $choices, + 'placeholder' => '-- Sélectionnez une catégorie --', + ]); + } elseif ('alertcategory' == $field['type']) { + $id = $field['value']; + $categorys = $this->container->get('doctrine.orm.entity_manager')->getRepository("App\Entity\Alertcategory")->findAll(); + $choices = []; + foreach ($categorys as $category) { + $choices[$category->getLabel()] = $category->getId(); + } + + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $id, + 'required' => ('true' == $field['mandatory']), + 'choices' => $choices, + 'placeholder' => '-- Sélectionnez une catégorie --', + ]); + } elseif ('appexternal' == $field['type']) { + $id = $field['value']; + $appexternals = $this->container->get('doctrine.orm.entity_manager')->getRepository("App\Entity\Appexternal")->findAll(); + $choices = []; + foreach ($appexternals as $appexternal) { + $choices[$appexternal->getName()] = $appexternal->getId(); + } + + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $id, + 'required' => ('true' == $field['mandatory']), + 'choices' => $choices, + 'placeholder' => '-- Sélectionnez une application --', + ]); + } elseif ('apponly' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Documents + Tâches' => '0', 'Documents uniquement' => '1', 'Tâches uniquement' => '2'], + ]); + } elseif ('target' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Nouvel onglet/fenêtre' => '_blank', 'iFrame' => 'frame', 'Onglet courant' => '_self'], + ]); + } elseif ('ckeditor' == $field['type']) { + $builder + ->add($field['id'], CKEditorType::class, [ + 'config_name' => 'full_config', + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'config' => ['filebrowserUploadRoute' => 'app_'.$options['access'].'_pagewidget_upload'], + ]); + } elseif ('clock' == $field['type']) { + $builder + ->add($field['id'], ChoiceType::class, [ + 'label' => $field['label'], + 'mapped' => false, + 'label_attr' => ['loc' => $field['loc']], + 'data' => $field['value'], + 'required' => ('true' == $field['mandatory']), + 'choices' => ['Analogique' => '0', 'Numérique' => '1'], + ]); + } + } + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'App\Entity\Pagewidget', + 'param' => [], + 'mode' => 'string', + 'access' => 'string', + 'idicon' => 'string', + ]); + } +} diff --git a/src/Form/Type/FaChoiceType.php b/src/Form/Type/FaChoiceType.php new file mode 100644 index 0000000..abac307 --- /dev/null +++ b/src/Form/Type/FaChoiceType.php @@ -0,0 +1,75 @@ +fontawesomeIconsFile = $fontawesomeIconsFile; + } + + public function buildView(FormView $view, FormInterface $form, array $options) + { + // Pass this flag is necessary to render the label as raw. + // See below the twig field template for more details. + $view->vars['raw_label'] = true; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'attr' => [ + // It's the key of the solution and can be done in many ways. + // Now, the rendered + + +

+ +
+
+ Liste des Pages +
+ +
+
+ + + + + + + + + + +
ActionOrdreNomCatégoriePropriétaire
+
+
+
+{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + {% if not app.session.get('alluserpage') is empty %} + var state={{ app.session.get('alluserpage') }}; + if(state) { + $("#labelalluser").html("Afficher les pages non liées à un utilisateur"); + $("#alluser").attr('checked', true); + } + {% endif %} + + table = $('#dataTables').DataTable({ + columnDefs: [ { "targets": 'no-sort', "orderable": false } ], + responsive: true, + iDisplayLength: 100, + order: [[ 1, "asc" ]], + processing: true, + serverSide: true, + ajax: { + "url": "{{ path('app_config_page_ajax_list') }}", + "data": function ( d ) { + return $.extend( {}, d, { + "alluser": $('#alluser').is(':checked') + }); + } + }, + + drawCallback: function(settings) { + $("a[data-method='delete']").click(function(){ + if( !confirm('Êtes-vous sûr de vouloir supprimer cette page ?')) { + return false; + } + }); + } + }); + }); + + $('#alluser').change(function() { + if (typeof table !== 'undefined') { + table.ajax.reload(); + } + + var check = $('#alluser').is(':checked'); + if(check) + $("#labelalluser").html("Afficher les pages non liées à un utilisateur"); + else + $("#labelalluser").html("Afficher les pages créées par des utilisateurs"); + + }); + +{% endblock %} diff --git a/templates/Page/menugroupe.html.twig b/templates/Page/menugroupe.html.twig new file mode 100644 index 0000000..4538fdd --- /dev/null +++ b/templates/Page/menugroupe.html.twig @@ -0,0 +1,109 @@ + {% if not inmenu %} + + {% else %} + {% for groupshared in groupsshared %} + {% if groupshared.pagesshared|length == 1 %} + {% set page = groupshared.pagesshared[0] %} + {% set forcereload=true %} + {% if page.pagecategory.id==1 %} + {% set forcereload=page.toreload %} + {% endif %} + + {% set isactive="" %} + {% if entity.id is defined and page.id==entity.id %} + {% set isactive="class='active'" %} + {% endif %} + + + {% else %} + + {% endif %} + {% endfor %} + {% endif %} \ No newline at end of file diff --git a/templates/Page/noportal.html.twig b/templates/Page/noportal.html.twig new file mode 100644 index 0000000..c8657b6 --- /dev/null +++ b/templates/Page/noportal.html.twig @@ -0,0 +1,334 @@ + +{% extends '@CadolesCore/base.html.twig' %} + +{% set color = app.session.get('color') %} +{% set colormain = color['main'] %} + +{% block pagewrapper %} +
+
+
qsdfqsdfqsd
+ +
+ {% if bookmarks is not empty %} +
+ {% if items is not empty %} +

Favoris

+ {% else %} +

+ {% endif %} + +
+ {% else %} + + {% endif %} + + {% set mycategs = [] %} + {% for itemcategory in itemcategorys %} + {% set haveitem=false %} + + {% for item in items if item.itemcategory==itemcategory %} + + {% if loop.index ==1 %} + {% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %} + {% endif %} + {% endfor %} + {% endfor %} + + {% for itemcategory in mycategs %} + {% set haveitem=false %} + + {% for item in items if item.itemcategory==itemcategory %} + + {% if loop.index ==1 %} + {% set haveitem=true %} + + {% if mycategs|length > 1 or bookmarks is not empty %} +

{{ itemcategory.label }}

+ {% else %} +

+ {% endif %} + + + {% endif %} + {% endfor %} +
+
+{% endblock %} + +{% block localjavascript %} + $('document').ready(function(){ + // Ajustement des frames + $(window).resize(function() { + AjustFrame(); + }); + + + // Création des grilles d'items + var optiongrid={columnWidth: '.grid-sizer', itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'}; + $('body').imagesLoaded(function() { + var grid = $('.grid').masonry(optiongrid); + }); + + // Preview item de bureau + $( ".grid .item-preview" ).click(function() { + if($(this).parent().children(".grid-item-body").css('display') == 'none') { + $(this).html(''); + heightbody=$(this).parent().children(".grid-item-body").height()+30; + heightitem=$(this).parent().parent().height(); + + + $(this).parent().children(".grid-item-body").show(); + $(this).parent().parent().css("width","100%"); + + $(this).parent().parent().css("height",heightitem+heightbody); + $(this).parent().children(".grid-item-content").css("height",heightitem+heightbody); + $(this).parent().children(".item-preview").css("height",heightitem+heightbody); + + var grid = $('.grid').masonry(optiongrid); + } + else { + $(this).html(''); + + $(this).parent().children(".grid-item-body").hide(); + $(this).parent().parent().css("width",""); + $(this).parent().parent().css("height",""); + $(this).parent().children(".grid-item-content").css("height",""); + $(this).parent().children(".item-preview").css("height",""); + + var grid = $('.grid').masonry(optiongrid); + } + }); + + // Sur click item à sonder + {% if activate_widsonde %} + $( ".linktosonde" ).click(function() { + title=$(this).attr("data-sonde"); + //$.getScript( "{{ widsonde_url }}?appli="+title ); + }); + {% endif %} + + }); + + + // Ajout d'un bookmark + function addBookmark(idwidget,touser) { + var url="{{ path('cadoles_portal_user_bookmark_submit',{idpage:0,idwidget:'xx',touser:'yy'})}}"; + url=url.replace('xx',idwidget); + url=url.replace('yy',touser); + + $(location).attr('href', url); + } + + // Modifciation d'un bookmark + function modBookmark(idbookmark) { + var url="{{ path('cadoles_portal_user_bookmark_update',{idpage:0,id:'xx'})}}"; + + url=url.replace('xx',idbookmark); + $(location).attr('href', url); + } + + // Ajouter un item aux bookmark + function heartBookmark(iditem) { + var idbookmark; + + $.ajax({ + method: "POST", + url: "{{ path('cadoles_portal_user_bookmark_heart') }}", + data: { + iditem:iditem + }, + success: function(idbookmark) { + location.reload(); + } + }); + + } + + // Supprimer un fichier + function delFile(directory,filename) { + var r = confirm("Confirmez-vous la suppression de ce fichier ?"); + if (r == true) { + $.ajax({ + method: "POST", + url: "{{ path('cadoles_core_user_file_delete') }}", + data: { + directory:directory, + filename:filename + }, + success: function() { + location.reload(); + } + }); + } + } + + // Ajustement des frames + function AjustFrame() { + $('.frameajust').iframeAutoHeight({ + minHeight: 500, // Sets the iframe height to this value if the calculated value is less + heightOffset: 0, // Optionally add some buffer to the bottom + callback: function(callbackObject) { $(this).parent().css("height",callbackObject.newFrameHeight) ;} + }); + + if($(".frameitem").length>0) { + var heightbody = $('html').height(); + var heightheader = $('.header').height(); + if($('.pagemenu').css("display")=="none") + var heightmenu = 0; + else + var heightmenu = $('.pagemenu').height(); + + var heightframe = heightbody-heightheader-heightmenu; + + $(".frameitem").height(heightframe); + } + + } + + + // Affichage d'un Flux + function showFlux(idwidget, id) { + if(id=="all") + $(".widget[data-id="+idwidget+"]").find(".feed").show(); + else { + $(".widget[data-id="+idwidget+"]").find(".feed").hide(); + $(".widget[data-id="+idwidget+"]").find(".flux-"+id).show(); + } + + var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'}; + var grid = $('.grid').masonry(optiongrid); + } + + // Affichage des frames associés aux items de bureau + function resizeFrame() { + var iFrame = document.getElementById('frameContent'); + + var heightbody = $('html').height(); + var heightheader = $('.header').height(); + if($('#appmenu').css("display")=="none") + var heightmenu = 0; + else + var heightmenu = $('#appmenu').height(); + + + var heightframe = heightbody-heightheader-heightmenu; + + $(".pageframe").each(function( index ) { + $(this).height(heightframe); + }); + } + + + function showFrameitem(id,url,forcereload) { + $(".pageframe").hide(); + + // Si force le rechargement et frame existante on la détruit + if(forcereload&&$("#frameitem-"+id).length) + $("#frameitem-"+id).remove(); + + // Si la frame en cours existe déjà on l'affiche + if($("#frameitem-"+id).length) + $("#frameitem-"+id).show(); + // Sinon on la génère + else + $("#pagecontainer").append(""); + + + resizeFrame(); + } + +{% endblock %} diff --git a/templates/Page/pages.html.twig b/templates/Page/pages.html.twig new file mode 100644 index 0000000..274c035 --- /dev/null +++ b/templates/Page/pages.html.twig @@ -0,0 +1,571 @@ + +{% extends '@CadolesCore/base.html.twig' %} + +{% block localstyle %} + body{overflow-y:hidden} +{% endblock %} + +{% block appmenu %} + + + + + + + + + + + + + + + +{% endblock %} + +{% block pagewrapper %} +
+ + + {% if activate_widonlyoffice %} + + {% endif %} + + {% set nbgroupregrouped=5 %} + {% if groupsshared|length > nbgroupregrouped %} + + {%endif%} + + + + + + {%if app.user %} + + {% endif %} + +{% endblock %} + +{% block localexternalscript %} + {% if app.user %} + + + {% endif %} +{% endblock %} + +{% block localjavascript %} + var idpage; + pagebookmark="{{app.session.get("pagebookmark")}}"; + + $('document').ready(function(){ + {% if gotoroute is empty %} + {% for page in pagesadmin %} + {% if page.id==entity.id %} + {% set usage="portal" %} + {% if loop.first %} {% set usage="accueil" %} {%endif %} + showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','{{usage}}',false,null,'{{page.name}}'); + {% endif %} + {% endfor %} + + {% for page in pagesuser %} + {% if page.id==entity.id %} + showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','user',false,null,'{{page.name}}'); + {% endif %} + {% endfor %} + + {% for groupshared in groupsshared %} + {% for page in groupshared.pagesshared %} + {% if page.id==entity.id %} + showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','group',true,{{groupshared.id}},'{{page.name}}'); + {% endif %} + {% endfor %} + {% endfor %} + {% else %} + var url="{{ path(gotoroute,{id:gotoid}) }}"; + showGoto(url); + {% endif %} + + // Rendre les pages user déplacable + $("#pagesuser").sortable({ + axis: "x", + forcePlaceholderSize: true, + placeholder: "placeholder", + update: function( event, ui ) { + $('#pagesuser li').each(function(order) { + var idpage=$(this).attr('id').replace("menupage-",""); + $.ajax({ + method: "POST", + url: "{{ path('cadoles_portal_'~access~'_page_order') }}", + data: { + id:idpage, + order:order + } + }); + }); + } + }); + + // Initialisation du tableau des widgets selectionnable à la création + $('.table').DataTable({ + columnDefs: [ { "targets": 'no-sort', "orderable": false }, { "targets": 0, "className": "text-center" } ], + responsive: true, + iDisplayLength: 10, + order: [[ 1, "asc" ]], + }); + + {% if app.user and app.session.get("timerefreshnotif") > 0%} + setInterval(function(){ + loadmsgCounter() + }, {{(app.session.get("timerefreshnotif")*1000)}}); + {% endif %} + }); + + $(window).resize(function() { + resizeFrame(); + }); + + function resizeFrame() { + var iFrame = document.getElementById('frameContent'); + + var heightbody = $('html').height(); + + if($('.header').length) + var heightheader = $('.header').height(); + else + var heightheader = $('.navbarsmall').height(); + + if($('#appmenu').css("display")=="none") + var heightmenu = 0; + else + var heightmenu = $('#appmenu').height(); + + var heightframe = heightbody-heightheader-heightmenu; + + $(".pageframe").each(function( index ) { + $(this).height(heightframe); + }); + } + + + // Affichage des frames associés aux items de bureau + function showFrameitem(id,url,forcereload) { + $(".pageframereload").remove(); + $(".pageframe").hide(); + + // Si force le rechargement et frame existante on la détruit + if(forcereload&&$("#frameitem-"+id).length) + $("#frameitem-"+id).remove(); + + // Si la frame en cours existe déjà on l'affiche + if($("#frameitem-"+id).length) + $("#frameitem-"+id).show(); + // Sinon on la génère + else { + var myclass=""; + if(forcereload) myclass="pageframereload"; + $("#pagecontainer").append(""); + } + + resizeFrame(); + } + + // Affichages des pages + function showPage(id,catid,canupdate,usage,forcereload,groupid,pagename) { + // Sauvegarder la page en cours + idpage=id; + + // Cacher toutes les pages + $(".pageframereload").remove(); + $(".pageframe").hide(); + + // Rendre actif le page en cours dans le menu + $(".navbar-top-links li").removeClass("active"); + $(".dropdown-toggle").removeClass("dropdownactive"); + + $("#menupage-"+id).addClass("active"); + $('a[data-group="'+groupid+'"][data-toggle="dropdown"]').addClass("dropdownactive");; + + var url="{{ path('cadoles_portal_user_page_view',{id:'xx',usage:'yy','group':'zz'}) }}"; + url=url.replace('xx',id); + url=url.replace('yy',usage); + url=url.replace('zz',groupid); + + passurl="{{ path('cadoles_core_home',{id:'xx'}) }}"; + passurl=passurl.replace('xx',id); + history.pushState('data to be passed', 'Title of the page', passurl); + + // Si force le rechargement et frame existante on la détruit + if(forcereload&&$("#page-"+id).length) + $("#page-"+id).remove(); + + // Si la frame en cours existe déjà on l'affiche + if($("#page-"+id).length) + $("#page-"+id).show(); + // Sinon on la génère + else { + var myclass=""; + if(forcereload) myclass="pageframereload"; + $("#pagecontainer").append(""); + } + + // Détruire le badge associé car normalement de fait on a lu les notif + if(usage=="group") { + $("#badge-"+groupid).remove() + } + + // Nom de la page + console.log(pagename); + $("#menuname").html(pagename); + + // Cacher les actions possibles sur la page + $("#menuupdate").hide(); + $("#menushare").hide(); + $("#menudelete").hide(); + $("#menubookmark").hide(); + $("#menuwidgetuser").hide(); + $("#menuwidgetgroup").hide(); + + if(canupdate) { + $("#menuupdate").show(); + $("#menushare").show(); + $("#menudelete").show(); + } + + {% if app.user %} + + if(id==pagebookmark) { + $("#menubookmark").css("color","red"); + $("#menubookmark").attr("title","Ne plus faire de cette page votre page d'accueil") + } + else { + $("#menubookmark").css("color",""); + $("#menubookmark").attr("title","Faire de cette page votre page d'accueil") + } + + $("#menubookmark").show(); + {% endif %} + + // Si page de type widget on affiche la selection des widgets à insérer + if($("#page-"+id).data('category')==2&&canupdate) { + if(usage=="user") $("#menuwidgetuser").show(); + if(usage=="group") $("#menuwidgetgroup").show(); + + } + + // On resize les frame + resizeFrame(); + + // Mettre le focus dans la frame + //$("#page-"+id).contentWindow.focus(); + } + + // Affichages des pages + function showGoto(url) { + $("#pagecontainer").append(""); + + // On resize les frame + resizeFrame(); + } + + + function submitPage() { + var url="{{ path('cadoles_portal_'~access~'_page_submit') }}"; + $(location).attr('href',url); + } + + function updatePage() { + if($("#page-"+idpage).length) { + var url="{{ path('cadoles_portal_'~access~'_page_update',{id:'xx'}) }}"; + url=url.replace('xx',idpage); + + $(location).attr('href',url); + } + } + + function sharePage() { + if($("#page-"+idpage).length) { + var url="{{ path('cadoles_portal_'~access~'_page_share',{id:'xx'}) }}"; + url=url.replace('xx',idpage); + + $(location).attr('href',url); + } + } + + function deletePage() { + if($("#page-"+idpage).length) { + if (confirm('Êtes-vous sûr de vouloir supprimer ?')) { + var url="{{ path('cadoles_portal_'~access~'_page_delete',{id:'xx'}) }}"; + url=url.replace('xx',idpage); + + $(location).attr('href',url); + } + } + } + + function bookmarkPage() { + {% if app.user %} + if($("#page-"+idpage).length) { + if(pagebookmark==idpage) + confirmtext="Votre page d'accueil redevient l'accueil général de {{ app.session.get("appname") }}."; + else + confirmtext="Cette page sera votre page d'acueil à l'ouverture de {{ app.session.get("appname") }}, vous pourrez à tout moment changer de page d'accueil."; + + if (confirm(confirmtext)) { + $.ajax({ + method: "POST", + url: "{{ path('cadoles_core_user_preference') }}", + data: { + id:0, + key:'pagebookmark', + value: idpage + }, + success: function() { + if(pagebookmark==idpage) { + pagebookmark=""; + $("#menubookmark").css("color",""); + $("#menubookmark").attr("title","Faire de cette page votre page d'accueil") + } + else { + pagebookmark=idpage; + $("#menubookmark").css("color","red"); + $("#menubookmark").attr("title","Ne plus faire de cette page votre page d'accueil") + } + } + }); + } + } + {% endif %} + } + + // Création d'un widget selectionné + function selWidget(idwidgettype) { + var url="{{ path('cadoles_portal_user_pagewidget_widget_sumbit',{idpage:'yy',idwidgettype:'xx'})}}"; + url=url.replace('xx',idwidgettype); + url=url.replace('yy',idpage); + + $(location).attr('href', url); + }; + + function loadmsgCounter() { + + $.ajax({ + method: "POST", + url: "{{ path('cadoles_portal_user_page_ajax_msgcounter') }}", + success: function(data) { + $.each(data, function(group, counter) { + menu=$("a[data-group='"+group+"']"); + if(menu.length) { + if(menu.children(".badge").length) { + if(counter==0) + menu.remove(); + else + menu.children(".badge").html(counter); + } + else if(counter>0) + menu.append(""+counter+" + Partage Page + + +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + Annuler + {% else %} + Annuler + {% 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.groups) }} +
+
+{{ form_end(form) }} +{% endblock %} diff --git a/templates/Page/submit.html.twig b/templates/Page/submit.html.twig new file mode 100644 index 0000000..383b2c3 --- /dev/null +++ b/templates/Page/submit.html.twig @@ -0,0 +1,86 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

+ Nouvelle Page +

+ +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + Annuler + {% else %} + Annuler + {% 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.name) }} + {{ form_row(form.pagecategory) }} + {{ form_row(form.usage) }} + {% if form.user is defined %} + {{ form_row(form.user) }} + {% endif %} + +
{{ form_row(form.page) }}
+
{{ form_row(form.groups) }}
+ {{ form_row(form.roworder) }} + {{ form_row(form.fonticon) }} + {{ form_row(form.maxwidth) }} +
+
+{{ form_end(form) }} +{% endblock %} + +{% block localjavascript %} + $('document').ready(function(){ + hideshow(); + }); + + $(document.body).on("change","#page_submit_pagecategory",function(){ + hideshow(); + }); + + $(document.body).on("change","#page_submit_usage",function(){ + hideshow(); + }); + + function hideshow() { + if($("#page_submit_pagecategory").val()==2) + $("#pagegroup").show(); + else { + $("#pagegroup").hide(); + } + + if($("#page_submit_usage").val()=="group") + $("#groupworkgroup").show(); + else { + $("#groupworkgroup").hide(); + } + } + +{% endblock %} \ No newline at end of file diff --git a/templates/Page/updateeditor.html.twig b/templates/Page/updateeditor.html.twig new file mode 100644 index 0000000..3d8f89b --- /dev/null +++ b/templates/Page/updateeditor.html.twig @@ -0,0 +1,72 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Page Editeur = {{entity.name}} + {% elseif mode=="submit" %} + Création Page Editeur + {% endif %} +

+ +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + Annuler + {% else %} + Annuler + {% endif %} + + {% 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 %} + +
+ {% if form.roles is defined %} +
+ {% else %} +
+ {% endif %} + + {{ form_row(form.name) }} + {{ form_row(form.roworder) }} + {{ form_row(form.fonticon) }} + {{ form_row(form.maxwidth) }} + {{ form_row(form.html) }} +
+ + {% if form.roles is defined %} +
+ {{ form_row(form.user) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+ {% endif %} +
+{{ form_end(form) }} +{% endblock %} \ No newline at end of file diff --git a/templates/Page/updatetool.html.twig b/templates/Page/updatetool.html.twig new file mode 100644 index 0000000..12adcb5 --- /dev/null +++ b/templates/Page/updatetool.html.twig @@ -0,0 +1,66 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

+ Modification Page {{ entity.pagecategory.name}} = {{entity.name}} +

+ +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + Annuler + {% else %} + Annuler + {% endif %} + + {% 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 %} + +
+ {% if form.roles is defined %} +
+ {% else %} +
+ {% endif %} + + {{ form_row(form.name) }} + {{ form_row(form.roworder) }} + {{ form_row(form.fonticon) }} +
+ + {% if form.roles is defined %} +
+ {{ form_row(form.user) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+ {% endif %} +
+{{ form_end(form) }} +{% endblock %} \ No newline at end of file diff --git a/templates/Page/updateurl.html.twig b/templates/Page/updateurl.html.twig new file mode 100644 index 0000000..6c9b25b --- /dev/null +++ b/templates/Page/updateurl.html.twig @@ -0,0 +1,76 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Page URL = {{entity.name}} + {% elseif mode=="submit" %} + Création Page URL + {% endif %} +

+ +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + Annuler + {% else %} + Annuler + {% endif %} + + {% 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 %} + +
+ {% if form.roles is defined %} +
+ {% else %} +
+ {% endif %} + + {{ form_row(form.name) }} + {{ form_row(form.url) }} + le mot clé #login# sera remplacé par le login de l'utilisateur
+ Attention certains sites n'acceptent pas d'être encapsulés dans une frame.

+ + {{ form_row(form.toreload) }} + {{ form_row(form.roworder) }} + {{ form_row(form.fonticon) }} + {{ form_row(form.maxwidth) }} +
+ + {% if form.roles is defined %} +
+ {{ form_row(form.user) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+ {% endif %} +
+{{ form_end(form) }} +{% endblock %} \ No newline at end of file diff --git a/templates/Page/updatewidget.html.twig b/templates/Page/updatewidget.html.twig new file mode 100644 index 0000000..179c0a3 --- /dev/null +++ b/templates/Page/updatewidget.html.twig @@ -0,0 +1,543 @@ +{% extends 'base.html.twig' %} + +{% block localstyle %} + + +{% endblock %} +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification Page Widget = {{page.name}} + {% elseif mode=="updatetemplate" %} + Modification Modèle de Page = {{page.name}} + {% elseif mode=="submit" %} + Création Page Widget + {% endif %} +

+ +

+ {{ form_widget(form.submit) }} + {% if access=="config" %} + {% if mode=="updatetemplate" %} + Annuler + {% else %} + Annuler + {% endif %} + {% else %} + Annuler + {% endif %} + + {% if mode=="update" %} + + Supprimer + + {% endif %} + + {% if mode=="updatetemplate" %} + + 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 %} + +
+ {% if form.roles is defined %} +
+ {% else %} +
+ {% endif %} + + {{ form_row(form.name) }} + {{ form_row(form.roworder) }} + {{ form_row(form.fonticon) }} + {{ form_row(form.maxwidth) }} + {{ form_row(form.template) }} +
+ + {% if form.roles is defined %} +
+ {{ form_row(form.user) }} + {{ form_row(form.roles) }} + {{ form_row(form.groups) }} +
+ {% endif %} +
+ +

Template de Mise en Page

+
+
+{{ form_end(form) }} +{% endblock %} + + +{% block localscript %} + + +{% endblock %} \ No newline at end of file diff --git a/templates/Page/vieweditor.html.twig b/templates/Page/vieweditor.html.twig new file mode 100644 index 0000000..f974bd5 --- /dev/null +++ b/templates/Page/vieweditor.html.twig @@ -0,0 +1,23 @@ + +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} + {% if access=="config" %} + + {% endif %} + +
+ {{ entity.html | raw }} +
+{% endblock %} + +{% block localjavascript %} + $('document').ready(function(){ + }); + +{% endblock %} diff --git a/templates/Page/viewurl.html.twig b/templates/Page/viewurl.html.twig new file mode 100644 index 0000000..a9c887d --- /dev/null +++ b/templates/Page/viewurl.html.twig @@ -0,0 +1,59 @@ + +{% extends '@CadolesCore/base.html.twig' %} + +{% block localstyle %} + #pageiframe { margin: 0px -30px;} +{% endblock %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + +{% block pagewrapper %} + {% if access=="config" %} + + {% endif %} + +
+ +
+{% endblock %} + + +{% block localjavascript %} + $(window).resize(function() { + resizeFrame(); + }); + + $('document').ready(function(){ + resizeFrame(); + }); + + function resizeFrame() { + $("body").css("overflow-y","hidden"); + $(".col-md-10").css("padding","0"); + + var iFrame = document.getElementById('frameContent'); + + var heightbody = $('html').height(); + var heightheader = $('.header').height(); + if($('.pagemenu').css("display")=="none") + var heightmenu = 0; + else + var heightmenu = $('.pagemenu').height(); + + + var heightframe = heightbody-heightheader-heightmenu; + + if($("#frameContent").length>0) { + $("#frameContent").height(heightframe); + } + } +{% endblock %} diff --git a/templates/Page/viewwidget.html.twig b/templates/Page/viewwidget.html.twig new file mode 100644 index 0000000..a82d485 --- /dev/null +++ b/templates/Page/viewwidget.html.twig @@ -0,0 +1,563 @@ + +{% extends 'base.html.twig' %} + +{% block localstyle %} + {% if look=="list" %} + #R1C1:first-child { + margin-top: 30px; + } + + .widget-mini .logo { + background-color: {{app.session.get('colorbgbodydark')}}; + padding: 3px; + border-radius: 100%; + } + {% endif %} +{% endblock %} + +{% block menuuser %} + {% if access=="admin" %} + {% set template="" %} + {% if mode=="viewtemplate" %} + {% set template="template" %} + {% endif %} + +
  • {{ page.name }}
  • +
  • +
  • +
  • + {% endif %} +{% endblock %} + +{% block body %} +
    + +
    + + + + + {% if access!="all" %} + + {% endif %} + + + +{% endblock %} + +{% block localscript %} + +{% endblock %} diff --git a/templates/Pagetemplate/list.html.twig b/templates/Pagetemplate/list.html.twig new file mode 100644 index 0000000..1d72b2b --- /dev/null +++ b/templates/Pagetemplate/list.html.twig @@ -0,0 +1,58 @@ +{% extends 'base.html.twig' %} + + +{% block body %} +

    + Gestion des Modèles de Page +

    + +

    + Ajouter un Modèle +

    + + {% if app.session.flashbag.has('error') %} +
    + Erreur
    + {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
    + {% endfor %} +
    + {% endif %} + +
    +
    + Liste des Modèles +
    + +
    +
    + + + + + + + + + +
    ActionOrdreNomPour
    +
    +
    +
    +{% endblock %} + +{% block localscript %} + +{% endblock %} diff --git a/templates/Pagetemplate/submit.html.twig b/templates/Pagetemplate/submit.html.twig new file mode 100644 index 0000000..35e89eb --- /dev/null +++ b/templates/Pagetemplate/submit.html.twig @@ -0,0 +1,45 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

    + Nouveau Modèle de Page +

    + +

    + {{ form_widget(form.submit) }} + Annuler +

    + + {% 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.name) }} + {{ form_row(form.parentfor) }} + {{ form_row(form.roworder) }} + {{ form_row(form.maxwidth) }} +
    +
    +{{ form_end(form) }} +{% endblock %} diff --git a/templates/Pagewidget/constants.twig b/templates/Pagewidget/constants.twig new file mode 100644 index 0000000..70230e3 --- /dev/null +++ b/templates/Pagewidget/constants.twig @@ -0,0 +1,238 @@ +{% macro libmonth(month) %} + {% if month==1 %} Janvier + {% elseif month==2 %} Février + {% elseif month==3 %} Mars + {% elseif month==4 %} Avril + {% elseif month==5 %} Mai + {% elseif month==6 %} Juin + {% elseif month==7 %} Juillet + {% elseif month==8 %} Août + {% elseif month==9 %} Septembre + {% elseif month==10 %} Octobre + {% elseif month==11 %} Novembre + {% elseif month==12 %} Décembre + {%endif%} +{% endmacro %} + +{% macro libday(day) %} + {% if day==1 %} Lundi + {% elseif day==2 %} Mardi + {% elseif day==3 %} Mercredi + {% elseif day==4 %} Jeudi + {% elseif day==5 %} Vendredi + {% elseif day==6 %} Samedi + {% elseif day==7 %} Dimanche + {%endif%} +{% endmacro %} + +{% macro mycolormain() %} +{% set color = app.session.get('color') %}{% set colormain = app.session.get('colorbgbodydark') %}{{ colormain }} +{% endmacro %}` + +{% macro mystylewidget(entity) %} + {% set colorheaderback = entity.colorheaderback %} + {% if colorheaderback is null %} + {% set colorheaderback = "var(--colorfttitledark)" %} + {% endif %} + + {% set stylewidget = "" %} + {% if not entity.autoajust %} + {% set stylewidget = stylewidget ~ "height: " ~ entity.height ~ "px; " %} + {% endif %} + + {% if entity.border %} + {% set stylewidget = stylewidget ~ "border:1px solid " ~ colorheaderback ~ "; " %} + {% endif %} + + {{ stylewidget }} +{% endmacro %}` + + +{% macro mystylewidgetmenu(entity) %} + {% set color = app.session.get('color') %} + + {% set colorheaderfont = entity.colorheaderfont %} + {% if colorheaderfont is null %} + {% set colorheaderfont = "var(--colorfttitledark)" %} + {% endif %} + + {% set stylewidgetmenu = "" %} + {% set stylewidgetmenu = stylewidgetmenu ~ "color: " ~ colorheaderfont ~ "; " %} + {% set stylewidgetmenu = stylewidgetmenu ~ "cursor: pointer; " %} + + {{ stylewidgetmenu }} +{% endmacro %}` + + + +{% macro mystylewidgetheader(entity) %} + + {% set colorheaderback = entity.colorheaderback %} + {% if colorheaderback is null %} + {% set colorheaderback = "var(--colorbgbodydark)" %} + {% endif %} + + {% set colorheaderfont = entity.colorheaderfont %} + {% if colorheaderfont is null %} + {% set colorheaderfont = "var(--colorfttitledark)" %} + {% endif %} + + {% set stylewidgetheader = "" %} + {% set stylewidgetheader = stylewidgetheader ~ "background-color: " ~ colorheaderback ~ "; " %} + {% set stylewidgetheader = stylewidgetheader ~ "color: " ~ colorheaderfont ~ "; " %} + + {{ stylewidgetheader }} +{% endmacro %}` + + + + +{% macro mystylewidgetbody(entity) %} + {% set colorbodyback = entity.colorbodyback %} + {% if colorbodyback is null %} + {% set colorbodyback = "var(--colorbgbodydark)" %} + {% endif %} + + {% set colorbodyfont = entity.colorbodyfont %} + {% if colorbodyfont is null %} + {% set colorbodyfont = "var(--colorfttitledark)" %} + {% endif %} + + {% if not entity.border %} + {% set colorbodyback = "var(--colorbgbodylight)" %} + {% endif %} + + {% set stylewidgetbody = "" %} + {% set stylewidgetbody = stylewidgetbody ~ "background-color: " ~ colorbodyback ~ "; " %} + {% set stylewidgetbody = stylewidgetbody ~ "color: " ~ colorbodyfont ~ "; " %} + {% if not entity.autoajust %} + {% set stylewidgetbody = stylewidgetbody ~ "height: " ~ (entity.height-50-2) ~ "px; overflow-y: auto;" %} + {% endif %} + + {% if entity.border %} + {% set stylewidgetbody = stylewidgetbody ~ "padding:10px;" %} + {% endif %} + + {% if not entity.opened %} + {% set stylewidgetbody = stylewidgetbody ~ "display:none;" %} + {% endif %} + + {{ stylewidgetbody }} + +{% endmacro %}` + +{% macro mystylewidgetbodyreverse(entity) %} + {% set color = app.session.get('color') %} + + {% set colorbodyback = entity.colorbodyback %} + {% if colorbodyback is null %} + {% set colorbodyback = app.session.get('colorbgbodydark') %} + {% endif %} + + {% set colorbodyfont = entity.colorbodyfont %} + {% if colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorfttitledark') %} + {% endif %} + + {% if colorbodyfont == colorbodyback %} + {% if colorbodyfont == app.session.get('colorbgbodydark') %} + {% set colorbodyfont=app.session.get('colorfttitledark') %} + {% else %} + {% set colorbodyfont=app.session.get('colorbgbodydark') %} + {% endif %} + {% endif %} + + + {% set stylewidgetbody = "" %} + {% set stylewidgetbody = stylewidgetbody ~ "background-color: " ~ colorbodyback ~ "; " %} + {% set stylewidgetbody = stylewidgetbody ~ "color: " ~ colorbodyfont ~ "; " %} + + + {{ stylewidgetbody }} + +{% endmacro %}` + + + +{% macro mystylewidgetbodyframe(entity) %} + {% set color = app.session.get('color') %} + + {% set colorheaderback = entity.colorheaderback %} + {% if colorheaderback is null %} + {% set colorheaderback = app.session.get('colorbgbodydark') %} + {% endif %} + + {% set colorheaderfont = entity.colorheaderfont %} + {% if colorheaderfont is null %} + {% set colorheaderfont = app.session.get('colorfttitledark') %} + {% endif %} + + {% set colorbodyback = entity.colorbodyback %} + {% if colorbodyback is null %} + {% set colorbodyback = app.session.get('colorbgbodydark') %} + {% endif %} + + {% set colorbodyfont = entity.colorbodyfont %} + {% if colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorfttitledark') %} + {% endif %} + + {% if not entity.border %} + {% set colorbodyback = app.session.get('colorbgbodylight') %} + {% endif %} + + {% if colorbodyfont == colorbodyback %} + {% if colorbodyfont == app.session.get('colorbgbodydark') %} + {% set colorbodyfont=app.session.get('colorfttitledark') %} + {% else %} + {% set colorbodyfont=app.session.get('colorbgbodydark') %} + {% endif %} + {% endif %} + + {% set stylewidgetbodyframe = "" %} + {% set stylewidgetbodyframe = stylewidgetbodyframe ~ "background-color: " ~ colorbodyback ~ "; " %} + {% set stylewidgetbodyframe = stylewidgetbodyframe ~ "color: " ~ colorbodyfont ~ "; " %} + {% if not entity.autoajust %} + {% set stylewidgetbodyframe = stylewidgetbodyframe ~ "height: " ~ (entity.height-50-2) ~ "px;" %} + {% endif %} + + {{ stylewidgetbodyframe }} + +{% endmacro %}` + + + + + +{% macro mystylewidgetbodyimage(entity) %} + {% set color = app.session.get('color') %} + + {% set colorheaderback = entity.colorheaderback %} + {% if colorheaderback is null %} + {% set colorheaderback = app.session.get('colorbgbodydark') %} + {% endif %} + + {% set colorheaderfont = entity.colorheaderfont %} + {% if colorheaderfont is null %} + {% set colorheaderfont = app.session.get('colorfttitledark') %} + {% endif %} + + {% set colorbodyback = entity.colorbodyback %} + {% if colorbodyback is null %} + {% set colorbodyback = app.session.get('colorbgbodydark') %} + {% endif %} + + {% set colorbodyfont = entity.colorbodyfont %} + {% if colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorfttitledark') %} + {% endif %} + + {% set stylewidgetbodyimage = "" %} + {% set stylewidgetbodyimage = stylewidgetbodyimage ~ "background-color: " ~ colorbodyback ~ "; " %} + {% set stylewidgetbodyimage = stylewidgetbodyimage ~ "color: " ~ colorbodyfont ~ "; " %} + {% if not entity.autoajust %} + {% set stylewidgetbodyimage = stylewidgetbodyimage ~ "height: " ~ (entity.height-2) ~ "px; " %} + {% endif %} + + {{ stylewidgetbodyimage }} +{% endmacro %}` \ No newline at end of file diff --git a/templates/Pagewidget/edit.html.twig b/templates/Pagewidget/edit.html.twig new file mode 100644 index 0000000..a7df078 --- /dev/null +++ b/templates/Pagewidget/edit.html.twig @@ -0,0 +1,183 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

    + {% if mode=="update" or mode=="updatetemplate" %} + Modification Widget + {% elseif mode=="submit" or mode=="submittemplate" %} + Création Widget + {% endif %} +

    + +

    + {{ form_widget(form.submit) }} + + {% if access=="admin" %} + {% if mode=="update" %} + Annuler + {% else %} + Annuler + {% endif %} + {% else %} + {% if mode=="update" %} + Annuler + {% else %} + Annuler + {% endif %} + {% 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.name) }} +
    +
    +
    + +
    +
    +
    Informations
    +
    +
    + {% if entity.icon.label %} + + {% endif %} +
    + +
    + {{ form_row(form.idicon) }} + Selectionner un Icône + Détacher l'Icône +
    +
    +
    +
    +
    +
    +
    Informations
    +
    +
    +
    + {{ form_row(form.autoajust) }} + {{ form_row(form.height) }} + {{ form_row(form.border) }} + {{ form_row(form.opened) }} +
    + +
    + {{ form_row(form.viewheader) }} + {{ form_row(form.colorheaderback) }} + {{ form_row(form.colorheaderfont) }} + {{ form_row(form.colorbodyback) }} + {{ form_row(form.colorbodyfont) }} +
    + +
    + +
    + +
    + {{ form_widget(form) }} +
    +
    +
    +
    +
    +
    + +{{ form_end(form) }} +{% endblock %} + +{% block localscript %} + +{% endblock %} \ No newline at end of file diff --git a/templates/Pagewidget/viewalert.html.twig b/templates/Pagewidget/viewalert.html.twig new file mode 100644 index 0000000..be11157 --- /dev/null +++ b/templates/Pagewidget/viewalert.html.twig @@ -0,0 +1,140 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set colormain = constants.mycolormain() %} +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + +{%if mini %} + +{% else %} + {% if canupdate or alerts|length>0 %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + {% for alert in alerts %} +
    + + +
    +
    {{ alert.content|raw }}
    + + {% if not alert.items is empty %} + {% if app.user %} + {% set username = app.user.username %} + {% else %} + {% set username = "" %} + {% endif %} + + + {% endif %} +
    + +
    + + {% endfor %} +
    +
    + {% endif %} +{% endif %} + + diff --git a/templates/Pagewidget/viewappexternal.html.twig b/templates/Pagewidget/viewappexternal.html.twig new file mode 100644 index 0000000..22f2023 --- /dev/null +++ b/templates/Pagewidget/viewappexternal.html.twig @@ -0,0 +1,112 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set colormain = constants.mycolormain() %} +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + +{% if modedesktop==0 %} + {% set stylegrid="" %} +{% elseif modedesktop==1 %} + {% set stylegrid="grid-medium" %} +{% elseif modedesktop==2 %} + {% set stylegrid="grid-small" %} +{% elseif modedesktop==3 %} + {% set stylegrid="grid-list" %} +{% endif %} + +{% set colorbodyfont = "" %} +{% if entity.colorbodyfont is not null %} + {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} +{% endif %} + + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + {% for itemcategory in itemcategorys %} + {% set haveitem=false %} + + {% for item in items if item.itemcategory==itemcategory %} + + {% if loop.index ==1 %} + {% set haveitem=true %} + + {% if itemcategorys|length > 1 %} +

    {{ itemcategory.label }}

    + {% endif %} + +
    +
    +
    + {% endif %} + + + {% endfor %} + {% if haveitem %} +
    + {% endif %} + {% endfor %} +
    +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewblog.html.twig b/templates/Pagewidget/viewblog.html.twig new file mode 100644 index 0000000..181d573 --- /dev/null +++ b/templates/Pagewidget/viewblog.html.twig @@ -0,0 +1,101 @@ + +{% import "Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if access=="config" %} + + {% else %} + {% if canadd %} + {% set idblog = "" %} + {% set url= path('app_user_blogarticle_submit') %} + {% if usage=="group" and firstblog is defined %} + {% set url= path('app_user_blogarticle_submit',{idblog:firstblog,page:entity.page.id}) %} + {% endif %} + + + {% endif %} + + {% set url= path('app_user_blog_view') %} + {% if usage=="group" and firstblog is defined %} + {% set url= path('app_user_blog_view',{id:firstblog}) %} + {% endif %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% if blogarticles|length >= 1 %} + + {% endif %} +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewbookmark.html.twig b/templates/Pagewidget/viewbookmark.html.twig new file mode 100644 index 0000000..f3e0481 --- /dev/null +++ b/templates/Pagewidget/viewbookmark.html.twig @@ -0,0 +1,132 @@ +{% import "Pagewidget/constants.twig" as constants %} + + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + +{% if modedesktop==0 %} + {% set stylegrid="" %} +{% elseif modedesktop==1 %} + {% set stylegrid="grid-medium" %} +{% elseif modedesktop==2 %} + {% set stylegrid="grid-small" %} +{% elseif modedesktop==3 %} + {% set stylegrid="grid-list" %} +{% endif %} + +{% set colorbodyfont = "" %} +{% if entity.colorbodyfont is not null %} + {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} +{% endif %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if canadd %} + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% if bookmarks is not empty or canadd %} +
    +
    +
    +
    +
    + {% for bookmark in bookmarks %} + + {% endfor %} + + {% if canadd %} +
    +
    + +
    +
    + {% endif %} +
    +
    +
    + {% endif %} +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewcalendar.html.twig b/templates/Pagewidget/viewcalendar.html.twig new file mode 100644 index 0000000..531a6a6 --- /dev/null +++ b/templates/Pagewidget/viewcalendar.html.twig @@ -0,0 +1,100 @@ +{% import "Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + {% if access=="config" %} + + {% else %} + {% set url= path('app_'~access~'_calendar_view') %} + {% if usage=="group" and firstcalendar is defined %} + {% set url= path('app_'~access~'_calendar_view',{id:firstcalendar}) %} + {% endif %} + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% set firstflux="" %} + + {% if events|length >= 1 %} +
    + {% set monthsel = "" %} + {% for i in 0..(nbday-1) %} + {% set dateeventstart = 'now'|date_modify("+"~i~" day midnight") %} + {% set dateeventend = 'now'|date_modify("+"~(i+1)~" day midnight") %} + + {% set fgaffday=false %} + {% for event in events %} + {% if event.start< dateeventend and event.end>=dateeventstart %} + + {% if monthsel == "" or dateeventstart|date("Y-m")!=monthsel %} + {% set monthsel = dateeventstart|date("Y-m") %} + {% set libmonth = constants.libmonth(dateeventstart|date("m")) %} +

    {{ libmonth ~ " " ~ dateeventstart|date("Y") }}

    + {% endif %} + + {% if not fgaffday %} + {% set fgaffday=true %} + {% set libday = constants.libday(dateeventstart|date("N")) %} +
    {{ libday ~ " " ~ dateeventstart|date("d/m/Y") }}
    + {% endif %} + +
    + {{ event.name }} = + {% if not event.allDay %} + {{ event.start | date("H:i") }} - + {%endif%} + {{ event.title }} +
    + {% endif %} + + {% endfor %} + + {% endfor %} + + {% if url is defined %} + + {% endif %} +
    + {% endif %} +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewchat.html.twig b/templates/Pagewidget/viewchat.html.twig new file mode 100644 index 0000000..e66f81b --- /dev/null +++ b/templates/Pagewidget/viewchat.html.twig @@ -0,0 +1,76 @@ +{% import "Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} +{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = app.session.get('colorbgbodydark') %} +{% endif %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorfttitledark') %} +{% endif %} +{% set colorbody = app.session.get('colorbgbodylight') %} +{% set colormain = app.session.get('colorbgbodydark') %} + +{% if app.user %} + + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + + + {% if onheader %} +
    + +
    + {% else %} +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + {% if group is not null %} + {{ render(url('app_message_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }} + {% endif %} +
    + {% endif %} +
    +{% endif %} + +{%endif%} \ No newline at end of file diff --git a/templates/Pagewidget/vieweditor.html.twig b/templates/Pagewidget/vieweditor.html.twig new file mode 100644 index 0000000..8379538 --- /dev/null +++ b/templates/Pagewidget/vieweditor.html.twig @@ -0,0 +1,56 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + {{ html | raw }} +
    +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewfile.html.twig b/templates/Pagewidget/viewfile.html.twig new file mode 100644 index 0000000..8d57522 --- /dev/null +++ b/templates/Pagewidget/viewfile.html.twig @@ -0,0 +1,67 @@ +{% import "Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = app.session.get('colorbgbodydark') %} +{% endif %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if entity.border and colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorfttitledark') %} +{% endif %} + +{% if colorbodyfont is null %} + {% set colorbodyfont = app.session.get('colorbgbodydark') %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + +
    +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewflux.html.twig b/templates/Pagewidget/viewflux.html.twig new file mode 100644 index 0000000..ae4cefd --- /dev/null +++ b/templates/Pagewidget/viewflux.html.twig @@ -0,0 +1,141 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set color = app.session.get('color') %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['fontcolorhover'] %} +{% endif %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = color['main'] %} +{% endif %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% if colorbodyback==color['fontcolorhover'] %} + {% set colorbodyfont = color['main'] %} + {% else %} + {% set colorbodyfont = color['fontcolorhover'] %} + {% endif %} +{% endif %} + +{% if modelist==0 %} + {% set stylegrid="grid-preview" %} +{% elseif modelist==1 %} + {% set stylegrid="grid-list" %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% set firstflux="" %} + +
    + {% if fluxs is defined %} + {% if fluxs|length > 1 %} +
    Tout
    + + {% for flux in fluxs %} + {% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %} + {% if flux.color is not null %} + {% set stylefeed = "background-color: #" ~ flux.color ~ ";" %} + {% endif %} + +
    {{ flux.title }}
    + {% endfor %} + {% endif %} + {% endif %} + +
    + {% for feed in feeds %} + {% if loop.index==1 %} +
    +
    + {% endif %} + + + {% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %} + {% if feed.color is defined and feed.color is not null %} + {% set stylecolor = "background-color: #" ~ feed.color ~ ";" %} + {% endif %} + {% set stylefeed = "" %} + {% if feed.image is not null and feed.image != ""%} + {% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %} + {% endif %} + + + + {% endfor %} +
    +
    +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewframe.html.twig b/templates/Pagewidget/viewframe.html.twig new file mode 100644 index 0000000..18c8661 --- /dev/null +++ b/templates/Pagewidget/viewframe.html.twig @@ -0,0 +1,77 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} +{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %} + +{% set color = app.session.get('color') %} +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = color['main'] %} +{% endif %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['fontcolorhover'] %} +{% endif %} + +{%if mini %} + +{% else %} +
    + +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + + + {% if onheader %} +
    + +
    + {% else %} +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + +
    + {% endif %} +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewgalery.html.twig b/templates/Pagewidget/viewgalery.html.twig new file mode 100644 index 0000000..62029c3 --- /dev/null +++ b/templates/Pagewidget/viewgalery.html.twig @@ -0,0 +1,123 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} + +{% set color = app.session.get('color') %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = color['main'] %} +{% endif %} + + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['fontcolorhover'] %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if canadd %} + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% if files|length>0 or canadd %} +
    +
    + {% if canadd %} +
    +
    + {% endif %} + + {% for file in files|sort %} + {% if loop.index==1 and not canadd %} +
    +
    + {% endif %} + +
    +
    + {% if canadd %} + + {% endif %} + + + + + +
    +
    + {% endfor %} + + {% if canadd %} + + {% endif %} +
    +
    + {% endif %} +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewgroup.html.twig b/templates/Pagewidget/viewgroup.html.twig new file mode 100644 index 0000000..e03dcf9 --- /dev/null +++ b/templates/Pagewidget/viewgroup.html.twig @@ -0,0 +1,116 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set colormain = constants.mycolormain() %} +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} + +{% set permgroup = app.session.get('permgroup') %} +{% set canadd = false %} +{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permgroup=="ROLE_MODO" or permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_USER') and permgroup=="ROLE_USER") %} + {% set canadd = true %} +{% endif %} + +{% if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if canadd %} + + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} + + +
    + +
    +
    +
    +
    + {% for group in groups %} + + {% endfor %} + + {% if canadd %} + + {% endif %} +
    +
    +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewgroupmessage.html.twig b/templates/Pagewidget/viewgroupmessage.html.twig new file mode 100644 index 0000000..7b9ccc3 --- /dev/null +++ b/templates/Pagewidget/viewgroupmessage.html.twig @@ -0,0 +1,121 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set colormain = constants.mycolormain() %} +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} +{% set color = app.session.get('color') %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['fontcolorhover'] %} +{% endif %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = color['main'] %} +{% endif %} + +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% if colorbodyback==color['fontcolorhover'] %} + {% set colorbodyfont = color['main'] %} + {% else %} + {% set colorbodyfont = color['fontcolorhover'] %} + {% endif %} +{% endif %} + +{% if modelist==0 %} + {% set stylegrid="grid-preview" %} +{% elseif modelist==1 %} + {% set stylegrid="grid-list" %} +{% endif %} + +{%if mini %} + +{% else %} +
    + +
    + {% if canupdate %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + + {% if messages is not empty %} +
    +
    +
    +
    + {% set nbaff=0 %} + {% for message in messages %} + {% set nbaff=nbaff+1 %} + {% set class="" %} + {% set style="" %} + {% if nbaff > nbarticle %} + {% set class="msg-hidden" %} + {% set style="display:none" %} + {% endif %} + +
    +
    + +
    +
    + {% endfor %} +
    +
    + {% endif %} +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewinfo.html.twig b/templates/Pagewidget/viewinfo.html.twig new file mode 100644 index 0000000..a3e2323 --- /dev/null +++ b/templates/Pagewidget/viewinfo.html.twig @@ -0,0 +1,60 @@ +{% extends 'widget.html.twig' %} + +{% block widgetmenu %} +{% endblock %} + +{% block widgetbody %} +
    + {{ description | raw }} +
    + + {%if usage=="group" %} +
    +
    +
    + + {% if canadd==true %} + + {% endif %} + + {% for member in members %} +
    +
    + +
    +
    + {% endfor %} +
    + {% endif %} +{% endblock %} diff --git a/templates/Pagewidget/viewitem.html.twig b/templates/Pagewidget/viewitem.html.twig new file mode 100644 index 0000000..aa6fa7c --- /dev/null +++ b/templates/Pagewidget/viewitem.html.twig @@ -0,0 +1,263 @@ + + +{% set widgethaveheader=entity.viewheader %} +{% set widgetname="item" %} +{%if widgethaveheader %} +{% set widgetstyle=(entity.colorheaderback ? "border-color:"~entity.colorheaderback~";" : "border-color:var(--colorbgbodydark);") %} +{% set widgetstylemenu=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %} +{%else%} +{% set widgetstyle=(entity.colorbodyback ? "border-color:"~entity.colorbodyback~";" : "border-color:var(--colorbgbodydark);") %} +{% set widgetstylemenu="background-color:var(--colorbgbodydark); color: var(--colorfttitledark); padding:10px; border-radius: 5px;" %} +{%endif%} + +{% set widgetstyleheader=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %} +{% set widgetstylebody=(entity.colorbodyback ? "background-color:"~entity.colorbodyback~";" : "background-color:var(--colorbgbodylight);")~(entity.colorbodyfont ? "color:"~entity.colorbodyfont~";" : "color:var(--colorfttitlelight);") %} +{% set widgeicon= entity.icon ? path('app_minio_image',{file:entity.icon.label}) : path('app_minio_image',{file:"icon/icon_pin.png"}) %} + +{% if modedesktop==0 %} + {% set itemsize="item-verysmall" %} +{% elseif modedesktop==1 %} + {% set itemsize="item-small" %} +{% elseif modedesktop==2 %} + {% set itemsize="item-medium" %} +{% elseif modedesktop==3 %} + {% set itemsize="item-large" %} +{% elseif modedesktop==4 %} + {% set itemsize="item-list" %} +{% endif %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + + +{% set colorbodyfont = "" %} +{% if entity.colorbodyfont is not null %} + {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} +{% endif %} + + +
    +
    + {% if canadd %} + + {% endif %} + + {% if canupdate %} + + + {% endif %} + + {% if canadd and access!="admin"%} + + {% endif %} +
    + + {%if widgethaveheader %} +
    + + {{ entity.name }} +
    + {%endif%} + +
    + {% set havemenu=false %} + {% set havebookmark=false %} + + {% if menu and withbookmark!= 2 and bookmarks is not empty and itemcategorys|length > 1 %} + {% set havemenu=true %} +
    + {% if menuall %} +
    Tout
    + {% endif %} + + {% if bookmarks is not empty %} +
    + {% endif %} + + {% for itemcategory in itemcategorys %} +
    {{itemcategory.label}}
    + {% endfor %} +
    + {% endif %} + + {% if search %} + {% set havemenu=true %} +
    +
    +   +
    + +
    + {% endif %} + + {% if (bookmarks is not empty or canadd ) and (withbookmark==0 or withbookmark==2) %} + {% if withbookmark==0 and itemcategorys|length > 1 %} +

    Favoris

    + {% endif %} +
    + {% for bookmark in bookmarks %} + {% set havebookmark=true %} + {% if bookmark.item %} + {% set bookmarktitle = bookmark.item.title %} + {% set bookmarksubtitle = bookmark.item.subtitle %} + {% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %} + {% set bookmarktarget = bookmark.item.target %} + {% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %} + {% set bookmarkcontent = bookmark.item.content %} + {% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %} + {% else %} + {% set bookmarktitle = bookmark.title %} + {% set bookmarksubtitle = bookmark.subtitle %} + {% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %} + {% set bookmarktarget = bookmark.target %} + {% set bookmarkurl = bookmark.url|replace({'#login#': username}) %} + {% set bookmarkcontent = bookmark.content %} + {% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %} + {% endif %} + +
    +
    +
    + {% if bookmarktarget == 'frame' %} + + {% else %} + + {% endif %} + + +
    +

    {{ bookmarktitle }}

    +
    {{ bookmarksubtitle|nl2br }}
    +
    +
    + +
    + {% if bookmarkcontent %} + + {% endif %} +
    +
    + +
    {{ bookmarkcontent|raw }}
    +
    +
    + {% endfor %} + + {% if (canadd) %} + + {% endif %} +
    + {% endif %} + + {% for itemcategory in itemcategorys %} + {% if itemcategorys|length > 1 or havebookmark %}

    {{itemcategory.label}}

    {% endif %} +
    + {% for item in items %} + {% if item.itemcategory==itemcategory %} +
    +
    +
    + {% set url=item.url|replace({'#login#': username}) %} + {% if item.protected and not app.user %} + {% set url=path('app_login') %} + {% endif %} + + {% if item.target == 'frame' %} + + {% else %} + + {% endif %} + + {% if item.icon %} + + {% else %} + + {% endif %} + +
    +

    {{ item.title }}

    +
    {{ item.subtitle|nl2br }}
    +
    +
    + +
    + {% if canadd %} + + {% endif %} + + {% if item.content %} + + {% endif %} +
    +
    + +
    {{ item.content|raw }}
    +
    +
    + {% endif %} + {% endfor %} +
    + {% endfor %} + + + +
    +
    + + diff --git a/templates/Pagewidget/viewitemessential.html.twig b/templates/Pagewidget/viewitemessential.html.twig new file mode 100644 index 0000000..85c7a5d --- /dev/null +++ b/templates/Pagewidget/viewitemessential.html.twig @@ -0,0 +1,249 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set colormain = constants.mycolormain() %} +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} + + +{% if modedesktop==0 %} + {% set stylegrid="" %} +{% elseif modedesktop==1 %} + {% set stylegrid="grid-medium" %} +{% elseif modedesktop==2 %} + {% set stylegrid="grid-small" %} +{% elseif modedesktop==3 %} + {% set stylegrid="grid-list" %} +{% endif %} + +{% set colorbodyfont = "" %} +{% if entity.colorbodyfont is not null %} + {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} +{% endif %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canadd %} + + {% endif %} + + {% if canupdate %} + + + {% endif %} + + {% if canadd and access!="config"%} + + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% if canadd or bookmarks is not empty or items is not empty %} +
    +
    +
    +
    + + {% for bookmark in bookmarks %} + {% if bookmark.item %} + + {%else%} + + {%endif%} + {% endfor %} + + + {% for item in items %} + + {% endfor %} + + {% if canadd %} + + {% endif %} +
    +
    + {% endif %} +
    +{% endif %} + + diff --git a/templates/Pagewidget/viewlink.html.twig b/templates/Pagewidget/viewlink.html.twig new file mode 100644 index 0000000..fc2903f --- /dev/null +++ b/templates/Pagewidget/viewlink.html.twig @@ -0,0 +1,22 @@ +{% set onlyheader=true %} +{% extends 'widget.html.twig' %} + +{% block widgetheader %} + {% if target == 'frame' %} + + {% elseif target == "_self" %} + + {% else %} + + {% endif %} + {% if entity.icon %} + + {% else %} + + {% endif %} + +
    {{ entity.name }}
    +
    +{% endblock %} + + diff --git a/templates/Pagewidget/viewonlydoc.html.twig b/templates/Pagewidget/viewonlydoc.html.twig new file mode 100644 index 0000000..47a4993 --- /dev/null +++ b/templates/Pagewidget/viewonlydoc.html.twig @@ -0,0 +1,76 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} + +{% set color = app.session.get('color') %} + +{% set colorbodyback = entity.colorbodyback %} +{% if colorbodyback is null %} + {% set colorbodyback = color['main'] %} +{% endif %} + + +{% set colorbodyfont = entity.colorbodyfont %} +{% if entity.border and colorbodyfont is null %} + {% set colorbodyfont = color['fontcolorhover'] %} +{% endif %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['main'] %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + + + +
    +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewproject.html.twig b/templates/Pagewidget/viewproject.html.twig new file mode 100644 index 0000000..7e9d80c --- /dev/null +++ b/templates/Pagewidget/viewproject.html.twig @@ -0,0 +1,133 @@ +{% import "Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %} + + + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if access=="config" %} + + {% elseif app.user %} + {% set idproject = "" %} + {% set urladd= path('app_user_projecttask_submit') %} + {% set urlview= path('app_user_project_view') %} + {% if usage=="group" and firstproject is defined %} + {% set urladd= path('app_user_projecttask_submit',{idproject:firstproject,page:entity.page.id}) %} + {% set urlview= path('app_user_project_view',{id:firstproject}) %} + {% endif %} + + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + + {% if projecttasks|length >= 1 %} + + {% endif %} +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewseparator.html.twig b/templates/Pagewidget/viewseparator.html.twig new file mode 100644 index 0000000..8f30d55 --- /dev/null +++ b/templates/Pagewidget/viewseparator.html.twig @@ -0,0 +1,63 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} +{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %} + +{% set color = app.session.get('color') %} +{% set colorbodyfont = entity.colorbodyfont %} +{% if colorbodyfont is null %} + {% set colorbodyfont = color['main'] %} +{% endif %} + +{%if not mini %} +
    + {% if canupdate %} +
    + + +
    + {% endif %} + + +
    + {% if seeicon %} + {% if entity.icon %} + + {% else %} + + {% endif %} + {% endif %} + + {% if seetitle %} + {{ entity.name }} + {% else %} + +
    + {% endif %} +
    +
    +{% endif %} + + + diff --git a/templates/Pagewidget/viewslide.html.twig b/templates/Pagewidget/viewslide.html.twig new file mode 100644 index 0000000..e73952c --- /dev/null +++ b/templates/Pagewidget/viewslide.html.twig @@ -0,0 +1,95 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbody = constants.mystylewidgetbody(entity) %} +{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %} + +{% set color = app.session.get('color') %} +{% set stylelink = "color:#" ~ entity.colorheaderfont ~ ";" %} +{% if entity.colorheaderfont is null %} + {% set stylelink = "color:#" ~ color['fontcolorhover'] ~ ";" %} +{% endif %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + + {% if canadd %} + + {% endif %} + + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + +
    + {% set intervalmilli = interval * 1000 %} +
    + {% for slide in slides %} +
    + + {% if slide.title is not empty %} +

    {{slide.title}}

    + {% endif %} + + {% if slide.url is not empty %} + {% if slide.target == 'frame' %} + + {% elseif slide.target == "_self" %} + + {% else %} + + {% endif %} + + + {% endif %} + + {% if slide.subtitle is not empty %} + {{slide.subtitle}} + {% endif %} + + + +
    + + {% endfor %} +
    +
    +
    +{% endif %} + + + + diff --git a/templates/Pagewidget/viewurl.html.twig b/templates/Pagewidget/viewurl.html.twig new file mode 100644 index 0000000..53e31ea --- /dev/null +++ b/templates/Pagewidget/viewurl.html.twig @@ -0,0 +1,86 @@ +{% set theme = app.session.get('theme') %} +{% if theme is not empty %} + {{ include('@Theme/'~theme~'/function.html.twig') }} +{% endif %} + +{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} + +{% set stylewidget = constants.mystylewidget(entity) %} +{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} +{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} +{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %} +{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %} + +{% if app.user %} + {% set username = app.user.username %} +{% else %} + {% set username = "" %} +{% endif %} + +{%if mini %} + +{% else %} +
    +
    + {% if canupdate %} + + + {% endif %} + {% if look=="list" %} + + {% else %} + + {% endif %} +
    + + + {% if imagemedia %} + {% if entity.autoajust %} +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    +
    + +
    + {% else %} +
    + {% endif %} + {% else %} +
    + {% if entity.icon %} + + {% else %} + + {% endif %} + {{ entity.name }} +
    + +
    + {% set minheight="" %} + {%if look=="list" %} + {% set minheight="min-height:1300px;" %} + {% endif %} + +
    + {% endif %} +
    +{% endif %} + + diff --git a/templates/Pagewidget/widgetheader.html.twig b/templates/Pagewidget/widgetheader.html.twig new file mode 100644 index 0000000..8188c93 --- /dev/null +++ b/templates/Pagewidget/widgetheader.html.twig @@ -0,0 +1,91 @@ +{%if not mini %} + {# Récupération des couleurs #} + {% set colorheaderback = entity.colorheaderback %} + {% if colorheaderback is null %} + {% set colorheaderback = "var(--colorbgbodydark)" %} + {% endif %} + + {% set colorheaderfont = entity.colorheaderfont %} + {% if colorheaderfont is null %} + {% set colorheaderfont = "var(--colorftbodydark)" %} + {% endif %} + + {% set colorbodyback = entity.colorbodyback %} + {% if colorbodyback is null %} + {% set colorbodyback = "var(--colorbgbodydark)" %} + {% endif %} + + {% set colorbodyfont = entity.colorbodyfont %} + {% if colorbodyfont is null %} + {% set colorbodyfont = "var(--colorftbodydark)" %} + {% endif %} + + {% if not entity.border %} + {% set colorbodyback = "var(--colorbgbodylight)" %} + {% set colorbodyfont = "var(--colorftbodylight)" %} + {% endif %} + + + {# Definition style widget #} + {% set widgetheight = "" %} + {% if not entity.autoajust %} + {% set widgetheight = "height: " ~ entity.height ~ "px; " %} + {% endif %} + + {# Definition style widgetheader #} + {% set widgetheaderback = "background-color:"~colorheaderback~";" %} + {% set widgetheaderfont = "color:"~colorheaderfont~";" %} + + {% set widgetheaderborder = "" %} + {% if entity.border %} + {% set widgetheaderborder = "border:1px solid " ~ colorheaderback ~ "; " %} + {% endif %} + + {# Definition style widgetbody #} + {% set widgetbodyback = "background-color:"~colorbodyback~";" %} + {% set widgetbodyfont = "color:"~colorbodyfont~";" %} + + {% set widgetbodyborder = "" %} + {% if entity.border %} + {% set widgetbodyborder = "border:1px solid " ~ colorbodyback ~ "; " %} + {% endif %} + + {% set widgetbodypadding = "" %} + {% if entity.border %} + {% set widgetbodypadding = "padding:10px;" %} + {% endif %} + + {% set widgetbodydisplay = "" %} + {% if not entity.opened %} + {% set widgetbodydisplay = "display:none;" %} + {% endif %} + + {% set stylewidgetbodyreverse = widgetheaderback~widgetheaderfont %} + + +
    +
    + {{ widgetmenu|raw }} +
    + +
    + {% if icon %} + + {% else %} + + {% endif %} + {{ title }} +
    + +
    +{% endif %} \ No newline at end of file diff --git a/templates/Pagewidget/widgetmini.html.twig b/templates/Pagewidget/widgetmini.html.twig new file mode 100644 index 0000000..dcdfb2e --- /dev/null +++ b/templates/Pagewidget/widgetmini.html.twig @@ -0,0 +1,13 @@ +{%if mini %} + +{% endif %} \ No newline at end of file