Issue #2349771 by lauriii | davidhernandez: Copy user templates to Classy.

8.0.x
Alex Pott 2014-10-27 10:58:11 +00:00
parent 1fea878dc7
commit a06218c40b
4 changed files with 57 additions and 2 deletions

View File

@ -23,7 +23,7 @@
* @ingroup themeable
*/
#}
<article{{ attributes.addClass('profile') }}>
<article{{ attributes }}>
{% if content %}
{{- content -}}
{% endif %}

View File

@ -19,7 +19,7 @@
*/
#}
{% if link_path -%}
<a{{ attributes.addClass('username') }}>{{ name }}{{ extra }}</a>
<a{{ attributes }}>{{ name }}{{ extra }}</a>
{%- else -%}
<span{{ attributes }}>{{ name }}{{ extra }}</span>
{%- endif -%}

View File

@ -0,0 +1,30 @@
{#
/**
* @file
* Default theme implementation to present all user data.
*
* This template is used when viewing a registered user's page,
* e.g., example.com/user/123. 123 being the user's ID.
*
* Available variables:
* - content: A list of content items. Use 'content' to print all content, or
* print a subset such as 'content.field_example'.
* - Field variables: For each field attached to the user a corresponding
* variable is defined; e.g., account.field_example has a variable
* 'field_example' defined. When needing to access a field's raw values,
* developers/themers are strongly encouraged to use these variables.
* Otherwise they will have to explicitly specify the desired field language,
* e.g. account.field_example.en, thus overriding any language negotiation
* rule that was previously applied.
* - attributes: HTML attributes for the container element.
*
* @see template_preprocess_user()
*
* @ingroup themeable
*/
#}
<article{{ attributes.addClass('profile') }}>
{% if content %}
{{- content -}}
{% endif %}
</article>

View File

@ -0,0 +1,25 @@
{#
/**
* @file
* Default theme implementation for displaying a username.
*
* Available variables:
* - account: The full account information for the user.
* - name: The user's name, sanitized.
* - extra: Additional text to append to the user's name, sanitized.
* - link_path: The path or URL of the user's profile page, home page,
* or other desired page to link to for more information about the user.
* - link_options: Options to pass to the url() function's $options parameter if
* linking the user's name to the user's page.
* - attributes: HTML attributes for the containing element.
*
* @see template_preprocess_username()
*
* @ingroup themeable
*/
#}
{% if link_path -%}
<a{{ attributes.addClass('username') }}>{{ name }}{{ extra }}</a>
{%- else -%}
<span{{ attributes }}>{{ name }}{{ extra }}</span>
{%- endif -%}