Sha256: 301a45403f1d5af7e51a30b68ce445e97a257f14581ec5e9728153c0dcda32e7

Contents?: true

Size: 798 Bytes

Versions: 15

Compression:

Stored size: 798 Bytes

Contents

class Admin::GroupController < AdminController

  before_filter { licensed("groups") }

  def index
    @group = Group.new
    @groups = Group.order(:name).sys(_sid).all
  end

  def create
    @group = Group.new(params[:group])
    @group.system_id = _sid 
    if @group.save
      flash[:notice] = "Group created"
      Activity.add(_sid, "Created group '#{@group.name}'", current_user.id, "Groups", '') 
      redirect_to "/admin/groups"
    else
      @groups = Group.sys(_sid).order(:name).all
      render "index"
    end
  end

  def destroy
    @group = Group.find_sys_id(_sid, params[:id])
    Group.destroy(params[:id])
    Activity.add(_sid, "Deleted group '#{@group.name}'", current_user.id, "Groups", '') 
    flash[:notice] = "Group deleted"
    redirect_to "/admin/groups"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/controllers/admin/group_controller.rb
kit_cms-2.3.20 app/controllers/admin/group_controller.rb
kit_cms-2.3.19 app/controllers/admin/group_controller.rb
kit_cms-2.3.18 app/controllers/admin/group_controller.rb
kit_cms-2.3.17 app/controllers/admin/group_controller.rb
kit_cms-2.3.16 app/controllers/admin/group_controller.rb
kit_cms-2.3.15 app/controllers/admin/group_controller.rb
kit_cms-2.3.14 app/controllers/admin/group_controller.rb
kit_cms-2.3.13 app/controllers/admin/group_controller.rb
kit_cms-2.3.11 app/controllers/admin/group_controller.rb
kit_cms-2.3.10 app/controllers/admin/group_controller.rb
kit_cms-2.3.9 app/controllers/admin/group_controller.rb
kit_cms-2.3.8 app/controllers/admin/group_controller.rb
kit_cms-2.3.7 app/controllers/admin/group_controller.rb
kit_cms-2.3.6 app/controllers/admin/group_controller.rb