forgeplus/app/views/action/node_inputs/index.html.erb

47 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<h1>action 节点参数配置<%= link_to '>>>Back action节点首页', action_nodes_path %>
<!-- <a href="/managements/competition/customize" style="font-size: 28px;">>>前往节点配置</a>-->
</h1>
<p>说明该界面适用于action 节点参数配置</p>
<table border="1">
<thead>
<tr>
<th>ID</th>
<th width="20%">参数名称</th>
<th width="25%">参数输入类型</th>
<th width="20%">参数描述</th>
<th>是否必填项</th>
<th>排序号</th>
<th>更新时间</th>
<th colspan="2">操作</th>
</tr>
</thead>
<!-- :id, :name, :input_type, :description, :sort_no,-->
<tbody>
<% @node_inputs.each do |info| %>
<tr>
<td><%= info.id %></td>
<td><%= info.name %></td>
<td><%= info.input_type %>
<% if info.input_type == "select" %>
<%= select_tag(:version, options_for_select(@node.action_node_selects.map(&:value)), class: 'form-control') %>
<%= link_to '修改选择项', edit_action_node_node_input_path(@node.id, info) %>
<% end %>
</td>
<td><%= info.description %></td>
<td><%= info.is_required %></td>
<td><%= info.sort_no %></td>
<td><%= info.updated_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td><%= link_to '编辑', edit_action_node_node_input_path(@node.id, info) %></td>
<td><%= link_to 'Destroy', action_node_node_input_path(@node, info), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to '新增', new_action_node_node_input_path(@node) %>