[Git][noosfero/noosfero][master] 2 commits: Transform @@core_sections in function
Rodrigo Souto
gitlab at mg.gitlab.com
Thu Jun 21 18:10:29 BRT 2018
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
3b0f7c45 by mendesiasmin at 2018-06-19T20:17:25Z
Transform @@core_sections in function
- - - - -
c3078d79 by Rodrigo Souto at 2018-06-21T21:10:16Z
Merge branch 'mendesiasmin/noosfero-core_sections'
- - - - -
1 changed file:
- app/models/control_panel.rb
Changes:
=====================================
app/models/control_panel.rb
=====================================
@@ -7,7 +7,8 @@ class ControlPanel
"ControlPanel::#{File.basename(entry_path, '.rb').camelize}".constantize
end.reject {|entry| entry == ControlPanel::Entry}.sort_by {|entry| entry.priority}
- @@core_sections = {
+ def core_sections
+ {
profile: {name: _('Profile'), priority: 10},
content: {name: _('Content'), priority: 20},
design: {name: _('Design'), priority: 30},
@@ -18,6 +19,7 @@ class ControlPanel
mail: {name: _('E-mail'), priority: 80},
others: {name: _('Others'), priority: 100},
}
+ end
def entries(environment)
plugins = Noosfero::Plugin::Manager.new(environment, self)
@@ -32,7 +34,7 @@ class ControlPanel
end
def sections(environment)
- current_sections = @@core_sections.clone
+ current_sections = core_sections
plugins = Noosfero::Plugin::Manager.new(environment, self)
plugins.dispatch(:control_panel_sections).each do |section|
section.each do |identifier, attributes|
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/3793c6bca55dcd16cf2c08b7e6bb3465a5a31147...c3078d79726cc31f1c6dead0024e9b99f825874f
--
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/3793c6bca55dcd16cf2c08b7e6bb3465a5a31147...c3078d79726cc31f1c6dead0024e9b99f825874f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180621/f564c713/attachment-0001.html>
More information about the Noosfero-dev
mailing list