]> git.sesse.net Git - pr0n/commitdiff
Start adding the filter links for the equipment list.
authorSteinar H. Gunderson <sesse@debian.org>
Wed, 25 Jul 2007 10:12:28 +0000 (12:12 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Wed, 25 Jul 2007 10:12:28 +0000 (12:12 +0200)
13 files changed:
perl/Sesse/pr0n/Index.pm
templates/bilder.knatten.com/equipment-item
templates/bilder.knatten.com/equipment-item-singular
templates/default/equipment-item
templates/default/equipment-item-singular
templates/images.tg05.gathering.org/equipment-item
templates/images.tg05.gathering.org/equipment-item-singular
templates/itk-bilder.samfundet.no/equipment-item
templates/itk-bilder.samfundet.no/equipment-item-singular
templates/skoyen.bilder.knatten.com/equipment-item
templates/skoyen.bilder.knatten.com/equipment-item-singular
templates/skoyen.bildereks.knatten.com/equipment-item
templates/skoyen.bildereks.knatten.com/equipment-item-singular

index 8409c8486d197d78b31fbc79780057ad10a7ca2f..a5407d1efef8aa7ca9c094465c91ad3c934b692c 100644 (file)
@@ -225,11 +225,16 @@ sub handler {
                                        my $eqspec = $e->{'model'};
                                        $eqspec .= ', ' . $e->{'lens'} if (defined($e->{'lens'}));
 
+                                       my %newsettings = %defsettings;
+                                       $newsettings{'model'} = $e->{'model'};
+                                       $newsettings{'lens'} = defined($e->{'lens'}) ? $e->{'lens'} : '';
+                                       my $url = "/$event/" . Sesse::pr0n::Common::get_query_string(\%newsettings, \%defsettings);
+
                                        # This isn't correct for all languages. Fix if we ever need to care. :-)
                                        if ($e->{'num'} == 1) {
-                                               Sesse::pr0n::Templates::print_template($r, "equipment-item-singular", { eqspec => $eqspec });
+                                               Sesse::pr0n::Templates::print_template($r, "equipment-item-singular", { eqspec => $eqspec, filterurl => $url });
                                        } else {
-                                               Sesse::pr0n::Templates::print_template($r, "equipment-item", { eqspec => $eqspec, num => $e->{'num'} });
+                                               Sesse::pr0n::Templates::print_template($r, "equipment-item", { eqspec => $eqspec, num => $e->{'num'}, filterurl => $url });
                                        }
                                }
                                Sesse::pr0n::Templates::print_template($r, "equipment-end");
index 72ab8da9814a04b46fd26a7e3b8af7d57122c371..1ffac4bad015769424a3f6bcbbca8cdfe1f50971 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% bilder)</li>
+  <li>%EQSPEC% (%NUM% bilder) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 51e6465f1ba448cb5b6d96811052a334ecf31076..3911531aea6b840039b5a308b7a5d3acc3845328 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (ett bilde)</li>
+  <li>%EQSPEC% (ett bilde) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 0e7e86d042a5e205c08de53f755f0a409f010b9f..f8ce70f63732120f4e83c417ff3e51bbc68cbd9f 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% images)</li>
+  <li>%EQSPEC% (%NUM% images) <span class="filter">(<a href="%FILTERURL%">filter</a>)</span></li>
index b55a1639959a898e58ceba02a8eb25b5d977dfdd..e95d222a9140080aa168298c25e35d215fd995d3 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (one image)</li>
+  <li>%EQSPEC% (one image) <span class="filter">(<a href="%FILTERURL%">filter</a>)</span></li>
index 0e7e86d042a5e205c08de53f755f0a409f010b9f..f8ce70f63732120f4e83c417ff3e51bbc68cbd9f 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% images)</li>
+  <li>%EQSPEC% (%NUM% images) <span class="filter">(<a href="%FILTERURL%">filter</a>)</span></li>
index b55a1639959a898e58ceba02a8eb25b5d977dfdd..e95d222a9140080aa168298c25e35d215fd995d3 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (one image)</li>
+  <li>%EQSPEC% (one image) <span class="filter">(<a href="%FILTERURL%">filter</a>)</span></li>
index 72ab8da9814a04b46fd26a7e3b8af7d57122c371..1ffac4bad015769424a3f6bcbbca8cdfe1f50971 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% bilder)</li>
+  <li>%EQSPEC% (%NUM% bilder) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 51e6465f1ba448cb5b6d96811052a334ecf31076..3911531aea6b840039b5a308b7a5d3acc3845328 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (ett bilde)</li>
+  <li>%EQSPEC% (ett bilde) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 72ab8da9814a04b46fd26a7e3b8af7d57122c371..1ffac4bad015769424a3f6bcbbca8cdfe1f50971 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% bilder)</li>
+  <li>%EQSPEC% (%NUM% bilder) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 51e6465f1ba448cb5b6d96811052a334ecf31076..3911531aea6b840039b5a308b7a5d3acc3845328 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (ett bilde)</li>
+  <li>%EQSPEC% (ett bilde) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 72ab8da9814a04b46fd26a7e3b8af7d57122c371..1ffac4bad015769424a3f6bcbbca8cdfe1f50971 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (%NUM% bilder)</li>
+  <li>%EQSPEC% (%NUM% bilder) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>
index 51e6465f1ba448cb5b6d96811052a334ecf31076..3911531aea6b840039b5a308b7a5d3acc3845328 100644 (file)
@@ -1 +1 @@
-  <li>%EQSPEC% (ett bilde)</li>
+  <li>%EQSPEC% (ett bilde) <span class="filter">(<a href="%FILTERURL%">filtrer</a>)</span></li>