From fd0c8cceb847936ff462aaca81fa4b8b0912b411 Mon Sep 17 00:00:00 2001 From: Tim Schreiner Date: Wed, 8 Nov 2023 15:37:01 +0100 Subject: [PATCH] [TASK] Allow editing profile informations --- .../Partials/ProfileEdit/ProfileData.html | 45 ++---------- .../ProfileInformation/Cooperation.html | 63 +++++++++++++++++ .../ProfileInformation/CurriculumVitae.html | 53 ++++++++++++++ .../ProfileInformation/Lecture.html | 63 +++++++++++++++++ .../ProfileInformation/Membership.html | 63 +++++++++++++++++ .../ProfileInformation/Publication.html | 69 +++++++++++++++++++ Resources/Public/JavaScript/FrontendEditor.js | 20 +++++- 7 files changed, 334 insertions(+), 42 deletions(-) create mode 100644 Resources/Private/Partials/ProfileEdit/ProfileInformation/Cooperation.html create mode 100644 Resources/Private/Partials/ProfileEdit/ProfileInformation/CurriculumVitae.html create mode 100644 Resources/Private/Partials/ProfileEdit/ProfileInformation/Lecture.html create mode 100644 Resources/Private/Partials/ProfileEdit/ProfileInformation/Membership.html create mode 100644 Resources/Private/Partials/ProfileEdit/ProfileInformation/Publication.html diff --git a/Resources/Private/Partials/ProfileEdit/ProfileData.html b/Resources/Private/Partials/ProfileEdit/ProfileData.html index ef3afe8..933ab90 100644 --- a/Resources/Private/Partials/ProfileEdit/ProfileData.html +++ b/Resources/Private/Partials/ProfileEdit/ProfileData.html @@ -2,6 +2,12 @@ xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" > + + + + + +
@@ -35,17 +41,6 @@
-
-
- - -
-
-
@@ -68,34 +63,6 @@
-
-
- - -
-
- -
-
- - - - -
-
-
diff --git a/Resources/Private/Partials/ProfileEdit/ProfileInformation/Cooperation.html b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Cooperation.html new file mode 100644 index 0000000..f14eb16 --- /dev/null +++ b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Cooperation.html @@ -0,0 +1,63 @@ + + +
+
+

Cooperation

+ Add new entry +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ Remove entry +
+
+ +
+
+
+ + diff --git a/Resources/Private/Partials/ProfileEdit/ProfileInformation/CurriculumVitae.html b/Resources/Private/Partials/ProfileEdit/ProfileInformation/CurriculumVitae.html new file mode 100644 index 0000000..bf4b46e --- /dev/null +++ b/Resources/Private/Partials/ProfileEdit/ProfileInformation/CurriculumVitae.html @@ -0,0 +1,53 @@ + + +
+
+

Vita

+ Add new entry +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ Remove entry +
+
+ +
+
+
+ + diff --git a/Resources/Private/Partials/ProfileEdit/ProfileInformation/Lecture.html b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Lecture.html new file mode 100644 index 0000000..5abadb8 --- /dev/null +++ b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Lecture.html @@ -0,0 +1,63 @@ + + +
+
+

Lectures

+ Add new entry +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ Remove entry +
+
+ +
+
+
+ + diff --git a/Resources/Private/Partials/ProfileEdit/ProfileInformation/Membership.html b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Membership.html new file mode 100644 index 0000000..ff9654e --- /dev/null +++ b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Membership.html @@ -0,0 +1,63 @@ + + +
+
+

Memberships

+ Add new entry +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ Remove entry +
+
+ +
+
+
+ + diff --git a/Resources/Private/Partials/ProfileEdit/ProfileInformation/Publication.html b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Publication.html new file mode 100644 index 0000000..3b4b1e4 --- /dev/null +++ b/Resources/Private/Partials/ProfileEdit/ProfileInformation/Publication.html @@ -0,0 +1,69 @@ + + +
+
+

Publications

+ + + Add new entry +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ Remove entry +
+
+ +
+
+
+ + diff --git a/Resources/Public/JavaScript/FrontendEditor.js b/Resources/Public/JavaScript/FrontendEditor.js index 09135d1..4970a12 100644 --- a/Resources/Public/JavaScript/FrontendEditor.js +++ b/Resources/Public/JavaScript/FrontendEditor.js @@ -17,18 +17,32 @@ ] }; + var editorConfigLinkOnly = { + language: 'en', + height: 350, + format_tags: 'p', + toolbarGroups: [ + { name: 'links' }, + { name: 'clipboard', groups: [ 'cleanup' ] } + ], + customConfig: '', + removeButtons: [ + 'Anchor', + ] + }; + var waitCKEDITOR = setInterval(function() { console.log('Wait for ckeditor'); if (window.CKEDITOR) { clearInterval(waitCKEDITOR); CKEDITOR.replace('profile-teaching-area', editorConfig); CKEDITOR.replace('profile-core-competences', editorConfig); - CKEDITOR.replace('profile-memberships', editorConfig); CKEDITOR.replace('profile-supervised-thesis', editorConfig); CKEDITOR.replace('profile-supervised-doctoral-thesis', editorConfig); - CKEDITOR.replace('profile-vita', editorConfig); - CKEDITOR.replace('profile-publications', editorConfig); CKEDITOR.replace('profile-miscellaneous', editorConfig); + document.querySelectorAll('.publication-bodytext').forEach((textarea) => { + CKEDITOR.replace(textarea, editorConfigLinkOnly); + }); } }, 100); })();