calendar_activities.html.haml 1.41 KB
Newer Older
1
%h4.prepend-top-20
2
  = _("Contributions for <strong>%{calendar_date}</strong>").html_safe % { calendar_date: @calendar_date.to_s(:medium) }
3

4 5 6 7 8 9
- if @events.any?
  %ul.bordered-list
    - @events.sort_by(&:created_at).each do |event|
      %li
        %span.light
          %i.fa.fa-clock-o
10
          = event.created_at.to_time.in_time_zone.strftime('%-I:%M%P')
11
        - if event.visible_to_user?(current_user)
12
          - if event.push_action?
13 14 15 16 17 18 19 20 21 22 23 24 25
            #{event.action_name} #{event.ref_type}
            %strong
              - commits_path = project_commits_path(event.project, event.ref_name)
              = link_to_if event.project.repository.branch_exists?(event.ref_name), event.ref_name, commits_path
          - else
            = event_action_name(event)
            %strong
              - if event.note?
                = link_to event.note_target.to_reference, event_note_target_url(event), class: 'has-tooltip', title: event.target_title
              - elsif event.target
                = link_to event.target.to_reference, [event.project.namespace.becomes(Namespace), event.project, event.target], class: 'has-tooltip', title: event.target_title

          at
26
          %strong
27 28 29
            - if event.project
              = link_to_project(event.project)
            - else
Jan Provaznik's avatar
Jan Provaznik committed
30
              = event.resource_parent_name
31
        - else
32
          made a private contribution
33 34
- else
  %p
35
    = _('No contributions were found')