2012-10-08 21:52:03 +02:00
|
|
|
- content_for :javascript do
|
2011-05-14 19:41:46 +02:00
|
|
|
:javascript
|
|
|
|
$(function() {
|
|
|
|
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
|
|
|
|
crossDomain: false,
|
2012-07-31 18:48:41 +02:00
|
|
|
prePopulate: $("#task_user_list").data("pre"),
|
2013-04-12 00:00:02 +02:00
|
|
|
hintText: '#{escape_javascript(t('.search.hint'))}',
|
|
|
|
noResultText: '#{escape_javascript(t('.search.noresult'))}',
|
|
|
|
searchingText: '#{escape_javascript(t('.search.placeholder'))}',
|
2012-10-08 21:52:03 +02:00
|
|
|
theme: 'facebook'
|
2011-05-14 19:41:46 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2012-10-08 21:52:03 +02:00
|
|
|
- content_for :sidebar do
|
|
|
|
= render "shared/workgroup_members"
|
|
|
|
|
2011-05-14 19:02:52 +02:00
|
|
|
= simple_form_for @task do |f|
|
2012-11-12 09:03:23 +01:00
|
|
|
= f.hidden_field :current_user_id
|
2011-05-14 19:02:52 +02:00
|
|
|
= f.input :name
|
2012-08-24 11:11:40 +02:00
|
|
|
= f.input :description, as: :text, input_html: {rows: 10}
|
2011-05-14 19:02:52 +02:00
|
|
|
= f.input :duration, :as => :select, :collection => 1..3
|
2011-05-15 22:06:54 +02:00
|
|
|
= f.input :user_list, :as => :string, :input_html => { 'data-pre' => @task.users.map { |u| u.token_attributes }.to_json }
|
2011-05-14 19:02:52 +02:00
|
|
|
= f.input :required_users
|
|
|
|
= f.association :workgroup
|
2012-10-08 21:52:03 +02:00
|
|
|
= f.input :due_date, as: :date_picker
|
|
|
|
= f.input :done
|
|
|
|
.form-actions
|
2013-06-21 13:48:48 +02:00
|
|
|
= f.submit class: 'btn btn-primary'
|
2013-06-21 20:54:24 +02:00
|
|
|
- if @task.new_record?
|
2013-06-21 13:48:48 +02:00
|
|
|
= f.submit 'Wöchentliche Aufgabe erstellen', name: 'periodic', class: 'btn'
|
2013-04-12 00:00:02 +02:00
|
|
|
= link_to t('ui.or_cancel'), :back
|