libs/cbi: Add cross-linking capabilities
authorSteven Barth <steven@midlink.org>
Thu, 14 Aug 2008 11:50:13 +0000 (11:50 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 14 Aug 2008 11:50:13 +0000 (11:50 +0000)
libs/cbi/luasrc/view/cbi/full_valueheader.htm
libs/cbi/luasrc/view/cbi/tblsection.htm

index 566e236..ce079ca 100644 (file)
@@ -14,5 +14,9 @@ $Id$
 -%>
 
 <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
 -%>
 
 <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
-       <label class="cbi-value-title"<%= attr("for", cbid) %>><%=self.title%></label>
+       <label class="cbi-value-title"<%= attr("for", cbid) %>>
+       <%- if self.titleref then -%><a class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
+               <%-=self.title-%>
+       <%- if self.titleref then -%></a><%- end -%>
+       </label>
                <div class="cbi-value-field">
                <div class="cbi-value-field">
index 3630408..a397762 100644 (file)
@@ -34,7 +34,11 @@ end
                                <th>&nbsp;</th>
                        <%- end -%>
                        <%- for i, k in pairs(self.children) do if not k.optional then -%>
                                <th>&nbsp;</th>
                        <%- end -%>
                        <%- for i, k in pairs(self.children) do if not k.optional then -%>
-                               <th class="cbi-section-table-cell"><%=k.title%></th>
+                               <th class="cbi-section-table-cell">
+                               <%- if k.titleref then -%><a class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
+                                       <%-=k.title-%>
+                               <%- if k.titleref then -%></a><%- end -%>
+                               </th>
                        <%- count = count + 1; end; end; if self.extedit or self.addremove then -%>
                                <th class="cbi-section-table-cell">&nbsp;</th>
                        <%- count = count + 1; end -%>
                        <%- count = count + 1; end; end; if self.extedit or self.addremove then -%>
                                <th class="cbi-section-table-cell">&nbsp;</th>
                        <%- count = count + 1; end -%>