Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(file): 2265 analysis query, table links
Browse files Browse the repository at this point in the history
Closes #2265
  • Loading branch information
alex-wilmer committed May 4, 2016
1 parent d1e1782 commit cfacb09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
14 changes: 8 additions & 6 deletions app/scripts/files/files.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,15 @@ module ngApp.files.controllers {
(this.file.data_format || '').toLowerCase() === 'bam';
}

makeSearchPageLink(files: IFile[] = []): string {
if (!files.length) {
return 0;
makeSearchPageLink(files: IFile[] = []): any {
if (files.length) {
var filterString = this.$filter("makeFilter")([{
field: 'files.file_id',
value: files.map(f => f.file_id)
}], true);
var href = 'search/f?filters=' + filterString;
return files.length ? "<a href='" + href + "'>" + files.length + '</a>' : '0';
}
var filterString = this.$filter("makeFilter")([{field: 'file_id', value: files.map(f => f.file_id)}], true);
var href = 'search/f?filters=' + filterString;
return files.length ? "<a href='" + href + "'>" + files.length + '</a>' : '0';
}

}
Expand Down
9 changes: 8 additions & 1 deletion app/scripts/files/templates/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,14 @@ <h4 class="list-group-item-heading">No Downstream Analyses Files Found.</h4>
</thead>
<tbody>
<tr data-ng-repeat="outf in fc.file.downstream_analyses track by outf.file_id">
<td>{{ ::outf.file_name || '--' }}</td>
<td
class="truncated-cell"
data-uib-tooltip="{{outf.file_name}}"
data-tooltip-append-to-body="true"
data-tooltip-popup-delay="1000"
>
<a data-ng-href="files/{{outf.file_id}}">{{ ::outf.file_name || '--' }}</a>
</td>
<td>{{ ::outf.data_category || '--' }}</td>
<td>{{ ::outf.data_type || '--' }}</td>
<td>{{ ::outf.data_format || '--' }}</td>
Expand Down

0 comments on commit cfacb09

Please sign in to comment.