TTpac: option to view larger sets of copies on record page
authorBill Erickson <berick@esilibrary.com>
Wed, 10 Aug 2011 21:07:36 +0000 (17:07 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 10 Aug 2011 21:07:36 +0000 (17:07 -0400)
On record details page, added a "Show More Copies" option to show more
(50) copies per page of copies than the default (10).  Also added a
"Show Fewer Copies" option to return to the default copy page size.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/images/minus_sign.png [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/record/summary.tt2

diff --git a/Open-ILS/web/images/minus_sign.png b/Open-ILS/web/images/minus_sign.png
new file mode 100644 (file)
index 0000000..0d612b1
Binary files /dev/null and b/Open-ILS/web/images/minus_sign.png differ
index dea3461..5cd6344 100644 (file)
             </td>
         [% END %]
         </tr>
+        <tr>
+            <td>
+                [% more_copies_limit = 50 %] [%# TODO: config %]
+                [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
+                        [% cgi = CGI(); 
+                            SET x = cgi.param('copy_limit', more_copies_limit); 
+                            SET x = cgi.param('copy_offset', 0); %]
+                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show more copies') %]</a>
+                    </div>
+                [% ELSIF ctx.copy_limit == more_copies_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
+                        [% cgi = CGI(); 
+                            SET x = cgi.param('copy_limit', '0'); # 0 == fall back to default 
+                            SET x = cgi.param('copy_offset', '0'); %]
+                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show fewer copies') %]</a>
+                    </div>
+                [% END %]
+            </td>
+        </tr>
     </tbody>
 </table>