1 |
efrain |
1 |
<!--
|
|
|
2 |
// This file is part of Moodle - http://moodle.org/
|
|
|
3 |
//
|
|
|
4 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
// it under the terms of the GNU General Public License as published by
|
|
|
6 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
// (at your option) any later version.
|
|
|
8 |
//
|
|
|
9 |
// Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
// GNU General Public License for more details.
|
|
|
13 |
//
|
|
|
14 |
// You should have received a copy of the GNU General Public License
|
|
|
15 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
* @package block_quickmail
|
|
|
19 |
* @copyright 2008 onwards Louisiana State University
|
|
|
20 |
* @copyright 2008 onwards Chad Mazilly, Robert Russo, Jason Peak, Dave Elliott, Adam Zapletal, Philip Cali
|
|
|
21 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
22 |
*/
|
|
|
23 |
-->
|
|
|
24 |
|
|
|
25 |
<div class="block_quickmail_sent_message_index">
|
|
|
26 |
<select id="select_course_filter" class="custom-select mb-4">
|
|
|
27 |
<option value="0">{{# str }} fulllistofcourses {{/ str }}</option>
|
|
|
28 |
{{# userCourseArray }}
|
|
|
29 |
<option value="{{ userCourseId }}" {{ selectedAttr }}>{{ userCourseName }}</option>
|
|
|
30 |
{{/ userCourseArray }}
|
|
|
31 |
</select>
|
|
|
32 |
|
|
|
33 |
<table class="table table-hover qm_sent_msgs">
|
|
|
34 |
<thead>
|
|
|
35 |
<tr>
|
|
|
36 |
{{#courseIsSorted}}
|
|
|
37 |
{{#isSortedAsc}}
|
|
|
38 |
<th><a href="?courseid={{ courseId }}&sort=course&dir=desc">{{# str }} course {{/ str }}</a> {{#pix}} t/sort_asc {{/pix}}</th>
|
|
|
39 |
{{/isSortedAsc}}
|
|
|
40 |
|
|
|
41 |
{{^isSortedAsc}}
|
|
|
42 |
<th><a href="?courseid={{ courseId }}&sort=course&dir=asc">{{# str }} course {{/ str }}</a> {{#pix}} t/sort_desc {{/pix}}</th>
|
|
|
43 |
{{/isSortedAsc}}
|
|
|
44 |
{{/courseIsSorted}}
|
|
|
45 |
{{^courseIsSorted}}
|
|
|
46 |
<th><a href="?courseid={{ courseId }}&sort=course&dir=asc">{{# str }} course {{/ str }}</a></th>
|
|
|
47 |
{{/courseIsSorted}}
|
|
|
48 |
|
|
|
49 |
{{#subjectIsSorted}}
|
|
|
50 |
{{#isSortedAsc}}
|
|
|
51 |
<th><a href="?courseid={{ courseId }}&sort=subject&dir=desc">{{# str }} subject, block_quickmail {{/ str }}</a> {{#pix}} t/sort_asc {{/pix}}</th>
|
|
|
52 |
{{/isSortedAsc}}
|
|
|
53 |
|
|
|
54 |
{{^isSortedAsc}}
|
|
|
55 |
<th><a href="?courseid={{ courseId }}&sort=subject&dir=asc">{{# str }} subject, block_quickmail {{/ str }}</a> {{#pix}} t/sort_desc {{/pix}}</th>
|
|
|
56 |
{{/isSortedAsc}}
|
|
|
57 |
{{/subjectIsSorted}}
|
|
|
58 |
{{^subjectIsSorted}}
|
|
|
59 |
<th><a href="?courseid={{ courseId }}&sort=subject&dir=asc">{{# str }} subject, block_quickmail {{/ str }}</a></th>
|
|
|
60 |
{{/subjectIsSorted}}
|
|
|
61 |
|
|
|
62 |
<th>{{# str }} message_preview, block_quickmail {{/ str }}</th>
|
|
|
63 |
<th>{{# str }} attachments, block_quickmail {{/ str }}</th>
|
|
|
64 |
<th>{{# str }} recipients, block_quickmail {{/ str }}</th>
|
|
|
65 |
<th>{{# str }} additional_emails, block_quickmail {{/ str }}</th>
|
|
|
66 |
|
|
|
67 |
{{#sentAtIsSorted}}
|
|
|
68 |
{{#isSortedAsc}}
|
|
|
69 |
<th><a href="?courseid={{ courseId }}&sort=sent&dir=desc">{{# str }} sent_at, block_quickmail {{/ str }}</a> {{#pix}} t/sort_asc {{/pix}}</th>
|
|
|
70 |
{{/isSortedAsc}}
|
|
|
71 |
|
|
|
72 |
{{^isSortedAsc}}
|
|
|
73 |
<th><a href="?courseid={{ courseId }}&sort=sent&dir=asc">{{# str }} sent_at, block_quickmail {{/ str }}</a> {{#pix}} t/sort_desc {{/pix}}</th>
|
|
|
74 |
{{/isSortedAsc}}
|
|
|
75 |
{{/sentAtIsSorted}}
|
|
|
76 |
{{^sentAtIsSorted}}
|
|
|
77 |
<th><a href="?courseid={{ courseId }}&sort=sent&dir=asc">{{# str }} sent_at, block_quickmail {{/ str }}</a></th>
|
|
|
78 |
{{/sentAtIsSorted}}
|
|
|
79 |
|
|
|
80 |
{{#toggleSentEdit}}
|
|
|
81 |
<th class="qm_tb_col_spcr">
|
|
|
82 |
<a href="?courseid={{ courseId }}&sentedit=0">View/Edit</a>
|
|
|
83 |
<br>
|
|
|
84 |
<input type="checkbox" class="qm_sm_spacer" id="qm_sm_select_all" name="selectAll"/><label for="qm_sm_select_all">Select All</label>
|
|
|
85 |
</th>
|
|
|
86 |
{{/toggleSentEdit}}
|
|
|
87 |
{{^toggleSentEdit}}
|
|
|
88 |
<th><a href="?courseid={{ courseId }}&sentedit=1">View/Edit</a>
|
|
|
89 |
</th>
|
|
|
90 |
{{/toggleSentEdit}}
|
|
|
91 |
</tr>
|
|
|
92 |
</thead>
|
|
|
93 |
<tbody>
|
|
|
94 |
{{# tableRows }}
|
|
|
95 |
<tr>
|
|
|
96 |
<td>{{ courseName }}</td>
|
|
|
97 |
<td>{{ subjectPreview }}</td>
|
|
|
98 |
<td>{{ messagePreview }}</td>
|
|
|
99 |
<td>{{ attachmentTotal }}</td>
|
|
|
100 |
<td>{{ recipientTotal }}</td>
|
|
|
101 |
<td>{{ additionalEmailTotal }}</td>
|
|
|
102 |
<td>{{ sentAt }}</td>
|
|
|
103 |
{{#toggleSentEdit}}
|
|
|
104 |
<td>
|
|
|
105 |
<input type="checkbox" class="qm_sm_cb" data-msgid="{{ id }}" name="sent_msg_{{id}}" value="">
|
|
|
106 |
<a href="#" class="qm_sm_trash btn btn-danger btn-sm" data-msgid="{{ id }}"><i class="fa fa-trash"></i></a>
|
|
|
107 |
</td>
|
|
|
108 |
{{/toggleSentEdit}}
|
|
|
109 |
{{^toggleSentEdit}}
|
|
|
110 |
<td><a href="{{ openUrl }}" class="btn btn-primary btn-sm">{{# str }} view {{/ str }}</a></td>
|
|
|
111 |
{{/toggleSentEdit}}
|
|
|
112 |
</tr>
|
|
|
113 |
{{/ tableRows }}
|
|
|
114 |
|
|
|
115 |
{{^ tableRows }}
|
|
|
116 |
<tr>
|
|
|
117 |
<td colspan="5" align="center">{{# str }} no_sents, block_quickmail {{/ str }}</td>
|
|
|
118 |
</tr>
|
|
|
119 |
{{/ tableRows }}
|
|
|
120 |
|
|
|
121 |
{{#toggleSentEdit}}
|
|
|
122 |
<tr>
|
|
|
123 |
<td colspan=6></td>
|
|
|
124 |
<td colspan=2 class='alnright'><button type="button" id="qm_sm_selected_remove" style="display:none" class="btn btn-danger">Remove Selected</button></td>
|
|
|
125 |
</tr>
|
|
|
126 |
{{/toggleSentEdit}}
|
|
|
127 |
{{^toggleSentEdit}}
|
|
|
128 |
{{! Nothing....... }}
|
|
|
129 |
{{/toggleSentEdit}}
|
|
|
130 |
</tbody>
|
|
|
131 |
</table>
|
|
|
132 |
|
|
|
133 |
{{< block_quickmail/pagination }}
|
|
|
134 |
{{/ block_quickmail/pagination }}
|
|
|
135 |
|
|
|
136 |
<a href="{{ urlBack }}" class="btn btn-secondary">{{ urlBackLabel }}</a>
|
|
|
137 |
</div>
|
|
|
138 |
|
|
|
139 |
{{#js}}
|
|
|
140 |
require(['jquery', 'block_quickmail/sent_messages'], function($, SM) {
|
|
|
141 |
SM.init();
|
|
|
142 |
});
|
|
|
143 |
{{/js}}
|