Bug 2093

Summary: Add OPAC dashboard for logged-in users
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact:
Severity: new feature    
Priority: P3 CC: aleisha, fridolin.somers, hagud, jonathan.druart, jschmidt, katrin.fischer, kyle, ldjamison, nick, oleonard, sally.healey, veron, viktor.sarge
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17153
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Add a summary to the OPAC once the user has logged in that shows the users number of checkouts, overdues, holds pending, holds waiting and total fines. It can be turned on with the new system preference OPACUserSummary.
Version(s) released in:
Bug Depends on:    
Bug Blocks: 20068    
Attachments: Mockup of the OPAC dashboard idea
Bug 2093: Add OPAC Summary for logged-in users
Bug 2093 [Follow-up] Add OPAC dashboard for logged-in users
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
Bug 2093: [FOLLOW-UP] Add OPAC dashboard for logged-in users
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
Bug 2093: Add OPAC Summary for logged-in users
Bug 2093 [Follow-up] Add OPAC dashboard for logged-in users
Bug 2093: [FOLLOW-UP] Add OPAC dashboard for logged-in users
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
View of the OPAC dashboard

Description Chris Cormack 2010-05-21 00:46:29 UTC


---- Reported by oleonard@myacpl.org 2008-05-08 08:18:53 ----

The home page of the OPAC has a login form which disappears when the user has logged in. Why not replace it with a brief summary of information for the user: number of checkouts, overdues, holds, waiting, and fines.



---- Additional Comments From oleonard@myacpl.org 2008-05-08 08:19:36 ----

Created an attachment
Mockup of the OPAC dashboard idea





---- Additional Comments From nengard@gmail.com 2009-08-25 16:42:29 ----

I love this!!! I say go for it ;)



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:46 UTC  ---

This bug was previously known as _bug_ 2093 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2093
Imported an attachment (id=501)

Actual time not defined. Setting to 0.0
The original submitter of attachment 501 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Katrin Fischer 2013-04-13 18:25:03 UTC
Still a nice idea, should probably be controlled by a system preference.
Comment 2 Viktor Sarge 2016-12-28 11:20:35 UTC
When logging in the user is (at time of writing) taken to opac-user.pl so the user would have to manually click "Home" to see it which sort of defeats the purpose in my view. I do however noticed that not all users understand that they are supposed to click their name to view their account when they are logged in so it might still have some merit as a way to increase visibility. 

Loggin in proved to be problematic - every time you click "log in to add tags" or "log in to your account to post a comment" or just log in from a search result/detail page you lose the view you were at and have to manually go find the book again. Very frustrating. If it were possible to log in while remaining on the current page the suggested feature of this current bug would be quite useful.
Comment 3 Aleisha Amohia 2017-04-26 05:23:37 UTC
Created attachment 62704 [details] [review]
Bug 2093: Add OPAC Summary for logged-in users

This patch adds a summary to the OPAC once the user has logged in that
shows the users number of checkouts, overdues, holds pending, holds
waiting and total fines. We also have a syspref OPACUserSummary to turn
this feature on and off. Default is ON.

To test:
1) Apply patch and update database
2) Set up some checkouts, overdues, holds pending AND waiting and fines
for a user
3) Log into OPAC as that user, see summary. Confirm links all work as
expected
4) Confirm that if there are no checkouts / overdues etc that the link
disappears from the summary
5) Turn OPACUserSummary OFF and confirm the summary does not show on the
mainpage.

Sponsored-by: Catalyst IT
Comment 4 Katrin Fischer 2017-05-01 14:20:54 UTC
Hi Aleisha,

I have tested this a bit and only some small comments:

- Welcome, <name> always displays, even if there is no other information to be displayed below. I think I'd either not display it, if there is no more information to show or show the other entries with 0/no
- 5.00 due = To make it a little easier to translate, I suggest to change it a bit, maybe 5.00 due in fines and charges (if that is English...). Single small words with multiple meanings are often hard to translate right. Making it more specific would help.

Adding Owen for ideas on the styling!
Comment 5 Owen Leonard 2017-05-02 16:10:53 UTC
Created attachment 62982 [details] [review]
Bug 2093 [Follow-up] Add OPAC dashboard for logged-in users

This patch adds some additional markup for applying styles to and the
corresponding CSS.

Also modified: Links to opac-user.pl should now open the correct tab.

To test, apply the patch and compile the modified LESS file. Clear your
browser cache if necessary. Follow the original test plan and confirm
that the revised links work correctly.
Comment 6 Owen Leonard 2017-05-02 16:10:58 UTC
Created attachment 62983 [details] [review]
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users

This patch contains the CSS file compiled from LESS.
Comment 7 Owen Leonard 2017-05-02 16:13:24 UTC
I hope the style patches are agreeable. I think cait is correct in both her comments above.
Comment 8 Katrin Fischer 2017-05-02 18:16:13 UTC
Thx Owen, I think it looks pretty good that way!
Aleihsa, could you take a look at my comment#4? Ready to sign once those are resolved!
Comment 9 Aleisha Amohia 2017-08-02 23:28:36 UTC
Created attachment 65438 [details] [review]
Bug 2093: [FOLLOW-UP] Add OPAC dashboard for logged-in users

This patch:
- hides the dashboard if there is no dashboard information to display
- changes '5.00 due' to '5.00 due in fines and charges' for translation
- uses Koha::Holds in place of deprecated C4::Reserves methods

To test, confirm all the right information for holds still shows, and
confirm the dashboard is hidden if there are no checkouts, holds, fines
or overdues.
Comment 10 Katrin Fischer 2017-08-08 12:52:31 UTC
Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 2093: Add OPAC Summary for logged-in users
Applying: Bug 2093 [Follow-up] Add OPAC dashboard for logged-in users
Applying: Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/css/opac.css
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac.css
error: Failed to merge in the changes.
Patch failed at 0001 Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-2093-Compiled-CSS-Add-OPAC-dashboard-for-logge-v0S97a.patch

Can you please recompile the CSS?
Comment 11 Aleisha Amohia 2017-08-20 21:47:47 UTC
Created attachment 66245 [details] [review]
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users

This patch contains the CSS file compiled from LESS.
Comment 12 Aleisha Amohia 2017-08-20 22:10:15 UTC
patches apply without conflicts, ready to test
Comment 13 Hugo Agud 2017-08-22 08:38:43 UTC
patch tested and it works fine!

but test fail

Test Summary Report
-------------------
t/Creators.t                      (Wstat: 6400 Tests: 39 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 41 tests but ran 39.
Files=98, Tests=7437, 238 wallclock secs ( 1.18 usr  0.18 sys + 217.40 cusr  4.47 csys = 223.23 CPU)
Result: FAIL
Comment 14 Aleisha Amohia 2017-08-23 23:11:11 UTC
(In reply to Hugo Agud from comment #13)
> patch tested and it works fine!
> 
> but test fail
> 
> Test Summary Report
> -------------------
> t/Creators.t                      (Wstat: 6400 Tests: 39 Failed: 0)
>   Non-zero exit status: 25
>   Parse errors: Bad plan.  You planned 41 tests but ran 39.
> Files=98, Tests=7437, 238 wallclock secs ( 1.18 usr  0.18 sys + 217.40 cusr 
> 4.47 csys = 223.23 CPU)
> Result: FAIL

Hi Hugo

all tests pass before and after this patch for me. 

aleisha
Comment 15 Hugo Agud 2017-08-24 08:10:24 UTC
Hi

I have created  new machine and apply the patch, and you're right prove t and prove xt passed fine
Comment 16 Nick Clemens 2017-10-26 10:11:52 UTC
Created attachment 68583 [details] [review]
Bug 2093: Add OPAC Summary for logged-in users

This patch adds a summary to the OPAC once the user has logged in that
shows the users number of checkouts, overdues, holds pending, holds
waiting and total fines. We also have a syspref OPACUserSummary to turn
this feature on and off. Default is ON.

To test:
1) Apply patch and update database
2) Set up some checkouts, overdues, holds pending AND waiting and fines
for a user
3) Log into OPAC as that user, see summary. Confirm links all work as
expected
4) Confirm that if there are no checkouts / overdues etc that the link
disappears from the summary
5) Turn OPACUserSummary OFF and confirm the summary does not show on the
mainpage.

Sponsored-by: Catalyst IT

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 17 Nick Clemens 2017-10-26 10:11:55 UTC
Created attachment 68584 [details] [review]
Bug 2093 [Follow-up] Add OPAC dashboard for logged-in users

This patch adds some additional markup for applying styles to and the
corresponding CSS.

Also modified: Links to opac-user.pl should now open the correct tab.

To test, apply the patch and compile the modified LESS file. Clear your
browser cache if necessary. Follow the original test plan and confirm
that the revised links work correctly.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 18 Nick Clemens 2017-10-26 10:11:59 UTC
Created attachment 68585 [details] [review]
Bug 2093: [FOLLOW-UP] Add OPAC dashboard for logged-in users

This patch:
- hides the dashboard if there is no dashboard information to display
- changes '5.00 due' to '5.00 due in fines and charges' for translation
- uses Koha::Holds in place of deprecated C4::Reserves methods

To test, confirm all the right information for holds still shows, and
confirm the dashboard is hidden if there are no checkouts, holds, fines
or overdues.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 19 Nick Clemens 2017-10-26 10:12:02 UTC
Created attachment 68586 [details] [review]
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users

This patch contains the CSS file compiled from LESS.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 20 Nick Clemens 2017-10-26 10:13:25 UTC
So cool!

Feature defaults to on, but I think this is okay, added Hugo's SO to patches.
Comment 21 Jonathan Druart 2017-10-27 16:05:55 UTC
Created attachment 68764 [details] [review]
Bug 2093 [Compiled CSS] Add OPAC dashboard for logged-in users

This patch contains the CSS file compiled from LESS.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

RM note: opac.css regenerated before push:
lessc --clean-css="--s0 --advanced --compatibility=ie7" bootstrap/less/opac.less > bootstrap/css/opac.css
Comment 22 Jonathan Druart 2017-10-27 16:09:30 UTC
Created attachment 68765 [details]
View of the OPAC dashboard
Comment 23 Jonathan Druart 2017-10-27 17:18:28 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 24 Fridolin Somers 2018-02-08 09:46:28 UTC
new feature not pushed to 17.05.x