issue49, fixed display header text in photo index
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 15 Jul 2007 15:48:26 +0000 (15:48 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 15 Jul 2007 15:48:26 +0000 (15:48 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@212 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php
templates/photo_index.tpl

index 2e491c5f4e4af4e2da07fa26ab98ded6faeb8c81..1c1e8647e50d7ca4de3567b0584024c1c58f1bf8 100644 (file)
@@ -751,6 +751,15 @@ class PHPFSPOT {
       if(isset($_SESSION['searchfor']) && $_SESSION['searchfor'] != '')
          $this->tmpl->assign('searchfor', $_SESSION['searchfor']);
 
       if(isset($_SESSION['searchfor']) && $_SESSION['searchfor'] != '')
          $this->tmpl->assign('searchfor', $_SESSION['searchfor']);
 
+      if(isset($_SESSION['from_date']) && isset($_SESSION['to_date'])) {
+         $this->tmpl->assign('from_date', $_SESSION['from_date']);
+         $this->tmpl->assign('to_date', $_SESSION['to_date']);
+      }
+
+      if(isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags'])) {
+         $this->tmpl->assign('tag_result', 1);
+      }
+
       /* do we have to display the page selector ? */
       if($this->cfg->rows_per_page != 0) {
       
       /* do we have to display the page selector ? */
       if($this->cfg->rows_per_page != 0) {
       
index 61fd8a8f502645f1e0d03d3c456aa5f8be8fca7c..e4ed521e114de66baca32d3817c999dc47c33081 100644 (file)
@@ -5,8 +5,20 @@
    <table style="width: 100%;">
     <tr>
      <td class="index_header">
    <table style="width: 100%;">
     <tr>
      <td class="index_header">
-      <b>Photo Index,</b>
-      {if ! $searchfor }
+      <b>Photo Index</b>
+      {if $searchfor }
+       {if $count == 1}
+        {$count} image is the result for your search about "{$searchfor}"
+       {else}
+        {$count} images are the result for your search about "{$searchfor}"
+       {/if}
+      {elseif $from_date }
+       {if $count == 1}
+        {$count} image is the result for your search between {$from_date} to {$to_date}
+       {else}
+        {$count} images are the result for your search between {$from_date} to {$to_date}
+       {/if}
+      {elseif $tag_result}
        {if $count == 1}
         {$count} image has been found for the selected tags
        {else}
        {if $count == 1}
         {$count} image has been found for the selected tags
        {else}
@@ -14,9 +26,9 @@
        {/if}
       {else}
        {if $count == 1}
        {/if}
       {else}
        {if $count == 1}
-        {$count} image is the result for your search about "{$searchfor}"
+        {$count} image has been found
        {else}
        {else}
-        {$count} images are the result for your search about "{$searchfor}"
+        {$count} images have been found
        {/if}
       {/if}
      </td>
        {/if}
       {/if}
      </td>