diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2017-12-08 04:20:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 04:20:15 +0300 |
commit | 6267277c830ec617df36d61ef71c6da84c5e99f3 (patch) | |
tree | 662865e296adc761fb564612b613e336f2d46692 | |
parent | 6d2a814da335151677f6adbb9022225ef4dddec3 (diff) |
When general settings admin is disabled, do not show archive settings
The currently shown settings are wrong anyway (eg it always says YES browser archiving is enabled and shows how often it is archived but both values may be very wrong). Also it is not needed to show this information when the admin is disabled.
-rw-r--r-- | plugins/CoreAdminHome/templates/generalSettings.twig | 72 |
1 files changed, 32 insertions, 40 deletions
diff --git a/plugins/CoreAdminHome/templates/generalSettings.twig b/plugins/CoreAdminHome/templates/generalSettings.twig index bd53e896f8..625b553003 100644 --- a/plugins/CoreAdminHome/templates/generalSettings.twig +++ b/plugins/CoreAdminHome/templates/generalSettings.twig @@ -9,9 +9,10 @@ {{ ajax.errorDiv() }} {{ ajax.loadingDiv() }} -<div piwik-content-block content-title="{{ 'CoreAdminHome_ArchivingSettings'|translate|e('html_attr') }}"> - <div ng-controller="ArchivingController as archivingSettings"> - {% if isGeneralSettingsAdminEnabled %} + +{% if isGeneralSettingsAdminEnabled %} + <div piwik-content-block content-title="{{ 'CoreAdminHome_ArchivingSettings'|translate|e('html_attr') }}"> + <div ng-controller="ArchivingController as archivingSettings"> <div class="form-group row"> <h3 class="col s12">{{ 'General_AllowPiwikArchivingToTriggerBrowser'|translate }}</h3> <div class="col s12 m6"> @@ -44,47 +45,38 @@ </div> </div> </div> - {% else %} - <div piwik-field uicontrol="radio" name="mailUseSmtp" - disabled="true" - introduction="{{ 'General_AllowPiwikArchivingToTriggerBrowser'|translate|e('html_attr') }}" - title="{{ 'General_Yes'|translate|e('html_attr') }}" - value="1"> - </div> - {% endif %} - <div class="form-group row"> - <h3 class="col s12"> - {{ 'General_ReportsContainingTodayWillBeProcessedAtMostEvery'|translate }} - </h3> - <div class="input-field col s12 m6"> - <input type="text" value='{{ todayArchiveTimeToLive }}' id='todayArchiveTimeToLive' {% if not isGeneralSettingsAdminEnabled %}disabled="disabled"{% endif %} /> - <span class="form-description"> - {{ 'General_RearchiveTimeIntervalOnlyForTodayReports'|translate }} - </span> - </div> - <div class="col s12 m6"> - {% if isGeneralSettingsAdminEnabled %} - <div class="form-help"> - {% if showWarningCron %} - <strong> - {{ 'General_NewReportsWillBeProcessedByCron'|translate }}<br/> - {{ 'General_ReportsWillBeProcessedAtMostEveryHour'|translate }} - {{ 'General_IfArchivingIsFastYouCanSetupCronRunMoreOften'|translate }}<br/> - </strong> - {% endif %} - {{ 'General_SmallTrafficYouCanLeaveDefault'|translate( todayArchiveTimeToLiveDefault ) }} - <br/> - {{ 'General_MediumToHighTrafficItIsRecommendedTo'|translate(1800,3600) }} - </div> - {% endif %} + <div class="form-group row"> + <h3 class="col s12"> + {{ 'General_ReportsContainingTodayWillBeProcessedAtMostEvery'|translate }} + </h3> + <div class="input-field col s12 m6"> + <input type="text" value='{{ todayArchiveTimeToLive }}' id='todayArchiveTimeToLive' {% if not isGeneralSettingsAdminEnabled %}disabled="disabled"{% endif %} /> + <span class="form-description"> + {{ 'General_RearchiveTimeIntervalOnlyForTodayReports'|translate }} + </span> + </div> + <div class="col s12 m6"> + {% if isGeneralSettingsAdminEnabled %} + <div class="form-help"> + {% if showWarningCron %} + <strong> + {{ 'General_NewReportsWillBeProcessedByCron'|translate }}<br/> + {{ 'General_ReportsWillBeProcessedAtMostEveryHour'|translate }} + {{ 'General_IfArchivingIsFastYouCanSetupCronRunMoreOften'|translate }}<br/> + </strong> + {% endif %} + {{ 'General_SmallTrafficYouCanLeaveDefault'|translate( todayArchiveTimeToLiveDefault ) }} + <br/> + {{ 'General_MediumToHighTrafficItIsRecommendedTo'|translate(1800,3600) }} + </div> + {% endif %} + </div> </div> - </div> - <div onconfirm="archivingSettings.save()" saving="archivingSettings.isLoading" piwik-save-button></div> + <div onconfirm="archivingSettings.save()" saving="archivingSettings.isLoading" piwik-save-button></div> + </div> </div> -</div> -{% if isGeneralSettingsAdminEnabled %} <div piwik-content-block content-title="{{ 'CoreAdminHome_EmailServerSettings'|translate|e('html_attr') }}"> <div piwik-form ng-controller="MailSmtpController as mailSettings"> |