Created
September 13, 2012 23:48
-
-
Save soulston/3718689 to your computer and use it in GitHub Desktop.
git diff twig_engine..8.x 14/09/2012
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/includes/form.inc b/core/includes/form.inc | |
old mode 100755 | |
new mode 100644 | |
index 28b766c..07cce93 | |
--- a/core/includes/form.inc | |
+++ b/core/includes/form.inc | |
@@ -2766,6 +2766,40 @@ function form_get_options($element, $key) { | |
} | |
/** | |
+ * Returns HTML for a fieldset form element and its children. | |
+ * | |
+ * @param $variables | |
+ * An associative array containing: | |
+ * - element: An associative array containing the properties of the element. | |
+ * Properties used: #attributes, #children, #collapsed, #collapsible, | |
+ * #description, #id, #title, #value. | |
+ * | |
+ * @ingroup themeable | |
+ */ | |
+function theme_fieldset($variables) { | |
+ $element = $variables['element']; | |
+ element_set_attributes($element, array('id')); | |
+ _form_set_class($element, array('form-wrapper')); | |
+ | |
+ $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>'; | |
+ if (!empty($element['#title'])) { | |
+ // Always wrap fieldset legends in a SPAN for CSS positioning. | |
+ $output .= '<legend><span class="fieldset-legend">' . $element['#title'] . '</span></legend>'; | |
+ } | |
+ $output .= '<div class="fieldset-wrapper">'; | |
+ if (!empty($element['#description'])) { | |
+ $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>'; | |
+ } | |
+ $output .= $element['#children']; | |
+ if (isset($element['#value'])) { | |
+ $output .= $element['#value']; | |
+ } | |
+ $output .= '</div>'; | |
+ $output .= "</fieldset>\n"; | |
+ return $output; | |
+} | |
+ | |
+/** | |
* Returns HTML for a radio button form element. | |
* | |
* Note: The input "name" attribute needs to be sanitized before output, which | |
diff --git a/core/modules/system/progress-bar.tpl.php b/core/modules/system/progress-bar.tpl.php | |
new file mode 100644 | |
index 0000000..8e128ce | |
--- /dev/null | |
+++ b/core/modules/system/progress-bar.tpl.php | |
@@ -0,0 +1,17 @@ | |
+<?php | |
+/** | |
+ * Returns HTML for a progress bar. | |
+ * | |
+ * Note that the core Batch API uses this only for non-JavaScript batch jobs. | |
+ * | |
+ * @param $variables | |
+ * An associative array containing: | |
+ * - percent: The percentage of the progress. | |
+ * - message: A string containing information to be displayed. | |
+ */ | |
+?> | |
+<div id="progress" class="progress">'; | |
+ <div class="bar"><div class="filled" style="width: <?php print $percent; ?>%"></div></div> | |
+ <div class="percentage"><?php print $percent; ?>%</div> | |
+ <div class="message"><?php print $message; ?></div> | |
+</div> | |
diff --git a/core/modules/system/system.module b/core/modules/system/system.module | |
old mode 100755 | |
new mode 100644 | |
index 8844fc5..de7241f | |
--- a/core/modules/system/system.module | |
+++ b/core/modules/system/system.module | |
@@ -2374,16 +2374,6 @@ function system_preprocess_block(&$variables) { | |
} | |
/** | |
- * Implements hook_preprocess_HOOK() for theme_fieldset. | |
- */ | |
-function system_preprocess_fieldset(&$variables) { | |
- $element = $variables['element']; | |
- element_set_attributes($element, array('id')); | |
- _form_set_class($element, array('form-wrapper')); | |
- $variables['element'] = $element; | |
-} | |
- | |
-/** | |
* Provide a single block on the administration overview page. | |
* | |
* @param $item | |
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module | |
index 70db2b1..e224dc8 100755 | |
--- a/core/modules/toolbar/toolbar.module | |
+++ b/core/modules/toolbar/toolbar.module | |
@@ -133,9 +133,15 @@ function toolbar_page_build(&$page) { | |
* rendering to ensure that it is built only if it will be displayed. | |
* | |
* @see toolbar_page_build(). | |
+ * | |
+ * @param Renderable $toolbar | |
+ * A renderable Drupal object. | |
+ * | |
+ * @return | |
+ * A Drupal build array. | |
*/ | |
-function toolbar_pre_render($toolbar) { | |
- $toolbar = array_merge($toolbar, toolbar_view()); | |
+function toolbar_pre_render(Renderable $toolbar) { | |
+ $toolbar['view'] = toolbar_view(); | |
return $toolbar; | |
} | |
diff --git a/core/themes/stark/templates/form.inc/fieldset.twig b/core/themes/stark/templates/form.inc/fieldset.twig | |
deleted file mode 100644 | |
index 1e286c9..0000000 | |
--- a/core/themes/stark/templates/form.inc/fieldset.twig | |
+++ /dev/null | |
@@ -1,33 +0,0 @@ | |
-{# | |
-/** | |
- * @file | |
- * Returns HTML for a fieldset form element and its children. | |
- * | |
- * Parameters | |
- * | |
- * $variables: An associative array containing: | |
- * element: An associative array containing the properties of the element. | |
- * Properties used: #attributes, #children, #collapsed, #collapsible, #description, #id, #title, #value. | |
- * | |
- * @see template_preprocess | |
- * @see template_preprocess_fieldset | |
- * | |
- * @ingroup themeable | |
- */ | |
-#} | |
- | |
- <fieldset {{ drupal_attributes(element.attributes) }}> | |
- {% if element.title %} | |
- {# Always wrap fieldset legends in a SPAN for CSS positioning. #} | |
- <legend><span class="fieldset-legend">{{ element.title }}</span></legend> | |
- {% endif %} | |
- <div class="fieldset-wrapper"> | |
- {% if element.description %} | |
- <div class="fieldset-description">{{ element.description }}</div> | |
- {% endif %} | |
- {{ element.children }} | |
- {% if element.value is defined %} | |
- {{ element.value }} | |
- {% endif %} | |
- </div> | |
- </fieldset> | |
\ No newline at end of file | |
diff --git a/core/themes/stark/templates/search/search-results.twig b/core/themes/stark/templates/search/search-results.twig | |
new file mode 100644 | |
index 0000000..515bc98 | |
--- /dev/null | |
+++ b/core/themes/stark/templates/search/search-results.twig | |
@@ -0,0 +1,30 @@ | |
+{# | |
+ | |
+ @file | |
+ Default theme implementation for displaying search results. | |
+ | |
+ This template collects each invocation of theme_search_result(). This and | |
+ the child template are dependent to one another sharing the markup for | |
+ definition lists. | |
+ | |
+ Note that modules may implement their own search type and theme function | |
+ completely bypassing this template. | |
+ | |
+ Available variables: | |
+ search_results: All results as it is rendered through | |
+ search-result.tpl.php | |
+ module: The machine-readable name of the module (tab) being searched, such as 'node' or 'user' | |
+ | |
+ @see template_preprocess_search_results() | |
+#} | |
+{% if search_results %} | |
+ <h2>{{ 'Search results'|t }}</h2> | |
+ <ol class="search-results {{ module }}-results"> | |
+ {{ search_results }} | |
+ </ol> | |
+ {{ pager }} | |
+{% else %} | |
+ <h2>{{ 'Your search yielded no results'|t }}</h2> | |
+ <!-- need to print search_help('search#noresults', drupal_help_arg()) as twig --> | |
+{% endif %} | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment