source: trunk/www/lims/arraydesigns/view_design.jsp @ 5062

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

References #108: Logging the change history of an item

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