1
0

show.html.erb 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <% content_for :title, @scenario.name -%>
  2. <div class='container'>
  3. <div class='row'>
  4. <div class='col-md-12'>
  5. <div class="page-header">
  6. <h2><%= scenario_label(@scenario) %> <%= "Public" if @scenario.public? %> Scenario</h2>
  7. </div>
  8. <% if @scenario.description.present? %>
  9. <blockquote><%= markdown(@scenario.description) %></blockquote>
  10. <% end %>
  11. <%= render 'agents/table', :return_to => scenario_path(@scenario) %>
  12. <br/>
  13. <div class="btn-group">
  14. <%= link_to icon_tag('glyphicon-chevron-left') + ' Back', scenarios_path, class: "btn btn-default" %>
  15. <%= link_to icon_tag('glyphicon-plus') + ' New Agent', new_agent_path(scenario_id: @scenario.id, return: request.path), class: "btn btn-default" %>
  16. <%= link_to icon_tag('glyphicon-random') + ' View Diagram', scenario_diagram_path(@scenario), class: "btn btn-default" %>
  17. <%= link_to icon_tag('glyphicon-edit') + ' Edit', edit_scenario_path(@scenario), class: "btn btn-default" %>
  18. <% if @scenario.source_url.present? %>
  19. <%= link_to icon_tag('glyphicon-refresh') + ' Update', new_scenario_imports_path(url: @scenario.source_url), class: "btn btn-default" %>
  20. <% end %>
  21. <%= link_to icon_tag('glyphicon-share-alt') + ' Share', share_scenario_path(@scenario), class: "btn btn-default" %>
  22. <%= link_to icon_tag('glyphicon-trash') + ' Delete', '#', data: { toggle: 'modal', target: "#confirm-scenario-deletion-#{@scenario.id}"}, class: "btn btn-default" %>
  23. <%= link_to icon_tag('glyphicon-play') + 'Enable all Agents', '#', data: { toggle: 'modal', target: "#enable-disable-agents"}, class: "btn btn-default", id: "enable-all" %>
  24. <%= link_to icon_tag('glyphicon-pause') + 'Disable all Agents', '#', data: { toggle: 'modal', target: "#enable-disable-agents"}, class: "btn btn-default", id: "disable-all" %>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <%= render 'scenarios/confirm_deletion_modal', scenario: @scenario %>
  30. <%= render 'scenarios/enable_agents_modal', scenario: @scenario %>