Module: Plugins::CamaleonPostCreatedAt::MainHelper
- Defined in:
- app/helpers/plugins/camaleon_post_created_at/main_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#camaleon_post_created_at_on_active(plugin) ⇒ Object
here all actions on going to active you can run sql commands like this: results = ActiveRecord::Base.connection.execute(query); plugin: plugin model.
-
#camaleon_post_created_at_on_inactive(plugin) ⇒ Object
here all actions on going to inactive plugin: plugin model.
-
#camaleon_post_created_at_on_upgrade(plugin) ⇒ Object
here all actions to upgrade for a new version plugin: plugin model.
- #camaleon_post_created_at_post_form(args) ⇒ Object
Class Method Details
.included(klass) ⇒ Object
2 3 4 |
# File 'app/helpers/plugins/camaleon_post_created_at/main_helper.rb', line 2 def self.included(klass) # klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views end |
Instance Method Details
#camaleon_post_created_at_on_active(plugin) ⇒ Object
here all actions on going to active you can run sql commands like this: results = ActiveRecord::Base.connection.execute(query); plugin: plugin model
10 11 |
# File 'app/helpers/plugins/camaleon_post_created_at/main_helper.rb', line 10 def camaleon_post_created_at_on_active(plugin) end |
#camaleon_post_created_at_on_inactive(plugin) ⇒ Object
here all actions on going to inactive plugin: plugin model
15 16 |
# File 'app/helpers/plugins/camaleon_post_created_at/main_helper.rb', line 15 def camaleon_post_created_at_on_inactive(plugin) end |
#camaleon_post_created_at_on_upgrade(plugin) ⇒ Object
here all actions to upgrade for a new version plugin: plugin model
20 21 |
# File 'app/helpers/plugins/camaleon_post_created_at/main_helper.rb', line 20 def camaleon_post_created_at_on_upgrade(plugin) end |
#camaleon_post_created_at_post_form(args) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/helpers/plugins/camaleon_post_created_at/main_helper.rb', line 23 def camaleon_post_created_at_post_form(args) args[:extra_settings] << "<div class='form-group'> <label class='control-label'>#{cama_t('camaleon_cms.plugins.post_created_at.created_at')}</label> <div id='plugin_field_post_created_at' data-locale='#{current_locale}' class='input-group date'> <input type='text' name='post[created_at]' data-format='yyyy-MM-dd hh:mm:ss' class='form-control ' value='#{@post.created_at}' /> <span class='add-on input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span> </div> </div><script>jQuery(function(){ $('#plugin_field_post_created_at').datetimepicker({format: 'YYYY-MM-DD HH:mm'}) })</script>" end |