2016-11-16 08:56:30 -05:00
|
|
|
- page_title 'Chat'
|
2016-11-13 14:35:47 -05:00
|
|
|
= render 'profiles/head'
|
|
|
|
|
|
|
|
.row.prepend-top-default
|
|
|
|
.col-lg-3.profile-settings-sidebar
|
|
|
|
%h4.prepend-top-0
|
|
|
|
= page_title
|
|
|
|
%p
|
2016-11-16 17:10:27 -05:00
|
|
|
You can see your Chat accounts.
|
2016-11-13 14:35:47 -05:00
|
|
|
|
|
|
|
.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
|
2016-11-16 08:56:30 -05:00
|
|
|
%th Last used
|
2016-11-13 14:35:47 -05:00
|
|
|
%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
|
2016-11-16 17:10:27 -05:00
|
|
|
%td
|
|
|
|
= chat_name.team_domain
|
|
|
|
%td
|
|
|
|
= chat_name.chat_name
|
|
|
|
%td
|
|
|
|
- if chat_name.last_used_at
|
|
|
|
time_ago_with_tooltip(chat_name.last_used_at)
|
2016-11-16 08:56:30 -05:00
|
|
|
- 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?' }
|
2016-11-13 14:35:47 -05:00
|
|
|
|
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
|
|
|
You don't have any active chat names.
|