OSDN Git Service

t#31018:add search om license
[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   # GET /license_groups
6   # GET /license_groups.json
7   def index
8     @license_groups = LicenseGroup.list()
9
10     respond_to do |format|
11       format.html # index.html.erb
12       format.json { render json: @license_groups.to_json(LicenseGroup.list_json_opt) }
13     end
14   end
15
16   # GET /license_groups/1
17   # GET /license_groups/1.json
18   def show
19     @license_group = LicenseGroup.show(params[:id])
20     respond_to do |format|
21       format.html # show.html.erb
22       format.json { render json: @license_group.to_json(LicenseGroup.show_json_opt) }
23     end
24   end
25
26   def list
27     @license_groups = LicenseGroup.all
28
29     respond_to do |format|
30       format.html { render layout: 'system' }
31     end
32   end
33
34   def browse
35     @license_group = LicenseGroup.find(params[:id])
36
37     respond_to do |format|
38       format.html { render layout: 'system' }
39     end
40   end
41 end