- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::author
::xowiki::formfield::author create ... \
[ -label (default "#xowiki.formfield-author#") ] \
[ -photo_size (default "54") ] \
[ -with_gravatar (default "true") ] \
[ -with_photo (default "true") ] \
[ -with_user_link (default "false") ]
Class Relations
::xotcl::Class create ::xowiki::formfield::author \ -superclass ::xowiki::formfield::user_idMethods (to be applied on instances)
label (setter)
photo_size (setter)
pretty_value (scripted)
if {$v ne ""} { acs_user::get -user_id $v -array user if {${:with_photo}} { set portrait_id [acs_user::get_portrait_id -user_id $v] if {$portrait_id == 0 && ${:with_gravatar}} { set src [::xowiki::includelet::gravatar url -email $user(email) -size ${:photo_size}] } else { set src "/shared/portrait-bits.tcl?user_id=$v" } set photo "<img width='[:photo_size]' class='photo' src='[ns_quotehtml $src]'>" set photo_class "photo" } else { set photo "" set photo_class "" } set date_field [::xowiki::FormPage get_table_form_fields -base_item ${:object} -field_names _last_modified -form_constraints ""] set date [$date_field pretty_value [${:object} property _last_modified]] if {[:with_user_link]} { set user_link_begin "<a href='[ns_quotehtml /shared/community-member?user_id=$v]'>" set user_link_end "</a>" } else { set user_link_begin "" set user_link_end "" } return [subst { <div class="cite $photo_class">$photo <p class="author">$user_link_begin$user(first_names) $user(last_name)$user_link_end</p> <p class="date">$date</p> </div> }] } return ""with_gravatar (setter)
with_photo (setter)
with_user_link (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables