diff --git a/pdf_file/templates/pdf_file/relatorios.html b/pdf_file/templates/pdf_file/relatorios.html index 1332307..b0fffb7 100644 --- a/pdf_file/templates/pdf_file/relatorios.html +++ b/pdf_file/templates/pdf_file/relatorios.html @@ -13,7 +13,7 @@ array_history.push(["{{data_json.0}}","{{data_json.1}}","{{data_json.2}}",{% if data_json.3 is not None %}new Date('{{data_json.3.isoformat}}'){% else%}null{% endif %}]); {% endfor%} var json_history = {"data":array_history}; - var column_history = [{"string":'{% trans "User" %}'},{"string":'{% trans "Group" %}'},{"string":'{% trans "Action" %}'},{"date":'{% trans "Date of Action" %}'}]; + var column_history = [{"string":"{% trans 'User' %}"},{"string":"{% trans 'Group' %}"},{"string":"{% trans 'Action' %}"},{"date":"{% trans 'Date of Action' %}"}]; var search = []; for (var i in json_history["data"]){ @@ -21,20 +21,12 @@ json_history["data"][i][2],json_history["data"][i][3]]); } - - var array_did = []; - {%for data_json in json_did.data%} - array_did.push(["{{data_json.0}}","{{data_json.1}}","{{data_json.2}}",{% if data_json.3 is not None %}new Date('{{data_json.3.isoformat}}'){% else%}null{% endif %}]); - {% endfor%} - var json_did = {"data":array_did}; - var column_did = [{"string":'{% trans "User" %}'},{"string":'{% trans "Group" %}'},{"string":'{% trans "Action" %}'},{"date":'{% trans "Date of Action" %}'}]; - var array_n_did = []; {%for data_json in json_n_did.data%} - array_n_did.push(["{{data_json.0}}","{{data_json.1}}"]); + array_n_did.push(['',"{{data_json.0}}","{{data_json.1}}", "{{data_json.2}}"]); {% endfor%} var json_n_did = {"data":array_n_did}; - var column_n_did = [{"string":'{% trans "User" %}'},{"string":'{% trans "Group" %}'}]; + var column_n_did = [{"string":'{% trans "Enviar mensagem" %}'},{"string":'{% trans "User" %}'},{"string":'{% trans "Group" %}'},{"string":"Action don't realized"}]; @@ -82,17 +74,12 @@ putpagination(json_n_did["data"]); } else if (col == "{{did_table}}" && text("#title-table") != "{{did_table}}"){ - if (length("#link-history") <= 0){ - add(element,"#view-table",true); - } - altertitle("{{did_table}}"); search = []; - for (var i in json_did["data"]){ - search.push([json_did["data"][i][0],json_did["data"][i][1], - json_did["data"][i][2],json_did["data"][i][3]]); + for (var i in json_history["data"]){ + search.push([json_history["data"][i][0],json_history["data"][i][1], + json_history["data"][i][2],json_history["data"][i][3]]); } - drawTable(column_did,pagination(json_did["data"],1),true,3); - putpagination(json_did["data"]); + searcher(col, true); } } chart.setSelection([]) @@ -125,7 +112,7 @@ var table = new google.visualization.Table(document.getElementById('table_div')); - table.draw(data_table, {showRowNumber: true, width: '100%', height: '100%'}); + table.draw(data_table, {allowHtml: true, cssClassNames : {tableRow: 'text-center',tableCell: 'text-center', headerCell: 'text-center'},showRowNumber: true, width: '100%', height: '100%'}); } {% endblock%} @@ -218,6 +205,7 @@