1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-26 18:31:14 +00:00
redmine/app/views/context_menus/users.html.erb
Marius Balteanu ffce07e785 Start working on replacing old icons with SVG icons (#23980):
* Introduces IconsHelper with methods to render SVG icon from a sprite file.
* Adds SVG sprite file with icons mainly from Font Awesome, but also from Material Design Icons and Fluent UI System Icons (based on the work made by Takashi Kato (@tohosaku)).
* Replaces specific icons with new SVG icons.
* Temporarily keep all old CSS icon definitions for backard compatibility.



git-svn-id: https://svn.redmine.org/redmine/trunk@22988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-29 21:46:40 +00:00

40 lines
1.4 KiB
Plaintext

<ul>
<% if @user %>
<% if @user.locked? %>
<li>
<%= context_menu_link l(:button_unlock), user_path(@user, user: { status: User::STATUS_ACTIVE }, back_url: @back), method: :put, class: 'icon icon-unlock' %>
</li>
<% elsif User.current != @user %>
<li>
<%= context_menu_link l(:button_lock), user_path(@user, user: { status: User::STATUS_LOCKED }, back_url: @back), method: :put, class: 'icon icon-lock' %>
</li>
<% end %>
<li>
<%= context_menu_link icon_with_label('edit', l(:button_edit)), edit_user_path(@user, back_url: @back), class: 'icon icon-edit' %>
</li>
<% unless User.current == @user %>
<li>
<%= context_menu_link l(:button_delete), user_path(@user, back_url: @back),
method: :delete, class: 'icon icon-del' %>
</li>
<% end %>
<% else %>
<% unless @users.all?(&:locked?) %>
<li>
<%= context_menu_link l(:button_lock), bulk_lock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-lock' %>
</li>
<% else %>
<li>
<%= context_menu_link l(:button_unlock), bulk_unlock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-unlock' %>
</li>
<% end %>
<li>
<%= context_menu_link l(:button_delete),
{controller: 'users', action: 'bulk_destroy', ids: @users.map(&:id)},
method: :delete, class: 'icon icon-del' %>
</li>
<% end %>
</ul>