Bug 5593

Summary: Change cart markup to allow for easier icon styling
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: PATCH-Sent (DO NOT USE) CC: chris, julian.maurice, magnus, nengard
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Proposed change
signed-off patch

Description Owen Leonard 2011-01-07 16:54:16 UTC
If we replace the inline image in the cart to a span with an ID it should make it easier for libraries to change the icon.
Comment 1 Nicole C. Engard 2011-01-07 16:57:59 UTC
Shouldn't we do the same for Lists?
Comment 2 Owen Leonard 2011-01-07 17:05:31 UTC
> Shouldn't we do the same for Lists?

This patch arises as a result of my work trying to get Bug 3719 working ("Create syspref to allow sites to rename OPAC Cart") so it seeks to address that specific case.

Do you hear requests to similarly change the style of the Lists button?
Comment 3 Nicole C. Engard 2011-01-07 17:09:28 UTC
I have not as of yet, but that said, if you're touching that code it seems like it would make sense to just make both buttons customizable.
Comment 4 Owen Leonard 2011-01-07 17:26:10 UTC
Created attachment 2966 [details] [review]
Proposed change

Replacing inline cart image with a span with a unique ID. Adding
styling to the deafult CSS to give that span a background of the
same cart image as before. Custom CSS can override this with a
different image.

Example for OPACUserCSS preference:

#cartmenulink span#carticon { 
 background-image : url("/opac-tmpl/prog/famfamfam/silk/basket.png");
 width:16px;
 height:16px;
}
Comment 5 MJ Ray (software.coop) 2011-02-04 09:13:33 UTC
This bug is mentioned in:
Fix for Bug 5593,	Change cart markup to allow for easier icon styling http://lists.koha-community.org/pipermail/koha-patches/2011-January/013553.html
Comment 6 Katrin Fischer 2011-03-18 22:41:48 UTC
Created attachment 3355 [details] [review]
signed-off patch
Comment 7 Chris Cormack 2011-04-05 03:05:25 UTC
Pushed, please test