OSDN Git Service

fix
[pettanr/pettanr.git] / app / controllers / license_groups_controller.rb
1 class LicenseGroupsController < ApplicationController
2   layout 'test' if MagicNumber['test_layout']
3   before_filter :authenticate_admin!, :only => [:list, :browse]
4   
5   def self.model
6     LicenseGroup
7   end
8   
9   def index
10     public_list
11   end
12   
13   def licenses
14     has_many_list
15   end
16   
17   def show
18     @item = LicenseGroup.show(params[:id], @operators)
19     respond_to do |format|
20       format.html {
21         @license_group = @item
22       }
23       format_prof format
24       format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
25     end
26   end
27
28   def list
29     @license_groups = LicenseGroup.all
30
31     respond_to do |format|
32       format.html { render layout: 'system' }
33     end
34   end
35
36   def browse
37     @license_group = LicenseGroup.find(params[:id])
38
39     respond_to do |format|
40       format.html { render layout: 'system' }
41     end
42   end
43 end