1 class LicensesController < ApplicationController
2 before_filter :authenticate_resource_reader, :only => [
3 :by_license_group, :by_system_picture
5 before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
19 def show_html_format format
27 respond_to do |format|
28 show_html_format format
29 show_prof_format format
30 show_json_format format
35 @licenses = License.list_by_name(params[:name])
37 respond_to do |format|
39 format.json { render json: @licenses.to_json }
53 @item = @my_model_class.new
55 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
56 @item.attributes = params[@my_model_class.item_name]
63 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
64 @item.attributes = params[@my_model_class.item_name]
70 @item = self.class.model.edit(params[:id], @operators)
71 respond_to do |format|
72 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => self.class.model.model_name.human)
73 format.html { redirect_to @item }
74 format.json { render json: @item.errors, status: :unprocessable_entity }