OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/elecoma/elecoma
[elecoma/elecoma.git] / app / helpers / base_helper.rb
index 02f99b0..c3a49b8 100644 (file)
@@ -284,9 +284,10 @@ EJS
     options = ({
       :alt => payment.name
     }).merge(options)
-    id = payment.resource_id
-    if id
-      view_resource_id(id, options)
+    if payment.use_remote_resource
+      image_tag(payment.resource_url, options) unless payment.resource_url.blank?
+    elsif payment.resource_id
+      view_resource_id(payment.resource_id, options)
     else
       ''
     end
@@ -321,6 +322,20 @@ EJS
     end
   end
 
+  def logo_without_text(payment)
+    if payment.use_remote_resource
+      if !payment.resource_url.blank? && payment.without_text
+        true
+      else
+        false
+      end
+    elsif payment.resource_id && payment.without_text
+      true
+    else
+      false
+    end 
+  end
+
 =begin rdoc
   <select>
    <option value="x">食料</option>