Fixed some links in tasks module.
This commit is contained in:
parent
0e4b6107ba
commit
be321798a7
4 changed files with 5 additions and 4 deletions
|
@ -56,6 +56,7 @@ class TasksController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
Task.find(params[:id]).destroy
|
Task.find(params[:id]).destroy
|
||||||
|
flash[:notice] = "Aufgabe wurde gelöscht"
|
||||||
redirect_to :action => "index"
|
redirect_to :action => "index"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
- done = task.done ? " done" : ""
|
- done = task.done ? " done" : ""
|
||||||
%tr{:class => cycle('even','odd', :name => "tasks") + done }
|
%tr{:class => cycle('even','odd', :name => "tasks") + done }
|
||||||
%td= format_date(task.due_date) unless task.due_date.nil?
|
%td= format_date(task.due_date) unless task.due_date.nil?
|
||||||
%td= link_to task.name, :controller => "tasks", :action => "show", :id => task
|
%td= link_to task.name, task_path(task)
|
||||||
%td
|
%td
|
||||||
- unless task.users.empty?
|
- unless task.users.empty?
|
||||||
- owner = Array.new
|
- owner = Array.new
|
||||||
|
|
|
@ -30,6 +30,6 @@
|
||||||
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= link_to "Bearbeiten", :action => "edit", :id => @task
|
= link_to "Bearbeiten", edit_task_path(@task)
|
||||||
|
|
|
|
||||||
= link_to "Löschen", {:action => "destroy", :id => @task}, :method => "post", :confirm => "Die Aufgabe wirklich löschen?"
|
= link_to "Löschen", task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?"
|
||||||
|
|
|
@ -28,7 +28,7 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
# Foodcoop orga
|
# Foodcoop orga
|
||||||
map.resources :invites, :only => [:new, :create]
|
map.resources :invites, :only => [:new, :create]
|
||||||
map.resources :tasks,
|
map.resources :tasks,
|
||||||
:collection => {:user => :get, :archive => :get}
|
:collection => {:user => :get, :archive => :get, :workgroup => :get}
|
||||||
map.resources :messages, :only => [:index, :show, :new, :create],
|
map.resources :messages, :only => [:index, :show, :new, :create],
|
||||||
:member => { :reply => :get, :user => :get, :group => :get }
|
:member => { :reply => :get, :user => :get, :group => :get }
|
||||||
map.namespace :foodcoop do |foodcoop|
|
map.namespace :foodcoop do |foodcoop|
|
||||||
|
|
Loading…
Reference in a new issue