1 class LicensesController < ApplicationController
2 before_filter :authenticate_resource_reader, :only => [
3 :by_license_group, :by_system_picture, :count_by_license_group, :count_by_system_picture
5 before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
23 def show_html_format format
31 respond_to do |format|
32 show_html_format format
33 show_prof_format format
34 show_json_format format
39 @licenses = License.list_by_name(params[:name])
41 respond_to do |format|
43 format.json { render json: @licenses.to_json }
51 def count_by_license_group
55 def count_by_system_picture
69 @item = @my_model_class.new
71 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
72 @item.attributes = params[@my_model_class.item_name]
79 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
80 @item.attributes = params[@my_model_class.item_name]
86 @item = self.class.model.edit(params[:id], @operators)
87 respond_to do |format|
88 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => self.class.model.model_name.human)
89 format.html { redirect_to @item }
90 format.json { render json: @item.errors, status: :unprocessable_entity }