diff options
-rw-r--r-- | css/style.css | 88 | ||||
-rw-r--r-- | lib/FPanel/Interface.pm | 9 | ||||
-rw-r--r-- | template/domain-list.html | 22 | ||||
-rw-r--r-- | template/error.html | 7 | ||||
-rw-r--r-- | template/login.html | 62 |
5 files changed, 98 insertions, 90 deletions
diff --git a/css/style.css b/css/style.css index fe42282..87b0275 100644 --- a/css/style.css +++ b/css/style.css @@ -1,12 +1,12 @@ /* Global */ body { - font-family: "DejaVu Sans", Helvetica, Arial, sans-serif; - font-size: 11pt; - line-height: 140%; - color: #1a1a1a; + font-family: "DejaVu Sans", Helvetica, Arial, sans-serif; + font-size: 11pt; + line-height: 140%; + color: #1a1a1a; } .error { - color: #FF0040; + color: #FF0040; } @@ -15,83 +15,85 @@ form.loginform { margin: 0px auto; border: 1px solid #cccccc; padding: 10pt; - float: center; position: relative; width: 300px; background: #F5F5F5; } table.loginform { - margin:0 auto 5pt auto; - border-collapse:collapse; + margin:0 auto 5pt auto; + border-collapse:collapse; } table.loginform td { - padding:0 5pt 0 0; + padding:0 5pt 0 0; } .loginform { text-align: center; font-size: 12pt; } +.label { + text-align: right; +} /* Header */ #header { - width: 100%; + width: 100%; } #header .column { - position: relative; - padding: 0pt; - border: 0pt; - font-size: 9pt; + position: relative; + padding: 0pt; + border: 0pt; + font-size: 9pt; } #header .left { - width: 50%; - float: left; - text-align: left; + width: 50%; + float: left; + text-align: left; } #header .right { - width: 45%; - float: right; - text-align: right; + width: 45%; + float: right; + text-align: right; } /* Listing table */ table.list { - width:90%; - border-top:1px solid #e5eff8; - border-right:1px solid #e5eff8; - margin:1em auto; - border-collapse:collapse; + width:90%; + border-top:1px solid #e5eff8; + border-right:1px solid #e5eff8; + margin:1em auto; + border-collapse:collapse; } table.list td { - color:#678197; - border-bottom:1px solid #e5eff8; - border-left:1px solid #e5eff8; - padding:.3em 1em; - text-align:center; + color:#678197; + border-bottom:1px solid #e5eff8; + border-left:1px solid #e5eff8; + padding:.3em 1em; + text-align:center; } table.list tr.odd td { - background:#f7fbff + background:#f7fbff } table.list th { - font-weight:normal; - color: #678197; - text-align:left; - border-bottom: 1px solid #e5eff8; - border-left:1px solid #e5eff8; - padding:.3em 1em; + font-weight:normal; + color: #678197; + text-align:left; + border-bottom: 1px solid #e5eff8; + border-left:1px solid #e5eff8; + padding:.3em 1em; } table.list thead th { - background:#f4f9fe; - text-align:center; - font-weight:bold; - color:#66a3d3 + background:#f4f9fe; + text-align:center; + font-weight:bold; + color:#66a3d3 } .nonactive { - color: #FF0040; + color: #FF0040; } .active { - color: #32CD32; + color: #32CD32; } .none { font-size: 6pt; diff --git a/lib/FPanel/Interface.pm b/lib/FPanel/Interface.pm index 0d2cd0e..72fa29f 100644 --- a/lib/FPanel/Interface.pm +++ b/lib/FPanel/Interface.pm @@ -60,16 +60,15 @@ sub DomainList : StartRunmode { my $template = $self->load_tmpl('domain-list.html' , cache => 1 , utf8 => 1 - , loop_context_vars => 1 ); - my $url = $self->query->url(); - $template->param( URL => $url ); + , loop_context_vars => 1 + , global_vars => 1 ); + $template->param( URL => $self->query->url ); $template->param( USER_LOCALPART => $u, USER_DOMAINPART => $d); - $template->param( DOMAIN => [ + $template->param( DOMAINS => [ map { { DOMAIN => $_->get_value('fvd') , PERMS => &list_perms($_, $dn) , DESCRIPTION => join ("\n", $_->get_value('description')) , ISACTIVE => $_->get_value('fripostIsStatusActive') eq 'TRUE' ? 1 : 0 - , URL => $url }; } $domains->sorted('fvd') diff --git a/template/domain-list.html b/template/domain-list.html index 3dae0bb..52d819e 100644 --- a/template/domain-list.html +++ b/template/domain-list.html @@ -1,11 +1,12 @@ -<html> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Domain names for <TMPL_VAR NAME=USER></title> <link href="/css/style.css" media="all" rel="stylesheet" type="text/css" /> </head> <body> - <div id=header> + <div id="header"> <div class="left column"> Root / </div> @@ -14,25 +15,28 @@ ><TMPL_VAR NAME=USER_LOCALPART>@<TMPL_VAR NAME=USER_DOMAINPART></a> | <a href="<TMPL_VAR NAME=URL>?a=logout">Log out</a> </div> - <br> + <br/> + </div> <h1>Manage domains</h1> - <table class=list> + <table class="list"> <thead> <tr class="odd"> - <th>Domain (<a href=<TMPL_VAR NAME=URL>/?a=AddDomain>add</a>)</th> + <th>Domain (<a href="<TMPL_VAR NAME=URL>/?a=AddDomain">add</a>)</th> <th>Permissions</th> <th>Description</th> <th>Active?</th> </tr> </thead> - <TMPL_LOOP NAME=DOMAIN> + <tbody> + <TMPL_LOOP NAME=DOMAINS> <TMPL_IF NAME=__even__><tr class="odd"><TMPL_ELSE><tr></TMPL_IF> <td><a href="<TMPL_VAR NAME=URL>/<TMPL_VAR NAME=DOMAIN>/"><TMPL_VAR NAME=DOMAIN></a></td> - <td><TMPL_IF NAME=PERMS><TMPL_VAR NAME=PERMS><TMPL_ELSE><span class=none>(none)</span></TMPL_IF></td> - <td><TMPL_IF NAME=DESCRIPTION><TMPL_VAR NAME=DESCRIPTION><TMPL_ELSE><span class=none>(none)</span></TMPL_IF></td> - <td><TMPL_IF NAME=ISACTIVE><span class=active>✔</span><TMPL_ELSE><span class=nonactive>✘</span></TMPL_IF></td> + <td><TMPL_IF NAME=PERMS><TMPL_VAR NAME=PERMS><TMPL_ELSE><span class="none">(none)</span></TMPL_IF></td> + <td><TMPL_IF NAME=DESCRIPTION><TMPL_VAR NAME=DESCRIPTION><TMPL_ELSE><span class="none">(none)</span></TMPL_IF></td> + <td><TMPL_IF NAME=ISACTIVE><span class="active">✔</span><TMPL_ELSE><span class="nonactive">✘</span></TMPL_IF></td> </tr> </TMPL_LOOP> + </tbody> </table> </body> </html> diff --git a/template/error.html b/template/error.html index 34a4762..d9d4eb1 100644 --- a/template/error.html +++ b/template/error.html @@ -1,4 +1,5 @@ -<html> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title><TMPL_IF NAME=NAME> <TMPL_VAR NAME=NAME> </TMPL_IF></title> @@ -6,13 +7,13 @@ </head> <body> <TMPL_IF NAME=NAME> - <p>This is the <span class=error><TMPL_VAR NAME=NAME></span> page. + <p>This is the <span class="error"><TMPL_VAR NAME=NAME></span> page. You are not suppose to see this. If you think it is a bug, please report it to <a href="mailto:admin@fripost.org">admin@fripost.org</a>. </p> </TMPL_IF> - <TMPL_IF NAME=MESSAGE><p class=error><b><TMPL_VAR NAME=MESSAGE></b></p></TMPL_IF> + <TMPL_IF NAME=MESSAGE><p class="error"><b><TMPL_VAR NAME=MESSAGE></b></p></TMPL_IF> <hr/> <TMPL_IF NAME=URL><p><a href="<TMPL_VAR NAME=URL>">Back</a></p></TMPL_IF> diff --git a/template/login.html b/template/login.html index 676cc09..e0f648b 100644 --- a/template/login.html +++ b/template/login.html @@ -1,38 +1,40 @@ -<html> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Log In | Fripost's Administrator panel</title> <link href="/css/style.css" media="all" rel="stylesheet" type="text/css" /> </head> - <body class=loginform onLoad="document.loginform.authen_username.focus();"> - </br> - <a href=https://fripost.org - ><img alt=Fripost - src="/img/fripost_logo.png" - title="fripost.org|demokratisk e-post" - /></a> - <h2>Administrator Panel</h2> - </br> - </br> - <form class=loginform name=loginform - method=POST action="./" > - <table class=loginform> - <tr> - <td align="right">Username</td> - <td><input type="text" name="authen_username" size=20 /></td> - </tr> - <tr> - <td align="right">Password</td> - <td><input type="password" name="authen_password" size=20 /></td> - </tr> - <tr> - </table> - <div> - <input type="hidden" name="destination" value="<TMPL_VAR DESTINATION>" /> - <input type="submit" name="login" value="Log in" /> - </div> - </form> - <TMPL_IF NAME=ERROR><p class=error>Invalid username or password.</p></TMPL_IF> + <body class="loginform" onload="document.loginform.authen_username.focus();"> + <div> + <br/> + <a href="https://fripost.org" + ><img alt="Fripost" + src="/img/fripost_logo.png" + title="fripost.org|demokratisk e-post" + /></a> + <h2>Administrator Panel</h2> + <br/> + <br/> + <form class="loginform" name="loginform" + method="post" action="./" > + <table class="loginform"> + <tr> + <td class="label">Username</td> + <td><input type="text" name="authen_username" size="20" /></td> + </tr> + <tr> + <td class="label">Password</td> + <td><input type="password" name="authen_password" size="20" /></td> + </tr> + </table> + <div> + <input type="hidden" name="destination" value="<TMPL_VAR DESTINATION>" /> + <input type="submit" name="login" value="Log in" /> + </div> + </form> + <TMPL_IF NAME=ERROR><p class="error">Invalid username or password.</p></TMPL_IF> + </div> </body> </html> |