Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@
>
<div local-class='banner'>
<img src='{{@institution.bannerUrl}}' alt='{{@institution.name}}'>
{{#if @institution.linkToExternalReportsArchive}}
<div>
<OsfLink
data-test-link-to-reports-archive
data-analytics-name='Link to archived reports'
@target='_blank'
@fakeButton={{true}}
@href={{@institution.linkToExternalReportsArchive}}
>
<EmberTooltip @side='bottom'>
{{t 'institutions.dashboard.download_past_reports_label'}}
</EmberTooltip>
<FaIcon
@icon='chart-pie'
/>
</OsfLink>
</div>
{{/if}}
</div>
<ul
data-analytics-scope='Dashboard tabs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,18 @@ input:checked + .slider::before {
margin-right: 5px;
font-weight: bold;
}

.download-button-group {
display: inline-flex;
padding-left: 10px;
align-content: center;

div {
color: #2d6a9f;
}

.download-dropdown {
margin-left: 3px;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,43 @@
</div>
{{/if}}
</BasicDropdown>
<div local-class='download-button-group'>
{{#if @institution.linkToExternalReportsArchive}}
<OsfLink
data-test-link-to-reports-archive
data-analytics-name='Link to archived reports'
@target='_blank'
@fakeButton={{true}}
@href={{@institution.linkToExternalReportsArchive}}
>
<EmberTooltip @side='bottom'>
{{t 'institutions.dashboard.download_past_reports_label'}}
</EmberTooltip>
<FaIcon @icon='chart-pie'/>
</OsfLink>
{{/if}}
<div local-class='download-dropdown'>
<ResponsiveDropdown @renderInPlace={{true}} @buttonStyling={{true}} as |dd| >
<dd.trigger data-test-download-dropdown local-class='download-dropdown-trigger'>
<FaIcon @icon='download' />
</dd.trigger>
<dd.content local-class='download-dropdown-content'>
<Button local-class='download-option' {{on 'click' (queue this.downloadCsv dd.close)}}>
{{t 'institutions.dashboard.format_labels.csv'}}
</Button>
<Button local-class='download-option' {{on 'click' (queue this.downloadTsv dd.close)}}>
{{t 'institutions.dashboard.format_labels.tsv'}}
</Button>
<Button local-class='download-option' {{on 'click' (queue this.downloadJsonTable dd.close)}}>
{{t 'institutions.dashboard.format_labels.json_table'}}
</Button>
<Button local-class='download-option' {{on 'click' (queue this.downloadJsonDirect dd.close)}}>
{{t 'institutions.dashboard.format_labels.json_direct'}}
</Button>
</dd.content>
</ResponsiveDropdown>
</div>
</div>
</div>
<PaginatedList::HasMany
local-class='table'
Expand Down
10 changes: 10 additions & 0 deletions app/institutions/dashboard/-components/object-list/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,13 @@
.blue-text-button {
color: $color-link-dark;
}

.download-dropdown-trigger {
color: $color-bg-blue-dark;
}

.download-button-group {
align-content: center;
display: inline-flex;
padding-left: 10px;
}
39 changes: 39 additions & 0 deletions app/institutions/dashboard/-components/object-list/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,45 @@ as |list|>
</div>
</dd.content>
</ResponsiveDropdown>
<div local-class='download-button-group'>
{{#if @institution.linkToExternalReportsArchive}}
<div>
<OsfLink
data-test-link-to-reports-archive
data-analytics-name='Link to archived reports'
@target='_blank'
@fakeButton={{true}}
@href={{@institution.linkToExternalReportsArchive}}
>
<EmberTooltip @side='bottom'>
{{t 'institutions.dashboard.download_past_reports_label'}}
</EmberTooltip>
<FaIcon
@icon='chart-pie'
/>
</OsfLink>
</div>
{{/if}}
<ResponsiveDropdown @renderInPlace={{true}} @buttonStyling={{true}} as |dd| >
<dd.trigger data-test-download-dropdown local-class='download-dropdown-trigger'>
<FaIcon @icon='download' />
</dd.trigger>
<dd.content local-class='download-dropdown-content'>
<Button
local-class='download-option'
{{on 'click' (queue this.downloadCsv dd.close)}}
>
{{t 'institutions.dashboard.format_labels.csv'}}
</Button>
<Button
local-class='download-option'
{{on 'click' (queue this.downloadTsv dd.close)}}
>
{{t 'institutions.dashboard.format_labels.tsv'}}
</Button>
</dd.content>
</ResponsiveDropdown>
</div>
</div>
</div>
<div local-class='table-wrapper'>
Expand Down
7 changes: 7 additions & 0 deletions translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,13 @@ institutions:
title: '{institutionName} Dashboard'
download_past_reports_label: 'Previous reports'
download_csv: 'Download CSV'
download_tsv: 'Download TSV'
format_labels:
csv: '.csv'
tsv: '.tsv'
json_table: 'JSON (table)'
json_direct: 'JSON (direct)'
download: 'Download'
select_default: 'All Departments'
users_list:
name: Name
Expand Down