Skip to content

Commit

Permalink
[TASK] Allow editing profile informations
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey1988 committed Nov 8, 2023
1 parent b60376f commit fd0c8cc
Show file tree
Hide file tree
Showing 7 changed files with 334 additions and 42 deletions.
45 changes: 6 additions & 39 deletions Resources/Private/Partials/ProfileEdit/ProfileData.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<f:render partial="ProfileEdit/ProfileInformation/CurriculumVitae" arguments="{_all}" />
<f:render partial="ProfileEdit/ProfileInformation/Membership" arguments="{_all}" />
<f:render partial="ProfileEdit/ProfileInformation/Cooperation" arguments="{_all}" />
<f:render partial="ProfileEdit/ProfileInformation/Publication" arguments="{_all}" />
<f:render partial="ProfileEdit/ProfileInformation/Lecture" arguments="{_all}" />

<div class="row mb-3">
<div class="col-12">
<label for="profile-website" class="form-label">Website</label>
Expand Down Expand Up @@ -35,17 +41,6 @@
</div>
</div>

<div class="row mb-3">
<div class="col-12">
<label for="profile-memberships" class="form-label">Memberships</label>
<f:form.textarea
property="memberships"
id="profile-memberships"
class="form-control"
/>
</div>
</div>

<div class="row mb-3">
<div class="col-12">
<label for="profile-supervised-thesis" class="form-label">Supervised thesis</label>
Expand All @@ -68,34 +63,6 @@
</div>
</div>

<div class="row mb-3">
<div class="col-12">
<label for="profile-vita" class="form-label">Vita</label>
<f:form.textarea
property="vita"
id="profile-vita"
class="form-control"
/>
</div>
</div>

<div class="row mb-3">
<div class="col-12">
<label for="profile-publications" class="form-label">Publications</label>
<f:form.textarea
property="publications"
id="profile-publications"
class="form-control"
/>
<label for="profile-publications-link" class="form-label">Link to external publications</label>
<f:form.textfield
property="publicationsLink"
id="profile-publications-link"
class="form-control"
/>
</div>
</div>

<div class="row mb-3">
<div class="col-12">
<label for="profile-miscellaneous" class="form-label">Miscellaneous information</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<div class="row mb-3">
<div class="col-12">
<h2>Cooperation</h2>
<f:link.action action="addProfileInformation" arguments="{profile: profile, type: 'cooperation'}" class="btn btn-primary">Add new entry</f:link.action>
</div>
</div>
<f:for each="{profile.cooperation}" as="entry" iteration="entryIterator">
<div class="row mb-3">
<div class="col-12">
<label for="cooperation-{entryIterator.index}-year" class="form-label">Year</label>
<f:form.textfield
type="number"
property="cooperation.{entryIterator.index}.year"
id="cooperation-{entryIterator.index}-year"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="cooperation-{entryIterator.index}-title" class="form-label">Title</label>
<f:form.textfield
property="cooperation.{entryIterator.index}.title"
id="cooperation-{entryIterator.index}-title"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="cooperation-{entryIterator.index}-bodytext" class="form-label">Text</label>
<f:form.textarea
property="cooperation.{entryIterator.index}.bodytext"
id="cooperation-{entryIterator.index}-bodytext"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="cooperation-{entryIterator.index}-link" class="form-label">Link</label>
<f:form.textfield
property="cooperation.{entryIterator.index}.link"
id="cooperation-{entryIterator.index}-link"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<f:link.action action="removeProfileInformation" arguments="{profile: profile, profileInformation: entry}" class="btn btn-danger">Remove entry</f:link.action>
</div>
</div>
<f:if condition="!{entryIterator.isLast}">
<hr class="mb-3" />
</f:if>
</f:for>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<div class="row mb-3">
<div class="col-12">
<h2>Vita</h2>
<f:link.action action="addProfileInformation" arguments="{profile: profile, type: 'curriculum_vitae'}" class="btn btn-primary">Add new entry</f:link.action>
</div>
</div>
<f:for each="{profile.vita}" as="entry" iteration="entryIterator">
<div class="row mb-3">
<div class="col-12">
<label for="curriculum-vitae-{entryIterator.index}-year" class="form-label">Year</label>
<f:form.textfield
type="number"
property="vita.{entryIterator.index}.year"
id="curriculum-vitae-{entryIterator.index}-year"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="curriculum-vitae-{entryIterator.index}-title" class="form-label">Title</label>
<f:form.textfield
property="vita.{entryIterator.index}.title"
id="curriculum-vitae-{entryIterator.index}-title"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="curriculum-vitae-{entryIterator.index}-bodytext" class="form-label">Text</label>
<f:form.textarea
property="vita.{entryIterator.index}.bodytext"
id="curriculum-vitae-{entryIterator.index}-bodytext"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<f:link.action action="removeProfileInformation" arguments="{profile: profile, profileInformation: entry}" class="btn btn-danger">Remove entry</f:link.action>
</div>
</div>
<f:if condition="!{entryIterator.isLast}">
<hr class="mb-3" />
</f:if>
</f:for>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<div class="row mb-3">
<div class="col-12">
<h2>Lectures</h2>
<f:link.action action="addProfileInformation" arguments="{profile: profile, type: 'lecture'}" class="btn btn-primary">Add new entry</f:link.action>
</div>
</div>
<f:for each="{profile.lectures}" as="entry" iteration="entryIterator">
<div class="row mb-3">
<div class="col-12">
<label for="lecture-{entryIterator.index}-year" class="form-label">Year</label>
<f:form.textfield
type="number"
property="lectures.{entryIterator.index}.year"
id="lecture-{entryIterator.index}-year"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="lecture-{entryIterator.index}-title" class="form-label">Title</label>
<f:form.textfield
property="lectures.{entryIterator.index}.title"
id="lecture-{entryIterator.index}-title"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="lecture-{entryIterator.index}-bodytext" class="form-label">Text</label>
<f:form.textarea
property="lectures.{entryIterator.index}.bodytext"
id="lecture-{entryIterator.index}-bodytext"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="lecture-{entryIterator.index}-link" class="form-label">Link</label>
<f:form.textfield
property="lectures.{entryIterator.index}.link"
id="lecture-{entryIterator.index}-link"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<f:link.action action="removeProfileInformation" arguments="{profile: profile, profileInformation: entry}" class="btn btn-danger">Remove entry</f:link.action>
</div>
</div>
<f:if condition="!{entryIterator.isLast}">
<hr class="mb-3" />
</f:if>
</f:for>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<div class="row mb-3">
<div class="col-12">
<h2>Memberships</h2>
<f:link.action action="addProfileInformation" arguments="{profile: profile, type: 'membership'}" class="btn btn-primary">Add new entry</f:link.action>
</div>
</div>
<f:for each="{profile.memberships}" as="entry" iteration="entryIterator">
<div class="row mb-3">
<div class="col-12">
<label for="memberships-{entryIterator.index}-year" class="form-label">Year</label>
<f:form.textfield
type="number"
property="memberships.{entryIterator.index}.year"
id="memberships-{entryIterator.index}-year"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="memberships-{entryIterator.index}-title" class="form-label">Title</label>
<f:form.textfield
property="memberships.{entryIterator.index}.title"
id="memberships-{entryIterator.index}-title"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="memberships-{entryIterator.index}-bodytext" class="form-label">Text</label>
<f:form.textarea
property="memberships.{entryIterator.index}.bodytext"
id="memberships-{entryIterator.index}-bodytext"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="memberships-{entryIterator.index}-link" class="form-label">Link</label>
<f:form.textfield
property="memberships.{entryIterator.index}.link"
id="memberships-{entryIterator.index}-link"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<f:link.action action="removeProfileInformation" arguments="{profile: profile, profileInformation: entry}" class="btn btn-danger">Remove entry</f:link.action>
</div>
</div>
<f:if condition="!{entryIterator.isLast}">
<hr class="mb-3" />
</f:if>
</f:for>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>

<div class="row mb-3">
<div class="col-12">
<h2>Publications</h2>
<label for="profile-publications-link" class="form-label">Link to external publications</label>
<f:form.textfield
property="publicationsLink"
id="profile-publications-link"
class="form-control mb-1"
/>
<f:link.action action="addProfileInformation" arguments="{profile: profile, type: 'publication'}" class="btn btn-primary">Add new entry</f:link.action>
</div>
</div>
<f:for each="{profile.publications}" as="entry" iteration="entryIterator">
<div class="row mb-3">
<div class="col-12">
<label for="publication-{entryIterator.index}-year" class="form-label">Year</label>
<f:form.textfield
type="number"
property="publications.{entryIterator.index}.year"
id="publication-{entryIterator.index}-year"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="publication-{entryIterator.index}-title" class="form-label">Title</label>
<f:form.textfield
property="publications.{entryIterator.index}.title"
id="publication-{entryIterator.index}-title"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="publication-{entryIterator.index}-bodytext" class="form-label">Text</label>
<f:form.textarea
property="publications.{entryIterator.index}.bodytext"
id="publication-{entryIterator.index}-bodytext"
class="form-control publication-bodytext"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<label for="publication-{entryIterator.index}-link" class="form-label">Link</label>
<f:form.textfield
property="publications.{entryIterator.index}.link"
id="publication-{entryIterator.index}-link"
class="form-control"
/>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
<f:link.action action="removeProfileInformation" arguments="{profile: profile, profileInformation: entry}" class="btn btn-danger">Remove entry</f:link.action>
</div>
</div>
<f:if condition="!{entryIterator.isLast}">
<hr class="mb-3" />
</f:if>
</f:for>

</html>
Loading

0 comments on commit fd0c8cc

Please sign in to comment.