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

This commit is contained in:
daiao 2016-10-25 09:28:28 +08:00
commit 1652ec9195
34 changed files with 393 additions and 445 deletions

View File

@ -45,6 +45,9 @@ class PullRequestsController < ApplicationController
# 主要取源项目和目标项目分支及标识(用户名/版本库名)
def new
# project_menu_type 为了控制base顶部导航
@project_menu_type = 6
identifier = get_rep_identifier_by_project @project
@source_project_name = "#{get_user_name(@project.user_id)}/#{identifier}"
@source_rev = @g.branches(@project.gpid).map{|b| b.name}
@ -98,6 +101,8 @@ class PullRequestsController < ApplicationController
end
def show
# project_menu_type 为了控制base顶部导航
@project_menu_type = 6
@type = params[:type]
@request = @g.merge_request(@project.gpid, params[:id])
@commits = @g.merge_request_commits(@project.gpid, params[:id].to_i)

View File

@ -131,11 +131,11 @@ class VersionsController < ApplicationController
# all
}
format.api
# format.xls {
# @issues = @version.fixed_issues.visible.includes(:status, :tracker, :priority).reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").all
# filename = "#{@version.name.to_s}_#{l(:label_issue_list_xls)}.xls"
# send_data(issue_list_xls(@issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
# }
format.xls {
@issues = @version.fixed_issues.visible.includes(:status, :tracker, :priority).reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").all
filename = "#{@version.name.to_s}_#{l(:label_issue_list_xls)}.xls"
send_data(issue_list_xls(@issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
end
@ -241,6 +241,7 @@ class VersionsController < ApplicationController
if @version.fixed_issues.empty?
@version.destroy
respond_to do |format|
format.js
format.html { redirect_back_or_default settings_project_path(@project, :tab => 'versions') }
format.api { render_api_ok }
end
@ -263,6 +264,33 @@ class VersionsController < ApplicationController
end
private
def issue_list_xls issues
xls_report = StringIO.new
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet :name => "issues"
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
sheet1.row(0).default_format = blue
sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:milestone),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)])
count_row = 1
issues.each do |issue|
sheet1[count_row,0] = issue.id
sheet1[count_row,1] = issue_tracker_change(issue.tracker_id)
sheet1[count_row,2] = issue.subject
sheet1[count_row,3] = (issue.description.gsub(/<\/?.*?>/,"")).html_safe
sheet1[count_row,4] = issue_status_change(issue.status_id)
sheet1[count_row,5] = issue.assigned_to.try(:show_name)
sheet1[count_row,6] = issue_priority_change(issue.priority_id)
sheet1[count_row,7] = issue.author.show_name
sheet1[count_row,8] = issue.created_on.nil? ? issue.created_on : issue.created_on.strftime('%Y-%m-%d %H:%M:%S')
sheet1[count_row,9] = issue.fixed_version.try(:name)
sheet1[count_row,10] = issue.start_date.nil? ? issue.start_date : issue.start_date.strftime('%Y-%m-%d')
sheet1[count_row,11] = issue.due_date.nil? ? issue.due_date : issue.due_date.strftime('%Y-%m-%d')
sheet1[count_row,12] = issue_ratio_change(issue.done_ratio, issue.status_id)
count_row += 1
end
book.write xls_report
xls_report.string
end
def retrieve_selected_tracker_ids(selectable_trackers, default_trackers=nil)
if ids = params[:tracker_ids]

View File

@ -3,11 +3,11 @@
<% end %>
<%= error_messages_for 'message' %>
<div class="resources mt10">
<div class="container-big mt10">
<div id="new_course_topic">
<div class="homepagePostBrief c_grey">
<div class="c_grey">
<div>
<input type="text" name="message[subject]" id="message_subject" class="InputBox w713" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
<input type="text" name="message[subject]" id="message_subject" class="InputBox" style="width:963px;" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
<p id="subjectmsg"></p>
</div>
<div id="topic_editor" style="display: none;">

View File

@ -19,9 +19,9 @@
<%end%>
</script>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= l(:label_borad_project) %></div>
<div class="mt10 mb10">
<div class="banner-big">
<div class="f16 fontGrey3"><%= l(:label_borad_project) %></div>
</div>
<% if User.current.logged? %>
<%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},

View File

@ -4,7 +4,7 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div>
<div class="ReplyToMessageInputContainer mb10" style="width:845px;">
<div class="ReplyToMessageInputContainer mb10" style="width:840px;">
<% if User.current.logged? %>
<div nhname='new_message_<%= @jour.id%>' style="display:none;">
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>

View File

@ -92,64 +92,61 @@
showNormalImage('message_description_<%= @topic.id %>');
});
</script>
<div class="homepageRight mt0">
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
<div class="postThemeContainer">
<div class="postDetailPortrait">
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
</div>
<div class="postThemeWrap">
<% if User.current.logged? %>
<div class="homepagePostSetting" id="message_setting_<%= @topic.id%>" style="display: none">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
</li>
<li>
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if @message.destroyable_by?(User.current) %>
</li>
<% if hidden_unproject_infos %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
<% else %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
<% end %>
</ul>
<div class="mt10 mb10">
<div class="container-big" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
</div>
<div class="content-big pr">
<% if User.current.logged? %>
<div class="homepagePostSetting" id="message_setting_<%= @topic.id%>" style="display: none">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
</li>
<li>
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if @message.destroyable_by?(User.current) %>
</li>
<% if hidden_unproject_infos %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
<% else %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
<% end %>
</ul>
</div>
<%end%>
<div class="postDetailTitle fl">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
</li>
</ul>
</div>
<div class="cl"></div>
<div class="postDetailCreater">
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
</div>
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
<div class="cl"></div>
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @topic.content.html_safe%>
</div>
<div class="cl"></div>
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
</div>
</div>
<div class="cl"></div>
<%end%>
<div class="fl mb5" style="width:877px;">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
</div>
<div class="cl"></div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="postDetailCreater">
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
</div>
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
<div class="cl"></div>
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @topic.content.html_safe%>
</div>
<div class="cl"></div>
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
</div>
</div>
<div class="cl"></div>
<div class="container-big-grey">
<div class="reply-banner">
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= @reply_count>0 ? "#{@reply_count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@topic.id %>">

View File

@ -5,11 +5,11 @@
autoUrl('reply_message_description_<%= reply.id %>');
});
</script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
<div class="reply-container ml15" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div>
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">

View File

@ -1,7 +1,7 @@
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>" style="width:895px;">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="ReplyToMessageInputContainer mb10">
<div class="ReplyToMessageInputContainer mb10" style="width:840px;">
<% if User.current.logged? %>
<div nhname='new_message_<%= reply.id%>'>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :method => "post", :id => 'new_form' do |f| %>

View File

@ -1,5 +1,10 @@
<%if @project%>
<% if params[:is_project] %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% end %>
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% elsif @org_subfield %>

View File

@ -1,8 +1,13 @@
<%if @project%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% if params[:is_project] %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% end %>
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% elsif @org_subfield %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
<%end%>
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");

View File

@ -4,7 +4,7 @@
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div>
<div class="ontent-big">
<div class="content-big">
<div class="homepagePostTo break_word">
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
TO
@ -102,7 +102,7 @@
<div class="reply-content mb10">
<% if User.current.logged? %>
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => is_course, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => is_course, :is_board => 'true', :is_project => true},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div>

View File

@ -0,0 +1,20 @@
<div class="orig_user fl">
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
</div>
<div class="orig_right fl">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content ">
<% if comment.class == Journal %>
<% if comment.details.any? %>
<% details_to_strings(comment.details).each do |string| %>
<p><%= string %></p>
<% end %>
<% end %>
<P><%= comment.content_detail.html_safe %></P>
<% else %>
<%= comment.content_detail.html_safe %>
<% end %>
</div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,8 @@
<div class="orig_cont clearfix">
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
<div>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %>
</div>
<% end %>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => comment} %>
</div>

View File

@ -8,21 +8,21 @@
<% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>">
<% if length <= 3 %>
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %>
<% else %>
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<div>
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
</div>
<div class="orig_cont_hide clearfix">
<span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span>
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
</div>
<% end %>
</div>

View File

@ -29,7 +29,7 @@
<span style="position: relative" class="fr mr20">
<%= link_to(
l(:button_reply),
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board},
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_project => true, :is_board => is_board},
:remote => true,
:method => 'get',
:title => l(:button_reply)) %>
@ -39,7 +39,7 @@
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) %>
<%= link_to(
l(:button_delete),
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board),
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_project => true, :is_board => is_board),
:method => :post,
:remote => true,
:id => "delete_reply_#{activity_id}_#{comment.id}",

View File

@ -133,143 +133,6 @@
<%= error_messages_for 'member' %>
<%
roles = Role.givable.all
if @project.project_type == Project::ProjectType_course
if User.current.language == "zh"
roles = ["管理人员","开发者","报告人员"]
else
roles = ["管理人员","开发者","报告人员"]
# roles = roles[3..5]
end
else
roles = roles[0..2]
end
members = @project.member_principals.includes(:roles, :principal).all.sort
%>
<div class="members_left">
<% if members.any? %>
<ul style=" border-bottom:none;">
<li><span class="w140_h f_b" ><%= l(:label_user) %></span><span class="w180_h f_b"><%= l(:label_role_plural) %></span><span></span></li>
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
<% members.each do |member| %>
<li >
<%= link_to_user_header member.principal, true, :class => "w140_h c_setting_blue fl" %>
<span class="w180_h fl">
<!--区分中英文角色显示的不同-->
<% if User.current.language == "zh" %>
<% zh_roles = [] %>
<% member.roles.each do |role| %>
<% if role.id == 3
zh_roles << "管理人员"
elsif role.id == 4
zh_roles << "开发人员"
else
zh_roles << "报告人员"
end
%>
<% end %>
<%= h zh_roles.sort.reverse.collect(&:to_s).join(', ') %>
<% else %>
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
<% end %>
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
:method => :put,
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
) do |f| %>
<% roles.each do |role| %>
<ul style="text-align: left;" >
<%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
<!--编辑时候显示成员,中英文切换后面需从数据库的角度优化-->
<% if User.current.language == "zh" %>
<% if role.id == 3 %>
<label >管理人员</label>
<% elsif role.id == 4 %>
<label >开发人员</label>
<% else %>
<label >报告人员</label>
<% end %>
<% else %>
<label ><%= h role %></label>
<% end %>
</ul>
<!--<br/>-->
<% end %>
<%= hidden_field_tag 'membership[role_ids][]', '' %>
<div class="pt5">
<a href="javascript:void(0)" class="project_member_btn" onclick="$('#member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
<%= l(:button_change)%>
</a>
<a href="javascript:void(0)" class="project_member_btn" onclick="$('#member-<%= member.id%>-roles-form').hide();$(this).parent().parent().parent().parent().height(30)">
<%= l(:button_cancel)%>
</a>
</div>
<% end %>
</span>
<% unless member.user_id == @project.user_id %>
<a href="javascript:void(0) " class="c_setting_blue ml30 fl" onclick="$('#member-<%= member.id%>-roles-form').show();$(this).parent().height(110);">编辑</a>
<%= delete_link membership_path(member),
:remote => true,
:class => "c_setting_blue ml15 fl",
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
<% end%>
</li>
<% end%>
</ul>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div><!-- left -->
<!--right begin-->
<% if roles.any? %>
<div class="members_right">
<!-- applied -->
<div class="cl"></div>
<!-- add members -->
<p class="c_blue fb mt10 mb5"><%= l(:label_member_new) %></p>
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
<div class="member_search">
<input id="principal_search" class="member_search_input fl" type="text" placeholder="<%= "l(:label_invite_trustie_user_tips)"%>">
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
<div class="cl"></div>
<div id="principals_for_new_member">
<%= render_project_members(@project) %>
</div>
<div class="cl"></div>
<ul class="rolebox mb10 mt10">
<li class="fb">
<%= l(:label_role_plural) %>
</li>
<% roles.each do |role| %>
<li class="clear">
<%= radio_button_tag 'membership[role_ids][]', role.id, role.name == "报告人员" || role.name == "Reporter" %>
<% if User.current.language == "zh" %>
<% if role.id == 3 %>
<label >管理人员</label>
<% elsif role.id == 4 %>
<label >开发人员</label>
<% else %>
<label >报告人员</label>
<% end %>
<% else %>
<label ><%= h role %></label>
<% end %>
</li>
<% end %>
</ul>
<div class="cl mb10"></div>
<a href="javascript:void(0)" class="project_member_btn_right" onclick="$(this).parent().parent().submit();">
新增成员
</a>
</div>
<% end%>
</div><!-- 右边 end-->
<% end %>
<script type="text/javascript">
$(document).ready(function () {
var collection=$("#principals_for_new_member").children("#principals").children("label");

View File

@ -8,7 +8,6 @@
</li>
<% end %>
<li class="clear ">
<input class="fl mt8" type="checkbox">
<p class="fl ml5"><%= check_all_links('modules-form').html_safe %></p>
</li>
<% end %>

View File

@ -2,7 +2,7 @@
<% if @gitlab_repository.nil? %>
<div class=" sy_new_tchbox clear " >
<a href="javascript:void(0);" class=" sy_btn_green mb10">新建版本库</a>
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %>
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off', :remote => true} do |f| %>
<ul class="pro_newsetting_con mb15">
<li style="display: none">
<label class="label02"><%=l(:label_scm)%></label>
@ -15,7 +15,8 @@
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
<label class=" fl"><span class="c_red f12">*</span>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style=>"height: 28px;" %>
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
</li>
<li class="clear">
<label class=" fl">&nbsp;&nbsp;</label>
@ -24,8 +25,8 @@
3.一旦保存,标识无法修改</p>
</li>
</ul>
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
<a href="#" onclick="$('#repository-form').submit();" class="fr sy_btn_blue mr5"><%=l(:lable_project_rep_create) %></a>
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
<a href="" onclick="project_repository_commit();" class="fr sy_btn_blue mr5"><%=l(:lable_project_rep_create) %></a>
<% end %>
</div>
<% else %>
@ -54,4 +55,34 @@
{
$("#pro_st_edit_ku").toggle();
}
function cancel_for_create()
{
$("#project_setting_repository").val('');
}
function project_repository_commit()
{
if(regex_repoistory_name())
{
$("#repository-form").submit();
}
}
function regex_repoistory_name()
{
var name = $.trim($("#project_setting_repository").val());
if(/^[a-zA-Z0-9_\-]*[a-zA-Z_\-]+[a-zA-Z0-9_\-]*$/.test(name))
{
$("#valid_repository_name").hide();
return true;
}
else
{
$("#valid_repository_name").show();
return false;
}
}
</script>

View File

@ -1,108 +1,15 @@
<script>
function pro_st_show_ban1()
{
$("#pro_st_edit_ban1").toggle();
}
function pro_st_show_ban()
{
$("#pro_st_edit_ban").toggle();
}
</script>
<% if @project.shared_versions.any? %>
<table class="pro_table">
<tbody>
<tr class="pro_table_tit">
<td class="w150"><%= l(:label_version) %></td>
<td class="w90" > <%= l(:field_effective_date) %></td>
<td class="w150"><%= l(:field_description) %> </td>
<td class="w90"><%= l(:field_status) %></td>
<!--<td class="w90"><%#= l(:field_sharing) %></td>-->
<!--<td class="w150"><%#= l(:label_wiki_page) %></td>-->
<td class="w150"></td>
</tr>
<% for version in @project.shared_versions.sort %>
<tr class="<%= cycle 'pro_table_on', '' %>">
<td class="tl">
<a class="c_blue02"><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
</td>
<td class=""><%= format_date(version.effective_date) %></td>
<td class="tl" style="word-break:break-all;"><%=h version.description %></td>
<td class="status"><%= l("version_status_#{version.status}") %></td>
<!--<td class="sharing"><%#=h format_version_sharing(version.sharing) %></td>-->
<!--<td class="tl" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">-->
<%#= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
# :action => 'show',
# :project_id => version.project,
:id => Wiki.titleize(version.wiki_page_title)},:class=>"c_blue02") || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
<!--</td>-->
<td >
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" ><%= delete_link_version version_path(version) %></a>
<% end %>
</td>
</tr>
<% end; reset_cycle %>
</tbody>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>
</table>
<% if @project.versions.any? %>
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %>
<% end %>
<a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ban();"></a>
<%= link_to l(:label_version_new),"#", :class => 'c_blue fl',:onclick=>"pro_st_show_ban();" if User.current.allowed_to?(:manage_versions, @project) %>
<div class="cl"></div>
<%= form_for :version, :url => project_versions_path(@project),:html=>{:id=>"new_project_version_form"} do |f| %>
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
<ul>
<li >
<label class="label02"><span class="c_red">*</span><%=l(:field_name)%></label>
<%= f.text_field :name, :maxlength => 60 %>
</li>
<li >
<label class="label02"><%=l(:label_version_description)%></label>
<%= f.text_field :description, :maxlength => 60 %>
</li>
<li >
<label class="label02"><%=l(:field_status)%></label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
</li>
<!--<li >-->
<!--<label class="label02"><%#=l(:label_wiki_page)%></label>-->
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>-->
<!--</li>-->
<li >
<label class="label02"><%=l(:field_deadline)%></label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
<%= calendar_for('version_effective_date') %>
</li>
<div class="cl mb10"></div>
<!--<li >-->
<!--<label class="label02"><%#=l(:field_sharing)%></label>-->
<!--<%#= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>-->
<!--</li>-->
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
</ul>
</div>
<% end %>
<% if @project.shared_versions.empty? %>
<div class="pro_new_prompt ml15 mr15 mb10"><p><%= l(:milestone_no_data) %></p></div>
<% end %>
<div class=" sy_new_tchbox clear " >
<a href="javascript:void(0);" class=" sy_btn_green mb10" onclick="pro_st_show_ban1();">新建里程碑</a>
<%= form_for :version, :url => project_versions_path(@project),:html=>{:id=>"new_project_version_form"} do |f| %>
<%= form_for :version, :url => project_versions_path(@project, :is_setting => true),:html=>{:id=>"new_project_version_form", :remote => true} do |f| %>
<div id="pro_st_edit_ban1" style="display:none;">
<ul class="pro_newsetting_con mb15">
<li class="mb10 clear">
<label class="label02"><span class="c_red f12">*</span>&nbsp;<%= l(:field_name) %>&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;" %>
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;", :id => "setting_version_name" %>
<p class="c_orange ml100" style="display: none" id="project_setting_version_title">标题不能为空</p>
</li>
<li class="mb10 clear">
<label class="fl">&nbsp;<%= l(:label_version_description) %>&nbsp;&nbsp;:&nbsp;</label>
@ -119,7 +26,7 @@
</li>
<div class="cl mb10"></div>
</ul>
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="pro_st_show_ban1();">取消</a><a href="javascript:void(0);" onclick="$('#new_project_version_form').submit();" class="fr sy_btn_blue mr5">保存</a>
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="pro_st_show_ban1();">取消</a><a href="javascript:void(0);" onclick="project_version_commit();" class="fr sy_btn_blue mr5">保存</a>
</div>
<% end %>
</div>
@ -137,7 +44,7 @@
</tr>
</thead>
<tbody>
<% for version in @project.shared_versions.sort %>
<% @project.shared_versions.sort.each do |version| %>
<tr>
<th>
<a><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
@ -147,8 +54,8 @@
<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), :class => 'sy_btn_blue mr5' %></a>
<a href="/versions/1" data-confirm="您确定要删除吗?" ><%= delete_link_version version_path(version), :class=>"sy_btn_grey mr5" %></a>
<%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %></a>
<%= delete_link_version version_path(version, :is_setting => true), :class=>"sy_btn_grey mr5", :remote => true %>
<% end %>
</th>
</tr>
@ -158,4 +65,37 @@
</div>
<% end %>
<script>
// 新建版本
function project_version_commit()
{
if(regex_version_name())
{
$("#new_project_version_form").submit();
}
}
function regex_version_name()
{
var name = $.trim($("#setting_version_name").val());
if(name.length == 0)
{
$("#project_setting_version_title").show();
return false;
}
else
{
$("#project_setting_version_title").hide();
return true;
}
}
function pro_st_show_ban1()
{
$("#pro_st_edit_ban1").toggle();
}
function pro_st_show_ban()
{
$("#pro_st_edit_ban").toggle();
}
</script>

View File

@ -1,7 +1,7 @@
<div class="pd15box">
<div class="clear mb30">
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea"></textarea>
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea" style="padding-left: 0px;"></textarea>
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
<a href="javascript:void(0);" class="btn btn-blue fr" onclick="pull_request_commit()">留言</a>
<% end %>
@ -9,7 +9,7 @@
<ul class="pullreques_reply_list">
<% @comments.each do |comment| %>
<li>
<%= link_to image_tag(url_to_avatar(get_user_by_login_and(comment.author.try(:username))), :width => "43", :height => "43"), user_path(get_user_by_login_and(comment.author.try(:username))), :alt => "用户头像", :target => "_blank", :class => "fl" %>
<%= link_to image_tag(url_to_avatar(get_user_by_login_and(comment.author.try(:username))), :width => "43", :height => "43", :class => "pullreques_reply_user_img fl mr15"), user_path(get_user_by_login_and(comment.author.try(:username))), :alt => "用户头像", :target => "_blank", :class => "fl" %>
<div class="sy_teachers_txt fl ">
<p class="clear mb5">
<%= link_to comment.author.try(:username), user_path(get_user_by_login_and(comment.author.try(:username))), :class => "pullreques_reply_name fl", :target => "_blank" %>

View File

@ -1,81 +1,60 @@
<div class="pullreques_pullbox">
<div class="pullreques_pull_top clear">
<p class="fl c_grey ml15">2016-09-12</p>
<p class="fr c_green mr15">2个提交</p>
</div>
<ul class="pullreques_pull_list">
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
</ul>
</div>
<div class="pullreques_pullbox">
<div class="pullreques_pull_top clear">
<p class="fl c_grey ml15">2016-09-12</p>
<p class="fr c_green mr15">2个提交</p>
</div>
<ul class="pullreques_pull_list">
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
</ul>
</div>
<div class="pullreques_pullbox">
<div class="pullreques_pull_top clear">
<p class="fl c_grey ml15">2016-09-12</p>
<p class="fr c_green mr15">2个提交</p>
</div>
<ul class="pullreques_pull_list">
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
</ul>
</div>
<div class="pullreques_pullbox">
<div class="pullreques_pull_top clear">
<p class="fl c_grey ml15">2016-09-12</p>
<p class="fr c_green mr15">2个提交</p>
</div>
<ul class="pullreques_pull_list">
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
</ul>
</div>
<div class="pullreques_pullbox">
<div class="pullreques_pull_top clear">
<p class="fl c_grey ml15">2016-09-12</p>
<p class="fr c_green mr15">2个提交</p>
</div>
<ul class="pullreques_pull_list">
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
<li class="clear">
<span class="fl c_grey ml15 ">19分钟前</span>
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
<span class="fr mr15 c_grey">acbc94af</span>
</li>
</ul>
</div>

View File

@ -28,32 +28,32 @@
<div class="alert alert-orange mb15 ">
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %>接受</a>
</div>
<div class="new_roadmap_conbox " >
<div class="new_roadmap_conbox mb10" >
<div class=" clear">
<ul class="new_roadmap_nav fl" >
<li class="new_roadmap_nav_hover ">
<%= link_to "评论<span class='new_roadmap_nav_taghover ml5'>#{@comments_count}</span>".html_safe, pull_request_comments_project_pull_request_path(@request.id, :project_id => @project.id, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal" %>
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<%= link_to "评论<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@comments_count}</span>".html_safe, pull_request_comments_project_pull_request_path(@request.id, :project_id => @project.id, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
<!--<a href="javascript:void(0);" id="new_roadmap_type_1" class="new_roadmap_type_nomal" >评论<span id="new_roadmap_num_1" class="new_roadmap_nav_taghover ml5">210</span></a>-->
</li>
<li>
<%= link_to "提交<span class='new_roadmap_nav_tagnomal ml5'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "提交<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_2" %></li>
<!--<a href="javascript:void(0);" id="new_roadmap_type_2" class="new_roadmap_type_nomal" >提交<span id="new_roadmap_num_2" class="new_roadmap_nav_tagnomal ml5">25</span></a>-->
</li>
<li>
<%= link_to "改动<span class='new_roadmap_nav_tagnomal ml5'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "改动<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_3" %></li>
<!--<a href="javascript:void(0);" id="new_roadmap_type_3" class="new_roadmap_type_nomal" >改动<span id="new_roadmap_num_3" class="new_roadmap_nav_tagnomal ml5">5</span></a>-->
</li>
</ul>
<% if @type == nil || @type == "1" %>
<div id="merge_record_0">
<div id="merge_record_1">
<%= render :partial => "pull_requests/pull_request_comments" %>
</div>
<% end %>
<div id="merge_record_1" class="undis">
<div id="merge_record_2" class="undis">
<%= render :partial => "pull_requests/pull_request_commits" %>
</div>
<div id="merge_record_2" class="undis">
<div id="merge_record_3" class="undis">
<%= render :partial => "pull_requests/pull_request_changes" %>
</div>
</div>
@ -61,15 +61,21 @@
<!--PullReques结束-->
<script>
$(".new_roadmap_nav li").click(function(){
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
$(this).addClass("new_roadmap_nav_hover");
var index = $(".new_roadmap_nav li").index(this);
$("#merge_record_0, #merge_record_1, #merge_record_2").hide();
console.log(index);
$("#merge_record_" + index).show();
});
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
g('merge_record_'+i).className='undis';
}
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
g('merge_record_'+n).className='dis';
}
</script>

View File

@ -1 +1 @@
$("#merge_record_2").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes") %>');
$("#merge_record_3").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes") %>');

View File

@ -1 +1 @@
$("#merge_record_0").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_comments") %>');
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_comments") %>');

View File

@ -1 +1 @@
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits") %>');
$("#merge_record_2").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits") %>');

View File

@ -1,6 +1,6 @@
<div class = "cl"> </div>
<div id="project-boardlist">
<div class="listbox mt10" >
<div class="container-big mt10" >
<h2 class="list-h2">讨论区列表</h2>
<div class="category">
<span class="grayTxt ">排序:</span>

View File

@ -0,0 +1,33 @@
<div class="sy_popup_top">
<h3 class="fl">新建里程碑</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<div class="sy_popup_con">
<%= form_for :version, :url => project_versions_path(@project, :is_setting => true),:html=>{:id=>"new_project_version_form", :remote => true} do |f| %>
<div id="pro_st_edit_ban1">
<ul class="pro_newsetting_con mb15">
<li class="mb10 clear">
<label class="label02"><span class="c_red f12">*</span>&nbsp;<%= l(:field_name) %>&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;", :id => "setting_version_name" %>
<p class="c_orange ml100 " style="display: none" id="project_setting_version_title">标题不能为空</p>
</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;"%>
</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;" %>
<%= calendar_for('version_effective_date') %>
</li>
<li class="mb10 clear">
<label class="fl">&nbsp;<%= l(:field_status) %>&nbsp;&nbsp;:&nbsp;</label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{},{:style=>"height:28px"} %>
</li>
<div class="cl mb10"></div>
</ul>
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="pro_st_show_ban1();">取消</a><a href="javascript:void(0);" onclick="project_version_commit();" class="fr sy_btn_blue mr5">保存</a>
</div>
<% end %>
</div>

View File

@ -2,8 +2,11 @@
<div class="clear new_roadmap_listbox">
<div class="clear">
<h4 class="fl new_roadmap_listtitle"><%= link_to_version version, :name => version_anchor(version) %></h4><span class="fl <%= get_version_type(version.status) %> mt3 ml5"></span>
<%= link_to "导出", version_path(version, :format => 'xls'), :class => "btn_newpro_grey fr" %>
<a href="javascript:void(0);" class="roadmap_icons_del fr mt5 mr5" alt="删除"></a>
<%= link_to "导出Issue", version_path(version, :format => 'xls'), :class => "btn_newpro_grey fr" %>
<%= 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) %>
<a href="javascript:void(0);" class="roadmap_icons_edit fr mt5 " alt="编辑"></a>
</div>
<ul class="new_roadmap_list_txt clear mb5">

View File

@ -1,3 +1 @@
hideModal();
<% select = content_tag('select', content_tag('option') + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]') %>
$('#issue_fixed_version_id').replaceWith('<%= escape_javascript(select) %>');
$("#pro_st_tbc_04").html('<%= escape_javascript( render :partial => 'projects/settings/new_versions') %>');

View File

@ -0,0 +1,6 @@
<% if params[:is_setting] %>
$("#pro_st_tbc_04").html('<%= escape_javascript( render :partial => 'projects/settings/new_versions') %>');
<% else %>
$("#pro_st_tbc_04").html('<%= escape_javascript( render :partial => 'projects/settings/new_versions') %>');
<% end %>

View File

@ -0,0 +1,3 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'versions/edit') %>";
pop_box_new(htmlvalue,580,366);

View File

@ -2,17 +2,17 @@
<div class="new_roadmap_conbox mb10" >
<div class="new_roadmap_navbox clear">
<ul class="new_roadmap_nav fl" >
<li class="new_roadmap_nav_hover">
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5'>#{@versions_count}</span>".html_safe, project_roadmap_path(@project, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@versions_count}</span>".html_safe, project_roadmap_path(@project, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
</li>
<li>
<%= link_to "打开<span class='new_roadmap_nav_taghover ml5'>#{@versions_open_count}</span>".html_safe, project_roadmap_path(@project, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@versions_open_count}</span>".html_safe, project_roadmap_path(@project, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
</li>
<li>
<%= link_to "锁定<span class='new_roadmap_nav_taghover ml5'>#{@versions_locked_count}</span>".html_safe, project_roadmap_path(@project, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@versions_locked_count}</span>".html_safe, project_roadmap_path(@project, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
<li>
<%= link_to "关闭<span class='new_roadmap_nav_taghover ml5'>#{@versions_closed_count}</span>".html_safe, project_roadmap_path(@project, :type => "4"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
<li id="new_roadmap_nav_4" onclick="HoverLi(4);">
<%= link_to "关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_4'>#{@versions_closed_count}</span>".html_safe, project_roadmap_path(@project, :type => "4"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_4" %>
</li>
</ul>
<a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>
@ -27,8 +27,27 @@
<%= context_menu issues_context_menu_path %>
<script type="text/javascript" language="javascript">
$(".new_roadmap_nav li").click(function(){
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
$(this).addClass("new_roadmap_nav_hover");
});
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=4;i++){
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
g('version_list').className='undis';
}
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
g('version_list').className='dis';
}
// $(".new_roadmap_nav li").click(function(){
// $(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
// $(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
// $(this).addClass("new_roadmap_nav_hover");
// });
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 205 KiB

View File

@ -980,8 +980,8 @@ a.sortdownbtn{background: url(/images/sy/liststyle.png) 0 -12px no-repeat; width
.icons_pullreques{background: url(/images/new_project/icons_issue.png) 0 -270px no-repeat; display: inline-block; width: 25px; height: 25px;}
.pullreques_blueicon{ background: url(/images/new_project/icons_issue.png) 0 -299px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon{ background: url(/images/new_project/icons_issue.png) 0 -322px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon02{ background: url(/images/new_project/icons_issue.png) 0 -344px no-repeat; display: inline-block; width:32px; height: 16px;}
.pullreques_reply_textarea{ width: 100%; padding:0; height: 60px; color: #666;}
.pullreques_greyicon02{ background: url(/images/new_project/icons_issue.png) 0 -344px no-repeat; display: inline-block; width:43px; height: 16px;}
.pullreques_reply_textarea{ width: 100%; padding:2; height: 60px; color: #666;}
.pullreques_reply_list li{ padding:15px 0; border-top: 1px dashed #ddd; }
.pullreques_reply_user_img{ width:50px;height:50px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
a.pullreques_reply_name{ font-weight: bold; color: #333;}