[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha C4/Bull.pm koha-tmpl/intranet-tmpl/default... [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha C4/Bull.pm koha-tmpl/intranet-tmpl/default... [rel_2_2] |
Date: |
Fri, 04 Aug 2006 09:09:10 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <hdl> 06/08/04 09:09:10
Modified files:
C4 : Bull.pm
koha-tmpl/intranet-tmpl/default/en/bull: full-serial-issues.tmpl
Log message:
Bug Fixing : tab browsing in full-serial-issues.tmpl wouldnot display
things.
The problem was obvious when No publisheddate was provided. It
generated Many null div ids. And thus would display Nothing.
------------------------
Be warned that Now, full-serial-issues are based on publication year
more than receivedate.
So This can be a problem for old database which have no publisheddate
up to date.
Should work in any case now though.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Bull.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.6.2.27&r2=1.6.2.28
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.2&r2=1.1.2.3
Patches:
Index: C4/Bull.pm
===================================================================
RCS file: /sources/koha/koha/C4/Attic/Bull.pm,v
retrieving revision 1.6.2.27
retrieving revision 1.6.2.28
diff -u -b -r1.6.2.27 -r1.6.2.28
--- C4/Bull.pm 1 Aug 2006 16:18:45 -0000 1.6.2.27
+++ C4/Bull.pm 4 Aug 2006 09:09:10 -0000 1.6.2.28
@@ -218,6 +218,7 @@
ORDER BY
year,serial.publisheddate,serial.subscriptionid,serial.planneddate');
$sth->execute($biblionumber);
my @res;
+ my %tmpresults;
my $year;
my $startdate;
my $aqbooksellername;
@@ -227,34 +228,35 @@
my $previousnote="";
while (my $subs = $sth->fetchrow_hashref) {
### BUG To FIX: When there is no published date, will create many null ids!!!
-
- if ($year and ($year==$subs->{year})){
- if ($first eq 1){$first=0;}
- my $temp=$res[scalar(@res)-1]->{'serials'};
+ if ($subs->{'year'} && $subs->{'year'} ne ""){
+ $year=$subs->{'year'};
+ } else {
+ $year="1900"
+ }
+ if ($tmpresults{$year}){
+ my $temp=$tmpresults{$year}->{'serials'};
push @$temp,
- {'publisheddate' =>format_date($subs->{'publisheddate'}),
+ {'publisheddate'
=>($subs->{'publisheddate'}?format_date($subs->{'publisheddate'}):"XXX"),
'planneddate' => format_date($subs->{'planneddate'}),
'serialseq' => $subs->{'serialseq'},
"status".$subs->{'status'} => 1,
'notes' => $subs->{'notes'} eq $previousnote?"":$subs->{notes},
};
}else {
- $first=1 if (not $year);
- $year= $subs->{'year'};
$startdate= format_date($subs->{'startdate'});
$aqbooksellername= $subs->{'aqbooksellername'};
$bibliotitle= $subs->{'bibliotitle'};
my @temp;
push @temp,
- {'publisheddate'
=>format_date($subs->{'publisheddate'}),
+ {'publisheddate'
=>($subs->{'publisheddate'}?format_date($subs->{'publisheddate'}):"XXX"),
'planneddate' => format_date($subs->{'planneddate'}),
'serialseq' => $subs->{'serialseq'},
"status".$subs->{'status'} => 1,
'notes' => $subs->{'notes'} eq
$previousnote?"":$subs->{notes},
};
-
- push @res,{
+ $tmpresults{$year}={
'year'=>$year,
+ 'nodate'=>($year eq "1900"),
'startdate'=>$startdate,
'aqbooksellername'=>$aqbooksellername,
'bibliotitle'=>$bibliotitle,
@@ -264,6 +266,9 @@
}
$previousnote=$subs->{notes};
}
+ foreach my $key (keys %tmpresults){
+ push @res,$tmpresults{$key};
+ }
return address@hidden;
}
@@ -366,7 +371,7 @@
my $dbh = C4::Context->dbh;
# OK, now add the last 5 issues arrives/missing
my $sth=$dbh->prepare("
- SELECT serialid,serialseq, status, publisheddate,planneddate,notes
+ SELECT serialid, serialseq, status, publisheddate, planneddate, notes
FROM serial
WHERE subscriptionid = ? AND (status IN (2,4,5))
ORDER BY serialid DESC");
Index: koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl 27 Jul
2006 09:00:40 -0000 1.1.2.2
+++ koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl 4 Aug
2006 09:09:10 -0000 1.1.2.3
@@ -4,17 +4,20 @@
<!-- TMPL_UNLESS name="popup" -->
<h1 class="bull">Subscription information for biblio #<!-- TMPL_VAR
NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
<p>
- <a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->"
class="button bull">Back to biblio</a>
+ <a href="/cgi-bin/koha/bull-home.pl?biblionumber=<!-- TMPL_VAR
name="biblionumber" -->" class="button bull">Back to subscriptions</a>
+ <a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR
name="biblionumber" -->" class="button bull">Back to biblio</a>
<!-- /TMPL_UNLESS -->
<!-- TMPL_LOOP NAME="years" -->
- <!-- TMPL_IF NAME="year" -->
+ <!-- TMPL_IF NAME="Nodate" -->
+ <a class="button bull"
href="javascript:active(1900)">No Publication Date</a>
+ <!-- TMPL_ELSE-->
<a class="button bull" href="javascript:active(<!--
TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<a class=" button bull" href="serial-issues.pl?biblionumber=<!--
TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
</p>
<!-- TMPL_LOOP NAME="years" -->
- <div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year"
-->" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;"
<!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
+ <div name="yeardata" id="<!-- TMPL_VAR NAME="year" -->"
style="position:absolute; visibility:hidden; margin-top:0px; border:4px;"
<!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
<table>
<tr>
<th class="bull">Information
@@ -57,13 +60,13 @@
active(<!-- TMPL_VAR name="yearmin" -->);
function active(numlayer)
{
- for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR
Name="yearmax"-->; i++ ) {
- ong = i;
- link = "link"+i;
- if (numlayer==i) {
- document.getElementById(ong).style.visibility="visible";
+ var yeardata=document.getElementsByName("yeardata");
+ for (i=0; i<=yeardata.length; i++ ) {
+ ong=yeardata[i].getAttribute('id');
+ if (numlayer==ong) {
+ yeardata[i].style.visibility="visible";
} else {
- document.getElementById(ong).style.visibility="hidden";
+ yeardata[i].style.visibility="hidden";
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha C4/Bull.pm koha-tmpl/intranet-tmpl/default... [rel_2_2],
Henri-Damien LAURENT <=