OSDN Git Service

list browser created
[pettanr/pettanr.git] / app / controllers / balloon_templates_controller.rb
index 22728ce..faa1ca0 100644 (file)
@@ -1,5 +1,6 @@
 class BalloonTemplatesController < ApplicationController
-  before_filter :authenticate_admin!, :except => [:index]
+  before_filter :authenticate_author!, :only => [:index, :show]
+  before_filter :authenticate_admin!, :only => [:list, :browse]
   
   # GET /balloon_templates
   # GET /balloon_templates.json
@@ -11,4 +12,13 @@ class BalloonTemplatesController < ApplicationController
       format.json { render json: @balloon_templates }
     end
   end
+
+  def list
+    @balloon_templates = BalloonTemplate.all
+
+    respond_to do |format|
+      format.html { render layout: 'system' }
+      format.json { render json: @balloon_templates }
+    end
+  end
 end