diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-05 07:11:23 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-05 07:11:23 +0400 |
commit | 9e19f249150a142b5fe97e96175beb847323862c (patch) | |
tree | 275c157f9a1e4f15bd756b9483299e5ac8bf64c7 /plugins/CoreVisualizations/templates | |
parent | e898bc2998e672f76defd8b7a996865b759d1aa4 (diff) |
Refs #4041, #4040 add new CoreVisualizations plugin and move HtmlTable, Cloud & JqplotGraph visualizations to it and improve UIIntegration test debug output.
Diffstat (limited to 'plugins/CoreVisualizations/templates')
3 files changed, 55 insertions, 0 deletions
diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig new file mode 100644 index 0000000000..1347218af0 --- /dev/null +++ b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig @@ -0,0 +1,27 @@ +<table cellspacing="0" class="dataTable"> + {% include "@CoreHome/_dataTableHead.twig" %} + + <tbody> + {% for rowId, row in dataTable.getRows() %} + {%- set rowHasSubtable = row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} + {%- set shouldHighlightRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') and properties.highlight_summary_row -%} + + {# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #} + {% if not rowHasSubtable or not properties.visualization_properties.show_expanded|default(false) or not properties.replace_row_with_subtable|default(false) %} + <tr {% if rowHasSubtable %}id="{{ row.getIdSubDataTable() }}"{% endif %} + class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}"> + {% for column in properties.columns_to_display %} + <td> + {% include "@CoreHome/_dataTableCell.twig" with properties %} + </td> + {% endfor %} + </tr> + {% endif %} + + {# display subtable if present and showing expanded datatable #} + {% if properties.visualization_properties.show_expanded|default(false) and rowHasSubtable %} + {% include properties.visualization_properties.subtable_template with {'dataTable': row.getSubtable()} %} + {% endif %} + {% endfor %} + </tbody> +</table>
\ No newline at end of file diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_jqplotGraph.twig b/plugins/CoreVisualizations/templates/_dataTableViz_jqplotGraph.twig new file mode 100644 index 0000000000..e980275ac6 --- /dev/null +++ b/plugins/CoreVisualizations/templates/_dataTableViz_jqplotGraph.twig @@ -0,0 +1,10 @@ +<div class="jqplot-graph"> + <div class="piwik-graph" + style="width: {{ properties.visualization_properties.graph_width }}; height: {{ properties.visualization_properties.graph_height }};" + data-data="{{ data|e('html') }}" + {% if properties.visualization_properties.external_series_toggle %} + data-external-series-toggle="{{ properties.visualization_properties.external_series_toggle }}" + data-external-series-show-all="{% if properties.visualization_properties.external_series_toggle_show_all %}1{% else %}0{% endif %}" + {% endif %}> + </div> +</div>
\ No newline at end of file diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig b/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig new file mode 100644 index 0000000000..1513daca34 --- /dev/null +++ b/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig @@ -0,0 +1,18 @@ +{% set cloudColumn = properties.columns_to_display[1] %} +<div class="tagCloud"> +{% for word,value in cloudValues %} + <span title="{{ value.word }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }} + {# we strike tags with 0 hits #} + {% if value.value == 0 %}valueIsZero{% endif %}"> + {% if labelMetadata[value.word].url is not sameas(false) %} + <a href="{{ labelMetadata[value.word].url }}" target="_blank"> + {% endif %} + {% if labelMetadata[value.word].logo is not sameas(false) %} + <img src="{{ labelMetadata[value.word].logo }}" width="{{ value.logoWidth }}" /> + {% else %} + {{ value.wordTruncated }} + {% endif %} + {% if labelMetadata[value.word].url is not sameas(false) %}</a>{% endif %} + </span> +{% endfor %} +</div>
\ No newline at end of file |