Users may delete all tasks of a group, i.e. delete the whole group.
This commit is contained in:
parent
71d8f9bde7
commit
4037ef12da
5 changed files with 22 additions and 1 deletions
8
app/controllers/periodic_task_groups_controller.rb
Normal file
8
app/controllers/periodic_task_groups_controller.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
class PeriodicTaskGroupsController < ApplicationController
|
||||||
|
def destroy
|
||||||
|
@task_group = PeriodicTaskGroup.find(params[:id])
|
||||||
|
@task_group.destroy
|
||||||
|
|
||||||
|
redirect_to tasks_url, notice: I18n.t('periodic_task_groups.destroy.notice')
|
||||||
|
end
|
||||||
|
end
|
2
app/helpers/periodic_task_groups_helper.rb
Normal file
2
app/helpers/periodic_task_groups_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
module PeriodicTaskGroupsHelper
|
||||||
|
end
|
|
@ -29,3 +29,6 @@
|
||||||
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
|
= 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?",
|
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
|
||||||
class: 'btn btn-danger'
|
class: 'btn btn-danger'
|
||||||
|
- if @task.periodic
|
||||||
|
= link_to t('ui.delete_all'), periodic_task_group_path(@task.periodic_task_group), :method => :delete,
|
||||||
|
:confirm => "Alle Aufgaben dieser wöchentlichen Aufgabe wirklich löschen?", class: 'btn btn-danger'
|
||||||
|
|
|
@ -1422,6 +1422,9 @@ de:
|
||||||
title: ! '%{title} - Version %{version}'
|
title: ! '%{title} - Version %{version}'
|
||||||
title_version: Version
|
title_version: Version
|
||||||
view_current: Aktuelle Version sehen
|
view_current: Aktuelle Version sehen
|
||||||
|
periodic_task_groups:
|
||||||
|
destroy:
|
||||||
|
notice: Aufgaben wurden gelöscht
|
||||||
sessions:
|
sessions:
|
||||||
logged_in: Logged in!
|
logged_in: Logged in!
|
||||||
logged_out: Logged out!
|
logged_out: Logged out!
|
||||||
|
@ -1517,7 +1520,6 @@ de:
|
||||||
task:
|
task:
|
||||||
duration: Wie lange dauert die Aufgabe, 1-3 Stunden
|
duration: Wie lange dauert die Aufgabe, 1-3 Stunden
|
||||||
required_users: Wieviel Benutzerinnen werden insgesamt benötigt?
|
required_users: Wieviel Benutzerinnen werden insgesamt benötigt?
|
||||||
periodic: Wöchentlich wiederholen
|
|
||||||
tax: In Prozent, Standard sind 7,0
|
tax: In Prozent, Standard sind 7,0
|
||||||
labels:
|
labels:
|
||||||
article:
|
article:
|
||||||
|
@ -1609,6 +1611,7 @@ de:
|
||||||
due_date: Wann erledigen?
|
due_date: Wann erledigen?
|
||||||
duration: Dauer
|
duration: Dauer
|
||||||
name: Name
|
name: Name
|
||||||
|
periodic: Wöchentlich wiederholen
|
||||||
required_users: Anzahl
|
required_users: Anzahl
|
||||||
user_list: Verantwortliche
|
user_list: Verantwortliche
|
||||||
workgroup: Arbeitsgruppe
|
workgroup: Arbeitsgruppe
|
||||||
|
@ -1823,6 +1826,7 @@ de:
|
||||||
ui:
|
ui:
|
||||||
close: Schließen
|
close: Schließen
|
||||||
delete: Löschen
|
delete: Löschen
|
||||||
|
delete_all: Alle löschen
|
||||||
edit: Bearbeiten
|
edit: Bearbeiten
|
||||||
marks:
|
marks:
|
||||||
close: ! '×'
|
close: ! '×'
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
Foodsoft::Application.routes.draw do
|
Foodsoft::Application.routes.draw do
|
||||||
|
|
||||||
|
get "periodic_task_groups/destroy"
|
||||||
|
|
||||||
get "order_comments/new"
|
get "order_comments/new"
|
||||||
|
|
||||||
get "comments/new"
|
get "comments/new"
|
||||||
|
@ -70,6 +72,8 @@ Foodsoft::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :periodic_task_groups, only: [:destroy]
|
||||||
|
|
||||||
resources :messages, :only => [:index, :show, :new, :create]
|
resources :messages, :only => [:index, :show, :new, :create]
|
||||||
|
|
||||||
namespace :foodcoop do
|
namespace :foodcoop do
|
||||||
|
|
Loading…
Reference in a new issue