Closed (fixed)
Project:
Slideshow
Version:
5.x-2.0-c
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 May 2007 at 19:18 UTC
Updated:
19 Apr 2009 at 12:00 UTC
The fact that the slideshow doesn't recognize that sometime there is only one attached image and deal with that lead me to fix it, since it's trivially easy.
Here's the simple one-line (plus 1 endbracket) patch:
$output .= '<div class="header">';
+ if ($status['total'] > 1) {
$output .= l(t('Previous'), $slideshow['url'], array('class' => 'previous'), 'slide='. $status['previous']) .' | ';
$output .= t('Image !current of !total', array('!current' => '<span class="current">'. $status['current'] .'</span>', '!total'
=> '<span class="total">'. $status['total'] .'</span>')) .' | ';
$output .= l(t('Next'), $slideshow['url'], array('class' => 'next'), 'slide='. $status['next']);
+ }
$output .= '</div>';
Simply put: only if there is more than one item to display, put the text/links into the header.
Comments
Comment #1
kkaefer commentedCommitted. Thanks!