Changeset 7311 for trunk/www/admin/datafiletypes/list_filetypes.jsp
- Timestamp:
- Mar 21, 2017, 9:09:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/admin/datafiletypes/list_filetypes.jsp
r7269 r7311 33 33 import="net.sf.basedb.core.PlatformVariant" 34 34 import="net.sf.basedb.core.PlatformFileType" 35 import="net.sf.basedb.core.ItemSubtypeFileType" 35 36 import="net.sf.basedb.core.ItemQuery" 36 37 import="net.sf.basedb.core.Include" … … 101 102 platformQuery.restrict(Restrictions.eq(Hql.property("dataFileType"), Expressions.parameter("fileType"))); 102 103 platformQuery.order(Orders.asc(Hql.property("platform.name"))); 104 105 // Query to get the item subtypes a file type is registerd with 106 final ItemQuery<ItemSubtypeFileType> subtypeQuery = ItemSubtypeFileType.getQuery((DataFileType)null); 107 subtypeQuery.include(cc.getInclude()); 108 subtypeQuery.restrict(Restrictions.eq(Hql.property("dataFileType"), Expressions.parameter("fileType"))); 109 subtypeQuery.order(Orders.asc(Hql.property("itemSubtype.name"))); 103 110 104 111 // Get all file types … … 221 228 title="Platforms" 222 229 property="&platforms(platform.name)" 230 datatype="string" 231 filterable="true" 232 /> 233 <tbl:columndef 234 id="subtypes" 235 title="Subtypes" 236 property="&itemSubtypes(itemSubtype.name)" 223 237 datatype="string" 224 238 filterable="true" … … 466 480 %> 467 481 </tbl:cell> 482 <tbl:cell column="subtypes"> 483 <% 484 subtypeQuery.setParameter("fileType", itemId, Type.INT); 485 try 486 { 487 String separator = ""; 488 for (ItemSubtypeFileType st : subtypeQuery.list(dc)) 489 { 490 ItemSubtype s = st.getItemSubtype(); 491 out.write(separator); 492 if (mode.hasPropertyLink()) 493 { 494 out.write(Base.getLinkedName(ID, s, false, mode.hasEditLink())); 495 } 496 else 497 { 498 out.write(HTML.encodeTags(s.getName())); 499 } 500 separator = ", "; 501 } 502 } 503 catch (Throwable t) 504 { 505 %> 506 <div class="error"><%=t.getMessage()%></div> 507 <% 508 } 509 %> 510 </tbl:cell> 468 511 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 469 512 <tbl:xt-cells dc="<%=dc%>" item="<%=item%>">
Note: See TracChangeset
for help on using the changeset viewer.