blob: c9b41dca97116b908c0a076ca2a4f8e964367da6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
{% extends 'admin.twig' %}
{% set title %}{{ 'UserCountry_Geolocation'|translate }}{% endset %}
{% block content %}
{% import 'macros.twig' as piwik %}
<h2 piwik-enriched-headline
help-url="http://piwik.org/docs/geo-locate/"
id="location-providers">{{ title }}</h2>
<div style="width:900px;">
<p>{{ 'UserCountry_GeolocationPageDesc'|translate }}</p>
{% if not isThereWorkingProvider %}
<h3 style="margin-top:0;">{{ 'UserCountry_HowToSetupGeoIP'|translate }}</h3>
<p>{{ 'UserCountry_HowToSetupGeoIPIntro'|translate }}</p>
<ul style="list-style:disc;margin-left:2em;">
<li>{{ 'UserCountry_HowToSetupGeoIP_Step1'|translate('<a href="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz">','</a>','<a rel="noreferrer" target="_blank" href="http://www.maxmind.com/?rId=piwik">','</a>')|raw }}</li>
<li>{{ 'UserCountry_HowToSetupGeoIP_Step2'|translate("'GeoLiteCity.dat'",'<strong>','</strong>')|raw }}</li>
<li>{{ 'UserCountry_HowToSetupGeoIP_Step3'|translate('<strong>','</strong>','<span style="color:green"><strong>','</strong></span>')|raw }}</li>
<li>{{ 'UserCountry_HowToSetupGeoIP_Step4'|translate }}</li>
</ul>
<p> </p>
{% endif %}
<table class="adminTable locationProviderTable">
<tr>
<th>{{ 'UserCountry_LocationProvider'|translate }}</th>
<th>{{ 'General_Description'|translate }}</th>
<th>{{ 'General_InfoFor'|translate(thisIP) }}</th>
</tr>
{% for id,provider in locationProviders %}
<tr>
<td width="150">
<p>
<input class="location-provider" name="location-provider" value="{{ id }}" type="radio" {% if currentProviderId == id %}checked="checked"{% endif %}
id="provider_input_{{ id }}" {% if provider.status != 1 %}disabled="disabled"{% endif %}/>
<label for="provider_input_{{ id }}">{{ provider.title|translate }}</label><br/>
<span class="loadingPiwik" style="display:none;"><img src="./plugins/Morpheus/images/loading-blue.gif"/></span>
<span class="success" ></span>
</p>
<p class="loc-provider-status">
<strong><em>
{% if provider.status == 0 %}
<span class="is-not-installed">{{ 'General_NotInstalled'|translate}}</span>
{% elseif provider.status == 1 %}
<span class="is-installed">{{ 'General_Installed'|translate }}</span>
{% elseif provider.status == 2 %}
<span class="is-broken">{{ 'General_Broken'|translate }}</span>
{% endif %}
</em></strong>
</p>
</td>
<td>
<p>{{ provider.description|translate|raw }}</p>
{% if provider.status != 1 and provider.install_docs is defined %}
<p>{{ provider.install_docs|raw }}</p>
{% endif %}
</td>
<td width="164">
{% if provider.status == 1 %}
<div class="form-help">
{% if thisIP != '127.0.0.1' %}
{{ 'UserCountry_CurrentLocationIntro'|translate }}:
<div>
<br/>
<span class="loadingPiwik" style="display:none;position:absolute;">
<img src="./plugins/Morpheus/images/loading-blue.gif"/> {{ 'General_Loading'|translate }}</span>
<span class="location"><strong>{{ provider.location|raw }}</strong></span>
</div>
<div class="text-right">
<a href="#" class="refresh-loc" data-impl-id="{{ id }}"><em>{{ 'General_Refresh'|translate }}</em></a>
</div>
{% else %}
{{ 'UserCountry_CannotLocalizeLocalIP'|translate(thisIP) }}
{% endif %}
</div>
{% endif %}
{% if provider.statusMessage is defined and provider.statusMessage %}
<div class="form-help">
{% if provider.status == 2 %}<strong>{{ 'General_Error'|translate }}:</strong> {% endif %}{{ provider.statusMessage|raw }}
</div>
{% endif %}
{% if provider.extra_message is defined and provider.extra_message %}
<div class="form-help">
{{ provider.extra_message|raw }}
</div>
{% endif %}
</td>
{% endfor %}
</table>
</div>
{% if not geoIPDatabasesInstalled %}
<h2 id="geoip-db-mangement">{{ 'UserCountry_GeoIPDatabases'|translate }}</h2>
{% else %}
<h2 id="geoip-db-mangement">{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP'|translate }}</h2>
{% endif %}
{% if showGeoIPUpdateSection %}
<div id="manage-geoip-dbs" style="width:900px;" class="adminTable">
{% if not geoIPDatabasesInstalled %}
<div id="geoipdb-screen1">
<p>{{ 'UserCountry_PiwikNotManagingGeoIPDBs'|translate }}</p>
<div class="geoipdb-column-1">
<p>{{ 'UserCountry_IWantToDownloadFreeGeoIP'|translate|raw }}</p>
<input type="button" class="submit" value="{{ 'General_GetStarted'|translate }}..." id="start-download-free-geoip"/>
</div>
<div class="geoipdb-column-2">
<p>{{ 'UserCountry_IPurchasedGeoIPDBs'|translate('<a href="http://www.maxmind.com/en/geolocation_landing?rId=piwik">','</a>')|raw }}</p>
<input type="button" class="submit" value="{{ 'General_GetStarted'|translate }}..." id="start-automatic-update-geoip"/>
</div>
</div>
<div id="geoipdb-screen2-download" style="display:none;">
<p class='loadingPiwik'><img src='./plugins/Morpheus/images/loading-blue.gif'/>
{{ 'UserCountry_DownloadingDb'|translate('<a href="'~geoLiteUrl~'">GeoLiteCity.dat</a>')|raw }}...</p>
<div id="geoip-download-progress"></div>
</div>
{% endif %}
{% include "@UserCountry/_updaterManage.twig" %}
{% else %}
<p style="width:900px;" class="form-description">{{ 'UserCountry_CannotSetupGeoIPAutoUpdating'|translate }}</p>
{% endif %}
</div>
{% endblock %}
|