commit b7bf1448d764b40b27afc0ab7717c9ee856be895 Author: gnuget Date: Tue Jun 3 14:00:33 2014 -0500 Adding the suggestions of jhodgdon diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 72cc0c8..6f89d39 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1427,23 +1427,23 @@ function drupal_pre_render_table(array $element) { * - field: The database field represented in the table column (required * if user is to be able to sort on this column). * - sort: A default sort order for this column ("asc" or "desc"). Only - * one column should be given a default sort order because table sorting - * only applies to one column at a time. + * one column should be given a default sort order because table sorting + * only applies to one column at a time. * - class: An array of values for the 'class' attribute. In particular, - * the least important columns that can be hidden on narrow and medium - * width screens should have a 'priority-low' class, referenced with the - * RESPONSIVE_PRIORITY_LOW constant. Columns that should be shown on - * medium+ wide screens should be marked up with a class of - * 'priority-medium', referenced by with the RESPONSIVE_PRIORITY_MEDIUM - * constant. Themes may hide columns with one of these two classes on - * narrow viewports to save horizontal space. + * the least important columns that can be hidden on narrow and medium + * width screens should have a 'priority-low' class, referenced with the + * RESPONSIVE_PRIORITY_LOW constant. Columns that should be shown on + * medium+ wide screens should be marked up with a class of + * 'priority-medium', referenced by with the RESPONSIVE_PRIORITY_MEDIUM + * constant. Themes may hide columns with one of these two classes on + * narrow viewports to save horizontal space. * - Any HTML attributes, such as "colspan", to apply to the column header * cell. * - rows: An array of table rows. Every row is an array of cells, or an * associative array with the following keys: - * - data: an array of cells. + * - data: An array of cells. * - Any HTML attributes, such as "class", to apply to the table row. - * - no_striping: a boolean indicating that the row should receive no + * - no_striping: A Boolean indicating that the row should receive no * 'even / odd' styling. Defaults to FALSE. * Each cell can be either a string or an associative array with the * following keys: @@ -1459,47 +1459,12 @@ function drupal_pre_render_table(array $element) { * ), * // Row with attributes on the row and some of its cells. * array( - * 'data' => array( - * 'Cell 1', array( - * 'data' => 'Cell 2', 'colspan' => 2 - * ), - * ), - * 'class' => array('funky') + * 'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)), 'class' => array('funky') * ), * ); * @endcode * - footer: An array of table rows which will be printed within a - * tag. - * Every row is an array of cells, or an associative array with the - * following keys: - * - data: an array of cells. - * - Any HTML attributes, such as "class", to apply to the table row. - * - no_striping: a boolean indicating that the row should receive no - * 'even / odd' styling. Defaults to TRUE. - * Each cell can be either a string or an associative array with the - * following keys: - * - data: The string to display in the table cell. - * - header: Indicates this cell is a header. - * - Any HTML attributes, such as "colspan", to apply to the table cell. - * Here's an example for $rows: - * @code - * $footer = array( - * // Simple row - * array( - * 'Cell 1', 'Cell 2', 'Cell 3' - * ), - * // Row with attributes on the row and some of its cells. - * array( - * 'data' => array( - * 'Cell 1', - * array( - * 'data' => 'Cell 2', 'colspan' => 2 - * ), - * ), - * 'class' => array('funky') - * ), - * ); - * @endcode + * tag, in the same format as the rows element (see above). * - attributes: An array of HTML attributes to apply to the table tag. * - caption: A localized string to use for the tag. * - colgroups: An array of column groups. Each element of the array can be diff --git a/core/modules/system/templates/table.html.twig b/core/modules/system/templates/table.html.twig index 04ed606..9c1cb05 100644 --- a/core/modules/system/templates/table.html.twig +++ b/core/modules/system/templates/table.html.twig @@ -28,16 +28,7 @@ * - attributes: Any HTML attributes, such as "colspan", to apply to the * table cell. * - content: The string to display in the table cell. - * - footer: Table footer rows. Each row contains the following properties: - * - attributes: HTML attributes to apply to the 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. + * - 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. *