button.track-button.watch-button(
    title="{{ 'PROJECT.WATCH_BUTTON.BUTTON_TITLE' | translate }}"
    ng-click="vm.toggleWatcherOptions()"
    ng-class="{'active': vm.project.get('is_watcher')}"
)
    span.track-inner
        span.track-icon
            tg-svg(svg-icon="icon-watch")
        span(
            ng-if="!vm.project.get('is_watcher')"
            translate="PROJECT.WATCH_BUTTON.WATCH"
        )
        span(
            ng-if="vm.project.get('is_watcher')"
            translate="PROJECT.WATCH_BUTTON.WATCHING"
        )
        tg-svg.watch-options-arrow(svg-icon="icon-arrow-down")

    span.track-button-counter(
        title="{{ 'PROJECT.WATCH_BUTTON.COUNTER_TITLE'|translate:{total:vm.project.get(\"total_watchers\")||0}:'messageformat' }}"
        tg-loading="vm.loading"
    ) {{ vm.project.get('total_watchers') }}

ul.watch-options(
    ng-class="{'hidden': !vm.showWatchOptions}"
    ng-mouseleave="vm.closeWatcherOptions()"
)

    li
        a(
            href="",
            title="{{ 'PROJECT.WATCH_BUTTON.OPTIONS.NOTIFY_ALL_TITLE' | translate }}",
            ng-click="vm.watch(2)",
            ng-class="{'active': vm.project.get('is_watcher') && vm.project.get('notify_level') == 2}"
        )
            span(translate="PROJECT.WATCH_BUTTON.OPTIONS.NOTIFY_ALL")
            span.watch-check(ng-if="vm.project.get('is_watcher') && vm.project.get('notify_level') == 2")
                tg-svg(svg-icon="icon-check-empty")
    li
        a(
            href="",
            title="{{ 'PROJECT.WATCH_BUTTON.OPTIONS.NOTIFY_INVOLVED_TITLE' | translate }}",
            ng-click="vm.watch(1)",
            ng-class="{'active': vm.project.get('is_watcher') && vm.project.get('notify_level') == 1}"
        )
            span(translate="PROJECT.WATCH_BUTTON.OPTIONS.NOTIFY_INVOLVED")
            span.watch-check(ng-if="vm.project.get('is_watcher') && vm.project.get('notify_level') == 1")
                tg-svg(svg-icon="icon-check-empty")

    li(ng-if="vm.project.get('is_watcher')")
        a(
            href="",
            title="{{ 'PROJECT.WATCH_BUTTON.OPTIONS.UNWATCH_TITLE' | translate }}",
            ng-click="vm.unwatch()"
        )
            span(translate="PROJECT.WATCH_BUTTON.OPTIONS.UNWATCH")
