18F/continua11y

View on GitHub
views/commit.jade

Summary

Maintainability
Test Coverage
extends ./layout.jade

block title
    title Accessibility report for #{repo}

block content
    h1!= repo
        img.badge-img(src="/#{repo}.svg?branch=#{branch}" alt="accessibility for #{branch} branch")
    table.table.table-hover.tablesorter
        thead
            tr
                th url
                th errors
                th warnings
                th notices
                th total
        tbody
            each result in results
                tr
                    td #{result.path}
                    td #{result.error}
                    td #{result.warning}
                    td #{result.notice}
                    td #{result.total}

block extra_js
    script(src="/js/jquery.tablesorter.min.js")
    script(src="/js/jquery.tablesorter.widgets.js")

block script
    script.
        $.tablesorter.themes.bootstrap = {
            //- icons: 'pull-right',
            iconSortNone : 'glyphicon glyphicon-sort', // class name added to icon when column is not sorted
            iconSortAsc  : 'glyphicon glyphicon-chevron-up', // class name added to icon when column has ascending sort
            iconSortDesc : 'glyphicon glyphicon-chevron-down' // class name added to icon when column has descending sort
        }
        $(document).ready(function (){
            $(".table").tablesorter({
                headerTemplate : '{content} {icon}',
                widthFixed: true,
                widgets: ["uitheme"],
                theme: "bootstrap"
            });
        });