Bug 22168: Improve styling of new chart settings for reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / chart.inc
1 <div class="modal" id="chartModal" tabindex="-1" role="dialog" aria-labelledby="chartModalLabel">
2     <div class="modal-dialog modal-wide" role="document">
3         <div class="modal-content">
4             <div class="modal-header">
5                 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6                 <h4 class="modal-title" id="chartModalLabel">Chart settings</h4>
7             </div>
8             <div class="modal-body" id="makechart">
9                 [% supposed_x = header_row.shift.cell %]
10                 <fieldset class="rows">
11                     <ol>
12                         <li>
13                             <label for="chart-type">Chart type: </label>
14                             <select name="chart-type" id="chart-type">
15                                 <option value="pie">Pie</option>
16                                 <option value="bar">Bar</option>
17                                 <option value="line">Line</option>
18                             </select>
19                         </li>
20
21                         <li id="chart-column-horizontal">
22                             <label for="horizontal">Horizontal bar:</label>
23                             <input id="horizontal" name="column-horizontal" type="checkbox" />
24                         </li>
25
26                         <li>
27                             <label for="x_element">x column:</label>
28                             <select id="x_element" name="x">
29                                 <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
30                                 [% FOREACH header IN header_row %]
31                                     <option value="[% header.cell | html %]">[% header.cell | html %]</option>
32                                 [% END %]
33                             </select>
34                         </li>
35
36                         <li>
37                             <label for="include-all">Include all rows (ignore pagination):</label>
38                             <input id="include-all" name="chart-include-all" type="checkbox" />
39                         </li>
40
41                         <li>
42                             <label for="exclude-last">Exclude last line (Rollup): </label>
43                             <input id="exclude-last" name="chart-exclude-last" type="checkbox" />
44                         </li>
45                         [% column = 1 %]
46                         <li class="column_config_row">
47                             [% FOREACH header IN header_row %]
48                                 <fieldset class="chart-column-conf" id="column_[% column | html %]">
49                                     <legend>
50                                         Column [% column | html %]
51                                         <a class="chart-column-delete" href="#" data-column="[% column | html %]">
52                                             <i class="fa fa-remove error"></i>
53                                         </a>
54                                     </legend>
55                                     <div>
56                                         <label for="y_[% column | html %]" >y:</label>
57                                         <select id="y_[% column | html %]" name="y">
58                                             <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
59                                             [% FOREACH h IN header_row %]
60                                                 [% IF header.cell == h.cell %]
61                                                     <option value="[% h.cell | html %]" selected>[% h.cell | html %]</option>
62                                                 [% ELSE %]
63                                                     <option value="[% h.cell | html %]">[% h.cell | html %]</option>
64                                                 [% END %]
65                                         [% END %]
66                                         </select>
67                                     </div>
68
69                                     <div class="chart-column-group">
70                                         [% i = 1 %]
71                                         <label for="group_[% column | html %]">Group:</label>
72                                         <select id="group_[% column | html %]" name="group">
73                                             [% FOREACH h IN header_row %]
74                                                 [% IF i == column %]
75                                                     <option value="[% i | html %]" selected>[% i | html %]</option>
76                                                 [% ELSE %]
77                                                     <option value="[% i | html %]">[% i | html %]</option>
78                                                 [% END %]
79                                                 [% i = i + 1 %]
80                                             [% END %]
81                                         </select>
82                                     </div>
83
84                                     <div class="chart-column-line">
85                                         <label for="line_[% column | html %]">Line:</label>
86                                         <input class="column-line" id="line_[% column | html %]" name="[% header.cell | html %]" type="checkbox" />
87                                     </div>
88                                 </fieldset>
89                                 [% column = column + 1 %]
90                             [% END %]
91                         </li>
92                     </ol>
93                 </fieldset>
94
95                 [% item = { cell = supposed_x } %]
96                 [% header_row.unshift(item) | html %]
97             </div>
98             <div class="modal-footer">
99                 <button id="draw-chart" class="btn btn-default">Draw</button>
100                 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
101             </div>
102         </div>
103     </div>
104 </div>