3 Commits
v1.1 ... master

Author SHA1 Message Date
60dfa7ae4a Added a setting to apply green/red colors to Start/Stop 2026-03-21 07:53:56 -04:00
490fbd476d Change link to be green to start and red to stop 2026-03-19 22:33:53 -04:00
Jens Kraemer
527f72f93b modern redmine + ruby versions 2025-12-04 10:20:10 +08:00
7 changed files with 37 additions and 6 deletions

View File

@@ -14,11 +14,10 @@ jobs:
strategy:
matrix:
redmine:
- '5.0'
- '5.1'
- '6.0'
- '6.1'
ruby:
- '3.0'
- '3.1'
- '3.3'
database:
- postgresql
- mysql

View File

@@ -2,3 +2,8 @@
<label for="settings_default_activity"><%= t '.label_default_activity' %> </label>
<%= select_tag 'settings[default_activity]', options_from_collection_for_select( [['always_ask', t('.label_always_ask')], ['system', t('.label_system')]] + TimeEntryActivity.system.active.to_a.pluck(:id, :name), :first, :last, Stopwatch.settings['default_activity'] ) %>
</p>
<p>
<label for="settings_highlighted_links"><%= t '.label_highlighted_links' %> </label>
<%= check_box_tag 'settings[highlighted_links]', 1, Setting.plugin_stopwatch[:highlighted_links] %>
</p>

View File

@@ -1,2 +1,3 @@
<%= javascript_include_tag "stopwatch", plugin: "stopwatch" %>
<%= stylesheet_link_tag "stopwatch", plugin: "stopwatch" %>
<%= stylesheet_link_tag "highlighted_links", plugin: "stopwatch" if Stopwatch.highlighted_links %>

View File

@@ -0,0 +1,22 @@
a.stopwatch_issue_timer[href*="stop"] {
color: red;
}
a.stopwatch_issue_timer[href*="start"] {
color: limegreen;
}
/* Mobile only */
@media (max-width: 899px) {
a.stopwatch_issue_timer[href*="stop"] {
color: red;
background-color: #ffe5e5;
border: 1px solid red;
}
a.stopwatch_issue_timer[href*="start"] {
color: limegreen;
background-color: #eaffea;
border: 1px solid limegreen;
}
}

View File

@@ -5,6 +5,7 @@ en:
settings:
label_always_ask: 'Always ask'
label_default_activity: 'Default activity for "Start tracking"'
label_highlighted_links: "Color-code Start/Stop"
label_system: 'Use system default'
stopwatch_timers:
entries_list:

View File

@@ -9,7 +9,6 @@ module Stopwatch
Stopwatch::Hooks # just load it
end
def self.settings
Setting.plugin_stopwatch
end
@@ -42,4 +41,8 @@ module Stopwatch
return activities.detect{ |a| a == default || a.parent == default }
end
end
def self.highlighted_links
settings[:highlighted_links]
end
end