function renderGuideAsHtmlLi()

in assets/javascripts/search.js [210:239]


function renderGuideAsHtmlLi(guide, query) {
    var html = "<li>";
    if (guide.tags === undefined || guide.tags === null) {
        html += "<div class=\"multiguide\">";
        html += "<span class=\"title\">" + guide.title + "</span>";
        var titleMatched = doesTitleMatchesQuery(guide.title, query);
        for (var i = 0; i < guide.versions.length; i++) {
            var version = guide.versions[i];
            var tagsMatched = doesTagsMatchesQuery(version.tags, query);
            if (titleMatched || tagsMatched) {
                html += "<div class=\"align-left\">";
                html += "<a class=\"grailsVersion\" href=\""+version.href+"\">"+version.grailsVersion+"</a>"
                for (var x = 0; x < version.tags.length; x++) {
                    var tag = version.tags[x];
                    html += "<span style='display: none' class='tag'>" + tag + "</span>";
                }
                html += "</div>";
            }
        }
        html += "</div>";
    } else {
        html += "<a class='" + guideClassName + "' href='" + guide.href + "'>" + guide.title + "</a>";
        for (var i = 0; i < guide.tags.length; i++) {
            var tag = guide.tags[i];
            html += "<span style='display: none' class='tag'>" + tag + "</span>";
        }
    }
    html += "</li>"
    return html;
}