<div class="ui segment">
    <div class="ui container">
        <div class="ui grid">
            <div class="two wide column" ng-class="" ng-mouseover="" ng-mouseleave="" ng-repeat="tag in tags">
                <div class="ui small label" ng-class="{green:tag.bookmarkClicked}" ng-click="getBookmarks(tag.id, 1)">
                    {{ tag.name }}
                    ({{ tag.cnt || 0 }})
                </div>
            </div>
        </div>
    </div>
</div>
<table class="ui celled table" ng-if="bookmarkCount > 0" style="margin-top:-14px;">
    <div class="ui inverted dimmer" ng-class="{active:loadBookmarks, disabled: !loadBookmarks}">
        <div class="ui huge text loader">正在加载中...</div>
    </div>
    <thead>
        <tr>
            <th>标题</th>
            <th>链接</th>
            <th style="width:90px;">点击次数</th>
            <th style="width:100px;">创建日期</th>
            <th style="width:100px;">最后点击</th>
            <th style="width:150px;">分类</th>
            <th style="width:105px;">操作</th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="bookmark in bookmarks" id="{{ bookmark.id }}">
            <td>
                <img class="ui ui middle aligned tiny image" src=" http://favicon.byi.pw/?url={{bookmark.url}}" style="width:16px;height:16px">
                <span ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{bookmark.title}}">
                    {{ bookmark.title }}
                </span>
            </td>
            <td ng-click="jumpToUrl(bookmark.url, bookmark.id)">
                <span title="{{bookmark.url}}">{{ bookmark.url }}</span>
            </td>
            <td>{{ bookmark.click_count }}</td>
            <td>{{ bookmark.created_at }}</td>
            <td>{{ bookmark.last_click }}</td>
            <td>
                <div class="ui label" ng-repeat="tag in bookmark.tags" tag-id="{{ tag.id }}" ng-click="getBookmarks(tag.id, 1)">
                    {{ tag.name }}
                </div>
            </td>
            <td>
                <img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark.id)">
                <img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)">
                <img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark.id)">
                <img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/copy.png" ng-click="copyBookmark(bookmark.url)" title="复制链接">
            </td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th colspan="7">
                <pagination></pagination>
            </th>
        </tr>
    </tfoot>
</table>
