Commit 99a323ed authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4487: moving uw-block templates to uw_custom_blocks

parent 0421dca0
{#
/**
* @file
* Theme override to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*/
#}
{%
set classes = [
'block',
'block-' ~ configuration.provider|clean_class,
'block-' ~ plugin_id|clean_class,
]
%}
{% if in_layout_builder %}
{{ attach_library('uw_theme_admin/uw_layout_builder') }}
{% endif %}
<div{{ attributes.addClass(classes) }}>
{% if admin_label %}
<div class="uw-admin-label">{{ admin_label }}</div>
{% endif %}
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>
{% include "@components/blockquote/blockquote.twig" with {
'blockquote': blockquote
} %}
{{ attach_library('uw_custom_blocks/uw_content_moderation') }}
<div class="uw-content-moderation">
<div class="uw-content-moderation__wrapper">
Revision State: <i> {% if mods.status %} Published {% else %} Unpublished {% endif %} </i><br />
Most recent version: <i>{{ mods.latest }}</i><br />
Actions: <a href="admin/uw-content-moderation/{{ mods.nid }}/{{ mods.vid }}">{% if mods.status %}Unpublish {% else %}Publish {% endif %} this content</a>
</div>
</div>
{% include "@components/copy-text/copy-text.twig" with {
'copy_text': copy_text|field_value,
'width': width
} %}
{% include "@components/call-to-action/call-to-action.twig" with {
'ctas': ctas
} %}
{% include '@components/expand-collapse/expand-collapse.twig' with {
'id': block_id,
'ecs': ecs
} %}
{% include '@components/facebook/facebook.twig' with {
'feed_type': facebook.feed_type,
'username': (facebook.feed_type == 'timeline') ? facebook.username : '',
'url': (facebook.feed_type == 'singlepost') ? facebook.url : '',
} %}
{% include '@components/facts-and-figures/facts-and-figures.twig' with {
'ffs': ffs
} %}
{% include '@components/image-gallery/image-gallery.twig' with {
'images': images
} %}
{% include '@components/instagram/instagram.twig' with {
'instagram': instagram
} %}
{% include '@components/mailman-subscription/mailman-subscription.twig' with {
'mailman': mailman
} %}
{% include '@components/multi-type-list/multi-type-list.twig' with {
'lists': lists
} %}
{% embed '@components/remote-video/remote-video.twig' with {
'width': width
}%}
{% block content %}
{{ content }}
{% endblock %}
{% endembed %}
{% include '@components/teaser/teaser--blog/teaser--blog.twig' with {
'title': blogs.title,
'url': blogs.url,
'date_format': blogs.date_format,
'date': blogs.date,
'author_name': blogs.author_name,
'author_link': blogs.author_link,
'sources': blogs.sources,
'img_element': blogs.img_element,
'alt': blogs.alt,
'tags': blogs.tags,
'content': blogs.content
} %}
{% include '@components/teaser/teaser--event/teaser--event.twig' with {
'title': events.title,
'url': events.url,
'date_format': events.date_format,
'date': events.date,
'sources': events.sources,
'img_element': events.img_element,
'alt': events.alt,
'tags': events.tags,
'content': events.content
} %}
{% include '@components/teaser/teaser--news/teaser--news.twig' with {
'title': news.title,
'url': news.url,
'date': news.date,
'sources': news.sources,
'img_element': news.img_element,
'alt': news.alt,
'content': news.content
} %}
{% include "@components/twitter/twitter.twig" with {
'feed_type': twitter.feed_type,
'username': twitter.username,
'tweet_code': twitter.tweet_code,
'list_name': twitter.list_name,
'url_fragment': twitter.url_fragment,
'timeline_name': twitter.timeline_name
} %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment