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 566e236ed1c09ec6fe71b89ba56c485da8090d25..ce079ca57365d265d8560006cf40846d6d31c014 100644 (file)
@@ -14,5 +14,9 @@ $Id$
 -%>
 
 <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">
index 36304081bdf59552900f8f6fb32a6d177df7a785..a397762f46699c5dd1ce9accb4ed80deb6f5c765 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 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 -%>