  <% the_current_user = current_user%>
  
        <div class="dropdown hidden-print pull-right" style="margin-top: 7px;">
          <button class="dropdown-toggle btn btn-sm btn-light" type="button" id="actionMenu" data-toggle="dropdown" aria-haspopup="true"  data-bs-toggle="dropdown" aria-expanded="false">
            <i class="fa fa-large fa-ellipsis-v" aria-hidden="true"></i>
          </button>
          <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="actionMenu">
            <% if (@build.is_parallel && @build.incomplete?) %>
              <li><a href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/wait')">
                  <label class="dropdown-menu-icon"><i class="fa fa-hourglass-half " aria-hidden="true"></i></label>
                  <%= I18n.t(:delay_completion) %> </a></li>
              <li><a href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/refresh_ui_test_status')">
                  <label class="dropdown-menu-icon"><i class="fa fa-refresh" aria-hidden="true"></i></label> <%= I18n.t(:ui_test_status) %> </a></li>
                  
                  <% if @build.ui_test_status == "OK" ||  @build.ui_test_status == "Failed" %>
                  <li><a  id="complete_build_action" href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/complete-build')"><label class="dropdown-menu-icon"><i class="fa fa-hand-paper-o" aria-hidden="true"></i></label> <%= I18n.t(:complete) %>
                  </a></li>                    
                  <% end %>
            <% end %>

            <li><a href="javascript:void(0);" class="dropdown-item" onclick="edit_summary();" id="add_summary_link">
              <label class="dropdown-menu-icon"><i class="fa fa-sticky-note-o" aria-hidden="true"></i></label>
              <% if @build.summary.nil? || @build.summary.empty? %> <%= I18n.t(:add_summary) %>
              <% else %> <%= I18n.t(:edit_summary) %>
              <% end %></a></li>
                
            <li><a id="validate_build_action" <% unless @build.is_invalid %>style="display:none;"<% end%> href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/validate')"> <label class="dropdown-menu-icon"><i class="fa fa-flag" aria-hidden="true"></i></label> <%= I18n.t(:validate) %>
                </a></li>

                <% if the_current_user && the_current_user.is_admin? %>
                  <li><a id="delete_build_action"  <% unless @build.is_invalid %>style="display:none;"<% end%> href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/delete')"><label class="dropdown-menu-icon"><i class="fa fa-trash-o" aria-hidden="true"></i></label> <%= I18n.t(:delete) %>
                    </a></li>
                <% end %>

                <li><a  id="invalidate_build_action" <% if @build.is_invalid %>style="display:none;"<% end%> href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/invalidate')"><label class="dropdown-menu-icon"><i class="fa fa-flag-o" aria-hidden="true"></i></label> <%= I18n.t(:invalidate) %>
                </a></li>
					
            <% if is_server_test_execution_capable?(@build) && @build.has_ui_test_execution? %>
                
                <li><a href="javascript:void(0);" class="dropdown-item"  onclick="$.getScript('/builds/<%= @build.id %>/disable_test_execution')"  id="disable_execution_link"
                 <% unless @session_test_execution_enabled %>style="display:none;"<% end %> >
                  <label class="dropdown-menu-icon"><i class="fa fa-laptop"></i></label> <%= I18n.t(:disable_execution) %></a> </li>
                          
                          
                <li><a href="javascript:void(0);" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id %>/enable_test_execution')" id="enable_execution_link" 
                   <% if @session_test_execution_enabled %>style="display:none;"<% end %> >
                  <label class="dropdown-menu-icon"><i class="fa fa-laptop"></i></label> <%= I18n.t(:enable_execution) %></a></li>
                                    
		        <% end %>

            <% if @build.successful?%>
            
                <li><a href="javascript:void(0);" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id %>/deploy')" id="deploy_link"                
                  <label class="dropdown-menu-icon"><i class="fa fa-server"></i></label> <%= I18n.t(:deploy) %></a></li>
            <% end %>

            <% if @build.incomplete? %>
                <% if the_current_user && (the_current_user.is_admin? || the_current_user == @build.triggered_by_user_id) %>
                    <li><hr class="dropdown-divider"></li>
                  <li> <a href="javascript:void(0)" class="dropdown-item" onclick="$.getScript('/builds/<%= @build.id%>/cancel')"><label class="dropdown-menu-icon"><i class="fa fa-stop" aria-hidden="true" style="color:red;"></i></label>
                      <%= I18n.t(:cancel) %></a></li>

                <% end %>
            <% end %>

          </ul>
        </div>