show currently running timer in window title, menu item

This commit is contained in:
Jens Kraemer
2020-04-25 17:09:38 +08:00
parent 797e40384a
commit 30bcd5ff8c
7 changed files with 146 additions and 22 deletions

View File

@@ -14,7 +14,7 @@ Redmine::Plugin.register :stopwatch do
menu :account_menu, :stopwatch,
:new_stopwatch_timer_path,
caption: :button_log_time,
html: { method: :get, id: 'stopwatch-toggle', 'data-remote': true },
html: { method: :get, id: 'stopwatch-menu', 'data-remote': true },
before: :my_account,
if: ->(*_){ User.current.logged? and User.current.allowed_to?(:log_time, nil, global: true) }
end