<% if course && tag_list && tag_list.empty? == false%>
<span class="files_tag_icon" >
          <a  title=""
              onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','','<%= @q%>','<%= course.id%>');"
              >全部</a></span>
<% end %>
<% unless tag_list.nil?%>
    <% tag_list.each do |k,v|%>
        <% if tag_name && tag_name == k%>
            <!-- 鼠标不能移动是因为 href="javascript:void(0);"导致的 -->
            <span>    <a  class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%> x<%= v%></a></span>
        <% else%>
        <span class="files_tag_icon" >
          <a  title="双击可编辑"
              onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"
              ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%> x<%= v%></a></span>
        <% end%>
    <% end%>
<% end%>