source: trunk/www/views/derivedbioassays/view_bioassay.jsp @ 5729

Last change on this file since 5729 was 5729, checked in by Nicklas Nordborg, 12 years ago

Fixes #1620: Implement a 'Manual derived bioassay creator' plug-in

The plug-in can be used and it is possible to put restrictions on the parent bioassay subtype. There are no parameters for setting protocol, hardware or software... This might be needed, but I don't know if it should be on the configuration or in the job wizard. This could be an enhancement for a later BASE version.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 21.0 KB
Line 
1<%-- $Id $
2  ------------------------------------------------------------------
3  Copyright (C) 2011 Nicklas Nordborg
4
5  This file is part of BASE - BioArray Software Environment.
6  Available at http://base.thep.lu.se/
7
8  BASE is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License
10  as published by the Free Software Foundation; either version 3
11  of the License, or (at your option) any later version.
12
13  BASE is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with BASE. If not, see <http://www.gnu.org/licenses/>.
20  ------------------------------------------------------------------
21
22--%>
23<%@ page pageEncoding="UTF-8" session="false"
24  import="net.sf.basedb.core.SessionControl"
25  import="net.sf.basedb.core.DbControl"
26  import="net.sf.basedb.core.DerivedBioAssay"
27  import="net.sf.basedb.core.PhysicalBioAssay"
28  import="net.sf.basedb.core.Item"
29  import="net.sf.basedb.core.ItemContext"
30  import="net.sf.basedb.core.Permission"
31  import="net.sf.basedb.core.Job"
32  import="net.sf.basedb.core.PluginDefinition"
33  import="net.sf.basedb.core.PluginConfiguration"
34  import="net.sf.basedb.core.User"
35  import="net.sf.basedb.core.ItemQuery"
36  import="net.sf.basedb.core.ItemResultList"
37  import="net.sf.basedb.core.Include"
38  import="net.sf.basedb.core.PermissionDeniedException"
39  import="net.sf.basedb.core.PluginDefinition"
40  import="net.sf.basedb.core.ParameterInfo"
41  import="net.sf.basedb.core.RawBioAssay"
42  import="net.sf.basedb.core.RawDataType"
43  import="net.sf.basedb.core.BasicItem"
44  import="net.sf.basedb.core.Nameable"
45  import="net.sf.basedb.core.File"
46  import="net.sf.basedb.core.plugin.GuiContext"
47  import="net.sf.basedb.core.plugin.Plugin"
48  import="net.sf.basedb.core.query.Orders"
49  import="net.sf.basedb.core.query.Hql"
50  import="net.sf.basedb.clients.web.ChangeHistoryUtil"
51  import="net.sf.basedb.clients.web.Base"
52  import="net.sf.basedb.clients.web.PermissionUtil"
53  import="net.sf.basedb.clients.web.util.HTML"
54  import="net.sf.basedb.util.Values"
55  import="net.sf.basedb.util.formatter.Formatter"
56  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
57  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
58  import="net.sf.basedb.clients.web.extensions.JspContext"
59  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
60  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
61  import="net.sf.basedb.clients.web.extensions.plot.OverviewPlotAction"
62  import="net.sf.basedb.clients.web.extensions.plot.PlotGenerator"
63  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
64  import="net.sf.basedb.util.extensions.ActionIterator"
65  import="java.util.Date"
66  import="java.util.Map"
67  import="java.util.Set"
68  import="java.util.List"
69  import="java.util.Iterator"
70%>
71<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
72<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
73<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
74<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
75<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
76<%!
77  private static final Item itemType = Item.DERIVEDBIOASSAY;
78  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM);
79%>
80<%
81final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
82final String ID = sc.getId();
83final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
84final int itemId = cc.getId();
85final String tab = Values.getString(request.getParameter("tab"), "properties");
86
87final float scale = Base.getScale(sc);
88final String root = request.getContextPath();
89final DbControl dc = sc.newDbControl();
90try
91{
92  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
93
94  String title = null;
95  final DerivedBioAssay bioAssay = DerivedBioAssay.getById(dc, itemId);
96 
97  Job job = null;
98  boolean readJob = true;
99  PluginDefinition plugin = null;
100  boolean readPlugin = true;
101  PluginConfiguration configuration = null;
102  boolean readConfiguration = true;
103
104  try
105  {
106    job = bioAssay.getJob();
107  }
108  catch (PermissionDeniedException ex)
109  {
110    readJob = false;
111    readPlugin = false;
112    readConfiguration = false;
113  }
114  if (job != null)
115  {
116    try
117    {
118      plugin = job.getPluginDefinition();
119    }
120    catch (PermissionDeniedException ex)
121    {
122      readPlugin = false;
123    }
124    try
125    {
126      configuration = job.getPluginConfiguration();
127    }
128    catch (PermissionDeniedException ex)
129    {
130      readConfiguration = false;
131    }
132  }
133 
134  final boolean usePermission = bioAssay.hasPermission(Permission.USE);
135  final boolean writePermission = bioAssay.hasPermission(Permission.WRITE);
136  final boolean deletePermission = bioAssay.hasPermission(Permission.DELETE);
137  final boolean sharePermission = bioAssay.hasPermission(Permission.SET_PERMISSION);
138  final boolean setOwnerPermission = bioAssay.hasPermission(Permission.SET_OWNER);
139  final boolean isRemoved = bioAssay.isRemoved();
140  final boolean isUsed = isRemoved && bioAssay.isUsed();
141  final boolean deletePermanentlyPermission = deletePermission && !isUsed;
142  final boolean isOwner = bioAssay.isOwner();
143  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
144  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
145  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, bioAssay);
146  ExtensionsInvoker toolbarInvoker = ToolbarUtil.useExtensions(jspContext);
147  %>
148  <base:page title="<%=title%>">
149  <base:head scripts="table.js,tabcontrol.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css">
150    <ext:scripts context="<%=jspContext%>" />
151    <ext:stylesheets context="<%=jspContext%>" />
152    <script language="JavaScript">
153    function editItem()
154    {
155      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, true);
156    }
157    function deleteItem()
158    {
159      location.replace('index.jsp?ID=<%=ID%>&cmd=DeleteItem&item_id=<%=itemId%>');
160    }
161    function restoreItem()
162    {
163      location.replace('index.jsp?ID=<%=ID%>&cmd=RestoreItem&item_id=<%=itemId%>');
164    }
165    function shareItem()
166    {
167      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id=<%=itemId%>', 'ShareBioAssay', 600, 400);
168    }
169    function setOwner()
170    {
171      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=SetOwnerOfItem&item_id=<%=itemId%>', 'SetOwnerOfItem', 450, 150);
172    }
173    function switchTab(tabControlId, tabId)
174    {
175      if (TabControl.isActive(tabControlId, tabId)) return;
176      if ((tabId == 'overview' || tabId == 'history') && tabId != '<%=tab%>')
177      {
178        location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId;
179      }
180      else
181      {
182        TabControl.setActiveTab(tabControlId, tabId);
183      }
184    }
185    function runItemPlugin(cmd)
186    {
187      Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540);
188    }
189    function newChildBioAssay()
190    {
191      Main.viewOrEditItem('<%=ID%>', 'DERIVEDBIOASSAY', 0, true, '&parent_id=<%=itemId%>');
192    }
193    function newRawBioAssay()
194    {
195      Main.viewOrEditItem('<%=ID%>', 'RAWBIOASSAY', 0, true, '&bioassay_id=<%=itemId%>');
196    }
197    </script>
198  </base:head>
199  <base:body>
200    <p>
201    <p:path>
202      <p:pathelement title="Derived bioassays" href="<%="index.jsp?ID="+ID%>" />
203      <p:pathelement title="<%=HTML.encodeTags(bioAssay.getName())%>" />
204    </p:path>
205   
206    <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false">
207      <t:tab id="properties" title="Properties">
208    <tbl:toolbar
209      >
210      <tbl:button 
211        disabled="<%=writePermission ? false : true%>" 
212        image="<%=writePermission ? "edit.gif" : "edit_disabled.gif"%>" 
213        onclick="editItem()" 
214        title="Edit&hellip;" 
215        tooltip="<%=writePermission ? "Edit this bioassay" : "You do not have permission to edit this bioassay"%>" 
216      />
217      <tbl:button 
218        disabled="<%=deletePermission ? false : true%>" 
219        image="<%=deletePermission ? "delete.gif" : "delete_disabled.gif"%>" 
220        onclick="deleteItem()" 
221        title="Delete"
222        visible="<%=!bioAssay.isRemoved()%>"
223        tooltip="<%=deletePermission ? "Delete this bioassay" : "You do not have permission to delete this bioassay"%>" 
224      />
225      <tbl:button 
226        disabled="<%=writePermission ? false : true%>" 
227        image="<%=writePermission ? "restore.gif" : "restore_disabled.gif"%>" 
228        onclick="restoreItem()" 
229        title="Restore"
230        visible="<%=bioAssay.isRemoved()%>"
231        tooltip="<%=writePermission ? "Restore this bioassay" : "You do not have permission to restore this bioassay"%>" 
232      />
233      <tbl:button 
234        disabled="<%=sharePermission ? false : true%>"
235        image="<%=sharePermission ? "share.gif" : "share_disabled.gif"%>"
236        onclick="shareItem()" 
237        title="Share&hellip;" 
238        tooltip="<%=sharePermission ? "Share this bioassay to other user, groups and projects" : "You do not have permission to share this bioassay"%>"
239      />
240      <tbl:button 
241        disabled="<%=setOwnerPermission ? false : true%>"
242        image="<%=setOwnerPermission ? "take_ownership.png" : "take_ownership_disabled.png"%>"
243        onclick="setOwner()" 
244        title="Set owner&hellip;"
245        tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>"
246      />
247      <tbl:button
248        image="add.png"
249        onclick="newChildBioAssay()"
250        title="New child bioassay&hellip;"
251        tooltip="Create a child bioassay from this bioassay"
252        visible="<%=sc.hasPermission(Permission.CREATE, Item.DERIVEDBIOASSAY) && usePermission%>"
253      />
254      <tbl:button
255        image="add.png"
256        onclick="newRawBioAssay()"
257        title="New raw bioassay&hellip;"
258        tooltip="Create a raw bioassay from this bioassay"
259        visible="<%=sc.hasPermission(Permission.CREATE, Item.RAWBIOASSAY) && usePermission%>"
260      />
261      <tbl:button 
262        image="import.gif" 
263        onclick="runItemPlugin('ImportItem')" 
264        title="Import&hellip;" 
265        tooltip="Import data" 
266        visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
267      />
268      <tbl:button 
269        image="export.gif" 
270        onclick="runItemPlugin('ExportItem')" 
271        title="Export&hellip;" 
272        tooltip="Export data" 
273        visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
274      />
275      <tbl:button 
276        image="runplugin.gif" 
277        onclick="runItemPlugin('RunPlugin')"
278        title="Run plugin&hellip;" 
279        tooltip="Run a plugin" 
280        visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
281      />
282      <tbl:button 
283        image="runplugin.gif" 
284        onclick="runItemPlugin('RunAnalysisPlugin')"
285        title="Run analysis&hellip;" 
286        tooltip="Run an analysis plugin with data from this bioassay"
287        visible="<%=pluginCount.containsKey(Plugin.MainType.ANALYZE)%>"
288      />
289      <ext:render extensions="<%=toolbarInvoker%>" context="<%=jspContext%>" 
290        wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
291      <tbl:button
292        image="help.gif"
293        onclick="<%="Main.openHelp('" + ID +"', 'derivedbioassay.view.properties')"%>"
294        title="Help&hellip;"
295        tooltip="Get help about this page"
296      />
297      </tbl:toolbar>
298    <div class="boxedbottom">
299      <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(bioAssay)%></i></div>
300      <%
301      if (isRemoved || bioAssay.isShared())
302      {
303        %>
304        <div class="itemstatus">
305          <base:icon 
306            image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>"
307            onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>"
308            tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>"
309            visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon>
310          <base:icon image="used.gif" 
311            onclick="showUsingItems()"
312            tooltip="Show the items that are using this one"
313            visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon>
314          <base:icon image="shared.gif" 
315            visible="<%=bioAssay.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon>
316        </div>
317        <%
318      }
319      %>
320     
321      <table width="100%">
322      <tr valign="top">
323      <td width="50%">
324        <h4>Bioassay set</h4>
325        <table class="form" cellspacing=0>
326        <tr>
327          <td class="prompt">Name</td>
328          <td><%=HTML.encodeTags(bioAssay.getName())%></td>
329        </tr>
330        <tr>
331          <td class="prompt">Type</td>
332          <td><base:propertyvalue item="<%=bioAssay%>" property="itemSubtype" /></td>
333        </tr>
334        <tr>
335          <td class="prompt">Physical bioassay</td>
336          <td><base:propertyvalue item="<%=bioAssay%>" property="physicalBioAssay" /></td>
337        </tr>
338        <tr>
339          <td class="prompt">Parent bioassay</td>
340          <td><base:propertyvalue item="<%=bioAssay%>" property="parent" /></td>
341        </tr>
342        <tr>
343          <td class="prompt">Extract</td>
344          <td><base:propertyvalue item="<%=bioAssay%>" property="extract" /></td>
345        </tr>
346        <tr>
347          <td class="prompt">Protocol</td>
348          <td><base:propertyvalue item="<%=bioAssay%>" property="protocol" /></td>
349        </tr>
350        <tr>
351          <td class="prompt">Hardware</td>
352          <td><base:propertyvalue item="<%=bioAssay%>" property="hardware" /></td>
353        </tr>
354        <tr>
355          <td class="prompt">Software</td>
356          <td><base:propertyvalue item="<%=bioAssay%>" property="software" /></td>
357        </tr>
358        <tr>
359          <td class="prompt">Owner</td>
360          <td><base:propertyvalue item="<%=bioAssay%>" property="owner" /></td>
361        </tr>
362        <tr>
363          <td class="prompt">Description</td>
364          <td><%=HTML.niceFormat(bioAssay.getDescription())%></td>
365        </tr>
366        </table>
367      </td>
368      <td width="50%">
369        <h4>Job &amp; Plug-in parameters</h4>
370        <table class="form" cellspacing=0>
371        <tr>
372          <td class="prompt">Job</td>
373          <td><%=Base.getLinkedName(ID, job, !readJob, false)%></td>
374        </tr>
375        <tr>
376          <td class="prompt">Plugin</td>
377          <td><%=Base.getLinkedName(ID, plugin, 
378              !readPlugin, plugin != null && plugin.hasPermission(Permission.WRITE))%></td>
379        </tr>
380        <tr>
381          <td class="prompt">Plugin configuration</td>
382          <td><%=Base.getLinkedName(ID, configuration, !readConfiguration, 
383            configuration != null && configuration.hasPermission(Permission.WRITE))%></td>
384        </tr>
385        <%
386        if (job != null)
387        {
388          %>
389          <tr valign=top>
390            <td class="prompt">Started</td>
391            <td>
392              <%=job == null ? "" : dateTimeFormatter.format(job.getStarted())%>
393            </td>
394          </tr>
395          <tr valign=top>
396            <td class="prompt">Ended</td>
397            <td>
398              <%=job == null ? "" : dateTimeFormatter.format(job.getEnded())%>
399            </td>
400          </tr>
401          <tr valign=top>
402            <td class="prompt">Server</td>
403            <td>
404              <%=HTML.encodeTags(job.getServer())%>
405            </td>
406          </tr>
407          <%
408          for (String name : job.getParameterNames())
409          {
410            StringBuilder sb = new StringBuilder();
411            String displayValue = "";
412            String description = "";
413            try
414            {
415              ParameterInfo pi = job.getParameterInfo(name);
416              if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel());
417              description = HTML.encodeTags(pi.getDescription());
418              List<?> values = pi.getValues();
419              int i = 0;
420              for (Object value : values)
421              {
422                if (value != null)
423                {
424                  if (i > 0) sb.append(", ");
425                  i++;
426                  if (value instanceof BasicItem)
427                  {
428                    BasicItem item = (BasicItem)value;
429                    String itemName = "";
430                    if (item instanceof File)
431                    {
432                      itemName = ((File)item).getPath().toString();
433                    }
434                    else if (item instanceof Nameable)
435                    {
436                      itemName = ((Nameable)item).getName();
437                    }
438                    else
439                    {
440                      itemName = item.toString();
441                    }
442                    sb.append(Base.getLink(ID, HTML.encodeTags(itemName), 
443                      item.getType(), item.getId(), item.hasPermission(Permission.WRITE)));
444                  }
445                  else if (value instanceof Date)
446                  {
447                    sb.append(dateFormatter.format((Date)value));
448                  }
449                  else
450                  {
451                    sb.append(HTML.encodeTags(value.toString()));
452                  }
453                }
454              }
455              displayValue = sb.toString();
456            }
457            catch (Throwable ex)
458            {
459              displayValue = "<i>ERROR: "+ex.getMessage()+"</i>";
460            }
461            %>
462            <tr>
463            <td class="prompt"><span title="<%=description%>"><%=name%></span></td>
464              <td>
465                <%=displayValue%>
466              </td>
467            </tr>
468            <%
469          }
470        }
471        %>
472        </table>
473
474      </td>
475      </tr>
476      </table>
477     
478      <%
479      ItemQuery<DerivedBioAssay> childQuery = bioAssay.getChildren();
480      childQuery.include(Include.ALL);
481      childQuery.order(Orders.asc(Hql.property("name")));
482      ItemResultList<DerivedBioAssay> children = childQuery.list(dc);
483      if (children.size() == 0)
484      {
485        %>
486        <h4>Child bioassays</h4>
487        This bioassay doesn't have any child bioassays
488        (or you don't have permission to view them).
489        <%
490      }
491      else
492      {
493        %>
494        <base:section 
495          id="children"
496          title="<%="Child bioassays (" + children.size() + ")"%>"
497          context="<%=cc%>"
498          >
499          <tbl:table
500            id="children"
501            clazz="itemlist"
502            columns="all"
503            >
504          <tbl:columndef 
505            id="name"
506            title="Name"
507          />
508          <tbl:columndef 
509            id="itemSubtype"
510            title="Type"
511          />
512          <tbl:columndef 
513            id="description"
514            title="Description"
515          />
516          <tbl:data>
517            <tbl:columns>
518            </tbl:columns>
519            <tbl:rows>
520            <%
521            for (DerivedBioAssay item : children)
522            {
523              %>
524              <tbl:row>
525                <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell>
526                <tbl:cell column="itemSubtype"><base:propertyvalue item="<%=item%>" property="itemSubtype" /></tbl:cell>
527                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
528              </tbl:row>
529              <%
530            }
531            %>
532            </tbl:rows>
533          </tbl:data>
534          </tbl:table>
535        </base:section>
536        <%
537      }
538      %>
539 
540      <%
541      ItemQuery<RawBioAssay> rawQuery = bioAssay.getRawBioAssays();
542      rawQuery.include(Include.ALL);
543      rawQuery.order(Orders.asc(Hql.property("name")));
544      ItemResultList<RawBioAssay> rawBioAssays = rawQuery.list(dc);
545      if (rawBioAssays.size() == 0)
546      {
547        %>
548        <h4>Raw bioassays</h4>
549        This bioassay doesn't have any child raw bioassays
550        (or you don't have permission to view them).
551        <%
552      }
553      else
554      {
555        %>
556        <base:section 
557          id="children"
558          title="<%="Raw bioassays (" + rawBioAssays.size() + ")"%>"
559          context="<%=cc%>"
560          >
561          <tbl:table
562            id="rawBioAssays"
563            clazz="itemlist"
564            columns="all"
565            >
566          <tbl:columndef 
567            id="name"
568            title="Name"
569          />
570          <tbl:columndef 
571            id="platform"
572            title="Platform"
573          />
574          <tbl:columndef 
575            id="description"
576            title="Description"
577          />
578          <tbl:data>
579            <tbl:columns>
580            </tbl:columns>
581            <tbl:rows>
582            <%
583            for (RawBioAssay item : rawBioAssays)
584            {
585              %>
586              <tbl:row>
587                <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell>
588                <tbl:cell column="platform"><base:propertyvalue item="<%=item%>" property="platform" /></tbl:cell>
589                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
590              </tbl:row>
591              <%
592            }
593            %>
594            </tbl:rows>
595          </tbl:data>
596          </tbl:table>
597        </base:section>
598        <%
599      }
600      %>
601     
602      <jsp:include page="../../common/datafiles/list_files.jsp">
603        <jsp:param name="item_type" value="<%=itemType.name()%>" />
604        <jsp:param name="item_id" value="<%=itemId%>" />
605        <jsp:param name="ID" value="<%=ID%>" />
606      </jsp:include>
607     
608      <jsp:include page="../../common/anytoany/list_anytoany.jsp">
609        <jsp:param name="ID" value="<%=ID%>" />
610        <jsp:param name="item_type" value="<%=itemType.name()%>" />
611        <jsp:param name="item_id" value="<%=itemId%>" />
612        <jsp:param name="title" value="Other items related to this bioassay" />
613      </jsp:include>
614      </div>
615      </t:tab>
616     
617      <t:tab id="annotations" title="Annotations &amp; parameters" 
618        tooltip="View annotation values and protocol parameters">
619        <div class="boxed">
620        <jsp:include page="../../common/annotations/list_annotations.jsp">
621          <jsp:param name="item_type" value="<%=itemType.name()%>" />
622          <jsp:param name="item_id" value="<%=itemId%>" />
623          <jsp:param name="ID" value="<%=ID%>" />
624        </jsp:include>
625        </div>
626       
627      </t:tab>
628     
629      <t:tab id="overview" title="Overview" 
630        tooltip="Display a tree overview of related items">
631        <%
632        if ("overview".equals(tab))
633        {
634          %>
635          <jsp:include page="../../common/overview/overview.jsp">
636            <jsp:param name="item_type" value="<%=itemType.name()%>" />
637            <jsp:param name="item_id" value="<%=itemId%>" />
638            <jsp:param name="ID" value="<%=ID%>" />
639          </jsp:include>
640          <%
641        }
642        %>
643      </t:tab>
644      <t:tab id="history" title="Change history" 
645        tooltip="Displays a log of all modifications made to this item"
646        visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>">
647        <%
648        if ("history".equals(tab))
649        {
650          %>
651          <jsp:include page="../../common/history/frameset.jsp">
652            <jsp:param name="source_type" value="<%=itemType.name()%>" />
653            <jsp:param name="source_id" value="<%=itemId%>" />
654            <jsp:param name="ID" value="<%=ID%>" />
655          </jsp:include>
656          <%
657        }
658        %>
659      </t:tab>
660      </t:tabcontrol>
661
662  </base:body>
663  </base:page>
664  <%
665}
666finally
667{
668  if (dc != null) dc.close();
669}
670
671%>
Note: See TracBrowser for help on using the repository browser.