Change all uses of am-time-ago to the <time-ago> component

This commit is contained in:
Joseph Schorr 2017-11-27 12:41:19 +02:00
parent 33af54d355
commit 2ea06d3df8
13 changed files with 15 additions and 20 deletions

View file

@ -9,7 +9,7 @@
<!-- Timing -->
<div class="timing" ng-if="showTime">
<i class="fa fa-clock-o"></i><span am-time-ago="build.started || 0"></span>
<i class="fa fa-clock-o"></i><time-ago datetime="build.started"></time-ago>
</div>
</div>

View file

@ -5,7 +5,7 @@
<div>
<span class="build-state-icon" build="build"></span>
<span class="timing">
<i class="fa fa-clock-o"></i><span am-time-ago="build.started || 0"></span>
<i class="fa fa-clock-o"></i><time-ago datetime="build.started"></time-ago>
</span>
<div class="build-description triggered-build-description" build="build"></div>

View file

@ -6,7 +6,7 @@
</div>
<div class="timing">
<i class="fa fa-clock-o"></i>
Started: <span am-time-ago="build.started || 0"></span>
Started: <time-ago datetime="build.started"></time-ago>
</div>
<div class="build-progress" build="build"></div>
</div>

View file

@ -20,7 +20,7 @@
<td>{{ status.requirement.count }}</td>
<td>{{ status.entitlement.product_name }}</td>
<td>{{ status.entitlement.count }}</td>
<td><span am-time-ago="status.entitlement.expiration.expiration_date" data-title="{{ status.entitlement.expiration.expiration_date }}" bs-tooltip></span></td>
<td><time-ago datetime="status.entitlement.expiration.expiration_date"></time-ago></td>
</tr>
</table>
</div>

View file

@ -147,10 +147,7 @@
<!-- Last Modified -->
<td class="hidden-xs">
<span bo-if="tag.last_modified" data-title="{{ tag.last_modified | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}" bs-tooltip>
<span am-time-ago="tag.last_modified"></span>
</span>
<span bo-if="!tag.last_modified">Unknown</span>
<time-ago datetime="tag.last_modified"></time-ago>
</td>
<!-- Security scanning -->

View file

@ -110,12 +110,12 @@
</td>
<td><span class="max-text" bo-text="key.service"></span></td>
<td>
<span am-time-ago="key.created_date"></span>
<time-ago datetime="key.created_date"></time-ago>
</td>
<td>
<span class="rotation" bo-if="key.expiration_date && willRotate(key)">
<i class="fa" ng-class="getExpirationInfo(key).icon"></i>
Automatically rotated <span am-time-ago="getRotationDate(key)"></span>
Automatically rotated <time-ago datetime="getRotationDate(key)"></time-ago>
</span>
<span bo-if="!willRotate(key)">
<a ng-click="showChangeExpiration(key)">

View file

@ -40,7 +40,7 @@
<div class="commit-information">
<span class="commit-who-when">
Authored
<span am-time-ago="build.trigger_metadata.commit_info.date"></span>
<time-ago datetime="build.trigger_metadata.commit_info.date"></time-ago>
<span class="anchor commit-who"
href="{{ build.trigger_metadata.commit_info.author.url }}"
is-only-text="!build.trigger_metadata.commit_info.author.url"

View file

@ -1,3 +1 @@
<span data-title="{{ item.last_modified | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}" bs-tooltip>
<span am-time-ago="item.last_modified"></span>
</span>
<time-ago datetime="item.last_modified"></time-ago>

View file

@ -1,7 +1,7 @@
<span class="expiration-status-view-element">
<span ng-if="::$ctrl.expirationDate" ng-class="::$ctrl.getExpirationInfo($ctrl.expirationDate).className" data-title="{{ $ctrl.expirationDate | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}" bs-tooltip>
<span ng-if="::$ctrl.expirationDate" ng-class="::$ctrl.getExpirationInfo($ctrl.expirationDate).className">
<i class="fa" ng-class="::$ctrl.getExpirationInfo($ctrl.expirationDate).icon"></i>
<span am-time-ago="$ctrl.expirationDate"></span>
<time-ago="$ctrl.expirationDate"></time-ago>
</a>
</span>
<span class="no-expiration" ng-if="::!$ctrl.expirationDate">

View file

@ -130,7 +130,7 @@
datafield="last_updated_datetime"
templateurl="/static/js/directives/ui/manage-trigger-githost/repository-last-updated.html">
<script type="text/ng-template" id="/static/js/directives/ui/manage-trigger-githost/repository-last-updated.html">
<span am-time-ago="item.last_updated_datetime"></span>
<time-ago datetime="item.last_updated_datetime"></time-ago>
</script>
</cor-table-col>
<cor-table-col title="Description"

View file

@ -49,7 +49,7 @@
<div class="timing">
<i class="fa fa-clock-o"></i>
Build started
<span am-time-ago="build.started || 0"></span>
<time-ago datetime="build.started"></time-ago>
</div>
</div>

View file

@ -29,7 +29,7 @@
first-line-only="true"></markdown-view>
</p>
<p class="result-info-bar">
<span class="info-span">Last Modified: <span am-time-ago="result.last_modified * 1000"></span></span>
<span class="info-span">Last Modified: <time-ago datetime="result.last_modified * 1000"></time-ago></span>
<span class="info-span activity">
activity
<span class="strength-indicator" value="::result.popularity"

View file

@ -46,7 +46,7 @@
</tr>
<tr>
<td>Last Updated:</td>
<td ng-if="syncInfo.last_updated"><span am-time-ago="syncInfo.last_updated"></span> at {{ syncInfo.last_updated | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}</td>
<td ng-if="syncInfo.last_updated"><time-ago datetime="syncInfo.last_updated"></time-ago></td>
<td ng-if="!syncInfo.last_updated" style="color: #aaa;">Never</td>
</tr>
</table>