1 # Copyright 2014 Paul Hänsch
3 # This file is part of Confetti.
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti. If not, see <http://www.gnu.org/licenses/>.
20 <span class="label">$(l10n filter_label)</span>
21 <form class="search" action="?action=select_mailing" method="POST">
23 <div class="selectlist">
24 <span class="label">$(l10n select_courses):</span>
25 <select name="courses" multiple="multiple">
26 $(listcourses |while read course; do
27 name="$(sed -rn 's:^SUMMARY(;.+)*\:(.*)\r$:\2:p' "$_DATA/ical/$course")"
28 echo '<option value="'$course'">'$name'</option>'
33 <div class="selectlist">
34 <span class="label">$(l10n select_attendees):</span>
35 <select name="courses" multiple="multiple">
36 $(listcards |while read card; do
37 n_last="$( sed -rn 's:^N(;.+)*\:([^;]*;){0} *([^;]*).*$:\3:p' "$_DATA/vcard/$card")"
38 n_first="$( sed -rn 's:^N(;.+)*\:([^;]*;){1} *([^;]*).*$:\3:p' "$_DATA/vcard/$card")"
39 n_middle="$(sed -rn 's:^N(;.+)*\:([^;]*;){2} *([^;]*).*$:\3:p' "$_DATA/vcard/$card")"
40 n_pre="$( sed -rn 's:^N(;.+)*\:([^;]*;){3} *([^;]*).*$:\3:p' "$_DATA/vcard/$card")"
41 n_post="$( sed -rn 's:^N(;.+)*\:([^;]*;){4} *([^;]*).*$:\3:p' "$_DATA/vcard/$card")"
42 name="${n_pre} ${n_first} ${n_middle} ${n_last} ${n_post}"
43 echo '<option value="'$card'">'$name'</option>'
48 <button type="submit" name="choice" value="new_selection">$(l10n selection_apply)</button>
49 <button type="submit" name="choice" value="del_selection">$(l10n selection_clear)</button>
53 <div class="maillist">
57 # vi:set filetype=html: