Skip to content

Commit

Permalink
Merge pull request #725 from fatfreecrm/fix-687-0.16.2
Browse files Browse the repository at this point in the history
Adust admin controllers (for 0.16.2)
  • Loading branch information
CloCkWeRX committed Jan 22, 2018
2 parents 4f418cb + eb81d1c commit c05bcf2
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ It does not matter how slowly you go as long as you do not stop.
First they ignore you, then they laugh at you, then they fight you,
then you win. –- Mahatma Gandhi

Mon Jan 22, 2018 (0.16.2)
---------------------------------------------------------------------
Fix #687

Sat Jan 6, 2018 (0.16.1)
---------------------------------------------------------------------
- #653 Fix regression with emails
Expand Down
7 changes: 5 additions & 2 deletions app/controllers/admin/fields_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class Admin::FieldsController < Admin::ApplicationController
before_action "set_current_tab('admin/fields')", only: [:index]

before_action :setup_current_tab, only: [:index]
load_resource except: %i[create subform]

# GET /fields
Expand Down Expand Up @@ -115,4 +114,8 @@ def subform
def field_params
params[:field].permit!
end

def setup_current_tab
set_current_tab('admin/fields')
end
end
8 changes: 7 additions & 1 deletion app/controllers/admin/plugins_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class Admin::PluginsController < Admin::ApplicationController
before_action "set_current_tab('admin/plugins')", only: [:index]
before_action :setup_current_tab, only: [:index]

# GET /admin/plugins
# GET /admin/plugins.xml
Expand All @@ -14,4 +14,10 @@ def index

respond_with(@plugins)
end

protected

def setup_current_tab
set_current_tab('admin/plugins')
end
end
6 changes: 5 additions & 1 deletion app/controllers/admin/settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class Admin::SettingsController < Admin::ApplicationController
before_action "set_current_tab('admin/settings')", only: [:index]
before_action :setup_current_tab, only: [:index]

# GET /admin/settings
# GET /admin/settings.xml
#----------------------------------------------------------------------------
def index
end

def setup_current_tab
set_current_tab('admin/settings')
end
end
6 changes: 5 additions & 1 deletion app/controllers/admin/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class Admin::TagsController < Admin::ApplicationController
before_action "set_current_tab('admin/tags')", only: %i[index show]
before_action :setup_current_tab, only: %i[index show]

load_resource

Expand Down Expand Up @@ -68,4 +68,8 @@ def confirm
def tag_params
params[:tag].permit!
end

def setup_current_tab
set_current_tab('admin/tags')
end
end
2 changes: 1 addition & 1 deletion lib/fat_free_crm/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module FatFreeCRM
module VERSION #:nodoc:
MAJOR = 0
MINOR = 16
TINY = 1
TINY = 2
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
Expand Down

0 comments on commit c05bcf2

Please sign in to comment.