Sha256: f32568baa31df44c10ed4c8a02be1c3031c81daeb9e259a0664bf327ca4006d5

Contents?: true

Size: 1.45 KB

Versions: 8

Compression:

Stored size: 1.45 KB

Contents

=begin
  Camaleon CMS is a content management system
  Copyright (C) 2015 by Owen Peredo Diaz
  Email: owenperedo@gmail.com
  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.
=end
module Admin::ApplicationHelper
  # include Admin::ApiHelper
  include Admin::MenusHelper
  include Admin::PostTypeHelper
  include Admin::CategoryHelper

  # load system notification
  def admin_system_notifications(args)
    if Date.parse(current_site.get_option("date_notified", 2.days.ago).to_s) < Date.today || true
      current_site.set_option("date_notified", Date.today)
      url = "http://camaleon.tuzitio.com/plugins/camaleon_notification/?version=#{PluginRoutes.system_info[:version] rescue "1.0"}&admin_locale=#{current_site.get_admin_language}&site=#{current_site.the_url}"
      Thread.new do
        current_site.set_meta("date_notified_message", open(url).read)
        ActiveRecord::Base.connection.close #closing connection
      end
    end
    args[:content] << current_site.get_meta("date_notified_message", "")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
camaleon_cms-0.1.7 app/helpers/admin/application_helper.rb
camaleon_cms-0.1.6 app/helpers/admin/application_helper.rb
camaleon_cms-0.1.5 app/helpers/admin/application_helper.rb
camaleon_cms-0.1.4 app/helpers/admin/application_helper.rb
camaleon_cms-0.1.3 app/helpers/admin/application_helper.rb
camaleon_cms-0.1.2 app/helpers/admin/application_helper.rb
camaleon_cms-0.0.2 app/helpers/admin/application_helper.rb
camaleon_cms-0.0.1 app/helpers/admin/application_helper.rb