<legend>Messages <a href="/Message" class="btn btn-success pull-right">Add <i class="icon-plus icon-white"></i></a>
</legend>
<div class="widget-box">
    <div class="widget-title">
        <ul class="nav nav-tabs">
            <li ng-class="{active: chosen == 'open'}"><a href ng-click="getMessages('open')">Open</a></li>
            <li ng-class="{active: chosen == 'closed'}"><a href ng-click="getMessages('closed')">Closed</a></li>
            <li ng-class="{active: chosen == 'all'}"><a href ng-click="getMessages('all')">All</a></li>
            <li class="dropdown pull-right">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Tags
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li ng-repeat="(name, count) in tags"><a href="#">{{name}} x {{count}}</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="widget-content nopadding">
        <table class="table table-bordered table-striped">
            <tbody>
            <tr ng-repeat="item in info" ng-class="{info: !item.Read}">
                <td>
                    <span class="user-info">User: {{item.User}} {{item.Age}} ago.  Updated {{item.LastUpdated}} ago.</span>

                    <p><a href="/Message/{{item.ThreadID}}">{{item.Title}}</a></p>
                    <a class="btn btn-mini" ng-repeat="tag in item.Tags"> {{tag}}</a>
                    <span class="label" ng-repeat="subscriber in item.Subscribers">{{subscriber}}</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</table>
