Add type information to action links

pull/1782/head
Hagen Schink 10 years ago
parent 6529defe85
commit 787f62d177
  1. 3
      lib/api/v3/work_packages/work_package_representer.rb

@ -75,6 +75,7 @@ module API
link :log_time do
{
href: new_work_package_time_entry_path(represented.model),
type: 'text/html',
title: "Log time on #{represented.subject}"
} if current_user_allowed_to(:log_time, represented.model)
end
@ -82,6 +83,7 @@ module API
link :duplicate do
{
href: new_project_work_package_path(represented.model.project, copy_from: represented.model),
type: 'text/html',
title: "Duplicate #{represented.subject}"
} if current_user_allowed_to(:add_work_packages, represented.model)
end
@ -89,6 +91,7 @@ module API
link :move do
{
href: new_work_package_move_path(represented.model),
type: 'text/html',
title: "Move #{represented.subject}"
} if current_user_allowed_to(:move_work_packages, represented.model)
end

Loading…
Cancel
Save