diff --git a/public/include/config/admin_settings.inc.php b/public/include/config/admin_settings.inc.php index eeb7d035..0411cf45 100644 --- a/public/include/config/admin_settings.inc.php +++ b/public/include/config/admin_settings.inc.php @@ -46,6 +46,13 @@ $aSettings['website'][] = array( 'name' => 'website_email', 'value' => $setting->getValue('website_email'), 'tooltip' => 'The email address for your pool, used in mail templates and notifications.' ); +$aSettings['website'][] = array( + 'display' => 'Website News Style', 'type' => 'select', + 'options' => array( 0 => 'Show all news in one Page', 1 => 'Show Responsive News Table' ), + 'default' => 0, + 'name' => 'website_news_style', 'value' => $setting->getValue('website_news_style'), + 'tooltip' => 'How News are displayed on Main Page.' +); $aSettings['website'][] = array( 'display' => 'Website theme', 'type' => 'select', 'options' => $aThemes, diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index f89bac11..9ad35c01 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -100,6 +100,7 @@ $aGlobal['website']['name'] = $setting->getValue('website_name'); $aGlobal['website']['title'] = $setting->getValue('website_title'); $aGlobal['website']['slogan'] = $setting->getValue('website_slogan'); $aGlobal['website']['email'] = $setting->getValue('website_email'); +$aGlobal['website']['newsstyle'] = $setting->getValue('website_news_style'); $aGlobal['website']['api']['disabled'] = $setting->getValue('disable_api'); $aGlobal['website']['blockexplorer']['disabled'] = $setting->getValue('website_blockexplorer_disabled'); $aGlobal['website']['transactionexplorer']['disabled'] = $setting->getValue('website_transactionexplorer_disabled'); diff --git a/public/templates/bootstrap/home/default.tpl b/public/templates/bootstrap/home/default.tpl index 780a6996..8054b2ca 100644 --- a/public/templates/bootstrap/home/default.tpl +++ b/public/templates/bootstrap/home/default.tpl @@ -1,16 +1,5 @@ -{section name=news loop=$NEWS} -
-
-
-
- {$NEWS[news].header} -
- posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by {$NEWS[news].author}{/if} -
-
- {$NEWS[news].content nofilter} -
-
-
-
-{/section} \ No newline at end of file +{if $GLOBAL.website.newsstyle == 0} + {include file="home/news_all.tpl"} +{else} + {include file="home/news_accordion.tpl"} +{/if} \ No newline at end of file diff --git a/public/templates/bootstrap/home/news_accordion.tpl b/public/templates/bootstrap/home/news_accordion.tpl new file mode 100644 index 00000000..b8ded480 --- /dev/null +++ b/public/templates/bootstrap/home/news_accordion.tpl @@ -0,0 +1,27 @@ +
+
+
+
+

latest News

+
+
+
+{section name=news loop=$NEWS} +
+
+ {$NEWS[news].header} +
+ posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by {$NEWS[news].author}{/if} +
+
+
+ {$NEWS[news].content nofilter} +
+
+
+{/section} +
+
+
+
+
\ No newline at end of file diff --git a/public/templates/bootstrap/home/news_all.tpl b/public/templates/bootstrap/home/news_all.tpl new file mode 100644 index 00000000..780a6996 --- /dev/null +++ b/public/templates/bootstrap/home/news_all.tpl @@ -0,0 +1,16 @@ +{section name=news loop=$NEWS} +
+
+
+
+ {$NEWS[news].header} +
+ posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by {$NEWS[news].author}{/if} +
+
+ {$NEWS[news].content nofilter} +
+
+
+
+{/section} \ No newline at end of file