/[drupal]/contributions/modules/media/media_theme.inc
ViewVC logotype

Contents of /contributions/modules/media/media_theme.inc

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Jul 21 04:34:45 2009 UTC (4 months, 1 week ago) by jmstacey
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-7--1
Changes since 1.2: +3 -2 lines
File MIME type: text/x-php
Some blind styling cleanup in preparation for work.
1 <?php
2 // $Id: media_theme.inc,v 1.2 2009/07/20 22:58:02 jmstacey Exp $
3
4 /**
5 * @file
6 * Media Theming
7 *
8 * Theming functions for the Media module.
9 */
10
11 /**
12 * Display the media file browser.
13 *
14 * @param array $element
15 * The form element.
16 * @return string
17 */
18 function theme_media_file_browser($element) {
19 // Add the CSS for our display.
20 $output = '<div class="media browser">'. $element .'</div>';
21
22 return $output;
23 }
24
25 /**
26 * Display a media file list.
27 *
28 * @param array $element
29 * The form element.
30 * @return string
31 */
32 function theme_media_file_list($element) {
33 // Add the CSS for our display.
34 return '<div class="media-file-list">'. theme('form_element', $element, $element['#children']) .'</div>';
35 }
36
37 /**
38 * Display a browser pane.
39 *
40 * @param array $form
41 * The form element.
42 * @return string
43 */
44 function theme_media_browser_pane($form) {
45 $output = array();
46
47 // render the drawers
48 $output[] = '<div'. drupal_attributes($form['#attributes']) .'>';
49
50 // render the drawer list
51 $output[] = ' <div class="browser drawers">';
52 $output[] = drupal_render_form(null, $form['drawers']);
53 $output[] = ' </div>';
54
55 // render the drawer displays
56 $output[] = drupal_render_form(null, $form);
57 $output[] = '</div>';
58
59 return implode("\n", $output);
60 }

  ViewVC Help
Powered by ViewVC 1.1.2