summaryrefslogtreecommitdiff
path: root/app/views/projects/issues/import_csv/_button.html.haml
blob: 7119b22daef2d44de3973aee435624ac564aa9a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- type = local_assigns.fetch(:type, :icon)
- can_edit = can?(current_user, :admin_project, @project)

.dropdown.btn-group
  %button.btn.rounded-right.text-center{ class: ('has-tooltip' if type == :icon), title: (_('Import issues') if type == :icon),
    data: { toggle: 'dropdown' }, 'aria-label' => _('Import issues'), 'aria-haspopup' => 'true', 'aria-expanded' => 'false' }
    - if type == :icon
      = sprite_icon('import')
    - else
      = _('Import issues')
  %ul.dropdown-menu
    %li
      %button{ data: { toggle: 'modal', target: '.issues-import-modal' } }
        = _('Import CSV')
    - if can_edit
      %li= link_to _('Import from Jira'), project_import_jira_path(@project)