-<%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
+<% if @project.project_type == 1 %>
+
+<%= link_to(l(:label_file_upload), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
+<%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
+
@@ -11,8 +17,8 @@
<%= sort_header_tag('filename', :caption => l(:field_filename)) %>
<%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
- <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
-
@@ -30,8 +36,8 @@
<%= link_to_attachment file, :download => true, :title => file.description %>
<%= format_time(file.created_on) %>
<%= number_to_human_size(file.filesize) %>
- <%= file.downloads %>
- <%= file.digest %>
+
+ <%= file.description %>
<%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
diff --git a/app/views/issue_categories/issue_categories_helper.rb b/app/views/issue_categories/issue_categories_helper.rb
new file mode 100644
index 000000000..9189025c3
--- /dev/null
+++ b/app/views/issue_categories/issue_categories_helper.rb
@@ -0,0 +1,21 @@
+# encoding: utf-8
+#
+# Redmine - project management software
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+module IssueCategoriesHelper
+end
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb
index c49179857..a7f5f6593 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -134,7 +134,7 @@
<%= link_to(l(:label_overview), project_path(@project))%>
<%= link_to(l(:label_homework), {:controller => 'projects', :action => 'homework'})%>
<%= link_to(l(:label_course_file), project_files_path(@project))%>
- <%= link_to "课程通知", {:controller => 'news', :action => 'index', :project_id => @project}%>
+ <%= link_to(l(:label_course_news), {:controller => 'news', :action => 'index', :project_id => @project})%>
<%= link_to(l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project}) %>
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index 613a1a647..7e6fbd546 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -1,8 +1,16 @@
-<%= link_to(l(:label_news_new),
+ <% if @project.project_type == 1%>
+<%= link_to(l(:label_news_notice),
new_project_news_path(@project),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
+ <% else %>
+ <%= link_to(l(:label_news_new),
+ new_project_news_path(@project),
+ :class => 'icon icon-add',
+ :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
+
+ <% end %>
@@ -43,9 +51,15 @@
<%=link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %>
+ <% if @project.project_type == 1 %>
+ <%=link_to_user(news.author)if news.respond_to?(:author) %> <%= l(:label_project_notice)%> <%= link_to h(news.title), news_path(news) %>
+
+ <% else %>
+
<%=link_to_user(news.author)if news.respond_to?(:author) %> <%= l(:label_project_newshare)%> <%= link_to h(news.title), news_path(news) %>
-
+
+ <% end %>
<%= textilizable(news, :description) %>
diff --git a/app/views/projects/homework.html.erb b/app/views/projects/homework.html.erb
index 850c4bc3d..a65063b18 100644
--- a/app/views/projects/homework.html.erb
+++ b/app/views/projects/homework.html.erb
@@ -10,7 +10,7 @@
<%= link_to(l(:label_course_homework_new), {:controller => 'projects', :action => 'new_homework'}, :class => 'icon icon-add') %>
- <% end %>
+ <% end %>
diff --git a/app/views/projects/member.html.erb b/app/views/projects/member.html.erb
index 0377e9f6f..0a11d7bd2 100644
--- a/app/views/projects/member.html.erb
+++ b/app/views/projects/member.html.erb
@@ -14,7 +14,23 @@
<% end %>
<%= member.user.nil? ? '' : (link_to image_tag(url_to_avatar(member.user), :class => 'avatar'), :class => "avatar") %>
<%= content_tag "div", link_to_user(member.principal), :class => "nomargin avatar_name" %>
+
+ <% if @project.project_type == 1 %>
+
+ <% if member.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
+ Teacher
+ <% elsif member.roles.sort.collect(&:to_s).join(', ') =='Reporter' %>
+ Student
+ <% elsif member.roles.sort.collect(&:to_s).join(', ') =='TA' %>
+ TA
+ <% else %>
+
+ <% end %>
+
+ <% else%>
<%= content_tag "div", content_tag("p", member.roles.sort.collect(&:to_s).join(', ')), :class => "clear avatar_name" %>
+ <% end %>
+
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index e4b00fdb6..8cbdf02ad 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -17,7 +17,19 @@
<%= l(:label_role_plural) %>:
<% roles.each do |role| %>
- <%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %>
+
+ <% if @project.project_type == 1 %>
+ <% if role == Role.find(3) %>
+ <%= check_box_tag 'membership[role_ids][]', role.id %>Teacher
+ <% elsif role == Role.find(5) %>
+ <%= check_box_tag 'membership[role_ids][]', role.id %>Student
+ <% elsif role == Role.find(4)%>
+ <% else %>
+ <%= check_box_tag 'membership[role_ids][]', role.id %><%=h role %>
+ <% end %>
+ <% else %>
+ <%= check_box_tag 'membership[role_ids][]', role.id %><%=h role %>
+ <% end %>
<% end %>
@@ -40,11 +52,29 @@
<%= link_to_user member.principal %>
- <%=h member.roles.sort.collect(&:to_s).join(', ') %>
+
+ <% if @project.project_type == 1 %>
+
+ <% if member.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
+ Teacher
+ <% elsif member.roles.sort.collect(&:to_s).join(', ') =='Reporter' %>
+ Student
+ <% elsif member.roles.sort.collect(&:to_s).join(', ') =='TA' %>
+ TA
+ <% else %>
+
+ <% end %>
+
+ <% 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| %>
<%= check_box_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?} %> <%=h role %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 0cb73d544..b40dbe436 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -571,6 +571,7 @@ zh:
label_history: 历史记录
label_attachment: 文件
label_attachment_new: 新建文件
+ label_file_upload: 上传资料
label_attachment_delete: 删除文件
label_attachment_plural: 文件
label_file_added: 文件已添加
@@ -578,13 +579,14 @@ zh:
label_report_plural: 报表
label_news: 新闻
label_news_new: 添加新闻
+ label_news_notice: 发布课程通知
label_news_plural: 新闻
label_news_latest: 最近的新闻
label_news_view_all: 查看所有新闻
label_news_added: 新闻已添加
label_settings: 配置
label_overview: 课程动态
- label_question_student: 学生咨询 #huang
+ label_question_student: 问题咨询 #huang
label_homework_commit: 提交作业 #huang
label_course_file: 资料下载
label_course_news: 课程通知
@@ -811,6 +813,7 @@ zh:
label_project_issues: "缺陷"
label_project_newother: "查看其他评论"
label_project_newshare: "分享了"
+ label_project_notice: "发布了通知:"
label_project_newadd: "添加了"
label_project_unadd: "暂无项目,赶快去创建吧!"
label_project_un: "该用户暂未参与任何项目!"
@@ -1459,7 +1462,7 @@ zh:
label_public_info: 若不公开,仅项目成员可见该项目
label_course_student: 学生
label_homework: 课程作业
- label_course_file: 资料下载
+ label_course_file: 资料共享
label_course_new_homework: 新建作业
label_course_homework_list: 作业列表
label_course_homework_new: 发布作业