add back in clone operation that was lost in Bootstrap upgrade

Andrew Cantino 10 jaren geleden
bovenliggende
commit
e4f294145b
1 gewijzigde bestanden met toevoegingen van 24 en 18 verwijderingen
  1. 24 18
      app/views/agents/show.html.erb

+ 24 - 18
app/views/agents/show.html.erb

@@ -17,24 +17,30 @@
17 17
           <li><%= link_to '<span class="glyphicon glyphicon-chevron-left"></span> Back'.html_safe, agents_path %></li>
18 18
           <li><%= link_to '<span class="glyphicon glyphicon-pencil"></span> Edit'.html_safe, edit_agent_path(@agent) %></li>
19 19
 
20
-          <% if @agent.can_be_scheduled? || @agent.events.count > 0 %>
21
-            <li class="dropdown">
22
-              <a class="dropdown-toggle" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
23
-              <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
24
-                <% if @agent.can_be_scheduled? %>
25
-                  <li>
26
-                    <%= link_to '<span class="glyphicon glyphicon-refresh"></span> Run'.html_safe, run_agent_path(@agent, :return => "show"), method: :post, :tabindex => "-1" %>
27
-                  </li>
28
-                <% end %>
29
-
30
-                <% if @agent.can_create_events? && @agent.events.count > 0 %>
31
-                  <li>
32
-                    <%= link_to '<span class="glyphicon glyphicon-trash"></span> Delete all events'.html_safe, remove_events_agent_path(@agent), method: :delete, data: {confirm: 'Are you sure you want to delete ALL events for this Agent?'}, :tabindex => "-1" %>
33
-                  </li>
34
-                <% end %>
35
-              </ul>
36
-            </li>
37
-          <% end %>
20
+          <li class="dropdown">
21
+            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
22
+            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
23
+              <% if @agent.can_be_scheduled? %>
24
+                <li>
25
+                  <%= link_to '<span class="glyphicon glyphicon-refresh"></span> Run'.html_safe, run_agent_path(@agent, :return => "show"), method: :post, :tabindex => "-1" %>
26
+                </li>
27
+              <% end %>
28
+
29
+              <% if @agent.can_create_events? && @agent.events.count > 0 %>
30
+                <li>
31
+                  <%= link_to '<span class="glyphicon glyphicon-trash"></span> Delete all events'.html_safe, remove_events_agent_path(@agent), method: :delete, data: {confirm: 'Are you sure you want to delete ALL events for this Agent?'}, :tabindex => "-1" %>
32
+                </li>
33
+              <% end %>
34
+
35
+              <li>
36
+                <%= link_to '<span class="glyphicon glyphicon-plus"></span> Clone'.html_safe, new_agent_path(id: @agent), :tabindex => "-1" %>
37
+              </li>
38
+
39
+              <li>
40
+                <%= link_to '<span class="glyphicon glyphicon-remove"></span> Delete'.html_safe, agent_path(@agent), method: :delete, data: { confirm: 'Are you sure?' }, :tabindex => "-1" %>
41
+              </li>
42
+            </ul>
43
+          </li>
38 44
         </ul>
39 45
       </div>
40 46