Commit d83289f8 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#196667 (GHOP 45) by fberci: add '@ingroup themeable' to all themeable functions

parent baf6910c
......@@ -1315,6 +1315,8 @@ function form_options_flatten($array, $reset = TRUE) {
* @return
* A themed HTML string representing the form element.
*
* @ingroup themeable
*
* It is possible to group options together; to do this, change the format of
* $options to an associative array in which the keys are group labels, and the
* values are associative arrays in the normal $options format.
......@@ -1417,6 +1419,8 @@ function form_get_options($element, $key) {
* Properties used: attributes, title, value, description, children, collapsible, collapsed
* @return
* A themed HTML string representing the form item group.
*
* @ingroup themeable
*/
function theme_fieldset($element) {
if ($element['#collapsible']) {
......@@ -1443,6 +1447,8 @@ function theme_fieldset($element) {
* Properties used: required, return_value, value, attributes, title, description
* @return
* A themed HTML string representing the form item group.
*
* @ingroup themeable
*/
function theme_radio($element) {
_form_set_class($element, array('form-radio'));
......@@ -1467,6 +1473,8 @@ function theme_radio($element) {
* Properties used: title, value, options, description, required and attributes.
* @return
* A themed HTML string representing the radio button set.
*
* @ingroup themeable
*/
function theme_radios($element) {
$class = 'form-radios';
......@@ -1491,6 +1499,8 @@ function theme_radios($element) {
* Properties used: title, value, id, required, error.
* @return
* A themed HTML string representing the form item.
*
* @ingroup themeable
*/
function theme_password_confirm($element) {
return theme('form_element', $element, $element['#children']);
......@@ -1557,6 +1567,8 @@ function password_confirm_validate($form, &$form_state) {
* Properties used: title, value, options, description, required and attributes.
* @return
* A themed HTML string representing the date selection boxes.
*
* @ingroup themeable
*/
function theme_date($element) {
return theme('form_element', $element, '<div class="container-inline">'. $element['#children'] .'</div>');
......@@ -1748,6 +1760,8 @@ function form_expand_ahah($element) {
* Properties used: title, value, description, required, error
* @return
* A themed HTML string representing the form item.
*
* @ingroup themeable
*/
function theme_item($element) {
return theme('form_element', $element, $element['#value'] . (!empty($element['#children']) ? $element['#children'] : ''));
......@@ -1761,6 +1775,8 @@ function theme_item($element) {
* Properties used: title, value, return_value, description, required
* @return
* A themed HTML string representing the checkbox.
*
* @ingroup themeable
*/
function theme_checkbox($element) {
_form_set_class($element, array('form-checkbox'));
......@@ -1787,6 +1803,8 @@ function theme_checkbox($element) {
* An associative array containing the properties of the element.
* @return
* A themed HTML string representing the checkbox set.
*
* @ingroup themeable
*/
function theme_checkboxes($element) {
$class = 'form-checkboxes';
......@@ -1819,10 +1837,20 @@ function expand_checkboxes($element) {
return $element;
}
/**
* Theme a form submit button.
*
* @ingroup themeable
*/
function theme_submit($element) {
return theme('button', $element);
}
/**
* Theme a form button.
*
* @ingroup themeable
*/
function theme_button($element) {
// Make sure not to overwrite classes.
if (isset($element['#attributes']['class'])) {
......@@ -1836,7 +1864,9 @@ function theme_button($element) {
}
/**
* Theme an image button.
* Theme a form image button.
*
* @ingroup themeable
*/
function theme_image_button($element) {
// Make sure not to overwrite classes.
......@@ -1864,11 +1894,18 @@ function theme_image_button($element) {
* Properties used: value, edit
* @return
* A themed HTML string representing the hidden form field.
*
* @ingroup themeable
*/
function theme_hidden($element) {
return '<input type="hidden" name="'. $element['#name'] .'" id="'. $element['#id'] .'" value="'. check_plain($element['#value']) ."\" ". drupal_attributes($element['#attributes']) ." />\n";
}
/**
* Format a form token.
*
* @ingroup themeable
*/
function theme_token($element) {
return theme('hidden', $element);
}
......@@ -1881,6 +1918,8 @@ function theme_token($element) {
* Properties used: title, value, description, size, maxlength, required, attributes autocomplete_path
* @return
* A themed HTML string representing the textfield.
*
* @ingroup themeable
*/
function theme_textfield($element) {
$size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
......@@ -1917,6 +1956,8 @@ function theme_textfield($element) {
* Properties used: action, method, attributes, children
* @return
* A themed HTML string representing the form.
*
* @ingroup themeable
*/
function theme_form($element) {
// Anonymous div to satisfy XHTML compliance.
......@@ -1932,6 +1973,8 @@ function theme_form($element) {
* Properties used: title, value, description, rows, cols, required, attributes
* @return
* A themed HTML string representing the textarea.
*
* @ingroup themeable
*/
function theme_textarea($element) {
$class = array('form-textarea');
......@@ -1965,6 +2008,8 @@ function theme_textarea($element) {
* Properties used: value, children.
* @return
* A themed HTML string representing the HTML markup.
*
* @ingroup themeable
*/
function theme_markup($element) {
......@@ -1979,6 +2024,8 @@ function theme_markup($element) {
* Properties used: title, value, description, size, maxlength, required, attributes
* @return
* A themed HTML string representing the form.
*
* @ingroup themeable
*/
function theme_password($element) {
$size = $element['#size'] ? ' size="'. $element['#size'] .'" ' : '';
......@@ -2019,6 +2066,8 @@ function process_weight($element) {
* @return
* A themed HTML string representing the field.
*
* @ingroup themeable
*
* For assistance with handling the uploaded file correctly, see the API
* provided by file.inc.
*/
......@@ -2037,6 +2086,8 @@ function theme_file($element) {
* The form element's data.
* @return
* A string representing the form element.
*
* @ingroup themeable
*/
function theme_form_element($element, $value) {
// This is also used in the installer, pre-database setup.
......
......@@ -63,6 +63,8 @@ function locale_languages_overview_form() {
/**
* Theme the language overview form.
*
* @ingroup themeable
*/
function theme_locale_languages_overview_form($form) {
$default = language_default();
......
......@@ -979,6 +979,8 @@ function _menu_tree_data($result, $parents, $depth, $previous_element = '') {
/**
* Generate the HTML output for a single menu link.
*
* @ingroup themeable
*/
function theme_menu_item_link($link) {
if (empty($link['options'])) {
......@@ -990,6 +992,8 @@ function theme_menu_item_link($link) {
/**
* Generate the HTML output for a menu tree
*
* @ingroup themeable
*/
function theme_menu_tree($tree) {
return '<ul class="menu">'. $tree .'</ul>';
......@@ -997,6 +1001,8 @@ function theme_menu_tree($tree) {
/**
* Generate the HTML output for a menu item and submenu.
*
* @ingroup themeable
*/
function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
......@@ -1011,6 +1017,8 @@ function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FA
/**
* Generate the HTML output for a single local task link.
*
* @ingroup themeable
*/
function theme_menu_local_task($link, $active = FALSE) {
return '<li '. ($active ? 'class="active" ' : '') .'>'. $link .'</li>';
......
......@@ -369,6 +369,8 @@ function theme_pager_last($text, $limit, $element = 0, $parameters = array()) {
* An associative array of HTML attributes to apply to a pager anchor tag.
* @return
* An HTML string that generates the link.
*
* @ingroup themeable
*/
function theme_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) {
$page = isset($_GET['page']) ? $_GET['page'] : '';
......
......@@ -1545,6 +1545,16 @@ function theme_username($object) {
return $output;
}
/**
* Return a themed progress bar.
*
* @param $percent
* The percentage of the progress.
* @param $message
* A string containing information to be displayed.
* @return
* A themed HTML string representing the progress bar.
*/
function theme_progress_bar($percent, $message) {
$output = '<div id="progress" class="progress">';
$output .= '<div class="bar"><div class="filled" style="width: '. $percent .'%"></div></div>';
......
......@@ -78,6 +78,8 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine
/**
* Return a themed list of maintenance tasks to perform.
*
* @ingroup themeable
*/
function theme_task_list($items, $active = NULL) {
$done = isset($items[$active]) || $active == NULL;
......
......@@ -160,6 +160,8 @@ function color_scheme_form(&$form_state, $theme) {
/**
* Theme color form.
*
* @ingroup @themeable
*/
function theme_color_scheme_form($form) {
// Include stylesheet
......
......@@ -1448,6 +1448,11 @@ function comment_form_submit($form, &$form_state) {
}
}
/**
* Return a themed comment.
*
* @ingroup themeable
*/
function theme_comment_view($comment, $node, $links = array(), $visible = 1) {
static $first_new = TRUE;
......@@ -1506,7 +1511,11 @@ function comment_controls($mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMME
return $form;
}
/**
* Theme comment controls box where the user can change the default display mode and display order of comments.
*
* @ingroup themeable
*/
function theme_comment_controls($form) {
$output = '<div class="container-inline">';
$output .= drupal_render($form);
......@@ -1575,22 +1584,47 @@ function template_preprocess_comment_folded(&$variables) {
$variables['title'] = l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid"));
}
/**
* Theme collapsed flat type comment.
*
* @ingroup themeable
*/
function theme_comment_flat_collapsed($comment, $node) {
return theme('comment_view', $comment, $node, '', 0);
}
/**
* Theme expanded flat type comment.
*
* @ingroup themeable
*/
function theme_comment_flat_expanded($comment, $node) {
return theme('comment_view', $comment, $node, module_invoke_all('link', 'comment', $comment, 0));
}
/**
* Theme collapsed thread type comment.
*
* @ingroup themeable
*/
function theme_comment_thread_collapsed($comment, $node) {
return theme('comment_view', $comment, $node, '', 0);
}
/**
* Theme expanded thread type comment.
*
* @ingroup themeable
*/
function theme_comment_thread_expanded($comment, $node) {
return theme('comment_view', $comment, $node, module_invoke_all('link', 'comment', $comment, 0));
}
/**
* Theme the "comment posting is forbidden" message.
*
* @ingroup themeable
*/
function theme_comment_post_forbidden($node) {
global $user;
if ($user->uid) {
......@@ -1634,6 +1668,8 @@ function template_preprocess_comment_wrapper(&$variables) {
/**
* Make the submitted variable themable
*
* @ingroup themeable
*/
function theme_comment_submitted($comment) {
return t('Submitted by !username on @datetime.',
......
......@@ -145,6 +145,8 @@ function dblog_watchdog($log = array()) {
/**
* Theme dblog administration filter selector.
*
* @ingroup themeable
*/
function theme_dblog_filters($form) {
$output = '';
......
......@@ -350,6 +350,8 @@ function filter_admin_order(&$form_state, $format = NULL) {
/**
* Theme filter order configuration form.
*
* @ingroup themeable
*/
function theme_filter_admin_order($form) {
$header = array(t('Name'), t('Weight'));
......
......@@ -576,7 +576,6 @@ function _filter_tips($format, $long = FALSE) {
*
* @ingroup themeable
*/
function theme_filter_tips_more_info() {
return '<p>'. l(t('More information about formatting options'), 'filter/tips') .'</p>';
}
......
......@@ -163,6 +163,8 @@ function menu_overview_form_submit($form, &$form_state) {
/**
* Theme the menu overview form into a table.
*
* @ingroup themeable
*/
function theme_menu_overview_form($form) {
drupal_add_tabledrag('menu-overview', 'match', 'parent', 'menu-plid', 'menu-plid', 'menu-mlid', TRUE, MENU_MAX_DEPTH - 1);
......
......@@ -236,6 +236,8 @@ function node_filter_form() {
/**
* Theme node administration filter form.
*
* @ingroup themeable
*/
function theme_node_filter_form($form) {
$output = '';
......@@ -248,6 +250,8 @@ function theme_node_filter_form($form) {
/**
* Theme node administration filter selector.
*
* @ingroup themeable
*/
function theme_node_filters($form) {
$output = '';
......@@ -403,6 +407,8 @@ function node_admin_nodes() {
/**
* Theme node administration overview.
*
* @ingroup themeable
*/
function theme_node_admin_nodes($form) {
// If there are rows in this form, then $form['title'] contains a list of
......
......@@ -148,6 +148,8 @@ function node_title_list($result, $title = NULL) {
/**
* Format a listing of links to nodes.
*
* @ingroup themeable
*/
function theme_node_list($items, $title = NULL) {
return theme('item_list', $items, $title);
......@@ -1045,6 +1047,11 @@ function node_show($node, $cid) {
return $output;
}
/**
* Theme a log message.
*
* @ingroup themeable
*/
function theme_node_log_message($log) {
return '<div class="log"><div class="title">'. t('Log') .':</div>'. $log .'</div>';
}
......@@ -1234,6 +1241,11 @@ function node_user($op, &$edit, &$user) {
}
}
/**
* Theme the content ranking part of the search settings admin page.
*
* @ingroup themeable
*/
function theme_node_search_admin($form) {
$output = drupal_render($form['info']);
......@@ -2315,6 +2327,8 @@ function node_forms() {
/**
* Format the "Submitted by username on date/time" for each node
*
* @ingroup themeable
*/
function theme_node_submitted($node) {
return t('Submitted by !username on @datetime',
......
......@@ -21,6 +21,11 @@ function node_add_page() {
return theme('node_add_list', $content);
}
/**
* Display the list of available node types for node creation.
*
* @ingroup themeable
*/
function theme_node_add_list($content) {
$output = '';
......@@ -309,6 +314,11 @@ function node_form_build_preview($form, &$form_state) {
$form_state['node_preview'] = node_preview($node);
}
/**
* Present a node submission form.
*
* @ingroup themeable
*/
function theme_node_form($form) {
$output = "\n<div class=\"node-form\">\n";
......@@ -399,6 +409,8 @@ function node_preview($node) {
*
* @param $node
* The node object which is being previewed.
*
* @ingroup themeable
*/
function theme_node_preview($node) {
$output = '<div class="preview">';
......
......@@ -636,6 +636,8 @@ function poll_view_results(&$node, $teaser, $page, $block) {
/**
* Theme the admin poll form for choices.
*
* @ingroup themeable
*/
function theme_poll_choices($form) {
// Change the button title to reflect the behavior when using JavaScript.
......
......@@ -88,6 +88,11 @@ function syslog_theme() {
);
}
/**
* Format a system log entry.
*
* @ingroup themeable
*/
function theme_syslog_format($entry) {
global $base_url;
......
......@@ -1711,7 +1711,8 @@ function system_batch_page() {
* @param $block
* An array containing information about the block. It should
* include a 'title', a 'description' and a formatted 'content'.
* @themeable
*
* @ingroup themeable
*/
function theme_admin_block($block) {
// Don't display the block if it has no content to display.
......@@ -1741,7 +1742,8 @@ function theme_admin_block($block) {
* @param $block
* An array containing information about the block. It should
* include a 'title', a 'description' and a formatted 'content'.
* @themeable
*
* @ingroup themeable
*/
function theme_admin_block_content($content) {
if (!$content) {
......@@ -1778,7 +1780,8 @@ function theme_admin_block_content($content) {
* 'title', a 'description', a formatted 'content' and a
* 'position' which will control which container it will be
* in. This is usually 'left' or 'right'.
* @themeable
*
* @ingroup themeable
*/
function theme_admin_page($blocks) {
$stripe = 0;
......@@ -1818,6 +1821,8 @@ function theme_admin_page($blocks) {
/**
* Theme output of the dashboard page.
*
* @ingroup themeable
*/
function theme_system_admin_by_module($menu_items) {
$stripe = 0;
......
......@@ -1706,6 +1706,11 @@ function _system_zonelist() {
return $zones;
}
/**
* Format the Powered by Drupal text.
*
* @ingroup themeable
*/
function theme_system_powered_by($image_path) {
$image = theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'));
return l($image, 'http://drupal.org', array('html' => TRUE, 'absolute' => TRUE, 'external' => TRUE));
......
......@@ -1036,7 +1036,10 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
}
/**
* We use the default selection field for choosing terms.
* Format the selection field for choosing terms
* (by deafult the default selection field is used).
*
* @ingroup themeable
*/
function theme_taxonomy_term_select($element) {
return theme('select', $element);
......
......@@ -82,6 +82,8 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
* An array of term ids.
* @param $result
* A pager_query() result, such as that performed by taxonomy_select_nodes().
*
* @ingroup themeable
*/
function theme_taxonomy_term_page($tids, $result) {
$output = '';
......
......@@ -226,6 +226,8 @@ function trigger_assign_form_submit($form, $form_state) {
* The fieldset including all assigned actions.
* @return
* The rendered form with the table prepended.
*
* @ingroup themeable
*/
function theme_trigger_display($element) {
$header = array();
......
......@@ -22,6 +22,8 @@ function update_status() {
/**
* Theme project status report.
*
* @ingroup themeable
*/
function theme_update_report($data) {
$last = variable_get('update_last_check', 0);
......@@ -197,6 +199,11 @@ function theme_update_report($data) {
return $output;
}
/**
* Theme the version display of a project.
*
* @ingroup themeable
*/
function theme_update_version($version, $tag, $class) {
$output = '';
$output .= '<table class="version '. $class .'">';
......
......@@ -340,6 +340,8 @@ function upload_nodeapi(&$node, $op, $teaser) {
/**
* Displays file attachments in table
*
* @ingroup themeable
*/
function theme_upload_attachments($files) {
$header = array(t('Attachment'), t('Size'));
......@@ -517,6 +519,8 @@ function _upload_form($node) {
/**
* Theme the attachments list.
*
* @ingroup themeable
*/
function theme_upload_form_current(&$form) {
$header = array('', t('Delete'), t('List'), t('Description'), t('Weight'), t('Size'));
......@@ -542,6 +546,8 @@ function theme_upload_form_current(&$form) {
/**
* Theme the attachment form.
* Note: required to output prefix/suffix.
*
* @ingroup themeable
*/
function theme_upload_form_new($form) {
$output = drupal_render($form);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment