<div class="DashboardList" ng-hide="noJobTemplates">
    <div class="DashboardList-header">
        <h3 class="DashboardList-headerText">
            <translate>RECENTLY USED TEMPLATES</translate>
        </h3>
        <a href="/#/templates" class="DashboardList-viewAll">
            <translate>VIEW ALL</translate>
        </a>
    </div>
    <div class="DashboardList-container">
        <table class="List-table">
           <tr class="List-tableHeaderRow">
                <th class="List-tableHeader DashboardList-tableHeader--name">
                        <translate>Name</translate>
                </th>
                <th class="List-tableHeader DashboardList-tableHeader--activity">
                  <translate>Activity</translate>
                </th>
                <th class="List-tableHeader DashboardList-tableHeader--actions">
                  <translate>Actions</translate>
                </th>
           </tr>
           <tr class="List-tableRow"
                ng-repeat = "template in templates">
              <td class="DashboardList-nameCell">
                  <a ng-href="#/templates/{{template.type}}/{{template.id}}" class="DashboardList-nameContainer">
                      {{ template.name }}
                  </a>
              </td>
              <td class="DashboardList-activityCell">
                  <aw-smart-status jobs="template.recent_jobs" template-type="template.type"></aw-smart-status>
              </td>
              <td class="List-actionsContainer">
                  <div class="List-actionButtonCell">
                      <at-launch-template template="template"
                          ng-show="template.can_start">
                      </at-launch-template>
                  </div>
               </td>
           </tr>
        </table>
    </div>
</div>
<div class="DashboardList" ng-show="noJobTemplates">
    <div class="DashboardList-header">
        <h3 class="DashboardList-headerText">
            <translate>RECENTLY USED JOB TEMPLATES</translate>
        </h3>
    </div>
    <div class="DashboardList-container">
        <p class="DashboardList-noJobs"><translate>No job templates were recently used.</translate><br />
        <!-- TODO: Seems $sce.trustAsHtml() does not work here. -->
        <translate>You can create a job template <a href="#/templates/add_job_template">here</a>.</translate></p>
    </div>
</div>
<prompt prompt-data="promptData" on-finish="launchJob()"></prompt>
