Sha256: 58dcc0af61da386112ce6a095a398274c6d7da95de703c2d83c2529af1d3c835

Contents?: true

Size: 896 Bytes

Versions: 9

Compression:

Stored size: 896 Bytes

Contents

Coprl::Presenters.define(:timer, namespace: :plugins) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :plugin_drawer
  plugin :timer
  page_title 'Timer'

  indented_grid do
    subheading 'Using an expiration timer'

    count_down_timer DateTime.now + + Rational(130, 60 * 60 * 24), # add 2 minutes and 10 seconds
                     expired_message: 'Something important (shoping cart for example) has Expired',
                     safe_color: 'green',
                     warn_color: 'red',
                     delete_url: 'TODO', # TODO URL to delete something on expiration
                     delete_params: {}, # parmeters to pass on expiration
                     redirect_url: 'TODO', # Where to redirect after delete?
                     redirect_params: {} do
      icon 'fas fa-stopwatch', color: :white
    end

    attach :code, file: __FILE__
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 app/demo/plugins/timer.pom
coprl-3.0.0.beta.11 app/demo/plugins/timer.pom
coprl-3.0.0.beta.10 app/demo/plugins/timer.pom
coprl-3.0.0.beta.9 app/demo/plugins/timer.pom
coprl-3.0.0.beta.8 app/demo/plugins/timer.pom
coprl-3.0.0.beta.7 app/demo/plugins/timer.pom
coprl-3.0.0.beta.6 app/demo/plugins/timer.pom
coprl-3.0.0.beta.5 app/demo/plugins/timer.pom
coprl-3.0.0.beta.4 app/demo/plugins/timer.pom