scinote-web/app/components/reports/project_members_input_component.html.erb
2021-04-28 14:37:16 +02:00

11 lines
474 B
Text

<% if @editing %>
<div class="sci-input-container">
<%= label_tag @name, @label %>
<%= select_tag @name, options_from_collection_for_select(@project_members, :id, :name), placeholder: @placeholder, class: 'sci-input-field report-template-value-dropdown', data: { type: 'ProjectMembersInputComponent' } %>
</div>
<% else %>
<% @project_members.where(id: @value).each do |member| %>
<%= member.public_send(@displayed_field) %>
<br>
<% end %>
<% end %>