improve task i18n (affects foodcoops#137)

This commit is contained in:
wvengen 2013-12-10 17:58:32 +01:00
parent b05c75aef3
commit e42e27957d
5 changed files with 18 additions and 21 deletions

View file

@ -5,13 +5,13 @@
%table.table.table-striped
%thead
%tr
%th= t '.due_date'
%th= t '.task'
%th= t '.who'
%th= heading_helper Task, :due_date
%th= heading_helper Task, :name
%th= heading_helper Task, :user_list
%th
%tbody
- @tasks.each do |task|
%tr
%td= task.due_date unless task.due_date.nil?
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task)
%td= link_to task_title(task), task_path(task)
%td= task_assignments task

View file

@ -1,9 +1,9 @@
%table.table.table-striped
%thead
%tr
%th= t '.due_date'
%th= heading_helper Task, :due_date
%th
%th= t '.task'
%th= heading_helper Task, :name
%th{:colspan => '2'}
= t '.who'
%small= t '.who_hint'
@ -15,7 +15,7 @@
%td
- if task.periodic?
%i.icon-repeat{title: t('tasks.repeated')}
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task)
%td= link_to task_title(task), task_path(task)
%td
= task_assignments task
= highlighted_required_users task

View file

@ -3,22 +3,22 @@
%section
%dl.dl-horizontal
%dt= Task.human_attribute_name(:name)
%dt= heading_helper Task, :name
%dd= @task.name
- if @task.description.present?
%dt= Task.human_attribute_name(:description)
%dt= heading_helper Task, :description
%dd= simple_format(@task.description)
- if @task.due_date.present?
%dt= Task.human_attribute_name(:due_date)
%dt= heading_helper Task, :due_date
%dd
= format_date(@task.due_date)
- if @task.periodic?
%i.icon-repeat{title: t('tasks.repeated')}
%dt= Task.human_attribute_name(:duration)
%dt= heading_helper Task, :duration
%dd= t('.hours', count: @task.duration)
%dt= Task.human_attribute_name(:user_list)
%dt= heading_helper Task, :user_list
%dd= task_assignments(@task)
%dt= Task.human_attribute_name(:workgroup)
%dt= heading_helper Task, :workgroup
%dd
- if @task.workgroup
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)