Template:MindTouch > Reports > Controls > TableCellResult

TableCellResult

    Table of contents
    No headers
    /**
     * Table Cell: Search result detail
     * Outputs search result related information
     */
    // page, file, comment
    var resultType = $type;
    var class = $class;
    var pageId = $pageId;
    var fileId = $fileId; // optional
    var commentId = $commentId;
    var cellPage = $page ?? wiki.getpage(num.cast(pageId));
    var cellFile = $file;
    var cellComment = $comment;
    
    // support loading files by id
    if (resultType == "file" && cellFile is nil)
        let cellFile = wiki.getfile(num.cast(fileId));
    
    let class ..= "result-detail result-type-" .. resultType;
    
    switch (resultType) {
    default:
    case "page":
        Template("MindTouch/Reports/Controls/TableCellPage", {
            page: cellPage,
            class: class
        });
    
    case "file":
        <td class=(class)>
            <div class="details">
            <a href=(cellFile.uri)>cellFile.name</a>;
            <span class="in">
                " " .. wiki.localize("MindTouch.Reports.data.title.in") .. " ";
                <a href=(cellPage.uri)>cellPage.path</a>;
            </span>
        </div>
        </td>
    
    case "comment":
        <td class=(class)>
            <div class="details">
            <a href=(cellComment.uri) title=(cellComment.text)>"Comment #"..cellComment.number</a>;
            <span class="in">
                " " .. wiki.localize("MindTouch.Reports.data.title.in") .. " ";
                <a href=(cellPage.uri)>cellPage.path</a>;
            </span>
            </div>
        </td>
    }
    
    



    Tag page (Edit tags)
    • No tags

    Running the latest version?

    V1.12.0 - released July 2015
    Releasenews | Download
    Changelog
    | Requirements

    MediaPortal RSS Feeds

    windows media centerNews & Blogs
    htpcP&S: New
    htpcDocumentation

    Team-MediaPortal

    HTPCAbout
    Contact | Press
    Partners