     isPublished and plan.isOpen and plan.type isnt 'event'
 
   buildPlanClasses: (plan, publishStatus, isPublishing, isPublished, isActive) ->
-    planClasses = classnames 'plan-label-long', "course-plan-#{plan.id}", "is-#{publishStatus}",
+    planClasses = classnames 'plan-label-long', "course-plan-#{plan.id}",
       'is-published'  : isPublished
       'is-publishing' : isPublishing
       'is-open'       : plan.isOpen
       'is-trouble'    : plan.isTrouble
-      'active'        : isActive
+      'active'        : isActive,
+      "is-#{publishStatus}": publishStatus
 
   renderDisplay: (hasQuickLook, hasReview, planClasses, display) ->
     {rangeDuration, offset, offsetFromPlanStart, index} = display

    @setState(publishState)

  componentWillMount: ->
    @subscribeToPublishing(@props.item.plan)
    @syncRoute()
    location = @context.router.getLocation()
    location.addChangeListener(@syncRoute)

  componentWillReceiveProps: (nextProps) ->
    if @props.item.plan.id isnt nextProps.item.plan.id
      @subscribeToPublishing(nextProps.item.plan)
      @stopCheckingPlan(@props.item.plan)
    else if nextProps.item.plan.isPublishing and not @props.item.plan.isPublishing
      @subscribeToPublishing(nextProps.item.plan)


    activeHeight: 35

  getInitialState: ->
    @getStateByProps()

  getStateByProps: (props) ->
    props ?= @props

    {item} = props
    {plan} = item

    publishStatus = PlanPublishStore.getAsyncStatus(plan.id)

    isViewingStats: @_doesPlanMatchesRoute(props)
    publishStatus: publishStatus
    isPublishing: PlanPublishStore.isPublishing(plan.id)
    isHovered: false
    isPublished: plan.is_published

  # utility functions for functions called in lifecycle methods
  _doesPlanMatchesRoute: (props) ->
    props ?= @props

    {item} = props
    {plan} = item

    {planId} = @context.router.getCurrentParams()
    planId is plan.id

  _getExpectedRoute: (isViewingStats) ->
    closedRouteName = 'calendarByDate'
