From e5d790021c77b912ade0d9faffdf501b720fc6c5 Mon Sep 17 00:00:00 2001 From: Robert Waltemath Date: Thu, 27 Jun 2013 10:22:22 +0200 Subject: [PATCH] Add repeated symbol to task list. --- app/views/tasks/_list.haml | 4 ++++ app/views/tasks/show.haml | 5 ++++- config/locales/de.yml | 1 + config/locales/en.yml | 1 + db/schema.rb | 4 ++-- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/tasks/_list.haml b/app/views/tasks/_list.haml index a0b2af22..da91cec8 100644 --- a/app/views/tasks/_list.haml +++ b/app/views/tasks/_list.haml @@ -2,6 +2,7 @@ %thead %tr %th= t '.due_date' + %th %th= t '.task' %th{:colspan => '2'} = t '.who' @@ -11,6 +12,9 @@ - done = task.done ? " done" : "" %tr{:class => done } %td= format_date(task.due_date) unless task.due_date.nil? + %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 = task_assignments task diff --git a/app/views/tasks/show.haml b/app/views/tasks/show.haml index 6a57dbad..8777d15d 100644 --- a/app/views/tasks/show.haml +++ b/app/views/tasks/show.haml @@ -10,7 +10,10 @@ %dd= simple_format(@task.description) - if @task.due_date.present? %dt= t '.due_date' - %dd= format_date(@task.due_date) + %dd + = format_date(@task.due_date) + - if @task.periodic? + %i.icon-repeat{title: t('tasks.repeated')} %dt= t 'simple_form.labels.task.duration' %dd= t('.hours', count: @task.duration) %dt= t 'simple_form.labels.task.user_list' diff --git a/config/locales/de.yml b/config/locales/de.yml index 8a8abb73..ffd5a82b 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1788,6 +1788,7 @@ de: new_task: Neue Aufgabe erstellen new: title: Neue Aufgabe erstellen + repeated: Aufgabe wird wöchentlich wiederholt set_done: notice: Aufgabenstatus wurde aktualisiert show: diff --git a/config/locales/en.yml b/config/locales/en.yml index 1cd4eee9..a2042a46 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1795,6 +1795,7 @@ en: new_task: Create new task new: title: Create new tasks + repeated: Task is repeated weekly set_done: notice: The state of the task has been updated show: diff --git a/db/schema.rb b/db/schema.rb index f81bfae6..d2a0dc72 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -308,10 +308,10 @@ ActiveRecord::Schema.define(:version => 20130624085246) do add_index "suppliers", ["name"], :name => "index_suppliers_on_name", :unique => true create_table "tasks", :force => true do |t| - t.string "name", :default => "", :null => false + t.string "name", :default => "", :null => false t.string "description" t.date "due_date" - t.boolean "done", :default => false + t.boolean "done", :default => false t.integer "workgroup_id" t.datetime "created_on", :null => false t.datetime "updated_on", :null => false