Handle empty repos
This commit is contained in:
parent
927b280f1a
commit
f160483af4
2 changed files with 60 additions and 49 deletions
|
@ -353,6 +353,12 @@ p.editable:hover i {
|
|||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.repo .empty-message {
|
||||
padding: 6px;
|
||||
font-size: 1.8em;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.repo dl.dl-horizontal dt {
|
||||
width: 60px;
|
||||
}
|
||||
|
|
|
@ -50,60 +50,65 @@
|
|||
<i class="icon-edit"></i>
|
||||
</p>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li>
|
||||
<span class="tag-dropdown dropdown" title="Tags">
|
||||
<i class="icon-bookmark"></i>
|
||||
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">{{currentTag.name}} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="tag in repo.tags">
|
||||
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name + '/tag/' + tag.name }}">{{tag.name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</li>
|
||||
<li id="current-image-tab" class="active" ng-click="showTab('current-image')"><a href="javascript:void(0)">Current Image</a></li>
|
||||
<li id="image-history-tab" ng-click="showTab('image-history')"><a href="javascript:void(0)">Image History</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="current-image">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Created</dt>
|
||||
<dd am-time-ago="parseDate(currentTag.image.created)"></dd>
|
||||
|
||||
<dt>ID</dt>
|
||||
<dd>{{ currentTag.image.id }}</dd>
|
||||
</dl>
|
||||
|
||||
<div ng-show="currentTag.image.comment">
|
||||
<strong>Description:</strong>
|
||||
<blockquote style="margin-top: 10px;" ng-bind-html-unsafe="getMarkedDown(currentTag.image.comment)">
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="repo-content" ng-show="!currentTag.image">
|
||||
<div class="empty-message">(This repository is empty)</div>
|
||||
</div>
|
||||
|
||||
<div id="image-history" style="display: none">
|
||||
<div ng-hide="imageHistory">
|
||||
<div class="spin"></div>
|
||||
<div class="repo-content" ng-show="currentTag.image">
|
||||
<!-- Tab bar -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li>
|
||||
<span class="tag-dropdown dropdown" title="Tags">
|
||||
<i class="icon-bookmark"></i>
|
||||
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">{{currentTag.name}} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="tag in repo.tags">
|
||||
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name + '/tag/' + tag.name }}">{{tag.name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</li>
|
||||
<li id="current-image-tab" class="active" ng-click="showTab('current-image')"><a href="javascript:void(0)">Current Image</a></li>
|
||||
<li id="image-history-tab" ng-click="showTab('image-history')"><a href="javascript:void(0)">Image History</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="current-image">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Created</dt>
|
||||
<dd am-time-ago="parseDate(currentTag.image.created)"></dd>
|
||||
<dt>ID</dt>
|
||||
<dd>{{ currentTag.image.id }}</dd>
|
||||
</dl>
|
||||
|
||||
<div ng-show="currentTag.image.comment">
|
||||
<strong>Description:</strong>
|
||||
<blockquote style="margin-top: 10px;" ng-bind-html-unsafe="getMarkedDown(currentTag.image.comment)">
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="imageHistory">
|
||||
<table class="images">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Created</td>
|
||||
<td>Comment</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<div id="image-history" style="display: none">
|
||||
<div ng-hide="imageHistory">
|
||||
<div class="spin"></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="imageHistory">
|
||||
<table class="images">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Created</td>
|
||||
<td>Comment</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr ng-repeat="image in imageHistory">
|
||||
<td class="image-id" title="{{ image.id }}">{{ image.id }}</td>
|
||||
<td><span am-time-ago="parseDate(image.created)"></span></td>
|
||||
<td ng-bind-html-unsafe="getCommentFirstLine(image.comment)"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr ng-repeat="image in imageHistory">
|
||||
<td class="image-id" title="{{ image.id }}">{{ image.id }}</td>
|
||||
<td><span am-time-ago="parseDate(image.created)"></span></td>
|
||||
<td ng-bind-html-unsafe="getCommentFirstLine(image.comment)"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Reference in a new issue