Module: Themes::Default::DefaultHelper

Defined in:
app/apps/themes/default/default_helper.rb

Overview

Camaleon CMS is a content management system

Copyright (C) 2015 by Owen Peredo Diaz
Email: [email protected]
This program is free software: you can redistribute it and/or modify   it under the terms of the GNU Affero General Public License as  published by the Free Software Foundation, either version 3 of the  License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the  GNU Affero General Public License (GPLv3) for more details.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


10
11
12
# File 'app/apps/themes/default/default_helper.rb', line 10

def self.included(klass)
  klass.helper_method [:get_taxonomy] rescue ""
end

Instance Method Details

#get_taxonomy(taxonomies = {}, rel = '') ⇒ Object


22
23
24
25
26
27
28
29
30
# File 'app/apps/themes/default/default_helper.rb', line 22

def get_taxonomy(taxonomies = {}, rel = '')
  list = []
  if taxonomies.present?
    taxonomies.each do |taxonomy|
      list << "<a href='#{taxonomy.the_url}' rel='#{rel}'>#{taxonomy.the_title}</a>"
    end
  end
  list.join(', ')
end

#theme_default_load_appObject


14
15
16
# File 'app/apps/themes/default/default_helper.rb', line 14

def theme_default_load_app

end

#theme_default_on_install(theme) ⇒ Object


32
33
34
# File 'app/apps/themes/default/default_helper.rb', line 32

def theme_default_on_install(theme)
  theme.add_field({"name"=>"Footer message", "slug"=>"footer"},{field_key: "editor", default_value: 'Copyright &copy; 2015 - Camaleon CMS. All rights reservated.'})
end

#theme_default_settings(theme) ⇒ Object


18
19
20
# File 'app/apps/themes/default/default_helper.rb', line 18

def theme_default_settings(theme)

end