From bc652d7aa459a415072fd34ea5b8a208f767932c Mon Sep 17 00:00:00 2001 From: Matthieu Napoli <matthieu@mnapoli.fr> Date: Mon, 1 Jun 2015 14:34:09 +0200 Subject: [PATCH] Improve the layout of UserCountry forms --- .../UserCountry/templates/_updaterManage.twig | 31 +++++++++---------- plugins/UserCountry/templates/adminIndex.twig | 24 ++++++-------- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/plugins/UserCountry/templates/_updaterManage.twig b/plugins/UserCountry/templates/_updaterManage.twig index f094d5ee9f..bffc1731c0 100755 --- a/plugins/UserCountry/templates/_updaterManage.twig +++ b/plugins/UserCountry/templates/_updaterManage.twig @@ -17,11 +17,9 @@ <td width="150">{{ 'UserCountry_LocationDatabase'|translate }}</td> <td><input type="text" id="geoip-location-db" value="{{ geoIPLocUrl }}"/></td> <td width="164"> - {% set locationHint %} - {{ 'UserCountry_LocationDatabaseHint'|translate }} - {% endset %} - {% import 'macros.twig' as piwik %} - {{ piwik.inlineHelp(locationHint) }} + <div class="alert alert-info"> + {{ 'UserCountry_LocationDatabaseHint'|translate }} + </div> </td> </tr> <tr> @@ -42,18 +40,17 @@ <label for="geoip-update-period-week">{{ 'CoreHome_PeriodWeek'|translate }}</label> </td> <td width="164"> - {% set lastTimeRunNote %} - {% if lastTimeUpdaterRun is defined and lastTimeUpdaterRun is not empty %} - {{ 'UserCountry_UpdaterWasLastRun'|translate(lastTimeUpdaterRun)|raw }} - {% else %} - {{ 'UserCountry_UpdaterHasNotBeenRun'|translate }} - {% endif %} - <br/><br/> - <div id="geoip-updater-next-run-time"> - {% include "@UserCountry/_updaterNextRunTime.twig" %} - </div> - {% endset %} - {{ piwik.inlineHelp(lastTimeRunNote) }} + <div class="alert alert-info"> + {% if lastTimeUpdaterRun is defined and lastTimeUpdaterRun is not empty %} + {{ 'UserCountry_UpdaterWasLastRun'|translate(lastTimeUpdaterRun)|raw }} + {% else %} + {{ 'UserCountry_UpdaterHasNotBeenRun'|translate }} + {% endif %} + <br/><br/> + <div id="geoip-updater-next-run-time"> + {% include "@UserCountry/_updaterNextRunTime.twig" %} + </div> + </div> </td> </tr> </table> diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index 587abe25bd..fe729a4497 100755 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -60,36 +60,32 @@ </td> <td width="164"> {% if provider.status == 1 %} - {% set currentLocation %} + <div class="alert alert-info"> {% if thisIP != '127.0.0.1' %} {{ 'UserCountry_CurrentLocationIntro'|translate }}: - <div style="text-align:left;"> + <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><em>{{ provider.location|raw }}</em></strong></span> + <span class="location"><strong>{{ provider.location|raw }}</strong></span> </div> - <div style="text-align:right;"> + <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 %} - {% endset %} - {{ piwik.inlineHelp(currentLocation) }} + </div> {% endif %} {% if provider.statusMessage is defined and provider.statusMessage %} - {% set brokenReason %} - {% if provider.status == 2 %}<strong><em>{{ 'General_Error'|translate }}:</em></strong> {% endif %}{{ provider.statusMessage|raw }} - {% endset %} - {{ piwik.inlineHelp(brokenReason) }} + <div class="alert alert-info"> + {% 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 %} - {% set extraMessage %} + <div class="alert alert-info"> {{ provider.extra_message|raw }} - {% endset %} - <br/> - {{ piwik.inlineHelp(extraMessage) }} + </div> {% endif %} </td> {% endfor %} -- GitLab