Chris@0
|
1 {#
|
Chris@0
|
2 /**
|
Chris@0
|
3 * @file
|
Chris@0
|
4 * Default theme implementation for the Appearance page.
|
Chris@0
|
5 *
|
Chris@0
|
6 * Available variables:
|
Chris@0
|
7 * - attributes: HTML attributes for the main container.
|
Chris@0
|
8 * - theme_groups: A list of theme groups. Each theme group contains:
|
Chris@0
|
9 * - attributes: HTML attributes specific to this theme group.
|
Chris@0
|
10 * - title: Title for the theme group.
|
Chris@0
|
11 * - state: State of the theme group, e.g. installed or uninstalled.
|
Chris@0
|
12 * - themes: A list of themes within the theme group. Each theme contains:
|
Chris@0
|
13 * - attributes: HTML attributes specific to this theme.
|
Chris@0
|
14 * - screenshot: A screenshot representing the theme.
|
Chris@0
|
15 * - description: Description of the theme.
|
Chris@0
|
16 * - name: Theme name.
|
Chris@0
|
17 * - version: The theme's version number.
|
Chris@0
|
18 * - is_default: Boolean indicating whether the theme is the default theme
|
Chris@0
|
19 * or not.
|
Chris@0
|
20 * - is_admin: Boolean indicating whether the theme is the admin theme or
|
Chris@0
|
21 * not.
|
Chris@0
|
22 * - notes: Identifies what context this theme is being used in, e.g.,
|
Chris@0
|
23 * default theme, admin theme.
|
Chris@0
|
24 * - incompatible: Text describing any compatibility issues.
|
Chris@0
|
25 * - operations: A list of operation links, e.g., Settings, Enable, Disable,
|
Chris@0
|
26 * etc. these links should only be displayed if the theme is compatible.
|
Chris@0
|
27 *
|
Chris@0
|
28 * @see template_preprocess_system_themes_page()
|
Chris@0
|
29 *
|
Chris@0
|
30 * @ingroup themeable
|
Chris@0
|
31 */
|
Chris@0
|
32 #}
|
Chris@0
|
33 <div{{ attributes }}>
|
Chris@0
|
34 {% for theme_group in theme_groups %}
|
Chris@0
|
35 {%
|
Chris@0
|
36 set theme_group_classes = [
|
Chris@0
|
37 'system-themes-list',
|
Chris@0
|
38 'system-themes-list-' ~ theme_group.state,
|
Chris@0
|
39 'clearfix',
|
Chris@0
|
40 ]
|
Chris@0
|
41 %}
|
Chris@0
|
42 <div{{ theme_group.attributes.addClass(theme_group_classes) }}>
|
Chris@0
|
43 <h2 class="system-themes-list__header">{{ theme_group.title }}</h2>
|
Chris@0
|
44 {% for theme in theme_group.themes %}
|
Chris@0
|
45 {%
|
Chris@0
|
46 set theme_classes = [
|
Chris@0
|
47 theme.is_default ? 'theme-default',
|
Chris@0
|
48 theme.is_admin ? 'theme-admin',
|
Chris@0
|
49 'theme-selector',
|
Chris@0
|
50 'clearfix',
|
Chris@0
|
51 ]
|
Chris@0
|
52 %}
|
Chris@0
|
53 <div{{ theme.attributes.addClass(theme_classes) }}>
|
Chris@0
|
54 {% if theme.screenshot %}
|
Chris@0
|
55 {{ theme.screenshot }}
|
Chris@0
|
56 {% endif %}
|
Chris@0
|
57 <div class="theme-info">
|
Chris@0
|
58 <h3 class="theme-info__header">
|
Chris@0
|
59 {{- theme.name }} {{ theme.version -}}
|
Chris@0
|
60 {% if theme.notes %}
|
Chris@0
|
61 ({{ theme.notes|safe_join(', ') }})
|
Chris@0
|
62 {%- endif -%}
|
Chris@0
|
63 </h3>
|
Chris@0
|
64 <div class="theme-info__description">{{ theme.description }}</div>
|
Chris@0
|
65 {# Display operation links if the theme is compatible. #}
|
Chris@0
|
66 {% if theme.incompatible %}
|
Chris@0
|
67 <div class="incompatible">{{ theme.incompatible }}</div>
|
Chris@0
|
68 {% else %}
|
Chris@0
|
69 {{ theme.operations }}
|
Chris@0
|
70 {% endif %}
|
Chris@0
|
71 </div>
|
Chris@0
|
72 </div>
|
Chris@0
|
73 {% endfor %}
|
Chris@0
|
74 </div>
|
Chris@0
|
75 {% endfor %}
|
Chris@0
|
76 </div>
|