forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport_view.rb
71 lines (71 loc) · 2.16 KB
/
report_view.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
class ApplicationHelper::Toolbar::ReportView < ApplicationHelper::Toolbar::Basic
button_group('ght_main', [
twostate(
:view_graph,
'fa fa-pie-chart',
N_('Graph View'),
nil,
:url => "explorer",
:url_parms => "?type=graph",
:klass => ApplicationHelper::Button::ViewGHT),
twostate(
:view_hybrid,
'fa fa fa-th-list',
N_('Hybrid View'),
nil,
:url => "explorer",
:url_parms => "?type=hybrid",
:klass => ApplicationHelper::Button::ViewGHT),
twostate(
:view_tabular,
'fa fa-file-text-o',
N_('Tabular View'),
nil,
:url => "explorer",
:url_parms => "?type=tabular",
:klass => ApplicationHelper::Button::ViewGHTAlways),
twostate(
:view_data,
'pficon pficon-filter',
N_('Data View'),
nil,
:url => "explorer",
:url_parms => "?type=data",
:klass => ApplicationHelper::Button::ViewGHTAlways),
])
button_group('download_main', [
select(
:download_choice,
'fa fa-download fa-lg',
N_('Download'),
nil,
:klass => ApplicationHelper::Button::ReportDownloadChoice,
:items => [
button(
:render_report_txt,
'fa fa-file-text-o fa-lg',
N_('Download this report in text format'),
N_('Download as Text'),
:keepSpinner => true,
:url_parms => "?render_type=txt",
:klass => ApplicationHelper::Button::RenderReport),
button(
:render_report_csv,
'fa fa-file-text-o fa-lg',
N_('Download this report in CSV format'),
N_('Download as CSV'),
:keepSpinner => true,
:url_parms => "?render_type=csv",
:klass => ApplicationHelper::Button::RenderReport),
button(
:render_report_pdf,
'pficon pficon-print fa-lg',
N_('Print or export this report in PDF format'),
N_('Print or export as PDF'),
:keepSpinner => true,
:klass => ApplicationHelper::Button::RenderReport,
:url_parms => "?render_type=pdf"),
]
),
])
end