【发布时间】:2018-05-04 12:08:16
【问题描述】:
我有一个表格,该表格将根据用户填写的表格填充用户信息。我想做的一件事是让管理员在处理完该用户后能够“归档”表格行。
我认为我可以做到这一点的两种方法是,当单击该行上的存档按钮时将特定表行变灰,或者将该行向下移动到另一个表,一个专门用于存档用户的表。
我不想删除用户的信息,只是存档以防管理员再次需要它
这里最大的事情主要是保存它。
这是我的 index.html.erb 文件中的当前表格:
<table id="table-current" width="100%" data-toggle="table" class="table">
<h3>Current Submissions</h3>
<thead>
<tr>
<th data-sortable="true">Name</th>
<th data-sortable="true">Email</th>
<th data-sortable="true">Phone Number</th>
<th data-sortable="true">Pick Up Address</th>
<th data-sortable="true">City</th>
<th data-sortable="true">Pick Up Date</th>
<th data-sortable="true">Pick Up Time</th>
<th data-sortable="true">Instructions</th>
<th data-sortable="false">Options</th>
</tr>
</thead>
<% @clients.each do |client| %>
<tr class="table-row">
<td><%= client.first_name %> <%= client.last_name %></td>
<td><a href="mailto:<%= client.email %>"><%= client.email %></a></td>
<td><a href="tel:<%= client.phone_number %>"><%= number_to_phone(client.phone_number) %></a></td>
<td><a href="https://maps.google.com/?q=<%= client.pick_up_location %>&t=m" target="_blank"><%= client.pick_up_location %></a></td>
<td><%= client.city %></td>
<td><%= client.pick_up_date %></td>
<td><%= client.pick_up_time.strftime("%l:%M %p") %></td>
<td><%= client.instructions %></td>
<td class="table-options">
<%= link_to edit_client_path(client) do %>
<i class="ion-edit"></i>
<% end %>
<button class="archive">
<i class="ion-ios-box"></i>
</button>
</td>
</tr>
<% end %>
</table>
感谢任何帮助!谢谢!
【问题讨论】:
标签: jquery html ruby-on-rails ruby twitter-bootstrap