Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

erblint + use label_tag helper

Ivan Kuchin1f89ab90da88
diff --git a/app/views/activities/menu.html.erb b/app/views/activities/menu.html.erb
index 3ab985cd4a5..67d15563844 100644
--- a/app/views/activities/menu.html.erb
+++ b/app/views/activities/menu.html.erb
@@ -7,27 +7,27 @@
<% @activity.event_types.sort_by { |type| t("activity.filter.#{type.singularize}") }.each do |t| %>
<% unless t == "project_attributes" %>
<%= check_box_tag "event_types[]", t, @activity.scope.include?(t), id: "event_types_#{t}" %>
- <label for="event_types_<%=t%>"><%=t("activity.filter.#{t.singularize}")%></label>
- <br />
+ <%= label_tag "event_types_#{t}", t("activity.filter.#{t.singularize}") %>
+ <br>
<% end -%>
<% end %>
</p>
<p>
<% if @activity.event_types.include?("project_attributes") %>
<%= check_box_tag "event_types[]", "project_attributes", @activity.scope.include?("project_attributes"), id: "event_types_project_attributes" %>
- <label for="event_types_project_attributes"><%= t("activity.filter.project_details") %></label>
- <br />
+ <%= label_tag "event_types_project_attributes", t("activity.filter.project_details") %>
+ <br>
<% end -%>
<% if @project && @project.descendants.active.any? %>
- <%= hidden_field_tag 'with_subprojects', 0, id: nil %>
- <%= check_box_tag 'with_subprojects', 1, @with_subprojects, id: "with_subprojects" %>
- <label for="with_subprojects"><%=t("activity.filter.subproject")%></label>
+ <%= hidden_field_tag "with_subprojects", 0, id: nil %>
+ <%= check_box_tag "with_subprojects", 1, @with_subprojects, id: "with_subprojects" %>
+ <%= label_tag "with_subprojects", t("activity.filter.subproject") %>
<% end %>
</p>
- <%= hidden_field_tag('user_id', params[:user_id]) if params[:user_id].present? %>
- <%= hidden_field_tag('from', params[:from]) if params[:from].present? %>
+ <%= hidden_field_tag("user_id", params[:user_id]) if params[:user_id].present? %>
+ <%= hidden_field_tag("from", params[:from]) if params[:from].present? %>
<p><%= submit_tag t(:button_apply),
- class: 'button -small -primary',
+ class: "button -small -primary",
name: nil %></p>
</fieldset>
<% end %>