summaryrefslogtreecommitdiffstats
path: root/templates/part.listfolder.php
blob: c104303b54c2a6f9093e561313de952ee1d09440 (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
<li ng-class="{
		active: folderBusinessLayer.isActive(folder.id), 
		open: folder.opened && folderBusinessLayer.hasFeeds(folder.id),
		collapsible: folderBusinessLayer.hasFeeds(folder.id),
		unread: folderBusinessLayer.getUnreadCount(folder.id) != 0,
		failed: folder.error
	}" 
	ng-repeat="folder in folderBusinessLayer.getAll() | orderBy:'id':true"
	ng-show="folderBusinessLayer.isVisible(folder.id) || !folder.id"
	class="folder"
	data-id="{{ folder.id }}"
	droppable>
	<button class="collapse" 
			ng-hide="folder.editing"
			title="<?php p($l->t('Collapse'));?>"
			ng-click="folderBusinessLayer.toggleFolder(folder.id)"></button>
	<div ui-if="folder.editing" class="rename-feed">
        <input type="text" ng-model="folder.name" class="folder-input" autofocus>
        <button title="<?php p($l->t('Cancel')); ?>"
			ng-click="folderBusinessLayer.cancel(folder.id)"
			class="action-button back-button action"></button>
		<button title="<?php p($l->t('Save')); ?>"
			ng-click="folderBusinessLayer.rename(folder.id, folder.name)"
			class="action-button create-button action">
	  </button>
    </div>
	<a href="#" 
	   class="title folder-icon"
	   ng-hide="folder.editing"
	   ng-click="folderBusinessLayer.load(folder.id)"
	   ng-class="{
			'progress-icon': !folder.id,
			'problem-icon': folder.error
		}"
		oc-click-focus="{selector: '#app-content'}">
	   {{ folder.name }}
	</a>

	<span class="utils">

		<button ng-click="folderBusinessLayer.delete(folder.id)"
				ng-hide="folder.editing || !folder.id"
				class="svg action delete-icon delete-button" 
				title="<?php p($l->t('Delete folder')); ?>"
				oc-tooltip></button>

		<span class="unread-counter"
			ng-show="folderBusinessLayer.getUnreadCount(folder.id) > 0 && !folder.editing">
			{{ unreadCountFormatter(folderBusinessLayer.getUnreadCount(folder.id)) }}
		</span>
		
		<button class="svg action mark-read-icon" 
				ng-show="folderBusinessLayer.getUnreadCount(folder.id) > 0 && folder.id && !folder.editing"
				ng-click="folderBusinessLayer.markRead(folder.id)"
				title="<?php p($l->t('Mark read')); ?>"
				oc-tooltip></button>

		<button class="svg action delete-icon"
			ng-click="folderBusinessLayer.markErrorRead(folder.name)"
			title="<?php p($l->t('Delete folder')); ?>"
			ng-show="folder.error"
			oc-tooltip></button>

		<button class="svg action rename-feed-icon"
	                ng-hide="folder.editing"
			ng-click="folderBusinessLayer.edit(folder.id)"
			title="<?php p($l->t('Rename folder')); ?>"
	                oc-tooltip></button>

	</span>
	<ul>
		<?php print_unescaped($this->inc('part.listfeed', ['folderId' => 'folder.id'])); ?>
	</ul>
	
	<div class="message" ng-show="folder.error">{{ folder.error }}</div>
</li>