Merge pull request #2669 from coreos-inc/app-repo-view

Add messaging if viewing a repo via the wrong path
This commit is contained in:
josephschorr 2017-05-26 17:22:36 -04:00 committed by GitHub
commit e3445a5723
3 changed files with 28 additions and 18 deletions

View file

@ -7,6 +7,10 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.error-view-element h2 .repo-circle {
margin-right: 16px;
}
.error-view-element h3 { .error-view-element h3 {
font-size: 24px; font-size: 24px;
} }

View file

@ -1,5 +1,19 @@
<div class="resource-view repository-view" <div class="resource-view repository-view"
resource="repositoryResource" resource="repositoryResource"
error-message="'Application not found'"> error-message="'Application not found'">
<!-- Image repository error -->
<div class="co-main-content-panel" ng-if="viewScope.repository.kind == 'image'">
<div class="error-view-element">
<h2><span class="repo-circle no-background" repo="viewScope.repository"></span>{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }}</h2>
<h3>This name refers to a <strong>container image</strong> repository</h3>
<div style="margin-bottom: 20px;">
View the <a href="/repository/{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }}/">{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }} image repository</a>
</div>
</div>
</div>
<!-- Application repository view -->
<div ng-if="viewScope.repository.kind == 'application'">
<app-public-view repository="viewScope.repository"></app-public-view> <app-public-view repository="viewScope.repository"></app-public-view>
</div>
</div> </div>

View file

@ -2,26 +2,18 @@
resource="repositoryResource" resource="repositoryResource"
error-message="'Repository not found'"> error-message="'Repository not found'">
<div class="page-content"> <div class="page-content">
<!-- New Public Repo Page experiment --> <!-- Application repository error -->
<div ng-if="newRepoExperiment" class="rp-mainPanel"> <div class="co-main-content-panel" ng-if="viewScope.repository.kind == 'application'">
<!-- React Components --> <div class="error-view-element">
<div class="rp-main col-md-8"> <h2><span class="repo-circle no-background" repo="viewScope.repository"></span>{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }}</h2>
<!-- Header --> <h3>This name refers to an <strong>application</strong> repository</h3>
<div class="rp-header"> <div style="margin-bottom: 20px;">
<rp-header name="repository.name" namespace="repository.namespace"></rp-header> View the <a href="/application/{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }}/">{{ viewScope.repository.namespace }}/{{ viewScope.repository.name }} application</a>
</div>
<!-- Body -->
<div>
<rp-body description="repository.description" repository="repository"></rp-body>
</div> </div>
</div> </div>
<!-- Sidebar -->
<div class="rp-sidebar col-md-4">
<rp-sidebar is-public="repository.is_public" tags="repository.tags" repository="repository"></rp-sidebar>
</div> </div>
</div> <!-- Image repository view -->
<!-- Old Repo Page --> <div ng-if="viewScope.repository.kind == 'image'">
<div ng-if="!newRepoExperiment">
<div class="cor-title"> <div class="cor-title">
<span class="cor-title-link"> <span class="cor-title-link">
<a class="back-link" href="/repository"> <a class="back-link" href="/repository">