Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-11 02:52:17 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-11 02:52:17 +0400
commit7ea067760f53e0069830469a688fdde32ec67a00 (patch)
tree880a43aebd87d3555b60c3696c253cf96d073f49 /plugins/Live
parent864ae9db5ba22b6c9162fec29bda38e17e98736f (diff)
Refs #3089, show location of visit when visit clicked in visitor profile.
Diffstat (limited to 'plugins/Live')
-rw-r--r--plugins/Live/Controller.php1
-rw-r--r--plugins/Live/javascripts/visitorProfile.js1
-rw-r--r--plugins/Live/stylesheets/visitor_profile.less20
-rw-r--r--plugins/Live/templates/getSingleVisitSummary.twig5
-rw-r--r--plugins/Live/templates/getVisitorProfilePopup.twig4
5 files changed, 27 insertions, 4 deletions
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index dd4ee328b6..30f56a43d7 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -157,6 +157,7 @@ class Controller extends \Piwik\Controller
{
$view = new View('@Live/getSingleVisitSummary.twig');
$view->visitData = Request::processRequest('Live.getSingleVisitSummary');
+ $view->showLocation = true;
echo $view->render();
}
diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js
index 71e94f606a..a926dba375 100644
--- a/plugins/Live/javascripts/visitorProfile.js
+++ b/plugins/Live/javascripts/visitorProfile.js
@@ -194,6 +194,7 @@
var $latestVisitSection = $('.visitor-profile-latest-visit', $element);
$latestVisitSection
.html(response)
+ .parent()
.effect('highlight', {color: '#FFFFCB'}, 1200);
});
ajax.setFormat('html');
diff --git a/plugins/Live/stylesheets/visitor_profile.less b/plugins/Live/stylesheets/visitor_profile.less
index 28d6fe4fee..373ab97b4e 100644
--- a/plugins/Live/stylesheets/visitor_profile.less
+++ b/plugins/Live/stylesheets/visitor_profile.less
@@ -123,8 +123,8 @@
position:relative;
float:left;
min-height:145px;
- margin-right:15px;
- padding:12px 0 4px;
+ margin:12px 15px 0 0;
+ padding-bottom:4px;
}
.visitor-profile-avatar > div:first-child {
@@ -182,6 +182,10 @@
}
}
+.visitor-profile-latest-visit {
+ position:relative;
+}
+
.visitor-profile-latest-visit-column {
padding-top:6px;
display:inline-block;
@@ -513,6 +517,18 @@ div.visitor-profile-navigation {
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 {
min-width: 100% !important;
diff --git a/plugins/Live/templates/getSingleVisitSummary.twig b/plugins/Live/templates/getSingleVisitSummary.twig
index 34a091004e..e3a68cf470 100644
--- a/plugins/Live/templates/getSingleVisitSummary.twig
+++ b/plugins/Live/templates/getSingleVisitSummary.twig
@@ -4,6 +4,11 @@
<li><span>{{ customVariable[name]|truncate(30) }}</span>{% if customVariable[value]|length > 0 %}<strong>{{ customVariable[value]|truncate(50) }}</strong>{% endif %}</li>
{% endmacro %}
{% 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">
<ul>
<li><span>{{ 'General_IP'|translate }}</span><strong>{{ visitData.visitIp }}</strong></li>
diff --git a/plugins/Live/templates/getVisitorProfilePopup.twig b/plugins/Live/templates/getVisitorProfilePopup.twig
index 293a77345d..b840c3fe76 100644
--- a/plugins/Live/templates/getVisitorProfilePopup.twig
+++ b/plugins/Live/templates/getVisitorProfilePopup.twig
@@ -22,7 +22,7 @@
{% if visitorData.nextVisitorId is not empty %}<a class="visitor-profile-next-visitor" href="#" title="{{ 'Live_NextVisitor'|translate }}">&rarr;</a>{% endif %}
</div>
<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>
<p style="clear:both; border:none!important;"></p>
@@ -65,7 +65,7 @@
<h1>{{ 'UserCountry_Location'|translate }}</h1>
<p>
{%- 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 %}
<a class="visitor-profile-show-map" href="#">({{ 'Live_ShowMap_js'|translate }})</a>
</p>