File tree Expand file tree Collapse file tree 6 files changed +108
-18
lines changed
app/institutions/dashboard/-components
institutional-dashboard-wrapper Expand file tree Collapse file tree 6 files changed +108
-18
lines changed Original file line number Diff line number Diff line change 88 >
99 <div local-class =' banner' >
1010 <img src =' {{ @institution.bannerUrl }} ' alt =' {{ @institution.name }} ' >
11- {{ #if @institution.linkToExternalReportsArchive }}
12- <div >
13- <OsfLink
14- data-test-link-to-reports-archive
15- data-analytics-name =' Link to archived reports'
16- @target =' _blank'
17- @fakeButton ={{ true }}
18- @href ={{ @institution.linkToExternalReportsArchive }}
19- >
20- <EmberTooltip @side =' bottom' >
21- {{ t ' institutions.dashboard.download_past_reports_label' }}
22- </EmberTooltip >
23- <FaIcon
24- @icon =' chart-pie'
25- />
26- </OsfLink >
27- </div >
28- {{ /if }}
2911 </div >
3012 <ul
3113 data-analytics-scope =' Dashboard tabs'
Original file line number Diff line number Diff line change @@ -277,3 +277,18 @@ input:checked + .slider::before {
277277 margin-right : 5px ;
278278 font-weight : bold ;
279279}
280+
281+ .download-button-group {
282+ display : inline-flex ;
283+ padding-left : 10px ;
284+ align-content : center ;
285+
286+ div {
287+ color : #2d6a9f ;
288+ }
289+
290+ .download-dropdown {
291+ margin-left : 3px ;
292+ }
293+ }
294+
Original file line number Diff line number Diff line change 6464 </div >
6565 {{ /if }}
6666 </BasicDropdown >
67+ <div local-class =' download-button-group' >
68+ {{ #if @institution.linkToExternalReportsArchive }}
69+ <OsfLink
70+ data-test-link-to-reports-archive
71+ data-analytics-name =' Link to archived reports'
72+ @target =' _blank'
73+ @fakeButton ={{ true }}
74+ @href ={{ @institution.linkToExternalReportsArchive }}
75+ >
76+ <EmberTooltip @side =' bottom' >
77+ {{ t ' institutions.dashboard.download_past_reports_label' }}
78+ </EmberTooltip >
79+ <FaIcon @icon =' chart-pie' />
80+ </OsfLink >
81+ {{ /if }}
82+ <div local-class =' download-dropdown' >
83+ <ResponsiveDropdown @renderInPlace ={{ true }} @buttonStyling ={{ true }} as |dd| >
84+ <dd .trigger data-test-download-dropdown local-class =' download-dropdown-trigger' >
85+ <FaIcon @icon =' download' />
86+ </dd .trigger>
87+ <dd .content local-class =' download-dropdown-content' >
88+ <Button local-class =' download-option' {{ on ' click' (queue this.downloadCsv dd.close )}} >
89+ {{ t ' institutions.dashboard.format_labels.csv' }}
90+ </Button >
91+ <Button local-class =' download-option' {{ on ' click' (queue this.downloadTsv dd.close )}} >
92+ {{ t ' institutions.dashboard.format_labels.tsv' }}
93+ </Button >
94+ <Button local-class =' download-option' {{ on ' click' (queue this.downloadJsonTable dd.close )}} >
95+ {{ t ' institutions.dashboard.format_labels.json_table' }}
96+ </Button >
97+ <Button local-class =' download-option' {{ on ' click' (queue this.downloadJsonDirect dd.close )}} >
98+ {{ t ' institutions.dashboard.format_labels.json_direct' }}
99+ </Button >
100+ </dd .content>
101+ </ResponsiveDropdown >
102+ </div >
103+ </div >
67104 </div >
68105 <PaginatedList::HasMany
69106 local-class =' table'
Original file line number Diff line number Diff line change 118118.blue-text-button {
119119 color : $color-link-dark ;
120120}
121+
122+ .download-dropdown-trigger {
123+ color : $color-bg-blue-dark ;
124+ }
125+
126+ .download-button-group {
127+ align-content : center ;
128+ display : inline-flex ;
129+ padding-left : 10px ;
130+ }
Original file line number Diff line number Diff line change @@ -66,6 +66,45 @@ as |list|>
6666 </div >
6767 </dd .content>
6868 </ResponsiveDropdown >
69+ <div local-class =' download-button-group' >
70+ {{ #if @institution.linkToExternalReportsArchive }}
71+ <div >
72+ <OsfLink
73+ data-test-link-to-reports-archive
74+ data-analytics-name =' Link to archived reports'
75+ @target =' _blank'
76+ @fakeButton ={{ true }}
77+ @href ={{ @institution.linkToExternalReportsArchive }}
78+ >
79+ <EmberTooltip @side =' bottom' >
80+ {{ t ' institutions.dashboard.download_past_reports_label' }}
81+ </EmberTooltip >
82+ <FaIcon
83+ @icon =' chart-pie'
84+ />
85+ </OsfLink >
86+ </div >
87+ {{ /if }}
88+ <ResponsiveDropdown @renderInPlace ={{ true }} @buttonStyling ={{ true }} as |dd| >
89+ <dd .trigger data-test-download-dropdown local-class =' download-dropdown-trigger' >
90+ <FaIcon @icon =' download' />
91+ </dd .trigger>
92+ <dd .content local-class =' download-dropdown-content' >
93+ <Button
94+ local-class =' download-option'
95+ {{ on ' click' (queue this.downloadCsv dd.close )}}
96+ >
97+ {{ t ' institutions.dashboard.format_labels.csv' }}
98+ </Button >
99+ <Button
100+ local-class =' download-option'
101+ {{ on ' click' (queue this.downloadTsv dd.close )}}
102+ >
103+ {{ t ' institutions.dashboard.format_labels.tsv' }}
104+ </Button >
105+ </dd .content>
106+ </ResponsiveDropdown >
107+ </div >
69108 </div >
70109 </div >
71110 <div local-class =' table-wrapper' >
Original file line number Diff line number Diff line change @@ -813,6 +813,13 @@ institutions:
813813 title : ' {institutionName} Dashboard'
814814 download_past_reports_label : ' Previous reports'
815815 download_csv : ' Download CSV'
816+ download_tsv : ' Download TSV'
817+ format_labels :
818+ csv : ' .csv'
819+ tsv : ' .tsv'
820+ json_table : ' JSON (table)'
821+ json_direct : ' JSON (direct)'
822+ download : ' Download'
816823 select_default : ' All Departments'
817824 users_list :
818825 name : Name
You can’t perform that action at this time.
0 commit comments