Changeset 6742


Ignore:
Timestamp:
Feb 17, 2015, 3:46:59 PM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1325: Lists of items (similar funcion as biomaterial lists)

Started with GUI for working with item lists. Current functionality is limited and only includes listing, creating/editing and viewing the "ItemList" item. It is not possible to add/view members to the list, merge lists or use the lists for filtering.

Location:
trunk
Files:
8 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/resources/menu.properties

    r5877 r6742  
    6767allitems.title  All items
    6868allitems.tooltip  View all items that you are the owner of
     69itemlists.title Item lists
     70itemlists.tooltip.1 Manage item lists
     71itemlists.tooltip.0 You do not have permission to manage item lists
    6972trashcan.title  Trashcan
    7073trashcan.tooltip  View all items that have been marked for deletion
  • trunk/src/core/net/sf/basedb/core/Metadata.java

    r6468 r6742  
    6969  private static Set<Item> fileStoreEnabledItems;
    7070  private static Set<Item> subtypableItems;
     71  private static Set<Item> listableItems;
    7172
    7273  private static boolean isInitialised = false;
     
    8283    fileStoreEnabledItems = Collections.unmodifiableSet(getImplementingItems(FileStoreEnabled.class));
    8384    subtypableItems = Collections.unmodifiableSet(getImplementingItems(Subtypable.class));
     85    listableItems = Collections.unmodifiableSet(getImplementingItems(Listable.class));
    8486    isInitialised = true;
    8587  }
     
    98100    fileStoreEnabledItems = null;
    99101    subtypableItems = null;
     102    listableItems = null;
    100103  }
    101104
     
    182185  }
    183186
     187  /**
     188    Get a set containing all {@link Listable} item types.
     189    The set cannot be modified.
     190    @since 3.5
     191  */
     192  public static Set<Item> getListableItems()
     193  {
     194    return listableItems;
     195  }
    184196 
    185197  /**
  • trunk/www/include/menu.jsp

    r6652 r6742  
    472472
    473473    // Permission settings
     474    final boolean hasItemLists          = !sc.hasPermission(Permission.DENIED, Item.ITEMLIST);
    474475    final boolean hasFiles              = !sc.hasPermission(Permission.DENIED, Item.FILE);
    475476    final boolean createFiles           =  sc.hasPermission(Permission.CREATE, Item.FILE);
     
    512513        tooltip="<%=menu.getString("allitems.tooltip")%>"
    513514        url="<%=root+"views/items/index.jsp?ID="+ID%>"
     515      />
     516      <m:menuitem
     517        title="<%=menu.getString("itemlists.title")%>"
     518        tooltip="<%=menu.getString("itemlists.tooltip", hasItemLists)%>"
     519        url="<%=root+"views/itemlists/index.jsp?ID="+ID%>"
     520        enabled="<%=hasItemLists%>"
    514521      />
    515522      <m:menuitem
  • trunk/www/include/scripts/main-2.js

    r6723 r6742  
    19691969    controllers['HARDWARE'] = { url:'admin/hardware/index.jsp', width:800, height:500 };
    19701970    controllers['HELP'] = { url:'admin/clients/help/index.jsp', width:600, height:400, noAnyToAny:true };
     1971    controllers['ITEMLIST'] = { url:'views/itemlists/index.jsp', width:750, height:500 };
    19711972    controllers['ITEMSUBTYPE'] = { url:'admin/itemsubtypes/index.jsp', width:690, height:460 };
    19721973    controllers['JOB'] = { url:'views/jobs/index.jsp', width:750, height:500, popup:true, edit:false };
Note: See TracChangeset for help on using the changeset viewer.