     getNavigationParams: (opts = {id: null, except: []}) ->
       obj =
         preview: (opts.id if opts.id)
-        search_term: (@props.query.search_term if @props.search_term)
+        search_term: (@props.query.search_term if @props.query.search_term)
         only_preview: (@state.otherItemsString if @state.otherItemsString)
 
       _.each obj, (v, k) ->


    render: withReactDOM ->
      ReactModal {isOpen: true, onRequestClose: @closeModal, closeTimeoutMS: 10},
        div {className: 'ef-file-preview-overlay'},            
          div {className: 'ef-file-preview-header'},
            div {className: 'grid-row middle-xs'},
              div {className: 'col-xs-6'},

                  a {
                    className: 'ef-file-preview-header-download ef-file-preview-button'
                    href: @state.displayedItem?.get('url')
                    style: {'border-right': '1px solid #8c8c8c'} if @state.showInfoPanel
                  },
                    i {className: 'icon-download'} #Replace with actual icon
                    " " + I18n.t('file_preview_headerbutton_download', 'Download')
                  button {
                    className: if @state.showInfoPanel then 'ef-file-preview-button--active btn-link ef-file-preview-header-info ef-file-preview-button' else 'btn-link ef-file-preview-header-info ef-file-preview-button'
                    onClick: @toggle('showInfoPanel')
                  },
                    i {className: 'icon-info'}
                    ' ' + I18n.t('file_preview_headerbutton_info', 'Info')
                  ReactRouter.Link {
                    to: @getRouteIdentifier(),
                    query: @getNavigationParams(except: 'only_preview'),
                    params: @props.params,
                    className: 'ef-file-preview-header-close ef-file-preview-button',
                    style: {'border-left': '1px solid #8c8c8c'} if @state.showInfoPanel
                  },
                    i {className: 'icon-end'}
                    ' ' + I18n.t('file_preview_headerbutton_close', 'Close')


          div {className: 'ef-file-preview-stretch'},
            div {className: 'ef-file-preview-content'},
              # We need to render out the left/right arrows
              @renderArrowLink('left') if @state.otherItems?.length > 0
              if @state.displayedItem
