_feed.html.haml 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
- if update.kind_of?(Note)
  %a.project-update.titled{:href => dashboard_feed_path(project, update)}
    = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
    %span.update-title
      = dashboard_feed_title(update)
    %span.update-author
      %strong= update.author_name
      = time_ago_in_words(update.created_at)
      ago
    - noteable = update.target
    - if noteable.kind_of?(MergeRequest)
      .title-block
        %span.update-title
          %span.commit.tag
            Merge Request #
            = noteable.id
        %span.update-author
          %span= noteable.source_branch
          →
          %span= noteable.target_branch
D
Dmitriy Zaporozhets 已提交
21

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
    - elsif noteable.kind_of?(Issue)
      .title-block
        %span.update-title
          %span.commit.tag
            Issue #
            = noteable.id
        %span.update-author
          .left= truncate noteable.title

    - elsif noteable.kind_of?(Commit)
      .title-block
        %span.update-title
          %span.commit.tag
            commit
        %span.update-author
          .left= truncate noteable.id
    - else 
      .title-block
        %span.update-title
          %span.commit.tag
            Project Wall
        %span.update-author
          \...


- elsif update.kind_of?(MergeRequest)
  %a.project-update.titled{:href => project_merge_request_path(project, update)}
    = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
    %span.update-title
      Opened merge request
    %span.update-author
      %strong= update.author_name
      = time_ago_in_words(update.created_at)
      ago
    .title-block
      %span.update-title
        %span.commit.tag
          Merge Request #
          = update.id
      %span.update-author
        %span= update.source_branch
        →
        %span= update.target_branch
  
- elsif update.kind_of?(Issue)
  %a.project-update.titled{:href => dashboard_feed_path(project, update)}
    = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
    %span.update-title
      Created new Issue
    %span.update-author
      %strong= update.author_name
      = time_ago_in_words(update.created_at)
      ago
    .title-block
      %span.update-title
        %span.commit.tag
          Issue #
          = update.id
      %span.update-author
        .left= truncate update.title