Commit 7f07e145 authored by Tino Dietel's avatar Tino Dietel Committed by Clemens John

adding configurable menu-entry for communityhomepage

parent 56c82fb1
......@@ -100,7 +100,9 @@ if(Permission::checkPermission(PERM_ROOT)) {
$smarty->assign('enable_network_policy', ConfigLine::configByName('enable_network_policy'));
$smarty->assign('network_policy_url', ConfigLine::configByName('network_policy_url'));
$smarty->assign('community_essid', ConfigLine::configByName('community_essid'));
$smarty->assign('community_homepage', ConfigLine::configByName('community_homepage'));
$smarty->assign('community_homepage_name', ConfigLine::configByName('community_homepage_name'));
$smarty->assign('message', Message::getMessage());
$smarty->display("header.tpl.html");
$smarty->display("config_community.tpl.html");
......@@ -112,7 +114,13 @@ if(Permission::checkPermission(PERM_ROOT)) {
Config::writeConfigLine('community_location_latitude', $_POST['community_location_latitude']);
Config::writeConfigLine('community_location_zoom', $_POST['community_location_zoom']);
Config::writeConfigLine('community_essid', $_POST['community_essid']);
if(!empty($_POST['community_homepage']) && filter_var($_POST['community_homepage'], FILTER_VALIDATE_URL))
{
Config::writeConfigLine('community_homepage', $_POST['community_homepage']);
Config::writeConfigLine('community_homepage_name', $_POST['community_homepage_name']);
}
if(empty($_POST['enable_network_policy']))
$_POST['enable_network_policy'] = 'false';
Config::writeConfigLine('enable_network_policy', $_POST['enable_network_policy']);
......
......@@ -221,6 +221,8 @@
$smarty->assign('object_menu', Menus::objectMenu());
$smarty->assign('admin_menu', Menus::adminMenu());
$smarty->assign('root_menu', Menus::rootMenu());
$smarty->assign('menu_community_homepage', ConfigLine::configByName('community_homepage'));
$smarty->assign('menu_community_homepage_name', ConfigLine::configByName('community_homepage_name'));
} else {
$smarty->assign('installation_menu', Menus::installationMenu());
......
......@@ -3,6 +3,18 @@
<h2>Lokales</h2>
<p><b>Name der Community:</b><br><input name="community_name" type="text" size="30" value="{$community_name}"></p>
<p><b>Slogan der Community:</b><br><input name="community_slogan" type="text" size="60" value="{$community_slogan}"></p>
<p>
<b>Homepage der Community:</b>
<br>
<input name="community_homepage" type="text" size="60" value="{$community_homepage}" placeholder="http://www.freifunk.meinestadt.de">
<span style="font-size:0.8em">Wird in Navigation gezeigt</span>
</p>
<p>
<b>Linktitel für Homepage:</b><br>
<input name="community_homepage_name" type="text" size="60" value="{if empty($community_homepage_name)}Homepage{else}{$community_homepage_name}{/if}">
</p>
<p><b>ESSID der Community:</b><br><input name="community_essid" type="text" size="60" value="{$community_essid}"></p>
<p><b>Ort der Community:</b><br>
<div id="section_location">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment