Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.239.2.22 -r1.239.2.23 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Feb 2015 15:26:25 -0000 1.239.2.22 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Feb 2015 16:47:23 -0000 1.239.2.23 @@ -3556,6 +3556,11 @@ # # ::xowiki::formfield::event # + # This formfield is rendered following the conventions of the + # h-event of microformats2. + # + # See: http://microformats.org/wiki/h-event + # ########################################################### Class create event -superclass CompoundField -parameter { @@ -3574,7 +3579,8 @@ set dtend_display_format %X } my create_components [subst { - {summary {richtext,required,editor=wym,height=150px,label=#xowiki.event-title_of_event#}} + {title {text,label=#xowiki.event-title_of_event#}} + {summary {richtext,required,height=150px,label=#xowiki.event-summary_of_event#}} {dtstart {date,required,format=DD_MONTH_YYYY_#xowiki.event-hourprefix#_HH24_MI, default=now,label=#xowiki.event-start_of_event#,display_format=%Q_%X}} {dtend date,format=$dtend_format,default=now,label=#xowiki.event-end_of_event#,display_format=$dtend_display_format} @@ -3605,16 +3611,22 @@ set dtstart [my get_component dtstart] set dtstart_val [$dtstart value] set dtstart_iso [::xo::ical clock_to_iso [clock scan $dtstart_val]] + set dtstart_pretty [$dtstart pretty_value $dtstart_val] set dtend [my get_component dtend] set dtend_val [$dtend value] set dtend_txt "" if {$dtend_val ne ""} { set dtend_iso [::xo::ical clock_to_iso [clock scan $dtend_val]] - set dtend_txt " - [$dtend pretty_value $dtend_val]" + set dtend_txt " - " } - set summary_txt "[[my get_component summary] value]" + set title_val [[my get_component title] value] + if {$title_val eq ""} { + set title_val [[my object] property _title] + } + set summary_val [[my get_component summary] value] + set location [my get_component location] set location_val [$location value] set location_txt "" @@ -3623,16 +3635,18 @@ if {[regexp {^#(.+)#$} $location_label _ msg_key]} { set location_label [lang::message::lookup [my locale] $msg_key] } - set location_txt "$location_label: $location_val" + set location_txt "
$summary_val
" "Time: | $dtend_txt |