summaryrefslogtreecommitdiff
path: root/app/views/profiles/chat_names/index.html.haml
blob: ae0b6336944f7cfd1713ebbfa76c13998ff33987 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- page_title 'Chat'
= render 'profiles/head'

.row.prepend-top-default
  .col-lg-3.profile-settings-sidebar
    %h4.prepend-top-0
      = page_title
    %p
      You can see your Chat integrations.

  .col-lg-9
    %h5 Active chat names (#{@chat_names.length})

    - if @chat_names.present?
      .table-responsive
        %table.table.chat-names
          %thead
            %tr
              %th Project
              %th Service
              %th Team domain
              %th Nickname
              %th Last used
              %th
          %tbody
            - @chat_names.each do |chat_name|
              - service = chat_name.service
              - project = service.project
              %tr
                %td
                  %strong
                    - if can?(current_user, :read_project, project)
                      = link_to project.name_with_namespace, project_path(project)
                    - else
                      .light N/A
                %td
                  %strong
                    - if can?(current_user, :admin_project, project)
                      = link_to service.title, edit_namespace_project_service_path(project.namespace, project, service)
                    - else
                      = chat_name.service.title
                %td= chat_name.team_domain
                %td= chat_name.chat_name
                %td=
                  - if chat_name.used_at
                    time_ago_with_tooltip(chat_name.used_at)
                  - else
                    Never

                %td
                  = link_to 'Remove', profile_chat_name_path(chat_name), method: :delete, class: 'btn btn-danger pull-right', data: { confirm: 'Are you sure you want to revoke this nickname?' }

    - else
      .settings-message.text-center
        You don't have any active chat names.