           </button>
         </form>
         <a href="#" id="toggle-view-archived" class="btn btn-default">
-          Show archived tracings
+          <%= toggleViewArchivedText() %>
         </a>
+        <% if (showArchiveAllButton()) { %>
         <a href="#" id="archive-all" class="btn btn-default">
           Archive all
         </a>
+        <% } %>
       </div>
     <% } %>
 


    @childViewOptions.parent = @

    datasetCollection = @model.get("dataSets")
    @listenTo(datasetCollection, "sync", (collection, dataSets) =>
      @templateHelpers.activeDataSets = collection.filter( (dataset) -> dataset.get("isActive") )
      @render()
    )
    datasetCollection.fetch(silent : true)



  archiveAll : () ->
    unarchivedAnnoationIds = _.pluck(@collection.models, "id")
    $.ajax(
      url: jsRoutes.controllers.AnnotationController.finishAll("Explorational").url
      type: "POST",
      contentType: "application/json"
      data: JSON.stringify({
        annotations: unarchivedAnnoationIds
      })
    ).done( (data) =>
      Toast.message(data.messages)
