Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject

This commit is contained in:
huang 2016-10-26 15:41:07 +08:00
commit 68ff26e3ef
7 changed files with 181 additions and 175 deletions

View File

@ -182,6 +182,7 @@ class VersionsController < ApplicationController
end
def edit
@@is_index = params[:is_index]
end
def update
@ -219,7 +220,11 @@ class VersionsController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_to settings_project_path(@project, :tab => 'versions')
}
format.js
format.js{
if @@is_index
redirect_to project_versions_path(@project)
end
}
format.api { render_api_ok }
end
else

View File

@ -13,11 +13,11 @@
</li>
<li class="mb10 clear">
<label class="fl">&nbsp;<%= l(:label_version_description) %>&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;"%>
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;", :id => "setting_version_description" %>
</li>
<li class="mb10 clear">
<label class=" fl">&nbsp;<%= l(:milestone_date_closed) %>&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height:28px;" %>
<%= f.text_field :effective_date, :size => 10, :readonly => true, :class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height:28px;", :id => "setting_version_effective_date" %>
<%= calendar_for('version_effective_date') %>
</li>
<li class="mb10 clear">
@ -54,7 +54,7 @@
<th><%= l("version_status_#{version.status}") %></th>
<th>
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %></a>
<%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %>
<%= delete_link_version version_path(version, :is_setting => true), :class=>"sy_btn_grey mr5", :remote => true %>
<% end %>
</th>
@ -93,6 +93,9 @@
function pro_st_show_ban1()
{
$("#pro_st_edit_ban1").toggle();
$("#setting_version_name").val("");
$("#setting_version_description").val("");
$("#setting_version_effective_date").val("");
}
function pro_st_show_ban()
{

View File

@ -1,167 +1,162 @@
<%= javascript_include_tag 'highcharts','highcharts-more' %>
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
<div class="container-big mb10">
<div class="project_r_h" style="width:970px;">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
<div class="button-rep">当前分支:<%= params[:branch] %></div>
<div class="cl"></div>
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>
<%= render :partial => "hightchars" %>
<div class="analysis-block mt10 mb40 f14">
<div class="flex mb10">
<div class="analysis-genral">
<p id="container_sqale_rating" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">质量等级</p>
<p class="fontBlue2 pr"><%= sqale_rating_status(@ha["sqale_rating"].to_i)[2] %>
<span class="f10 c_white analysis-genral-icon <%= sqale_rating_status(@ha["sqale_rating"].to_i)[1] %> borderRadius">
<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral" >
<p id="container_function_complexity" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">复杂度</p>
<p class="fontBlue2 pr"><%= @ha["function_complexity"].to_i == 0 ? 0 : @ha["function_complexity"] %>
<span class="f10 c_white analysis-genral-icon <%= complexity_status(@ha["function_complexity"].to_i)[1] %> borderRadius">
<%= @ha["function_complexity"].nil? ? "良好" : complexity_status(@ha["function_complexity"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral">
<p id="container_duplicated_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">代码重复度</p>
<p class="fontBlue2 pr"><%= @ha["duplicated_lines_density"].to_i == 0 ? 0 : @ha["duplicated_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["duplicated_lines_density"].nil? ? "良好" : duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral">
<p id="container_comment_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">注释率</p>
<p class="fontBlue2 pr"><%= @ha["comment_lines_density"].to_i == 0 ? 0 : @ha["comment_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= comment_lines_density_status(@ha["comment_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["comment_lines_density"].nil? ? "较低" : comment_lines_density_status(@ha["comment_lines_density"].to_i)[0] %>
</span>
</p>
</div>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">质量等级</span>
<span class="mr10 fontGrey2"><span class="c_red f18" style="margin-top:-5px; display:inline-block;"><%= @ha["sqale_rating"].nil? ? 0 : score_sqale_rating(@ha["sqale_rating"].to_i) %></span>/5分</span>
<span class="fontGrey2">可定性评价为:<span class="c_red">质量<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %></span></span></div>
<div class="analysis-block mt10 mb40 f14">
<div><span class="fontGrey3 mr30">技术债务</span>
<span class="w100 pInline">
<% if @ha["sqale_index"].to_i == 0 %>
0天
<% else %>
<%= /[0-9]*/.match(@ha["sqale_index"])[0] %>天
<%= / [0-9]*/.match(@ha["sqale_index"]).nil? ? "" : (/ [0-9]*/.match(@ha["sqale_index"]).to_s + "小时") %>
<% end %>
</span>
<span class="fontGrey2"><a class="linkBlue2" target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>
<div><span class="fontGrey3 mr30 fl">&nbsp;质量问题</span>
<span class="fontBlue2 w100 pInline">
<a class="fontBlue2 w70 pInline" target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false">
<%= @ha["violations"].to_i %>
</a>
</span><span class="fontGrey2">&nbsp;问题分类如下:</span></div>
<div class="ml90 mt15">
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=BLOCKER" class="fontBlue2 w70 pInline">
<%= @ha["blocker_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%=@ha["blocker_violations"].nil? ? 0 : statistics_result_percentage(@ha["blocker_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=CRITICAL" class="fontBlue2 w70 pInline">
<%= @ha["critical_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["critical_violations"].nil? ? 0 : statistics_result_percentage(@ha["critical_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MAJOR" class="fontBlue2 w70 pInline">
<%= @ha["major_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["major_violations"].nil? ? 0 : statistics_result_percentage(@ha["major_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MINOR" class="fontBlue2 w70 pInline">
<%= @ha["minor_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["minor_violations"].nil? ? 0 : statistics_result_percentage(@ha["minor_violations"].to_i, 3000) %>%;"></span></span></div>
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=INFO" class="fontBlue2 w70 pInline">
<%= @ha["info_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["info_violations"].nil? ? 0 : statistics_result_percentage(@ha["info_violations"].to_i, 3000) %>%;"></span></span></div>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">代码规模</span><span class="fontGrey2">可定性评价为:<span class="c_red"><%= @ha["lines"].nil? ? 0 : lines_scale(@ha["lines"].to_i) %></span></span></div>
<div class="analysis-block mt10 mb40 flex f14">
<div class="analysis-genral">
<p class="fontGrey3">代码行数</p>
<p class="fontBlue2"><%= @ha["lines"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">文件</p>
<p class="fontBlue2"><%= @ha["files"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">目录</p>
<p class="fontBlue2"><%= @ha["directories"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">类</p>
<p class="fontBlue2"><%= @ha["classes"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">方法</p>
<p class="fontBlue2"><%= @ha["functions"].to_i %></p>
</div>
</div>
<% if !@user_quality_infos.blank? %>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>
<div class="analysis-block mt10 f12">
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar">&nbsp;</li>
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
<li class="fl fontGrey2 contribute-list-problem">引入质量问题总数</li>
<li class="fl fontGrey2 contribute-list-problem">未解决质量问题数</li>
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
<div class="cl"></div>
</ul>
<% @user_quality_infos.each do |author_info| %>
<% user = get_user_by_mail(author_info[:email]) %>
<%# unless author_info[:changes] == 0 %>
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
<div class="mt8">
<%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "50", :class => "image-cir"), user_path(user), :target => '_blank' %>
<p class="fontGrey2 hidden"><%=link_to (user.id == 2 ? author_info[:email] : user.show_name), user_path(user) %></p>
</div>
</li>
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height"><%= author_info[:changes] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:all_issue_count] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height c_red"><%= author_info[:unresolved_issue_count] %></li>
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height"><%= author_info[:ratio] %></li>
<div class="cl"></div>
</ul>
<%# end %>
<% end %>
</div>
<% end %>
</div>
<div class="button-rep">当前分支:<%= params[:branch] %></div>
<div class="cl"></div>
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>
<%= render :partial => "hightchars" %>
<div class="analysis-block mt10 mb40 f14">
<div class="flex mb10">
<div class="analysis-genral">
<p id="container_sqale_rating" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">质量等级</p>
<p class="fontBlue2 pr"><%= sqale_rating_status(@ha["sqale_rating"].to_i)[2] %>
<span class="f10 c_white analysis-genral-icon <%= sqale_rating_status(@ha["sqale_rating"].to_i)[1] %> borderRadius">
<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral" >
<p id="container_function_complexity" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">复杂度</p>
<p class="fontBlue2 pr"><%= @ha["function_complexity"].to_i == 0 ? 0 : @ha["function_complexity"] %>
<span class="f10 c_white analysis-genral-icon <%= complexity_status(@ha["function_complexity"].to_i)[1] %> borderRadius">
<%= @ha["function_complexity"].nil? ? "良好" : complexity_status(@ha["function_complexity"].to_i)[0] %>
</span>
</p>
</div>
</div>
<div class="flex">
<div class="analysis-genral">
<p id="container_duplicated_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">代码重复度</p>
<p class="fontBlue2 pr"><%= @ha["duplicated_lines_density"].to_i == 0 ? 0 : @ha["duplicated_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["duplicated_lines_density"].nil? ? "良好" : duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral">
<p id="container_comment_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">注释率</p>
<p class="fontBlue2 pr"><%= @ha["comment_lines_density"].to_i == 0 ? 0 : @ha["comment_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= comment_lines_density_status(@ha["comment_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["comment_lines_density"].nil? ? "较低" : comment_lines_density_status(@ha["comment_lines_density"].to_i)[0] %>
</span>
</p>
</div>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">质量等级</span>
<span class="mr10 fontGrey2"><span class="c_red f18" style="margin-top:-5px; display:inline-block;"><%= @ha["sqale_rating"].nil? ? 0 : score_sqale_rating(@ha["sqale_rating"].to_i) %></span>/5分</span>
<span class="fontGrey2">可定性评价为:<span class="c_red">质量<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %></span></span></div>
<div class="analysis-block mt10 mb40 f14">
<div><span class="fontGrey3 mr30">技术债务</span>
<span class="w100 pInline">
<% if @ha["sqale_index"].to_i == 0 %>
0天
<% else %>
<%= /[0-9]*/.match(@ha["sqale_index"])[0] %>天
<%= / [0-9]*/.match(@ha["sqale_index"]).nil? ? "" : (/ [0-9]*/.match(@ha["sqale_index"]).to_s + "小时") %>
<% end %>
</span>
<span class="fontGrey2"><a class="linkBlue2" target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>
<div><span class="fontGrey3 mr30 fl">&nbsp;质量问题</span>
<span class="fontBlue2 w100 pInline">
<a class="fontBlue2 w70 pInline" target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false">
<%= @ha["violations"].to_i %>
</a>
</span><span class="fontGrey2">&nbsp;问题分类如下:</span></div>
<div class="ml90 mt15">
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=BLOCKER" class="fontBlue2 w70 pInline">
<%= @ha["blocker_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%=@ha["blocker_violations"].nil? ? 0 : statistics_result_percentage(@ha["blocker_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=CRITICAL" class="fontBlue2 w70 pInline">
<%= @ha["critical_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["critical_violations"].nil? ? 0 : statistics_result_percentage(@ha["critical_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MAJOR" class="fontBlue2 w70 pInline">
<%= @ha["major_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["major_violations"].nil? ? 0 : statistics_result_percentage(@ha["major_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MINOR" class="fontBlue2 w70 pInline">
<%= @ha["minor_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["minor_violations"].nil? ? 0 : statistics_result_percentage(@ha["minor_violations"].to_i, 3000) %>%;"></span></span></div>
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=INFO" class="fontBlue2 w70 pInline">
<%= @ha["info_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["info_violations"].nil? ? 0 : statistics_result_percentage(@ha["info_violations"].to_i, 3000) %>%;"></span></span></div>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">代码规模</span><span class="fontGrey2">可定性评价为:<span class="c_red"><%= @ha["lines"].nil? ? 0 : lines_scale(@ha["lines"].to_i) %></span></span></div>
<div class="analysis-block mt10 mb40 flex f14">
<div class="analysis-genral">
<p class="fontGrey3">代码行数</p>
<p class="fontBlue2"><%= @ha["lines"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">文件</p>
<p class="fontBlue2"><%= @ha["files"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">目录</p>
<p class="fontBlue2"><%= @ha["directories"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">类</p>
<p class="fontBlue2"><%= @ha["classes"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">方法</p>
<p class="fontBlue2"><%= @ha["functions"].to_i %></p>
</div>
</div>
<% if !@user_quality_infos.blank? %>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>
<div class="analysis-block mt10 f12">
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar">&nbsp;</li>
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
<li class="fl fontGrey2 contribute-list-problem">引入质量问题总数</li>
<li class="fl fontGrey2 contribute-list-problem">未解决质量问题数</li>
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
<div class="cl"></div>
</ul>
<% @user_quality_infos.each do |author_info| %>
<% user = get_user_by_mail(author_info[:email]) %>
<%# unless author_info[:changes] == 0 %>
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
<div class="mt8">
<%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "50", :class => "image-cir"), user_path(user), :target => '_blank' %>
<p class="fontGrey2 hidden"><%=link_to (user.id == 2 ? author_info[:email] : user.show_name), user_path(user) %></p>
</div>
</li>
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height"><%= author_info[:changes] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:all_issue_count] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height c_red"><%= author_info[:unresolved_issue_count] %></li>
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height"><%= author_info[:ratio] %></li>
<div class="cl"></div>
</ul>
<%# end %>
<% end %>
</div>
<% end %>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>

View File

@ -7,8 +7,9 @@
<div class="muban_popup_con " >
<div class="clear mt30 ml20 " >
<%#= form_tag( url_for(:controller => 'versions', :action => 'update', :is_setting => true), :remote => true, :id => 'project_applied_form') do %>
<%= labelled_form_for @version, :html => {:id => "popub_new_project_version_form", :remote => true, :is_setting => true, } do |f| %>
<%#= form_tag( url_for(:controller => 'versions', :action => 'update', :is_setting => true, :is_index => @is_index), :remote => true, :id => 'project_applied_form') do %>
<%= labelled_form_for @version, :html => {:id => "popub_new_project_version_form", :remote => true, :is_setting => true, :is_index => params[:is_index] } do |f| %>
<ul class="pro_newsetting_con mb15 ">
<li class="mb10 clear">
<label class=" fl"><span class="c_red f12">*</span>&nbsp;名称&nbsp;&nbsp;:&nbsp;</label>

View File

@ -7,7 +7,8 @@
:action => 'index',
:project_id => version.project)),
:class=>'roadmap_icons_del fr mt5 mr5' if User.current.allowed_to?(:manage_versions, version.project) %>
<a href="javascript:void(0);" class="roadmap_icons_edit fr mt5 " alt="编辑"></a>
<!--<a href="<%#= edit_version_path(version, :is_setting => true) %>" class="roadmap_icons_edit fr mt5 " alt="编辑"></a>-->
<%= link_to "", edit_version_path(version, :is_index => true), :class => 'roadmap_icons_edit fr mt5', :remote => true %>
</div>
<ul class="new_roadmap_list_txt clear mb5">
<li>完成 <span class="ml5 c_red" title="<%= version.closed_percent %>"><%= version.closed_percent.round %>% </span></li>

View File

@ -20,7 +20,8 @@
<%= delete_version_link version_path(@version, :back_url => url_for(:controller => 'versions',
:action => 'index',
:project_id => @version.project)),:class=>'roadmap_icons_del fr mt5 mr5' if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to("", edit_version_path(@version), :class => 'roadmap_icons_edit fr mt5 ') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%#= link_to("", edit_version_path(@version), :class => 'roadmap_icons_edit fr mt5 ') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to( "", edit_version_path(@version), :class => 'roadmap_icons_edit fr mt5', :remote => true) if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
<% else %>
<div class="flash error"><%= l(:label_roadmap_no_issues) %></div>

View File

@ -497,8 +497,8 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
.image-cir {border-radius:50%;}
.analysis-genral-icon {position:absolute; padding:1px 5px; display:inline-block; top:5px;}
.contribute-list-avatar {width:80px; vertical-align:middle; text-align:center;}
.contribute-list-code {width:130px; vertical-align:middle; text-align:center;}
.contribute-list-problem {width:130px; vertical-align:middle; text-align:center;}
.contribute-list-code {width:200px; vertical-align:middle; text-align:center;}
.contribute-list-problem {width:200px; vertical-align:middle; text-align:center;}
.contribute-list-rate {width:168px; vertical-align:middle; text-align:center;}
.contribute-list-height {height:80px;}
.contribute-list-line-height {line-height:80px;}