Merge pull request #142 from foodcoop-rostock/multiple-recurring-tasks
Great!
This commit is contained in:
commit
db8a929f0b
22 changed files with 223 additions and 174 deletions
|
|
@ -45,26 +45,6 @@
|
|||
= f.label :role_orders
|
||||
%br/
|
||||
= f.check_box :role_orders
|
||||
%p
|
||||
= f.label :weekly_task
|
||||
%br/
|
||||
= f.check_box :weekly_task
|
||||
%p
|
||||
= f.label :weekday
|
||||
%br/
|
||||
= f.text_field :weekday
|
||||
%p
|
||||
= f.label :task_name
|
||||
%br/
|
||||
= f.text_field :task_name
|
||||
%p
|
||||
= f.label :task_description
|
||||
%br/
|
||||
= f.text_field :task_description
|
||||
%p
|
||||
= f.label :task_required_users
|
||||
%br/
|
||||
= f.text_field :task_required_users
|
||||
%p
|
||||
= f.label :deleted_at
|
||||
%br/
|
||||
|
|
|
|||
|
|
@ -12,11 +12,6 @@
|
|||
%th Role Article Meta
|
||||
%th Role Finance
|
||||
%th Role Orders
|
||||
%th Weekly Task
|
||||
%th Weekday
|
||||
%th Task Name
|
||||
%th Task Description
|
||||
%th Task Required Users
|
||||
%th Deleted At
|
||||
%th Contact Person
|
||||
%th Contact Phone
|
||||
|
|
@ -34,11 +29,6 @@
|
|||
%td= h ordergroup.role_article_meta
|
||||
%td= h ordergroup.role_finance
|
||||
%td= h ordergroup.role_orders
|
||||
%td= h ordergroup.weekly_task
|
||||
%td= h ordergroup.weekday
|
||||
%td= h ordergroup.task_name
|
||||
%td= h ordergroup.task_description
|
||||
%td= h ordergroup.task_required_users
|
||||
%td= h ordergroup.deleted_at
|
||||
%td= h ordergroup.contact_person
|
||||
%td= h ordergroup.contact_phone
|
||||
|
|
|
|||
|
|
@ -13,13 +13,6 @@
|
|||
- members = group.users
|
||||
= "(#{members.size})"
|
||||
= members.collect(&:nick).join(", ")
|
||||
- if group.is_a?(Workgroup)
|
||||
%dt= t('.weekly_job') + ':'
|
||||
%dd
|
||||
- if group.weekly_task
|
||||
=h "#{group.task_name} am #{weekday(group.weekday)}"
|
||||
- else
|
||||
= t '.no_weekly_job'
|
||||
- else
|
||||
- unless group.is_a?(Workgroup)
|
||||
%dt= t '.apple_limit'
|
||||
%dd= group.ignore_apple_restriction ? t('.deactivated') : t('.activated')
|
||||
|
|
|
|||
|
|
@ -3,17 +3,6 @@
|
|||
|
||||
= yield
|
||||
|
||||
- if f.object.is_a?(Workgroup)
|
||||
%h3= t '.title'
|
||||
= f.input :weekly_task
|
||||
#weekly_task_fields
|
||||
= f.input :weekday, as: :select, collection: Workgroup.weekdays
|
||||
= f.input :task_name
|
||||
= f.input :task_required_users
|
||||
= f.input :task_duration, :as => :select, :collection => (1..3)
|
||||
= f.input :task_description, as: :text, input_html: {rows: 5}
|
||||
= f.input :next_weekly_tasks_number
|
||||
|
||||
= f.input :user_tokens, :as => :string,
|
||||
:input_html => { 'data-pre' => f.object.users.map { |u| u.token_attributes }.to_json }
|
||||
|
||||
|
|
|
|||
|
|
@ -25,5 +25,7 @@
|
|||
= f.input :due_date, as: :date_picker
|
||||
= f.input :done
|
||||
.form-actions
|
||||
= f.submit class: 'btn'
|
||||
= f.submit class: 'btn btn-primary'
|
||||
- if @task.new_record?
|
||||
= f.submit t('.submit.periodic'), name: 'periodic', class: 'btn'
|
||||
= link_to t('ui.or_cancel'), :back
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -29,3 +32,6 @@
|
|||
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
|
||||
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
|
||||
class: 'btn btn-danger'
|
||||
- if @task.periodic?
|
||||
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,
|
||||
confirm: t('.confirm_delete_group'), class: 'btn btn-danger'
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
- title t('.title', workgroup: @group.name)
|
||||
= render 'nav'
|
||||
|
||||
%section.well
|
||||
%h3= t '.weekly.title'
|
||||
- if @group.weekly_task
|
||||
= t('.weekly.desc', weekday: weekday(@group.weekday), task: @group.task_name).html_safe
|
||||
- else
|
||||
= t('.weekly.empty').html_safe
|
||||
|
||||
- if @current_user.member_of?(@group) or @current_user.role_admin?
|
||||
= link_to t('.weekly.edit'), edit_foodcoop_workgroup_path(@group), class: 'btn'
|
||||
|
||||
%section
|
||||
%h3= t '.title_all'
|
||||
= render 'list', tasks: @group.open_tasks
|
||||
|
|
|
|||
|
|
@ -45,26 +45,6 @@
|
|||
= f.label :role_orders
|
||||
%br/
|
||||
= f.check_box :role_orders
|
||||
%p
|
||||
= f.label :weekly_task
|
||||
%br/
|
||||
= f.check_box :weekly_task
|
||||
%p
|
||||
= f.label :weekday
|
||||
%br/
|
||||
= f.text_field :weekday
|
||||
%p
|
||||
= f.label :task_name
|
||||
%br/
|
||||
= f.text_field :task_name
|
||||
%p
|
||||
= f.label :task_description
|
||||
%br/
|
||||
= f.text_field :task_description
|
||||
%p
|
||||
= f.label :task_required_users
|
||||
%br/
|
||||
= f.text_field :task_required_users
|
||||
%p
|
||||
= f.label :deleted_at
|
||||
%br/
|
||||
|
|
|
|||
|
|
@ -12,11 +12,6 @@
|
|||
%th Role Article Meta
|
||||
%th Role Finance
|
||||
%th Role Orders
|
||||
%th Weekly Task
|
||||
%th Weekday
|
||||
%th Task Name
|
||||
%th Task Description
|
||||
%th Task Required Users
|
||||
%th Deleted At
|
||||
%th Contact Person
|
||||
%th Contact Phone
|
||||
|
|
@ -34,11 +29,6 @@
|
|||
%td= h workgroup.role_article_meta
|
||||
%td= h workgroup.role_finance
|
||||
%td= h workgroup.role_orders
|
||||
%td= h workgroup.weekly_task
|
||||
%td= h workgroup.weekday
|
||||
%td= h workgroup.task_name
|
||||
%td= h workgroup.task_description
|
||||
%td= h workgroup.task_required_users
|
||||
%td= h workgroup.deleted_at
|
||||
%td= h workgroup.contact_person
|
||||
%td= h workgroup.contact_phone
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue