OSDN Git Service

fix filer
authoryasushiito <yas@pen-chan.jp>
Mon, 10 Feb 2014 05:04:03 +0000 (14:04 +0900)
committeryasushiito <yas@pen-chan.jp>
Mon, 10 Feb 2014 05:04:03 +0000 (14:04 +0900)
lib/manifest/controller/action/count.rb [new file with mode: 0644]
lib/manifest/local/view/filer/body/file_header/base.rb [new file with mode: 0644]
public/images/error.png [new file with mode: 0644]

diff --git a/lib/manifest/controller/action/count.rb b/lib/manifest/controller/action/count.rb
new file mode 100644 (file)
index 0000000..6ce38c7
--- /dev/null
@@ -0,0 +1,21 @@
+module Manifest
+  module ControllerModule
+    module ActionModule
+      class ActionCount < Base
+        attr :list_name
+        
+        def set_default
+          super
+          @action_manifest['args']['list_name'] ||= @action_name.gsub(/^count_/, '')
+        end
+        
+        def init
+          super
+          @list_name = @args['list_name']
+        end
+        
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/local/view/filer/body/file_header/base.rb b/lib/manifest/local/view/filer/body/file_header/base.rb
new file mode 100644 (file)
index 0000000..cfe363e
--- /dev/null
@@ -0,0 +1,50 @@
+module Manifest
+  module View
+    module FilerModule
+      module BodyModule
+        module FileHeaderModule
+          class Base
+            attr :file_header, :column_name
+            def initialize file_header, column_name
+              @file_header = file_header
+              @column_name = column_name
+            end
+            
+            def filer
+              @file_header.filer
+            end
+            
+            def manifest
+              self.filer.manifest
+            end
+            
+            def item_name
+              self.filer.item_name
+            end
+            
+            def model
+              self.filer.model
+            end
+            
+            def items
+              self.filer.items
+            end
+            
+            def template_dir
+              self.filer.template_dir + 'header_column/'
+            end
+            
+            def template_file_name
+              "show"
+            end
+            
+            def template_name
+              self.template_dir + self.template_file_name
+            end
+            
+          end
+        end
+      end
+    end
+  end
+end
diff --git a/public/images/error.png b/public/images/error.png
new file mode 100644 (file)
index 0000000..10c0345
Binary files /dev/null and b/public/images/error.png differ