Reporting buttons area. Data download button
This commit is contained in:
parent
3faabda3f2
commit
987adc97ce
@ -6,3 +6,11 @@
|
||||
li.facet-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#opencase_reporting_buttons {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#opencase_reporting_buttons #download-data{
|
||||
float: right;
|
||||
}
|
||||
|
3
modules/opencase_reporting/js/opencase-reporting.js
Normal file
3
modules/opencase_reporting/js/opencase-reporting.js
Normal file
@ -0,0 +1,3 @@
|
||||
jQuery('#opencase_reporting_buttons #download-data').click(function() {
|
||||
location.href = location.href + "&_format=csv";
|
||||
});
|
@ -3,3 +3,5 @@ opencase-reporting-lib:
|
||||
css:
|
||||
theme:
|
||||
css/opencase-reporting.css: {}
|
||||
js:
|
||||
js/opencase-reporting.js: {}
|
||||
|
@ -22,7 +22,7 @@ class Presets extends BlockBase {
|
||||
*/
|
||||
public function build() {
|
||||
return array(
|
||||
'#presets' => array(array('title'=>'me', 'url'=>'you'), array('title'=>'them', 'url'=>'us')),
|
||||
'#presets' => array(array('title'=>'me and you', 'basis'=>'actors', 'filter'=>'&f%5B0%5D=actor_type%3Afat&f%5B1%5D=created%3A2018-09'), array('title'=>'them', 'basis'=>'actors')),
|
||||
'#theme' => 'opencase_reporting_presets'
|
||||
);
|
||||
}
|
||||
|
@ -1,11 +1,5 @@
|
||||
<select id="opencase_reporting_new">
|
||||
<option disabled selected>Start a new report</option>
|
||||
<option value="/opencase/reporting/actors">Actor based</option>
|
||||
<option value="/opencase/reporting/cases">Case based</option>
|
||||
</select>
|
||||
<select id="opencase_reporting_presets_load">
|
||||
<option disabled selected>Load a preset</option>
|
||||
{% for preset in presets %}
|
||||
<option value={{ preset.url }}>{{ preset.title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div id="opencase_reporting_buttons">
|
||||
<button id="update-preset">Update template</button>
|
||||
<button id="save-as-new-preset">Save as new template</button>
|
||||
<button id="download-data">Download data</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user