Changeset 6587


Ignore:
Timestamp:
Nov 3, 2014, 9:42:31 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1881: Export search results in file list page

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/filemanager/files/index.jsp

    r6308 r6587  
    5353  import="net.sf.basedb.core.plugin.GuiContext"
    5454  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
     55  import="net.sf.basedb.clients.web.plugins.PathLoader"
    5556  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
    5657  import="net.sf.basedb.clients.web.extensions.JspContext"
     
    7172  private static final ItemContext searchContext = Base.createDefaultContext("name", "path,name,size,description,actions");
    7273  private static final Item itemType = Item.FILE;
     74 
     75  private static void registerExportUtils(ItemContext cc)
     76  {
     77    // Path
     78    cc.setObject("export.dataloader.path", new PathLoader());
     79  }
     80
    7381%>
    7482<%
     
    390398    dc = sc.newDbControl();
    391399    cc.configureQuery(dc, query, true);
     400    registerExportUtils(cc);
    392401    cc.setQuery(query);
    393402    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.list(itemType), null);
     
    401410    // Run an export plugin in single-item context
    402411    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, subcontext, pageContext, defaultContext);
     412    registerExportUtils(cc);
    403413    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&subcontext="+subcontext+"&context_type=ITEM&title=Export+file";
    404414  }
  • trunk/www/filemanager/files/list_files.jsp

    r6308 r6587  
    336336        title="Path"
    337337        property="directory.name"
     338        exportproperty="path"
    338339        tooltip="Only the immediate parent directory can be searched or sorted"
    339340        datatype="string"
     
    617618            title="Import&hellip;"
    618619            tooltip="Import data"
    619             visible="<%=!isSearch && pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
     620            visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
    620621          />
    621622          <tbl:button
     
    625626            title="Export&hellip;"
    626627            tooltip="Export data"
    627             visible="<%=!isSearch && pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
     628            visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
    628629          />
    629630          <tbl:button
     
    633634            title="Run plugin&hellip;"
    634635            tooltip="Run a plugin"
    635             visible="<%=!isSearch && pluginCount.containsKey(Plugin.MainType.OTHER)%>"
     636            visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    636637          />
    637638          <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
Note: See TracChangeset for help on using the changeset viewer.