mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 13:45:25 +08:00
25 lines
678 B
Text
25 lines
678 B
Text
<% if @editing %>
|
|
<div>
|
|
<%= label_tag "#{@name}[]", @label %>
|
|
<ul>
|
|
<% @items.each do |key, value| %>
|
|
<li>
|
|
<div class="sci-checkbox-container">
|
|
<%= check_box_tag "#{@name}[]", key, (@value && @value[key.to_s]), class: 'sci-checkbox', data: { type: 'MultiCheckboxInputComponent' } %>
|
|
<span class="sci-checkbox-label"></span>
|
|
</div>
|
|
<%= value %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% else %>
|
|
<ul>
|
|
<% @items.each do |key, value| %>
|
|
<li>
|
|
<div class="template-checkbox <%= 'selected' if @value && @value[key.to_s] %>"></div>
|
|
<%= value %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|