OSDN Git Service

w
[pettanr/pettanr.git] / app / views / speech_balloon_templates / index.html.erb
index 148dee0..48afbe6 100644 (file)
@@ -1,12 +1,21 @@
-<h1>Listing speach balloon template</h1>
-<table>
-  <tr>
-    <th>Name</th>
-  </tr>
+<h1><%= t '.title' -%></h1>
 
-<% @speech_balloon_templates.each do |st| %>
-  <tr>
-    <td><%= h st.caption %></td>
-  </tr>
-<% end %>
-</table>
+<ul>
+  <% @speech_balloon_templates.each do |st| %>
+    <li>
+      <div class="speech_balloon_template_item">
+        <%= link_to tag(:img, st.system_picture.tmb_opt_img_tag), speech_balloon_template_path(st) %>
+        <div>
+          <%= link_to h(st.caption), speech_balloon_template_path(st) %>
+        </div>
+      </div>
+      <div class="speech_balloon_template_item">
+        <% if @operators.author and @operators.author.working? -%>
+          <%= link_to t('speech_balloon_templates.add_to_panel'), main_app.new_speech_balloon_path(:speech_balloon_template_id => st.id) %>
+        <% end -%>
+      </div>
+      <div class="speech_balloon_template_item-row-break">
+      </div>
+    </li>
+  <% end %>
+</ul>