]> git.plutz.net Git - confetti/commitdiff
direct mail to all course participants
authorpaul <paul@plutz.net>
Fri, 6 Dec 2013 17:46:22 +0000 (17:46 +0000)
committerpaul <paul@plutz.net>
Fri, 6 Dec 2013 17:46:22 +0000 (17:46 +0000)
svn path=/trunk/; revision=36

templates/text_courses.sh
templates/view_course.sh

index cc773f27f22e38768064e4de9ef98b70b95496d6..c4bfcd93d5d6c074873bf64780bbcdc5d7ae8b3d 100755 (executable)
@@ -27,7 +27,8 @@ item_name[edit_dtscal]="&#x2713;"
 item_name[edit]="Bearbeiten"
 item_name[ics_export]="ICal exportieren"
 
-item_name[course_attendance]="Teilnehmende"
+item_name[course_attendance]="Teilnahme"
+item_name[course_mail]="Mail an Teilnehmende"
 
 item_name[sort_order]="Sortierung"
 item_name[order_DOW]="Wochentag"
index dc490c633a7a6a55ddc2b167b726dfbeb341bd06..883baeea5d8f10dfa7063ff02fed3a9359214c9c 100755 (executable)
@@ -39,6 +39,8 @@ else
   rr_limit=ETERN
 fi
 
+coursemail=""
+
 echo '<div id="'${id}'" class="course">'
 echo '<form action="/?action=update_course" method="POST">'
 echo '<input type="hidden" name="course" value="'${id}'"/>'
@@ -77,12 +79,15 @@ sed -rn 's:'$id'\t(.+)$:\1:p' "$_DATA/mappings/attendance" |while read each; do
   n_post="$(  sed -rn 's:^N(;.+)*\:([^;]*;){4} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")"
   aname="${n_pre} ${n_first} ${n_middle} ${n_last} ${n_post}"
   echo '    <a class="attendance" href="/?page=attendees#'$each'">'$aname'</a>'
+
+  coursemail="$coursemail$(sed -rn 's:^EMAIL(;.+)*\:(.+)\r$:\2,:p' "$_DATA/vcard/$each")"
 done
 echo '  </div>'
 
 echo '  <div class="section control">'
 echo '    <a class="item control" href="?action=edit_course&course='${id}'">'$(l10n edit)'</a>'
 echo '    <a class="item control" href="?export=ical&course='${id}'">'$(l10n ics_export)'</a>'
+echo '    <a class="item control" href="mailto:noone@vuesch.de?bcc='$coursemail'">'$(l10n course_mail)'</a>'
 echo '  </div>'
 echo '<input type="hidden" name="UID" value="'$values["UID"]'"/>'
 echo '</form>'