show.html.erb 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <div class='container'>
  2. <div class='row'>
  3. <div class='col-md-12'>
  4. <div class="page-header">
  5. <h2><%= scenario_label(@scenario) %> <%= "Public" if @scenario.public? %> Scenario</h2>
  6. </div>
  7. <% if @scenario.description.present? %>
  8. <blockquote><%= markdown(@scenario.description) %></blockquote>
  9. <% end %>
  10. <%= render 'agents/table', :returnTo => scenario_path(@scenario) %>
  11. <br/>
  12. <div class="btn-group">
  13. <%= link_to icon_tag('glyphicon-chevron-left') + ' Back', scenarios_path, class: "btn btn-default" %>
  14. <%= link_to icon_tag('glyphicon-plus') + ' New Agent', new_agent_path(scenario_id: @scenario.id), class: "btn btn-default" %>
  15. <%= link_to icon_tag('glyphicon-random') + ' View Diagram', scenario_diagram_path(@scenario), class: "btn btn-default" %>
  16. <%= link_to icon_tag('glyphicon-edit') + ' Edit', edit_scenario_path(@scenario), class: "btn btn-default" %>
  17. <% if @scenario.source_url.present? %>
  18. <%= link_to icon_tag('glyphicon-refresh') + ' Update', new_scenario_imports_path(url: @scenario.source_url), class: "btn btn-default" %>
  19. <% end %>
  20. <%= link_to icon_tag('glyphicon-share-alt') + ' Share', share_scenario_path(@scenario), class: "btn btn-default" %>
  21. <%= link_to icon_tag('glyphicon-trash') + ' Delete', scenario_path(@scenario), method: :delete, data: { confirm: "This will remove the '#{@scenario.name}' Scenerio from all Agents and delete it. Are you sure?" }, class: "btn btn-default" %>
  22. </div>
  23. </div>
  24. </div>
  25. </div>