OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/lib/widget/controls/delete.rb

25 lines
962 B

class Widget::Controls::Delete < Widget::Base
def render
return "" if @query.new_record?
button = link_to content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")), "#",
:class => 'button secondary',
14 years ago
:id => 'query-icon-delete',
:title => l(:button_delete)
popup = content_tag :div, :id => "delete_form", :class => "button_form" do
question = content_tag :p, l(:label_really_delete_question)
options = content_tag :p do
delete_button = content_tag :span do
span = content_tag :em do
l(:button_delete)
end
end
opt1 = link_to delete_button, url_for(:action => 'delete', :id => @query.id), :class => "button apply"
14 years ago
opt2 = link_to l(:button_cancel), "#", :id => "query-icon-delete-cancel", :class => 'icon icon-cancel'
opt1 + opt2
end
14 years ago
question + options
end
14 years ago
button + popup
end
end