1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/Live/templates/_dataTableViz_visitorLog.twig
diosmosis 0af1f22f72 Indent actions belonging to a pageview (#14063)
* Proof of concept for grouping actions by the page they occur in.

* Add pageview to goals/ecommerce actionDetails in Live.getLastVisitsDetails.

* Make count of actions to display when collapsed configurable.

* Quick selector fix.

* unfinished commit

* Collapse multiple adjacent content items in the visitor log.

* Get content collapsing to work w/ 3.x-dev changes.

* Forgot to add Live config file.

* Get to work w/ visitor profile and make sure last action does not have border so it looks like it correctly ends.

* Fix some issues from review.

* More styling tweaks.

* another styling tweak

* Update screenshots.

* Show page refreshes and allow expanding them in new implementation.

* Update some screenshots.

* Make sure tooltip is replaced correctly when showing refreshes.

* Another styling tweak.

* Add UI test + fix page refresh issue.

* Fix action group merging logic.

* Fix another actions grouping issue.

* Fixes for ending left border in certain edge cases.

* Another UI tweak.

* comparison threshold, random failure fix, update screenshots + another css tweak

* more css tweaks

* possible bug fix

* Last couple CSS fixes.

* More test fixes.
2019-05-14 16:43:15 -07:00

55 خطوط
2.6 KiB
Twig

{% set displayVisitorsInOwnColumn = (isWidget ? false : true) %}
{% set cycleIndex=0 %}
{% for visitor in dataTable.getRows() %}
{% set visitorRow %}
<div class="card row hoverable">
{% if visitor.getColumn('visitorId') is not empty and not clientSideParameters.hideProfileLink %}
<a class="visitor-log-visitor-profile-link visitorLogTooltip" data-visitor-id="{{ visitor.getColumn("visitorId") }}">
<img src="plugins/Live/images/visitorProfileLaunch.png"/> <span>{{ 'Live_ViewVisitorProfile'|translate }}
{%- if visitor.getColumn('userId') is not empty %}: {{ visitor.getColumn('userId')|rawSafeDecoded }}{% endif %}</span>
</a>
{% endif %}
{% set cycleIndex=cycleIndex+1 %}
<div class="col s12 m{% if displayVisitorsInOwnColumn %}3{% else %}4{% endif %}">
{{ postEvent('Live.renderVisitorDetails', visitor) }}
</div>
{% if displayVisitorsInOwnColumn %}
<div class="col s12 m2 own-visitor-column">
{{ postEvent('Live.renderVisitorIcons', visitor) }}
</div>
{% endif %}
<div class="col s12 m{% if displayVisitorsInOwnColumn %}7{% else %}8{% endif %} column {% if visitor.getColumn('visitConverted') and not isWidget %}highlightField{% endif %}">
{{ postEvent('Live.visitorLogViewBeforeActionsInfo', visitor) }}
<strong>
{% set actionCount = visitor.getColumn('actionDetails')|length %}
{% if visitor.truncatedActionsCount is defined %}
{% set actionCount = actionCount + visitor.truncatedActionsCount %}
{% endif %}
{{ actionCount }}
{% if actionCount <= 1 %}
{{ 'General_Action'|translate }}
{% else %}
{{ 'General_Actions'|translate }}
{% endif %}
{% if visitor.getColumn('visitDuration') > 0 %}- {{ visitor.getColumn('visitDurationPretty')|raw }}{% endif %}
</strong>
<div class="visitor-log-page-list">
<ol class='visitorLog actionList'>
{% include "@Live/_actionsList.twig" with {'actionGroups': visitor.getColumn('actionGroups'), 'visitInfo': visitor} %}
</ol>
</div>
{{ postEvent('Live.visitorLogViewAfterActionsInfo', visitor) }}
</div>
</div>
{% endset %}
{{ visitorRow }}
{% endfor %}