Bug 18419 - Broken patron-blank image in viewlog.tt

Because of a variable name collision the blank patron image doesn't
display in viewlog.tt. This patch moves the image from the template to
the stylesheet to avoid this problem.

This patch also replaces the blank patron image PNG file with an SVG
file. SVG support is wide enough to begin using whereever possible.

This patch also removes some inline CSS from circ-menu.inc and puts it
in the global stylesheet.

To test, apply the patch and clear your browser cache if necessary.

- Enable the patronimages system preference.
- View a patron account which lacks a patron image. All views (details,
  fines, notices, etc) should show the "blank" patron image, including
  the modification log view.
- View a patron account which has a patron image and check that it still
  displays correctly in all views.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dddd2691e7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Owen Leonard 2017-04-25 16:16:49 +00:00 committed by Katrin Fischer
parent c8adec8e46
commit 609c270088
4 changed files with 25 additions and 2 deletions

View File

@ -489,6 +489,24 @@ div.patroninfo ul li {
list-style-type : none;
}
#patronbasics div {
background: transparent url("../img/patron-blank.min.svg") 10px 5px no-repeat;
border: 1px solid #CCCCCC;
height: 125px;
margin: .3em 0 .3em .3em;
padding: 0;
width: 105px;
}
#patronimage {
border: 1px solid #CCCCCC;
max-width : 140px;
margin: .3em 0 .3em .3em;
padding: .2em;
width:auto !important;
width:130px;
}
div.patronviews {
border-right : 1px solid #000;
border-top : 1px solid #000;

View File

@ -8,9 +8,13 @@
<ul class="patronbriefinfo">
[% IF ( patronimages ) %]
[% IF ( picture ) %]
<li><img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% borrowernumber | uri %]" id="patronimage" alt="[% firstname | html %] [% surname | html %] ([% cardnumber | html %])" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
<li>
<img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% borrowernumber | uri %]" id="patronimage" alt="[% firstname | html %] [% surname | html %] ([% cardnumber | html %])" />
</li>
[% ELSE %]
<li id="patronbasics"><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% firstname | html %] [% surname | html %] ([% cardnumber | html %])" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
<li id="patronbasics">
<div></div>
</li>
[% END %]
[% END %]
[% IF Koha.Preference( 'AddressFormat' ) %]

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="85.187" height="125" display="block"><circle cx="42.593" cy="22.925" r="22.925" fill="#ccc" style="vector-effect:none"/><path fill="#ccc" d="M27.3 47.78C12.3 47.78.2 59.28 0 73.6V125h85.2V73.6h-.02c-.2-14.33-12.3-25.82-27.3-25.82z" style="vector-effect:none"/><path d="M36.76 105.66c-.12-2.64 2.94-4.65 5.32-3.53 2.6.96 3.18 4.83.96 6.5-1.97 1.73-5.44.7-6.12-1.84-.1-.36-.18-.8-.16-1.14zM40.9 65c3.56-.03 7.7 1.07 9.52 4.44 1.72 3.12 1.04 7.1-1.12 9.83-2.03 2.8-4.97 5.18-5.57 8.77-.57 2.7-.54 5.5-.57 8.24-1.75 0-3.5 0-5.26 0 .06-5.14.24-10.78 3.5-15.06 1.6-2.18 3.74-4.25 4.2-7.03.3-2.45-2.2-4.05-4.37-4.16-3.02-.35-6.1.97-8.12 3.2-.42-1.7-.84-3.4-1.27-5.1 2.42-2.2 5.98-3.04 9.07-3.14z"/></svg>

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB