• David Pursehouse's avatar
    Improve status message on merge request page · dfb8d2b7
    David Pursehouse authored
    The status message currently looks like:
    
      Created on Oct 24, 2013 by John , currently assigned to Bob
    
    There is a space between the author name and the comma, which is
    incorrect.  Also, there is no period at the end of the sentence,
    which makes it inconsistent with the following line:
    
      Merged by Bob 5 minutes ago.
    
    Change it to:
    
      Created on Oct 24, 2013 by John.  Currently assigned to Bob.
    
    Also change the milestone information from:
    
      and attached to milestone XYZ
    
    to:
    
      Attached to milestone XYZ.
    dfb8d2b7
_mr_box.html.haml 1.77 KB
.ui-box.ui-box-show
  .ui-box-head
    %h4.box-title
      = gfm escape_once(@merge_request.title)
      - if @merge_request.merged?
        .state-label.state-label-green
          %i.icon-ok
          Merged
      - elsif @merge_request.closed?
        .state-label.state-label-red
          Closed

  .ui-box-body
    %div
      %cite.cgray
        Created on #{@merge_request.created_at.stamp("Aug 21, 2011")} by #{link_to_member(@project, @merge_request.author)}.
        - if @merge_request.assignee
          Currently assigned to #{link_to_member(@project, @merge_request.assignee)}.
      - if @merge_request.milestone
        - milestone = @merge_request.milestone
        %cite.cgray Attached to milestone
        %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
        \.


  - if @merge_request.description.present?
    .ui-box-bottom
      .wiki
        = preserve do
          = markdown @merge_request.description

  - if @merge_request.closed?
    .ui-box-bottom.alert-error
      %span
        %i.icon-remove
        Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
        %span #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
  - if @merge_request.merged?
    .ui-box-bottom.alert-success
      %span
        %i.icon-ok
        Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
        #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
  - if !@closes_issues.empty? && @merge_request.opened?
    .ui-box-bottom.alert-info
      %span
        %i.icon-ok
        Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
        = succeed '.' do
          != gfm(@closes_issues.map { |i| "##{i.iid}" }.to_sentence)