Index: /trunk/picture.php
===================================================================
--- /trunk/picture.php	(revision 1786)
+++ /trunk/picture.php	(revision 1787)
@@ -44,11 +44,17 @@
 if (!in_array($page['image_id'], $page['items']))
 {
-  page_not_found('The requested image does not belong to this image set',
-      duplicate_index_url() );
+  page_not_found(
+    'The requested image does not belong to this image set',
+    duplicate_index_url()
+    );
 }
 
 // add default event handler for rendering element content
-add_event_handler('render_element_content', 'default_picture_content',
-  EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+add_event_handler(
+  'render_element_content',
+  'default_picture_content',
+  EVENT_HANDLER_PRIORITY_NEUTRAL,
+  2
+  );
 trigger_action('loc_begin_picture');
 
@@ -64,8 +70,14 @@
     return $content;
   }
+  
   global $user;
-  $my_template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'],
-    $user['theme'] );
-  $my_template->set_filenames( array('default_content'=>'picture_content.tpl') );
+  
+  $my_template = new Template(
+    PHPWG_ROOT_PATH.'template/'.$user['template'],
+    $user['theme']
+    );
+  $my_template->set_filenames(
+    array('default_content'=>'picture_content.tpl')
+    );
 
   if (isset($element_info['high_url']))
@@ -89,6 +101,4 @@
   return $my_template->parse( 'default_content', true);
 }
-
-
 
 // +-----------------------------------------------------------------------+
@@ -212,6 +222,8 @@
     {
       include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
-      rate_picture($page['image_id'],
-          isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] );
+      rate_picture(
+        $page['image_id'],
+        isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate']
+        );
       redirect($url_self);
     }
@@ -396,6 +408,8 @@
 if (!empty($picture['current']['width']))
 {
-  list($picture['current']['scaled_width'],$picture['current']['scaled_height']) =
-    get_picture_size(
+  list(
+    $picture['current']['scaled_width'],
+    $picture['current']['scaled_height']
+    ) = get_picture_size(
       $picture['current']['width'],
       $picture['current']['height'],
@@ -420,6 +434,6 @@
 if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) )
 {
-  // $redirect_msg, $refresh, $url_link and $title are required for creating an automated
-  // refresh page in header.tpl
+  // $redirect_msg, $refresh, $url_link and $title are required for creating
+  // an automated refresh page in header.tpl
   $refresh= $_GET['slideshow'];
   $url_link = add_url_params(
@@ -437,10 +451,13 @@
 
 // do we have a plugin that can show metadata for something else than images?
-$metadata_showable = trigger_event('get_element_metadata_available',
-    (
-      ($conf['show_exif'] or $conf['show_iptc'])
-      and isset($picture['current']['image_path'])
+$metadata_showable = trigger_event(
+  'get_element_metadata_available',
+  (
+    ($conf['show_exif'] or $conf['show_iptc'])
+    and isset($picture['current']['image_path'])
     ),
-    $picture['current']['path'] );
+  $picture['current']['path']
+  );
+
 if ($metadata_showable)
 {
@@ -472,24 +489,28 @@
   $page['slideshow'] = false;  
 }
-// maybe someone wants a special display (call it before page_header so that they
-// can add stylesheets)
-$element_content = trigger_event('render_element_content',
-                      '', $picture['current'] );
-
-if ( isset($picture['next']['image_url'])
-      and isset($picture['next']['is_picture']) )
-{
-  $template->assign_block_vars( 'prefetch',
+
+// maybe someone wants a special display (call it before page_header so that
+// they can add stylesheets)
+$element_content = trigger_event(
+  'render_element_content',
+  '',
+  $picture['current']
+  );
+
+if (isset($picture['next']['image_url'])
+    and isset($picture['next']['is_picture']))
+{
+  $template->assign_block_vars(
+    'prefetch',
     array (
       'URL' => $picture['next']['image_url']
-    )
-  );
+      )
+    );
 }
 
 $template->set_filenames(array( 'picture' => $page['display_tpl'] ));
 
-
 //------------------------------------------------------- navigation management
-foreach ( array('first','previous','next','last') as $which_image )
+foreach (array('first','previous','next','last') as $which_image)
 {
   if (isset($picture[$which_image]))
@@ -502,4 +523,11 @@
         'U_IMG' => $picture[$which_image]['url'],
         )
+      );
+  }
+  else
+  {
+    $template->assign_block_vars(
+      $which_image.'_unactive',
+      array()
       );
   }
Index: /trunk/template/yoga/picture.tpl
===================================================================
--- /trunk/template/yoga/picture.tpl	(revision 1786)
+++ /trunk/template/yoga/picture.tpl	(revision 1787)
@@ -41,14 +41,26 @@
   <a class="navButton prev" href="{last.U_IMG}" title="{lang:last_page} : {last.TITLE_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
 <!-- END last -->
+<!-- BEGIN last_unactive -->
+  <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/last_unactive.png" class="button" alt="{lang:last_page}"></a>
+<!-- END last_unactive -->
 <!-- BEGIN next -->
-  <a class="navButton next" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
+  <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
 <!-- END next -->
-  <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:home}"></a>
+<!-- BEGIN next_unactive -->
+  <a class="navButton next"><img src="{pwg_root}{themeconf:icon_dir}/right_unactive.png" class="button" alt="{lang:next_page}"></a>
+<!-- END next_unactive -->
+  <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
 <!-- BEGIN previous -->
-  <a class="navButton prev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
+  <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
 <!-- END previous -->
+<!-- BEGIN previous_unactive -->
+  <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/left_unactive.png" class="button" alt="{lang:previous_page}"></a>
+<!-- END previous_unactive -->
 <!-- BEGIN first -->
   <a class="navButton prev" href="{first.U_IMG}" title="{lang:first_page} : {first.TITLE_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
 <!-- END first -->
+<!-- BEGIN first_unactive -->
+  <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/first_unactive.png" class="button" alt="{lang:first_page}"></a>
+<!-- END first_unactive -->
 </div>
 
