<table listing-table class="listing-ct images-listing">
    <thead>
        <tr ng-if="!listing.inline">
            <td colspan="4">
                <a class="pull-right" ng-click="createImageStream()">
                    <i translate class="pficon pficon-add-circle-o"></i>
                    <span translate>New image stream</span>
                </a>
                <h3 translate>Images</h3>
            </td>
        </tr>
        <tr>
            <th class="listing-ct-toggle"></th>
            <th translate>Tags</th>
            <th translate>Author</th>
            <th translate>Last Updated</th>
        </tr>
    </thead>
    <tbody ng-repeat-start="(link, stream) in imagestreams() track by link"
           ng-init="sid = stream.metadata.namespace + '/' + stream.metadata.name"
           data-id="{{ sid }}" class="active" ng-class="{open: listing.expanded(sid)}">
        <tr ng-if="!listing.inline" ng-click="listing.activate(sid)" class="listing-ct-item imagestream-item">
            <td ng-click="listing.toggle(sid, $event)"
                class="listing-ct-toggle">
                <i class="fa fa-fw"></i>
            </td>
            <th colspan="4">
              {{ sid }}
              <div class="listing-status" ng-repeat="statustags in stream.status.tags">
                <span ng-repeat="condition in statustags.conditions"
                    ng-if="condition.type == 'ImportSuccess' && condition.status == 'False'"
                    class="pficon pficon-warning-triangle-o"></span>
                </div>
              </div>
            </th>
        </tr>
        <tr class="listing-ct-panel" ng-if="listing.expanded(sid)" ng-init="id = sid">
            <td listing-panel kind="ImageStream" colspan="4"></td>
        </tr>
    </tbody>
    <tbody ng-repeat="tag in stream.status.tags track by tag.tag"
           ng-init="iid = sid + ':' + tag.tag" data-id="{{ iid }}"
           ng-class="{open: listing.expanded(iid), last: $last, first: $first}">
        <tr ng-click="listing.activate(iid)" class="listing-ct-item tag-item"
            ng-repeat-start="image in imageByTag(tag)">
            <td ng-click="listing.toggle(iid, $event)"
                class="listing-ct-toggle">
                <i class="fa fa-fw"></i>
            </td>
            <td class="tag-label"><span class="image-tag">:{{ tag.tag }}</span></td>
            <td colspan="3" class="container">
                <div class="row">
                    <div class="col col-xs-12"><tt>{{ image.metadata.name }}</tt></div>
                </div>
                <div class="row">
                    <div class="col col-xs-6 text-left" ng-if="conf.author">{{ conf.author }}</div>
                    <div class="col col-xs-6 text-left" ng-if="!conf.author">{{ image.dockerImageMetadata.Author }}</div>
                    <div class="col col-xs-6" title="{{ tag.items[0].created }}">{{ tag.items[0].created | dateRelative }}</div>
                </div>
            </td>
        </tr>
        <tr class="listing-ct-panel" ng-if="listing.expanded(iid)" ng-init="id = iid" ng-repeat-end="">
            <td image-panel colspan="4"></td>
        </tr>
    </tbody>
    <tbody data-ng-rubbish="" ng-if="0" ng-repeat-end>
    </tbody>
    <thead class="listing-ct-empty" ng-if="!quiet">
        <tr>
            <td colspan="4" ng-if="!failure" translate>No image streams are present.</td>
            <td colspan="4" ng-if="failure">{{failure}}</td>
        </tr>
    </thead>
</table>
