diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f6cfb9a16..0f6798328 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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
diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb
index 48c01468a..ad87d28bf 100644
--- a/app/views/attachments/_activity_attach.html.erb
+++ b/app/views/attachments/_activity_attach.html.erb
@@ -1,3 +1,4 @@
+
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index c37c589f1..ab5e94dd0 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -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 %>
<%= yield :header_tags -%>
diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb
index 63f7feae5..055eecc7b 100644
--- a/app/views/poll/show.html.erb
+++ b/app/views/poll/show.html.erb
@@ -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("网络异常,答题失败,请确认网络正常连接后再答题。");
+ }
+ });
+ }
}
>
@@ -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("网络异常,答题失败,请确认网络正常连接后再答题。");
+ }
+ });
+ }
}
<%= i + 1 %>.<%= pa.answer_text%>
diff --git a/app/views/projects/_act_issues.html.erb b/app/views/projects/_act_issues.html.erb
index 8e448ffb2..ef86c2118 100644
--- a/app/views/projects/_act_issues.html.erb
+++ b/app/views/projects/_act_issues.html.erb
@@ -3,15 +3,12 @@
<%= 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} %>
- <% 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"%>
<% if User.current.logged? %>
@@ -40,18 +37,8 @@
<% end %>
- <% case activity.tracker_id %>
- <% when 1%>
-
【缺陷】
- <% when 2%>
-
【功能】
- <% when 3%>
-
【支持】
- <% when 4%>
-
【任务】
- <% when 5%>
-
【周报】
- <% end %>
+
【<%= get_issue_type_new(activity.tracker_id) %>】
+
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5", :target => "_blank" %>
<%= 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" %>
- <%= render :partial => 'users/project_issue_detail', :locals => {:activity => activity} %>
+ <%= render :partial => 'projects/project_issue_detail', :locals => {:activity => activity} %>
<% end %>
<% end %>
@@ -96,7 +83,7 @@
- <%= 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} %>
+
+
+
+
+
+ <%= 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 %>
+
+ 优先级 :
+ <%= activity.priority.name %>
+ <%= 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"}) %>
+
+ <% end %>
+
+ <%= 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 %>
+
+ 完成度 :
+ <%= activity.done_ratio %>%
+ <%= 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 %>
+
+
+
+
+
+
+
+ 计划完成 :
+ <%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %>
+
+
+ <%=l(:milestone)%> :
+ <%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/projects/_project_issue_reply.html.erb b/app/views/projects/_project_issue_reply.html.erb
new file mode 100644
index 000000000..019e435b8
--- /dev/null
+++ b/app/views/projects/_project_issue_reply.html.erb
@@ -0,0 +1,101 @@
+<% count = activity.journals.count %>
+
+ <%= 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 %>
+
+
+ <% comments.each do |comment| %>
+
+
+
+ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
+
+
+ <%= render :partial => 'projects/project_issue_contents', :locals => {:comment => comment}%>
+
+ <% if !comment.content_detail.blank? || comment.class == Journal %>
+
+
+
+
+
+
+
+ <%= 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)) %>
+
+
+ <%= 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 %>
+
+
+
+
+
+
+ <% end %>
+
+
+
+ <% end %>
+
+
+ <%#= render :partial => 'users/news_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Issue', :activity_id => activity.id} %>
+
+ <% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "projects/show_unlogged" %>
+ <% end %>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/projects/_project_reply_banner.html.erb b/app/views/projects/_project_reply_banner.html.erb
new file mode 100644
index 000000000..58c0688ee
--- /dev/null
+++ b/app/views/projects/_project_reply_banner.html.erb
@@ -0,0 +1,32 @@
+
+
+ 回复
+ ︿
+ <%= count>0 ? "(#{count})" : "" %> ▪
+
+ <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
+
+
+
<%#= format_date(activity.updated_on) %>
+ <%if count>3 %>
+
+ <% if activity.class.to_s == 'HomeworkCommon' %>
+
+ 展开更多
+
+ <% elsif activity.class.to_s == 'Message' %>
+
+ 展开更多
+
+ <% elsif activity.class.to_s == 'BlogComment' %>
+
+ 展开更多
+
+ <% else %>
+
+ 展开更多
+
+ <% end %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/projects/_show_unlogged.html.erb b/app/views/projects/_show_unlogged.html.erb
new file mode 100644
index 000000000..223ee3f40
--- /dev/null
+++ b/app/views/projects/_show_unlogged.html.erb
@@ -0,0 +1,4 @@
+
+
登录 后可添加回复
+ <%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>
+
\ No newline at end of file
diff --git a/app/views/projects/search_public_orgs_not_in_project.js.erb b/app/views/projects/search_public_orgs_not_in_project.js.erb
index cb8fb3ea2..3be806b00 100644
--- a/app/views/projects/search_public_orgs_not_in_project.js.erb
+++ b/app/views/projects/search_public_orgs_not_in_project.js.erb
@@ -6,12 +6,12 @@
}
<% end %>
$("#search_orgs_result_list").html("");
-$("#search_orgs_result_list").append('
');
+$("#search_orgs_result_list").append('')
+$("#search_orgs_result_list").append(' ');
<% 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");
diff --git a/app/views/projects/settings/_added_orgs.html.erb b/app/views/projects/settings/_added_orgs.html.erb
index 19e0c07fe..666a7e118 100644
--- a/app/views/projects/settings/_added_orgs.html.erb
+++ b/app/views/projects/settings/_added_orgs.html.erb
@@ -1,8 +1,8 @@
- 名称 操作
+
<% orgs.each do |org| %>
- <%= org.name %>
- 取消关联
+ <%= org.name %>
+ 删除
<%#= 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" %>
diff --git a/app/views/projects/settings/_join_org.html.erb b/app/views/projects/settings/_join_org.html.erb
index cd3fd7ff2..d4e29c7ce 100644
--- a/app/views/projects/settings/_join_org.html.erb
+++ b/app/views/projects/settings/_join_org.html.erb
@@ -1,3 +1,31 @@
+<%= stylesheet_link_tag 'css/org' %>
+
+
关联组织
+
新建组织
+
+ <%= form_tag url_for(:controller => 'org_projects', :action => 'create', :project_id => @project.id), :id => 'join_orgs_for_project', :remote => true do %>
+
+
+
+
关联
+
取消
+ <% end %>
+
+
+
已关联组织
+
+
+ <%= render :partial => 'projects/settings/added_orgs', :locals => {:orgs => @project.organizations, :project_id => params[:id]} %>
+
+
+
+
+
+
+
+
+
+
@@ -5,31 +33,31 @@
-<%= stylesheet_link_tag 'css/org' %>
+<%#= stylesheet_link_tag 'css/org' %>
-
+
<% if @project.shared_versions.any? %>
@@ -89,8 +92,70 @@
<% end %>
-
-
-
+<% if @project.shared_versions.empty? %>
+<%= l(:milestone_no_data) %>
+<% end %>
+
+
新建里程碑
+ <%= form_for :version, :url => project_versions_path(@project),:html=>{:id=>"new_project_version_form"} do |f| %>
+
+
+
+ * <%= l(:field_name) %> :
+ <%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;" %>
+
+
+ <%= l(:label_version_description) %> :
+ <%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;"%>
+
+
+ <%= l(:milestone_date_closed) %> :
+ <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height: 28px;" %>
+ <%= calendar_for('version_effective_date') %>
+
+
+ <%= l(:field_status) %> :
+ <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :style=>"border:1px solid #e5e5e5 height:28px;" %>
+
+
+
+
取消 保存
+
+ <% end %>
+
+
+<% if @project.shared_versions.any? %>
+
+<% end %>
diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb
index 928360361..b9f3580fc 100644
--- a/app/views/repositories/_dir_list_content.html.erb
+++ b/app/views/repositories/_dir_list_content.html.erb
@@ -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) %>
<% if entry.is_dir? %>
- <%# 展开文件目录 %>
+ <%# 展开文件目录 %>
<% end %>
@@ -26,49 +26,21 @@
-
+
+ <%= (latest_changes.author_name) 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 %>
-
-
-
-
-
-
-
-
-
<% end %>
-
diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb
index 4c00ebb5c..5fb0d3fb1 100644
--- a/app/views/users/_project_create.html.erb
+++ b/app/views/users/_project_create.html.erb
@@ -1,12 +1,12 @@
<% project = Project.find(activity.act_id) %>
<% user = User.find(project.user_id)%>
-
-
+
+
<%= 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} %>
-
+
<% if user.try(:realname) == ' ' %>
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml
index ec65b24bb..4627b4202 100644
--- a/config/locales/commons/zh.yml
+++ b/config/locales/commons/zh.yml
@@ -202,6 +202,7 @@ zh:
label_subject_empty: 主题不能为空
label_no_data: 没有任何数据可供显示
+ milestone_no_data: 尚未创建里程碑
label_repository_no_data: 每个项目只能创建一个版本库!
# 项目、课程、用户公用
label_settings: 配置
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 4e2a43962..513723c48 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1460,6 +1460,7 @@ zh:
label_bids_credit_number: 分
field_budget: 奖励
field_deadline: 截止日期
+ milestone_date_closed: 结束日期
field_is_evaluation: 是否启动互评
field_proportion: 教师评分比例
label_tags_selected: 已选标签