summaryrefslogtreecommitdiff
path: root/app/views/users/calendar_activities.html.haml
blob: 3571031fbfa5189ee639cb48e6093fc6595876b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%h4.prepend-top-20
  = html_escape(_("Contributions for %{calendar_date}")) % { calendar_date: tag.strong(@calendar_date.to_s(:medium)) }

- if @events.any?
  %ul.bordered-list
    - @events.sort_by(&:created_at).each do |event|
      %li
        %span.light.js-localtime{ :data => { :datetime => event.created_at.utc.strftime('%Y-%m-%dT%H:%M:%SZ'), :toggle => 'tooltip', :placement => 'top' } }
          = sprite_icon('clock', css_class: 'gl-vertical-align-text-bottom')
          = event.created_at.to_time.in_time_zone(local_timezone_instance(@user.timezone)).strftime('%-I:%M%P')
        - if event.visible_to_user?(current_user)
          - if event.push_action?
            #{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, Gitlab::UrlBuilder.build(event.target, only_path: true), class: 'has-tooltip', title: event.target_title

          = s_('UserProfile|at')
          %strong
            - if event.project
              = link_to_project(event.project)
            - else
              = event.resource_parent_name
        - else
          = s_('UserProfile|made a private contribution')
- else
  %p
    = _('No contributions were found')