Merge branch 'master' of github.com:cantino/huginn

Andrew Cantino vor 9 Jahren
Ursprung
Commit
e216686cf8
3 geänderte Dateien mit 16 neuen Zeilen und 2 gelöschten Zeilen
  1. 7 0
      app/views/agents/_mini_action_menu.html.erb
  2. 5 1
      app/views/events/index.html.erb
  3. 4 1
      app/views/events/show.html.erb

+ 7 - 0
app/views/agents/_mini_action_menu.html.erb

@@ -0,0 +1,7 @@
1
+
2
+<div class="btn-group">
3
+  <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
4
+    <span class="caret"></span>
5
+  </button>
6
+  <%= render 'agents/action_menu', agent: agent, return_to: (defined?(return_to) && return_to) || request.path %>
7
+</div>

+ 5 - 1
app/views/events/index.html.erb

@@ -3,7 +3,11 @@
3 3
     <div class='col-md-12'>
4 4
       <div class="page-header">
5 5
         <h2>
6
-          Your Events <%= @agent && "from #{@agent.name}" %>
6
+          Your Events
7
+          <% if @agent %>
8
+            from <%= @agent.name %>
9
+            <%= render 'agents/mini_action_menu', agent: @agent, return_to:   request.path %>
10
+          <% end %>
7 11
         </h2>
8 12
       </div>
9 13
 

+ 4 - 1
app/views/events/show.html.erb

@@ -2,7 +2,10 @@
2 2
   <div class='row'>
3 3
     <div class='col-md-12'>
4 4
       <div class="page-header">
5
-        <h2>Event from <%= @event.agent.name %></h2>
5
+        <h2>
6
+          Event from <%= @event.agent.name %>
7
+          <%= render 'agents/mini_action_menu', agent: @event.agent, return_to: event_path(@event) %>
8
+        </h2>
6 9
       </div>
7 10
 
8 11
       <p>