OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / sheet_panels / _append_sheet.html.erb
1 <tr>
2   <td>
3     <%= link_to sheet_icon(:object => sheet, :size => 25), sheet_path(sheet) %>
4     <%= link_to h(truncate(sheet.caption, :length => 40)), play_sheet_path(sheet) %>
5     (<%= sheet.sheet_panels.size -%>)
6   </td>
7   <td>
8     <%= distance_of_time_in_words_to_now sheet.updated_at %>
9   </td>
10   <td>
11     <%= link_to author_icon(:object => sheet.author, :size => 25), sheet_path(sheet.author) %>
12     <%= link_to h(truncate(sheet.author.name, :length => 12)), author_path(sheet.author) %>
13   </td>
14   <td>
15     <% if sheet.own? author %>
16       <% @sheet_panel = SheetPanel.new %>
17       <% @sheet_panel.supply_default -%>
18       <% @sheet_panel.attributes = {:sheet_id => sheet.id, :panel_id => panel.id} -%>
19       <%= form_for(@sheet_panel) do |f| %>
20         <%= f.hidden_field :sheet_id %>
21         <%= f.hidden_field :t %>
22         <%= f.hidden_field :panel_id %>
23         <div class="actions">
24           <%= f.submit t('sheet_panels.append.sheet') %>
25         </div>
26       <% end %>
27     <% end %>
28   </td>
29 </tr>