2009-01-15 12:14:01 +01:00
|
|
|
= @form.error_messages
|
|
|
|
|
|
|
|
%div{:style => "float:left;width:55%;"}
|
|
|
|
%p
|
|
|
|
= @form.label :name
|
|
|
|
%br/
|
|
|
|
= @form.text_field :name, :size => 20
|
|
|
|
%p
|
|
|
|
= @form.label :description
|
|
|
|
%br/
|
|
|
|
= @form.text_field :description, :size => 40
|
|
|
|
|
|
|
|
= yield
|
|
|
|
|
|
|
|
- if @group.is_a?(Workgroup)
|
|
|
|
%div{:style => "clear:both"}
|
|
|
|
%h3
|
|
|
|
Wöchentliche Jobs definieren?
|
|
|
|
= @form.check_box :weekly_task, {:onclick => "toggleWeeklyTask();"}
|
|
|
|
%table
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :weekday, "Wochentag:"
|
|
|
|
%td
|
|
|
|
= @form.select :weekday, Workgroup.weekdays
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :task_name, "Dienstname:"
|
|
|
|
%td= @form.text_field :task_name, :size => 20
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :task_required_users, "Benötigte Verantwortliche:"
|
|
|
|
%td= @form.text_field :task_required_users, :size => 3
|
2011-05-07 21:54:00 +02:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :task_duration, "Vor. Dauer in Stunden"
|
|
|
|
%td= @form.select :task_duration, options_for_select(1..3, @group.task_duration)
|
2009-01-15 12:14:01 +01:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :task_description, "Beschreibung:"
|
2009-08-04 12:57:19 +02:00
|
|
|
%td= @form.text_area :task_description, :size => "30x10"
|
2012-06-24 11:01:16 +02:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= @form.label :next_weekly_tasks_number, "Für wieviel Wochen im Voraus sollen Aufgaben erstellt werden?"
|
|
|
|
%td= @form.text_field :next_weekly_tasks_number, :size => 3
|
2009-01-15 12:14:01 +01:00
|
|
|
|
|
|
|
%script{ 'type' => "text/javascript"}
|
|
|
|
:plain
|
|
|
|
//<![CDATA[
|
|
|
|
// preset data
|
|
|
|
function toggleWeeklyTask(){
|
|
|
|
if ($("workgroup_weekly_task").checked == true) {
|
|
|
|
$('workgroup_weekday').disabled = false;
|
|
|
|
$('workgroup_task_name').disabled = false;
|
|
|
|
$('workgroup_task_required_users').disabled = false;
|
2011-05-07 21:54:00 +02:00
|
|
|
$('workgroup_task_duration').disabled = false;
|
2009-01-15 12:14:01 +01:00
|
|
|
$('workgroup_task_description').disabled = false;
|
|
|
|
} else {
|
|
|
|
$('workgroup_weekday').disabled = true;
|
|
|
|
$('workgroup_task_name').disabled = true;
|
|
|
|
$('workgroup_task_required_users').disabled = true;
|
2011-05-07 21:54:00 +02:00
|
|
|
$('workgroup_task_duration').disabled = true;
|
2009-01-15 12:14:01 +01:00
|
|
|
$('workgroup_task_description').disabled = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
toggleWeeklyTask();
|
2012-06-24 11:01:16 +02:00
|
|
|
//]]>
|