www/admin/platforms/variants/list_variants.jsp

Code
Comments
Other
Rev Date Author Line
4003 26 Nov 07 nicklas 1 <%-- $Id:list_variants.jsp 3820 2007-10-12 10:03:18Z nicklas $
3799 28 Sep 07 nicklas 2   ------------------------------------------------------------------
5425 23 Sep 10 nicklas 3   Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
3799 28 Sep 07 nicklas 4   Copyright (C) 2007 Johan Enell, Nicklas Nordborg
3799 28 Sep 07 nicklas 5
3799 28 Sep 07 nicklas 6   This file is part of BASE - BioArray Software Environment.
3799 28 Sep 07 nicklas 7   Available at http://base.thep.lu.se/
3799 28 Sep 07 nicklas 8
3799 28 Sep 07 nicklas 9   BASE is free software; you can redistribute it and/or
3799 28 Sep 07 nicklas 10   modify it under the terms of the GNU General Public License
4476 05 Sep 08 jari 11   as published by the Free Software Foundation; either version 3
3799 28 Sep 07 nicklas 12   of the License, or (at your option) any later version.
3799 28 Sep 07 nicklas 13
3799 28 Sep 07 nicklas 14   BASE is distributed in the hope that it will be useful,
3799 28 Sep 07 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
3799 28 Sep 07 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3799 28 Sep 07 nicklas 17   GNU General Public License for more details.
3799 28 Sep 07 nicklas 18
3799 28 Sep 07 nicklas 19   You should have received a copy of the GNU General Public License
4510 11 Sep 08 jari 20   along with BASE. If not, see <http://www.gnu.org/licenses/>.
3799 28 Sep 07 nicklas 21   ------------------------------------------------------------------
3799 28 Sep 07 nicklas 22
3799 28 Sep 07 nicklas 23   @author Nicklas
3799 28 Sep 07 nicklas 24   @version 2.0
3799 28 Sep 07 nicklas 25 --%>
5426 24 Sep 10 nicklas 26 <%@ page pageEncoding="UTF-8" session="false"
3799 28 Sep 07 nicklas 27   import="net.sf.basedb.core.SessionControl"
3799 28 Sep 07 nicklas 28   import="net.sf.basedb.core.DbControl"
3799 28 Sep 07 nicklas 29   import="net.sf.basedb.core.Item"
3799 28 Sep 07 nicklas 30   import="net.sf.basedb.core.ItemContext"
3799 28 Sep 07 nicklas 31   import="net.sf.basedb.core.Platform"
3799 28 Sep 07 nicklas 32   import="net.sf.basedb.core.PlatformVariant"
8026 15 Dec 21 nicklas 33   import="net.sf.basedb.core.Project"
3799 28 Sep 07 nicklas 34   import="net.sf.basedb.core.RawDataType"
3799 28 Sep 07 nicklas 35   import="net.sf.basedb.core.ItemQuery"
3799 28 Sep 07 nicklas 36   import="net.sf.basedb.core.ItemResultIterator"
3799 28 Sep 07 nicklas 37   import="net.sf.basedb.core.Permission"
3799 28 Sep 07 nicklas 38   import="net.sf.basedb.core.PluginDefinition"
3799 28 Sep 07 nicklas 39   import="net.sf.basedb.core.PermissionDeniedException"
3799 28 Sep 07 nicklas 40   import="net.sf.basedb.core.query.Restrictions"
3799 28 Sep 07 nicklas 41   import="net.sf.basedb.core.query.Expressions"
3799 28 Sep 07 nicklas 42   import="net.sf.basedb.core.query.Orders"
3799 28 Sep 07 nicklas 43   import="net.sf.basedb.core.query.Hql"
3799 28 Sep 07 nicklas 44   import="net.sf.basedb.core.plugin.GuiContext"
3799 28 Sep 07 nicklas 45   import="net.sf.basedb.core.plugin.Plugin"
3799 28 Sep 07 nicklas 46   import="net.sf.basedb.clients.web.Base"
3799 28 Sep 07 nicklas 47   import="net.sf.basedb.clients.web.PermissionUtil"
3799 28 Sep 07 nicklas 48   import="net.sf.basedb.clients.web.ModeInfo"
3799 28 Sep 07 nicklas 49   import="net.sf.basedb.clients.web.util.HTML"
3799 28 Sep 07 nicklas 50   import="net.sf.basedb.util.Values"
4886 03 Apr 09 nicklas 51   import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
4886 03 Apr 09 nicklas 52   import="net.sf.basedb.clients.web.extensions.JspContext"
4886 03 Apr 09 nicklas 53   import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
7604 25 Feb 19 nicklas 54   import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" 
4886 03 Apr 09 nicklas 55   import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
7604 25 Feb 19 nicklas 56   import="net.sf.basedb.clients.web.extensions.list.ListColumnAction"
6045 03 Apr 12 nicklas 57   import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil"
4886 03 Apr 09 nicklas 58   import="net.sf.basedb.util.extensions.ExtensionsInvoker"
3799 28 Sep 07 nicklas 59   import="java.util.List"
3799 28 Sep 07 nicklas 60   import="java.util.Map"
3799 28 Sep 07 nicklas 61 %>
3799 28 Sep 07 nicklas 62 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
3799 28 Sep 07 nicklas 63 <%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
3799 28 Sep 07 nicklas 64 <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
3799 28 Sep 07 nicklas 65 <%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
4886 03 Apr 09 nicklas 66 <%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
3799 28 Sep 07 nicklas 67 <%!
3799 28 Sep 07 nicklas 68   private static final Item itemType = Item.PLATFORMVARIANT;
3799 28 Sep 07 nicklas 69   private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
3799 28 Sep 07 nicklas 70 %>
3799 28 Sep 07 nicklas 71 <%
3799 28 Sep 07 nicklas 72 final int platformId = Values.getInt(request.getParameter("platform_id"));
3799 28 Sep 07 nicklas 73 final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
3799 28 Sep 07 nicklas 74 final String ID = sc.getId();
3799 28 Sep 07 nicklas 75 final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
3799 28 Sep 07 nicklas 76
3799 28 Sep 07 nicklas 77 final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
3799 28 Sep 07 nicklas 78 final String callback = request.getParameter("callback");
3799 28 Sep 07 nicklas 79 final String title = mode.generateTitle("platform variant", "platform variants");
7954 12 May 21 nicklas 80 final DbControl dc = sc.newDbControl(":List "+itemType);
3799 28 Sep 07 nicklas 81 ItemResultIterator<PlatformVariant> variants = null;
3799 28 Sep 07 nicklas 82 try
3799 28 Sep 07 nicklas 83 {
5650 01 Jun 11 nicklas 84   final Platform platform = platformId > 0 ? Platform.getById(dc, platformId) : null;
5650 01 Jun 11 nicklas 85   final boolean createPermission = platform == null ? false : platform.hasPermission(Permission.WRITE);
3799 28 Sep 07 nicklas 86   final boolean deletePermission = createPermission;
3799 28 Sep 07 nicklas 87   final boolean writePermission = createPermission;
3799 28 Sep 07 nicklas 88
3799 28 Sep 07 nicklas 89   Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
7914 23 Feb 21 nicklas 90   JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, platform);
3799 28 Sep 07 nicklas 91   try
3799 28 Sep 07 nicklas 92   {
7914 23 Feb 21 nicklas 93     final ItemQuery<PlatformVariant> query = Base.getConfiguredQuery(dc, cc, jspContext, true, platform == null ? PlatformVariant.getQuery() : platform.getVariants(), mode);
3799 28 Sep 07 nicklas 94     variants = query.iterate(dc);
3799 28 Sep 07 nicklas 95   }
3799 28 Sep 07 nicklas 96   catch (Throwable t)
3799 28 Sep 07 nicklas 97   {
3799 28 Sep 07 nicklas 98     cc.setMessage(t.getMessage());
3799 28 Sep 07 nicklas 99   }
8026 15 Dec 21 nicklas 100   Project activeProject = Project.getActive(dc);
3799 28 Sep 07 nicklas 101   int numListed = 0;
7604 25 Feb 19 nicklas 102   ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext);
7604 25 Feb 19 nicklas 103   ExtensionsInvoker<ListColumnAction<PlatformVariant,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext);
3799 28 Sep 07 nicklas 104   %>
6289 05 Jun 13 nicklas 105   <base:page title="<%=title%>" type="<%=mode.getPageType()%>" id="list-page">
6289 05 Jun 13 nicklas 106   <base:head scripts="table.js,tabcontrol-2.js,~variants.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css,help.css">
4886 03 Apr 09 nicklas 107     <ext:scripts context="<%=jspContext%>" />
4886 03 Apr 09 nicklas 108     <ext:stylesheets context="<%=jspContext%>" />
3799 28 Sep 07 nicklas 109   </base:head>
3799 28 Sep 07 nicklas 110   
3799 28 Sep 07 nicklas 111   <base:body>
5650 01 Jun 11 nicklas 112     <%
5650 01 Jun 11 nicklas 113     if (platform != null)
5650 01 Jun 11 nicklas 114     {
5650 01 Jun 11 nicklas 115       %>
5954 13 Feb 12 nicklas 116       <p:path><p:pathelement 
5954 13 Feb 12 nicklas 117         title="Platforms" href="<%="../index.jsp?ID="+ID%>" 
5954 13 Feb 12 nicklas 118         /><p:pathelement title="<%=HTML.encodeTags(platform.getName())%>" 
5954 13 Feb 12 nicklas 119         /></p:path>
5650 01 Jun 11 nicklas 120       <%
5650 01 Jun 11 nicklas 121     }
5954 13 Feb 12 nicklas 122     else
5954 13 Feb 12 nicklas 123     {
5954 13 Feb 12 nicklas 124       %>
5954 13 Feb 12 nicklas 125       <h1><%=title%></h1>
5954 13 Feb 12 nicklas 126       <%
5954 13 Feb 12 nicklas 127     }
5650 01 Jun 11 nicklas 128     %>
3799 28 Sep 07 nicklas 129
5954 13 Feb 12 nicklas 130     <t:tabcontrol 
5954 13 Feb 12 nicklas 131       id="main"
5954 13 Feb 12 nicklas 132       subclass="content mastertabcontrol"
6289 05 Jun 13 nicklas 133       active="variant" notabs="<%=platform == null %>">
5650 01 Jun 11 nicklas 134     <t:tab id="properties" title="Properties" visible="<%=platform != null %>"/>
3799 28 Sep 07 nicklas 135     
3799 28 Sep 07 nicklas 136     <t:tab id="variant" title="Variants">
3799 28 Sep 07 nicklas 137     <tbl:table 
3799 28 Sep 07 nicklas 138       id="variants" 
3799 28 Sep 07 nicklas 139       columns="<%=cc.getSetting("columns")%>"
3799 28 Sep 07 nicklas 140       sortby="<%=cc.getSortProperty()%>" 
3799 28 Sep 07 nicklas 141       direction="<%=cc.getSortDirection()%>"
3799 28 Sep 07 nicklas 142       action="index.jsp"
3799 28 Sep 07 nicklas 143       sc="<%=sc%>"
3799 28 Sep 07 nicklas 144       item="<%=itemType%>"
6706 02 Feb 15 nicklas 145       filterrows="<%=cc.getFilterRows()%>"
5954 13 Feb 12 nicklas 146       subclass="fulltable"
7982 14 Jun 21 nicklas 147       stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>"
3799 28 Sep 07 nicklas 148       >
3799 28 Sep 07 nicklas 149       <tbl:hidden 
3799 28 Sep 07 nicklas 150         name="mode" 
3799 28 Sep 07 nicklas 151         value="<%=mode.getName()%>" 
3799 28 Sep 07 nicklas 152       />
3799 28 Sep 07 nicklas 153       <tbl:hidden 
3799 28 Sep 07 nicklas 154         name="platform_id" 
3799 28 Sep 07 nicklas 155         value="<%=String.valueOf(platformId)%>" 
3799 28 Sep 07 nicklas 156       />
3799 28 Sep 07 nicklas 157       <tbl:hidden 
3799 28 Sep 07 nicklas 158         name="callback" 
3799 28 Sep 07 nicklas 159         value="<%=callback%>" 
3799 28 Sep 07 nicklas 160         skip="<%=callback == null%>" 
3799 28 Sep 07 nicklas 161       />
3799 28 Sep 07 nicklas 162       <tbl:columndef 
5650 01 Jun 11 nicklas 163         id="platform" 
5650 01 Jun 11 nicklas 164         property="platform.name"
5650 01 Jun 11 nicklas 165         datatype="string"
5650 01 Jun 11 nicklas 166         title="Platform"
5650 01 Jun 11 nicklas 167         sortable="true" 
5650 01 Jun 11 nicklas 168         filterable="true"
5650 01 Jun 11 nicklas 169         exportable="true"
5650 01 Jun 11 nicklas 170         show="<%=platform==null ? "always" : "never" %>" 
5650 01 Jun 11 nicklas 171       />
5650 01 Jun 11 nicklas 172       <tbl:columndef 
3799 28 Sep 07 nicklas 173         id="name"
3799 28 Sep 07 nicklas 174         property="name"
3799 28 Sep 07 nicklas 175         datatype="string"
3799 28 Sep 07 nicklas 176         title="Name"
3799 28 Sep 07 nicklas 177         sortable="true" 
3799 28 Sep 07 nicklas 178         filterable="true"
3799 28 Sep 07 nicklas 179         exportable="true"
3799 28 Sep 07 nicklas 180         show="always" 
3799 28 Sep 07 nicklas 181       />
3799 28 Sep 07 nicklas 182       <tbl:columndef 
4332 12 Jun 08 martin 183         id="id"
4387 11 Aug 08 nicklas 184         clazz="uniquecol"
4332 12 Jun 08 martin 185         property="id"
4332 12 Jun 08 martin 186         datatype="int"
4332 12 Jun 08 martin 187         title="ID"
4332 12 Jun 08 martin 188         sortable="true"
4332 12 Jun 08 martin 189         filterable="true"
4332 12 Jun 08 martin 190         exportable="true"
4332 12 Jun 08 martin 191       />
4332 12 Jun 08 martin 192       <tbl:columndef 
3799 28 Sep 07 nicklas 193         id="externalId"
4387 11 Aug 08 nicklas 194         clazz="uniquecol"
3799 28 Sep 07 nicklas 195         property="externalId"
3799 28 Sep 07 nicklas 196         datatype="string"
3799 28 Sep 07 nicklas 197         title="External ID"
3799 28 Sep 07 nicklas 198         sortable="true"
3799 28 Sep 07 nicklas 199         filterable="true"
3799 28 Sep 07 nicklas 200         exportable="true"
3799 28 Sep 07 nicklas 201       />
3799 28 Sep 07 nicklas 202       <tbl:columndef 
3799 28 Sep 07 nicklas 203         id="fileOnly"
3799 28 Sep 07 nicklas 204         property="fileOnly"
3799 28 Sep 07 nicklas 205         datatype="boolean"
3799 28 Sep 07 nicklas 206         title="File-only"
3799 28 Sep 07 nicklas 207         sortable="true"
3799 28 Sep 07 nicklas 208         filterable="true"
3799 28 Sep 07 nicklas 209         exportable="true"
3799 28 Sep 07 nicklas 210       />
3799 28 Sep 07 nicklas 211       <tbl:columndef 
3799 28 Sep 07 nicklas 212         id="rawDataType"
3799 28 Sep 07 nicklas 213         property="rawDataType"
3799 28 Sep 07 nicklas 214         datatype="string"
3799 28 Sep 07 nicklas 215         title="Raw data type"
3799 28 Sep 07 nicklas 216         sortable="true"
3799 28 Sep 07 nicklas 217         filterable="true"
3799 28 Sep 07 nicklas 218         exportable="true"
3799 28 Sep 07 nicklas 219       />
3799 28 Sep 07 nicklas 220       <tbl:columndef 
3799 28 Sep 07 nicklas 221         id="channels"
3799 28 Sep 07 nicklas 222         property="channels"
3799 28 Sep 07 nicklas 223         datatype="int"
3799 28 Sep 07 nicklas 224         title="Channels"
3799 28 Sep 07 nicklas 225         sortable="true"
3799 28 Sep 07 nicklas 226         filterable="true"
3799 28 Sep 07 nicklas 227         exportable="true"
3799 28 Sep 07 nicklas 228       />
3799 28 Sep 07 nicklas 229       <tbl:columndef 
3799 28 Sep 07 nicklas 230         id="description"
3799 28 Sep 07 nicklas 231         property="description"
3799 28 Sep 07 nicklas 232         datatype="string"
3799 28 Sep 07 nicklas 233         title="Description" 
3799 28 Sep 07 nicklas 234         sortable="true" 
3799 28 Sep 07 nicklas 235         filterable="true" 
3799 28 Sep 07 nicklas 236         exportable="true"
3799 28 Sep 07 nicklas 237       />
6045 03 Apr 12 nicklas 238       <tbl:columndef 
6045 03 Apr 12 nicklas 239         id="xt-columns" 
6045 03 Apr 12 nicklas 240         extensions="<%=columnsInvoker%>" 
6045 03 Apr 12 nicklas 241         jspcontext="<%=jspContext%>" 
6045 03 Apr 12 nicklas 242       />
6604 18 Nov 14 nicklas 243       <div class="panelgroup bg-filled-50 bottomborder">
5954 13 Feb 12 nicklas 244         <tbl:toolbar
5954 13 Feb 12 nicklas 245           subclass="bottomborder"
5954 13 Feb 12 nicklas 246           visible="<%=mode.hasToolbar()%>"
5954 13 Feb 12 nicklas 247           >
5954 13 Feb 12 nicklas 248           <tbl:button 
6289 05 Jun 13 nicklas 249             id="btnNewItem"
6289 05 Jun 13 nicklas 250             data-extra-url="<%="&platform_id="+platformId%>"
5954 13 Feb 12 nicklas 251             disabled="<%=!createPermission%>" 
5954 13 Feb 12 nicklas 252             image="new.png" 
5954 13 Feb 12 nicklas 253             title="New&hellip;" 
5954 13 Feb 12 nicklas 254             tooltip="<%=createPermission ? "Create variant" : "You do not have permission to create variants"%>" 
5954 13 Feb 12 nicklas 255           />
5954 13 Feb 12 nicklas 256           <tbl:button 
6289 05 Jun 13 nicklas 257             id="btnDeleteItems"
5954 13 Feb 12 nicklas 258             disabled="<%=!deletePermission%>" 
5954 13 Feb 12 nicklas 259             image="delete.png" 
5954 13 Feb 12 nicklas 260             title="Delete" 
5954 13 Feb 12 nicklas 261             tooltip="<%=deletePermission ? "Delete the selected items" : "You do not have permission to delete variants" %>" 
5954 13 Feb 12 nicklas 262           />
5954 13 Feb 12 nicklas 263           <tbl:button 
6289 05 Jun 13 nicklas 264             id="btnRestoreItems"
5954 13 Feb 12 nicklas 265             disabled="<%=!writePermission%>" 
5954 13 Feb 12 nicklas 266             image="restore.png" 
5954 13 Feb 12 nicklas 267             title="Restore" 
5954 13 Feb 12 nicklas 268             tooltip="<%=writePermission ? "Restore the selected (deleted) items" : "You do not have permission to edit variants" %>" 
5954 13 Feb 12 nicklas 269           />
5954 13 Feb 12 nicklas 270           <tbl:button 
6289 05 Jun 13 nicklas 271             id="btnColumns"
5954 13 Feb 12 nicklas 272             image="columns.png" 
5954 13 Feb 12 nicklas 273             title="Columns&hellip;" 
5954 13 Feb 12 nicklas 274             tooltip="Show, hide and re-order columns" 
5954 13 Feb 12 nicklas 275           />
5954 13 Feb 12 nicklas 276           <tbl:button 
6289 05 Jun 13 nicklas 277             id="btnImport"
6289 05 Jun 13 nicklas 278             data-plugin-type="IMPORT"
5954 13 Feb 12 nicklas 279             image="import.png" 
5954 13 Feb 12 nicklas 280             title="Import&hellip;" 
5954 13 Feb 12 nicklas 281             tooltip="Import data" 
5954 13 Feb 12 nicklas 282             visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
5954 13 Feb 12 nicklas 283           />
5954 13 Feb 12 nicklas 284           <tbl:button 
6289 05 Jun 13 nicklas 285             id="btnExport"
6289 05 Jun 13 nicklas 286             data-plugin-type="EXPORT"
5954 13 Feb 12 nicklas 287             image="export.png" 
5954 13 Feb 12 nicklas 288             title="Export&hellip;" 
5954 13 Feb 12 nicklas 289             tooltip="Export data" 
5954 13 Feb 12 nicklas 290             visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
5954 13 Feb 12 nicklas 291           />
5954 13 Feb 12 nicklas 292           <tbl:button 
6289 05 Jun 13 nicklas 293             id="btnRunPlugin"
6289 05 Jun 13 nicklas 294             data-plugin-type="OTHER"
5954 13 Feb 12 nicklas 295             image="runplugin.png" 
5954 13 Feb 12 nicklas 296             title="Run plugin&hellip;" 
5954 13 Feb 12 nicklas 297             tooltip="Run a plugin" 
5954 13 Feb 12 nicklas 298             visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
5954 13 Feb 12 nicklas 299           />
5954 13 Feb 12 nicklas 300           <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
7604 25 Feb 19 nicklas 301             wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/>
5954 13 Feb 12 nicklas 302         </tbl:toolbar>
5954 13 Feb 12 nicklas 303         <tbl:panel>
6182 23 Oct 12 nicklas 304           <tbl:presetselector />
5954 13 Feb 12 nicklas 305           <tbl:navigator
5954 13 Feb 12 nicklas 306             page="<%=cc.getPage()%>" 
5954 13 Feb 12 nicklas 307             rowsperpage="<%=cc.getRowsPerPage()%>" 
5954 13 Feb 12 nicklas 308             totalrows="<%=variants == null ? 0 : variants.getTotalCount()%>" 
5954 13 Feb 12 nicklas 309             visible="<%=mode.hasNavigator()%>"
5954 13 Feb 12 nicklas 310           />
5954 13 Feb 12 nicklas 311         </tbl:panel>
5954 13 Feb 12 nicklas 312       </div>
3799 28 Sep 07 nicklas 313       <tbl:data>
5948 08 Feb 12 nicklas 314         <tbl:headers>
5948 08 Feb 12 nicklas 315           <tbl:headerrow>
7943 04 May 21 nicklas 316             <tbl:header clazz="row-index bg-filled-100" />
5948 08 Feb 12 nicklas 317             <tbl:columnheaders />
5948 08 Feb 12 nicklas 318           </tbl:headerrow>
6706 02 Feb 15 nicklas 319           <%
6706 02 Feb 15 nicklas 320           int numFilters = cc.getNumPropertyFilters();
6706 02 Feb 15 nicklas 321           int numRows = cc.getFilterRows();
6706 02 Feb 15 nicklas 322           for (int filterNo = 0; filterNo < numRows; filterNo++)
6706 02 Feb 15 nicklas 323           {
6706 02 Feb 15 nicklas 324             boolean lastRow = filterNo == numRows-1;
6706 02 Feb 15 nicklas 325             %>
6706 02 Feb 15 nicklas 326             <tbl:headerrow>
7943 04 May 21 nicklas 327               <tbl:header subclass="row-index bg-filled-100">
7943 04 May 21 nicklas 328                 <div class="index-<%=mode.getName()%>">
7943 04 May 21 nicklas 329                   <div class="index"></div>
7943 04 May 21 nicklas 330                   <div class="check">
7943 04 May 21 nicklas 331                     <base:icon 
7943 04 May 21 nicklas 332                       subclass="link table-check"
7943 04 May 21 nicklas 333                       image="check_uncheck.png" 
7943 04 May 21 nicklas 334                       tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" 
7943 04 May 21 nicklas 335                       visible="<%=lastRow && mode.hasCheck()%>"
7943 04 May 21 nicklas 336                     />
7943 04 May 21 nicklas 337                   </div>
7943 04 May 21 nicklas 338                   <div class="icons">
7943 04 May 21 nicklas 339                     <base:icon
7943 04 May 21 nicklas 340                       subclass="link table-filter-row-action"
7943 04 May 21 nicklas 341                       image="add.png"
7943 04 May 21 nicklas 342                       tooltip="Add extra filter row"
7943 04 May 21 nicklas 343                       visible="<%=lastRow%>"
7943 04 May 21 nicklas 344                     /><base:icon
7943 04 May 21 nicklas 345                       subclass="link table-filter-row-action"
7943 04 May 21 nicklas 346                       image="remove.png"
7943 04 May 21 nicklas 347                       tooltip="Remove this filter row"
7943 04 May 21 nicklas 348                       visible="<%=numRows > 1 || numFilters > 0 %>"
7943 04 May 21 nicklas 349                       data-remove-row="<%=filterNo%>"
7943 04 May 21 nicklas 350                     />
7943 04 May 21 nicklas 351                   </div>
7943 04 May 21 nicklas 352                 </div>
6706 02 Feb 15 nicklas 353               </tbl:header>
6706 02 Feb 15 nicklas 354               <tbl:propertyfilter row="<%=filterNo%>" />
6706 02 Feb 15 nicklas 355             </tbl:headerrow>
6706 02 Feb 15 nicklas 356             <%
6706 02 Feb 15 nicklas 357           }
6706 02 Feb 15 nicklas 358           %>
7913 22 Feb 21 nicklas 359           <tbl:columnsubtitles />
5948 08 Feb 12 nicklas 360         </tbl:headers>
5948 08 Feb 12 nicklas 361         <tbl:rows>
3799 28 Sep 07 nicklas 362           <%
5954 13 Feb 12 nicklas 363           if (cc.getMessage() != null)
5954 13 Feb 12 nicklas 364           {
5954 13 Feb 12 nicklas 365             %>
6604 18 Nov 14 nicklas 366             <tbl:panel subclass="bg-filled-50">
5954 13 Feb 12 nicklas 367               <div class="messagecontainer error"><%=cc.getMessage()%></div>
5954 13 Feb 12 nicklas 368             </tbl:panel>
5954 13 Feb 12 nicklas 369             <%
5954 13 Feb 12 nicklas 370             cc.setMessage(null);
5954 13 Feb 12 nicklas 371           }
3799 28 Sep 07 nicklas 372           int index = cc.getPage()*cc.getRowsPerPage();
3799 28 Sep 07 nicklas 373           int selectedItemId = cc.getId();
3799 28 Sep 07 nicklas 374           if (variants != null)
3799 28 Sep 07 nicklas 375           {            
3799 28 Sep 07 nicklas 376             while (variants.hasNext())
3799 28 Sep 07 nicklas 377             {
3799 28 Sep 07 nicklas 378               PlatformVariant item = variants.next();
3799 28 Sep 07 nicklas 379               RawDataType rdt = item.getRawDataType();
3799 28 Sep 07 nicklas 380               int itemId = item.getId();
3799 28 Sep 07 nicklas 381               String name = HTML.encodeTags(item.getName());
3799 28 Sep 07 nicklas 382               String tooltip = mode.isSelectionMode() ? 
3799 28 Sep 07 nicklas 383                   "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); 
6221 10 Jan 13 nicklas 384               
3799 28 Sep 07 nicklas 385               index++;
3799 28 Sep 07 nicklas 386               numListed++;
3799 28 Sep 07 nicklas 387               %>
3799 28 Sep 07 nicklas 388               <tbl:row>
7943 04 May 21 nicklas 389                 <tbl:header clazz="row-index bg-filled-100">
7943 04 May 21 nicklas 390                   <div class="index-<%=mode.getName()%>">
7943 04 May 21 nicklas 391                     <div class="index <%=index>999?"index-smaller":""%>"><%=index%></div>
7943 04 May 21 nicklas 392                     <div class="check">
7943 04 May 21 nicklas 393                       <base:input
7943 04 May 21 nicklas 394                         type="checkbox" 
7943 04 May 21 nicklas 395                         name="<%=itemId%>" 
7943 04 May 21 nicklas 396                         value="<%=itemId%>" 
7943 04 May 21 nicklas 397                         title="<%=name%>" 
7943 04 May 21 nicklas 398                         checked="<%=cc.getSelected().contains(itemId)%>"
7943 04 May 21 nicklas 399                         visible="<%=mode.hasCheck()%>"
7943 04 May 21 nicklas 400                       />
7943 04 May 21 nicklas 401                       <base:input 
7943 04 May 21 nicklas 402                         type="radio" 
7943 04 May 21 nicklas 403                         name="item_id" 
7943 04 May 21 nicklas 404                         value="<%=itemId%>" 
7943 04 May 21 nicklas 405                         title="<%=name%>" 
7943 04 May 21 nicklas 406                         checked="<%=selectedItemId == itemId%>"
7943 04 May 21 nicklas 407                         visible="<%=mode.hasRadio()%>"
7943 04 May 21 nicklas 408                       />
7943 04 May 21 nicklas 409                     </div>
7943 04 May 21 nicklas 410                     <div class="icons">
8026 15 Dec 21 nicklas 411                       <base:icon
8026 15 Dec 21 nicklas 412                         image="star.png"
8026 15 Dec 21 nicklas 413                         tooltip="This is a default item for the current project"
8026 15 Dec 21 nicklas 414                         visible="<%=activeProject != null && activeProject.isDefaultItem(item)%>" 
8026 15 Dec 21 nicklas 415                       />
7943 04 May 21 nicklas 416                       <base:icon 
7943 04 May 21 nicklas 417                         image="deleted.png"
7943 04 May 21 nicklas 418                         id="<%="delete."+itemId %>"
7943 04 May 21 nicklas 419                         subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>"
7943 04 May 21 nicklas 420                         data-item-id="<%=itemId%>"
7943 04 May 21 nicklas 421                         tooltip="This item has been scheduled for deletion" 
7943 04 May 21 nicklas 422                         visible="<%=item.isRemoved()%>"
7943 04 May 21 nicklas 423                       />
7943 04 May 21 nicklas 424                     </div>
7943 04 May 21 nicklas 425                   </div>
7943 04 May 21 nicklas 426                 </tbl:header>
6289 05 Jun 13 nicklas 427                 <tbl:cell column="name"><div 
6289 05 Jun 13 nicklas 428                   class="link table-item"
6289 05 Jun 13 nicklas 429                   data-item-id="<%=itemId%>"
6289 05 Jun 13 nicklas 430                   data-no-edit="<%=writePermission ? 0 : 1 %>" 
6289 05 Jun 13 nicklas 431                   data-extra-url="&platform_id=<%=platformId%>"
6289 05 Jun 13 nicklas 432                   tabindex="0"
3799 28 Sep 07 nicklas 433                   title="<%=tooltip%>"><%=name%></div></tbl:cell>
4332 12 Jun 08 martin 434                 <tbl:cell column="id"><%=item.getId()%></tbl:cell>
5650 01 Jun 11 nicklas 435                 <tbl:cell column="platform"><base:propertyvalue 
5650 01 Jun 11 nicklas 436                     item="<%=item%>" property="platform"
5650 01 Jun 11 nicklas 437                     enableEditLink="<%=mode.hasEditLink()%>" 
5650 01 Jun 11 nicklas 438                     enablePropertyLink="<%=mode.hasPropertyLink()%>"/></tbl:cell>
3799 28 Sep 07 nicklas 439                 <tbl:cell column="externalId"><%=item.getExternalId()%></tbl:cell>
3799 28 Sep 07 nicklas 440                 <tbl:cell column="fileOnly"><%=item.isFileOnly() ? "yes" : "no"%></tbl:cell>
3799 28 Sep 07 nicklas 441                 <tbl:cell column="channels"><%=rdt == null ? "N/A" : rdt.getChannels()%></tbl:cell>
3799 28 Sep 07 nicklas 442                 <tbl:cell column="rawDataType">
3799 28 Sep 07 nicklas 443                   <%=item.isFileOnly() ? "N/A" : (rdt == null ? "<i>- any -</i>" : rdt.getName())%>
3799 28 Sep 07 nicklas 444                 </tbl:cell>
3799 28 Sep 07 nicklas 445                 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
6045 03 Apr 12 nicklas 446                 <tbl:xt-cells dc="<%=dc%>" item="<%=item%>">
6045 03 Apr 12 nicklas 447                   <tbl:cell column="xt-columns" />
6045 03 Apr 12 nicklas 448                 </tbl:xt-cells>
3799 28 Sep 07 nicklas 449               </tbl:row>
3799 28 Sep 07 nicklas 450               <%
3799 28 Sep 07 nicklas 451               }
3799 28 Sep 07 nicklas 452             }
5954 13 Feb 12 nicklas 453           if (numListed == 0)
5954 13 Feb 12 nicklas 454           {
5954 13 Feb 12 nicklas 455             %>
6604 18 Nov 14 nicklas 456             <tbl:panel subclass="bg-filled-50">
5954 13 Feb 12 nicklas 457               <div class="messagecontainer note">
5954 13 Feb 12 nicklas 458               <%=variants == null || variants.getTotalCount() == 0 ? "No variants were found" : "No variants on this page. Please select another page!" %>
5954 13 Feb 12 nicklas 459               </div>
5954 13 Feb 12 nicklas 460             </tbl:panel>
5954 13 Feb 12 nicklas 461             <%
5954 13 Feb 12 nicklas 462           }
3799 28 Sep 07 nicklas 463           %>
5954 13 Feb 12 nicklas 464         </tbl:rows>
3799 28 Sep 07 nicklas 465       </tbl:data>
3799 28 Sep 07 nicklas 466     </tbl:table>
6021 19 Mar 12 nicklas 467     <base:buttongroup subclass="dialogbuttons">
6311 23 Aug 13 nicklas 468       <base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" />
6311 23 Aug 13 nicklas 469       <base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
6311 23 Aug 13 nicklas 470       <base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" />
3799 28 Sep 07 nicklas 471     </base:buttongroup>
6289 05 Jun 13 nicklas 472     </t:tab>
6289 05 Jun 13 nicklas 473     </t:tabcontrol>
3799 28 Sep 07 nicklas 474
3799 28 Sep 07 nicklas 475   </base:body>
3799 28 Sep 07 nicklas 476   </base:page>
3799 28 Sep 07 nicklas 477   <%
3799 28 Sep 07 nicklas 478 }
3799 28 Sep 07 nicklas 479 finally
3799 28 Sep 07 nicklas 480 {
3799 28 Sep 07 nicklas 481   if (variants != null) variants.close();
3799 28 Sep 07 nicklas 482   if (dc != null) dc.close();
3799 28 Sep 07 nicklas 483 }
3799 28 Sep 07 nicklas 484 %>