Changeset 5070


Ignore:
Timestamp:
Aug 20, 2009, 11:15:14 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Enabled logging for annotation types
Location:
trunk
Files:
2 edited

Legend:

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

    r4889 r5070  
    4141public class AnnotationTypeData
    4242  extends CommonData
    43   implements RegisteredData
     43  implements RegisteredData, LoggableData
    4444{
    4545
  • trunk/www/admin/annotationtypes/view_annotationtype.jsp

    r5042 r5070  
    4848  import="net.sf.basedb.core.query.Hql"
    4949  import="net.sf.basedb.clients.web.Base"
     50  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
    5051  import="net.sf.basedb.clients.web.PermissionUtil"
    5152  import="net.sf.basedb.clients.web.util.HTML"
     
    7778final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
    7879final int itemId = cc.getId();
     80final String tab = Values.getString(request.getParameter("tab"), "properties");
    7981final float scale = Base.getScale(sc);
    8082final DbControl dc = sc.newDbControl();
     
    139141      Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540);
    140142    }
     143    function switchTab(tabControlId, tabId)
     144    {
     145      if (TabControl.isActive(tabControlId, tabId)) return;
     146      if (tabId == 'history' && tabId != '<%=tab%>')
     147      {
     148        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
     149      }
     150      else
     151      {
     152        TabControl.setActiveTab(tabControlId, tabId);
     153      }
     154    }
    141155    </script>
    142156  </base:head>
     
    148162    </p:path>
    149163   
    150     <t:tabcontrol id="main" active="properties">
     164    <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false">
    151165    <t:tab id="properties" title="Properties">
    152166   
     
    472486    </div>
    473487      </t:tab>
     488      <t:tab id="history" title="Change history"
     489        tooltip="Displays a log of all modifications made to this item"
     490        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
     491        <%
     492        if ("history".equals(tab))
     493        {
     494          %>
     495          <jsp:include page="../../common/history/frameset.jsp">
     496            <jsp:param name="source_type" value="<%=itemType.name()%>" />
     497            <jsp:param name="source_id" value="<%=itemId%>" />
     498            <jsp:param name="ID" value="<%=ID%>" />
     499          </jsp:include>
     500          <%
     501        }
     502        %>
     503      </t:tab>
    474504      </t:tabcontrol>
    475505
Note: See TracChangeset for help on using the changeset viewer.