mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/site_users.git
synced 2026-05-03 10:20:41 -03:00
Fotos LDAP:
- Ignora sync quando conta ainda não tem UID (evitava URI compartilhada)
- Filtra fotos abaixo do tamanho mínimo configurável (padrão 10 KB)
- Adiciona campo ldap_min_photo_size nas configurações e schema
- Update 10010: remove fotos placeholder já existentes
- Update 10011: remove mídias com URI ldap_photo_.{ext} sem UID
Bloco de cabeçalho do microsite:
- Exibe departamento abaixo do nome, sem label, com link para a entidade
- Exibe telefone de trabalho (work_phone) no lugar de phone (restrito)
Página de perfil:
- Título fixo "Perfil de @name" via callback profileTitle()
- Exclui rota profile da substituição de título pelo nó homepage
Subpáginas com URL amigável:
- Adiciona MicrositeSubpagePathProcessor (inbound + outbound)
- Inbound: /user/{username}/{subpage} → /user/{uid}/{subpage}
- Outbound: /user/{uid}/{subpage} → /user/{username}/{subpage}
- Busca alias em todos os idiomas para contornar limitação do AliasManager
Tema do microsite em rotas externas:
- MicrositeThemeNegotiator cobre rotas com parâmetro user sob /user/{user}/
- Cobre nós do structural_pages cujo alias começa com /user/{uid}/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
120 lines
3.9 KiB
Twig
120 lines
3.9 KiB
Twig
{#
|
|
/**
|
|
* @file
|
|
* Template do bloco de cabeçalho do microsite.
|
|
*
|
|
* Variáveis:
|
|
* - photo_url: URL absoluta da foto padrão (string|null).
|
|
* - photo_alt: Texto alternativo da foto (string).
|
|
* - name: Nome completo do usuário (string).
|
|
* - roles: Array de rótulos das roles do usuário (string[]).
|
|
* - bio: Biografia (string|null).
|
|
* - phone: Telefone (string|null).
|
|
* - email: E-mail (string|null).
|
|
* - homepage: URL da página pessoal (string|null).
|
|
* - lattes_id: ID do Currículo Lattes (string|null).
|
|
* - orcid_id: ORCID iD (string|null).
|
|
* - mathscinet_id: MathSciNet Author ID (string|null).
|
|
*/
|
|
#}
|
|
<div class="msite-header-block">
|
|
|
|
<div class="msite-header-block__photo-wrap">
|
|
{% if photo_url %}
|
|
<img
|
|
class="msite-header-block__photo"
|
|
src="{{ photo_url }}"
|
|
alt="{{ photo_alt }}"
|
|
/>
|
|
{% else %}
|
|
<div class="msite-header-block__photo msite-header-block__photo--initials" aria-hidden="true">
|
|
{{ name|first|upper }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="msite-header-block__info">
|
|
|
|
<h1 class="msite-header-block__name">{{ name }}</h1>
|
|
|
|
{% if department %}
|
|
<div class="msite-header-block__department">
|
|
{% if department_url %}
|
|
<a href="{{ department_url }}">{{ department }}</a>
|
|
{% else %}
|
|
{{ department }}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if bio %}
|
|
<div class="msite-header-block__bio">{{ bio|raw }}</div>
|
|
{% endif %}
|
|
|
|
{% if work_phone or email %}
|
|
<ul class="msite-header-block__contact">
|
|
{% if work_phone %}
|
|
<li class="msite-header-block__contact-item">
|
|
<span class="msite-header-block__contact-label">{{ 'Telefone'|t }}:</span>
|
|
<a href="tel:{{ work_phone }}">{{ work_phone }}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if email %}
|
|
<li class="msite-header-block__contact-item">
|
|
<span class="msite-header-block__contact-label">{{ 'E-mail'|t }}:</span>
|
|
<a href="mailto:{{ email }}">{{ email }}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if homepage or lattes_id or orcid_id or mathscinet_id %}
|
|
<div class="msite-header-block__academic-links">
|
|
|
|
{% if homepage %}
|
|
<a href="{{ homepage }}"
|
|
class="msite-header-block__academic-link msite-header-block__academic-link--homepage"
|
|
target="_blank" rel="noopener noreferrer"
|
|
title="{{ 'Página pessoal'|t }}"
|
|
aria-label="{{ 'Página pessoal'|t }}">
|
|
{{ site_tools_academic_icon('home') }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if lattes_id %}
|
|
<a href="https://lattes.cnpq.br/{{ lattes_id }}"
|
|
class="msite-header-block__academic-link msite-header-block__academic-link--lattes"
|
|
target="_blank" rel="noopener noreferrer"
|
|
title="{{ 'Currículo Lattes'|t }}"
|
|
aria-label="{{ 'Currículo Lattes'|t }}">
|
|
{{ site_tools_academic_icon('lattes') }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if orcid_id %}
|
|
<a href="https://orcid.org/{{ orcid_id }}"
|
|
class="msite-header-block__academic-link msite-header-block__academic-link--orcid"
|
|
target="_blank" rel="noopener noreferrer"
|
|
title="{{ 'Perfil ORCID'|t }}"
|
|
aria-label="{{ 'Perfil ORCID'|t }}">
|
|
{{ site_tools_academic_icon('orcid') }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if mathscinet_id %}
|
|
<a href="https://mathscinet.ams.org/mathscinet/author?AuthorID={{ mathscinet_id }}"
|
|
class="msite-header-block__academic-link msite-header-block__academic-link--mathscinet"
|
|
target="_blank" rel="noopener noreferrer"
|
|
title="{{ 'Perfil MathSciNet'|t }}"
|
|
aria-label="{{ 'Perfil MathSciNet'|t }}">
|
|
{{ site_tools_academic_icon('mathscinet') }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|