Skip to content

Commit

Permalink
Merge pull request #913 from newswangerd/backport/author-detail
Browse files Browse the repository at this point in the history
Merge pull request #912 from newswangerd/author-detail-extravaganza-r…
  • Loading branch information
Chris Houseknecht authored Jul 17, 2018
2 parents 81d0351 + f4c8cf5 commit 9c314e9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 41 deletions.
44 changes: 30 additions & 14 deletions galaxyui/src/app/authors/detail/author-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div id="author-detail" class="container-fluid">

<div class="row" *ngIf="!authorNotFound">
<div class="col-sm-12">
<div class="namespace">
<div class="col-sm-6">
<div class="namespace namespace-header-left">
<div class="namespace-details">
<div class="namespace-img">
<table class="img-wrapper">
Expand Down Expand Up @@ -32,14 +32,24 @@
</p>
</div>
</div>
</div>
</div>

<div class="col-sm-3">
<div class="namespace namespace-header-right">
<div class="content-summary">
<div *ngFor="let count of namespace.contentCounts" class="content-count">
<div *ngFor="let count of namespace.contentCounts" class="namespace-content-count">
<span class="{{ count.iconClass }}"></span>
<strong>{{count.count}}</strong> {{count.title}}
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="namespace namespace-header-right" *ngIf="namespace.html_url">
<a target="_blank" href="{{ namespace.html_url }}" class="btn btn-default primary-action"><span class="fa fa-github"></span> View on GitHub</a>
</div>
</div>
</div>

<div class="row detail-search-toolbar" *ngIf="!authorNotFound">
Expand Down Expand Up @@ -72,34 +82,40 @@
<a [routerLink]="['/', item.summary_fields['namespace']['name'], item.name]"
class="repo-name" tooltip="View content details">{{ item.name }}</a>
</div>
<div class="list-pf-description text-overflow-pf"><span class="repo-description">{{ item.description }}</span></div>
<div class="list-pf-description">{{ item.description }}</div>
</div>
<div class="list-pf-additional-content counts">
<div class="repo-count">
<div class="list-pf-additional-content">
<div class="content-count">
<i class="fa fa-download"></i>
<span class="count">{{ item.download_count }}</span>
<span class="count-label">Downloads</span>
</div>
<div class="repo-count">

<div class="content-count">
<i class="fa fa-eye"></i>
<span class="count">{{ item.watchers_count }}</span>
<span class="count-label">Watchers</span>
</div>
<div class="repo-count">

<div class="content-count">
<i class="fa fa-star"></i>
<span class="count">{{ item.stargazers_count }}</span>
<span class="count-label">Stars</span>
</div>
<div class="repo-count">

<div class="content-count">
<i class="fa fa-copy"></i>
<span class="count">{{ item.forks_count }}</span>
<span class="count-label">Forks</span>
</div>
<div class="travis" *ngIf="item.travis_build_url">
<a href="{{ item.travis_build_url }}" target="_blank" tooltip="View Travis build output. Opens in new tab or window.">
<img src="{{ item.travis_status_url }}"
class="travis-status-img" title="Travis Build Status" />
</a>

<div *ngIf="item.travis_build_url">
<div class="travis">
<a href="{{ item.travis_build_url }}" target="_blank" tooltip="View Travis build output. Opens in new tab or window.">
&nbsp; <img src="{{ item.travis_status_url }}"
class="travis-status-img" title="Travis Build Status" />
</a>
</div>
</div>
</div>
</div>
Expand Down
45 changes: 21 additions & 24 deletions galaxyui/src/app/authors/detail/author-detail.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,34 @@
flex-grow: 1;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
margin-top: 30px;
padding-left: 15px;
padding-right: 15px;
}

.namespace-header-left{
justify-content: flex-start;
}

.namespace-header-right{
@media(min-width: 800px){
height: 120px;
justify-content: flex-end;
}
}

.namespace-details,
.content-summary {
flex-grow: 1;
flex-shrink: 1;

}

.namespace-content-count {
font-size: 16px;
font-weight: 700;
color: @black;
}

.namespace-details {
display: flex;
flex-wrap: nowrap;
Expand Down Expand Up @@ -66,15 +83,6 @@
}
}
}
.content-count {
display: inline-block;
color: @black;
font-size: 14px;
margin-right: 15px;
}
.detail-search-toolbar {
margin-top: 40px;
}
.repository-list {
margin-top: 20px;
}
Expand All @@ -83,26 +91,15 @@
.repo-count {
font-size: 12px;
}
.list-pf-additional-content.counts {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: middle;
}

.list-pf-additional-content.counts > div {
.content-count{
font-size: 12px;
margin-right: 15px;
margin-right: 5px;
.fa {
font-size: 14px;
}
.count {
font-weight: 700;
padding: 0 5px;
}
}
.list-pf-additional-content.counts div:last-child {
margin-right: 0;
}
}
6 changes: 3 additions & 3 deletions galaxyui/src/app/authors/detail/author-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ export class AuthorDetailComponent implements OnInit {
if (!item.description) {
// Legacy Repository objects are missing a description. Will get fixed on first import.
if (item.summary_fields['content_objects']) {
for (let i = 0; i < item.summary_fields['content_objects'].length; i++) {
if (item.summary_fields['content_objects'][i]['description']) {
item.description = item.summary_fields['content_objects'][i]['description'];
for (const contentObject of item.summary_fields.content_objects) {
if (contentObject.description) {
item.description = contentObject.description;
break;
}
}
Expand Down

0 comments on commit 9c314e9

Please sign in to comment.