Skip to content

Commit

Permalink
Improved Layout of time tracking overview
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Feb 22, 2023
1 parent e129a6d commit 84df61f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/views/hourglass_ui/_time_tracker_control.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.time-tracker-control
h3 = t('hourglass.ui.index.time_tracker_control.heading')
- unless @time_tracker.persisted?
h3 = t('hourglass.ui.index.time_tracker_control.heading')
= form_for @time_tracker, url: start_hourglass_time_trackers_path, as: 'time_tracker', remote: true, html: {class: 'new-time-tracker-form js-hourglass-remote'} do |f|
.form-row
.form-field
Expand All @@ -10,6 +10,7 @@
.form-field
= f.submit t('hourglass.ui.index.time_tracker_control.button_start')
- else
h3 = t('hourglass.ui.index.time_tracker_control.tracking_heading')
= form_for @time_tracker, url: stop_hourglass_time_tracker_path(@time_tracker), method: :delete, as: 'time_tracker', remote: true, html: {class: 'edit-time-tracker-form js-validate-form js-hourglass-remote'} do |f|
.form-row
= form_field :issue, f, @time_tracker, disabled: !policy(Hourglass::TimeLog).book?, with_link: true
Expand All @@ -34,8 +35,7 @@
= f.submit t('hourglass.ui.index.time_tracker_control.button_stop'), data: @time_tracker.clamp? ? {confirm: t('hourglass.ui.forms.confirmations.stop_clamping', 'duration': localized_hours_in_units(Hourglass::DateTimeCalculations.in_hours(Hourglass::DateTimeCalculations.clamp_limit(project: @time_tracker.project))))} : {}
= f.submit t('hourglass.ui.index.time_tracker_control.button_stop_new'), class: 'js-stop-new', data: @time_tracker.clamp? ? {confirm: t('hourglass.ui.forms.confirmations.stop_clamping', 'duration': localized_hours_in_units(Hourglass::DateTimeCalculations.in_hours(Hourglass::DateTimeCalculations.clamp_limit(project: @time_tracker.project))))} : {}
- if policy(@time_tracker).destroy?
= link_to hourglass_time_tracker_path(@time_tracker), class: 'js-hourglass-remote', title: t(:button_delete), remote: true, method: :delete, data: {confirm: t(:text_are_you_sure)} do
input type='button' value=t(:button_delete)
= link_to '', hourglass_time_tracker_path(@time_tracker), class: 'icon icon-del js-hourglass-remote', title: t(:button_delete), remote: true, method: :delete, data: {confirm: t(:text_are_you_sure)}
.form-row
- @time_tracker.custom_field_values.each do |value|
.form-field = custom_field_tag_with_label :'time_tracker', value
3 changes: 2 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ de:
button_stop_new: Stop & Neu
button_start: Start
heading: Geben sie ihre Aufgabe an
label_running_time: Laufende Zeitmessung
tracking_heading: Ihre aktuelle Zeitmessung
label_running_time: Laufende Zeit
headings:
time_logs: Letzte Zeiterfassungen (letzten 2 Wochen)
time_bookings: Letzte Zeitbuchungen (letzten 2 Wochen)
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ en:
button_stop_new: Stop & New
button_start: Start
heading: Specify your task
tracking_heading: Your current tracker
label_running_time: Current time
headings:
time_logs: Recent time logs (last 2 weeks)
Expand Down
1 change: 1 addition & 0 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ pt-BR:
button_stop_new: Parar & Novo
button_start: Iniciar
heading: Especifique sua tarefa
tracking_heading: Seu atual controle de tempo
label_running_time: Hora atual
headings:
time_logs: Registros de tempo recentes (últimas 2 semanas)
Expand Down
1 change: 1 addition & 0 deletions config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ ru:
button_stop_new: Остановить и запустить новый
button_start: Запустить
heading: Укажите свою задачу
tracking_heading: Ваш текущий хронометраж
label_running_time: Текущее время
headings:
time_logs: Последний учет времени (за 2 недели)
Expand Down

0 comments on commit 84df61f

Please sign in to comment.