The intranet shelves page lists the itemtype twice if no icon is shown. (The alternate text is repeated by the same type description.) Patch with simple template change forthcoming.
Patch also fills noItemTypeImages for the template; it was not initialized in the script. Test this patch by double clicking a list name in Staff client/Lists. Before this patch you see a double item type description in the table. After this patch, depending on the value of pref noItemTypeImages you will see either an icon or a single description. (Check it by toggling that value. Note that you may have to add icons to your itemtypes in Administration.)
Created attachment 6445 [details] [review] Patch
I'm assuming item-level itemtypes must be disabled in order for this bug to manifest? I can see three situations where one might see a broken itemtype image (with item-level itemtypes disabled): 1. The title has no biblio-level itemtype set. 2. The itemtype is set but it has no image specified. 3. The itemtype has a remote image specified and the remote image doesn't exist. 1 & 2 can be solved by wrapping the <img> tag in a check for imageurl 3 might be solved by this patch but I think it's a rare enough case that we shouldn't implement the fix proposed here because it removes the output of the description along with the image. As far as I know that is the intention of the way the templates have been set up here and elsewhere. To change that I think we need a wider discussion.
Owen, It solved your second case. Furthermore it was built on the assumption that you do not need the text if the image is displayed. But you do? To resolve, I will revise with a check on url.
(In reply to comment #4) > Furthermore it was built on the assumption that you do not need the text if the > image is displayed. But you do? In this case and in other places in the templates it is designed so that image and text will appear together. Whether or not this *should* be the way it is done could be the subject of a mailing list discussion, but for now I think we should keep things consistent.
Created attachment 6446 [details] [review] Revised patch Adds check on imageurl. If icon is shown, description shown again too.
The noItemTypeImages variable is already filled in Auth.pm.
Created attachment 6473 [details] [review] Revised patch Finally, a very tiny patch remained here.. ;)
Created attachment 6474 [details] [review] Revised patch And even then attaching the wrong file ;)
Created attachment 6485 [details] [review] Bug 7270: Removing double itemtype on shelve contents page when no icon is shown Just adding a check on imageurl in the template. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
QA comment : small (1 line) patch, nothing more to say (comment 1 and 3 usefull to understand test cases) Patch pushed, please test