修改isuue显示界面

附件显示形式
国际化
部分样式调整
dev_repository_hjq
huang 10 years ago
parent 287c767c86
commit 33abbaffe1

@ -70,11 +70,11 @@ module IssuesHelper
#获取跟踪类型
#REDO:时间紧需要优化,两个方法可以综合成一个
def get_issue_type(value)
if value == "缺陷"
if value == "缺陷" || value == 1
class_type = "red_btn_cir ml10"
elsif value == "功能"
elsif value == "功能" || value == 2
class_type = "blue_btn_cir ml10"
elsif value == "支持"
elsif value == "支持" || value == 3
class_type = "green_btn_cir ml10"
else
class_type = "orange_btn_cir ml10"
@ -82,11 +82,11 @@ module IssuesHelper
end
def get_issue_typevalue(value)
if value == "缺陷"
if value == "缺陷" || value == 1
assign = "缺陷"
elsif value == "功能"
elsif value == "功能" || value == 2
assign = "功能"
elsif value == "支持"
elsif value == "支持" || value == 3
assign = "支持"
else
assign = "任务"

@ -60,7 +60,7 @@
<% if defined?(thumbnails) && thumbnails %>
<% images = attachments.select(&:thumbnailable?) %>
<% if images.any? %>
<div class="thumbnails">
<div class="pro_pic mb10" width="100" height="73">
<% images.each do |attachment| %>
<div><%= thumbnail_tag(attachment) %></div>
<% end %>

@ -1,18 +1,11 @@
<div class="contextual">
<!--added by huang-->
<!--added by huang-->
<% if (@issue.author == User.current) || (User.current.admin?) %>
<!--end-->
<%= link_to l(:button_update), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
<%#= watcher_link(@issue, User.current) %>
<%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
<% if (@issue.author == User.current) || (User.current.admin?) %>
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? %>
<% else %>
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
<% end %>
<%= watcher_link(@issue, User.current) %>
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
</div>
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? %>
<% end %>

@ -1,50 +1,77 @@
<%= labelled_fields_for :issue, @issue do |f| %>
<div class="newpro_box">
<fieldset class="collapsible" >
<legend onclick="toggleFieldset(this);" ><strong><%= l(:label_change_properties) %></strong></legend>
<ul class="fl" >
<li>
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
<% else %>
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
<% end %>
</li>
<div class="cl"></div>
<li><label class="label" ><span class="c_red f12">*</span>&nbsp;优先级&nbsp;&nbsp;:&nbsp;</label>
<% if @issue.safe_attribute? 'priority_id' %>
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p>
<% end %>
</li>
<div class="cl"></div>
<li><% if @issue.safe_attribute? 'assigned_to_id' %>
<p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') %></p>
<% end %>
</li>
<div class="cl"></div>
<li><% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
<%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
new_project_version_path(@issue.project),
:remote => true,
:method => 'get',
:title => l(:label_version_new),
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
</p>
<% end %>
</li>
<div class="cl"></div>
</ul>
<ul class="fl ml90">
<li><% if @issue.safe_attribute? 'start_date' %>
<p><%= f.text_field :start_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('start_date') %><%= calendar_for('issue_start_date','start_date') if @issue.leaf? %></p>
<% end %>
</li>
<div class="cl"></div>
<li><% if @issue.safe_attribute? 'due_date' %>
<p><%= f.text_field :due_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('due_date') %><%= calendar_for('issue_due_date','start_date') if @issue.leaf? %></p>
<% end %>
</li>
<div class="cl"></div>
<li><% if @issue.safe_attribute? 'estimated_hours' %>
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
<% end %>
</li>
<div class="cl"></div>
<li><label class="label02" >&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label>
<select id="" name="" class="w150" >
<option value="0" >0 %</option>
<option value="10">10 %</option>
<option value="20">20 %</option>
<option value="30">30 %</option>
<option value="40">40 %</option>
<option value="50">50 %</option>
<option value="60">60 %</option>
<option value="70">70 %</option>
<option value="80">80 %</option>
<option value="90">90 %</option>
<option value="100">100 %</option>
</select>
</li>
<div class="cl"></div>
</ul>
</fieldset>
</div><!--newpro_box end-->
<fieldset class="collapsible collapsed" style="padding-left: 50px;">
<legend onclick="toggleFieldset(this);" style="font-size:12px;"><strong><%= l(:label_change_properties) %></strong></legend>
<div class="splitcontent" style="display: block;">
<div class="splitcontentleft">
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
<% else %>
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
<% end %>
<% if @issue.safe_attribute? 'priority_id' %>
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p>
<% end %>
<% if @issue.safe_attribute? 'assigned_to_id' %>
<p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') %></p>
<% end %>
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
<%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
new_project_version_path(@issue.project),
:remote => true,
:method => 'get',
:title => l(:label_version_new),
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
</p>
<% end %>
</div>
<div class="splitcontentright">
<% if @issue.safe_attribute? 'start_date' %>
<p><%= f.text_field :start_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('start_date') %><%= calendar_for('issue_start_date','start_date') if @issue.leaf? %></p>
<% end %>
<% if @issue.safe_attribute? 'due_date' %>
<p><%= f.text_field :due_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('due_date') %><%= calendar_for('issue_due_date','start_date') if @issue.leaf? %></p>
<% end %>
<% if @issue.safe_attribute? 'estimated_hours' %>
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
<% end %>
<script type="text/javascript">
// window.onload=function(){
// var img=$("#issue_due_date").next("img");
@ -109,7 +136,6 @@
</div>
</div>
</fieldset>
<% if @issue.safe_attribute? 'custom_field_values' %>
<%= render :partial => 'issues/form_custom_fields' %>

@ -1,13 +1,9 @@
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
<%= error_messages_for 'issue', 'time_entry' %>
<%= render :partial => 'conflict' if @conflict %>
<div class="box">
<% if @edit_allowed || !@allowed_statuses.empty? %>
<fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
<div id="all_attributes">
<%= render :partial => 'form', :locals => {:f => f} %>
</div>
</fieldset>
<% end %>
<fieldset><legend><%= l(:field_notes) %></legend>

@ -7,8 +7,59 @@
}
</script>
<%= labelled_fields_for :issue, @issue do |f| %>
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
<div class="newpro_box">
<ul >
<li ><label class="label" ><span class="c_red f12">*</span>&nbsp;跟踪&nbsp;&nbsp;:&nbsp;</label>
<select name="" class="w150">
<option value="0">缺陷</option>
<option value="0">功能</option>
<option value="0">支持</option>
<option value="0">任务</option>
</select>
</li>
<li ><input class="ml30" type="checkbox" /><label class="fl ml5 mt3" >私有</label></li>
<div class="cl"></div>
<li><label class="label"><span class="c_red f12">*</span>&nbsp;主题&nbsp;&nbsp;:&nbsp;</label>
<input type="text" name="" class=" w583 " >
</li>
<div class="cl"></div>
<li><label class="label" ><span class="c_red f12">*</span>&nbsp;描述&nbsp;&nbsp;:&nbsp;</label>
<textarea name="" placeholder="最多3000个汉字(或6000个英文字符)" class=" w583 " ></textarea>
</li>
<div class="cl"></div>
<li><label class="label" ><span class="c_red f12">*</span>&nbsp;文件&nbsp;&nbsp;:&nbsp;</label>
<input type="file" class="c_grey w150 no_border"/>
<label class="c_grey">(最大文件大小: 50 MB)</label>
</li>
<div class="cl"></div>
</ul>
</div><!--newpro_box end-->
<div class="newpro_box">
<%= labelled_fields_for :issue, @issue do |f| %>
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
<ul>
<li>
<% if @issue.safe_attribute? 'tracker_id' %>
@ -21,27 +72,23 @@
%>
<% end %>
</li>
<li>
<% if @issue.safe_attribute? 'is_private' %>
<%= f.check_box :is_private, :no_label => true ,:class=> "ml30"%><label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
<% end %>
</li>
<div class="cl"></div>
<li>
<% if @issue.safe_attribute? 'project_id' %>
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
<% end %>
</li>
<!--<li>-->
<!--<%# if @issue.safe_attribute? 'project_id' %>-->
<%#= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %>
<!--<%# end %>-->
<!--</li>-->
<li>
<% if @issue.safe_attribute? 'subject' %>
<label class="label"><span class="c_red f12">*</span>&nbsp;主题&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :subject,
:size => 80,
:class => "w583",
:maxlength => 255,
:required => true,
:style => "font-size:small",
@ -67,23 +114,22 @@
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
<%= f.text_area :description,
:cols => 60,
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
:accesskey => accesskey(:edit),
:class => "w583",
:no_label => true %>
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
:accesskey => accesskey(:edit),
:class => "w583",
:no_label => true %>
<% end %>
<%= wikitoolbar_for 'issue_description' %>
<% end %>
</li>
<div class="cl"></div>
</ul>
<div id="attributes" class="attributes">
<%= render :partial => 'issues/attributes' %>
<div id="attributes">
<%= render :partial => 'issues/attributes' %>
</div>
</div>
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
<% end %>
</ul>

@ -1,41 +1,38 @@
<% reply_links = authorize_for('issues', 'edit') -%>
<% for journal in journals %>
<!-- modified by bai -->
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>" style=" word-wrap: break-word; word-break: break-all">
<!-- end -->
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></td>
<td>
<table width="580px" border="0">
<tr>
<!-- add by huang -->
<td colspan="1" valign="top"> <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> <div id="note-<%= journal.indice %>"></div></td>
<td><%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></td>
<!--end-->
</tr>
<tr>
<td colspan="2" width="580px" >
<p class="font_description">
<% if journal.details.any? %>
<span class="details"> <% details_to_strings(journal.details).each do |string| %>
<%= string %>
<% end %> </span>
<% end %>
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
</p></td>
</tr>
<tr>
<td align="left"><span class="font_lighter"> <%= format_time journal.created_on %></span></td>
<td width="200" align="right" class="a"></td>
</tr>
</table></td>
</tr>
</table>
<div class="ping_C mb10">
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(journal.user), :class => "ping_dispic",:width => 46,:height => 46) %></a></div>
<div class="ping_discon">
<div class="ping_distop">
<a href="#" target="_blank" class="c_blue fb fl mb10 "><%= journal.user %></a><span class="c_grey fr"><%= format_time journal.created_on %></span>
<div class="cl"></div>
<p>
<% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %>
<%= string %>
<% end %> </span>
<% end %>
</p>
</div>
<div class="ping_disfoot"><%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
<div class="cl"></div>
<div class="recall" >
<div class="recall_head"><a href="#" target="_blank"><img src="images/project/pic_01.jpg" width="30" height="30" /></a></div>
<div class="recall_con">
<p><%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
<span class="c_grey fl"><%= format_time journal.created_on %></span>
</div>
<div class="cl"></div>
</div><!---recall end-->
<!---recall end-->
</div>
<div class="cl"></div>
</div>
</div>
<div class="line_under"></div>
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
<% end %>

File diff suppressed because it is too large Load Diff

@ -24,7 +24,7 @@
{
$('#light').css('display','none');
$('#fade').css('display','none');
//三种类型之所以分三个页面写,防备后面会有新的功能增加,便于扩展
//
if($("#development_group").attr("checked") == "checked"){
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team)))%>")
$("#project_memu").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>');

@ -911,6 +911,7 @@ zh:
button_copy_and_follow: 复制并转到新问题
button_annotate: 追溯
button_update: 更新
button_edit: 编辑
button_configure: 配置
button_quote: 引用
button_duplicate: 副本

@ -81,7 +81,7 @@ a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;}
.pro_info_box{ margin-left:60px; background:#f0fbff; height:80px; padding:10px 0;}
.pro_info_box ul{}
.pro_info_box ul li{ margin-bottom:10px;}
.pro_info_p{ color:#0781b4; float:left; }
.pro_info_p{ color:#0781b4; float:left; width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;}
/****翻页***/
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }

Loading…
Cancel
Save