<%= content_tag('h2', h(@issue.subject)) %>
<%= render :partial => 'action_menu' %>
<%= avatar(@issue.author, :size => "40") %>
<%= h(@issue.tracker.name) %> #<%= @issue.id %>
<%= authoring @issue.created_on, @issue.author %>.
<% if @issue.created_on != @issue.updated_on %>
<%= l(:label_updated_time, time_tag(@issue.updated_on)) %>.
<% end %>
<% if @issue.description? %>
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
<%=l(:field_description)%>
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
<% end %>
<% if @issue.attachments.any? -%>
<%= link_to_attachments @issue %>
<% end -%>
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
<%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>
<%=l(:label_subtask_plural)%>
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
<% end %>
<% if authorize_for('issue_relations', 'new') || @issue.relations.present? %>
<%= render :partial => 'relations' %>
<% end %>
<% if @changesets.present? %>
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
<%= stylesheet_link_tag 'scm' %>
<%= javascript_include_tag 'context_menu' %>
<%= stylesheet_link_tag 'context_menu' %>
<%= stylesheet_link_tag 'context_menu_rtl' if l(:direction) == 'rtl' %>
<% end %>
<%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %>