FINAL suepr merge step : added all modules to this super repos

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 16:46:59 +02:00
7585 changed files with 1723356 additions and 18 deletions

View File

@@ -0,0 +1,86 @@
tml =>
<style type="text/css">
*{
/*font-family: "ubuntu-r";*/
}
h1{color:red;}
.field-name-field-nature-titre{
font-size: 24px;
font-weight: 300;
line-height: 1;
margin: 0;
color:green;
}
.field-name-field-description{
}
.field-name-field-materiau-image{
}
.field-name-field-company-fab{
}
</style>
<span class="wrapper">
<h2>materiO</h2>
<h3>l'inspiration par la matière </h3>
<h1 class="print-title">MicaPaper </h1>
<span class="print-content">
<article class="node node-materiau node-8007 vm-print workflow-3">
<section class="field field-name-field-nature-titre field-type-text field-label-hidden">
Sheets of mica </section>
<section class="field field-name-field-description field-type-text-with-summary field-label-hidden">
<br />Mica, a mineral of the phyllosilicate family, is characterised by its laminate structure, metallic brilliance and resistance to high temperatures. Splitting mica along its cleavage yields thin, uniform, film-like layers that are flexible and translucent.Widely used in industry for its electrical-insulation properties, MicaPaper also provides thermal insulation in furnaces and has applications in the optics industry. MicaPaper is available in sheets (standard thicknesses: 0.3 / 0.4 x 0.5 mm) or blocks (1000 x 1000 mm and 1000 x 2000 mm).The blocks can be cold-moulded.The material can withstand temperatures up to 1200°C.<br /> </section>
<section class="field field-name-field-materiau-image field-type-image field-label-hidden">
<span class="field-items"><span class="field-item even"><figure style="width:453px;height:300px;" title="©matériO"><img class="" src="http://dev.materio.com/sites/default/files/styles/pdf/public/materiaux/dsc_0317_0.jpg" width="453" height="300" alt="" title="©matériO" /></figure></span><br /><span class="field-item odd"><figure style="width:453px;height:300px;" title="©matériO"><img class="" src="http://dev.materio.com/sites/default/files/styles/pdf/public/materiaux/dsc_0318_0.jpg" width="453" height="300" alt="" title="©matériO" /></figure></span></span><br />
</section>
<span class="field field-name-field-company-fab field-type-taxonomy-term-reference field-label-above field-item"><strong class="field-label">Manufacturer:&nbsp;</strong><article class="node node-company node-2664 vm-print workflow-3">
<section class="content">
<section class="field field-name-field-tode-company field-type-taxonomy-term-reference field-label-hidden">
Mica Manufacturing Co </section>
<section class="field field-name-body field-type-text-with-summary field-label-hidden">
</section>
<section class="field field-name-field-website field-type-link-field field-label-hidden">
http://www.micamafco.com </section>
<section class="field field-name-field-public-phone field-type-phone-number field-label-hidden">
+91-3322292277 </section>
<section class="field field-name-field-public-address field-type-addressfield field-label-hidden">
</section>
</section>
</article> </span><br />
<nav class="nav">
</nav>
</article>
</span><br />
<!-- <span class="print-source_url"></span><br /> -->
<span class="print-links"></span>
</span><br />

View File

@@ -0,0 +1,78 @@
<?php
function parseImagesOntext(&$text){
// dsm($vars, 'vars');
# parse images : left only the first in teaser, then replace all with image_cache
preg_match_all('/<img[^>]+>/i',$text, $match_result);
$allimgs = $match_result[0];
// dsm($allimgs, '$allimgs');
if(count($allimgs)){
// if($vars['teaser']){
// $first_img = array_shift($allimgs);
// // dsm($first_img, '$first_img');
// $img_link = l($first_img, 'node/'.$vars['nid'], array(
// 'html' => true,
// 'attributes' => array(
// 'title' => htmlspecialchars($vars['title'])
// ),
// ));
// // dsm($img_link, '$img_link');
// $vars['content'] = str_replace($first_img, $img_link, $vars['content']);
// if(count($allimgs)){
// foreach ($allimgs as $key => $img)
// $vars['content'] = str_replace($img, '', $vars['content']);
// }
// $allimgs = array($first_img);
// $ic_preset = 'content_teaser';
// }else{
// $ic_preset = 'content_full';
// }
// $cached_img = array();
$preset = 'content_full';
foreach ($allimgs as $key => $img){
preg_match('/src="([^"]*)"/', $img, $src);
if(!preg_match('/^http:\/\//', $src[1])
&& !preg_match('/\.gif$/', $src[1])
){
preg_match('/alt="([^"]*)"/', $img, $alt);
preg_match('/title="([^"]*)"/', $img, $title);
// dsm($src, '$src');
// theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $absolute = TRUE)
// $cached_img = theme('imagecache', $ic_preset, preg_replace('/^\//', '', $src[1]), $alt[1], $title[1]);
// $image_infos['attributes']['class'] = 'image '.$preset;
// $image_infos['path'] = image_style_url($preset, preg_replace('/^\//', '', $src[1]));
// // dsm($image_infos['path'], 'path');
// $cached_img = theme('image', $image_infos);
$options['style_name'] = $preset;
$options['path'] = preg_replace('/^\//', '', $src[1]);
$options['alt'] = isset($alt[1]) ? $alt[1]:"";
$options['title'] = isset($title[1]) ? $title[1]:"";
$cached_img = theme('image_style', $options);
// dsm($img, 'img');
// dsm($cached_img, 'cached_img');
$text = str_replace($img, $cached_img, $text);
}
}
}
}

View File

@@ -0,0 +1,707 @@
<?php
/**
* Returns HTML for a query pager.
*
* Menu callbacks that display paged query results should call theme('pager') to
* retrieve a pager control so that users can view other results. Format a list
* of nearby pages with additional query results.
*
* @param $variables
* An associative array containing:
* - tags: An array of labels for the controls in the pager.
* - element: An optional integer to distinguish between multiple pagers on
* one page.
* - parameters: An associative array of query string parameters to append to
* the pager links.
* - quantity: The number of pages in the list.
*
* @ingroup themeable
*/
function materiobasetheme_pager($variables) {
$tags = $variables['tags'];
$element = $variables['element'];
$parameters = $variables['parameters'];
$quantity = $variables['quantity'];
global $pager_page_array, $pager_total;
// Calculate various markers within this pager piece:
// Middle is used to "center" pages around the current page.
$pager_middle = ceil($quantity / 2);
// current is the page we are currently paged to
$pager_current = $pager_page_array[$element] + 1;
// first is the first page listed by this pager piece (re quantity)
$pager_first = $pager_current - $pager_middle + 1;
// last is the last page listed by this pager piece (re quantity)
$pager_last = $pager_current + $quantity - $pager_middle;
// max is the maximum page number
$pager_max = $pager_total[$element];
// End of marker calculations.
// Prepare for generation loop.
$i = $pager_first;
if ($pager_last > $pager_max) {
// Adjust "center" if at end of query.
$i = $i + ($pager_max - $pager_last);
$pager_last = $pager_max;
}
if ($i <= 0) {
// Adjust "center" if at start of query.
$pager_last = $pager_last + (1 - $i);
$i = 1;
}
// End of generation loop preparation.
$li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('')), 'element' => $element, 'parameters' => $parameters));
$li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
$li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
$li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('')), 'element' => $element, 'parameters' => $parameters));
if ($pager_total[$element] > 1) {
if ($li_first) {
$items[] = array(
'class' => array('pager-first'),
'data' => $li_first,
);
}
if ($li_previous) {
$items[] = array(
'class' => array('pager-previous'),
'data' => $li_previous,
);
}
// When there is more than one page, create the pager list.
if ($i != $pager_max) {
if ($i > 1) {
$items[] = array(
'class' => array('pager-ellipsis'),
'data' => '…',
);
}
// Now generate the actual pager piece.
for (; $i <= $pager_last && $i <= $pager_max; $i++) {
if ($i < $pager_current) {
$items[] = array(
'class' => array('pager-item'),
'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),
);
}
if ($i == $pager_current) {
$items[] = array(
'class' => array('pager-current'),
'data' => $i,
);
}
if ($i > $pager_current) {
$items[] = array(
'class' => array('pager-item'),
'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),
);
}
}
if ($i < $pager_max) {
$items[] = array(
'class' => array('pager-ellipsis'),
'data' => '…',
);
}
}
// End generation.
if ($li_next) {
$items[] = array(
'class' => array('pager-next'),
'data' => $li_next,
);
}
if ($li_last) {
$items[] = array(
'class' => array('pager-last'),
'data' => $li_last,
);
}
return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . theme('item_list', array(
'items' => $items,
'attributes' => array('class' => array('pager')),
));
}
}
/**
* Theme the loggedinblock that shows for logged-in users.
*/
function materiobasetheme_lt_loggedinblock($variables){
global $user;
// return theme('username', array('account' => $variables['account'], 'link_path'=>'user/'.$user->uid.'/edit')) .' | ' . l(t('Log out'), 'user/logout');
return l('<i class="icon-user"></i><span class="account">' . $user->mail . '</span> ', 'user/'.$user->uid.'/edit', array('html'=>true))
. l('<i class="icon-off"></i><span class="logout">' . t('Log out') . '</span>', 'user/logout', array('html' => true));
}
function materiobasetheme_links__locale_block(&$vars) {
// global $language;
foreach ($vars['links'] as $lang => $link) {
// $vars['links'][$lang]['title'] = $lang;
// if($lang == $language->language)
// unset($vars['link'][$lang]);
}
$content = theme_links($vars);
return $content;
}
/**
* Returns HTML for an image field formatter.
*
* @param $variables
* An associative array containing:
* - item: Associative array of image data, which may include "uri", "alt",
* "width", "height", "title" and "attributes".
* - image_style: An optional image style.
* - path: An array containing the link 'path' and link 'options'.
*
* @ingroup themeable
*/
function materiobasetheme_image_formatter($variables) {
// dsm($variables, 'image_formatter');
$item = $variables['item'];
$image = array(
'path' => $item['uri'],
);
if (array_key_exists('alt', $item)) {
$image['alt'] = $item['alt'];
}
if (isset($item['attributes'])) {
$image['attributes'] = $item['attributes'];
}
if (isset($item['width']) && isset($item['height'])) {
$image['width'] = $item['width'];
$image['height'] = $item['height'];
}
// Do not output an empty 'title' attribute.
if (isset($item['title']) && drupal_strlen($item['title']) > 0) {
$image['title'] = $item['title'];
}
#added
if(isset($item['delta'])) {
$image['delta'] = $item['delta'];
}
if ($variables['image_style']) {
$image['style_name'] = $variables['image_style'];
$output = theme('image_style', $image);
}
else {
$output = theme('image', $image);
}
// The link path and link options are both optional, but for the options to be
// processed, the link path must at least be an empty string.
if (isset($variables['path']['path'])) {
$path = $variables['path']['path'];
$options = isset($variables['path']['options']) ? $variables['path']['options'] : array();
// When displaying an image inside a link, the html option must be TRUE.
$options['html'] = TRUE;
$output = l($output, $path, $options);
}
return $output;
}
/**
* Returns HTML for an image using a specific image style.
*
* @param $variables
* An associative array containing:
* - style_name: The name of the style to be used to alter the original image.
* - path: The path of the image file relative to the Drupal files directory.
* This function does not work with images outside the files directory nor
* with remotely hosted images. This should be in a format such as
* 'images/image.jpg', or using a stream wrapper such as
* 'public://images/image.jpg'.
* - width: The width of the source image (if known).
* - height: The height of the source image (if known).
* - alt: The alternative text for text-based browsers.
* - title: The title text is displayed when the image is hovered in some
* popular browsers.
* - attributes: Associative array of attributes to be placed in the img tag.
*
* @ingroup themeable
*/
function materiobasetheme_image_style($variables) {
// dsm($variables, 'image_style');
// Determine the dimensions of the styled image.
$fig_dimensions = "";
if(isset($variables['width']) || $variables['height']){
$dimensions = array(
'width' => $variables['width'],
'height' => $variables['height'],
);
image_style_transform_dimensions($variables['style_name'], $dimensions);
$variables['width'] = $dimensions['width'];
$variables['height'] = $dimensions['height'];
$fig_dimensions = 'width:'.$dimensions['width'].'px;height:'.$dimensions['height'].'px;';
}
// Determine the url for the styled image.
$variables['path'] = image_style_url($variables['style_name'], $variables['path']);
if(!isset($variables['attributes']))
$variables['attributes'] = array();
if(!isset($variables['attributes']['class']))
$variables['attributes']['class'] = array();
# hide title and alt for non adherent users
global $user;
if(isset($user->roles[1]) || isset($user->roles[7])){
unset($variables['title']);
unset($variables['alt']);
}
$figure = '<figure style="'.$fig_dimensions.'" ' . (isset($variables['title']) ? 'title="'.$variables['title'].'"' : '') . '>';
// lazyload
$excluded_styles = array('pdf', 'card-bookmark', 'content_full', 'content_teaser', 'didactique_page');
if(!in_array($variables['style_name'], $excluded_styles) && ( (isset($variables['delta']) && $variables['delta'] > 0) || !isset($variables['delta']) ) ){
// store the real path
$real_path = $variables['path'];
$variables['attributes']['data-original'] = file_create_url($real_path);
// add Class lazy for JS
$variables['attributes']['class'][] = "lazy";
// replace the image by a blank
$variables['path'] = drupal_get_path('theme', 'materiobasetheme') . '/img/blank.gif';
$figure .= theme('image', $variables);
}else{
# without lazyload
$figure .= theme('image', $variables);
}
$figure .= '</figure>';
return $figure;
}
/**
* Returns HTML for a list or nested list of items.
*
* @param $variables
* An associative array containing:
* - items: An array of items to be displayed in the list. If an item is a
* string, then it is used as is. If an item is an array, then the "data"
* element of the array is used as the contents of the list item. If an item
* is an array with a "children" element, those children are displayed in a
* nested list. All other elements are treated as attributes of the list
* item element.
* - title: The title of the list.
* - type: The type of list to return (e.g. "ul", "ol").
* - attributes: The attributes applied to the list element.
*/
function materiobasetheme_item_list($variables) {
$items = $variables['items'];
$title = $variables['title'];
$type = $variables['type'];
$attributes = $variables['attributes'];
// Only output the list container and title, if there are any list items.
// Check to see whether the block title exists before adding a header.
// Empty headers are not semantic and present accessibility challenges.
$output = '';
if (isset($title) && $title !== '') {
$output .= '<div class="item-list">';
$output .= '<h3>' . $title . '</h3>';
}
if (!empty($items)) {
$output .= "<$type" . drupal_attributes($attributes) . '>';
$num_items = count($items);
foreach ($items as $i => $item) {
$attributes = array();
$children = array();
$data = '';
if (is_array($item)) {
foreach ($item as $key => $value) {
if ($key == 'data') {
$data = $value;
}
elseif ($key == 'children') {
$children = $value;
}
else {
$attributes[$key] = $value;
}
}
}
else {
$data = $item;
}
if (count($children) > 0) {
// Render nested list.
$data .= theme_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $attributes));
}
if ($i == 0) {
$attributes['class'][] = 'first';
}
if ($i == $num_items - 1) {
$attributes['class'][] = 'last';
}
$output .= '<li' . drupal_attributes($attributes) . '>' . $data . "</li>\n";
}
$output .= "</$type>";
}
if (isset($title) && $title !== '') {
$output .= '</div>';
}
return $output;
}
/**
* Returns HTML for a link to a file.
*
* @param $variables
* An associative array containing:
* - file: A file object to which the link will be created.
* - icon_directory: (optional) A path to a directory of icons to be used for
* files. Defaults to the value of the "file_icon_directory" variable.
*
* @ingroup themeable
*/
function materiobasetheme_file_link($variables) {
$file = $variables['file'];
$icon_directory = $variables['icon_directory'];
$url = file_create_url($file->uri);
$icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory));
// Set options as per anchor format described at
// http://microformats.org/wiki/file-format-examples
$options = array(
'attributes' => array(
'type' => $file->filemime . '; length=' . $file->filesize,
'target' => '_blank',
),
);
// Use the description as the link text if available.
if (empty($file->description)) {
$link_text = $file->filename;
}
else {
$link_text = $file->description;
$options['attributes']['title'] = check_plain($file->filename);
}
return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
}
/**
* Implements hook_form_alter().
*/
function materiobasetheme_form_alter(&$form, &$form_state, $form_id) {
// dsm($form_id, 'form_id');
if($form_id == "user_login_block"){
// dsm($form, 'form');
unset($form['links']);
// $items = array();
$newpass = l(t('Lost my password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
$form['newpass'] = array(
'#prefix' => '<div class="newpass">',
'#markup' => $newpass,
'#suffix' => '</div>',
);
// if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
// $form['actions']['#weight'] = 10;
// $register = l(t('Get a free account'), 'user/register', array('attributes' => array('title' => t('Create a new user account.'))));
// $form['register'] = array(
// '#prefix' => '<div class="register">',
// '#markup' => $register,
// '#suffix' => '</div>',
// '#weight' => 15,
// );
// }
}
}
/**
* Implements hook_block_view_alter().
*/
function materiobasetheme_block_view_alter(&$data, $block) {
// dsm($block, 'block');
if ($block->module == 'menu' && $block->delta == 'menu-top-menu') {
// dsm($block, 'block');
// dsm($data, 'data');
$data['subject'] = '<i class="icon-align-justify"></i><span class="menu-title">' . $data['subject'] . '</span>';
}
if ($block->module == 'materio_flag' && $block->delta == 'materio_flag_mylists_nav') {
// dsm($block, 'block');
// dsm($data, 'data');
$data['subject'] = '<i class="icon-folder-open"></i><span class="menu-title">' . $data['subject'] . '</span>';
}
}
/**
* Themes the checkout review order page.
*
* @param $variables
* An associative array containing:
* - form: A render element representing the form, that by default includes
* the 'Back' and 'Submit order' buttons at the bottom of the review page.
* - panes: An associative array for each checkout pane that has information
* to add to the review page, keyed by the pane title:
* - <pane title>: The data returned for that pane or an array of returned
* data.
*
* @return
* A string of HTML for the page contents.
*
* @ingroup themeable
*/
function materiobasetheme_uc_cart_checkout_review($variables) {
$panes = $variables['panes'];
$form = $variables['form'];
drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
$output = '<div id="review-instructions">' . filter_xss_admin(t(variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')))) . '</div>';
$output .= '<table class="order-review-table">';
foreach ($panes as $title => $data) {
$output .= '<tr class="pane-title-row">';
$output .= '<td colspan="2">' . $title . '</td>';
$output .= '</tr>';
if (is_array($data)) {
foreach ($data as $row) {
if (is_array($row)) {
if (isset($row['border'])) {
$border = ' class="row-border-' . $row['border'] . '"';
}
else {
$border = '';
}
$output .= '<tr' . $border . '>';
$output .= '<td class="title-col">' . $row['title'] . ':</td>';
$output .= '<td class="data-col">' . $row['data'] . '</td>';
$output .= '</tr>';
}
else {
$output .= '<tr><td colspan="2">' . $row . '</td></tr>';
}
}
}
else {
$output .= '<tr><td colspan="2">' . $data . '</td></tr>';
}
}
$output .= '<tr class="review-button-row">';
$output .= '<td colspan="2">' . drupal_render($form) . '</td>';
$output .= '</tr>';
$output .= '</table>';
return $output;
}
/**
* Default theme function for the checkout form.
*
* @param $variables
* An associative array containing:
* - form: A render element representing the form.
*
* @see uc_cart_checkout_form()
* @ingroup themeable
*/
function materiobasetheme_uc_cart_checkout_form($variables) {
$form = $variables['form'];
// dsm($variables, "variables");
// dsm($form, "form");
// $form['panes']['cart']['#title'] = null;
// $form['panes']['customer']['#title'] = null;
$form['panes']['coupon']['#description'] = null;
$bf = array("#type"=>"fieldset", "#collapsible"=>false);
$layout = array(
"first-row" => $bf + array(
"#id"=>"first-row",
"#attributes"=>array("class"=>array("form-row")),
"column-left" =>$bf + array(
"#id"=>"first-row-column-left",
"#attributes"=>array("class"=>array("form-column", "form-column-left")),
"customer"=>"#", "billing"=>"#",
),
"column-right" =>$bf + array(
"#id"=>"first-row-column-right",
"#attributes"=>array("class"=>array("form-column", "form-column-right")),
"cart"=>"#", "coupon_automatic"=>"#", "coupon"=>"#", "payment"=>"#",
),
),
// "sec-row" => $bf + array(
// "#id"=>"sec-row",
// "#attributes"=>array("class"=>array("form-row")),
// "column-left" =>$bf + array(
// "#id"=>"sec-row-column-left",
// "#attributes"=>array("class"=>array("form-column", "form-column-left")),
// ),
// "column-right" =>$bf + array(
// "#id"=>"sec-row-column-right",
// "#attributes"=>array("class"=>array("form-column", "form-column-right")),
// ),
// ),
);
foreach ($layout as $rowkey => $row) {
foreach ($row as $collkey => $coll) {
if($collkey[0] != "#"){
foreach ($coll as $panekey => $pane) {
if($panekey[0] != "#" && isset($form['panes'][$panekey])){
$layout[$rowkey][$collkey][$panekey] = $form['panes'][$panekey];
}
}
}
}
}
// dsm($layout, 'layout');
$form = $layout + $form;
unset($form['panes']);
return drupal_render_children($form);
}
function materiobasetheme_uc_coupon_automatic_discounts($variables) {
$form = $variables['form'];
// dsm($form, 'auto discount form');
if( isset($form['discounts']['#items'])){
}
return drupal_render_children($form);
}
/**
* Formats the cart contents table on the checkout page.
*
* @param $variables
* An associative array containing:
* - show_subtotal: TRUE or FALSE indicating if you want a subtotal row
* displayed in the table.
* - items: An associative array of cart item information containing:
* - qty: Quantity in cart.
* - title: Item title.
* - price: Item price.
* - desc: Item description.
*
* @return
* The HTML output for the cart review table.
*
* @ingroup themeable
*/
function materiobasetheme_uc_cart_review_table($variables) {
$items = $variables['items'];
$show_subtotal = $variables['show_subtotal'];
$subtotal = 0;
// Set up table header.
// $header = array(
// array('data' => theme('uc_qty_label'), 'class' => array('qty')),
// array('data' => t('Products'), 'class' => array('products')),
// array('data' => t('Price'), 'class' => array('price')),
// );
// Set up table rows.
$display_items = uc_order_product_view_multiple($items);
if (!empty($display_items['uc_order_product'])) {
foreach (element_children($display_items['uc_order_product']) as $key) {
$display_item = $display_items['uc_order_product'][$key];
$subtotal += $display_item['total']['#price'];
$rows[] = array(
// array('data' => $display_item['qty'], 'class' => array('qty')),
array('data' => $display_item['product'], 'class' => array('products')),
array('data' => $display_item['total'], 'class' => array('price')),
);
}
}
// Add the subtotal as the final row.
if ($show_subtotal) {
$rows[] = array(
'data' => array(
// One cell
array(
// 'data' => array(
// '#theme' => 'uc_price',
// '#prefix' => '<span id="subtotal-title">' . t('Subtotal:') . '</span> ',
// '#price' => $subtotal,
// ),
'data'=>'<span id="subtotal-title">' . t('Subtotal:') . '</span> ',
// Cell attributes
// 'colspan' => 2,
'class' => array('subtotal'),
),
array(
'data'=>array(
'#theme' => 'uc_price',
'#price' => $subtotal,
),
'class' => array('price'),
)
),
// Row attributes
'class' => array('subtotal'),
);
}
// return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('cart-review'))));
return theme('table', array('rows' => $rows, 'attributes' => array('class' => array('cart-review'))));
}
/**
* Themes cart items on the checkout review order page.
*
* @param $variables
* An associative array containing:
* - items: An associative array of cart item information containing:
* - qty: Quantity in cart.
* - title: Item title.
* - price: Item price.
* - desc: Item description.
*
* @return
* A string of HTML for the page contents.
*
* @ingroup themeable
*/
function materiobasetheme_uc_checkout_pane_cart_review($variables) {
$rows = array();
$items = uc_order_product_view_multiple($variables['items']);
foreach (element_children($items['uc_order_product']) as $key) {
$item = $items['uc_order_product'][$key];
$rows[] = array(
array('data' => $item['qty'], 'class' => array('qty')),
array('data' => $item['product'], 'class' => array('products')),
array('data' => $item['total'], 'class' => array('price')),
);
}
return theme('table', array('rows' => $rows, 'attributes' => array('class' => array('cart-review'))));;
}