                     view = new DetailsView
                         collection: @selected_units
                 else
-                    @contents.reset()
+                    @contents.close()
 
             if view?
                 # todo: animations

    class SMItemView extends Marionette.ItemView
        templateHelpers:
            t: i18n.t
        getTemplate: ->
            return jade.get_template @template


            @isHidden = false
            @render()

    class TitleBarView extends SMItemView
        template: 'embedded-title-bar'
        events:
            'click a': 'preventDefault'
            'click .show-button': 'toggleShow'
            'click .panel-heading': 'collapseCategoryMenu'

        initialize: ->
            @listenTo(app.vent, 'administration-divisions-fetched', @receiveData)
            @listenTo(app.vent, 'details_view:show', @hide)
            @listenTo(app.vent, 'details_view:hide', @show)

        receiveData: (divisionNamePartials) ->
            @divisionNamePartials = divisionNamePartials
        serializeData:
            titleText: @divisionNamePartials
        show: ->
            @delegateEvents
            @$el.removeClass 'hide'
