summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel/templates/default/memoserv/memos.html
blob: dc82846c63bdb4770ec409d593be8d71f0fa88c8 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{INCLUDE header.html}
		{FOR M IN MESSAGES}
		<div class="alert alert-info">
			{M}<br>
		</div>
		{END FOR}

		{IF EXISTS NUMBER}
			<script>
				$("#tableInfoMemos").ready(function() \{
					$(".reply").click(function(e) \{
						e.preventDefault();
						var recv = $(this).attr('href');
						$("#receiver").val(recv);
						$("#message").focus();
					\});
				\});
			</script>

			<script>
				$(function () \{
					$('.table tbody tr td abbr').popover();
				\});
			</script>

			<h2>Memos List</h2>
			<table id="tableInfoMemos" class="table table-hover">
				<thead>
					<th>Number</th>
					<th>Sender</th>
					<th>Message <small>(hover: Time)</small></th>
					<th></th>
				</thead>
				<tbody>
				{FOR I,S,T,TXT,U IN NUMBER,SENDER,TIME,TEXT,UNREAD}
					{IF EQ U YES}
					<tr class="read">
					{ELSE}
					<tr class="unread">
					{END IF}
						<td>{I}</td>
						<td>{S}</td>
						<td><abbr data-container="body" data-trigger="hover" data-placement="top" data-content="{T}">{TXT}</abbr></td>
						<td style="text-align: right;" nowrap="nowrap">
						{IF EQ U YES}
							<a class="label label-success reply" href="{S}" id="memo{I}">Reply</a>
							<a class="label label-warning" href="/memoserv/memos?channel={ESCAPED_CHANNEL_NAME}&number={I}&read=1">Mark as Read</a>
							<a class="label label-danger" href="/memoserv/memos?channel={ESCAPED_CHANNEL_NAME}&number={I}&del=1">Delete</a>
						{ELSE}
							<a class="label label-success reply" href="{S}" id="memo{I}">Reply</a>
							<a class="label label-warning" href="/memoserv/memos?channel={ESCAPED_CHANNEL_NAME}&number={I}&read=2">Mark as Unread</a>
							<a class="label label-danger" href="/memoserv/memos?channel={ESCAPED_CHANNEL_NAME}&number={I}&del=1">Delete</a>
						{END IF}
						</td>
					</tr>
				{END FOR}
				</tbody>
			</table>
		{ELSE}
			<em>No memos to show.</em>
		{END IF}

		<hr>

		<div class="row">
			<div class="col-lg-5">
				<h4>Memos for channel</h4>
				<ul>
				{FOR CH,ECH IN CHANNEL_NAMES,ESCAPED_CHANNEL_NAMES}
					<li><a href="/memoserv/memos?channel={ECH}" class="channel">{CH}</a></li>
				{END FOR}
				</ul>
			</div>
			<div class="col-lg-7">
				<h4>Send a new Memo</h4>
				<form class="form-horizontal" method="post" action="/memoserv/memos?channel={ESCAPED_CHANNEL}">
					<div class="form-group">
						<label class="control-label col-lg-2" for="receiver">Receiver:</label>
						<div class="col-lg-10">
							<input class="form-control" type="text" name="receiver" id="receiver" placeholder="Nick or Channel" value="">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-lg-2" for="message">Message:</label>
						<div class="col-lg-10">
							<input class="form-control" type="text" name="message" id="message" placeholder="Your message here">
						</div>
					</div>
					<div class="form-group">
						<div class="col-lg-offset-2 col-lg-10">
							<button type="submit" class="btn btn-primary">Send</button>
						</div>
					</div>
				</form>
			</div>
		</div>

		{IF EXISTS CMDR}
		<div class="alert alert-info">
			{CMDR}
		</div>
		{END IF}
{INCLUDE footer.html}