From 9aeb0052014cd72871b454f63995eda80e8748df Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 6 Jul 2013 18:10:23 +0200 Subject: [PATCH] Adding `{nocache}` flags for dynamic content This will update content instantly once the user changes it and not load a cached version from the smarty cache. Addresses #309 --- public/templates/mmcFE/account/edit/default.tpl | 10 +++++----- .../templates/mmcFE/account/notifications/default.tpl | 8 ++++---- public/templates/mmcFE/account/workers/default.tpl | 2 ++ public/templates/mmcFE/admin/news/default.tpl | 2 ++ public/templates/mmcFE/admin/news_edit/default.tpl | 6 +++--- public/templates/mmcFE/admin/settings/default.tpl | 4 ++-- public/templates/mmcFE/admin/user/default.tpl | 2 ++ 7 files changed, 20 insertions(+), 14 deletions(-) diff --git a/public/templates/mmcFE/account/edit/default.tpl b/public/templates/mmcFE/account/edit/default.tpl index 482c3579..c15b56d4 100644 --- a/public/templates/mmcFE/account/edit/default.tpl +++ b/public/templates/mmcFE/account/edit/default.tpl @@ -7,9 +7,9 @@ Username: {$GLOBAL.userdata.username} User Id: {$GLOBAL.userdata.id} API Key: {$GLOBAL.userdata.api_key} - E-Mail: - Payment Address: - Donation %: [donation amount in percent (example: 0.5)] + E-Mail: + Payment Address: + Donation %: [donation amount in percent (example: 0.5)] Automatic Payout Threshold: [{$GLOBAL.config.ap_threshold.min}-{$GLOBAL.config.ap_threshold.max} {$GLOBAL.config.currency}. Set to '0' for no auto payout] 4 digit PIN: [The 4 digit PIN you chose when registering] @@ -23,8 +23,8 @@ - - + +
Account Balance:    {$GLOBAL.userdata.balance.confirmed|escape} {$GLOBAL.config.currency}
Payout to:
{$GLOBAL.userdata.coin_address|escape}
Account Balance:    {nocache}{$GLOBAL.userdata.balance.confirmed|escape}{/nocache} {$GLOBAL.config.currency}
Payout to:
{nocache}{$GLOBAL.userdata.coin_address|escape}{/nocache}
4 digit PIN:
diff --git a/public/templates/mmcFE/account/notifications/default.tpl b/public/templates/mmcFE/account/notifications/default.tpl index 1d54729b..52140466 100644 --- a/public/templates/mmcFE/account/notifications/default.tpl +++ b/public/templates/mmcFE/account/notifications/default.tpl @@ -12,7 +12,7 @@ IDLE Worker - + @@ -20,7 +20,7 @@ New Blocks - + @@ -28,7 +28,7 @@ Auto Payout - + @@ -36,7 +36,7 @@ Manual Payout - + diff --git a/public/templates/mmcFE/account/workers/default.tpl b/public/templates/mmcFE/account/workers/default.tpl index c69d1139..f26e3109 100644 --- a/public/templates/mmcFE/account/workers/default.tpl +++ b/public/templates/mmcFE/account/workers/default.tpl @@ -15,6 +15,7 @@     + {nocache} {section worker $WORKERS} {assign var="username" value="."|escape|explode:$WORKERS[worker].username:2} @@ -29,6 +30,7 @@ {/section} + {/nocache} diff --git a/public/templates/mmcFE/admin/news/default.tpl b/public/templates/mmcFE/admin/news/default.tpl index 7bd8c198..8c3ac5d1 100644 --- a/public/templates/mmcFE/admin/news/default.tpl +++ b/public/templates/mmcFE/admin/news/default.tpl @@ -17,6 +17,7 @@ {include file="global/block_footer.tpl"} +{nocache} {section name=news loop=$NEWS} {include file="global/block_header.tpl" @@ -35,4 +36,5 @@ {include file="global/block_footer.tpl"} {/section} +{/nocache} {include file="global/block_footer.tpl"} diff --git a/public/templates/mmcFE/admin/news_edit/default.tpl b/public/templates/mmcFE/admin/news_edit/default.tpl index 467d4a6c..22e945fb 100644 --- a/public/templates/mmcFE/admin/news_edit/default.tpl +++ b/public/templates/mmcFE/admin/news_edit/default.tpl @@ -10,7 +10,7 @@ Active - + @@ -18,13 +18,13 @@ Header - + Content - + diff --git a/public/templates/mmcFE/admin/settings/default.tpl b/public/templates/mmcFE/admin/settings/default.tpl index 3cd67f4e..a2ffbd5b 100644 --- a/public/templates/mmcFE/admin/settings/default.tpl +++ b/public/templates/mmcFE/admin/settings/default.tpl @@ -16,7 +16,7 @@ @@ -26,7 +26,7 @@ diff --git a/public/templates/mmcFE/admin/user/default.tpl b/public/templates/mmcFE/admin/user/default.tpl index 82955741..8c65c49f 100644 --- a/public/templates/mmcFE/admin/user/default.tpl +++ b/public/templates/mmcFE/admin/user/default.tpl @@ -44,6 +44,7 @@ +{nocache} {section name=user loop=$USERS|default} {$USERS[user].id} @@ -70,6 +71,7 @@ {/section} +{/nocache}