Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject
This commit is contained in:
commit
ba7c9a33b6
|
@ -2226,6 +2226,22 @@ module ApplicationHelper
|
|||
s
|
||||
end
|
||||
|
||||
# 获取issue类型
|
||||
def get_issue_type_new tracker_id
|
||||
case tracker_id
|
||||
when 1
|
||||
"缺陷"
|
||||
when 2
|
||||
"功能"
|
||||
when 3
|
||||
"支持"
|
||||
when 4
|
||||
"任务"
|
||||
when 5
|
||||
"周报"
|
||||
end
|
||||
end
|
||||
|
||||
def get_memo
|
||||
@new_memo = Memo.new
|
||||
@public_forum = Forum.find(1) rescue ActiveRecord::RecordNotFound
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<% if activity.attachments.any? %>
|
||||
<% activity.attachments.each do |attachment| %>
|
||||
<div class="break_word">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
@ -206,24 +206,26 @@
|
|||
function onblur_<%= pq.id %>(obj)
|
||||
{
|
||||
$(window).unbind('beforeunload');
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%= commit_answer_poll_path(@poll) %>",
|
||||
data: {
|
||||
poll_question_id: <%= pq.id %> ,
|
||||
vote_text: obj.value
|
||||
},
|
||||
success: function (data) {
|
||||
var dataObj = eval(data);
|
||||
obj.value = dataObj.text;
|
||||
var span = $('#percent');
|
||||
span.html(dataObj.percent);
|
||||
},
|
||||
error: function () {
|
||||
alert("网络异常,答题失败,请确认网络正常连接后再答题。");
|
||||
}
|
||||
});
|
||||
|
||||
var val = $(obj).val().trim();
|
||||
if(val != "") {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%= commit_answer_poll_path(@poll) %>",
|
||||
data: {
|
||||
poll_question_id: <%= pq.id %> ,
|
||||
vote_text: obj.value
|
||||
},
|
||||
success: function (data) {
|
||||
var dataObj = eval(data);
|
||||
obj.value = dataObj.text;
|
||||
var span = $('#percent');
|
||||
span.html(dataObj.percent);
|
||||
},
|
||||
error: function () {
|
||||
alert("网络异常,答题失败,请确认网络正常连接后再答题。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<input class="fillInput" placeholder="在此填入答案" type="text" value="<%= get_anwser_vote_text(pq.id,User.current.id).html_safe %>" onblur="onblur_<%= pq.id %>(this);" <%= @can_edit_poll?"":"disabled=disabled" %>>
|
||||
|
@ -253,24 +255,27 @@
|
|||
function onblur_<%= pa.id %>(obj)
|
||||
{
|
||||
$(window).unbind('beforeunload');
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%= commit_answer_poll_path(@poll) %>",
|
||||
data: {
|
||||
poll_question_id: <%= pq.id %> ,
|
||||
poll_answer_id: <%= pa.id %>,
|
||||
vote_text: obj.value
|
||||
},
|
||||
success: function (data) {
|
||||
var dataObj = eval(data);
|
||||
obj.value = dataObj.text;
|
||||
var span = $('#percent');
|
||||
span.html(dataObj.percent);
|
||||
},
|
||||
error: function () {
|
||||
alert("网络异常,答题失败,请确认网络正常连接后再答题。");
|
||||
}
|
||||
});
|
||||
var val = $(obj).val().trim();
|
||||
if(val != "") {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%= commit_answer_poll_path(@poll) %>",
|
||||
data: {
|
||||
poll_question_id: <%= pq.id %>,
|
||||
poll_answer_id: <%= pa.id %>,
|
||||
vote_text: obj.value
|
||||
},
|
||||
success: function (data) {
|
||||
var dataObj = eval(data);
|
||||
obj.value = dataObj.text;
|
||||
var span = $('#percent');
|
||||
span.html(dataObj.percent);
|
||||
},
|
||||
error: function () {
|
||||
alert("网络异常,答题失败,请确认网络正常连接后再答题。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<p class="mb10"><%= i + 1 %>.<%= pa.answer_text%></p>
|
||||
|
|
|
@ -3,15 +3,12 @@
|
|||
<div class="pr">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= 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} %>
|
||||
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="content-big">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
|
@ -40,18 +37,8 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
<span class="fl">【<%= get_issue_type_new(activity.tracker_id) %>】</span>
|
||||
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5", :target => "_blank" %>
|
||||
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
|
||||
<%= get_issue_priority(activity.priority_id)[1] %>
|
||||
|
@ -84,7 +71,7 @@
|
|||
<% if User.current.member_of?(activity.project) && !activity.nil? && !activity.status.nil? %>
|
||||
<% unless params[:action] == "index" %>
|
||||
<div id="div_user_issue_detail_<%=activity.id %>">
|
||||
<%= render :partial => 'users/project_issue_detail', :locals => {:activity => activity} %>
|
||||
<%= render :partial => 'projects/project_issue_detail', :locals => {:activity => activity} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -96,7 +83,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="div_user_issue_reply_<%=user_activity_id%>">
|
||||
<%= render :partial => 'users/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
<%= render :partial => 'projects/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% unless comment.parent.nil? %>
|
||||
<div>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => comment} %>
|
||||
</div>
|
|
@ -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>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
|
||||
</div>
|
||||
<% if !comment.parent.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% if length <= 3 %>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,116 @@
|
|||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".pro_info_p,.proInfoP").mouseover(function(){
|
||||
$(this).children(".pic_edit2").css("display","inline-block");
|
||||
});
|
||||
$(".pro_info_p,.proInfoP").mouseout(function(){
|
||||
$(this).children(".pic_edit2").css("display","none");
|
||||
});
|
||||
$(".pic_edit2").click(function(){
|
||||
$(this).parent().hide();
|
||||
$(this).parent().next().show();
|
||||
});
|
||||
$(".issueEdit").blur(function(){
|
||||
$(this).hide();
|
||||
$(this).prev().show();
|
||||
var editValue = $(this).children("option:selected").text();
|
||||
$(this).prev().children(":first").text(editValue);
|
||||
});
|
||||
function stopPropagation(e) {
|
||||
if (e.stopPropagation)
|
||||
e.stopPropagation();
|
||||
else
|
||||
e.cancelBubble = true;
|
||||
};
|
||||
$(document).bind('click',function(){
|
||||
$('.issueEdit').css('display','none');
|
||||
$('.proInfoP,.pro_info_p').show();
|
||||
});
|
||||
$('.issueEdit,.pic_edit2').bind('click',function(e){
|
||||
stopPropagation(e);
|
||||
});
|
||||
});
|
||||
function remote_function(id) {
|
||||
$(id).submit();
|
||||
}
|
||||
</script>
|
||||
<div class="cl"></div>
|
||||
<div class="proInfoBox2 mb10 mt10">
|
||||
<ul class="fl">
|
||||
<%#= labelled_fields_for :issue, @issue do |f| %>
|
||||
<%#= f.select :status_id, ([["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0])),
|
||||
{:include_blank => false, :selected => @status_id ? @status_id : 0 },
|
||||
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit"} %>
|
||||
<%# end %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "status"},:remote=>'true', :method => :put, :id=>"issue_query_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<li>
|
||||
<p class="label03"> 状态 : </p>
|
||||
<p class="proInfoP"><span><%= activity.status.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a></p>
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{:include_blank => false, :selected => @status_id ? @status_id : 0 },
|
||||
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit",:style=>"white-space:nowrap; overflow:hidden;"}
|
||||
)
|
||||
%>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "assigned"},:remote=>'true', :method => :put, :id=>"issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<li>
|
||||
<p class="label03"> 指派 : </p>
|
||||
<span class="pro_info_p" style="width:130px;">
|
||||
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %>
|
||||
<a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span>
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project),
|
||||
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},
|
||||
{:onchange=>"remote_function('#issue_query_assign_form_#{activity.id}');", :id =>"assigned_to_id", :name => "assigned_to_id",:class=>"undis issueEdit", :style => "width:130px;"}) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
||||
<ul class="fl">
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "prior"},:remote=>'true', :method => :put, :id=>"issue_query_prior_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<li>
|
||||
<p class="label03"> 优先级 : </p>
|
||||
<span class="proInfoP" style="width:70px;"><span><%= activity.priority.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
||||
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
||||
{:include_blank => false,:selected=>@priority_id ? @priority_id : 0},
|
||||
{:onchange=>"remote_function('#issue_query_prior_form_#{activity.id}');",:id=>"priority_id",:name=>"priority_id",:class=>"w70 undis issueEdit"}) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "ratio"},:remote=>'true', :method => :put, :id=>"issue_query_done_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<li>
|
||||
<p class="label03"> 完成度 : </p>
|
||||
<span class="proInfoP" style="width:70px;"><span><%= activity.done_ratio %>%</span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
||||
<%= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
|
||||
{:onchange=>"remote_function('#issue_query_done_form_#{activity.id}');",:id=>"done_ratio",:name=>"done_ratio",:class=>"w70 undis issueEdit"}) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl ">
|
||||
<li>
|
||||
<p class="label03" style="width:50px;"> 开始 : </p>
|
||||
<p class="proInfoP" style="width:70px;"><span><%= format_date(activity.start_date) %></span></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<p class="label03" style="width:50px;"> 周期 : </p>
|
||||
<span class="proInfoP" style="width:70px;"><%= l_hours(activity.estimated_hours) %></span> </li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl ml20">
|
||||
<li>
|
||||
<p class="label03"> 计划完成 : </p>
|
||||
<span class="proInfoP" style="width:100px;"><span><%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %></span></span> </li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<p class="label03"> <%=l(:milestone)%> : </p>
|
||||
<span class="proInfoP" style="width:100px;"><%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %> </span> </li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<!--pro_info_box end-->
|
||||
</div>
|
|
@ -0,0 +1,101 @@
|
|||
<% count = activity.journals.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% comments.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'projects/project_issue_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
<% details_to_strings(comment.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= comment.notes.html_safe %></P>
|
||||
<% else %>
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= comment.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||
</span>
|
||||
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users', :action => 'reply_to', :reply_id => comment.id, :type => 'Issue', :user_activity_id => user_activity_id, :activity_id => activity.id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'issues',:action => 'delete_journal', :id => activity.id,:journal_id=>comment.id, :user_activity_id => user_activity_id},
|
||||
:method => 'get',
|
||||
:confirm => l(:text_are_you_sure),
|
||||
:remote=>true,
|
||||
:id => "delete_reply_#{activity.id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:title => l(:button_delete)
|
||||
) if comment.user_id == User.current.id %>
|
||||
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%#= render :partial => 'users/news_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Issue', :activity_id => activity.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "projects/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,32 @@
|
|||
<div class="homepagePostReplyBanner" id="reply_banner_<%=user_activity_id %>">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
<span>回复</span>
|
||||
<span class="reply_iconup" > ︿</span>
|
||||
<span class="mr15"><%= count>0 ? "(#{count})" : "" %></span><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<% if activity.class.to_s == 'HomeworkCommon' %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'HomeworkCommon',<%=activity.id %>,<%=hw_status %>,<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% elsif activity.class.to_s == 'Message' %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_message_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=is_course %>,<%=is_board %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% elsif activity.class.to_s == 'BlogComment' %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_blog_comment_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=homepage %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% else %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_all_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,4 @@
|
|||
<div class="visitor-box fontGrey2">
|
||||
<a href='<%= signin_url_without_domain %>' class='linkBlue' target='_Blank' >登录</a>后可添加回复
|
||||
<%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>
|
||||
</div>
|
|
@ -6,12 +6,12 @@
|
|||
}
|
||||
<% end %>
|
||||
$("#search_orgs_result_list").html("");
|
||||
$("#search_orgs_result_list").append('<ul class="ml20">');
|
||||
$("#search_orgs_result_list").append('<ul class="sy_new_tchlist fl">');
|
||||
<% @orgs_not_in_project.each do |org|%>
|
||||
link = "<li><label><input type='checkbox'class='mr5 fl mt3' name='orgNames[]' value='<%=org.id%>'/><span class='relateOrgName fl'> <%=org.name %> </span></label></li><div class='cl mt5'></div>";
|
||||
link = "<li class='clear'><input type='checkbox'class='mr5 fl' name='orgNames[]' value='<%=org.id%>'/><span class='fl pro_new_idname'> <%=org.name %> </span></li>";
|
||||
$("#search_orgs_result_list").append(link );
|
||||
<%end %>
|
||||
$("#search_orgs_result_list").append('</ul>')
|
||||
$("#search_orgs_result_list").append('</ul>');
|
||||
<% if @org_count > 15 %>
|
||||
$("#paginator").html(' <%= pagination_links_full @orgs_page, @org_count ,:per_page_links => true,:remote =>true,:flag=>true%>');
|
||||
$("#paginator").css("display", "block");
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<ul>
|
||||
<li><span class="relatedListName fb fl">名称</span><span class="relatedListOption fb fl">操作</span></li>
|
||||
<!-- <li><span class="relatedListName fb fl">名称</span><span class="relatedListOption fb fl">操作</span></li>-->
|
||||
<% orgs.each do |org| %>
|
||||
<li><a href="<%= organization_path(org) %>" class="relatedListName linkBlue fl"><%= org.name %></a>
|
||||
<a href = "javascript:void(0);" onclick = "cancel_relation('<%= OrgProject.where(:organization_id => org.id, :project_id => project_id).first.id %>','<%=project_id %>')" class="relatedListOption fl linkGrey3" >取消关联</a>
|
||||
<li class="clear mb5"><a href="<%= organization_path(org) %>" class="fl"><%= org.name %></a>
|
||||
<a href = "javascript:void(0);" onclick = "cancel_relation('<%= OrgProject.where(:organization_id => org.id, :project_id => project_id).first.id %>','<%=project_id %>')" class="fr sy_btn_grey ml5" >删除</a>
|
||||
<%#= link_to "取消关联", org_project_path(:id => OrgProject.where(:organization_id => org.id, :project_id => project_id).first.id, :project_id => project_id),
|
||||
:method => 'delete',:remote => true, :class => "relatedListOption fl linkGrey3" %>
|
||||
</li>
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
<%= stylesheet_link_tag 'css/org' %>
|
||||
<div class="sy_new_tchbox clear ">
|
||||
<h2 class="pro_newsetting_title mb10 fl">关联组织</h2>
|
||||
<a href="<%= new_organization_path %>" class="fr sy_btn_green ">新建组织</a>
|
||||
<div class="cl mb5"></div>
|
||||
<%= form_tag url_for(:controller => 'org_projects', :action => 'create', :project_id => @project.id), :id => 'join_orgs_for_project', :remote => true do %>
|
||||
<input type="text" name="orgs" class="sy_new_search" placeholder="请输入组织名称" />
|
||||
<div id="search_orgs_result_list"></div>
|
||||
<ul id="paginator" class="wlist ml20" style="float:none;"></ul>
|
||||
<a href="javascript:void(0);" class="fl sy_btn_blue mr5" onclick="join_org(<%= @project.id %>);">关联</a>
|
||||
<a href="javascript:void(0);" class="fl sy_btn_grey mr5" onclick="cancel_join_orgs();">取消</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="sy_new_tchbox">
|
||||
<h2 class="pro_newsetting_title mb10">已关联组织</h2>
|
||||
<ul>
|
||||
<div id="added_orgs">
|
||||
<%= render :partial => 'projects/settings/added_orgs', :locals => {:orgs => @project.organizations, :project_id => params[:id]} %>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<div class="members_left">-->
|
||||
<!--<input type="text" id="orgs_not_project_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、昵称搜索" class="orgAddSearch mb20" />-->
|
||||
<!--<%#= javascript_tag "observeSearchfield('orgs_not_project_member_search', null, '#{ escape_javascript autocomplete_search_organizations_path(:project_id=> @project.id, :format => 'js') }')" %>-->
|
||||
|
@ -5,31 +33,31 @@
|
|||
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<%= stylesheet_link_tag 'css/org' %>
|
||||
<%#= stylesheet_link_tag 'css/org' %>
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
<div class="relateOrg fl">
|
||||
<span class="pic_add fl mr5 mt3"></span><span class="f14 fontBlue fl">关联组织</span>
|
||||
<div class="cl mb5"></div>
|
||||
<%= form_tag url_for(:controller => 'org_projects', :action => 'create', :project_id => @project.id), :id => 'join_orgs_for_project', :remote => true do %>
|
||||
<%#= form_tag url_for(:controller => 'org_projects', :action => 'create', :project_id => @project.id), :id => 'join_orgs_for_project', :remote => true do %>
|
||||
<input type="text" name="orgs" class="searchOrg mb5 ml20" placeholder="请输入组织名称" />
|
||||
<div id="search_orgs_result_list" class="ml20"></div>
|
||||
<ul id="paginator" class="wlist ml20" style="float:none;"></ul>
|
||||
<a href="javascript:void(0);" class="saveBtn db fl ml20 mr15 mb5" onclick="join_org(<%= @project.id %>);">关联</a>
|
||||
<a href="javascript:void(0);" class="saveBtn db fl ml20 mr15 mb5" onclick="join_org(<%#= @project.id %>);">关联</a>
|
||||
<a href="javascript:void(0);" class="grey_btn db fl" onclick="cancel_join_orgs();">取消</a>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</div>
|
||||
<div class="relatedList fr">
|
||||
<div class="fr mr15">
|
||||
<span class="f14 fontBlue">已关联组织</span>
|
||||
<div id="added_orgs">
|
||||
<%= render :partial => 'projects/settings/added_orgs', :locals => {:orgs => @project.organizations, :project_id => params[:id]} %>
|
||||
<%#= render :partial => 'projects/settings/added_orgs', :locals => {:orgs => @project.organizations, :project_id => params[:id]} %>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var lastSearchCondition = '';
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<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">
|
||||
|
@ -89,8 +92,70 @@
|
|||
<% 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| %>
|
||||
<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> <%= l(:field_name) %> : </label>
|
||||
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;" %>
|
||||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class="fl"> <%= l(:label_version_description) %> : </label>
|
||||
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;"%>
|
||||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class=" fl"> <%= l(:milestone_date_closed) %> : </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"> <%= l(:field_status) %> : </label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :style=>"border:1px solid #e5e5e5 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="$('#new_project_version_form').submit();" class="fr sy_btn_blue mr5">保存</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if @project.shared_versions.any? %>
|
||||
<div class=" clear ml15 mr15" >
|
||||
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>结束日期</th>
|
||||
<th>描述</th>
|
||||
<th>状态</th>
|
||||
<th >操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% for version in @project.shared_versions.sort %>
|
||||
<tr>
|
||||
<th>
|
||||
<a><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
|
||||
</th>
|
||||
<th><%= format_date(version.effective_date) %></th>
|
||||
<th><%=h version.description %></th>
|
||||
<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>
|
||||
<% end %>
|
||||
</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
<% sub_path = entry.path[0] == "/" ? entry.path.sub("/", "") : entry.path %>
|
||||
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(sub_path) %>
|
||||
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
|
||||
<%# latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_path, @g) %>
|
||||
<% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_path, @g) %>
|
||||
|
||||
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
|
||||
<td style="padding-left: <%=18 * depth%>px;" class="filename_no_report hidden">
|
||||
<% if entry.is_dir? %>
|
||||
<%# 展开文件目录 %>
|
||||
<%# 展开文件目录 %>
|
||||
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||
:action => 'show',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(ent_path),
|
||||
:rev => @rev,
|
||||
# :latest_changes => latest_changes,
|
||||
:latest_changes => latest_changes,
|
||||
:depth => (depth + 1),
|
||||
:parent_id => tr_id)) %>');"> </span>
|
||||
<% end %>
|
||||
|
@ -26,49 +26,21 @@
|
|||
</td>
|
||||
<div id="children_tree">
|
||||
<td class="tree-comments c_grey hidden">
|
||||
<div class="hidden" id="changes_message_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= (latest_changes.message) if latest_changes %>">
|
||||
<%= (latest_changes.message) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tree-author c_grey">
|
||||
<div class="hidden" id="changes_author_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= (latest_changes.author_name) if latest_changes %>">
|
||||
<%= (latest_changes.author_name) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tree-age c_grey">
|
||||
<div class="hidden" id="changes_time_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= format_time(latest_changes.time) if latest_changes %>">
|
||||
<%# 为了转换UTC时间,时差8小时 %>
|
||||
<%= link_to tree_head_message_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch) %>
|
||||
<%= distance_of_time_in_words(latest_changes.time, Time.now) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</tr>
|
||||
|
||||
<!--<!–<script>–>-->
|
||||
<!--// $("#changes_message_<%#=tr_id %>").html("999")-->
|
||||
<!--// $("#changes_author_<%#=tr_id %>").html("<%#= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>")-->
|
||||
<!--// $("#changes_time_<%#=tr_id %>").html("<%#= distance_of_time_in_words(get_trees_last_changes(@project.gpid, @rev, ent_path, @g).time, Time.now) %>")-->
|
||||
<!--<!–</script>–>-->
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$.ajax({
|
||||
type:"GET",
|
||||
url:"Venue.aspx?act=init",
|
||||
dataType:"html",
|
||||
success:function(result){ //function1()
|
||||
f1();
|
||||
f2();
|
||||
}
|
||||
|
||||
failure:function (result) {
|
||||
alert('Failed');
|
||||
}
|
||||
}
|
||||
|
||||
alert("test");
|
||||
alert(<%#= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>);
|
||||
document.getElementById('changes_author_<%=tr_id %>').html(<%= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>);
|
||||
});
|
||||
</script>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% project = Project.find(activity.act_id) %>
|
||||
<% user = User.find(project.user_id)%>
|
||||
<div class="container-big mt10">
|
||||
<div class="pr">
|
||||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="content-big">
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
|
||||
|
|
|
@ -202,6 +202,7 @@ zh:
|
|||
label_subject_empty: 主题不能为空
|
||||
|
||||
label_no_data: 没有任何数据可供显示
|
||||
milestone_no_data: 尚未创建里程碑
|
||||
label_repository_no_data: 每个项目只能创建一个版本库!
|
||||
# 项目、课程、用户公用
|
||||
label_settings: 配置
|
||||
|
|
|
@ -1460,6 +1460,7 @@ zh:
|
|||
label_bids_credit_number: 分
|
||||
field_budget: 奖励
|
||||
field_deadline: 截止日期
|
||||
milestone_date_closed: 结束日期
|
||||
field_is_evaluation: 是否启动互评
|
||||
field_proportion: 教师评分比例
|
||||
label_tags_selected: 已选标签
|
||||
|
|
Loading…
Reference in New Issue