function theme_cdn_page_stats_file_link in CDN 6.2
Same name and namespace in other branches
- 7.2 theme.inc \theme_cdn_page_stats_file_link()
Render a file link in the CDN integration page statistics.
Parameters
$file: A string containing the Drupal path (i.e. path relative to the Drupal root directory) of the file to generate the URL for.
$absolute_path: The absolute path (on the filesystem) to the file.
$synced: Whether this file has been synced to the CDN or not.
$cdn_url: The CDN URL of the file, or the normal URL when the file is not on a CDN.
$server: The server on which the file resides.
Return value
The rendered HTML.
1 theme call to theme_cdn_page_stats_file_link()
- theme_cdn_page_stats in ./
theme.inc - Render the CDN integration page statistics.
File
- ./
theme.inc, line 145 - Theme functions.
Code
function theme_cdn_page_stats_file_link($file, $absolute_path, $synced, $cdn_url, $server) {
$file_link = l(t('!file', array(
'!file' => $file,
)), $cdn_url, array(
'external' => TRUE,
'attributes' => array(
'title' => $absolute_path,
),
));
$touch_link = l(t('touch'), 'admin/cdn/touch/' . $file, array(
'query' => drupal_get_destination(),
));
$output = '';
$output .= '<span class="file-link">' . $file_link;
if ($synced) {
$output .= '<span class="touch-link">';
$output .= '<span class="arrow">' . t('→') . '</span>';
$output .= $touch_link;
$output .= '<span class="touch-help">';
$output .= t('Touching this file will trigger a resync to the CDN.');
$output .= '</span>';
$output .= '</span>';
}
$output .= '</span>';
return $output;
}