Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
26
core/modules/forum/templates/forum-icon.html.twig
Normal file
26
core/modules/forum/templates/forum-icon.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation 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()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{% if first_new -%}
|
||||
<a id="new"></a>
|
||||
{%- endif %}
|
||||
<span class="visually-hidden">{{ icon_title }}</span>
|
||||
</div>
|
77
core/modules/forum/templates/forum-list.html.twig
Normal file
77
core/modules/forum/templates/forum-list.html.twig
Normal file
|
@ -0,0 +1,77 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation 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()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<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>
|
23
core/modules/forum/templates/forum-submitted.html.twig
Normal file
23
core/modules/forum/templates/forum-submitted.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a forum post submission string.
|
||||
*
|
||||
* The submission string indicates when and by whom a topic was submitted.
|
||||
*
|
||||
* Available variables:
|
||||
* - author: The author of the post.
|
||||
* - time: How long ago the post was created.
|
||||
* - topic: An object with the raw data of the post. Potentially unsafe. Be
|
||||
* sure to clean this data before printing.
|
||||
*
|
||||
* @see template_preprocess_forum_submitted()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if time %}
|
||||
<span>{% trans %}By {{ author }} {{ time }} ago{% endtrans %}</span>
|
||||
{% else %}
|
||||
{{ 'n/a'|t }}
|
||||
{% endif %}
|
23
core/modules/forum/templates/forums.html.twig
Normal file
23
core/modules/forum/templates/forums.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation 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()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if forums_defined %}
|
||||
{{ forums }}
|
||||
{{ topics }}
|
||||
{{ topics_pager }}
|
||||
{% endif %}
|
Reference in a new issue