Skip to content

Commit

Permalink
Add gtl_button_cell to ServiceTemplateDecorator for valid/invalid Ser…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Jan 28, 2020
1 parent 7862288 commit 520a910
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/decorators/service_template_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ def fileicon
def quadicon
fileicon ? {:fileicon => fileicon} : {:fonticon => fonticon}
end

def gtl_button_cell(row_id, label, title, function)
{
:is_button => true,
:text => label,
:title => template_valid? ? title : _("This Service cannot be ordered"),
:disabled => !template_valid?,
:onclick => "#{function}(\"#{row_id}\");"
}
end
end

0 comments on commit 520a910

Please sign in to comment.