[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha bookshelves/shelves.pl koha-tmpl/intranet-... [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha bookshelves/shelves.pl koha-tmpl/intranet-... [rel_3_0] |
Date: |
Mon, 05 Feb 2007 15:54:30 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 07/02/05 15:54:30
Modified files:
bookshelves : shelves.pl
koha-tmpl/intranet-tmpl/prog/en/bookshelves: shelves.tmpl
Log message:
don't display "remove selected shelves" if the user logged has no shelf.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/shelves.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.9.2.8&r2=1.9.2.9
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.13&r2=1.1.2.14
Patches:
Index: bookshelves/shelves.pl
===================================================================
RCS file: /sources/koha/koha/bookshelves/shelves.pl,v
retrieving revision 1.9.2.8
retrieving revision 1.9.2.9
diff -u -b -r1.9.2.8 -r1.9.2.9
--- bookshelves/shelves.pl 15 Dec 2006 17:36:57 -0000 1.9.2.8
+++ bookshelves/shelves.pl 5 Feb 2007 15:54:30 -0000 1.9.2.9
@@ -198,6 +198,8 @@
my $color = '';
my @shelvesloop;
+my $numberCanManage = 0;
+
foreach my $element ( sort keys %$shelflist ) {
my %line;
( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
@@ -207,22 +209,20 @@
$line{ "category" . $shelflist->{$element}->{'category'} } = 1;
$line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq
$loggedinuser;
$line{'shelfbookcount'} = $shelflist->{$element}->{'count'};
- $line{'canmanage'} =
- ShelfPossibleAction( $loggedinuser, $element, 'manage' );
+ $line{'canmanage'} = ShelfPossibleAction( $loggedinuser, $element,
'manage' );
$line{'firstname'} = $shelflist->{$element}->{'firstname'}
unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
$line{'surname'} = $shelflist->{$element}->{'surname'}
unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+
+ $numberCanManage++ if $line{'canmanage'};
+
push( @shelvesloop, \%line );
- }
+}
$template->param(
shelvesloop => address@hidden,
- intranetcolorstylesheet =>
- C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet => C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
- "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
+ numberCanManage => $numberCanManage,
);
output_html_with_http_headers $query, $cookie, $template->output;
@@ -281,6 +281,9 @@
#
# $Log: shelves.pl,v $
+# Revision 1.9.2.9 2007/02/05 15:54:30 toins
+# don't display "remove selected shelves" if the user logged has no shelf.
+#
# Revision 1.9.2.8 2006/12/15 17:36:57 toins
# - some change on the html param.
# - Writing directly the code of a sub called only once.
Index: koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -b -r1.1.2.13 -r1.1.2.14
--- koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl 5 Feb 2007
14:54:51 -0000 1.1.2.13
+++ koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl 5 Feb 2007
15:54:30 -0000 1.1.2.14
@@ -131,6 +131,7 @@
<p><input type="submit" value="Add New
Shelf"></p>
</form>
+ <!-- TMPL_IF NAME="numberCanManage" -->
<!-- TMPL_IF NAME="shelvesloop" -->
<form method="post" action="/cgi-bin/koha/bookshelves/shelves.pl"
name="mainform">
<input type="hidden" name="shelves" value="1" />
@@ -140,12 +141,23 @@
<!-- TMPL_LOOP Name="shelvesloop" -->
<!-- TMPL_IF name="canmanage" -->
<tr>
- <td><input type="checkbox" name="DEL-<!-- TMPL_VAR
Name="shelf" -->" /></td><td><a
href="/cgi-bin/koha/bookshelves/shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf"
-->"><!-- TMPL_VAR Name="shelfname" --></a></td><td><!-- TMPL_VAR
Name="shelfbookcount" --> item(s)</td></tr>
+ <td>
+ <input type="checkbox" name="DEL-<!-- TMPL_VAR
Name="shelf" -->" />
+ </td>
+ <td>
+ <a
href="/cgi-bin/koha/bookshelves/shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf"
-->"><!-- TMPL_VAR Name="shelfname" --></a>
+ </td>
+ <td>
+ <!-- TMPL_VAR Name="shelfbookcount" --> item(s)
+ </td>
+ </tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</table>
<input type="submit" value="Delete Shelves" /></form>
<!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
+ <br />
<p><form class="inline" action="/cgi-bin/koha/bookshelves/shelves.pl"
method="get"><input type="submit" value="Back to Virtual Shelves" /></form></p>
<!-- TMPL_ELSE -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha bookshelves/shelves.pl koha-tmpl/intranet-... [rel_3_0],
Antoine Farnault <=