Skip to content

Commit

Permalink
closes #117: added new setting for default rounding behavior
Browse files Browse the repository at this point in the history
version bump to 0.8.1
  • Loading branch information
Robert Kranz committed Nov 7, 2013
1 parent 0329061 commit 9de63fd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Reports are the method of generating invoices for customers. The layout is set u

## Version History

* 0.8.1 bugfix with permission, new setting for default rounding
* 0.8.0 many bugfixes, localized time, new menu buttons, improved workflow
* 0.7.0 compatible with Redmine 2.3.1
* 0.6.2 enhanced error checking of correct settings in Redmine
Expand Down
1 change: 1 addition & 0 deletions app/models/time_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def initialize(arguments = nil)
unless issue.nil?
self.project_id = issue.project_id
end
self.round = Setting.plugin_redmine_time_tracker[:round_default]
raise StandardError, l(:tt_error_not_allowed_to_create_time_log) if permission_level < 1
end

Expand Down
4 changes: 4 additions & 0 deletions app/views/settings/_time_tracker.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
<p>
<%= label_tag 'settings[round_limit]', l(:time_tracker_round_limit) %>
<%= text_field_tag 'settings[round_limit]', @settings[:round_limit], {:size => 2} %> (%)
</p>
<p>
<%= label_tag 'settings[round_default]', l(:time_tracker_round_default) %>
<%= check_box_tag 'settings[round_default]', true, @settings[:round_default] %>
</p>
1 change: 1 addition & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ de:
time_tracker_report_total_time: "Zeitsumme"
time_tracker_round_steps: "Schritt"
time_tracker_round_limit: "Abrunden wenn unter"
time_tracker_round_default: "Runden standardmäßig an?"
time_tracker_seconds: "Sekunden"
time_tracker_settings_from_status: "von Status"
time_tracker_settings_general_title: "Allgemein"
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ en:
time_tracker_report_total_time: "Total Time"
time_tracker_round_steps: "Steps"
time_tracker_round_limit: "Round down if below"
time_tracker_round_default: "Round per default on?"
time_tracker_seconds: "seconds"
time_tracker_settings_from_status: "From status"
time_tracker_settings_general_title: "General"
Expand Down
4 changes: 2 additions & 2 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
author 'HicknHack Software GmbH'
author_url 'http://www.hicknhack-software.com'
description 'Keep track of all the time. Associate it at your will. Create and print custom reports.'
version '0.8.0'
version '0.8.1'

requires_redmine :version_or_higher => '2.3.1'

#settings :default => {:refresh_rate => '60', :status_transitions => {}}, :partial => 'settings/time_tracker'
settings :default => {:report_title => 'Report', :report_logo_url => '', :report_logo_width => '150', :round_steps => '0.25', :round_limit => '50'}, :partial => 'settings/time_tracker'
settings :default => {:report_title => 'Report', :report_logo_url => '', :report_logo_width => '150', :round_steps => '0.25', :round_limit => '50', :round_default => false}, :partial => 'settings/time_tracker'

Redmine::AccessControl.map do |map|
map.project_module :redmine_timetracker_plugin do
Expand Down

0 comments on commit 9de63fd

Please sign in to comment.