6880: added deletable? method and used to determine whether or not to show this butto...
[arvados.git] / apps / workbench / app / views / pipeline_templates / show.html.erb
1 <% if @object.editable? %>
2   <% content_for :tab_line_buttons do %>
3     <%= link_to(choose_projects_path(
4         id: "run-pipeline-button",
5         title: 'Choose project',
6         editable: true,
7         action_name: 'Choose',
8         action_href: pipeline_instances_path,
9         action_method: 'post',
10         action_data: {
11           'selection_param' => 'pipeline_instance[owner_uuid]',
12           'pipeline_instance[pipeline_template_uuid]' => @object.uuid,
13           'pipeline_instance[description]' => "Created at #{Time.now.localtime}" + (@object.name.andand.size.andand>0 ? " using the pipeline template *#{@object.name}*" : ""),
14           'success' => 'redirect-to-created-object',
15         }.to_json), {
16           class: "btn btn-primary btn-sm",
17           remote: true,
18           title: 'Run this pipeline'
19         }) do %>
20       <i class="fa fa-gear"></i> Run this pipeline
21     <% end %>
22   <% end %>
23 <% end %>
24
25 <%= render file: 'application/show.html.erb', locals: local_assigns %>