summaryrefslogtreecommitdiffstats
path: root/apps/admin/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apps/admin/templates')
-rw-r--r--apps/admin/templates/_branding.php4
-rw-r--r--apps/admin/templates/_navigation.php53
-rw-r--r--apps/admin/templates/_notes.php9
-rw-r--r--apps/admin/templates/layout.php35
4 files changed, 101 insertions, 0 deletions
diff --git a/apps/admin/templates/_branding.php b/apps/admin/templates/_branding.php
new file mode 100644
index 0000000..c035a54
--- /dev/null
+++ b/apps/admin/templates/_branding.php
@@ -0,0 +1,4 @@
+ <?php echo use_helper("Asset") ?>
+ <div class="branding">
+ <div class="logo"><?php echo image_tag("logo","alt=Title")?></div>
+ </div>
diff --git a/apps/admin/templates/_navigation.php b/apps/admin/templates/_navigation.php
new file mode 100644
index 0000000..b991247
--- /dev/null
+++ b/apps/admin/templates/_navigation.php
@@ -0,0 +1,53 @@
+ <?php use_helper("Asset","Javascript") ?>
+ <div class="navigation">
+ <ul><? if($sf_user->hasCredential(array('superadmin','domainmaster', 'mailboxmaster'), false)): ?><li<?php echo ($module=="domain"?" class=\"active\"":"") ?>><?php echo link_to("Domains","domain/list") ?></li><li<?php echo ($module=="mailbox"?" class=\"active\"":"") ?>><?php echo link_to("Mailboxes","mailbox/list") ?></li><?php endif; ?><li<?php echo ($module=="address"?" class=\"active\"":"") ?>><?php echo link_to("Addresses","address/list") ?></li><? if($sf_user->hasCredential('superadmin')): ?><li<?php echo ($module=="user"?" class=\"active\"":"") ?>><?php echo link_to("Administrators","user/list") ?></li><li<?php echo ($module=="log"?" class=\"active\"":"") ?>><?php echo link_to("Logs","log/list") ?></li><li<?php echo ($module=="server"?" class=\"active\"":"") ?>><?php echo link_to("Server","server/index") ?></li><?php endif; ?></ul>
+ </div>
+ <?php if($module=="domain"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="list"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("list.gif","alt=[...] border=0") . " Browse Domains", $module."/list")?></li>
+ <? if($sf_user->hasCredential(array('superadmin','domainmaster'), false)): ?><li <?php echo ($action=="create"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("add.gif","alt=[+] border=0") . " Add New Domain", $module."/create")?></li><?php endif; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <?php if($module=="mailbox"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="list"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("list.gif","alt=[...] border=0") . " Browse Mailboxes", $module."/list")?></li>
+ <li <?php echo ($action=="create"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("add.gif","alt=[+] border=0") . " Add New Mailbox", $module."/create")?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <?php if($module=="address"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="list"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("list.gif","alt=[...] border=0") . " Browse Addresses", $module."/list")?></li>
+ <li <?php echo ($action=="create"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("add.gif","alt=[+] border=0") . " Add New Address", $module."/create")?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <? if($sf_user->hasCredential('superadmin')): ?>
+ <?php if($module=="user"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="list"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("list.gif","alt=[...] border=0") . " Browse Administrators", $module."/list")?></li>
+ <li <?php echo ($action=="create"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("add.gif","alt=[+] border=0") . " Add New Administrator", $module."/create")?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <?php if($module=="log"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="list"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("list.gif","alt=[...] border=0") . " Browse Logs", $module."/list")?></li>
+ <li <?php echo ($action=="clear"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("shred.gif","alt=[-] border=0") . " Clear Logs", $module."/clear")?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <?php if($module=="server"): ?>
+ <div class="subnavigation">
+ <ul>
+ <li <?php echo ($action=="imap"?"class=\"active\"":"") ?>><?php echo link_to(image_tag("network-server.gif","alt=[...] border=0") . " IMAP Summary", $module."/imap")?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <?php endif; ?>
diff --git a/apps/admin/templates/_notes.php b/apps/admin/templates/_notes.php
new file mode 100644
index 0000000..e994a50
--- /dev/null
+++ b/apps/admin/templates/_notes.php
@@ -0,0 +1,9 @@
+ <?php echo use_helper("I18N","Asset","Date") ?>
+ <div class="notes">
+ <ul>
+ <li><?php echo link_to("Mailadmin ".sfConfig::get("app_info_version"), "http://wiki.sukimashita.com/Mailadmin") ?></li>
+ <li><?php echo image_tag("ok.gif","alt=[x] border=0")?> <?php echo link_to("XHTML 1.0", "http://validator.w3.org/check/referer") ?></li>
+ <li><?php echo image_tag("ok.gif","alt=[x] border=0")?> <?php echo link_to("CSS", "http://jigsaw.w3.org/css-validator/check/referer") ?></li>
+ </ul>
+ <span class="legal">&copy; <?php echo format_date(time(), "yyyy") ?> <?php echo link_to("Mirell Development", "http://mirell.de") ?> - <?php echo __('This web application is licensed under the terms of the GNU General Public License') ?></span>
+ </div>
diff --git a/apps/admin/templates/layout.php b/apps/admin/templates/layout.php
new file mode 100644
index 0000000..d10d047
--- /dev/null
+++ b/apps/admin/templates/layout.php
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <?php include_http_metas() ?>
+ <?php include_metas() ?>
+ <?php include_title() ?>
+ <link rel="icon" href="/images/favicon.ico" /><link rel="SHORTCUT ICON" href="/images/favicon.ico" />
+</head>
+<body>
+<div class="base">
+ <?php include_partial('global/branding') ?>
+ <?php echo use_helper("Asset","Date") ?>
+ <div class="session">
+ <?php if($sf_user->isAuthenticated()): ?>
+ <ul>
+ <li><?php echo image_tag("information.gif","alt=[?]")?><b>Logged in as:</b> <span class="adminname"><?php echo $sf_user->getNickname() ?></span> (<span class="adminrole"><?php echo $sf_user->getRoleName() ?></span>) | <?php echo link_to("Settings","user/settings") ?> | <?php echo link_to("Logout","user/logout") ?></li>
+ <li><b>Last Login:</b> <?php if($sf_user->getLastLogin()!=""): ?>
+ <?php echo format_date($sf_user->getLastLogin(),array('P','t')) ?>
+ <?php else: ?>
+ <?php echo "Never" ?>
+ <?php endif; ?></li>
+ <li id="indicator"><?php echo image_tag("load.gif", "alt=[...] border=0") ?> loading</li>
+ </ul>
+ <?php else: ?>
+ <ul><li><?php echo image_tag("warning.gif","alt=[!]")?><b>You are not authenticated.</b> | <?php echo link_to("Login","user/login") ?></li></ul>
+ <?php endif; ?>
+ </div>
+ <?php if($sf_user->isAuthenticated()): ?>
+ <?php include_partial("global/navigation", array("module" => $sf_context->getModuleName(), "action" => $sf_context->getActionName())) ?>
+ <?php endif; ?>
+ <?php echo $sf_data->getRaw('sf_content') ?>
+ <?php include_partial('global/notes') ?>
+</div>
+</body>
+</html>