Changeset 5062


Ignore:
Timestamp:
Aug 19, 2009, 11:35:32 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Added "Change history" tab to view pages for Array lims items.
Location:
trunk/www/lims
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/lims/arraybatches/view_batch.jsp

    r5044 r5062  
    5353  import="net.sf.basedb.core.query.Hql"
    5454  import="net.sf.basedb.clients.web.Base"
     55  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5556  import="net.sf.basedb.clients.web.PermissionUtil"
    5657  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;
     
    510511        %>
    511512      </t:tab>
     513      <t:tab id="history" title="Change history"
     514        tooltip="Displays a log of all modifications made to this item"
     515        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     516        <%
     517        if ("history".equals(tab))
     518        {
     519          %>
     520          <jsp:include page="../../common/history/frameset.jsp">
     521            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     522            <jsp:param name="source_id" value="<%=itemId%>" />
     523            <jsp:param name="ID" value="<%=ID%>" />
     524          </jsp:include>
     525          <%
     526        }
     527        %>
     528      </t:tab>
    512529      </t:tabcontrol>
    513530
  • trunk/www/lims/arraydesigns/features/list_features.jsp

    r5026 r5062  
    6060  import="net.sf.basedb.clients.web.Base"
    6161  import="net.sf.basedb.clients.web.ModeInfo"
     62  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    6263  import="net.sf.basedb.clients.web.util.HTML"
    6364  import="net.sf.basedb.util.Values"
     
    175176    function switchTab(tabControlId, tabId)
    176177    {
    177       if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview')
     178      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'overview' || tabId == 'history')
    178179      {
    179180        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=arrayDesignId%>&tab='+tabId;
     
    780781    <t:tab id="overview" title="Overview"
    781782      tooltip="Display a tree overview of related items" />
     783    <t:tab id="history" title="Change history"
     784        tooltip="Displays a log of all modifications made to this item"
     785        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    782786    </t:tabcontrol>
    783787 
  • trunk/www/lims/arraydesigns/view_design.jsp

    r4889 r5062  
    5959  import="net.sf.basedb.util.formatter.Formatter"
    6060  import="net.sf.basedb.clients.web.Base"
     61  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    6162  import="net.sf.basedb.clients.web.PermissionUtil"
    6263  import="net.sf.basedb.clients.web.util.HTML"
     
    176177    {
    177178      if (TabControl.isActive(tabControlId, tabId)) return;
    178       if (tabId == 'overview' && tabId != '<%=tab%>')
     179      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    179180      {
    180181        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    668669        %>
    669670      </t:tab>
     671      <t:tab id="history" title="Change history"
     672        tooltip="Displays a log of all modifications made to this item"
     673        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     674        <%
     675        if ("history".equals(tab))
     676        {
     677          %>
     678          <jsp:include page="../../common/history/frameset.jsp">
     679            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     680            <jsp:param name="source_id" value="<%=itemId%>" />
     681            <jsp:param name="ID" value="<%=ID%>" />
     682          </jsp:include>
     683          <%
     684        }
     685        %>
     686      </t:tab>
    670687      </t:tabcontrol>
    671688
  • trunk/www/lims/arrayslides/view_slide.jsp

    r5044 r5062  
    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"
     
    148149    {
    149150      if (TabControl.isActive(tabControlId, tabId)) return;
    150       if (tabId == 'overview' && tabId != '<%=tab%>')
     151      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
    151152      {
    152153        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     
    432433        %>
    433434      </t:tab>
     435      <t:tab id="history" title="Change history"
     436        tooltip="Displays a log of all modifications made to this item"
     437        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     438        <%
     439        if ("history".equals(tab))
     440        {
     441          %>
     442          <jsp:include page="../../common/history/frameset.jsp">
     443            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     444            <jsp:param name="source_id" value="<%=itemId%>" />
     445            <jsp:param name="ID" value="<%=ID%>" />
     446          </jsp:include>
     447          <%
     448        }
     449        %>
     450      </t:tab>
    434451      </t:tabcontrol>
    435452
  • trunk/www/lims/plates/events/list_events.jsp

    r4889 r5062  
    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.PermissionUtil"
    4849  import="net.sf.basedb.clients.web.util.HTML"
     
    164165    function switchTab(tabControlId, tabId)
    165166    {
    166       if (tabId == 'properties' || tabId == 'annotations')
     167      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'history')
    167168      {
    168169        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=plateId%>&tab='+tabId;
     
    508509   
    509510    <t:tab id="wells" title="Wells" />
     511    <t:tab id="history" title="Change history"
     512        tooltip="Displays a log of all modifications made to this item"
     513        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    510514    </t:tabcontrol>
    511515
  • trunk/www/lims/plates/view_plate.jsp

    r5044 r5062  
    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"
     
    163164    function switchTab(tabControlId, tabId)
    164165    {
    165       if (tabId == 'events')
     166      if (tabId == 'history' && tabId != '<%=tab%>')
     167      {
     168        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     169      }
     170      else if (tabId == 'events')
    166171      {
    167172        viewEvents();
     
    185190    </p:path>
    186191   
    187     <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab">
     192    <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false">
    188193    <t:tab id="properties" title="Properties">
    189194    <tbl:toolbar
     
    580585      <t:tab id="events" title="Events" />
    581586      <t:tab id="wells" title="Wells" />
     587      <t:tab id="history" title="Change history"
     588        tooltip="Displays a log of all modifications made to this item"
     589        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     590        <%
     591        if ("history".equals(tab))
     592        {
     593          %>
     594          <jsp:include page="../../common/history/frameset.jsp">
     595            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     596            <jsp:param name="source_id" value="<%=itemId%>" />
     597            <jsp:param name="ID" value="<%=ID%>" />
     598          </jsp:include>
     599          <%
     600        }
     601        %>
     602      </t:tab>
    582603      </t:tabcontrol>
    583604
  • trunk/www/lims/plates/wells/list_wells.jsp

    r5049 r5062  
    5454  import="net.sf.basedb.clients.web.Base"
    5555  import="net.sf.basedb.clients.web.ModeInfo"
     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"
     
    169170    function switchTab(tabControlId, tabId)
    170171    {
    171       if (tabId == 'properties' || tabId == 'annotations')
     172      if (tabId == 'properties' || tabId == 'annotations' || tabId == 'history')
    172173      {
    173174        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=plateId%>&tab='+tabId;
     
    668669 
    669670    </t:tab>
     671    <t:tab id="history" title="Change history"
     672        tooltip="Displays a log of all modifications made to this item"
     673        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>" />
    670674    </t:tabcontrol>
    671675
Note: See TracChangeset for help on using the changeset viewer.