summaryrefslogtreecommitdiffstats
path: root/app/views/context_menus/projects.html.erb
blob: c200311f27ff2b6a6ab7486cc128cf7c1a267195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<ul>
  <% if @project && !@project.scheduled_for_deletion? %>
    <% if @project.archived? %>
      <li><%= context_menu_link l(:button_unarchive), unarchive_project_path(@project), method: :post, class: 'icon icon-unlock' %></li>
    <% else %>
      <li><%= context_menu_link l(:button_archive), archive_project_path(@project), data: {confirm: l(:text_project_archive_confirmation, @project.to_s)}, method: :post, class: 'icon icon-lock' %></li>
    <% end %>
    <li>
      <%= context_menu_link l(:button_copy), copy_project_path(@projects), class: 'icon icon-copy' %>
    </li>
    <li>
      <%= context_menu_link l(:button_delete), project_path(@project, back_url: @back), method: :delete, class: 'icon icon-del' %>
    </li>
  <% else %>
    <li>
      <%= context_menu_link l(:button_delete),
        {controller: 'projects', action: 'bulk_destroy', ids: @projects.map(&:id), back_url: @back},
        method: :delete, data: {confirm: l(:text_projects_bulk_destroy_confirmation)}, class: 'icon icon-del' %>
    </li>
  <% end %>
</ul>