- te = timeline_event
- if te and te.subject
  - if @node
    - is_current = te.subject == @node
    - subject_name = te.subject_name
    - subject = is_current ? "This node" : subject_name

    - is_secondary = te.secondary_subject == @node
    - secondary_name = te.secondary_subject && te.secondary_name
    - secondary = is_secondary ? "this node" : secondary_name

    %li{:class => te.object_type}
      %span.date
        = te.created_at
        &rarr;
      -# Not all subjects can be linked, e.g. you can't link to a Parameter
      - if not is_current and link = link_to(subject, te.subject) rescue nil
        = te.subject_type
        = link
      - else
        = subject
      = te.action
      = link_to_unless is_secondary, secondary, te.secondary_subject if te.secondary_subject_type
