summaryrefslogtreecommitdiffstats
path: root/templates/part.navigation.folder.php
blob: 180b225f38b62f7bc02c251f7b0857207f25dde9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<li ng-class="{
        active: Navigation.isFolderActive(folder.id),
        open: folder.opened && Navigation.hasFeeds(folder.id),
        collapsible: Navigation.hasFeeds(folder.id),
        unread: Navigation.getFolderUnreadCount(folder.id) > 0,
        failed: folder.error
    }"
    ng-repeat="folder in Navigation.getFolders() | orderBy:'id':true"
    ng-show="Navigation.getFolderUnreadCount(folder.id) != 0
            || Navigation.isShowAll()
            || Navigation.isFolderActive(folder.id)
            || Navigation.subFeedActive(folder.id)
            || !folder.id"
    class="folder with-counter with-menu"
    data-id="{{ folder.id }}"
    news-droppable>
    <button class="collapse"
            ng-hide="folder.editing"
            title="<?php p($l->t('Collapse'));?>"
            ng-click="Navigation.toggleFolder(folder.name)"></button>

    <div ng-if="folder.deleted" class="app-navigation-entry-deleted" news-timeout="Navigation.removeFeed(feed)">
        <div class="app-navigation-entry-deleted-description"><?php p($l->t('Deleted')); ?> {{ feed.title }}</div>
        <button class="icon-history"
                title="<?php p($l->t('Undo')); ?>"
                ng-click="Navigation.undeleteFolder(folder)"></button>
        <button class="icon-close"
                title="<?php p($l->t('Remove notification')); ?>"
                ng-click="Navigation.removeFolder(folder)"></button>
    </div>

    <div ng-if="folder.editing" class="app-navigation-entry-edit">
        <input name="folderRename" type="text" value="{{ folder.name }}" news-auto-focus>
        <button title="<?php p($l->t('Rename')); ?>"
                ng-click="Navigation.renameFolder(folder)"
                class="action icon-checkmark">
        </button>
    </div>

    <a ng-href="#/items/folders/{{ folder.id }}/"
        class="title icon-folder"
        ng-hide="folder.editing"
        ng-class="{
            'icon-loading': !folder.id
        }">
       {{ folder.name }}
    </a>

    <div class="app-navigation-entry-utils"
         ng-show="folder.id && !folder.editing && !folder.error && !folder.deleted">
        <ul>
            <li class="app-navigation-entry-utils-counter"
                ng-show="folder.id && Navigation.getFolderUnreadCount(folder.id) > 0">
                {{ Navigation.getFolderUnreadCount(folder.id) | unreadCountFormatter }}
            </li>
            <li class="app-navigation-entry-utils-menu-button">
                <button title="<?php p($l->t('Menu')); ?>"></button>
            </li>
        </ul>
    </div>

    <div class="app-navigation-entry-menu">
        <ul>
            <li><button ng-click="folder.editing=true"
                        class="icon-rename"
                        title="<?php p($l->t('Rename folder')); ?>"></button></li>
            <li><button ng-click="Navigation.deleteFolder(folder)"
                        class="icon-delete"
                        title="<?php p($l->t('Delete folder')); ?>"></button></li>
            <li><button ng-show="Navigation.getFolderUnreadCount(folder.id) > 0"
                        class="icon-checkmark"
                        ng-click="Navigation.markFolderRead(folder.id)"
                        title="<?php p($l->t('Read all')); ?>"></button></li>
        </ul>
    </div>
    <ul>
        <?php print_unescaped($this->inc('part.navigation.feed', ['folderId' => 'folder.id'])); ?>
    </ul>

    <div class="message" ng-show="folder.error">{{ folder.error }}</div>
</li>