source: trunk/www/views/rawbioassays/list_rawbioassays.jsp @ 6604

Last change on this file since 6604 was 6604, checked in by Nicklas Nordborg, 9 years ago

References #1890: Improve skinnability of BASE

Updated table listings with some new css classes to make it easier to modify background color.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 25.8 KB
Line 
1<%-- $Id: list_rawbioassays.jsp 6604 2014-11-18 10:39:22Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2005 Nicklas Nordborg
4  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
5  Copyright (C) 2007 Johan Enell, Martin Svensson
6
7  This file is part of BASE - BioArray Software Environment.
8  Available at http://base.thep.lu.se/
9
10  BASE is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 3
13  of the License, or (at your option) any later version.
14
15  BASE is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19
20  You should have received a copy of the GNU General Public License
21  along with BASE. If not, see <http://www.gnu.org/licenses/>.
22  ------------------------------------------------------------------
23
24  @author Nicklas
25  @version 2.0
26--%>
27<%@ page pageEncoding="UTF-8" session="false"
28  import="net.sf.basedb.core.SessionControl"
29  import="net.sf.basedb.core.DbControl"
30  import="net.sf.basedb.core.Item"
31  import="net.sf.basedb.core.RawBioAssay"
32  import="net.sf.basedb.core.Platform"
33  import="net.sf.basedb.core.RawDataType"
34  import="net.sf.basedb.core.RawDataTypes"
35  import="net.sf.basedb.core.Experiment"
36  import="net.sf.basedb.core.AnnotationType"
37  import="net.sf.basedb.core.AnnotationSet"
38  import="net.sf.basedb.core.Annotation"
39  import="net.sf.basedb.core.File"
40  import="net.sf.basedb.core.FileSetMember"
41  import="net.sf.basedb.core.ItemQuery"
42  import="net.sf.basedb.core.Include"
43  import="net.sf.basedb.core.Type"
44  import="net.sf.basedb.core.ItemResultIterator"
45  import="net.sf.basedb.core.ItemResultList"
46  import="net.sf.basedb.core.ItemContext"
47  import="net.sf.basedb.core.Job"
48  import="net.sf.basedb.core.Nameable"
49  import="net.sf.basedb.core.Permission"
50  import="net.sf.basedb.core.PluginDefinition"
51  import="net.sf.basedb.core.PermissionDeniedException"
52  import="net.sf.basedb.core.Quantity"
53  import="net.sf.basedb.core.Unit"
54  import="net.sf.basedb.core.query.Hql"
55  import="net.sf.basedb.core.query.Restrictions"
56  import="net.sf.basedb.core.query.Expressions"
57  import="net.sf.basedb.core.query.Orders"
58  import="net.sf.basedb.core.plugin.GuiContext"
59  import="net.sf.basedb.core.plugin.Plugin"
60  import="net.sf.basedb.core.snapshot.AnnotationLoaderUtil"
61  import="net.sf.basedb.core.snapshot.AnnotationTypeFilter"
62  import="net.sf.basedb.core.snapshot.AnnotationSnapshot"
63  import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot"
64  import="net.sf.basedb.core.snapshot.SnapshotManager"
65  import="net.sf.basedb.util.Enumeration"
66  import="net.sf.basedb.util.ShareableUtil"
67  import="net.sf.basedb.util.formatter.Formatter"
68  import="net.sf.basedb.util.units.UnitUtil"
69  import="net.sf.basedb.clients.web.Base"
70  import="net.sf.basedb.clients.web.ModeInfo"
71  import="net.sf.basedb.clients.web.PermissionUtil"
72  import="net.sf.basedb.clients.web.util.HTML"
73  import="net.sf.basedb.util.Values"
74  import="net.sf.basedb.util.formatter.Formatter"
75  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
76  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
77  import="net.sf.basedb.clients.web.extensions.JspContext"
78  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
79  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
80  import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil"
81  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
82  import="java.util.Iterator"
83  import="java.util.List"
84  import="java.util.Map"
85  import="java.util.Date"
86  import="java.util.ArrayList"
87%>
88<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
89<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
90<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
91<%!
92  private static final Item itemType = Item.RAWBIOASSAY;
93  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
94%>
95<%
96final String root = request.getContextPath()+"/";
97final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
98final String ID = sc.getId();
99final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType);
100final boolean readPermission = sc.hasPermission(Permission.READ, itemType);
101final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
102
103final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
104final String callback = request.getParameter("callback");
105final String title = mode.generateTitle("raw bioassay", "raw bioassays");
106final DbControl dc = sc.newDbControl();
107ItemResultIterator<RawBioAssay> rawBioAssays = null;
108List<AnnotationLoaderUtil> annotationLoaders = new ArrayList<AnnotationLoaderUtil>();
109try
110{
111  final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
112  SnapshotManager manager = new SnapshotManager();
113  for (AnnotationType at : annotationTypeQuery.list(dc))
114  {
115    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
116  }
117
118  // Query for experiments relatated to the current raw bioassay
119  final ItemQuery<Experiment> experimentQuery = Experiment.getQuery();
120  experimentQuery.include(cc.getInclude());
121  experimentQuery.join(Hql.innerJoin("rawBioAssays", "rba"));
122  experimentQuery.restrict(Restrictions.eq(Hql.alias("rba"), Expressions.parameter("rawBioAssay")));
123  experimentQuery.order(Orders.asc(Hql.property("name"))); 
124 
125  // Get all platforms
126  final ItemQuery<Platform> platformQuery = Platform.getQuery();
127  platformQuery.include(cc.getInclude());
128  platformQuery.order(Orders.asc(Hql.property("name")));
129  platformQuery.setCacheResult(true);
130  Enumeration<String, String> platforms = new Enumeration<String, String>();
131  for (Platform p : platformQuery.list(dc))
132  {
133    platforms.add(Integer.toString(p.getId()), p.getName());
134  }
135 
136  Unit bytes = UnitUtil.getUnit(dc, Quantity.STORAGE_SIZE, "B");
137  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
138  try
139  {
140    final ItemQuery<RawBioAssay> query = Base.getConfiguredQuery(dc, cc, true, RawBioAssay.getQuery(), mode);
141    rawBioAssays = query.iterate(dc);
142  }
143  catch (Throwable t)
144  {
145    t.printStackTrace();
146    cc.setMessage(t.getMessage());
147  }
148  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
149  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
150  int numListed = 0;
151  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
152  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
153  ExtensionsInvoker columnsInvoker = ListColumnUtil.useExtensions(jspContext);
154  %>
155  <base:page title="<%=title==null ? "Raw bioassays" : title%>" type="<%=mode.getPageType()%>" id="list-page">
156  <base:head scripts="table.js,~bioassays.js" styles="table.css,toolbar.css">
157    <ext:scripts context="<%=jspContext%>" />
158    <ext:stylesheets context="<%=jspContext%>" />
159  </base:head>
160 
161  <base:body>
162    <h1><%=title==null ? "Raw bioassays" : title%></h1>
163    <div class="content">
164    <tbl:table 
165      id="rawbioassays" 
166      columns="<%=cc.getSetting("columns")%>"
167      sortby="<%=cc.getSortProperty()%>" 
168      direction="<%=cc.getSortDirection()%>"
169      action="index.jsp"
170      sc="<%=sc%>"
171      item="<%=itemType%>"
172      subclass="fulltable"
173      >
174      <tbl:hidden 
175        name="mode" 
176        value="<%=mode.getName()%>" 
177      />
178      <tbl:hidden 
179        name="callback" 
180        value="<%=callback%>" 
181        skip="<%=callback == null%>" 
182      />
183      <tbl:columndef 
184        id="name"
185        property="name"
186        datatype="string"
187        title="Name"
188        sortable="true" 
189        filterable="true"
190        exportable="true"
191        show="always" 
192      />
193      <tbl:columndef 
194        id="id" 
195        clazz="uniquecol"
196        property="id"
197        datatype="int"
198        title="ID"
199        sortable="true"
200        filterable="true"
201        exportable="true"
202      />
203      <tbl:columndef 
204        id="entryDate"
205        property="entryDate"
206        datatype="date"
207        title="Registered"
208        sortable="true" 
209        filterable="true"
210        exportable="true"
211        formatter="<%=dateFormatter%>"
212      />
213      <tbl:columndef 
214        id="platform"
215        property="platform"
216        sortproperty="platform.name"
217        exportproperty="platform.name:string"
218        datatype="int"
219        enumeration="<%=platforms%>"
220        title="Platform"
221        sortable="true" 
222        filterable="true"
223        exportable="true"
224      /> 
225      <tbl:columndef 
226        id="variant"
227        property="variant.name"
228        datatype="string"
229        title="Variant"
230        sortable="true" 
231        filterable="true"
232        exportable="true"
233      />       
234      <%
235      Enumeration<String, String> rawEnumeration = new Enumeration<String, String>();
236      for (RawDataType rdt : RawDataTypes.getRawDataTypes())
237      {
238        rawEnumeration.add(rdt.getId(), HTML.encodeTags(rdt.getName()));
239      }
240      rawEnumeration.sortValues();
241      %>
242      <tbl:columndef 
243        id="rawDataType"
244        property="rawDataType"
245        datatype="string"
246        enumeration="<%=rawEnumeration%>"
247        title="Raw data type"
248        sortable="true" 
249        filterable="true"
250        exportable="true"
251      />
252      <tbl:columndef 
253        id="hasData"
254        property="hasData"
255        datatype="boolean"
256        title="Has data"
257        sortable="true" 
258        filterable="true"
259        exportable="true"
260      />
261      <tbl:columndef 
262        id="spots"
263        property="spots"
264        datatype="int"
265        title="Db spots"
266        sortable="true" 
267        filterable="true"
268        exportable="true"
269      />
270      <tbl:columndef 
271        id="numFileSpots"
272        property="numFileSpots"
273        datatype="int"
274        title="File spots"
275        sortable="true" 
276        filterable="true"
277        exportable="true"
278      />     
279      <tbl:columndef 
280        id="bytes"
281        property="bytes"
282        datatype="long"
283        title="Bytes"
284        sortable="true" 
285        filterable="true"
286        exportable="true"
287        unit="<%=bytes%>"
288      />
289      <tbl:columndef 
290        id="parentBioAssay"
291        property="parentBioAssay.name"
292        datatype="string"
293        title="Parent bioassay"
294        sortable="true" 
295        filterable="true"
296        exportable="true"
297      />
298      <tbl:columndef 
299        id="parentExtract"
300        property="parentExtract.name"
301        datatype="string"
302        title="Parent extract"
303        sortable="true" 
304        filterable="true"
305        exportable="true"
306      />
307      <tbl:columndef 
308        id="software"
309        property="software.name"
310        datatype="string"
311        title="Software"
312        sortable="true" 
313        filterable="true"
314        exportable="true"
315      />
316      <tbl:columndef 
317        id="protocol"
318        property="protocol.name"
319        datatype="string"
320        title="Protocol"
321        sortable="true" 
322        filterable="true"
323        exportable="true"
324      />
325      <tbl:columndef 
326        id="arrayDesign"
327        property="arrayDesign.name"
328        datatype="string"
329        title="Array design"
330        sortable="true" 
331        filterable="true"
332        exportable="true"
333      />
334      <tbl:columndef 
335        id="plugin"
336        property="job.pluginDefinition.name"
337        datatype="string"
338        title="Plugin"
339        sortable="true"
340        filterable="true"
341        exportable="true"
342        tooltip="The plug-in that was used to import raw data"
343      />
344      <tbl:columndef 
345        id="configuration"
346        property="job.pluginConfiguration.name"
347        datatype="string"
348        title="Configuration"
349        sortable="true"
350        filterable="true"
351        exportable="true" 
352        tooltip="The configuration/file format that was used to import raw data"
353      />
354      <tbl:columndef 
355        id="importdate"
356        property="job.ended"
357        datatype="date"
358        title="Import date"
359        sortable="true"
360        filterable="true"
361        exportable="true" 
362        tooltip="The date and time of the raw data import"
363        formatter="<%=dateTimeFormatter%>"
364      />
365      <tbl:columndef
366        id="experiments"
367        title="Experiments"
368        property="&experiments(name)"
369        datatype="string"
370        filterable="true"
371        exportable="true"
372      />
373      <tbl:columndef
374        id="files"
375        title="Files"
376        property="&fileSet.members(file.name)"
377        datatype="string"
378        filterable="true"
379        exportable="true"
380      />
381      <tbl:columndef 
382        id="owner"
383        property="owner.name"
384        datatype="string"
385        title="Owner"
386        sortable="true" 
387        filterable="true"
388        exportable="true"
389      />
390      <tbl:columndef 
391        id="description"
392        property="description"
393        datatype="string"
394        title="Description" 
395        sortable="true" 
396        filterable="true" 
397        exportable="true"
398      />
399      <%
400      for (AnnotationLoaderUtil loader : annotationLoaders)
401      {
402        AnnotationType at = loader.getAnnotationType();
403        Enumeration<String, String> annotationEnum = null;
404        if (at.isEnumeration())
405        {
406          annotationEnum = new Enumeration<String, String>();
407          List<?> values = at.getValues();
408          for (Object value : values)
409          {
410            String encoded = HTML.encodeTags(value.toString());
411            annotationEnum.add(encoded, encoded);
412          }
413        }
414        %>
415        <tbl:columndef 
416          id="<%="at"+at.getId()%>"
417          title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
418          property="<%="#"+at.getId()%>"
419          annotation="true"
420          datatype="<%=at.getValueType().getStringValue()%>"
421          enumeration="<%=annotationEnum%>"
422          smartenum="<%=at.getDisplayAsList() %>"
423          sortable="<%=at.getMultiplicity() == 1%>" 
424          filterable="true" 
425          exportable="true"
426          unit="<%=at.getDefaultUnit()%>"
427        />
428        <%
429      }
430      %>
431      <tbl:columndef
432        id="permission"
433        title="Permission"
434      />
435      <tbl:columndef
436        id="sharedTo"
437        title="Shared to"
438        filterable="true"
439        filterproperty="!sharedTo.name"
440        datatype="string"
441      />
442      <tbl:columndef 
443        id="xt-columns" 
444        extensions="<%=columnsInvoker%>" 
445        jspcontext="<%=jspContext%>" 
446      />
447      <div class="panelgroup bg-filled-50 bottomborder">
448        <tbl:toolbar
449          subclass="bottomborder"
450          visible="<%=mode.hasToolbar()%>"
451          >
452          <tbl:button 
453            id="btnNewItem"
454            disabled="<%=!createPermission%>" 
455            image="new.png" 
456            title="New&hellip;" 
457            tooltip="<%=createPermission ? "Create new raw bioassay" : "You do not have permission to create raw bioassays"%>" 
458          />
459          <tbl:button 
460            id="btnDeleteItems"
461            image="delete.png"
462            title="Delete" 
463            tooltip="Delete the selected items" 
464          />
465          <tbl:button 
466            id="btnRestoreItems"
467            image="restore.png"
468            title="Restore" 
469            tooltip="Restore the selected (deleted) items"
470          />
471          <tbl:button 
472            id="btnShareItems"
473            image="share.png"
474            title="Share&hellip;" 
475            tooltip="Share the selected items"
476          />
477          <tbl:button 
478            id="btnSetOwner"
479            image="take_ownership.png"
480            title="Set owner&hellip;"
481            tooltip="Change owner of the selected items"
482          />
483          <tbl:button 
484            id="btnColumns"
485            image="columns.png" 
486            title="Columns&hellip;" 
487            tooltip="Show, hide and re-order columns" 
488          />
489          <tbl:button
490            id="btnNewExperiment"
491            image="add.png"
492            title="New experiment&hellip;"
493            tooltip="Create a new experiment from the selected raw bioassays"
494            visible="<%=sc.hasPermission(Permission.CREATE, Item.EXPERIMENT)%>"
495          />
496          <tbl:button 
497            id="btnImport"
498            data-plugin-type="IMPORT"
499            image="import.png" 
500            title="Import&hellip;" 
501            tooltip="Import data" 
502            visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
503          />
504          <tbl:button 
505            id="btnExport"
506            data-plugin-type="EXPORT"
507            image="export.png" 
508            title="Export&hellip;" 
509            tooltip="Export data" 
510            visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
511          />
512          <tbl:button 
513            id="btnRunPlugin"
514            data-plugin-type="OTHER"
515            image="runplugin.png" 
516            title="Run plugin&hellip;" 
517            tooltip="Run a plugin" 
518            visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
519          />
520          <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
521            wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
522        </tbl:toolbar>
523        <tbl:panel>
524          <tbl:presetselector />
525          <tbl:navigator
526            page="<%=cc.getPage()%>" 
527            rowsperpage="<%=cc.getRowsPerPage()%>" 
528            totalrows="<%=rawBioAssays == null ? 0 : rawBioAssays.getTotalCount()%>" 
529            visible="<%=mode.hasNavigator()%>"
530          />
531        </tbl:panel>
532      </div>
533      <tbl:data>
534        <tbl:headers>
535          <tbl:headerrow>
536            <tbl:header colspan="3" />
537            <tbl:columnheaders />
538          </tbl:headerrow>
539          <tbl:headerrow>
540            <tbl:header subclass="index" />
541            <tbl:header 
542              subclass="check" 
543              visible="<%=mode.hasCheck()%>"
544              ><base:icon 
545                id="check.uncheck"
546                image="check_uncheck.png" 
547                tooltip="Check/uncheck all" 
548                 
549              /></tbl:header>
550            <tbl:header 
551              subclass="check" 
552              visible="<%=mode.hasRadio()%>"
553              />
554            <tbl:header 
555              subclass="icons" 
556              visible="<%=mode.hasIcons()%>"
557              />
558            <tbl:propertyfilter />
559          </tbl:headerrow>
560        </tbl:headers>
561        <tbl:rows>
562          <%
563          if (cc.getMessage() != null)
564          {
565            %>
566            <tbl:panel subclass="bg-filled-50">
567              <div class="messagecontainer error"><%=cc.getMessage()%></div>
568            </tbl:panel>
569            <%
570            cc.setMessage(null);
571          }
572          int index = cc.getPage()*cc.getRowsPerPage();
573          int selectedItemId = cc.getId();
574          if (rawBioAssays != null)
575          {           
576            while (rawBioAssays.hasNext())
577            {
578              RawBioAssay item = rawBioAssays.next();
579              Job job = null;
580              try
581              {
582                job = item.getJob();
583              }
584              catch (Throwable t)
585              {}
586              int itemId = item.getId();
587             
588             
589              boolean deletePermission = item.hasPermission(Permission.DELETE);
590              boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION);
591              boolean writePermission = item.hasPermission(Permission.WRITE);
592              String tooltip = mode.isSelectionMode() ? 
593                  "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : "");
594              String name = HTML.encodeTags(item.getName());
595              index++;
596              numListed++;
597              %>
598              <tbl:row>
599                <tbl:header 
600                  clazz="index"
601                  ><%=index%></tbl:header>
602                <tbl:header 
603                  clazz="check" 
604                  visible="<%=mode.hasCheck()%>"
605                  ><input 
606                    type="checkbox" 
607                    name="<%=itemId%>" 
608                    value="<%=itemId%>" 
609                    title="<%=name%>" 
610                    <%=cc.getSelected().contains(itemId) ? "checked" : ""%> 
611                  ></tbl:header>
612                <tbl:header 
613                  clazz="check" 
614                  visible="<%=mode.hasRadio()%>"
615                  ><input 
616                    type="radio" 
617                    name="item_id" 
618                    value="<%=itemId%>" 
619                    title="<%=name%>" 
620                    <%=selectedItemId == itemId ? "checked" : ""%>
621                  ></tbl:header>
622                <tbl:header 
623                  clazz="icons" 
624                  visible="<%=mode.hasIcons()%>"
625                  ><base:icon 
626                    image="deleted.png"
627                    id="<%="delete."+itemId %>"
628                    subclass="<%=deletePermission ? "table-delete-item" : null %>"
629                    data-item-id="<%=itemId%>"
630                    tooltip="This item has been scheduled for deletion" 
631                    visible="<%=item.isRemoved()%>"
632                  /><base:icon 
633                    image="shared.png" 
634                    id="<%="share."+itemId %>"
635                    subclass="<%=sharePermission ? "table-share-item" : null %>"
636                    data-item-id="<%=itemId%>"
637                    tooltip="This item is shared to other users, groups and/or projects" 
638                    visible="<%=item.isShared()%>"
639                  />&nbsp;</tbl:header>
640                <tbl:cell column="name"><div 
641                  class="link table-item"
642                  data-item-id="<%=itemId%>"
643                  data-no-edit="<%=writePermission ? 0 : 1 %>" 
644                  tabindex="0"
645                  title="<%=tooltip%>"><%=name%></div></tbl:cell>
646                <tbl:cell column="id"><%=item.getId()%></tbl:cell>
647                <tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" />
648                <tbl:cell column="spots"><%=item.getNumDbSpots()%></tbl:cell>
649                <tbl:cell column="numFileSpots"><%=item.getNumFileSpots()%></tbl:cell>
650                <tbl:cell column="bytes"><%=Values.formatBytes(item.getBytes())%></tbl:cell>
651                <tbl:cell column="platform"
652                  ><base:propertyvalue 
653                    item="<%=item%>" 
654                    property="platform"
655                    enableEditLink="<%=mode.hasEditLink()%>" 
656                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
657                  /></tbl:cell>
658                <tbl:cell column="variant"
659                  ><base:propertyvalue 
660                    item="<%=item%>" 
661                    property="variant"
662                    enableEditLink="<%=mode.hasEditLink()%>" 
663                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
664                  /></tbl:cell>               
665                <tbl:cell column="rawDataType"><%=HTML.encodeTags(item.getRawDataType().getName())%></tbl:cell>
666                <tbl:cell column="hasData"><%=item.hasData()%></tbl:cell>
667                <tbl:cell column="parentBioAssay"
668                  ><base:propertyvalue 
669                    item="<%=item%>" 
670                    property="parentBioAssay"
671                    enableEditLink="<%=mode.hasEditLink()%>" 
672                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
673                  /></tbl:cell>
674                <tbl:cell column="parentExtract"
675                  ><base:propertyvalue 
676                    item="<%=item%>" 
677                    property="parentExtract"
678                    enableEditLink="<%=mode.hasEditLink()%>" 
679                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
680                  /></tbl:cell>
681                <tbl:cell column="software"
682                  ><base:propertyvalue 
683                    item="<%=item%>" 
684                    property="software"
685                    enableEditLink="<%=mode.hasEditLink()%>" 
686                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
687                  /></tbl:cell>
688                <tbl:cell column="protocol"
689                  ><base:propertyvalue 
690                    item="<%=item%>" 
691                    property="protocol"
692                    enableEditLink="<%=mode.hasEditLink()%>" 
693                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
694                  /></tbl:cell>
695                <tbl:cell column="arrayDesign"
696                  ><base:propertyvalue 
697                    item="<%=item%>" 
698                    property="arrayDesign"
699                    enableEditLink="<%=mode.hasEditLink()%>" 
700                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
701                  /></tbl:cell>
702                <tbl:cell column="plugin">
703                  <base:propertyvalue 
704                    item="<%=item%>"
705                    property="job.pluginDefinition" 
706                    enableEditLink="<%=mode.hasEditLink()%>" 
707                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
708                    />
709                </tbl:cell>
710                <tbl:cell column="configuration">
711                  <base:propertyvalue 
712                    item="<%=item%>"
713                    property="job.pluginConfiguration" 
714                    enableEditLink="<%=mode.hasEditLink()%>" 
715                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
716                  />
717                </tbl:cell>
718                <tbl:cell 
719                  column="importdate" 
720                  value="<%=job == null ? null : job.getEnded() %>" 
721                />
722                <tbl:cell column="files">
723                  <% 
724                  if (item.hasFileSet())
725                  {
726                    for (FileSetMember member : item.getFileSet().getMembers().list(dc))
727                    {
728                      try
729                      {
730                        %>
731                        <%=Base.getLinkedFile(ID, member.getFile(), false, true, true, root) %><br>
732                        <%
733                      }
734                      catch (PermissionDeniedException ex)
735                      {}
736                    }
737                  }
738                  else
739                  {
740                    %>
741                    <i>- none -</i>
742                    <%
743                  }
744                  %>
745                </tbl:cell>
746                <tbl:cell column="experiments">
747                  <%
748                  experimentQuery.setParameter("rawBioAssay", itemId, Type.INT);
749                  try
750                  {
751                    String separator = "";
752                    for (Experiment e : experimentQuery.list(dc))
753                    {
754                      out.write(separator);
755                      if (mode.hasPropertyLink())
756                      {
757                        out.write(Base.getLinkedName(ID, e, false, mode.hasEditLink()));
758                      }
759                      else
760                      {
761                        out.write(HTML.encodeTags(e.getName()));
762                      }
763                      separator = ", ";
764                    }
765                  }
766                  catch (Throwable t)
767                  {
768                    %>
769                    <div class="error"><%=t.getMessage()%></div>
770                    <%
771                  }
772                  %>
773                </tbl:cell>
774                <tbl:cell column="owner"
775                  ><base:propertyvalue 
776                    item="<%=item%>" 
777                    property="owner"
778                    enableEditLink="<%=mode.hasEditLink()%>" 
779                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
780                  /></tbl:cell>
781                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
782                <%
783                if (item.isAnnotated())
784                {
785                  AnnotationSetSnapshot snapshot = manager.getSnapshot(dc, item.getAnnotationSet().getId());
786                  for (AnnotationLoaderUtil loader : annotationLoaders)
787                  {
788                    if (loader.find(snapshot))
789                    {
790                      %>
791                      <tbl:cell 
792                        column="<%="at"+loader.getId()%>"
793                        ><tbl:cellvalue 
794                          list="<%=loader.getValues()%>"
795                          suffix="<%=loader.getUnitSymbol()%>"
796                      /></tbl:cell>
797                      <%
798                    }
799                  }
800                }
801                %>
802                <tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
803                <tbl:cell column="sharedTo">
804                  <%
805                  Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator();
806                  while(sharees.hasNext())
807                  {
808                    Nameable n = sharees.next();
809                    if (mode.hasPropertyLink())
810                    {
811                      out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink()));
812                    }
813                    else
814                    {
815                      out.write(HTML.encodeTags(n.getName()));
816                    }
817                    out.write(sharees.hasNext() ? ", " : "");
818                  }
819                  %>
820                </tbl:cell>
821                <tbl:xt-cells dc="<%=dc%>" item="<%=item%>">
822                  <tbl:cell column="xt-columns" />
823                </tbl:xt-cells>
824              </tbl:row>
825              <%
826              }
827            }
828          if (numListed == 0)
829          {
830            %>
831            <tbl:panel subclass="bg-filled-50">
832              <div class="messagecontainer note">
833              <%=rawBioAssays == null || rawBioAssays.getTotalCount() == 0 ? "No raw bioassays were found" : "No raw bioassays on this page. Please select another page!" %>
834              </div>
835            </tbl:panel>
836            <%
837          }
838          %>
839        </tbl:rows>
840      </tbl:data>
841    </tbl:table>
842    </div>
843   
844    <base:buttongroup subclass="dialogbuttons">
845      <base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" />
846      <base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
847      <base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" />
848    </base:buttongroup>
849   
850  </base:body>
851  </base:page>
852  <%
853}
854finally
855{
856  if (rawBioAssays != null) rawBioAssays.close();
857  if (dc != null) dc.close();
858}
859%>
Note: See TracBrowser for help on using the repository browser.