first commit

This commit is contained in:
2024-07-15 12:33:27 +02:00
commit ce50ae282b
22084 changed files with 2623791 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{#
/**
* @file
* Default theme implementation for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*
* @ingroup templates
*/
#}
{% if breadcrumb %}
<ol class="breadcrumb">
{% for item in breadcrumb %}
<li {{ item.attributes }}>
{% if item.url %}
<a href="{{ item.url }}">{{ item.text }}</a>
{% else %}
{{ item.text }}
{% endif %}
</li>
{% endfor %}
</ol>
{% endif %}

View File

@@ -0,0 +1,29 @@
{#
/**
* @file
* Theme override of a container used to wrap child elements.
*
* Used for grouped form items. Can also be used as a theme wrapper for any
* renderable element, to surround it with a <div> and HTML attributes.
* See the @link forms_api_reference.html Form API reference @endlink for more
* information on the #theme_wrappers render array property.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - children: The rendered child elements of the container.
* - has_parent: A flag to indicate that the container has one or more parent
* containers.
*
* @ingroup templates
*
* @see template_preprocess_container()
*/
#}
{%
set classes = [
not attributes.hasClass('toolbar-menu-administration') ? 'form-group',
has_parent ? 'js-form-wrapper',
has_parent ? 'form-wrapper',
]
%}
<div{{ attributes.addClass(classes) }}>{{ children }}</div>

View File

@@ -0,0 +1,74 @@
{#
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.
* $language->language contains its textual representation.
* $language->dir contains the language direction. It will either be 'ltr' or
* 'rtl'.
* - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
* - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
* - $head_title: A modified version of the page title, for use in the TITLE
* tag.
* - $head_title_array: (array) An associative array containing the string parts
* that were used to generate the $head_title variable, already prepared to be
* output as TITLE tag. The key/value pairs may contain one or more of the
* following, depending on conditions:
* - title: The title of the current page, if any.
* - name: The name of the site.
* - slogan: The slogan of the site, if any, and if there is no title.
* - $head: Markup for the HEAD section (including meta tags, keyword tags, and
* so on).
* - $styles: Style tags necessary to import all CSS files for the page.
* - $scripts: Script tags necessary to load the JavaScript files and settings
* for the page.
* - $page_top: Initial markup from any modules that have altered the
* page. This variable should always be output first, before all other dynamic
* content.
* - $page: The rendered page content.
* - $page_bottom: Final closing markup from any modules that have altered the
* page. This variable should always be output last, after all other dynamic
* content.
* - $classes String of classes that can be used to style contextually through
* CSS.
*
* @ingroup templates
*
* @see bootstrap_preprocess_html()
* @see template_preprocess()
* @see template_preprocess_html()
* @see template_process()
*/
#}
{%
set body_classes = [
logged_in ? 'user-logged-in',
not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,
node_type ? 'page-node-type-' ~ node_type|clean_class,
db_offline ? 'db-offline',
theme.settings.navbar_position ? 'navbar-is-' ~ theme.settings.navbar_position,
theme.has_glyphicons ? 'has-glyphicons',
]
%}
<!DOCTYPE html>
<html {{ html_attributes }}>
<head>
<head-placeholder token="{{ placeholder_token|raw }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token|raw }}">
<js-placeholder token="{{ placeholder_token|raw }}">
</head>
<body{{ attributes.addClass(body_classes) }}>
<a href="#main-content" class="visually-hidden focusable skip-link">
{{ 'Skip to main content'|t }}
</a>
{{ page_top }}
{{ page }}
{{ page_bottom }}
<js-bottom-placeholder token="{{ placeholder_token|raw }}">
</body>
</html>

View File

@@ -0,0 +1,19 @@
{#
/**
* @file
* Default theme implementation of an image.
*
* Available variables:
* - attributes: HTML attributes for the img tag.
* - style_name: (optional) The name of the image style applied.
*
* @ingroup templates
*
* @see template_preprocess_image()
*/
#}
{% set classes = [
theme.settings.image_shape ? theme.settings.image_shape,
theme.settings.image_responsive ? 'img-responsive',
] %}
<img{{ attributes.addClass(classes) }} />

View File

@@ -0,0 +1,62 @@
{#
/**
* @file
* Theme override for a set of links.
*
* Available variables:
* - attributes: Attributes for the UL containing the list of links.
* - links: Links to be output.
* Each link will have the following elements:
* - title: The link text.
* - href: The link URL. If omitted, the 'title' is shown as a plain text
* item in the links list. If 'href' is supplied, the entire link is passed
* to l() as its $options parameter.
* - attributes: (optional) HTML attributes for the anchor, or for the <span>
* tag if no 'href' is supplied.
* - link_key: The link CSS class.
* - heading: (optional) A heading to precede the links.
* - text: The heading text.
* - level: The heading level (e.g. 'h2', 'h3').
* - attributes: (optional) A keyed list of attributes for the heading.
* If the heading is a string, it will be used as the text of the heading and
* the level will default to 'h2'.
*
* Headings should be used on navigation menus and any list of links that
* consistently appears on multiple pages. To make the heading invisible use
* the 'visually-hidden' CSS class. Do not use 'display:none', which
* removes it from screen readers and assistive technology. Headings allow
* screen reader and keyboard only users to navigate to or skip the links.
* See http://juicystudio.com/article/screen-readers-display-none.php and
* http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
*
* @ingroup templates
*
* @see template_preprocess_links()
*/
#}
{% if links -%}
{%- if heading -%}
{%- if heading.level -%}
<{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
{%- else -%}
<h2{{ heading.attributes }}>{{ heading.text }}</h2>
{%- endif -%}
{%- endif -%}
{%- if attributes.hasClass('inline') -%}
<ul{{ attributes.addClass('list-inline') }}>
{%- else -%}
<ul{{ attributes }}>
{%- endif -%}
{%- for key, item in links -%}
<li{{ item.attributes.addClass(key|clean_class) }}>
{%- if item.link -%}
{{ item.link }}
{%- elseif item.text_attributes -%}
<span{{ item.text_attributes }}>{{ item.text }}</span>
{%- else -%}
{{ item.text }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{%- endif %}

View File

@@ -0,0 +1,64 @@
{#
/**
* @file
* Theme override to display a single Drupal page while offline.
*
* All available variables are mirrored in page.html.twig.
* Some may be blank but they are provided for consistency.
*
* @see template_preprocess_maintenance_page()
*/
#}
{% set container = theme.settings.fluid_container ? 'container-fluid' : 'container' %}
{% set navbar_attributes = create_attribute() %}
{# Navbar #}
{% block navbar %}
{%
set navbar_classes = [
'navbar',
theme.settings.navbar_inverse ? 'navbar-inverse' : 'navbar-default',
theme.settings.navbar_position ? 'navbar-' ~ theme.settings.navbar_position|clean_class : container,
]
%}
<header {{ navbar_attributes.addClass(navbar_classes) }} id="navbar" role="banner">
<div class="{{ container }}">
<div class="row">
<section class="col-sm-12">
<div class="navbar-header">
{% if logo %}
<a class="logo navbar-btn pull-left" href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
<img src="{{ logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name or site_slogan %}
{% if site_name %}
<a class="name navbar-brand" href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
{% endif %}
{% if site_slogan %}
<p class="navbar-text">{{ site_slogan }}</p>
{% endif %}
{% endif %}
</div>
</section>
</div>
</div>
</header>
{% endblock %}
{# Main #}
<main role="main" class="main-container {{ container }}">
<div class="row">
<section class="col-sm-12">
{% if title %}
<h1>{{ title }}</h1>
{% endif %}
{# Content #}
{% block content %}
<a id="main-content"></a>
{{ page.content }}
{% endblock %}
</section>
</div>
</main>

View File

@@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation for page titles.
*
* Available variables:
* - title_attributes: HTML attributes for the page title element.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title: The page title, for use in the actual content.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @ingroup templates
*
* @see template_preprocess_page_title()
*/
#}
{% if title %}
<h1{{ title_attributes.addClass('page-header') }}>{{ title }}</h1>
{% endif %}

View File

@@ -0,0 +1,168 @@
{#
/**
* @file
* Default theme implementation to display a single page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template in this directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
*
* Page content (in order of occurrence in the default page.html.twig):
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title: The page title, for use in the actual content.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
* - messages: Status and error messages. Should be displayed prominently.
* - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
* view and edit tabs when displaying a node).
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
* comment/reply/12345).
*
* Regions:
* - page.header: Items for the header region.
* - page.navigation: Items for the navigation region.
* - page.navigation_collapsible: Items for the navigation (collapsible) region.
* - page.highlighted: Items for the highlighted content region.
* - page.help: Dynamic help text, mostly for admin pages.
* - page.content: The main content of the current page.
* - page.sidebar_first: Items for the first sidebar.
* - page.sidebar_second: Items for the second sidebar.
* - page.footer: Items for the footer region.
*
* @ingroup templates
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
{% set container = theme.settings.fluid_container ? 'container-fluid' : 'container' %}
{# Navbar #}
{% if page.navigation or page.navigation_collapsible %}
{% block navbar %}
{%
set navbar_classes = [
'navbar',
theme.settings.navbar_inverse ? 'navbar-inverse' : 'navbar-default',
theme.settings.navbar_position ? 'navbar-' ~ theme.settings.navbar_position|clean_class : container,
]
%}
<header{{ navbar_attributes.addClass(navbar_classes) }} id="navbar" role="banner">
{% if not navbar_attributes.hasClass(container) %}
<div class="{{ container }}">
{% endif %}
<div class="navbar-header">
{{ page.navigation }}
{# .btn-navbar is used as the toggle for collapsed navbar content #}
{% if page.navigation_collapsible %}
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
<span class="sr-only">{{ 'Toggle navigation'|t }}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% endif %}
</div>
{# Navigation (collapsible) #}
{% if page.navigation_collapsible %}
<div id="navbar-collapse" class="navbar-collapse collapse">
{{ page.navigation_collapsible }}
</div>
{% endif %}
{% if not navbar_attributes.hasClass(container) %}
</div>
{% endif %}
</header>
{% endblock %}
{% endif %}
{# Main #}
{% block main %}
<div role="main" class="main-container {{ container }} js-quickedit-main-content">
<div class="row">
{# Header #}
{% if page.header %}
{% block header %}
<div class="col-sm-12" role="heading">
{{ page.header }}
</div>
{% endblock %}
{% endif %}
{# Sidebar First #}
{% if page.sidebar_first %}
{% block sidebar_first %}
<aside class="col-sm-3" role="complementary">
{{ page.sidebar_first }}
</aside>
{% endblock %}
{% endif %}
{# Content #}
{%
set content_classes = [
page.sidebar_first and page.sidebar_second ? 'col-sm-6',
page.sidebar_first and page.sidebar_second is empty ? 'col-sm-9',
page.sidebar_second and page.sidebar_first is empty ? 'col-sm-9',
page.sidebar_first is empty and page.sidebar_second is empty ? 'col-sm-12'
]
%}
<section{{ content_attributes.addClass(content_classes) }}>
{# Highlighted #}
{% if page.highlighted %}
{% block highlighted %}
<div class="highlighted">{{ page.highlighted }}</div>
{% endblock %}
{% endif %}
{# Help #}
{% if page.help %}
{% block help %}
{{ page.help }}
{% endblock %}
{% endif %}
{# Content #}
{% block content %}
<a id="main-content"></a>
{{ page.content }}
{% endblock %}
</section>
{# Sidebar Second #}
{% if page.sidebar_second %}
{% block sidebar_second %}
<aside class="col-sm-3" role="complementary">
{{ page.sidebar_second }}
</aside>
{% endblock %}
{% endif %}
</div>
</div>
{% endblock %}
{% if page.footer %}
{% block footer %}
<footer class="footer {{ container }}" role="contentinfo">
{{ page.footer }}
</footer>
{% endblock %}
{% endif %}

View File

@@ -0,0 +1,108 @@
{#
/**
* @file
* Default theme implementation to display a pager.
*
* Available variables:
* - items: List of pager items.
* The list is keyed by the following elements:
* - first: Item for the first page; not present on the first page of results.
* - previous: Item for the previous page; not present on the first page
* of results.
* - next: Item for the next page; not present on the last page of results.
* - last: Item for the last page; not present on the last page of results.
* - pages: List of pages, keyed by page number.
* Sub-sub elements:
* items.first, items.previous, items.next, items.last, and each item inside
* items.pages contain the following elements:
* - href: URL with appropriate query parameters for the item.
* - attributes: A keyed list of HTML attributes for the item.
* - text: The visible text used for the item link, such as " previous"
* or "next ".
* - current: The page number of the current page.
* - ellipses: If there are more pages than the quantity allows, then an
* ellipsis before or after the listed pages may be present.
* - previous: Present if the currently visible list of pages does not start
* at the first page.
* - next: Present if the visible list of pages ends before the last page.
*
* @ingroup templates
*
* @see template_preprocess_pager()
*/
#}
{% if items %}
<nav class="pager-nav text-center" role="navigation" aria-labelledby="pagination-heading">
<h4 id="pagination-heading" class="visually-hidden">{{ 'Pagination'|t }}</h4>
<ul class="pagination js-pager__items">
{# Print first item if we are not on the first page. #}
{% if items.first %}
<li class="pager__item pager__item--first">
<a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}" rel="first"{{ items.first.attributes }}>
<span class="visually-hidden">{{ 'First page'|t }}</span>
<span aria-hidden="true">{{ items.first.text|default('first'|t) }}</span>
</a>
</li>
{% endif %}
{# Print previous item if we are not on the first page. #}
{% if items.previous %}
<li class="pager__item pager__item--previous">
<a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes }}>
<span class="visually-hidden">{{ 'Previous page'|t }}</span>
<span aria-hidden="true">{{ items.previous.text|default('previous'|t) }}</span>
</a>
</li>
{% endif %}
{# Add an ellipsis if there are further previous pages. #}
{% if ellipses.previous %}
<li class="page-item" role="presentation"><span class="page-link">&hellip;</span></li>
{% endif %}
{# Now generate the actual pager piece. #}
{% for key, item in items.pages %}
<li class="pager__item{{ current == key ? ' is-active active' : '' }}">
{% if current == key %}
{% set title = 'Current page'|t %}
{% else %}
{% set title = 'Go to page @key'|t({'@key': key}) %}
{% endif %}
<a href="{{ item.href }}" title="{{ title }}"{{ item.attributes }}>
<span class="visually-hidden">
{{ current == key ? 'Current page'|t : 'Page'|t }}
</span>
{{- key -}}
</a>
</li>
{% endfor %}
{# Add an ellipsis if there are further next pages. #}
{% if ellipses.next %}
<li class="page-item" role="presentation"><span class="page-link">&hellip;</span></li>
{% endif %}
{# Print next item if we are not on the last page. #}
{% if items.next %}
<li class="pager__item pager__item--next">
<a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes }}>
<span class="visually-hidden">{{ 'Next page'|t }}</span>
<span aria-hidden="true">{{ items.next.text|default('next'|t) }}</span>
</a>
</li>
{% endif %}
{# Print last item if we are not on the last page. #}
{% if items.last %}
<li class="pager__item pager__item--last">
<a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}" rel="last"{{ items.last.attributes }}>
<span class="visually-hidden">{{ 'Last page'|t }}</span>
<span aria-hidden="true">{{ items.last.text|default('last'|t) }}</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}

View File

@@ -0,0 +1,38 @@
{#
/**
* @file
* Default theme implementation for a progress bar.
*
* Note that the core Batch API uses this only for non-JavaScript batch jobs.
*
* Available variables:
* - attributes: An array of HTML attributes intended to be added to the
progress bar container of this template.
* - id: A valid HTML ID and guaranteed to be unique.
* - label: The label of the working task.
* - percent: The percentage of the progress.
* - message: A string containing information to be displayed.
*
* @ingroup templates
*/
#}
<div class="progress-wrapper" aria-live="polite" data-drupal-progress>
{% if message %}
<div class="message">{{ message }}</div>
{% endif %}
{%
set classes = [
'progress',
'progress-striped',
'active',
]
%}
<div{{ attributes.addClass(classes) }}>
<div class="progress-bar" role="progressbar" style="width: {{ percent }}%" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{ percent }}">
<span class="percentage">{{ percent }}%</span>
</div>
</div>
{% if label %}
<div class="progress-label">{{ label }}</div>
{% endif %}
</div>

View File

@@ -0,0 +1,19 @@
{#
/**
* @file
* Default theme implementation to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region div.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @ingroup templates
*
* @see template_preprocess_region()
*/
#}
{% if content %}
{{ content }}
{% endif %}

View File

@@ -0,0 +1,27 @@
{#
/**
* @file
* Theme override to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region div.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @ingroup templates
*
* @see template_preprocess_region()
*/
#}
{%
set classes = [
'region',
'region-' ~ region|clean_class,
]
%}
{% if content %}
<div{{ attributes.addClass(classes) }}>
{{ content }}
</div>
{% endif %}

View File

@@ -0,0 +1,83 @@
{#
/**
* @file
* Default theme implementation for status messages.
*
* Displays status, error, and warning messages, grouped by type.
*
* An invisible heading identifies the messages for assistive technology.
* Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html
* for info.
*
* Add an ARIA label to the contentinfo area so that assistive technology
* user agents will better describe this landmark.
*
* Available variables:
* - message_list: List of messages to be displayed, grouped by type.
* - status_headings: List of all status types.
* - display: (optional) May have a value of 'status' or 'error' when only
* displaying messages of that specific type.
* - attributes: HTML attributes for the element, including:
* - class: HTML classes.
*
* @ingroup templates
*
* @see template_preprocess_status_messages()
*/
#}
{# Save original attribute classes. This is needed to override in loop below. #}
{# @see https://www.drupal.org/project/bootstrap/issues/2892936 #}
{% set classes = attributes.offsetGet('class')|default({}) %}
{%
set status_heading = {
'status': 'Status message'|t,
'error': 'Error message'|t,
'warning': 'Warning message'|t,
'info': 'Informative message'|t,
}
%}
{%
set status_classes = {
'status': 'success',
'error': 'danger',
'warning': 'warning',
'info': 'info',
}
%}
{%
set status_roles = {
'status': 'status',
'error': 'alert',
'warning': 'alert',
'info': 'status',
}
%}
<div data-drupal-messages>
<div class="messages__wrapper">
{% for type, messages in message_list %}
{%
set message_classes = [
'alert',
'alert-' ~ status_classes[type],
'alert-dismissible',
]
%}
{# Reset the attribute classes and then add the message specific classes. #}
<div{{ attributes.setAttribute('class', classes).addClass(message_classes).setAttribute('role', status_roles[type]).setAttribute('aria-label', status_headings[type]) }}>
<button type="button" role="button" class="close" data-dismiss="alert" aria-label="{{ 'Close'|t }}"><span aria-hidden="true">&times;</span></button>
{% if status_headings[type] %}
<h2 class="sr-only">{{ status_headings[type] }}</h2>
{% endif %}
{% if messages|length > 1 %}
<ul class="item-list item-list--messages">
{% for message in messages %}
<li class="item item--message">{{ message }}</li>
{% endfor %}
</ul>
{% else %}
<p>{{ messages|first }}</p>
{% endif %}
</div>
{% endfor %}
</div>
</div>

View File

@@ -0,0 +1,95 @@
{#
/**
* @file
* Theme override for the Appearance page.
*
* Available variables:
* - attributes: HTML attributes for the main container.
* - theme_groups: A list of theme groups. Each theme group contains:
* - attributes: HTML attributes specific to this theme group.
* - title: Title for the theme group.
* - state: State of the theme group, e.g. installed or uninstalled.
* - themes: A list of themes within the theme group. Each theme contains:
* - attributes: HTML attributes specific to this theme.
* - screenshot: A screenshot representing the theme.
* - description: Description of the theme.
* - name: Theme name.
* - version: The theme's version number.
* - is_default: Boolean indicating whether the theme is the default theme
* or not.
* - is_admin: Boolean indicating whether the theme is the admin theme or
* not.
* - notes: Identifies what context this theme is being used in, e.g.,
* default theme, admin theme.
* - incompatible: Text describing any compatibility issues.
* - operations: A list of operation links, e.g., Settings, Enable, Disable,
* etc. these links should only be displayed if the theme is compatible.
*
* @ingroup templates
*
* @see template_preprocess_system_themes_page()
*/
#}
<div{{ attributes.addClass('form-group') }}>
{% for theme_group in theme_groups %}
{%
set theme_group_classes = [
'system-themes-list',
'system-themes-list-' ~ theme_group.state,
'clearfix',
'panel',
'panel-default',
]
%}
<div{{ theme_group.attributes.addClass(theme_group_classes) }}>
<div class="panel-heading">
<a class="panel-title" href="#system-themes-list--{{ theme_group.state }}" aria-controls="#system-themes-list--{{ theme_group.state }}" aria-expanded="false" aria-pressed="false" data-toggle="collapse" role="button">
{{ theme_group.title }} ({{ theme_group.themes|length }})
</a>
</div>
{%
set table_classes = [
'table',
'panel-collapse',
theme_group.state == 'uninstalled' ? 'collapse',
'fade',
theme_group.state != 'uninstalled' ? 'in',
]
%}
<table id="system-themes-list--{{ theme_group.state }}" class="{{ table_classes|join(' ')}}">
{% for theme in theme_group.themes %}
{%
set theme_classes = [
theme.is_default ? 'theme-default',
theme.is_admin ? 'theme-admin',
'theme-selector',
'clearfix',
]
%}
<tr{{ theme.attributes.addClass(theme_classes) }}>
<td class="col-sm-3">
{% if theme.screenshot %}
{{ theme.screenshot }}
{% endif %}
</td>
<td class="theme-info col-sm-9">
<h4 class="theme-info__header">
{{- theme.name }} {{ theme.version -}}
{% if theme.notes %}
({{ theme.notes|safe_join(', ') }})
{%- endif -%}
</h4>
<div class="theme-info__description help-block">{{ theme.description }}</div>
{# Display operation links if the theme is compatible. #}
{% if theme.incompatible %}
<div class="incompatible">{{ theme.incompatible }}</div>
{% else %}
{{ theme.operations }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endfor %}
</div>

View File

@@ -0,0 +1,132 @@
{#
/**
* @file
* Default theme implementation 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.
* - header_columns: The number of columns in the header.
* - bordered: Flag indicating whether or not the table should be bordered.
* - condensed: Flag indicating whether or not the table should be condensed.
* - hover: Flag indicating whether or not table rows should be hoverable.
* - striped: Flag indicating whether or not table rows should be striped.
* - responsive: Flag indicating whether or not the table should be wrapped to
* be responsive (using the Bootstrap Framework .table-responsive wrapper).
*
* @ingroup templates
*
* @see template_preprocess_table()
*/
#}
{% if responsive %}
<div class="table-responsive">
{% endif %}
{%
set classes = [
'table',
bordered ? 'table-bordered',
condensed ? 'table-condensed',
hover ? 'table-hover',
striped ? 'table-striped',
sticky ? 'sticky-enabled',
]
%}
<table{{ attributes.addClass(classes) }}>
{% 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 %}
{%
set cell_classes = [
cell.active_table_sort ? 'active',
]
%}
<{{ cell.tag }}{{ cell.attributes.addClass(cell_classes) }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
</thead>
{% endif %}
{% if rows %}
<tbody>
{% for row in rows %}
{% set row_classes = [cycle(['odd', 'even'], loop.index0)] %}
<tr{{ row.attributes.addClass(row_classes) }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tbody>
{% elseif empty %}
<tbody>
<tr class="odd">
<td colspan="{{ header_columns }}" class="empty message">{{ 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>
{% if responsive %}
</div>
{% endif %}

View File

@@ -0,0 +1,13 @@
{#
/**
* @file
* Theme override for displaying a tablesort indicator.
*
* Available variables:
* - style: Either 'asc' or 'desc', indicating the sorting direction.
* - icon: The Drupal Bootstrap glypicon.
*
* @see \Drupal\bootstrap\Plugin\Preprocess\TableSortIndicator::preprocessVariables()
*/
#}
{{- icon -}}