Reporting buttons area. Data download button
This commit is contained in:
parent
3faabda3f2
commit
987adc97ce
@ -6,3 +6,11 @@
|
|||||||
li.facet-item {
|
li.facet-item {
|
||||||
list-style-type: none;
|
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:
|
css:
|
||||||
theme:
|
theme:
|
||||||
css/opencase-reporting.css: {}
|
css/opencase-reporting.css: {}
|
||||||
|
js:
|
||||||
|
js/opencase-reporting.js: {}
|
||||||
|
@ -22,7 +22,7 @@ class Presets extends BlockBase {
|
|||||||
*/
|
*/
|
||||||
public function build() {
|
public function build() {
|
||||||
return array(
|
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'
|
'#theme' => 'opencase_reporting_presets'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
<select id="opencase_reporting_new">
|
<div id="opencase_reporting_buttons">
|
||||||
<option disabled selected>Start a new report</option>
|
<button id="update-preset">Update template</button>
|
||||||
<option value="/opencase/reporting/actors">Actor based</option>
|
<button id="save-as-new-preset">Save as new template</button>
|
||||||
<option value="/opencase/reporting/cases">Case based</option>
|
<button id="download-data">Download data</button>
|
||||||
</select>
|
</div>
|
||||||
<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>
|
|
||||||
|
Reference in New Issue
Block a user