sports_league-8.x-1.x-dev/modules/sl_default_ui/templates/sl_stats_secondary.html.twig
modules/sl_default_ui/templates/sl_stats_secondary.html.twig
{#
/**
* @file
* Default theme implementation for displaying a view as a table.
*
* Available variables:
* - attributes: Remaining HTML attributes for the element.
* - class: HTML classes that can be used to style contextually through CSS.
* - title : The title of this group of rows.
* - header: The table header columns.
* - attributes: Remaining HTML attributes for the element.
* - content: HTML classes to apply to each header cell, indexed by
* the header's key.
* - caption_needed: Is the caption tag needed.
* - caption: The caption for this table.
* - accessibility_description: Extended description for the table details.
* - accessibility_summary: Summary for the table details.
* - responsive: Whether or not to use the .table-responsive wrapper.
* - rows: Table row items. Rows are keyed by row number.
* - attributes: HTML classes to apply to each row.
* - columns: Row column items. Columns are keyed by column number.
* - attributes: HTML classes to apply to each column.
* - content: The column content.
*
* @ingroup templates
*
* @see template_preprocess_views_view_table()
*/
#}
{% set randomPassword = [] %}
{% for i in 1..10 %}
{% set alpha = 'abcdefghijklmnopqrstuvwxyz' %}
{% set alphaUpper = alpha|upper %}
{% set numbers = '0123456789' %}
{% set randomCharacter = random(alpha ~ alphaUpper ~ numbers ~ '-_') %}
{% set randomPassword = randomPassword|merge([randomCharacter]) %}
{% endfor %}
{% set randomPassword = randomPassword|join %}
<span class="sl_stats_players_action sl_stats_players_expand" onclick="expandPlayerDetail('{{ randomPassword }}')"> </span>
<tbody class="sl_stats_players_detail" id="{{ randomPassword }}" >
{% for row in rows %}
<tr{{ row.attributes }}>
{% for key, column in row.columns %}
{% if column.default_classes %}
{% set column_classes = [ 'views-field' ] %}
{% for field in column.fields %}
{% set column_classes = column_classes|merge(['views-field-' ~ field]) %}
{% endfor %}
{% endif %}
<td{{ column.attributes.addClass(column_classes) }}>
{%- if column.wrapper_element -%}
<{{ column.wrapper_element }}>
{% for content in column.content %}
{{ content.separator }}{{ content.field_output }}
{% endfor %}
</{{ column.wrapper_element }}>
{%- else -%}
{% for content in column.content %}
{{- content.separator }}{{ content.field_output -}}
{% endfor %}
{%- endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>