Changeset 5050


Ignore:
Timestamp:
Aug 17, 2009, 1:18:08 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Added "Change history" tab to the other biomaterial pages
Location:
trunk/www/biomaterials
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/biomaterials/bioplates/view_bioplate.jsp

    r5044 r5050  
    4949  import="net.sf.basedb.core.query.Hql"
    5050  import="net.sf.basedb.clients.web.Base"
     51  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5152  import="net.sf.basedb.clients.web.PermissionUtil"
    5253  import="net.sf.basedb.clients.web.util.HTML"
     
    145146    function switchTab(tabControlId, tabId)
    146147    {
    147       if (tabId == 'wells')
     148      if (tabId == 'history' && tabId != '<%=tab%>')
     149      {
     150        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     151      }
     152      else if (tabId == 'wells')
    148153      {
    149154        viewWells();
     
    163168    </p:path>
    164169   
    165     <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab">
     170    <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false">
    166171    <t:tab id="properties" title="Properties">
    167172    <tbl:toolbar
     
    404409      </t:tab>
    405410      <t:tab id="wells" title="Wells" />
     411      <t:tab id="history" title="Change history"
     412        tooltip="Displays a log of all modifications made to this item"
     413        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     414        <%
     415        if ("history".equals(tab))
     416        {
     417          %>
     418          <jsp:include page="../../common/history/frameset.jsp">
     419            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     420            <jsp:param name="source_id" value="<%=itemId%>" />
     421            <jsp:param name="ID" value="<%=ID%>" />
     422          </jsp:include>
     423          <%
     424        }
     425        %>
     426      </t:tab>
    406427      </t:tabcontrol>
    407428  </base:body>
  • trunk/www/biomaterials/bioplates/wells/list_biowells.jsp

    r4889 r5050  
    4848  import="net.sf.basedb.util.Enumeration"
    4949  import="net.sf.basedb.clients.web.Base"
     50  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5051  import="net.sf.basedb.clients.web.ModeInfo"
    5152  import="net.sf.basedb.clients.web.PermissionUtil"
     
    157158    function switchTab(tabControlId, tabId)
    158159    {
    159       if (tabId == 'properties' || tabId == 'annotations')
     160      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'history')
    160161      {
    161162        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=bioplateId%>&tab='+tabId;
     
    492493 
    493494    </t:tab>
     495    <t:tab id="history" title="Change history"
     496        tooltip="Displays a log of all modifications made to this item"
     497        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    494498    </t:tabcontrol>
    495499
  • trunk/www/biomaterials/events/list_events.jsp

    r4889 r5050  
    4747  import="net.sf.basedb.util.units.UnitUtil"
    4848  import="net.sf.basedb.clients.web.Base"
     49  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    4950  import="net.sf.basedb.clients.web.ModeInfo"
    5051  import="net.sf.basedb.clients.web.PermissionUtil"
     
    202203    function switchTab(tabControlId, tabId)
    203204    {
    204       if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview')
     205      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview' || tabId == 'history')
    205206      {
    206207        location.href = '<%=viewPage%>?ID=<%=ID%>&cmd=ViewItem&item_id=<%=bioMaterialId%>&tab='+tabId;
     
    575576    <t:tab id="overview" title="Overview"
    576577      tooltip="Display a tree overview of related items" />
     578    <t:tab id="history" title="Change history"
     579        tooltip="Displays a log of all modifications made to this item"
     580        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    577581    </t:tabcontrol>
    578582
  • trunk/www/biomaterials/extracts/view_extract.jsp

    r5044 r5050  
    5555  import="net.sf.basedb.core.Type"
    5656  import="net.sf.basedb.clients.web.Base"
     57  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5758  import="net.sf.basedb.clients.web.PermissionUtil"
    5859  import="net.sf.basedb.clients.web.util.HTML"
     
    162163    {
    163164      if (TabControl.isActive(tabControlId, tabId)) return;
    164       if (tabId == 'overview' && tabId != '<%=tab%>')
     165      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    165166      {
    166167        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    713714        %>
    714715      </t:tab>
    715      
     716      <t:tab id="history" title="Change history"
     717        tooltip="Displays a log of all modifications made to this item"
     718        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     719        <%
     720        if ("history".equals(tab))
     721        {
     722          %>
     723          <jsp:include page="../../common/history/frameset.jsp">
     724            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     725            <jsp:param name="source_id" value="<%=itemId%>" />
     726            <jsp:param name="ID" value="<%=ID%>" />
     727          </jsp:include>
     728          <%
     729        }
     730        %>
     731      </t:tab>     
    716732      </t:tabcontrol>
    717733
  • trunk/www/biomaterials/labeledextracts/view_labeledextract.jsp

    r5044 r5050  
    5454  import="net.sf.basedb.core.Project"
    5555  import="net.sf.basedb.clients.web.Base"
     56  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5657  import="net.sf.basedb.clients.web.PermissionUtil"
    5758  import="net.sf.basedb.clients.web.util.HTML"
     
    161162    {
    162163      if (TabControl.isActive(tabControlId, tabId)) return;
    163       if (tabId == 'overview' && tabId != '<%=tab%>')
     164      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    164165      {
    165166        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    714715        %>
    715716      </t:tab>
     717      <t:tab id="history" title="Change history"
     718        tooltip="Displays a log of all modifications made to this item"
     719        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     720        <%
     721        if ("history".equals(tab))
     722        {
     723          %>
     724          <jsp:include page="../../common/history/frameset.jsp">
     725            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     726            <jsp:param name="source_id" value="<%=itemId%>" />
     727            <jsp:param name="ID" value="<%=ID%>" />
     728          </jsp:include>
     729          <%
     730        }
     731        %>
     732      </t:tab>     
    716733      </t:tabcontrol>
    717734
  • trunk/www/biomaterials/samples/view_sample.jsp

    r5044 r5050  
    5252  import="net.sf.basedb.core.Project"
    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"
     
    163164    {
    164165      if (TabControl.isActive(tabControlId, tabId)) return;
    165       if (tabId == 'overview' && tabId != '<%=tab%>')
     166      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    166167      {
    167168        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    694695        %>
    695696      </t:tab>     
     697      <t:tab id="history" title="Change history"
     698        tooltip="Displays a log of all modifications made to this item"
     699        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     700        <%
     701        if ("history".equals(tab))
     702        {
     703          %>
     704          <jsp:include page="../../common/history/frameset.jsp">
     705            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     706            <jsp:param name="source_id" value="<%=itemId%>" />
     707            <jsp:param name="ID" value="<%=ID%>" />
     708          </jsp:include>
     709          <%
     710        }
     711        %>
     712      </t:tab>     
    696713      </t:tabcontrol>
    697714
Note: See TracChangeset for help on using the changeset viewer.