Ignore:
Timestamp:
Aug 20, 2009, 10:53:16 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Enabled logging for experiments
  • Added "Change history" tab to experiments, plugin configuration and protocol
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/admin/pluginconfigurations/view_configuration.jsp

    r5040 r5069  
    4949  import="net.sf.basedb.util.ToStringComparator"
    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"
     
    8283final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
    8384final int itemId = cc.getId();
     85final String tab = Values.getString(request.getParameter("tab"), "properties");
    8486final float scale = Base.getScale(sc);
    8587final DbControl dc = sc.newDbControl();
     
    170172      Main.openPopup('../../common/plugin/index.jsp?ID=<%=ID%>&cmd=ConfigurePlugin&pluginconfiguration_id=<%=itemId%>', 'ConfigurePlugin', 800, 600);
    171173    }
     174    function switchTab(tabControlId, tabId)
     175    {
     176      if (TabControl.isActive(tabControlId, tabId)) return;
     177      if (tabId == 'history' && tabId != '<%=tab%>')
     178      {
     179        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     180      }
     181      else
     182      {
     183        TabControl.setActiveTab(tabControlId, tabId);
     184      }
     185    }
    172186    </script>
    173187  </base:head>
     
    179193    </p:path>
    180194   
    181     <t:tabcontrol id="main" active="properties">
     195    <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false">
    182196    <t:tab id="properties" title="Properties">
    183197    <tbl:toolbar
     
    523537        </div>
    524538      </t:tab>
    525      
     539      <t:tab id="history" title="Change history"
     540        tooltip="Displays a log of all modifications made to this item"
     541        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     542        <%
     543        if ("history".equals(tab))
     544        {
     545          %>
     546          <jsp:include page="../../common/history/frameset.jsp">
     547            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     548            <jsp:param name="source_id" value="<%=itemId%>" />
     549            <jsp:param name="ID" value="<%=ID%>" />
     550          </jsp:include>
     551          <%
     552        }
     553        %>
     554      </t:tab>
    526555      </t:tabcontrol>
    527556
Note: See TracChangeset for help on using the changeset viewer.