source: trunk/www/lims/arraydesigns/list_designs.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: 22.9 KB
Line 
1<%-- $Id: list_designs.jsp 6604 2014-11-18 10:39:22Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
4  Copyright (C) 2007 Johan Enell, Nicklas Nordborg, 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 pageEncoding="UTF-8" session="false"
27  import="net.sf.basedb.core.SessionControl"
28  import="net.sf.basedb.core.DbControl"
29  import="net.sf.basedb.core.Item"
30  import="net.sf.basedb.core.ArrayDesign"
31  import="net.sf.basedb.core.ArrayBatch"
32  import="net.sf.basedb.core.Platform"
33  import="net.sf.basedb.core.PlatformVariant"
34  import="net.sf.basedb.core.File"
35  import="net.sf.basedb.core.AnnotationType"
36  import="net.sf.basedb.core.AnnotationSet"
37  import="net.sf.basedb.core.Annotation"
38  import="net.sf.basedb.core.Job"
39  import="net.sf.basedb.core.ItemQuery"
40  import="net.sf.basedb.core.Include"
41  import="net.sf.basedb.core.Type"
42  import="net.sf.basedb.core.ItemResultIterator"
43  import="net.sf.basedb.core.ItemResultList"
44  import="net.sf.basedb.core.ItemContext"
45  import="net.sf.basedb.core.Nameable"
46  import="net.sf.basedb.core.Permission"
47  import="net.sf.basedb.core.PermissionDeniedException"
48  import="net.sf.basedb.core.PluginDefinition"
49  import="net.sf.basedb.core.FeatureIdentificationMethod"
50  import="net.sf.basedb.core.query.Hql"
51  import="net.sf.basedb.core.query.Restrictions"
52  import="net.sf.basedb.core.query.Expressions"
53  import="net.sf.basedb.core.query.Orders"
54  import="net.sf.basedb.core.plugin.GuiContext"
55  import="net.sf.basedb.core.plugin.Plugin"
56  import="net.sf.basedb.core.snapshot.AnnotationLoaderUtil"
57  import="net.sf.basedb.core.snapshot.AnnotationTypeFilter"
58  import="net.sf.basedb.core.snapshot.AnnotationSnapshot"
59  import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot"
60  import="net.sf.basedb.core.snapshot.SnapshotManager"
61  import="net.sf.basedb.util.Enumeration"
62  import="net.sf.basedb.util.ShareableUtil"
63  import="net.sf.basedb.clients.web.Base"
64  import="net.sf.basedb.clients.web.ModeInfo"
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.clients.web.extensions.list.ListColumnUtil"
75  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
76  import="java.util.Iterator"
77  import="java.util.List"
78  import="java.util.Map"
79  import="java.util.Date"
80  import="java.util.ArrayList"
81%>
82<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
83<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
84<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
85<%!
86  private static final Item itemType = Item.ARRAYDESIGN;
87  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
88  private static final Enumeration<String, String> fiMethods = new Enumeration<String, String>();
89  static
90  {
91    for (FeatureIdentificationMethod fim : FeatureIdentificationMethod.values())
92    {
93      fiMethods.add(Integer.toString(fim.getValue()), fim.toString());
94    }
95    fiMethods.lock();
96  }
97%>
98<%
99final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
100final String ID = sc.getId();
101final String root = request.getContextPath()+"/";
102final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType);
103final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
104
105final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
106final String callback = request.getParameter("callback");
107final String title = mode.generateTitle("array design", "array designs");
108final DbControl dc = sc.newDbControl();
109ItemResultIterator<ArrayDesign> designs = null;
110List<AnnotationLoaderUtil> annotationLoaders = new ArrayList<AnnotationLoaderUtil>();
111try
112{
113  final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
114  SnapshotManager manager = new SnapshotManager();
115  for (AnnotationType at : annotationTypeQuery.list(dc))
116  {
117    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
118  }
119
120  // Query for batches relatated to the current design
121  final ItemQuery<ArrayBatch> batchQuery = ArrayBatch.getQuery();
122  batchQuery.include(cc.getInclude());
123  batchQuery.restrict(Restrictions.eq(Hql.property("arrayDesign"), Expressions.parameter("arrayDesign")));
124  batchQuery.order(Orders.asc(Hql.property("name"))); 
125  final boolean createBatchPermission = sc.hasPermission(Permission.CREATE, Item.ARRAYBATCH);   
126
127  // Get all platforms
128  final ItemQuery<Platform> platformQuery = Platform.getQuery();
129  platformQuery.include(cc.getInclude());
130  platformQuery.order(Orders.asc(Hql.property("name")));
131  platformQuery.setCacheResult(true);
132  Enumeration<String, String> platforms = new Enumeration<String, String>();
133  for (Platform p : platformQuery.list(dc))
134  {
135    platforms.add(Integer.toString(p.getId()), p.getName());
136  }
137 
138  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
139  try
140  {
141    final ItemQuery<ArrayDesign> query = Base.getConfiguredQuery(dc, cc, true, ArrayDesign.getQuery(), mode);
142    designs = query.iterate(dc);
143  }
144  catch (Throwable t)
145  {
146    cc.setMessage(t.getMessage());
147    t.printStackTrace();
148  }
149  int numListed = 0;
150  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
151  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
152  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
153  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
154  ExtensionsInvoker columnsInvoker = ListColumnUtil.useExtensions(jspContext);
155  %>
156  <base:page title="<%=title==null ? "Array designs" : title%>" type="<%=mode.getPageType()%>" id="list-page">
157  <base:head scripts="table.js,~designs.js" styles="table.css,toolbar.css">
158    <ext:scripts context="<%=jspContext%>" />
159    <ext:stylesheets context="<%=jspContext%>" />
160  </base:head>
161 
162  <base:body>
163    <h1><%=title==null ? "Array designs" : title%></h1>
164    <div class="content">
165    <tbl:table 
166      id="designs" 
167      columns="<%=cc.getSetting("columns")%>"
168      sortby="<%=cc.getSortProperty()%>" 
169      direction="<%=cc.getSortDirection()%>"
170      action="index.jsp"
171      sc="<%=sc%>"
172      item="<%=itemType%>"
173      subclass="fulltable"
174      >
175      <tbl:hidden 
176        name="mode" 
177        value="<%=mode.getName()%>" 
178      />
179      <tbl:hidden 
180        name="callback" 
181        value="<%=callback%>" 
182        skip="<%=callback == null%>" 
183      />
184      <tbl:columndef 
185        id="name"
186        property="name"
187        datatype="string"
188        title="Name"
189        sortable="true" 
190        filterable="true"
191        exportable="true"
192        show="always" 
193      />
194      <tbl:columndef 
195        id="id"
196        clazz="uniquecol"
197        property="id"
198        datatype="int"
199        title="ID"
200        sortable="true"
201        filterable="true"
202        exportable="true"
203      />
204      <tbl:columndef 
205        id="entryDate"
206        property="entryDate"
207        datatype="date"
208        title="Registered"
209        sortable="true" 
210        filterable="true"
211        exportable="true"
212        formatter="<%=dateFormatter%>"
213      />
214      <tbl:columndef 
215        id="hasFeatures"
216        property="hasFeatures"
217        datatype="boolean"
218        title="Has features"
219        sortable="true" 
220        filterable="true"
221        exportable="true"
222      />
223      <tbl:columndef 
224        id="numDbFeatures"
225        property="numDbFeatures"
226        datatype="int"
227        title="Db features"
228        sortable="true" 
229        filterable="true"
230        exportable="true"
231      />
232      <tbl:columndef 
233        id="numFileFeatures"
234        property="numFileFeatures"
235        datatype="int"
236        title="File features"
237        sortable="true" 
238        filterable="true"
239        exportable="true"
240      />
241      <tbl:columndef 
242        id="platform"
243        property="platform"
244        sortproperty="platform.name"
245        exportproperty="platform.name:string"
246        datatype="int"
247        enumeration="<%=platforms%>"
248        title="Platform"
249        sortable="true" 
250        filterable="true"
251        exportable="true"
252      /> 
253      <tbl:columndef 
254        id="variant"
255        property="variant.name"
256        datatype="string"
257        title="Variant"
258        sortable="true" 
259        filterable="true"
260        exportable="true"
261      /> 
262      <tbl:columndef 
263        id="featureIdentificationMethod"
264        property="featureIdentificationMethod"
265        datatype="int"
266        title="Feature ID meth."
267        tooltip="Feature identification method"
268        sortable="true" 
269        filterable="true"
270        exportable="true"
271        enumeration="<%=fiMethods%>"
272      /> 
273      <tbl:columndef 
274        id="numArrays"
275        property="numArrays"
276        datatype="int"
277        title="Arrays/slide"
278        sortable="true" 
279        filterable="true"
280        exportable="true"
281      />
282      <tbl:columndef 
283        id="plugin"
284        property="job.pluginDefinition.name"
285        datatype="string"
286        title="Plugin"
287        sortable="true"
288        filterable="true"
289        exportable="true"
290        tooltip="The plug-in that was used to import features"
291      />
292      <tbl:columndef 
293        id="configuration"
294        property="job.pluginConfiguration.name"
295        datatype="string"
296        title="Configuration"
297        sortable="true"
298        filterable="true"
299        exportable="true" 
300        tooltip="The configuration/file format that was used to import features"
301      />
302      <tbl:columndef 
303        id="importdate"
304        property="job.ended"
305        datatype="date"
306        title="Import date"
307        sortable="true"
308        filterable="true"
309        exportable="true" 
310        tooltip="The date and time of the feature import"
311        formatter="<%=dateTimeFormatter%>"
312      />
313      <tbl:columndef
314        id="batches"
315        title="Batches"
316        property="&arrayBatches(name)"
317        datatype="string"
318        filterable="true"
319        exportable="true"
320      />
321      <tbl:columndef 
322        id="owner"
323        property="owner.name"
324        datatype="string"
325        title="Owner"
326        sortable="true" 
327        filterable="true"
328        exportable="true"
329      />
330      <tbl:columndef 
331        id="description"
332        property="description"
333        datatype="string"
334        title="Description" 
335        sortable="true" 
336        filterable="true" 
337        exportable="true"
338      />     
339      <%
340      for (AnnotationLoaderUtil loader : annotationLoaders)
341      {
342        AnnotationType at = loader.getAnnotationType();
343        Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
344        Enumeration<String, String> annotationEnum = null;
345        if (at.isEnumeration())
346        {
347          annotationEnum = new Enumeration<String, String>();
348          List<?> values = at.getValues();
349          for (Object value : values)
350          {
351            String encoded = formatter.format(value);
352            annotationEnum.add(encoded, encoded);
353          }
354        }
355        %>
356        <tbl:columndef 
357          id="<%="at"+at.getId()%>"
358          title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
359          property="<%="#"+at.getId()%>"
360          annotation="true"
361          datatype="<%=at.getValueType().getStringValue()%>"
362          enumeration="<%=annotationEnum%>"
363          smartenum="<%=at.getDisplayAsList() %>"
364          sortable="<%=at.getMultiplicity() == 1%>" 
365          filterable="true" 
366          exportable="true"
367          formatter="<%=formatter%>"
368          unit="<%=at.getDefaultUnit()%>"
369        />
370        <%
371      }
372      %>
373      <tbl:columndef
374        id="permission"
375        title="Permission"
376      />
377      <tbl:columndef
378        id="sharedTo"
379        title="Shared to"
380        filterable="true"
381        filterproperty="!sharedTo.name"
382        datatype="string"
383      />
384      <tbl:columndef 
385        id="xt-columns" 
386        extensions="<%=columnsInvoker%>" 
387        jspcontext="<%=jspContext%>" 
388      />
389      <div class="panelgroup bg-filled-50 bottomborder">
390        <tbl:toolbar
391          subclass="bottomborder"
392          visible="<%=mode.hasToolbar()%>"
393          >
394          <tbl:button 
395            id="btnNewItem"
396            disabled="<%=!createPermission%>" 
397            image="new.png" 
398            title="New&hellip;" 
399            tooltip="<%=createPermission ? "Create new array design" : "You do not have permission to create array designs"%>" 
400          />
401          <tbl:button 
402            id="btnDeleteItems"
403            image="delete.png"
404            title="Delete" 
405            tooltip="Delete the selected items" 
406          />
407          <tbl:button 
408            id="btnRestoreItems"
409            image="restore.png"
410            title="Restore" 
411            tooltip="Restore the selected (deleted) items"
412          />
413          <tbl:button 
414            id="btnShareItems"
415            image="share.png"
416            title="Share&hellip;" 
417            tooltip="Share the selected items"
418          />
419          <tbl:button 
420            id="btnSetOwner"
421            image="take_ownership.png"
422            title="Set owner&hellip;"
423            tooltip="Change owner of the selected items"
424          />
425          <tbl:button 
426            id="btnColumns"
427            image="columns.png" 
428            title="Columns&hellip;" 
429            tooltip="Show, hide and re-order columns" 
430          />
431          <tbl:button 
432            id="btnImport"
433            data-plugin-type="IMPORT"
434            image="import.png" 
435            title="Import&hellip;" 
436            tooltip="Import data" 
437            visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
438          />
439          <tbl:button 
440            id="btnExport"
441            data-plugin-type="EXPORT"
442            image="export.png" 
443            title="Export&hellip;" 
444            tooltip="Export data" 
445            visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
446          />
447          <tbl:button 
448            id="btnRunPlugin"
449            data-plugin-type="OTHER"
450            image="runplugin.png" 
451            title="Run plugin&hellip;" 
452            tooltip="Run a plugin" 
453            visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
454          />
455          <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
456            wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
457        </tbl:toolbar>
458        <tbl:panel>
459          <tbl:presetselector />
460          <tbl:navigator
461            page="<%=cc.getPage()%>" 
462            rowsperpage="<%=cc.getRowsPerPage()%>" 
463            totalrows="<%=designs == null ? 0 : designs.getTotalCount()%>" 
464            visible="<%=mode.hasNavigator()%>"
465          />
466        </tbl:panel>
467      </div>
468      <tbl:data>
469        <tbl:headers>
470          <tbl:headerrow>
471            <tbl:header colspan="3" />
472            <tbl:columnheaders />
473          </tbl:headerrow>
474          <tbl:headerrow>
475            <tbl:header subclass="index" />
476            <tbl:header 
477              subclass="check" 
478              visible="<%=mode.hasCheck()%>"
479              ><base:icon 
480                id="check.uncheck"
481                image="check_uncheck.png" 
482                tooltip="Check/uncheck all" 
483                 
484              /></tbl:header>
485            <tbl:header 
486              subclass="check" 
487              visible="<%=mode.hasRadio()%>"
488              />
489            <tbl:header 
490              subclass="icons" 
491              visible="<%=mode.hasIcons()%>"
492              />
493            <tbl:propertyfilter />
494          </tbl:headerrow>
495        </tbl:headers>
496        <tbl:rows>
497          <%
498          if (cc.getMessage() != null)
499          {
500            %>
501            <tbl:panel subclass="bg-filled-50">
502              <div class="messagecontainer error"><%=cc.getMessage()%></div>
503            </tbl:panel>
504            <%
505            cc.setMessage(null);
506          }
507          int index = cc.getPage()*cc.getRowsPerPage();
508          int selectedItemId = cc.getId();
509          if (designs != null)
510          {           
511            while (designs.hasNext())
512            {
513              ArrayDesign item = designs.next();
514              Job job = null;
515              try
516              {
517                job = item.getJob();
518              }
519              catch (Throwable t)
520              {}
521              int itemId = item.getId();
522             
523             
524              boolean deletePermission = item.hasPermission(Permission.DELETE);
525              boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION);
526              boolean usePermission = item.hasPermission(Permission.USE);
527              boolean writePermission = item.hasPermission(Permission.WRITE);
528              String tooltip = mode.isSelectionMode() ? 
529                  "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : "");
530              String name = HTML.encodeTags(item.getName());
531              index++;
532              numListed++;
533              %>
534              <tbl:row>
535                <tbl:header 
536                  clazz="index"
537                  ><%=index%></tbl:header>
538                <tbl:header 
539                  clazz="check" 
540                  visible="<%=mode.hasCheck()%>"
541                  ><input 
542                    type="checkbox" 
543                    name="<%=itemId%>" 
544                    value="<%=itemId%>" 
545                    title="<%=name%>" 
546                    <%=cc.getSelected().contains(itemId) ? "checked" : ""%> 
547                  ></tbl:header>
548                <tbl:header 
549                  clazz="check" 
550                  visible="<%=mode.hasRadio()%>"
551                  ><input 
552                    type="radio" 
553                    name="item_id" 
554                    value="<%=itemId%>" 
555                    title="<%=name%>" 
556                    <%=selectedItemId == itemId ? "checked" : ""%>
557                  ></tbl:header>
558                <tbl:header 
559                  clazz="icons" 
560                  visible="<%=mode.hasIcons()%>"
561                  ><base:icon 
562                    image="deleted.png"
563                    id="<%="delete."+itemId %>"
564                    subclass="<%=deletePermission ? "table-delete-item" : null %>"
565                    data-item-id="<%=itemId%>"
566                    tooltip="This item has been scheduled for deletion" 
567                    visible="<%=item.isRemoved()%>"
568                  /><base:icon 
569                    image="shared.png" 
570                    id="<%="share."+itemId %>"
571                    subclass="<%=sharePermission ? "table-share-item" : null %>"
572                    data-item-id="<%=itemId%>"
573                    tooltip="This item is shared to other users, groups and/or projects" 
574                    visible="<%=item.isShared()%>"
575                  />&nbsp;</tbl:header>
576                <tbl:cell column="name"><div
577                  class="link table-item"
578                  data-item-id="<%=itemId%>"
579                  data-no-edit="<%=writePermission ? 0 : 1 %>" 
580                  tabindex="0"
581                  title="<%=tooltip%>"><%=name%></div></tbl:cell>
582                <tbl:cell column="id"><%=item.getId()%></tbl:cell>
583                <tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" />
584                <tbl:cell column="platform"
585                  ><base:propertyvalue 
586                    item="<%=item%>" 
587                    property="platform"
588                    enableEditLink="<%=mode.hasEditLink()%>" 
589                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
590                  /></tbl:cell>
591                <tbl:cell column="variant"
592                  ><base:propertyvalue 
593                    item="<%=item%>" 
594                    property="variant"
595                    enableEditLink="<%=mode.hasEditLink()%>" 
596                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
597                  /></tbl:cell>
598                <tbl:cell column="hasFeatures"><%=item.hasFeatures() ? "yes" : "no"%></tbl:cell>
599                <tbl:cell column="numDbFeatures"><%=item.getNumDbFeatures()%></tbl:cell>
600                <tbl:cell column="numFileFeatures"><%=item.getNumFileFeatures()%></tbl:cell>
601                <tbl:cell column="featureIdentificationMethod"><%=item.getFeatureIdentificationMethod()%></tbl:cell>
602                <tbl:cell column="numArrays"><%=item.getNumArrays()%></tbl:cell>
603                <tbl:cell column="plugin">
604                  <base:propertyvalue 
605                    item="<%=item%>"
606                    property="job.pluginDefinition" 
607                    enableEditLink="<%=mode.hasEditLink()%>" 
608                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
609                    />
610                </tbl:cell>
611                <tbl:cell column="configuration">
612                  <base:propertyvalue 
613                    item="<%=item%>"
614                    property="job.pluginConfiguration" 
615                    enableEditLink="<%=mode.hasEditLink()%>" 
616                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
617                  />
618                </tbl:cell>
619                <tbl:cell 
620                  column="importdate" 
621                  value="<%=job == null ? null : job.getEnded() %>" 
622                />
623                <tbl:cell column="batches">
624                  <%
625                  batchQuery.setParameter("arrayDesign", itemId, Type.INT);
626                  try
627                  {
628                    String separator = "";
629                    for (ArrayBatch ab : batchQuery.list(dc))
630                    {
631                      out.write(separator);
632                      if (mode.hasPropertyLink())
633                      {
634                        out.write(Base.getLinkedName(ID, ab, false, mode.hasEditLink()));
635                      }
636                      else
637                      {
638                        out.write(HTML.encodeTags(ab.getName()));
639                      }
640                      separator = ", ";
641                    }
642                  }
643                  catch (Throwable t)
644                  {
645                    %>
646                    <div class="error"><%=t.getMessage()%></div>
647                    <%
648                  }
649                  %>
650                  <base:icon
651                    subclass="link auto-init"
652                    data-auto-init="new-batch"
653                    data-item-id="<%=itemId %>"
654                    image="add.png" 
655                    tooltip="Create new batch" 
656                    visible="<%=mode.hasEditLink() && createBatchPermission && usePermission %>"
657                  />
658                </tbl:cell>
659                <tbl:cell column="owner"
660                  ><base:propertyvalue 
661                    item="<%=item%>" 
662                    property="owner"
663                    enableEditLink="<%=mode.hasEditLink()%>" 
664                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
665                  /></tbl:cell>
666                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>               
667                <%
668                if (item.isAnnotated())
669                {
670                  AnnotationSetSnapshot snapshot = manager.getSnapshot(dc, item.getAnnotationSet().getId());
671                  for (AnnotationLoaderUtil loader : annotationLoaders)
672                  {
673                    if (loader.find(snapshot))
674                    {
675                      %>
676                      <tbl:cell 
677                        column="<%="at"+loader.getId()%>"
678                        ><tbl:cellvalue 
679                          list="<%=loader.getValues()%>"
680                          suffix="<%=loader.getUnitSymbol()%>"
681                      /></tbl:cell>
682                      <%
683                    }
684                  }
685                }
686                %>
687                <tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
688                <tbl:cell column="sharedTo">
689                  <%
690                  Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator();
691                  while(sharees.hasNext())
692                  {
693                    Nameable n = sharees.next();
694                    if (mode.hasPropertyLink())
695                    {
696                      out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink()));
697                    }
698                    else
699                    {
700                      out.write(HTML.encodeTags(n.getName()));
701                    }
702                    out.write(sharees.hasNext() ? ", " : "");
703                  }
704                  %>
705                </tbl:cell>
706                <tbl:xt-cells dc="<%=dc%>" item="<%=item%>">
707                  <tbl:cell column="xt-columns" />
708                </tbl:xt-cells>
709              </tbl:row>
710              <%
711              }
712            }
713          if (numListed == 0)
714          {
715            %>
716            <tbl:panel subclass="bg-filled-50">
717              <div class="messagecontainer note">
718              <%=designs == null || designs.getTotalCount() == 0 ? "No array designs were found" : "No array designs on this page. Please select another page!" %>
719              </div>
720            </tbl:panel>
721            <%
722          }
723          %>
724        </tbl:rows>
725      </tbl:data>
726    </tbl:table>
727    </div>
728   
729    <base:buttongroup subclass="dialogbuttons">
730      <base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" />
731      <base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
732      <base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" />
733    </base:buttongroup>
734   
735  </base:body>
736  </base:page>
737  <%
738}
739finally
740{
741  if (designs != null) designs.close();
742  if (dc != null) dc.close();
743}
744%>
Note: See TracBrowser for help on using the repository browser.