done
sed -i -r '/^(.+)\t'$card'$/d' "$attfile"
for each in $attendance; do
- echo "$each\t$card" >>"$attfile"
+ echo "$each\t$card"
+ done >>"$attfile"
+ sed -rn 's:^(.+)'$card'$:\1:p' "$attfile" |while read course; do
+ touch "$_DATA/ical/$course"
done
echo "END:VCARD\r" >>"$tempfile"
background: #EEE;
}
+.courselist .course .attendance {
+ width:50ex;
+}
+.courselist .course .attendance a {
+ display: inline-block;
+ max-width: 13.75ex;
+ color: #008;
+ border-style: solid;
+ border-width: 1px;
+ margin: .25em .125ex .25em .125ex;
+ padding: .125em 1ex .125em 1ex;
+ background: #EFF;
+}
+
.courselist .course .dtstart {
width: 35ex;
}
item_name[edit]="Bearbeiten"
item_name[ics_export]="ICal exportieren"
+item_name[course_attendance]="Teilnehmende"
+
item_name[sort_order]="Sortierung"
item_name[order_DOW]="Wochentag"
item_name[order_TOD]="Uhrzeit"
done
echo ' </div>'
+echo ' <div class="section attendance">'
+echo ' <span class="sectitle">'$(l10n course_attendance)'</span>'
+sed -rn 's:'$id'\t(.+)$:\1:p' "$_DATA/mappings/attendance" |while read each; do
+ n_last="$( sed -rn 's:^N(;.+)*\:([^;]*;){0} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")"
+ n_first="$( sed -rn 's:^N(;.+)*\:([^;]*;){1} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")"
+ n_middle="$(sed -rn 's:^N(;.+)*\:([^;]*;){2} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")"
+ n_pre="$( sed -rn 's:^N(;.+)*\:([^;]*;){3} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")"
+ 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>'
+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>'