source: trunk/www/views/rawbioassays/view_rawbioassay.jsp @ 5064

Last change on this file since 5064 was 5064, checked in by Nicklas Nordborg, 14 years ago

References #108: Logging the change history of an item

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