blob: 2c73d399e7169a3535f6e2b4dd5ca068eff219ec (
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
|
<%pre>
#include "recordings.h"
#include "tools.h"
using namespace vdrlive;
</%pre>
<%args>
path[];
</%args>
<ul class="recordingslist">
<{
esyslog("DH: in component 'recordings_item' path elements are:");
for (path_type::const_iterator i = path.begin(); i != path.end(); ++i) {
esyslog("DH: %s", (*i).c_str());
}
RecordingsTree& recordingsTree = LiveRecordingsTree();
bool active = false;
RecordingsTree::Map::iterator iter;
RecordingsTree::Map::iterator end = recordingsTree.end(path);
for (iter = recordingsTree.begin(path); iter != end; iter++) {
RecordingsTree::RecordingsItemPtr recItem = iter->second;
active = !active;
}>
<li class="recording <? active ? "active" ?>">
% if (recItem->IsDir()) {
<span class="recordingmime"><img src="/folder_open.png" alt="folder_open" /></span>
<span class="recordingdate"><$ recItem->StartTime() $></span>
<span class="recordingtime"><$ recItem->StartTime() $></span>
% } else {
<span class="recordingmime"><img src="/file.png" alt="file" /></span>
<span class="recordingdate"><$ FormatDateTime(tr("%a, %b %d"), recItem->StartTime()) $></span>
<span class="recordingtime"><$ FormatDateTime(tr("%I:%M %p"), recItem->StartTime()) $></span>
% }
<span class="recordingname"><$ recItem->Name() $></span>
<{
if (recItem->IsDir()) {
cxxtools::QueryParams recItemParams(qparam, false);
for (path_type::const_iterator i = path.begin(); i != path.end(); ++i) {
recItemParams.add("path", *i);
}
recItemParams.add("path", recItem->Name());
callComp("recordings_item", request, reply, recItemParams);
}
}>
</li>
<{
}
}>
</ul>
|