annotate env/ui/delegation.lua @ 1815:6246f8249f9f
Actually handle the unique violation
 | author | 
 bsw | 
 | date | 
 Thu Dec 02 13:35:38 2021 +0100 (2021-12-02) | 
 | parents | 
 701a5cf6b067  | 
 | children | 
  | 
 
 | rev | 
   line source | 
| 
bsw@1045
 | 
     1 function ui.delegation(to_member_id, to_member_name)
 | 
| 
bsw@1045
 | 
     2   local text = _"delegates to"
 | 
| 
bsw@1045
 | 
     3   ui.image{
 | 
| 
bsw@1045
 | 
     4     attr = { class = "delegation_arrow", alt = text, title = text },
 | 
| 
bsw@1045
 | 
     5     static = "delegation_arrow_24_horizontal.png"
 | 
| 
bsw@1045
 | 
     6   }
 | 
| 
bsw@1045
 | 
     7 
 | 
| 
bsw@1045
 | 
     8   if to_member_id and to_member_name then
 | 
| 
bsw@1045
 | 
     9     execute.view{
 | 
| 
bsw@1045
 | 
    10       module = "member_image", view = "_show", params = {
 | 
| 
bsw@1045
 | 
    11         member_id = to_member_id, 
 | 
| 
bsw@1045
 | 
    12         class = "micro_avatar", 
 | 
| 
bsw@1045
 | 
    13         image_type = "avatar",
 | 
| 
bsw@1045
 | 
    14         popup_text = to_member_name,
 | 
| 
bsw@1045
 | 
    15         show_dummy = true
 | 
| 
bsw@1045
 | 
    16       }
 | 
| 
bsw@1045
 | 
    17     }
 | 
| 
bsw@1045
 | 
    18   end
 | 
| 
bsw@1045
 | 
    19 end |