Changeset 5965


Ignore:
Timestamp:
Feb 16, 2012, 8:53:25 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1655: GUI improvements

Display item type in a smaller+grayer font.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/annotations/inherit.jsp

    r5957 r5965  
    2828  @version 2.0
    2929--%>
     30<%@page import="net.sf.basedb.core.Subtypable"%>
    3031<%@ page pageEncoding="UTF-8" session="false"
    3132  import="net.sf.basedb.core.SessionControl"
     
    4243  import="net.sf.basedb.core.DerivedBioAssay"
    4344  import="net.sf.basedb.core.Extract"
     45  import="net.sf.basedb.core.ItemSubtype"
    4446  import="net.sf.basedb.core.ItemQuery"
    4547  import="net.sf.basedb.core.Include"
     
    116118  {
    117119    Annotatable item = null;
     120    String itemType = as.getItemType().toString();
    118121    try
    119122    {
     
    122125    catch (PermissionDeniedException ex)
    123126    {}
     127    if (item instanceof Subtypable)
     128    {
     129      try
     130      {
     131        ItemSubtype subtype = ((Subtypable)item).getItemSubtype();
     132        if (subtype != null) itemType = subtype.getName();
     133      }
     134      catch (PermissionDeniedException ex)
     135      {}
     136    }
    124137   
    125138    String icon = nonParents.contains(as) ? nonParentIcon : itemIcon;
     
    133146      ">";
    134147    String name = item == null ? "<i>- denied -</i>" :
    135       HTML.javaScriptEncode(((Nameable)item).getName()) + " (" + item.getType() + ")";
     148      HTML.javaScriptEncode(((Nameable)item).getName()) + " <span class=\"itemsubtype\">(" + itemType + ")</span>";
    136149    sb.append("var item").append(as.getId());
    137150    sb.append(" = JoustMenu.addMenuItem(-1");
Note: See TracChangeset for help on using the changeset viewer.