flm01/mote/v1/openwrt/package/luci/libs/cbi/luasrc/view/cbi/map.htm

58 lines
1.5 KiB
HTML

<%#
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id: map.htm 5773 2010-03-09 02:05:49Z jow $
-%>
<div class="cbi-map" id="cbi-<%=self.config%>">
<% if self.title and #self.title > 0 then %>
<h2>
<%
if self.breadcrumb then
local elem
for _, elem in ipairs(self.breadcrumb) do
-%>
<a href="<%=luci.util.pcdata(elem[1])%>"><%=luci.util.pcdata(elem[2])%></a> &raquo;
<%
end
end
-%>
<a id="content" name="content"><%=self.title%></a>
</h2>
<% end %>
<% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %>
<%- if self._apply then -%>
<fieldset class="cbi-section" id="cbi-apply-<%=self.config%>">
<legend><%:cbi_applying%></legend>
<ul class="cbi-apply"><%-
local fp = self._apply()
self._apply = nil
local line = fp:read()
while line do
write("<li>" .. luci.util.pcdata(line) .. "</li>\n")
line = fp:read()
end
fp:close()
-%></ul>
</fieldset>
<script type="text/javascript">
window.setTimeout(function() {
var e = document.getElementById('cbi-apply-<%=self.config%>');
if(e) e.style.display = 'none';
}, 2000);
</script>
<%- end -%>
<%- self:render_children() %>
<br />
</div>