├── MIT-LICENSE.txt ├── README.md ├── app ├── controllers │ └── extended_spent_time_controller.rb └── views │ └── my │ └── blocks │ ├── _log.html.erb │ └── _timelog.html.erb ├── assets └── stylesheets │ └── style.css ├── config ├── locales │ ├── de.yml │ ├── en.yml │ ├── es.yml │ ├── fr.yml │ └── pt.yml └── routes.rb ├── illustration-small.png ├── illustration.png └── init.rb /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Pertimm 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Redmine plugin: extended_spent_time 2 | =================================== 3 | 4 | Redmine plugin used to extend spent time visualisation options located in "my page". 5 | 6 | Released under the MIT license. 7 | 8 |  9 | 10 | -- 11 | 12 | Mise en place d'options d'affichage sur le block "temps passé" de l'interface "Ma page". 13 | 14 | Les options d'affichage permettent d'étendre cette vue à 1, 2, 3, 4 ou 5 semaines. -------------------------------------------------------------------------------- /app/controllers/extended_spent_time_controller.rb: -------------------------------------------------------------------------------- 1 | class ExtendedSpentTimeController < ApplicationController 2 | unloadable 3 | 4 | def update 5 | @user = User.current 6 | @user.pref[:spent_time_period] = params[:period] 7 | @user.pref.save 8 | 9 | respond_to do |format| 10 | format.html { 11 | render :partial => "my/blocks/log", :locals => {:user => @user} 12 | } 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /app/views/my/blocks/_log.html.erb: -------------------------------------------------------------------------------- 1 |
<%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %>
37 |<%= l(:label_activity) %> | 43 |<%= l(:label_project) %> | 44 |<%= l(:field_comments) %> | 45 |<%= l(:field_hours) %> | 46 |47 | |
---|---|---|---|---|
<%= day == Date.today ? l(:label_today).titleize : format_date(day) %> | 52 |53 | | <%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %> | 54 |55 | | |
59 | <%= entry.activity %> 60 | | 61 |62 | <%= entry.project %> 63 | <% if entry.issue %> 64 | - <%= link_to_issue(entry.issue, :truncate => 50) %> 65 | <% end %> 66 | | 67 |<%=h entry.comments %> | 68 |<%= html_hours("%.2f" % entry.hours) %> | 69 |70 | <% if entry.editable_by?(@user) -%> 71 | <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry}, 72 | :title => l(:button_edit) %> 73 | <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry}, 74 | :confirm => l(:text_are_you_sure), 75 | :method => :delete, 76 | :title => l(:button_delete) %> 77 | <% end -%> 78 | | 79 |