OSDN Git Service

merge
[pettanr/pettanr.git] / lib / manifest / local / view / filer / body / file_body / file_item / caption / default / face / face.rb
index 662160e..e2bf7e9 100644 (file)
@@ -43,10 +43,14 @@ module Manifest
                   
                   class ColumnFace < BaseFace
                     def template_file_name
-                      'image'
+                      if face.blank?
+                        'empty'
+                      else
+                        'column'
+                      end
                     end
                     
-                    def url
+                    def face
                       @item.attributes[@face_manifest.column_name]
                     end
                     
@@ -54,26 +58,22 @@ module Manifest
                   
                   class MethodFace < BaseFace
                     def template_file_name
-                      'image'
+                      if face.blank?
+                        'empty'
+                      else
+                        'column'
+                      end
                     end
                     
-                    def url
-                      @face_manifest.url
+                    def face
+                      @item.__send__ @face_manifest.method_name
                     end
                     
                   end
                   
                   class NoneFace < BaseFace
                     def template_file_name
-                      'image'
-                    end
-                    
-                    def url
-                      @face_manifest.url
-                    end
-                    
-                    def tag_opt
-                      {:src => self.url, :width => Manifest.manifest.magic_numbers['thumbnail_width'], :height => Manifest.manifest.magic_numbers['thumbnail_height']}
+                      'none'
                     end
                     
                   end