File: _last_push.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (20 lines) | stat: -rw-r--r-- 987 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- event = last_push_event
- if event && show_last_push_widget?(event)
  = render Pajamas::AlertComponent.new(variant: :success,
    alert_options: { class: 'gl-mt-3' },
    close_button_options: { class: 'js-close-banner' }) do |c|
    - c.with_body do
      %span= s_("LastPushEvent|You pushed to")
      %strong.gl-inline-flex{ class: 'gl-max-w-1/2', data: { toggle: 'tooltip' }, title: event.ref_name }
        = link_to event.ref_name, project_commits_path(event.project, event.ref_name), class: 'ref-name gl-truncate'

      - if event.project != @project
        %span= s_("LastPushEvent|at")
        %strong= link_to_project event.project

      #{time_ago_with_tooltip(event.created_at)}

    - if create_mr_button_from_event?(event)
      - c.with_actions do
        = render Pajamas::ButtonComponent.new(variant: :confirm, href: create_mr_path_from_push_event(event), button_options: { data: { testid: 'create-merge-request-button' }}) do
          = _('Create merge request')