OSDN Git Service

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