Skip to content
Extraits de code Groupes Projets
Valider 7ea06776 rédigé par Benaka Moorthi's avatar Benaka Moorthi
Parcourir les fichiers

Refs #3089, show location of visit when visit clicked in visitor profile.

parent 864ae9db
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -157,6 +157,7 @@ class Controller extends \Piwik\Controller ...@@ -157,6 +157,7 @@ class Controller extends \Piwik\Controller
{ {
$view = new View('@Live/getSingleVisitSummary.twig'); $view = new View('@Live/getSingleVisitSummary.twig');
$view->visitData = Request::processRequest('Live.getSingleVisitSummary'); $view->visitData = Request::processRequest('Live.getSingleVisitSummary');
$view->showLocation = true;
echo $view->render(); echo $view->render();
} }
......
...@@ -194,6 +194,7 @@ ...@@ -194,6 +194,7 @@
var $latestVisitSection = $('.visitor-profile-latest-visit', $element); var $latestVisitSection = $('.visitor-profile-latest-visit', $element);
$latestVisitSection $latestVisitSection
.html(response) .html(response)
.parent()
.effect('highlight', {color: '#FFFFCB'}, 1200); .effect('highlight', {color: '#FFFFCB'}, 1200);
}); });
ajax.setFormat('html'); ajax.setFormat('html');
......
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
position:relative; position:relative;
float:left; float:left;
min-height:145px; min-height:145px;
margin-right:15px; margin:12px 15px 0 0;
padding:12px 0 4px; padding-bottom:4px;
} }
.visitor-profile-avatar > div:first-child { .visitor-profile-avatar > div:first-child {
...@@ -182,6 +182,10 @@ ...@@ -182,6 +182,10 @@
} }
} }
.visitor-profile-latest-visit {
position:relative;
}
.visitor-profile-latest-visit-column { .visitor-profile-latest-visit-column {
padding-top:6px; padding-top:6px;
display:inline-block; display:inline-block;
...@@ -513,6 +517,18 @@ div.visitor-profile-navigation { ...@@ -513,6 +517,18 @@ div.visitor-profile-navigation {
font-size:13px; font-size:13px;
} }
.visitor-profile-latest-visit-loc {
display:inline-block;
position:absolute;
right:0;
top:-24px;
> span {
font-style:italic;
font-size:13px;
}
}
.widget .visitor-profile { .widget .visitor-profile {
min-width: 100% !important; min-width: 100% !important;
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<li><span>{{ customVariable[name]|truncate(30) }}</span>{% if customVariable[value]|length > 0 %}<strong>{{ customVariable[value]|truncate(50) }}</strong>{% endif %}</li> <li><span>{{ customVariable[name]|truncate(30) }}</span>{% if customVariable[value]|length > 0 %}<strong>{{ customVariable[value]|truncate(50) }}</strong>{% endif %}</li>
{% endmacro %} {% endmacro %}
{% import _self as macros %} {% import _self as macros %}
{% if showLocation|default(false) %}
<div class="visitor-profile-latest-visit-loc">
<img src="{{ visitData.countryFlag }}" title="{{ visitData.country }}"/>&nbsp;<span>{% if visitData.city is not empty %}{{ visitData.city }}{% else %}{{ visitData.country }}{% endif %}</span>
</div>
{% endif %}
<div class="visitor-profile-latest-visit-column"> <div class="visitor-profile-latest-visit-column">
<ul> <ul>
<li><span>{{ 'General_IP'|translate }}</span><strong>{{ visitData.visitIp }}</strong></li> <li><span>{{ 'General_IP'|translate }}</span><strong>{{ visitData.visitIp }}</strong></li>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
{% if visitorData.nextVisitorId is not empty %}<a class="visitor-profile-next-visitor" href="#" title="{{ 'Live_NextVisitor'|translate }}">&rarr;</a>{% endif %} {% if visitorData.nextVisitorId is not empty %}<a class="visitor-profile-next-visitor" href="#" title="{{ 'Live_NextVisitor'|translate }}">&rarr;</a>{% endif %}
</div> </div>
<div class="visitor-profile-latest-visit"> <div class="visitor-profile-latest-visit">
{% include "@Live/getSingleVisitSummary.twig" with {'visitData': visitorData.lastVisits.getFirstRow().getColumns()} %} {% include "@Live/getSingleVisitSummary.twig" with {'visitData': visitorData.lastVisits.getFirstRow().getColumns(), 'showLocation': false} %}
</div> </div>
</div> </div>
<p style="clear:both; border:none!important;"></p> <p style="clear:both; border:none!important;"></p>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<h1>{{ 'UserCountry_Location'|translate }}</h1> <h1>{{ 'UserCountry_Location'|translate }}</h1>
<p> <p>
{%- for entry in visitorData.countries -%} {%- for entry in visitorData.countries -%}
{{- 'Live_VisitsFrom'|translate('<strong>', entry.nb_visits, '</strong>')|raw }} <img src="{{ entry.flag }}"/>&nbsp;{{ entry.prettyName }}{% if not loop.last %}, {% endif %} {{- 'Live_VisitsFrom'|translate('<strong>', entry.nb_visits, '</strong>')|raw }} <img src="{{ entry.flag }}" title="{{ entry.prettyName }}"/>&nbsp;{{ entry.prettyName }}{% if not loop.last %}, {% endif %}
{%- endfor %} {%- endfor %}
<a class="visitor-profile-show-map" href="#">({{ 'Live_ShowMap_js'|translate }})</a> <a class="visitor-profile-show-map" href="#">({{ 'Live_ShowMap_js'|translate }})</a>
</p> </p>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter