/[drupal]/contributions/modules/send/theme/send.theme.inc
ViewVC logotype

Diff of /contributions/modules/send/theme/send.theme.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7, Wed Aug 26 01:18:14 2009 UTC revision 1.8, Wed Aug 26 14:56:17 2009 UTC
# Line 1  Line 1 
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';
# Line 14  function send_theme_theme() { Line 14  function send_theme_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',
# Line 54  function theme_send_element(&$element) { Line 59  function theme_send_element(&$element) {
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";
# Line 67  function theme_send_subject($subject, $p Line 92  function theme_send_subject($subject, $p
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    }    }
# Line 150  function theme_send_draggable($element) Line 175  function theme_send_draggable($element)
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);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.2