diff --git a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php b/src/Bundle/ChillMainBundle/Phonenumber/Templating.php deleted file mode 100644 index 414732263..000000000 --- a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php +++ /dev/null @@ -1,40 +0,0 @@ -phonenumberHelper = $phonenumberHelper; - } - - public function formatPhonenumber($phonenumber) - { - return $this->phonenumberHelper->format($phonenumber) ?? $phonenumber; - } - - public function getFilters() - { - return [ - new TwigFilter('chill_format_phonenumber', [$this, 'formatPhonenumber']), - ]; - } -} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_by_phonenumber.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_by_phonenumber.html.twig index 642225571..e5730a67c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_by_phonenumber.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_by_phonenumber.html.twig @@ -91,17 +91,58 @@ {{ 'Add a person'|trans }} - - {% endif %} - {% if preview == true and persons|length < total %} -
  • - - {{ 'See all results'|trans }} - -
  • - {% endif %} - - {% endif %} + + + {% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %} + + + + + + + + + {% endfor %} + + + + +{% endif %} + +{% if preview == false %} +{{ chill_pagination(paginator) }} +{% endif %} {% if preview == false %} {{ chill_pagination(paginator) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index 9bdc3a479..166bb8b85 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -119,14 +119,40 @@ This view should receive those arguments: {% endapply %} {%- endif -%} - - - - - {% if person.genderComment.comment is not empty %} -
    -
    -

    {{ 'Gender comment'|trans }} :

    + {%- if chill_person.fields.email == 'visible' -%} +
    +
    {{ 'Email'|trans }} :
    +
    {% if person.email is not empty %}{{ person.email }}{% else %}{{ 'No data given'|trans }}{% endif %}
    +
    + {%- endif -%} + {%- if chill_person.fields.phonenumber == 'visible' -%} +
    +
    {{ 'Phonenumber'|trans }} :
    +
    {% if person.phonenumber is not empty %}
    {{ person.phonenumber|phone_number_format('INTERNATIONAL') }}
    {% else %}{{ 'No data given'|trans }}{% endif %}
    +
    + {% endif %} + {%- if chill_person.fields.mobilenumber == 'visible' -%} +
    +
    {{ 'Mobilenumber'|trans }} :
    +
    {% if person.mobilenumber is not empty %}
    {{ person.mobilenumber|phone_number_format('INTERNATIONAL') }}
    {% else %}{{ 'No data given'|trans }}{% endif %}
    +
    + {% endif %} + {% for pp in person.otherPhoneNumbers %} +
    {{ 'Other phonenumber'|trans }} :
    +
    +
    {{ pp.phoneNumber|phone_number_format('INTERNATIONAL') }}
    + {% if pp.description is not empty %} +
    + {{ pp.description|nl2br }} + {% endif %} +
    +
    + {% endfor %} + {%- if chill_person.fields.contact_info == 'visible' -%} +
    +
    {{ 'Notes on contact information'|trans }} :
    +
    + {% if person.contactInfo is not empty %}
    {{ person.genderComment.comment|chill_markdown_to_html }}
    @@ -317,4 +343,4 @@ This view should receive those arguments: {% endif %}
    -{% endblock %} \ No newline at end of file +{% endblock %}