Merge branch 'master' into improve-delivery-workflow-further
This commit is contained in:
commit
b303b48853
32 changed files with 331 additions and 212 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
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@
|
|||
- if order.stockit?
|
||||
%td= units
|
||||
- else
|
||||
%td= "#{order_article.quantity} + #{order_article.tolerance}" if unit_quantity > 1
|
||||
- if unit_quantity > 1 or order_article.tolerance > 0
|
||||
%td= "#{order_article.quantity} + #{order_article.tolerance}"
|
||||
- else
|
||||
%td= "#{order_article.quantity}"
|
||||
%td= units
|
||||
%p
|
||||
= t '.prices_sum'
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
17
app/views/stockit/history.haml
Normal file
17
app/views/stockit/history.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
- title t('.stock_changes', :article_name => @stock_article.name)
|
||||
|
||||
%table.table.table-hover#stock_changes
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.datetime'
|
||||
%th= t '.reason'
|
||||
%th= t '.change_quantity'
|
||||
%th= t '.new_quantity'
|
||||
%tbody
|
||||
- reversed_history = @stock_article.quantity_history.reverse
|
||||
- @stock_changes.each_with_index do |stock_change, index|
|
||||
%tr
|
||||
%td= l stock_change.created_at
|
||||
%td= link_to_stock_change_reason(stock_change)
|
||||
%td= stock_change.quantity
|
||||
%td= reversed_history[index]
|
||||
|
|
@ -56,6 +56,7 @@
|
|||
%td= article.article_category.name
|
||||
%td
|
||||
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
|
||||
= link_to t('ui.history'), stock_article_history_path(article), class: 'btn btn-mini'
|
||||
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
|
||||
class: 'btn btn-mini btn-danger', :remote => true
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -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