| 1 |
<?php // $Id: send.theme.inc,v 1.6 2009/08/17 21:38:15 vauxia Exp $ |
<?php // $Id: send.theme.inc,v 1.7 2009/08/26 01:18:14 vauxia Exp $ |
| 2 |
|
|
| 3 |
function send_theme_theme() { |
function send_theme_theme() { |
| 4 |
$path = drupal_get_path('module', 'send') .'/theme'; |
$path = drupal_get_path('module', 'send') .'/theme'; |
| 14 |
'file' => 'send.theme.inc', |
'file' => 'send.theme.inc', |
| 15 |
'path' => $path, |
'path' => $path, |
| 16 |
), |
), |
| 17 |
|
'send_message_compose_element' => array( |
| 18 |
|
'arguments' => array( 'element' => array() ), |
| 19 |
|
'file' => 'send.theme.inc', |
| 20 |
|
'path' => $path, |
| 21 |
|
), |
| 22 |
'send_template' => array( |
'send_template' => array( |
| 23 |
'arguments' => array(), |
'arguments' => array(), |
| 24 |
'file' => 'send.theme.inc', |
'file' => 'send.theme.inc', |
| 59 |
} |
} |
| 60 |
} |
} |
| 61 |
|
|
| 62 |
|
function theme_send_message_compose_element(&$element) { |
| 63 |
|
$admin = drupal_render($element['admin']); |
| 64 |
|
$content = drupal_render($element['content']); |
| 65 |
|
$extra = drupal_render($element); |
| 66 |
|
|
| 67 |
|
$output = ''; |
| 68 |
|
if ($content || $extra) { |
| 69 |
|
$output .= '<div id="message-content" style="width:70%; float: left; margin-right: 20px;">'. |
| 70 |
|
$extra . $content |
| 71 |
|
.'</div>'; |
| 72 |
|
} |
| 73 |
|
if ($admin) { |
| 74 |
|
$output .= $admin; |
| 75 |
|
} |
| 76 |
|
if ($output) { |
| 77 |
|
$output .= '<br clear="all" />'; |
| 78 |
|
} |
| 79 |
|
return $output; |
| 80 |
|
} |
| 81 |
|
|
| 82 |
// TODO in use? |
// TODO in use? |
| 83 |
function theme_send_template() { |
function theme_send_template() { |
| 84 |
$template = "%message\n%body\n"; |
$template = "%message\n%body\n"; |
| 92 |
return $subject; |
return $subject; |
| 93 |
} |
} |
| 94 |
|
|
| 95 |
function theme_send_body($body, $profile, $template, $values) { |
function theme_send_body($body, $profile, $template, $values = array()) { |
| 96 |
if ($template) { |
if ($template) { |
| 97 |
$body = $template->body; |
$body = $template->body; |
| 98 |
} |
} |
| 175 |
} |
} |
| 176 |
$content = drupal_render($element[$key]); |
$content = drupal_render($element[$key]); |
| 177 |
|
|
| 178 |
$rows[] = array( |
if ($weight) { |
| 179 |
'data' => array($content, $weight), |
$rows[] = array( |
| 180 |
'class' => 'draggable', |
'data' => array($content, $weight), |
| 181 |
); |
'class' => 'draggable', |
| 182 |
|
); |
| 183 |
|
} |
| 184 |
|
else { |
| 185 |
|
$rows[] = array($content); |
| 186 |
|
} |
| 187 |
} |
} |
| 188 |
|
|
| 189 |
drupal_add_tabledrag($id, 'order', 'sibling', $weight); |
drupal_add_tabledrag($id, 'order', 'sibling', $weight); |