プロジェクト

全般

プロフィール

Vote #80560

完了

Add Check all / Uncheck all button to filters in permissions report

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Administration_8
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
8
version_id:
152
issue_org_id:
32672
author_id:
332
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

#32343 added a feature to filter roles in permissions report.

The feature is useful but it is tiresome to uncheck unnecessary roles if there are many roles. Adding Check all / Uncheck all button that we already have in other pages will help to resolve it.


journals

The Check all / Uncheck all button is added by making the changes below.
<pre><code class="diff">
diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb
index 0d57d6e38..9cd71b499 100644
--- a/app/views/roles/permissions.html.erb
+++ b/app/views/roles/permissions.html.erb
@@ -5,12 +5,15 @@
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_filter_plural) %></legend>
<div style="display: none;">
<%= form_tag({}, :method => :get) do %>
- <% Role.sorted.to_a.each do |role| %>
- <label>
- <%= check_box_tag "ids[]", role.id, @roles.include?(role) %>
- <%= role.name %>
- </label>
- <% end %>
+ <fieldset>
+ <legend><%= toggle_checkboxes_link('#filters input[type=checkbox]:enabled') %></legend>
+ <% Role.sorted.to_a.each do |role| %>
+ <label>
+ <%= check_box_tag "ids[]", role.id, @roles.include?(role) %>
+ <%= role.name %>
+ </label>
+ <% end %>
+ </fieldset>
<p>
<%= submit_tag l(:button_apply), :name => nil %>
<%= link_to l(:button_clear), permissions_roles_path, :class => 'icon icon-reload' %>
</code></pre>
--------------------------------------------------------------------------------
LGTM. Setting the target version to 4.2.0.

!{width: 504px; border: 1px solid #ccc;}.32672@2x.png!
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリAdministration_8 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0