Mercurial > hg > isophonics-drupal-site
annotate core/modules/user/templates/username.html.twig @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 {# |
Chris@0 | 2 /** |
Chris@0 | 3 * @file |
Chris@0 | 4 * Default theme implementation for displaying a username. |
Chris@0 | 5 * |
Chris@0 | 6 * Available variables: |
Chris@0 | 7 * - account: The full account information for the user. |
Chris@0 | 8 * - uid: The user ID, or zero if not a user. As used in anonymous comments. |
Chris@0 | 9 * - name: The user's name, sanitized, and optionally truncated. |
Chris@0 | 10 * - name_raw: The user's name, un-truncated. |
Chris@0 | 11 * - truncated: Whether the user's name was truncated. |
Chris@0 | 12 * - extra: Additional text to append to the user's name, sanitized. |
Chris@0 | 13 * - profile_access: Whether the current user has permission to access this |
Chris@0 | 14 users profile page. |
Chris@0 | 15 * - link_path: The path or URL of the user's profile page, home page, |
Chris@0 | 16 * or other desired page to link to for more information about the user. |
Chris@0 | 17 * - homepage: (optional) The home page of the account, only set for non users. |
Chris@0 | 18 * - link_options: Options to set on the \Drupal\Core\Url object if linking the |
Chris@0 | 19 * user's name to the user's page. |
Chris@0 | 20 * - attributes: HTML attributes for the containing element. |
Chris@0 | 21 * |
Chris@0 | 22 * @see template_preprocess_username() |
Chris@0 | 23 * |
Chris@0 | 24 * @ingroup themeable |
Chris@0 | 25 */ |
Chris@0 | 26 #} |
Chris@0 | 27 {% if link_path -%} |
Chris@0 | 28 <a{{ attributes }}>{{ name }}{{ extra }}</a> |
Chris@0 | 29 {%- else -%} |
Chris@0 | 30 <span{{ attributes }}>{{ name }}{{ extra }}</span> |
Chris@0 | 31 {%- endif -%} |