socialforge/app/views/issues/show.html.erb

107 lines
4.5 KiB
Plaintext
Raw Normal View History

2015-12-06 15:03:12 +08:00
<%= content_for(:header_tags) do %>
2015-12-14 17:13:57 +08:00
<%= import_ke(enable_at: true) %>
2015-12-06 15:03:12 +08:00
<% end %>
2015-03-19 16:25:18 +08:00
<div class="project_r_h">
2015-04-11 13:46:49 +08:00
<h2 class="project_h2"><%= l(:label_issue_edit) %></h2>
2015-03-19 16:25:18 +08:00
</div>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
2015-04-15 20:05:21 +08:00
<div class="pro_page_box">
<div class="pro_page_top break_word">
<%= link_to "#{@issue.project.name}"+">", project_issues_path(@issue.project) %>
<a href="javascript:void(0)"><%= "#" + @issue.id.to_s %></a>
</div>
2015-04-15 20:05:21 +08:00
<div class="problem_main">
<div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
</div>
2015-09-24 17:03:43 +08:00
2015-04-15 20:05:21 +08:00
<div class="talk_txt fl">
<p class="pro_page_tit" style="word-break:break-all;">
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>' title="<%= get_issue_type(@issue.tracker_id)[1] %>"></span>
2015-08-01 17:45:40 +08:00
<span style="padding-left: 5px;"><%= @issue.subject %></span>
2015-07-07 16:25:59 +08:00
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span>
2015-04-15 20:05:21 +08:00
</p><br/>
2015-04-09 20:47:09 +08:00
<div class="cl"></div>
2015-09-24 17:03:43 +08:00
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
2015-04-15 20:05:21 +08:00
</div>
2015-09-24 17:03:43 +08:00
2015-04-15 20:05:21 +08:00
<!--talk_txt end-->
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
<div class="cl"></div>
2015-09-24 17:03:43 +08:00
<% if @issue.description? || @issue.attachments.any? -%>
2015-10-08 11:34:12 +08:00
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
2015-04-15 20:05:21 +08:00
<% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
<% end %>
2015-09-24 17:03:43 +08:00
</div>
<% end -%>
<div class="pro_pic_box mb10">
<a href="javascript:void(0)" class="link_img fl">
<!--显示附件、图片-->
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
2015-04-15 20:05:21 +08:00
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
2015-09-24 17:03:43 +08:00
</div><!--pro_pic_box end-->
<div class="cl"></div>
2015-09-24 17:03:43 +08:00
<!--属性-->
<%= render :partial => 'attributes_show' %>
<!--pro_info_box 属性 end-->
2015-04-15 20:05:21 +08:00
2015-09-24 17:03:43 +08:00
<%# 该应用是对issue主题内容的引用对应:to => 'journals#new %>
<!--<div class="cl"></div>-->
<!--<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>-->
<div class="cl"></div>
</div>
2015-04-15 20:05:21 +08:00
<!--problem_main end-->
<div style="clear: both;"></div>
2015-09-24 17:03:43 +08:00
<!--留言-->
2015-04-15 20:05:21 +08:00
<% if @issue.editable? %>
2015-04-15 16:38:39 +08:00
<div id="update">
<%= render :partial => 'edit' %>
</div>
<p style="padding-top: 5px"></p>
2015-09-24 17:03:43 +08:00
<%#--引用时不能修改,剥离出引用内容--%>
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();issue_journal_kind_reply.sync();$('#issue-form').submit();">
<%= l(:button_submit) %>
</a>
2015-04-15 16:38:39 +08:00
<% end %>
<%#= submit_tag l(:button_submit) %>
2015-04-16 14:13:12 +08:00
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
</div>
2015-03-19 16:25:18 +08:00
<% if @changesets.present? %>
<div id="issue-changesets">
2015-04-15 20:05:21 +08:00
<h3><%= l(:label_associated_revisions) %></h3>
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
</div>
2015-03-19 16:25:18 +08:00
<% end %>
2015-09-24 17:03:43 +08:00
2015-04-15 20:05:21 +08:00
<div class="cl"></div>
2015-03-19 16:25:18 +08:00
<% other_formats_links do |f| %>
2015-04-15 20:05:21 +08:00
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<%= f.link_to 'PDF' %>
2015-03-19 16:25:18 +08:00
<% end %>
<% content_for :sidebar do %>
2015-04-15 20:05:21 +08:00
<%= render :partial => 'issues/sidebar' %>
<br>
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
(@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
<div id="watchers">
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
</div>
<% end %>
2015-03-19 16:25:18 +08:00
<% 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}") %>
<% end %>
<%= context_menu issues_context_menu_path %>