<% local view, viewlibrary, page_info = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% if view.filename then view.label = view.label.." for "..string.gsub(view.filename, "^.*/", "") end %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <% local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Locations"}), page_info, htmlviewfunctions.incrementheader(header_level)) %> <% end %>
  • <%= html.html_escape(loc[1]) %>
  • <% if currentloc == "" then %>

    No locations defined

    <% else %> <% end %> <% htmlviewfunctions.displaysectionend(header_level2) %> <% local function doListIndents(next, indent) local newentry = {} for mt in string.gmatch(next, "([^.]+)") do table.insert(newentry, mt) end local revnewentry = {} for j=#newentry,1,-1 do table.insert(revnewentry, newentry[j]) end local i=1 while indent[i] and revnewentry[i] == indent[i] do i=i+1 end local ending = #indent-(i-1) local starting = #newentry-(i-1) for j=1,ending do io.write("\n") end for j=1,starting do io.write(" <% end %> <% htmlviewfunctions.displaysectionend(header_level2) %> <% htmlviewfunctions.displaysectionend(header_level) %>