Ignore:
Timestamp:
2009-04-17T19:44:48+12:00 (15 years ago)
Author:
ak19
Message:

The PreviewButton's response had not been updated to load the page of a collection if this was nested in a collectiongroup. Adjusted relevant classes to make the PreviewButton work in the collection group case as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/PreviewButton.java

    r18987 r19041  
    7474    }
    7575    protected void configureHomeURL() {
     76    // we could be working with standalone collections or collection groups
     77    // so getting a collection-name may have a collection group prefix
     78    // This means CollectionManager.getLoadedCollectionName() is no longer sufficient
     79    String collGroupWithName = CollectionManager.getLoadedColNameWithGroup(true);
     80
    7681    // set up the home page for the current collection
    7782    if (Gatherer.GS3 && !Configuration.fedora_info.isActive()) { // GLI for GS3 case
    7883        // don't do anything fancy here
    79         preview_address = Configuration.library_url.toString() + Configuration.getServletPath() + "?a=p&sa=about&c=" + CollectionManager.getLoadedCollectionName() + "&l=" + Configuration.getLanguage();
     84        preview_address = Configuration.library_url.toString() + Configuration.getServletPath()
     85        + "?a=p&sa=about&c=" + collGroupWithName + "&l=" + Configuration.getLanguage();
    8086        return;
    8187    }
     
    8692   
    8793    // FLI or GLI for GS2 case (no library_url)
    88     preview_address = Configuration.library_url.toString() + "?c=" + CollectionManager.getLoadedCollectionName() + "&l=" + Configuration.getLanguage();
     94    preview_address = Configuration.library_url.toString() + "?c=" + collGroupWithName + "&l=" + Configuration.getLanguage();
    8995
    9096    String main_args = "&a=p&p=about";
Note: See TracChangeset for help on using the changeset viewer.