modules/freifunk/services: Use cbi table style

This commit is contained in:
Manuel Munz 2010-11-23 23:40:54 +00:00
parent a0cc210a68
commit a411c56c87

View file

@ -45,36 +45,36 @@ function fetch_services()
return tables return tables
end end
%> %>
<% if has_services then %> <% if has_services then %>
<div class="cbi-map">
<h2><a id="content" name="content"><%:Services%></a></h2> <h2><a id="content" name="content"><%:Services%></a></h2>
<br /> <div class="cbi-map-descr"/>
<div class="cbi-section">
<div class="cbi-section-node">
<table class="cbi-section-table">
<tr class="cbi-section-table-titles">
<th class="cbi-section-table-cell"><%:Url%></th>
<th class="cbi-section-table-cell"><%:Source%></th>
</tr>
<table class="smalltext" cellspacing="0" cellpadding="6"> <% table=fetch_services()
<tr> local i = 1
<th><%:Url%></th>
<th><%:Source%></th>
</tr>
<%
table=fetch_services()
for k, line in ipairs(table) do for k, line in ipairs(table) do
local field = {} local field = {}
-- split line at # and |, 1=url, 2=proto, 3=description, 4=source -- split line at # and |, 1=url, 2=proto, 3=description, 4=source
local field = luci.util.split(line, "[#|]", split, true) local field = luci.util.split(line, "[#|]", split, true) %>
%> <tr class="cbi-section-table-row cbi-rowstyle-<%=i%>">
<tr><td> <td class="cbi-section-table-cell"><a href="<%=field[1]%>"><%=field[3]%></a></td>
<a href="<%=field[1]%>"><%=field[3]%></a> <td class="cbi-section-table-cell"><%=field[4]%></td>
</td> </tr>
<td> <% if i == 1 then i = 0 elseif i == 0 then i = 1 end %>
<%=field[4]%>
</td>
</tr>
<%end%> <%end%>
</table>
</table> </div>
</div>
</div>
<br /> <br />
<%=last_update%> <%=last_update%>