OSDN Git Service

import all source code
[pettanr/pettanr.git] / app / views / lisences / index.html.erb
diff --git a/app/views/lisences/index.html.erb b/app/views/lisences/index.html.erb
new file mode 100644 (file)
index 0000000..d14ee88
--- /dev/null
@@ -0,0 +1,38 @@
+<h1>Listing lisences</h1>
+
+<table>
+  <tr>
+    <th>name</th>
+    <th>url</th>
+    <th>cc_by</th>
+    <th>cc_sa</th>
+    <th>cc_nd</th>
+    <th>cc_nc</th>
+    <th>no_resize</th>
+    <th>no_flip</th>
+    <th>keep_aspect_ratio</th>
+    <th></th>
+  </tr>
+
+<% @lisences.each do |lisence| %>
+  <tr>
+    <td><%= lisence.name %></td>
+    <td><%= lisence.url %></td>
+    <td><%= lisence.cc_by %></td>
+    <td><%= lisence.cc_sa %></td>
+    <td><%= lisence.cc_nd %></td>
+    <td><%= lisence.cc_nc %></td>
+    <td><%= lisence.no_resize %></td>
+    <td><%= lisence.no_flip %></td>
+    <td><%= lisence.keep_aspect_ratio %></td>
+    <td>
+      <% if lisence.common_lisence -%>
+        <%= link_to 'Show', lisence.common_lisence %>
+      <% else -%>
+        <%= link_to 'Show', lisence.original_lisence %>
+      <% end -%>
+    </td>
+  </tr>
+<% end -%>
+</table>
+<%= link_to 'new original lisence', new_original_lisence_path %>