mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-04-02 09:51:57 -04:00
initial commit
This commit is contained in:
25
init.rb
Normal file
25
init.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'redmine'
|
||||
require_dependency 'stopwatch'
|
||||
require 'stopwatch/hooks'
|
||||
|
||||
Redmine::Plugin.register :stopwatch do
|
||||
name 'Redmine Stopwatch Plugin'
|
||||
author 'Jens Krämer'
|
||||
author_url 'https://jkraemer.net/'
|
||||
description 'Adds start/stop timer functionality'
|
||||
version '0.1.0'
|
||||
|
||||
requires_redmine version_or_higher: '3.4.0'
|
||||
|
||||
menu :account_menu, :stopwatch,
|
||||
:new_stopwatch_timer_path,
|
||||
caption: :button_log_time,
|
||||
html: { method: :get, id: 'stopwatch-toggle', 'data-remote': true },
|
||||
before: :my_account,
|
||||
if: ->(*_){ User.current.logged? }
|
||||
end
|
||||
|
||||
Rails.configuration.to_prepare do
|
||||
Stopwatch::UserPatch.apply
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user