OSDN Git Service

add new function 'ServiceCooperation' for elecoma
[elecoma/elecoma.git] / app / views / admin / service_cooperations / index.html.erb
diff --git a/app/views/admin/service_cooperations/index.html.erb b/app/views/admin/service_cooperations/index.html.erb
new file mode 100644 (file)
index 0000000..34a70c2
--- /dev/null
@@ -0,0 +1,50 @@
+<%= render :partial => "submenu" %>
+
+<div id="main"><!-- メイン -->
+  
+  <h2>アイテムマスタ出力設定</h2>
+  
+  <h3>サービス一覧</h3>
+
+  <%=h flash[:notice] %>
+  <%=h flash[:errors] %>
+
+  <br />
+  <div class="btn_t">
+    <%= button_to 'サービス追加',:action => "new" %>
+  </div>
+  <br />
+  <table class="data2">
+    <tr>
+      <th>id</th>
+      <th>サービス名</th>
+      <th>アイテムマスタ取得URL</th>
+      <th>有効/無効</th>
+      <th>編集</th>
+      <th>削除</th>
+    </tr>
+    <% unless @services.empty? -%>
+      <% @services.each do |record| -%>
+        <tr>
+          <td class="t_center"><%=h record.id %></td>
+          <td><%=h record.name %></td>
+          <td><%=h url_for :controller => '/service_cooperations', :action => 'export',:id => record.url_file_name , :only_path => false  %></td>
+               <td>
+            <% if record.enable -%>
+              有効
+            <% else -%>
+              無効
+            <% end -%>
+               </td>
+               <td class="t_center">
+                 <%= link_to "編集", {:action => "edit", :id => record.id } %>
+               </td>
+               <td class="t_center">
+                 <%= link_to "削除", {:action => "destroy", :id => record.id } %>
+               </td>
+             </tr>
+      <% end -%>
+    <% end -%>
+  </table>
+  
+</div><!-- メイン -->