Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions app/components/timer_session_entry_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,30 @@
<td class="timer-session-table-actions">
<% if timer_session_entry? %>
<% if can_continue_entry? %>
<%= link_to timer_sessions_continue_path(timer_session_entry),
method: :post,
data: { timer_session_continue_button: '' } do %>
<span class="icon-only icon-arrow-right"></span>
<% end %>
<%= link_to(sprite_icon('arrow-right', t(:button_continue), icon_only: true),
timer_sessions_continue_path(timer_session_entry),
data: { timer_session_continue_button: '' },
method: :post, class: 'icon-only icon-arrow-right') %>
<% end %>
<% if can_edit_entry? %>
<%= link_to edit_timer_session_path(timer_session_entry),
<%= link_to(sprite_icon('edit', t(:button_edit), icon_only: true),
edit_timer_session_path(timer_session_entry),
data: { timer_session_edit_button: '' },
remote: true do %>
<span class="icon-only icon-edit"></span>
<% end %>
remote: true, class: 'icon-only icon-edit') %>
<% end %>
<% if can_destroy_entry? %>
<%= link_to timer_session_path(timer_session_entry),
<%= link_to(sprite_icon('del', t(:button_delete), icon_only: true),
timer_session_path(timer_session_entry),
data: { confirm: t(:text_are_you_sure), timer_session_destroy_button: '' },
method: :delete, title: t(:button_delete) do %>
<span class="icon-only icon-del"></span>
<% end %>
method: :delete, class: 'icon-only icon-del') %>
<% end %>
<% if display_discrepancy_errors? %>
<%= link_to timer_sessions_time_error_path(timer_session_entry),
<%= link_to(sprite_icon('warning', t('timer_sessions.messaging.errors.discrepancy_in_time_sum.title'), icon_only: true),
timer_sessions_time_error_path(timer_session_entry),
data: { timer_session_discrepancy_button: '' },
remote: true do %>
<span class="icon-only icon-warning"></span>
<% end %>
remote: true, class: 'icon-only icon-warning') %>
<% elsif display_overlap_errors? %>
<span class="icon-only icon-warning" title="<%= t('timer_sessions.messaging.overlap_error') %>"></span>
<%= sprite_icon('warning', t('timer_sessions.messaging.overlap_error'), icon_only: true) %>
<% end %>
<% end %>
</td>
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/timer_sessions_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

module TimerSessionsHelper
include IconsHelper

MAX_SUBJECT_LENGTH = 75
SECONDS_IN_MINUTE = 60
GAP_LIMIT_IN_MINUTES = 5
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_ticker_issue_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</td>
<td>
<span class="text-danger input-group-text" data-action="click->list#removeItem">
<i class="icon-only icon-del"></i>
<%= sprite_icon('del', t(:button_delete), icon_only: true) %>
</span>
<%= hidden_field_tag 'timer_session[issue_ids][]', issue.id, id: "timer_session_issue_id_#{issue.id}", readonly: true %>
</td>
Expand Down
9 changes: 4 additions & 5 deletions app/views/timer_sessions/_time_discrepancy_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= t('resolution_options.edit_timer_session', scope: base_scope, hours: format_worked_hours(timer_session.recorded_hours)) %><br>
<%= link_to edit_timer_session_path(timer_session), remote: true do %>
<%= t('timer_sessions.edit.title') %>
<div class="icon-only icon-edit"></div>
<%= sprite_icon('edit', t(:button_edit), icon_only: true) %>
<% end %>
</li>
<li>
Expand All @@ -18,7 +18,7 @@
<li>
<%= link_to edit_time_entry_path(time_entry) do %>
<%= format_time_entry_information(time_entry) %>
<div class="icon-only icon-edit"></div>
<%= sprite_icon('edit', t(:button_edit), icon_only: true) %>
<% end %>
</li>
</ul>
Expand All @@ -33,14 +33,13 @@
<div class="mt-3">
<%= link_to timer_session_path(timer_session), data: { confirm: l(:text_are_you_sure) }, method: :delete, title: l(:button_delete) do %>
<%= t('timer_sessions.destroy.button') %>
<div class="icon-only icon-del"></div>
<%= sprite_icon('del', t(:button_delete), icon_only: true) %>
<% end %>
</div>
<div class="mt-3">
<%= link_to timer_sessions_rebalance_path(timer_session), data: { confirm: l(:text_are_you_sure) }, method: :post, title: l(:button_delete) do %>
<%= t('timer_sessions.rebalance.button') %>
<div class="icon-only icon-add"></div>
<%= sprite_icon('add', t(:button_add), icon_only: true) %>
<% end %>
</div>
</div>

6 changes: 2 additions & 4 deletions app/views/timer_sessions/_timer_container.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,22 @@
<% if User.current.allowed_to_globally?(action: :update, controller: 'time_tracker') %>
<%= f.button :stop, type: :submit, data: { name: 'timer-stop', form_target: 'stopButton' }, name: :stop do %>
<%= t('timer_sessions.timer.stop') %>
<i class="icon icon-error"></i>
<% end %>
<% end %>
<% if User.current.allowed_to_globally?(action: :destroy, controller: 'time_tracker') %>
<%= f.button :cancel, type: :submit, data: { name: 'timer-cancel', confirm: l(:text_are_you_sure) }, class: 'ml-3', name: :cancel, value: :cancel, form: "timer-cancel-form" do %>
<%= t('timer_sessions.timer.cancel') %>
<i class="icon icon-cancel"></i>
<% end %>
<% end %>
</div>
<% elsif !timer_session.persisted? && User.current.allowed_to_globally?(action: :create, controller: 'time_tracker') %>
<%= f.button :start, type: :submit, value: :start, data: { name: 'timer-start' }, name: :commit do %>
<%= t('timer_sessions.timer.start') %>
<i class="icon icon-add new-issue"></i>
<%= sprite_icon('add') %>
<% end %>
<%= f.button :start, type: :submit, value: :continue_last_session, data: { name: 'timer-continue' }, class: 'ml-3', name: :commit do %>
<%= t('timer_sessions.timer.continue_last_session') %>
<i class="icon icon-add new-issue"></i>
<%= sprite_icon('add') %>
<% end %>
<% end %>
<% end %>
Expand Down
25 changes: 13 additions & 12 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ de:
issue_id:
no_selection: mindestens ein Issue muss gewählt sein
invalid: ein oder mehrere Issues müssen gewählt sein
button_continue: Weitermachen
timer_sessions:
filters:
filter: Filter
Expand Down Expand Up @@ -63,7 +64,7 @@ de:
Es wurde eine Diskrepanz in der erfassten Zeit der Session %{range} gefunden!
Bitte resuliere diese Diskrepanz!
resolution_options:
options: "Um eine Diskrepanz zu resulieren hast du folgende Optionen:"
options: 'Um eine Diskrepanz zu resulieren hast du folgende Optionen:'
edit_timer_session: Du kannst die Session direkt editieren, damit sie %{hours} umfasst
edit_time_entries: Du kannst einen der Zeiterfassungen anpassen damit die Summe %{hours} ergibt
last_resort: |
Expand All @@ -74,15 +75,15 @@ de:
continue_last_session: Anschliessend Starten
stop: Stop
cancel: Abbrechen
date_placeholder: "dd.mm.yyyy hh:mm"
absolute_time_placeholder: "0.75"
current: "Aktuelle Arbeitserfassung: "
date_placeholder: 'dd.mm.yyyy hh:mm'
absolute_time_placeholder: '0.75'
current: 'Aktuelle Arbeitserfassung: '
index:
title: Tracky
table:
total_hours_worked: "Totale Stunden: %{hours} h"
total_hours_worked: 'Totale Stunden: %{hours} h'
rebalance:
button: "Ausbalancieren"
button: 'Ausbalancieren'
edit:
title: Arbeitseintrag bearbeiten
update: Überarbeiten
Expand All @@ -93,10 +94,10 @@ de:
tomorrow: Morgen
yesterday: Gestern
formats:
date_with_year: "%d.%m.%Y"
date_with_year_and_weekday: "%A %d.%m.%Y"
date_without_year: "%d.%m"
datetime_format: "%d.%m.%Y %H:%M"
date_with_year: '%d.%m.%Y'
date_with_year_and_weekday: '%A %d.%m.%Y'
date_without_year: '%d.%m'
datetime_format: '%d.%m.%Y %H:%M'
jquery_datetime_format: d.m.Y H:i
js_datetime_format: "dd.MM.yyyy HH:mm"
time: "%H:%M"
js_datetime_format: 'dd.MM.yyyy HH:mm'
time: '%H:%M'
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ en:
issue_id:
no_selection: at least one issue must be selected
invalid: one or more issues do not exist
button_continue: Continue
timer_sessions:
filters:
filter: Filter
Expand Down