annotate app/views/issues/show.rhtml @ 1452:d6b9fd02bb89 feature_36_js_refactoring

Deprecated develoment branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 11 Oct 2013 17:01:24 +0100
parents cbce1fd3b1b7
children
rev   line source
Chris@0 1 <%= render :partial => 'action_menu' %>
Chris@0 2
Chris@441 3 <h2><%= issue_heading(@issue) %></h2>
Chris@0 4
Chris@0 5 <div class="<%= @issue.css_classes %> details">
Chris@0 6 <%= avatar(@issue.author, :size => "50") %>
Chris@0 7
Chris@0 8 <div class="subject">
Chris@0 9 <%= render_issue_subject_with_tree(@issue) %>
Chris@0 10 </div>
Chris@0 11 <p class="author">
Chris@0 12 <%= authoring @issue.created_on, @issue.author %>.
Chris@0 13 <% if @issue.created_on != @issue.updated_on %>
Chris@0 14 <%= l(:label_updated_time, time_tag(@issue.updated_on)) %>.
Chris@0 15 <% end %>
Chris@0 16 </p>
Chris@0 17
Chris@0 18 <table class="attributes">
Chris@0 19 <tr>
Chris@0 20 <th class="status"><%=l(:field_status)%>:</th><td class="status"><%= @issue.status.name %></td>
Chris@0 21 <th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
Chris@0 22 </tr>
Chris@0 23 <tr>
Chris@0 24 <th class="priority"><%=l(:field_priority)%>:</th><td class="priority"><%= @issue.priority.name %></td>
Chris@0 25 <th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
Chris@0 26 </tr>
Chris@0 27 <tr>
Chris@0 28 <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
Chris@0 29 <th class="progress"><%=l(:field_done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
Chris@0 30 </tr>
Chris@0 31 <tr>
Chris@0 32 <th class="category"><%=l(:field_category)%>:</th><td class="category"><%=h @issue.category ? @issue.category.name : "-" %></td>
Chris@0 33 <% if User.current.allowed_to?(:view_time_entries, @project) %>
Chris@0 34 <th class="spent-time"><%=l(:label_spent_time)%>:</th>
chris@37 35 <td class="spent-time"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}) : "-" %></td>
Chris@0 36 <% end %>
Chris@0 37 </tr>
Chris@0 38 <tr>
Chris@0 39 <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
Chris@0 40 <% if @issue.estimated_hours %>
Chris@0 41 <th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
Chris@0 42 <% end %>
Chris@0 43 </tr>
Chris@0 44 <%= render_custom_fields_rows(@issue) %>
Chris@0 45 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
Chris@0 46 </table>
chris@37 47
chris@37 48 <% if @issue.description? || @issue.attachments.any? -%>
Chris@0 49 <hr />
Chris@119 50 <% if @issue.description? %>
Chris@119 51 <div class="contextual">
Chris@119 52 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
Chris@119 53 </div>
Chris@119 54
Chris@119 55 <p><strong><%=l(:field_description)%></strong></p>
Chris@119 56 <div class="wiki">
Chris@119 57 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
Chris@119 58 </div>
Chris@119 59 <% end %>
Chris@0 60 <%= link_to_attachments @issue %>
chris@37 61 <% end -%>
Chris@0 62
Chris@0 63 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
Chris@0 64
Chris@0 65 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
Chris@0 66 <hr />
Chris@0 67 <div id="issue_tree">
Chris@0 68 <div class="contextual">
Chris@0 69 <%= 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) %>
Chris@0 70 </div>
Chris@0 71 <p><strong><%=l(:label_subtask_plural)%></strong></p>
Chris@0 72 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
Chris@0 73 </div>
Chris@0 74 <% end %>
Chris@0 75
Chris@441 76 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
Chris@0 77 <hr />
Chris@0 78 <div id="relations">
Chris@0 79 <%= render :partial => 'relations' %>
Chris@0 80 </div>
Chris@0 81 <% end %>
Chris@0 82
Chris@0 83 </div>
Chris@0 84
Chris@0 85 <% if @changesets.present? %>
Chris@0 86 <div id="issue-changesets">
Chris@0 87 <h3><%=l(:label_associated_revisions)%></h3>
Chris@0 88 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
Chris@0 89 </div>
Chris@0 90 <% end %>
Chris@0 91
Chris@0 92 <% if @journals.present? %>
Chris@0 93 <div id="history">
Chris@0 94 <h3><%=l(:label_history)%></h3>
Chris@0 95 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
Chris@0 96 </div>
Chris@0 97 <% end %>
Chris@0 98
Chris@0 99
Chris@0 100 <div style="clear: both;"></div>
Chris@441 101 <%= render :partial => 'action_menu' %>
Chris@0 102
Chris@0 103 <div style="clear: both;"></div>
Chris@0 104 <% if authorize_for('issues', 'edit') %>
Chris@0 105 <div id="update" style="display:none;">
Chris@0 106 <h3><%= l(:button_update) %></h3>
Chris@0 107 <%= render :partial => 'edit' %>
Chris@0 108 </div>
Chris@0 109 <% end %>
Chris@0 110
Chris@0 111 <% other_formats_links do |f| %>
Chris@0 112 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
Chris@0 113 <%= f.link_to 'PDF' %>
Chris@0 114 <% end %>
Chris@0 115
Chris@0 116 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
Chris@0 117
Chris@0 118 <% content_for :sidebar do %>
Chris@0 119 <%= render :partial => 'issues/sidebar' %>
Chris@0 120
Chris@0 121 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
Chris@0 122 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
Chris@0 123 <div id="watchers">
Chris@0 124 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
Chris@0 125 </div>
Chris@0 126 <% end %>
Chris@0 127 <% end %>
Chris@0 128
Chris@0 129 <% content_for :header_tags do %>
Chris@0 130 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
Chris@0 131 <%= stylesheet_link_tag 'scm' %>
Chris@0 132 <%= javascript_include_tag 'context_menu' %>
Chris@0 133 <%= stylesheet_link_tag 'context_menu' %>
Chris@14 134 <%= stylesheet_link_tag 'context_menu_rtl' if l(:direction) == 'rtl' %>
Chris@0 135 <% end %>
Chris@0 136 <div id="context-menu" style="display: none;"></div>
Chris@14 137 <%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %>