diff options
Diffstat (limited to 'plugins/UserCountry/templates/adminIndex.twig')
-rw-r--r-- | plugins/UserCountry/templates/adminIndex.twig | 108 |
1 files changed, 11 insertions, 97 deletions
diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index f0a32da588..ca11eb6d06 100644 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -15,19 +15,7 @@ <div piwik-location-provider-selection="{{ currentProviderId|e('html_attr') }}"> {% if not isThereWorkingProvider %} - <h3 style="margin-top:0;">{{ 'UserCountry_HowToSetupGeoIP'|translate }}</h3> - {% if dbipLiteUrl|default is not empty %} - <p>{{ 'UserCountry_HowToSetupGeoIPIntro'|translate }}</p> - <ul style="list-style:disc !important;margin-left:2em;"> - <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step1'|translate('<a rel="noreferrer noopener" href="'~dbipLiteUrl~'">','</a>','<a rel="noreferrer noopener" target="_blank" href="http://db-ip.com/?refid=mtm">','</a>')|raw }}</li> - <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step2'|translate("'"~dbipLiteFilename~"'",'<strong>','</strong>','<strong>'~dbipLiteDesiredFilename~'</strong>')|raw }}</li> - <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step3'|translate('<strong>','</strong>','<span style="color:green"><strong>','</strong></span>')|raw }}</li> - <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step4'|translate }}</li> - </ul> - {% else %} - <p>{{ 'UserCountry_InstallGeoIp2'|translate('<a rel="noreferrer noopener" target="_blank" href="http://db-ip.com/?refid=mtm">','</a>')|raw }}</p> - {% endif %} - <p> </p> + {{ setUpGuides|raw }} {% endif %} <div class="row"> @@ -97,95 +85,21 @@ </div> {% endfor %} - <div piwik-save-button onconfirm="locationSelector.save()" saving="locationSelector.isLoading"></div> - -</div> -</div> - -{% if geoIPLegacyLocUrl is defined and geoIPLegacyLocUrl and isInternetEnabled %} - {# The text in this part is not translatable on purpose, as it will be removed again soon #} - <div piwik-content-block content-title="Automatic Updates for GeoIP Legacy"> - - <p>Setting up automatic updates for GeoIP Legacy is no longer supported.</p> - - <div class="notification system notification-warning"> - {% if 'GeoLite' in geoIPLegacyLocUrl %} - <div>Maxmind announced to discontinue updates to the GeoLite Legacy databases as of April 1, 2018.</div> - {% endif %} - <strong>Please consider switching to GeoIP 2 soon! GeoIP Legacy Support is deprecated and will be removed in one of the next major releases.</strong> - </div> - - {% if geoIPLegacyLocUrl or geoIPLegacyIspUrl or geoIPLegacyOrgUrl %} - <h3>GeoIP Legacy Auto Update</h3> - - <p>Your previous configuration for automatic updates for GeoIP legacy databases is still up and running. It will be automatically disabled and removed after switching to GeoIP2.</p> - - <p>Below you can find the current configuration:</p> - {% if geoIPLegacyLocUrl %}<p>{{ 'UserCountry_LocationDatabase'|translate|e('html_attr') }}: {{ geoIPLegacyLocUrl }}</p>{% endif %} - {% if geoIPLegacyIspUrl %}<p>{{ 'UserCountry_ISPDatabase'|translate|e('html_attr') }}: {{ geoIPLegacyIspUrl }}</p>{% endif %} - {% if geoIPLegacyOrgUrl %}<p>{{ 'UserCountry_OrgDatabase'|translate|e('html_attr') }}: {{ geoIPLegacyOrgUrl }}</p>{% endif %} - {% if geoIPLegacyUpdatePeriod %}<p>{{ 'UserCountry_DownloadNewDatabasesEvery'|translate|e('html_attr') }}: {{ geoIPLegacyUpdatePeriod }}</p>{% endif %} - - {% endif %} + {% if locationProviders|length == 1 %} + <div piwik-notification + noclear="true" + context="warning"> + {{ 'UserCountry_NoProviders'|translate('<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm">','</a>')|raw }} </div> -{% endif %} - -{% if isInternetEnabled and not notUsingGeoIpPlugin %} - <div piwik-content-block - content-title="{% if not geoIPDatabasesInstalled %}{{ 'UserCountry_GeoIPDatabases'|translate|e('html_attr') }}{% else %}{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP'|translate|e('html_attr') }}{% endif %}" - id="geoip-db-mangement"> + {% endif %} - <div piwik-location-provider-updater - geoip-database-installed="{% if geoIPDatabasesInstalled %}1{% else %}0{% endif %}"> + <div piwik-save-button onconfirm="locationSelector.save()" saving="locationSelector.isLoading"></div> - {% if showGeoIPUpdateSection %} - {% if not geoIPDatabasesInstalled %} - <div ng-show="!locationUpdater.geoipDatabaseInstalled"> - <div ng-show="locationUpdater.showPiwikNotManagingInfo"> - <h3>{{ 'UserCountry_PiwikNotManagingGeoIPDBs'|translate|e('html_attr') }}</h3> - <div id="manage-geoip-dbs"> - <div class="row" id="geoipdb-screen1"> - <div class="geoipdb-column-1 col s6"> - <p>{{ 'UserCountry_IWantToDownloadFreeGeoIP'|translate|raw }}</p> - </div> - <div class="geoipdb-column-2 col s6"> - <p>{{ 'UserCountry_IPurchasedGeoIPDBs'|translate('<a rel="noreferrer noopener" href="http://www.maxmind.com/en/geolocation_landing?rId=piwik">','</a>','<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm">','</a>')|raw }}</p> - </div> - <div class="geoipdb-column-1 col s6"> - <input type="button" class="btn" - ng-click="locationUpdater.startDownloadFreeGeoIp()" - value="{{ 'General_GetStarted'|translate }}..."/> - </div> - <div class="geoipdb-column-2 col s6"> - <input type="button" class="btn" - ng-click="locationUpdater.startAutomaticUpdateGeoIp()" - value="{{ 'General_GetStarted'|translate }}..." id="start-automatic-update-geoip"/> - </div> - </div> - </div> - </div> - {% if dbipLiteUrl|default is not empty %} - {% set downloadingDbLink %}<a href="{{ dbipLiteUrl|e('html_attr') }}">{{ dbipLiteFilename }}</a>{% endset %} - {% else %} - {% set downloadingDbLink = '' %} - {% endif %} - <div id="geoipdb-screen2-download" ng-show="locationUpdater.showFreeDownload"> - <div piwik-progressbar - label="{{ ('UserCountry_DownloadingDb'|translate(downloadingDbLink) ~ '...')|json_encode }}" - progress="locationUpdater.progressFreeDownload"> - </div> - </div> - </div> - {% endif %} +</div> +</div> - {% include "@UserCountry/_updaterManage.twig" %} - {% else %} - <p class="form-description">{{ 'UserCountry_CannotSetupGeoIPAutoUpdating'|translate }}</p> - {% endif %} - </div> - </div> -{% endif %} +{{ configurations|raw }} {% endblock %} |