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

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

References #1290: Change source files to UTF-8

Changed 'Hakkinen' to 'Häkkinen'.

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