Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to present an aggregator feed.
|
||||
*
|
||||
* The contents are rendered above feed listings when browsing source feeds.
|
||||
* For example, "example.com/aggregator/sources/1".
|
||||
*
|
||||
* Available variables:
|
||||
* - title: Title of the feed item.
|
||||
* - content: All field items. Use {{ content }} to print them all,
|
||||
* or print a subset such as {{ content.field_example }}. Use
|
||||
* {{ content|without('field_example') }} to temporarily suppress the printing
|
||||
* of a given element.
|
||||
*
|
||||
* @see template_preprocess_aggregator_feed()
|
||||
*/
|
||||
#}
|
||||
{{ title_prefix }}
|
||||
{% if not full %}
|
||||
<h2{{ title_attributes }}>{{ title }}</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{{ content }}
|
24
core/themes/stable/templates/dataset/forum-icon.html.twig
Normal file
24
core/themes/stable/templates/dataset/forum-icon.html.twig
Normal file
|
@ -0,0 +1,24 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a status icon for a forum post.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes to be applied to the wrapper element.
|
||||
* - class: HTML classes that determine which icon to display. May be one of
|
||||
* 'hot', 'hot-new', 'new', 'default', 'closed', or 'sticky'.
|
||||
* - title: Text alternative for the forum icon.
|
||||
* - icon_title: Text alternative for the forum icon, same as above.
|
||||
* - new_posts: '1' when this topic contains new posts, otherwise '0'.
|
||||
* - first_new: '1' when this is the first topic with new posts, otherwise '0'.
|
||||
* - icon_status: Indicates which status icon should be used.
|
||||
*
|
||||
* @see template_preprocess_forum_icon()
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{% if first_new -%}
|
||||
<a id="new"></a>
|
||||
{%- endif %}
|
||||
<span class="visually-hidden">{{ icon_title }}</span>
|
||||
</div>
|
75
core/themes/stable/templates/dataset/forum-list.html.twig
Normal file
75
core/themes/stable/templates/dataset/forum-list.html.twig
Normal file
|
@ -0,0 +1,75 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a list of forums and containers.
|
||||
*
|
||||
* Available variables:
|
||||
* - forums: A collection of forums and containers to display. It is keyed to
|
||||
* the numeric IDs of all child forums and containers. Each forum in forums
|
||||
* contains:
|
||||
* - is_container: A flag indicating if the forum can contain other
|
||||
* forums. Otherwise, the forum can only contain topics.
|
||||
* - depth: How deep the forum is in the current hierarchy.
|
||||
* - zebra: 'even' or 'odd', used for row class.
|
||||
* - icon_class: 'default' or 'new', used for forum icon class.
|
||||
* - icon_title: Text alternative for the forum icon.
|
||||
* - name: The name of the forum.
|
||||
* - link: The URL to link to this forum.
|
||||
* - description: The description field for the forum, containing:
|
||||
* - value: The descriptive text for the forum.
|
||||
* - new_topics: A flag indicating if the forum contains unread posts.
|
||||
* - new_url: A URL to the forum's unread posts.
|
||||
* - new_text: Text for the above URL, which tells how many new posts.
|
||||
* - old_topics: A count of posts that have already been read.
|
||||
* - num_posts: The total number of posts in the forum.
|
||||
* - last_reply: Text representing the last time a forum was posted or
|
||||
* commented in.
|
||||
* - forum_id: Forum ID for the current forum. Parent to all items within the
|
||||
* forums array.
|
||||
*
|
||||
* @see template_preprocess_forum_list()
|
||||
*/
|
||||
#}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Forum'|t }}</th>
|
||||
<th>{{ 'Topics'|t }}</th>
|
||||
<th>{{ 'Posts'|t }}</th>
|
||||
<th>{{ 'Last post'|t }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for child_id, forum in forums %}
|
||||
<tr>
|
||||
<td{% if forum.is_container == true %} colspan="4"{% endif %}>
|
||||
{#
|
||||
Enclose the contents of this cell with X divs, where X is the
|
||||
depth this forum resides at. This will allow us to use CSS
|
||||
left-margin for indenting.
|
||||
#}
|
||||
{% for i in 1..forum.depth if forum.depth > 0 %}<div class="indent">{% endfor %}
|
||||
<div title="{{ forum.icon_title }}">
|
||||
<span class="visually-hidden">{{ forum.icon_title }}</span>
|
||||
</div>
|
||||
<div><a href="{{ forum.link }}">{{ forum.label }}</a></div>
|
||||
{% if forum.description.value %}
|
||||
<div>{{ forum.description.value }}</div>
|
||||
{% endif %}
|
||||
{% for i in 1..forum.depth if forum.depth > 0 %}</div>{% endfor %}
|
||||
</td>
|
||||
{% if forum.is_container == false %}
|
||||
<td>
|
||||
{{ forum.num_topics }}
|
||||
{% if forum.new_topics == true %}
|
||||
<br />
|
||||
<a href="{{ forum.new_url }}">{{ forum.new_text }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ forum.num_posts }}</td>
|
||||
<td>{{ forum.last_reply }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
21
core/themes/stable/templates/dataset/forums.html.twig
Normal file
21
core/themes/stable/templates/dataset/forums.html.twig
Normal file
|
@ -0,0 +1,21 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a forum.
|
||||
*
|
||||
* May contain forum containers as well as forum topics.
|
||||
*
|
||||
* Available variables:
|
||||
* - forums: The forums to display (as processed by forum-list.html.twig).
|
||||
* - topics: The topics to display.
|
||||
* - topics_pager: The topics pager.
|
||||
* - forums_defined: A flag to indicate that the forums are configured.
|
||||
*
|
||||
* @see template_preprocess_forums()
|
||||
*/
|
||||
#}
|
||||
{% if forums_defined %}
|
||||
{{ forums }}
|
||||
{{ topics }}
|
||||
{{ topics_pager }}
|
||||
{% endif %}
|
39
core/themes/stable/templates/dataset/item-list.html.twig
Normal file
39
core/themes/stable/templates/dataset/item-list.html.twig
Normal file
|
@ -0,0 +1,39 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for an item list.
|
||||
*
|
||||
* Available variables:
|
||||
* - items: A list of items. Each item contains:
|
||||
* - attributes: HTML attributes to be applied to each list item.
|
||||
* - value: The content of the list element.
|
||||
* - title: The title of the list.
|
||||
* - list_type: The tag for list element ("ul" or "ol").
|
||||
* - wrapper_attributes: HTML attributes to be applied to the list wrapper.
|
||||
* - attributes: HTML attributes to be applied to the list.
|
||||
* - empty: A message to display when there are no items. Allowed value is a
|
||||
* string or render array.
|
||||
* - context: A list of contextual data associated with the list. May contain:
|
||||
* - list_style: The custom list style.
|
||||
*
|
||||
* @see template_preprocess_item_list()
|
||||
*/
|
||||
#}
|
||||
{% if context.list_style %}
|
||||
{%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
|
||||
{% endif %}
|
||||
{% if items or empty %}
|
||||
{%- if title is not empty -%}
|
||||
<h3>{{ title }}</h3>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if items -%}
|
||||
<{{ list_type }}{{ attributes }}>
|
||||
{%- for item in items -%}
|
||||
<li{{ item.attributes }}>{{ item.value }}</li>
|
||||
{%- endfor -%}
|
||||
</{{ list_type }}>
|
||||
{%- else -%}
|
||||
{{- empty -}}
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
103
core/themes/stable/templates/dataset/table.html.twig
Normal file
103
core/themes/stable/templates/dataset/table.html.twig
Normal file
|
@ -0,0 +1,103 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a table.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes to apply to the <table> tag.
|
||||
* - caption: A localized string for the <caption> tag.
|
||||
* - colgroups: Column groups. Each group contains the following properties:
|
||||
* - attributes: HTML attributes to apply to the <col> tag.
|
||||
* Note: Drupal currently supports only one table header row, see
|
||||
* https://www.drupal.org/node/893530 and
|
||||
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
|
||||
* - header: Table header cells. Each cell contains the following properties:
|
||||
* - tag: The HTML tag name to use; either TH or TD.
|
||||
* - attributes: HTML attributes to apply to the tag.
|
||||
* - content: A localized string for the title of the column.
|
||||
* - field: Field name (required for column sorting).
|
||||
* - sort: Default sort order for this column ("asc" or "desc").
|
||||
* - sticky: A flag indicating whether to use a "sticky" table header.
|
||||
* - rows: Table rows. Each row contains the following properties:
|
||||
* - attributes: HTML attributes to apply to the <tr> tag.
|
||||
* - data: Table cells.
|
||||
* - no_striping: A flag indicating that the row should receive no
|
||||
* 'even / odd' styling. Defaults to FALSE.
|
||||
* - cells: Table cells of the row. Each cell contains the following keys:
|
||||
* - tag: The HTML tag name to use; either TH or TD.
|
||||
* - attributes: Any HTML attributes, such as "colspan", to apply to the
|
||||
* table cell.
|
||||
* - content: The string to display in the table cell.
|
||||
* - active_table_sort: A boolean indicating whether the cell is the active
|
||||
table sort.
|
||||
* - footer: Table footer rows, in the same format as the rows variable.
|
||||
* - empty: The message to display in an extra row if table does not have
|
||||
* any rows.
|
||||
* - no_striping: A boolean indicating that the row should receive no striping.
|
||||
* - header_columns: The number of columns in the header.
|
||||
*
|
||||
* @see template_preprocess_table()
|
||||
*/
|
||||
#}
|
||||
<table{{ attributes }}>
|
||||
{% if caption %}
|
||||
<caption>{{ caption }}</caption>
|
||||
{% endif %}
|
||||
|
||||
{% for colgroup in colgroups %}
|
||||
{% if colgroup.cols %}
|
||||
<colgroup{{ colgroup.attributes }}>
|
||||
{% for col in colgroup.cols %}
|
||||
<col{{ col.attributes }} />
|
||||
{% endfor %}
|
||||
</colgroup>
|
||||
{% else %}
|
||||
<colgroup{{ colgroup.attributes }} />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if header %}
|
||||
<thead>
|
||||
<tr>
|
||||
{% for cell in header %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% endif %}
|
||||
|
||||
{% if rows %}
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr{{ row.attributes }}>
|
||||
{% for cell in row.cells %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% elseif empty %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="{{ header_columns }}">{{ empty }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endif %}
|
||||
{% if footer %}
|
||||
<tfoot>
|
||||
{% for row in footer %}
|
||||
<tr{{ row.attributes }}>
|
||||
{% for cell in row.cells %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
</table>
|
Reference in a new issue