merging katipo changes
authorbob_lyon <bob_lyon>
Thu, 20 Jul 2006 06:09:02 +0000 (06:09 +0000)
committerbob_lyon <bob_lyon>
Thu, 20 Jul 2006 06:09:02 +0000 (06:09 +0000)
koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl
serials/serials-home.pl

index 9c5c354..f62c52c 100644 (file)
@@ -6,6 +6,10 @@
 <h1>Serials</h1>
 <div id="serials_home">
        <h2>Serials subscriptions</h2>
+<!-- TMPL_IF NAME="routing" -->
+        <h3>Search for Serial Routing List</h3>
+<!-- /TMPL_IF -->
+
        <table>
                <tr>
                        <th>ISSN</th>
                </tr>
                <tr>
                        <form action="serials-home.pl" method="post">
+                       <!-- TMPL_IF NAME="routing" -->
+                       <input type="hidden" name="routing" value="<!-- TMPL_VAR NAME="routing" -->" />
+                       <!-- /TMPL_IF -->
+                       <input type="hidden" name="searched" value="1" />
                        <td>
                                <input type="text" size=10 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription">
                        </td>
                                <!-- /TMPL_IF -->
                                        <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
                                </td>
+                           <!-- TMPL_IF NAME="routing" -->
+                               <!-- TMPL_IF name="toggle" -->
+                                       <td class="hilighted">
+                               <!-- TMPL_ELSE -->
+                                       <td>
+                               <!-- /TMPL_IF -->
+                                       <a href="routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" --><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
+                                        </td>
+                           <!-- TMPL_ELSE -->
+                             <!-- TMPL_IF NAME="alt_links" -->
+                               <!-- TMPL_IF name="toggle" -->
+                                       <td class="hilighted">
+                               <!-- TMPL_ELSE -->
+                                       <td>
+                               <!-- /TMPL_IF -->
+                                       <a href="alt_subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="subscription detail">Detail</a>
+                               </td>
+                               <!-- TMPL_IF name="toggle" -->
+                                       <td class="hilighted">
+                               <!-- TMPL_ELSE -->
+                                       <td>
+                               <!-- /TMPL_IF -->
+                                       <a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="receive issues for this subscription">Receive</a>
+                               </td>                         
+                             <!-- TMPL_ELSE -->
                                <!-- TMPL_IF name="toggle" -->
                                        <td class="hilighted">
                                <!-- TMPL_ELSE -->
                                <!-- /TMPL_IF -->
                                        <a href="serials-recieve.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="receive issues for this subscription">Receive</a>
                                </td>
+                             <!-- /TMPL_IF -->
                        </tr>
                <!-- /TMPL_LOOP -->
        </table>
-       <a href="/cgi-bin/koha/serials/subscription-add.pl" class="button serial">Add subscription</a>
+       
+       <!-- TMPL_IF NAME="routing" -->
+       <!-- TMPL_ELSE -->
+             <!-- TMPL_IF NAME="alt_links" -->
+                 <a href="/cgi-bin/koha/serials/alt_subscription-add.pl" class="button serial">Add subscription</a>          
+             <!-- TMPL_ELSE -->      
+                 <a href="/cgi-bin/koha/serials/subscription-add.pl" class="button serial">Add subscription</a>
+             <!-- /TMPL_IF -->
+       <!-- /TMPL_IF -->
 </div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
 
index ae341ac..356d952 100755 (executable)
@@ -57,6 +57,10 @@ my $ISSN = $query->param('ISSN');
 my $routing = $query->param('routing');
 my $searched = $query->param('searched');
 my $biblionumber = $query->param('biblionumber');
+my $alt_links = 0;
+if(C4::Context->preference("RoutingSerials")){
+    $alt_links = 0;
+}
 my @subscriptions = GetSubscriptions($title,$ISSN,$biblionumber);
 my ($template, $loggedinuser, $cookie)
 = get_template_and_user({template_name => "serials/serials-home.tmpl",
@@ -82,5 +86,6 @@ $template->param(
        ISSN => $ISSN,
         done_searched => $searched,
         routing => $routing,
+        alt_links => $alt_links,
        );
 output_html_with_http_headers $query, $cookie, $template->output;