{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

{{!
  DON'T TRY TO PUT OUTLET INTO CONDITIONAL STATES
  https://github.com/emberjs/ember.js/issues/3187 - CLOSED BUT NOT FIXED YET
}}


{{#unless App.viewEnabled}}
  {{#if App.viewErrors.length}}
    <div class="alert alert-danger">
      {{#each error in App.viewErrors}}
        <div class="error-message">{{{error.message}}}</div>
      {{/each}}
    </div>
  {{/if}}
{{/unless}}

<div class="slider-header">
  {{#view view.SliderTitleView}}
    <h3 class="pull-left" id="slider-title"><span class="slider-app-title">{{App.label}}</span></h3>
    {{#if view.showCreateAppButton}}
      <div class="box-header pull-right">
        {{#if App.sliderUser}}
          <div class="pull-left view-user">
            <i class="icon-user"></i>&nbsp;{{App.sliderUser}}
          </div>
        {{/if}}
        <div class="create-app pull-right">
          <a href="#" class="btn btn-primary" {{bind-attr disabled="App.viewDisabled"}} {{action createApp}}>
            <i class="icon-plus"></i><span>&nbsp;{{t slider.apps.create}}</span>
          </a>
        </div>
      </div>
    {{/if}}
  {{/view}}
  {{outlet bs-tooltip-box}}
</div>

{{outlet}}
