diff options
| author | luu <luuduong@gmail.com> | 2014-12-13 16:41:51 +0000 |
|---|---|---|
| committer | luu <luuduong@gmail.com> | 2014-12-13 16:41:51 +0000 |
| commit | 50b94a4ff8a2f462ceb4e8a4f5286683b4ef0e8b (patch) | |
| tree | d87c96d5a1328812ead05464d26e64bbb842373a /app/views/admin | |
| parent | 0a61f5240d1fa127a9bb9bdd0a39ffd84dc8bfb9 (diff) | |
add tool only if it is not in the toolbox.
Diffstat (limited to 'app/views/admin')
| -rw-r--r-- | app/views/admin/products/show.html.erb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/views/admin/products/show.html.erb b/app/views/admin/products/show.html.erb index b596a3de..58852dab 100644 --- a/app/views/admin/products/show.html.erb +++ b/app/views/admin/products/show.html.erb @@ -22,10 +22,14 @@ Add to tools: </td> <td> - <%= form_tag admin_products_path do %> - <%= text_field_tag :name, @product.item_attributes['title'] %> - <%= hidden_field_tag "asin", @product.asin %> - <%= submit_tag "Add to tools" %> + <% if @tool.present? %> + In the toolbox as <%= @tool.name %> + <% else %> + <%= form_tag admin_products_path do %> + <%= text_field_tag :name, @product.item_attributes['title'] %> + <%= hidden_field_tag "asin", @product.asin %> + <%= submit_tag "Add to tools" %> + <% end %> <% end %> </td> </tr> |
