<!--

    Copyright (c) 2015-2018 Red Hat, Inc.
    This program and the accompanying materials are made
    available under the terms of the Eclipse Public License 2.0
    which is available at https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
      Red Hat, Inc. - initial API and implementation

-->
<md-content class="factory-from-workspace" flex>
  <div class="factory-from-workspace-search" id="search-factory">
    <che-search che-placeholder="Search for workspaces"
                ng-model="factoryFromWorkspaceCtrl.workspaceFilter.config.name"></che-search>
  </div>
  <span class="projects-list-workspace-name">{{factoryFromWorkspaceCtrl.getWorkspaceName(workspaceId)}}</span>
  <span ng-show="(workspaces | filter:factoryFromWorkspaceCtrl.workspaceFilter).length == 0 && workspaces.length > 0"
        class="workspace-list-empty">No workspaces found</span>
  </che-list-title>
  <che-list>
    <che-list-item ng-show="(factoryFromWorkspaceCtrl.workspaces | filter:factoryFromWorkspaceCtrl.workspaceFilter).length > 0"
                   ng-repeat="workspace in factoryFromWorkspaceCtrl.workspaces | filter:factoryFromWorkspaceCtrl.workspaceFilter"
                   flex-gt-sm="100" flex="33" ng-mouseover="hover=true" ng-mouseout="hover=false">
      <div layout-gt-sm="row" flex="100" layout-align="start center" class="project-list-row"
           ng-click="factoryFromWorkspaceCtrl.getFactoryContentFromWorkspace(workspace)">
        <div class="workspace-list-static-icon" layout-align="center center">
          <div class="workspace-icon">
            <md-icon md-font-icon="fa fa-server"></md-icon>
          </div>
        </div>
        <div flex layout="column"
             layout-align-gt="start center"
             layout-align-sm="center center">
          <div class="project-name">
            <a class="codenvy-hover" id="workspace-name">{{workspace.config.name}}</a>
          </div>
        </div>
      </div>
    </che-list-item>
  </che-list>
</md-content>
