@@ -5,7 +5,7 @@ |
||
5 | 5 |
<h2>Agent Event Flow</h2> |
6 | 6 |
</div> |
7 | 7 |
<div class="btn-group"> |
8 |
- <%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, agents_path, class: "btn btn-default" %> |
|
8 |
+ <%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, (params[:scenario_id] ? scenario_path(params[:scenario_id]) : agents_path), class: "btn btn-default" %> |
|
9 | 9 |
</div> |
10 | 10 |
|
11 | 11 |
<div class='digraph'> |
@@ -21,7 +21,7 @@ |
||
21 | 21 |
<div class="col-md-8"> |
22 | 22 |
<div class="form-group"> |
23 | 23 |
<%= f.label :description, "Optional Description" %> |
24 |
- <%= f.text_area :description, :rows => 10, :class => 'form-control', :placeholder => "Optionally describe what this set of Agents will do" %> |
|
24 |
+ <%= f.text_area :description, :rows => 10, :class => 'form-control', :placeholder => "Optionally describe what this Scenario will do. If this will be public, you should also include some contact information." %> |
|
25 | 25 |
</div> |
26 | 26 |
|
27 | 27 |
<div class="checkbox"> |
@@ -11,21 +11,21 @@ |
||
11 | 11 |
|
12 | 12 |
<% if @scenario.public? %> |
13 | 13 |
<p> |
14 |
- This Scenario is public. You can <%= link_to "download and share your export file", export_scenario_path(@scenario) %>, or give out this URL: |
|
14 |
+ This Scenario is public. You can <%= link_to "download and share your export file", export_scenario_path(@scenario, :format => :json) %>, or give out this URL: |
|
15 | 15 |
</p> |
16 | 16 |
|
17 | 17 |
<form onsubmit='return false;'> |
18 |
- <input type='text' class='form-control' value='<%= export_scenario_url(@scenario) %>' onclick="return this.select();"/> |
|
18 |
+ <input type='text' class='form-control' value='<%= export_scenario_url(@scenario, :format => :json) %>' onclick="return this.select();"/> |
|
19 | 19 |
</form> |
20 | 20 |
<% else %> |
21 |
- This Scenario is not public. You can share it by <%= link_to "downloading and sharing your export file", export_scenario_path(@scenario) %>. |
|
21 |
+ This Scenario is not public. You can share it by <%= link_to "downloading and sharing your export file", export_scenario_path(@scenario, :format => :json) %>. |
|
22 | 22 |
<% end %> |
23 | 23 |
|
24 | 24 |
<hr> |
25 | 25 |
|
26 | 26 |
<div class="row"> |
27 | 27 |
<div class="col-md-12"> |
28 |
- <%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, scenarios_path, class: "btn btn-default" %> |
|
28 |
+ <%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, scenario_path(@scenario), class: "btn btn-default" %> |
|
29 | 29 |
</div> |
30 | 30 |
</div> |
31 | 31 |
</div> |
@@ -12,9 +12,9 @@ |
||
12 | 12 |
<div class="btn-group"> |
13 | 13 |
<%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, scenarios_path, class: "btn btn-default" %> |
14 | 14 |
<%= link_to '<span class="glyphicon glyphicon-random"></span> View Diagram'.html_safe, diagram_agents_path(:scenario_id => @scenario.to_param), class: "btn btn-default" %> |
15 |
- <%= link_to '<span class="glyphicon glyphicon-edit"></span> Edit'.html_safe, edit_scenario_path(@scenario), class: "btn btn-default" %> |
|
16 |
- <%= link_to '<span class="glyphicon glyphicon-share-alt"></span> Share'.html_safe, share_scenario_path(@scenario), class: "btn btn-default" %> |
|
17 |
- <%= link_to '<span class="glyphicon glyphicon-trash"></span> Delete'.html_safe, 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" %> |
|
15 |
+ <%= link_to '<span class="glyphicon glyphicon-edit"></span> Edit Scenario'.html_safe, edit_scenario_path(@scenario), class: "btn btn-default" %> |
|
16 |
+ <%= link_to '<span class="glyphicon glyphicon-share-alt"></span> Share Scenario'.html_safe, share_scenario_path(@scenario), class: "btn btn-default" %> |
|
17 |
+ <%= link_to '<span class="glyphicon glyphicon-trash"></span> Delete Scenario'.html_safe, 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" %> |
|
18 | 18 |
</div> |
19 | 19 |
</div> |
20 | 20 |
</div> |