Skip to content

Commit

Permalink
updated ui patterns patch
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jul 5, 2023
1 parent d0f11d2 commit d98fe8b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions patches/contrib/ui_patterns_views-preview.patch
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ index 0000000..7f1e292
+ </{{ field.wrapper_element }}>
+{%- endif %}
diff --git a/modules/ui_patterns_views/ui_patterns_views.module b/modules/ui_patterns_views/ui_patterns_views.module
index 58f0b04..b7020a2 100644
index c33331b..79b8548 100644
--- a/modules/ui_patterns_views/ui_patterns_views.module
+++ b/modules/ui_patterns_views/ui_patterns_views.module
@@ -6,6 +6,9 @@
Expand All @@ -71,17 +71,17 @@ index 58f0b04..b7020a2 100644

/**
* Implements hook_theme().
@@ -15,6 +18,9 @@ function ui_patterns_views_theme() {
'pattern_views_row' => [
'variables' => ['view' => NULL, 'options' => [], 'row' => NULL],
@@ -19,6 +22,9 @@ function ui_patterns_views_theme() {
'row' => NULL,
],
],
+ 'pattern_view_field' => [
+ 'variables' => ['view' => NULL, 'field' => NULL, 'row' => NULL],
+ ],
];
}

@@ -35,37 +41,122 @@ function template_preprocess_pattern_views_row(array &$variables) {
@@ -39,37 +45,122 @@ function template_preprocess_pattern_views_row(array &$variables) {
$options = $variables['options'];
$row = $variables['row'];

Expand Down Expand Up @@ -196,7 +196,7 @@ index 58f0b04..b7020a2 100644

- $variables['pattern'] = [];
- if ($view->preview && !isset($view->element['#embed'])) {
- \Drupal::messenger()->addWarning(t("Pattern Views row plugin does not support preview."));
- \Drupal::messenger()->addWarning(t('Pattern Views row plugin does not support preview.'));
- $variables['pattern'] = ['#type' => 'status_messages'];
- }
- elseif (!empty($fields)) {
Expand Down

0 comments on commit d98fe8b

Please sign in to comment.