Changeset 5064


Ignore:
Timestamp:
Aug 19, 2009, 2:09:14 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Added "Change history" tab to hyb, scan and raw bioassay pages
  • Added special logger for scan images
Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/data/ImageData.java

    r4889 r5064  
    3636public class ImageData
    3737  extends BasicData
    38   implements NameableData, RemovableData, FileAttachableData
     38  implements NameableData, RemovableData, FileAttachableData, LoggableData
    3939{
    4040  public ImageData()
  • trunk/src/core/net/sf/basedb/core/log/db/DbLogManagerFactory.java

    r5063 r5064  
    3030import net.sf.basedb.core.data.BioMaterialEventData;
    3131import net.sf.basedb.core.data.FileSetMemberData;
     32import net.sf.basedb.core.data.ImageData;
    3233import net.sf.basedb.core.data.LoggableData;
    3334import net.sf.basedb.core.data.PlateEventData;
     
    6263    setSpecialLogger(FileSetMemberData.class, new FileSetMemberLogger());
    6364    setSpecialLogger(PlateEventData.class, new PlateEventLogger(detailedProperties));
     65    setSpecialLogger(ImageData.class, new ImageLogger(detailedProperties));
    6466  }
    6567
  • trunk/www/views/hybridizations/view_hybridization.jsp

    r5045 r5064  
    5656  import="net.sf.basedb.core.query.Hql"
    5757  import="net.sf.basedb.clients.web.Base"
     58  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5859  import="net.sf.basedb.clients.web.PermissionUtil"
    5960  import="net.sf.basedb.clients.web.util.HTML"
     
    158159    {
    159160      if (TabControl.isActive(tabControlId, tabId)) return;
    160       if (tabId == 'overview' && tabId != '<%=tab%>')
     161      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    161162      {
    162163        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    597598        %>
    598599      </t:tab>
     600      <t:tab id="history" title="Change history"
     601        tooltip="Displays a log of all modifications made to this item"
     602        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     603        <%
     604        if ("history".equals(tab))
     605        {
     606          %>
     607          <jsp:include page="../../common/history/frameset.jsp">
     608            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     609            <jsp:param name="source_id" value="<%=itemId%>" />
     610            <jsp:param name="ID" value="<%=ID%>" />
     611          </jsp:include>
     612          <%
     613        }
     614        %>
     615      </t:tab>
    599616      </t:tabcontrol>
    600617
  • trunk/www/views/rawbioassays/rawdata/list_rawdata.jsp

    r5028 r5064  
    5959  import="net.sf.basedb.clients.web.Base"
    6060  import="net.sf.basedb.clients.web.ModeInfo"
     61  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    6162  import="net.sf.basedb.clients.web.util.HTML"
    6263  import="net.sf.basedb.util.Values"
     
    177178    function switchTab(tabControlId, tabId)
    178179    {
    179       if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview')
     180      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview' || tabId == 'history')
    180181      {
    181182        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=rawBioAssayId%>&tab='+tabId;
     
    911912    <t:tab id="overview" title="Overview"
    912913      tooltip="Display a tree overview of related items" />
     914    <t:tab id="history" title="Change history"
     915        tooltip="Displays a log of all modifications made to this item"
     916        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    913917    </t:tabcontrol>
    914918  </base:body>
  • trunk/www/views/rawbioassays/view_rawbioassay.jsp

    r4889 r5064  
    6363  import="net.sf.basedb.util.formatter.Formatter"
    6464  import="net.sf.basedb.clients.web.Base"
     65  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    6566  import="net.sf.basedb.clients.web.PermissionUtil"
    6667  import="net.sf.basedb.clients.web.util.HTML"
     
    187188    {
    188189      if (TabControl.isActive(tabControlId, tabId)) return;
    189       if (tabId == 'overview' && tabId != '<%=tab%>')
     190      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    190191      {
    191192        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    695696        %>
    696697      </t:tab>
     698      <t:tab id="history" title="Change history"
     699        tooltip="Displays a log of all modifications made to this item"
     700        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     701        <%
     702        if ("history".equals(tab))
     703        {
     704          %>
     705          <jsp:include page="../../common/history/frameset.jsp">
     706            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     707            <jsp:param name="source_id" value="<%=itemId%>" />
     708            <jsp:param name="ID" value="<%=ID%>" />
     709          </jsp:include>
     710          <%
     711        }
     712        %>
     713      </t:tab>
    697714      </t:tabcontrol>
    698715
  • trunk/www/views/scans/images/list_images.jsp

    r4889 r5064  
    4545  import="net.sf.basedb.clients.web.Base"
    4646  import="net.sf.basedb.clients.web.ModeInfo"
     47  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    4748  import="net.sf.basedb.clients.web.util.HTML"
    4849  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     
    171172    function switchTab(tabControlId, tabId)
    172173    {
    173       if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview')
     174      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview' || tabId == 'history')
    174175      {
    175176        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=scanId%>&tab='+tabId;
     
    487488    <t:tab id="overview" title="Overview"
    488489      tooltip="Display a tree overview of related items" />
     490    <t:tab id="history" title="Change history"
     491        tooltip="Displays a log of all modifications made to this item"
     492        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    489493    </t:tabcontrol>
    490494
  • trunk/www/views/scans/view_scan.jsp

    r5045 r5064  
    5252  import="net.sf.basedb.core.query.Hql"
    5353  import="net.sf.basedb.clients.web.Base"
     54  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5455  import="net.sf.basedb.clients.web.PermissionUtil"
    5556  import="net.sf.basedb.clients.web.util.HTML"
     
    153154    {
    154155      if (TabControl.isActive(tabControlId, tabId)) return;
    155       if (tabId == 'overview' && tabId != '<%=tab%>')
     156      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    156157      {
    157158        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    530531        %>
    531532      </t:tab>
     533      <t:tab id="history" title="Change history"
     534        tooltip="Displays a log of all modifications made to this item"
     535        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     536        <%
     537        if ("history".equals(tab))
     538        {
     539          %>
     540          <jsp:include page="../../common/history/frameset.jsp">
     541            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     542            <jsp:param name="source_id" value="<%=itemId%>" />
     543            <jsp:param name="ID" value="<%=ID%>" />
     544          </jsp:include>
     545          <%
     546        }
     547        %>
     548      </t:tab>
    532549      </t:tabcontrol>
    533550
Note: See TracChangeset for help on using the changeset viewer.