OSDN Git Service

work
[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 show
14     @item = LicenseGroup.show(params[:id], @operators)
15     respond_to do |format|
16       format.html {
17         @license_group = @item
18       }
19       format_prof format
20       format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
21     end
22   end
23
24   def list
25     @license_groups = LicenseGroup.all
26
27     respond_to do |format|
28       format.html { render layout: 'system' }
29     end
30   end
31
32   def browse
33     @license_group = LicenseGroup.find(params[:id])
34
35     respond_to do |format|
36       format.html { render layout: 'system' }
37     end
38   end
39 end