Bugzilla – Attachment 108521 Details for
Bug 25430
Improve the styling of the claims returned tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25430: Use label-default for 0
Bug-25430-Use-label-default-for-0.patch (text/plain), 8.46 KB, created by
Jonathan Druart
on 2020-08-18 14:44:48 UTC
(
hide
)
Description:
Bug 25430: Use label-default for 0
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-18 14:44:48 UTC
Size:
8.46 KB
patch
obsolete
>From a0f7d1ce7a2514000b2fef712322389f85e44a18 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 18 Aug 2020 16:44:34 +0200 >Subject: [PATCH] Bug 25430: Use label-default for 0 > >--- > .../prog/en/modules/circ/circulation.tt | 16 +++++++++++---- > .../prog/en/modules/members/moremember.tt | 17 ++++++++++++---- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 20 +++++++++++++++++-- > 3 files changed, 43 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 5172a2435d..0a0462168e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -874,14 +874,22 @@ > [% IF ( patron.return_claims.count ) %] > <a href="#return-claims" id="return-claims-tab"> > Claim(s) >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% IF patron.return_claims.resolved.count == 0 %] >+ <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% END %] >+ [% IF patron.return_claims.unresolved.count == 0 %] >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% END %] > </a> > [% ELSE %] > <a href="#return-claims" id="return-claims-tab"> > Claim(s) >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">0</span> >- <span title="Unresolved claims" class="label label-success" id="return-claims-count-unresolved">0</span> >+ <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span> >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span> > </a> > [% END %] > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 20a4b991e4..38ab8d2562 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -764,14 +764,23 @@ > [% IF ( patron.return_claims.count ) %] > <a href="#return-claims" id="return-claims-tab"> > Claim(s) >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% IF patron.return_claims.resolved.count == 0 %] >+ <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% END %] >+ [% IF patron.return_claims.unresolved.count == 0 %] >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% END %] >+ > </a> > [% ELSE %] > <a href="#return-claims" id="return-claims-tab"> > Claim(s) >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">0</span> >- <span title="Unresolved claims" class="label label-success" id="return-claims-count-unresolved">0</span> >+ <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span> >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span> > </a> > [% END %] > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 41c3562a67..31589a396d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -985,8 +985,24 @@ $(document).ready(function() { > let resolved = json.resolved; > let unresolved = json.unresolved; > >- $('#return-claims-count-resolved').text(resolved); >- $('#return-claims-count-unresolved').text(unresolved); >+ if ( resolved > 0 ) { >+ $('#return-claims-count-resolved').text(resolved) >+ .removeClass('label-default') >+ .addClass('label-success'); >+ } else { >+ $('#return-claims-count-resolved').text(resolved) >+ .removeClass('label-success') >+ .addClass('label-default'); >+ } >+ if ( unresolved > 0 ) { >+ $('#return-claims-count-unresolved').text(unresolved) >+ .removeClass('label-default') >+ .addClass('label-warning'); >+ } else { >+ $('#return-claims-count-unresolved').text(unresolved) >+ .removeClass('label-warning') >+ .addClass('label-default'); >+ } > > fnCallback(json) > } ); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25430
:
104608
|
106211
|
108350
|
108521
|
108629