mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Replaced motd*.txt with $CONF[motd_*] options
config.inc.php: - new config options $CONF['motd_user'], $CONF['motd_admin'] and $CONF['motd_superadmin'] templates/index.tpl: - added $CONF[motd_*] handling css/default.css: - new style #motd templates/users_menu.tpl, templates/menu.tpl: - removed inclusion of motd-users.txt / $motd_file smarty.inc.php: - removed handling for motd*.txt files templates/motd-users.txt, templates/motd.txt: - deleted git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1142 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
99382f1318
commit
3dcd56c77a
@ -286,6 +286,13 @@ $CONF['show_footer_text'] = 'YES';
|
||||
$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
|
||||
$CONF['footer_link'] = 'http://change-this-to-your.domain.tld';
|
||||
|
||||
// MOTD ("Motto of the day")
|
||||
// You can display a MOTD below the menu on all pages.
|
||||
// This can be configured seperately for users, domain admins and superadmins
|
||||
$CONF['motd_user'] = '';
|
||||
$CONF['motd_admin'] = '';
|
||||
$CONF['motd_superadmin'] = '';
|
||||
|
||||
// Welcome Message
|
||||
// This message is send to every newly created mailbox.
|
||||
// Change the text between EOM.
|
||||
|
@ -81,6 +81,11 @@ ul.flash-error {
|
||||
color: #d01313;
|
||||
}
|
||||
|
||||
#motd {
|
||||
color: maroon;
|
||||
padding-top:2em;
|
||||
}
|
||||
|
||||
.standout {
|
||||
color: maroon;
|
||||
padding: 3px 3px 3px 3px;
|
||||
|
@ -66,16 +66,6 @@ $smarty->assign ('version', $version);
|
||||
$smarty->assign ('boolconf_alias_domain', boolconf('alias_domain'));
|
||||
$smarty->assign ('authentication_has_role', array ('global_admin' => authentication_has_role ('global-admin'), 'admin' => authentication_has_role ('admin'), 'user' => authentication_has_role ('user')));
|
||||
|
||||
if (authentication_has_role('global-admin')) {
|
||||
$motd_file = "motd-admin.txt";
|
||||
} else {
|
||||
$motd_file = "motd.txt";
|
||||
}
|
||||
$smarty->assign('motd_file', '');
|
||||
if (file_exists ($incpath.'/templates/'.$motd_file)) {
|
||||
$smarty->assign ('motd_file', $motd_file);
|
||||
}
|
||||
|
||||
function select_options($aValues, $aSelected) {
|
||||
$ret_val = '';
|
||||
foreach ($aValues as $val) {
|
||||
|
@ -9,6 +9,16 @@
|
||||
{include file='menu.tpl'}
|
||||
{/if}
|
||||
{/if}
|
||||
<br clear="all" />
|
||||
|
||||
{if $authentication_has_role.user && $CONF.motd_user}
|
||||
<div id="motd">{$CONF.motd_user}</div>
|
||||
{elseif $authentication_has_role.global_admin && $CONF.motd_superadmin}
|
||||
<div id="motd">{$CONF.motd_superadmin}</div>
|
||||
{elseif $authentication_has_role.admin && $CONF.motd_admin}
|
||||
<div id="motd">{$CONF.motd_admin}</div>
|
||||
{/if}
|
||||
|
||||
{include file='flash_error.tpl'}
|
||||
{if $smarty_template}
|
||||
{include file="$smarty_template.tpl"}
|
||||
|
@ -81,11 +81,6 @@
|
||||
<li class="logout"><a target="_top" href="{#url_logout#}">{$PALANG.pMenu_logout}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{if !empty($motd_file)}
|
||||
<div id="motd">
|
||||
{include file=$motd_file}
|
||||
</div>
|
||||
{/if}
|
||||
{literal}
|
||||
<script type='text/javascript'>
|
||||
// <![CDATA[
|
||||
|
@ -1,7 +0,0 @@
|
||||
<div class="standout">
|
||||
=== Announcement ===<br />
|
||||
This is a new version of Postfix Admin.<br />
|
||||
If you have any questions please direct them to the <a href="mailto:{$CONF.admin_email}">Site Admin</a><br />
|
||||
=== Announcement ===<br />
|
||||
</div>
|
||||
<br />
|
@ -1,7 +0,0 @@
|
||||
<div class="standout">
|
||||
=== Announcement ===<br />
|
||||
This is a new version of Postfix Admin.<br />
|
||||
If you have any questions please direct them to the <a href="mailto:{$CONF.admin_email}">Site Admin</a><br />
|
||||
=== Announcement ===<br />
|
||||
</div>
|
||||
<br />
|
@ -9,12 +9,3 @@
|
||||
<li class="logout"><a target="_top" href="{#url_user_logout#}">{$PALANG.pMenu_logout}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<br clear="all"/><br/>
|
||||
{php}
|
||||
if (file_exists (realpath ("../motd-users.txt")))
|
||||
{
|
||||
print "<div id=\"motd\">\n";
|
||||
include ("../motd-users.txt");
|
||||
print "</div>";
|
||||
}
|
||||
{/php}
|
||||
|
Loading…
Reference in New Issue
Block a user