OSDN Git Service

ok
[elecoma/elecoma.git] / app / views / products / show.html.erb
index bc87bfc..c028367 100644 (file)
@@ -9,7 +9,6 @@
   <%= javascript_include_tag js_url(:action => "thickbox") %>
   <%= javascript_include_tag "recommender_details" %>
   <%= javascript_include_tag js_url(:action => "application") %>
-  <%= javascript_include_tag "jquery.socialbutton" %>
 
   <% if @social.gree -%>
     <meta property="og:title" content="#{@shop.name} - #{@product.name}"/>
   <%= ("【入荷日】<br />" + h_br(@product.arrival_date) + "<br />" ) unless @product.arrival_date.blank? %>
   </p>
 
-  <div class="main_hr"><hr /></div>
+  <%= ("<div class=\"main_hr\"><hr /></div>") if @social_flag %>
  
+  <div class="social">
+  <%= ("<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\">{lang:'ja'}</script><g:plusone></g:plusone>") if @social.google %> 
+  
   <%= ("<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"harizon\" data-lang=\"ja\">ツイート</a><script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>") if @social.twitter %>
 
-  <%= ("<script type=\"text/javascript\" src=\"http://static.evernote.com/noteit.js\"></script><a href=\"#\" onclick=\"Evernote.doClip({contentId:'main',}); return false;\"><img src=\"http://static.evernote.com/article-clipper.png\" alt=\"Clip to Evernote\" /></a>") if @social.evernote %> 
-
-  <%= ("<iframe src=\"http://share.gree.jp/share?url=" + CGI.escape(request.url) +"&type=0&height=20\" scrolling=\"no\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" style=\"border:none; overflow:hidden; width:100px; height:20px;\" allowTransparency=\"true\"></iframe>") if @social.gree %>
+  <%=("<a href=\"http://b.hatena.ne.jp/entry/" + request.url + "\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"" + @shop.name + " - " + @product.name + "\"data-hatena-bookmark-layout=\"standard\" title=\"このエントリーをはてなブックマークに追加\"><img src=\"http://b.st-hatena.com/images/entry-button/button-only.gif\" alt=\"このエントリーをはてなブックマークに追加\" width=\"20\" height=\"20\" style=\"border: none;\" /></a><script type=\"text/javascript\" src=\"http://b.st-hatena.com/js/bookmark_button.js\" charset=\"utf-8\" async=\"async\"></script>") if @social.hatena %>
 
+  <%= ("<iframe src=\"http://share.gree.jp/share?url=" + CGI.escape(request.url) +"&type=0&height=20\" scrolling=\"no\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" style=\"border:none; overflow:hidden; width:70px; height:20px;\" allowTransparency=\"true\"></iframe>") if @social.gree %>
   
-  <%=("<a href=\"http://b.hatena.ne.jp/entry/" + request.url + "\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"" + @shop.name + " - " + @product.name + "\"data-hatena-bookmark-layout=\"standard\" title=\"このエントリーをはてなブックマークに追加\"><img src=\"http://b.st-hatena.com/images/entry-button/button-only.gif\" alt=\"このエントリーをはてなブックマークに追加\" width=\"20\" height=\"20\" style=\"border: none;\" /></a><script type=\"text/javascript\" src=\"http://b.st-hatena.com/js/bookmark_button.js\" charset=\"utf-8\" async=\"async\"></script>") if @social.hatena %>
 
-  <%= ("<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\">{lang:'ja'}</script><g:plusone></g:plusone>") if @social.google %> 
+  <%= ("<a href=\"http://mixi.jp/share.pl\" class=\"mixi-check-button\" data-key=\"" + @social.mixi_key + "\">mixiチェック</a><script type=\"text/javascript\" src=\"http://static.mixi.jp/js/share.js\"></script>") if @social.mixi_check %>
+  
 
-  <%= ("<div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/ja_JP/all.js#xfbml=1\"></script><fb:like href=\"" + request.url  + "\" send=\"true\" layout=\"button_count\" width=\"450\" show_faces=\"false\" action=\"like\" font=\"\"></fb:like>") if @social.facebook %>
+  <%= ("<script type=\"text/javascript\" src=\"http://static.evernote.com/noteit.js\"></script><a href=\"#\" onclick=\"Evernote.doClip({contentId:'main',}); return false;\"><img src=\"http://static.evernote.com/article-clipper.png\" alt=\"Clip to Evernote\" /></a>") if @social.evernote %> 
 
-  <%= ("<iframe src=\"http://plugins.mixi.jp/favorite.pl?href=" + CGI.escape(request.url) + "&service_key=" + @social.mixi_key + "\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:0; overflow:hidden; width:450px; height:80px;\"></iframe>") if @social.mixi_key %>
 
+  <%= ("<div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/ja_JP/all.js#xfbml=1\"></script><fb:like href=\"" + request.url  + "\" send=\"true\" layout=\"button_count\" width=\"130\" show_faces=\"false\" action=\"like\" font=\"\"></fb:like>") if @social.facebook %>
 
 
-  <%= ("<div id=\"twitter\"></div>") if @social.twitter %>
-  <%= ("<div id=\"facebook\"></div>") if @social.facebook %>
-  <%= ("<div id=\"gree\"></div>") if @social.gree %>
-  <%= ("<div id=\"evernote\"></div>") if @social.evernote %>
-  <%= ("<div id=\"hatena\"></div>") if @social.hatena %>
-  <%= ("<div id=\"mixi_check\"></div>") if @social.mixi_check %>
-  <%= ("<div id=\"mixi_like\"></div>") if @social.mixi_like %>
-  <%= ("<div id=\"google\"></div>") if @social.google %>
+  <%= ("<iframe src=\"http://plugins.mixi.jp/favorite.pl?href=" + CGI.escape(request.url) + "&service_key=" + @social.mixi_key + "\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:0; overflow:hidden; width:450px; height:80px;\"></iframe>") if @social.mixi_like %>
 
+  
+  </div>
 
   </div><!-- /item_box -->
   <div class="m_btm"><%= image_tag("common/box_bg_btm.gif", :width => "530", :height => "5", :alt => "") %></div>