summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-10 08:53:14 +0000
committerSteven Barth <steven@midlink.org>2008-03-10 08:53:14 +0000
commit93a98dd13be5127871ff78d85e8199f2df77e9c2 (patch)
tree9873e6b279893a1f36ce4d361974fd2bd1219d59 /src/ffluci/view
parentb827bb905aee48f3c4c8edf9cfc2e8fc9406ba68 (diff)
Moved examples out of source directory
Added a first draft design Cleaned up Makefile Prepared for module development
Diffstat (limited to 'src/ffluci/view')
-rwxr-xr-xsrc/ffluci/view/example-simpleview/foo.htm3
-rwxr-xr-xsrc/ffluci/view/example-simpleview/index.htm6
-rw-r--r--src/ffluci/view/footer.htm6
-rw-r--r--src/ffluci/view/header.htm59
-rw-r--r--src/ffluci/view/hello.htm1
-rw-r--r--src/ffluci/view/menu.htm25
6 files changed, 58 insertions, 42 deletions
diff --git a/src/ffluci/view/example-simpleview/foo.htm b/src/ffluci/view/example-simpleview/foo.htm
deleted file mode 100755
index a0df536f1..000000000
--- a/src/ffluci/view/example-simpleview/foo.htm
+++ /dev/null
@@ -1,3 +0,0 @@
-<%+header%>
-<h1>bar</h1>
-<%+footer%> \ No newline at end of file
diff --git a/src/ffluci/view/example-simpleview/index.htm b/src/ffluci/view/example-simpleview/index.htm
deleted file mode 100755
index ffe1ccf71..000000000
--- a/src/ffluci/view/example-simpleview/index.htm
+++ /dev/null
@@ -1,6 +0,0 @@
-<%+header%>
-<p><%:descr This is the Simple View-Example.<br />
-This template is ffluci/view/example-simpleview/index.htm and belongs
-to the index-Action.%></p>
-<p><%:lan The router's LAN IP-Address is:%> <%~network.lan.ipaddr%></p>
-<%+footer%> \ No newline at end of file
diff --git a/src/ffluci/view/footer.htm b/src/ffluci/view/footer.htm
index 17c7245b6..c43cbb7e4 100644
--- a/src/ffluci/view/footer.htm
+++ b/src/ffluci/view/footer.htm
@@ -1,3 +1,7 @@
-</div>
+ </div>
+ <div class="clear"></div>
+</div></div>
+
+<div class="separator magenta bold">FFLuCI 0.1 - Freifunk Lua Configuration Interface</div>
</body>
</html> \ No newline at end of file
diff --git a/src/ffluci/view/header.htm b/src/ffluci/view/header.htm
index f47388a42..2c0836be5 100644
--- a/src/ffluci/view/header.htm
+++ b/src/ffluci/view/header.htm
@@ -1,9 +1,56 @@
-<% require("ffluci.http").htmlheader() %>
-<html>
+<%
+local req = require("ffluci.dispatcher").request
+local menu = require("ffluci.menu").get()[req.category]
+require("ffluci.i18n").loadc("default")
+require("ffluci.http").htmlheader()
+%><?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>FFLuCI Examples</title>
+<link rel="stylesheet" type="text/css" href="<%=media%>/cascade.css" />
+<title>FFLuCI</title>
</head>
<body>
-<h1>FFLuCI</h1>
-<%+menu%>
-<div id="content"> \ No newline at end of file
+<div id="header">
+ <div class="headerlogo left"><img src="<%=media%>/logo.png" alt="Freifunk" /></div>
+ <div class="whitetext smalltext right">
+ OpenWRT Kamikaze<br />
+ Freifunk Firmware 2.0-dev<br />
+ Load average: 1.00 2.00 3.00<br />
+ 1.2.3.4 - host1
+ </div>
+ <div>
+ <span class="headertitle">Freifunk Kamikaze</span><br />
+ <span class="whitetext bold"><%:batmanedition Fledermausedition%></span>
+ </div>
+</div>
+
+<div class="separator yellow bold">
+<%:path Pfad%>: <a href="<%=controller .. "/" .. req.category%>"><%=req.category%></a>
+&#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module %>"><%=req.module%></a>
+&#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module .. "/" .. req.action %>"><%=req.action%></a>
+</div>
+
+<div id="columns"><div id="columnswrapper">
+ <div class="sidebar left">
+ <% for k,v in pairs(menu) do %>
+ <div<% if v[".contr"] == req.module then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a><%
+ if v[".contr"] == req.module then %>
+ <ul><% for key,val in ipairs(v) do %>
+ <li<% if val.action == req.action then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..req.module.."/"..val.action%>"><%=translate(val.action, val.descr)%></a></li>
+ <% end %></ul>
+ <% end %></div>
+ <% end %>
+ </div>
+ <div class="sidebar right">
+ <div><%:webif Weboberfläche%>
+ <ul>
+ <li<% if "public" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/public"><%:public Public%></a></li>
+ <li<% if "admin" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/admin"><%:admin Admin%></a></li>
+ </ul>
+ </div>
+ <% if "admin" == req.category then %>
+ <div>Konfiguration<ul><li>x Änderungen</li><li>Anwenden</li><li>Zurücksetzen</li></ul></div>
+ <% end %>
+ </div>
+ <div id="content">
diff --git a/src/ffluci/view/hello.htm b/src/ffluci/view/hello.htm
deleted file mode 100644
index 8231b61f9..000000000
--- a/src/ffluci/view/hello.htm
+++ /dev/null
@@ -1 +0,0 @@
-A very little Hello <%=muh%>
diff --git a/src/ffluci/view/menu.htm b/src/ffluci/view/menu.htm
deleted file mode 100644
index 8d5c597cf..000000000
--- a/src/ffluci/view/menu.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<%
-local req = require("ffluci.dispatcher").request
-local menu = require("ffluci.menu").get()[req.category]
-local menu_module = nil
-require("ffluci.i18n").loadc("default")
-%>
-<div id="menu" style="font-size: 0.8em; padding-bottom: 20px">
- <div id="menu_categories">
- <span style="<% if "public" == req.category then write("font-weight: bold") end %>"><a href="<%=controller%>/public"><%:public Public%></a></span>
- <span style="<% if "admin" == req.category then write("font-weight: bold") end %>"><a href="<%=controller%>/admin"><%:admin Admin%></a></span>
- </div>
- <div id="menu_modules">
-<% for k,v in pairs(menu) do
-if v[".contr"] == req.module then menu_module = v end %>
- <span style="<% if v[".contr"] == req.module then write("font-weight: bold") end %>"><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a></span>
-<% end %>
- </div>
-<% if menu_module then %>
- <div id="menu_actions">
-<% for k,v in ipairs(menu_module) do %>
- <span style="<% if v.action == req.action then write("font-weight: bold") end %>"><a href="<%=controller.."/"..req.category.."/"..req.module.."/"..v.action%>"><%=translate(v.action, v.descr)%></a></span>
-<% end %>
- </div>
-<% end %>
-</div>