Merge remote-tracking branch 'origin/szzh' into guange_dev

This commit is contained in:
guange 2015-04-10 10:48:17 +08:00
commit c489d2400b
35 changed files with 368 additions and 207 deletions

View File

@ -80,6 +80,10 @@ module Mobile
class_period: params[:class_period]
}
course = ::Course.find(params[:course_id])
# 如果没有传密码过来,那就把原来的密码给上,不然会不更新
if params[:password].nil? || params[:password].blank?
cs_params[:course][:password] = course[:password]
end
cs.edit_course_authorize(current_user,course)
course = cs.edit_course(cs_params, course,current_user)
present :data, course, with: Mobile::Entities::Course

View File

@ -681,9 +681,10 @@ class CoursesController < ApplicationController
"show_course_files" => true,
"show_course_news" => true,
"show_course_messages" => true,
"show_course_journals_for_messages" => true,
#"show_course_journals_for_messages" => true,
"show_bids" => true,
"show_homeworks" => true
"show_homeworks" => true,
#"show_polls" => true
}
@date_to ||= Date.today + 1
@date_from = (@date_to - @days) > @course.created_at.to_date ? (@date_to - @days) : @course.created_at.to_date

View File

@ -29,6 +29,9 @@ class SettingsController < ApplicationController
end
def edit
hidden_non_project = Setting.find_by_name("hidden_non_project")
@text = (hidden_non_project && hidden_non_project.value == "0") ? l(:label_show_non_project) : l(:label_hidden_non_project)
@notifiables = Redmine::Notifiable.all
if request.post? && params[:settings] && params[:settings].is_a?(Hash)
settings = (params[:settings] || {}).dup.symbolize_keys
@ -70,4 +73,20 @@ class SettingsController < ApplicationController
rescue Redmine::PluginNotFound
render_404
end
#隐藏/显示非项目信息
def hidden_non_project
@notifiable = Setting.find_by_name("hidden_non_project")
if @notifiable
@notifiable.value == "1" ? @notifiable.value = 0 : @notifiable.value = 1
@notifiable.save
else
@notifiable = Setting.new()
@notifiable.name = "hidden_non_project"
@notifiable.value = 0
@notifiable.save
end
redirect_to settings_url
end
end

View File

@ -132,9 +132,10 @@ module ApplicationHelper
def link_to_user_header user,canShowRealName=false,options={}
if user.is_a?(User)
if canShowRealName
name = h(user.realname(options[:format]))
name = user.show_name
name = user.login if name == ""
else
name = h(user.name(options[:format]))
name = user.login
end
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class]
else
@ -1947,6 +1948,8 @@ module ApplicationHelper
end
def bootstrap_render_dynamic_nav
hidden_non_project = Setting.find_by_name("hidden_non_project")
visiable = !(hidden_non_project && hidden_non_project.value == "0")
main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_domain}
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
@ -1964,21 +1967,21 @@ module ApplicationHelper
#@nav_dispaly_project_label
nav_list = Array.new
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1 && visiable
# nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1 && visiable
nav_list.push(main_project_link) if @nav_dispaly_main_project_label
nav_list.push(main_course_link) if @nav_dispaly_main_course_label && @show_course == 1
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1
nav_list.push(main_course_link) if @nav_dispaly_main_course_label && @show_course == 1 && visiable
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1 && visiable
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1 && visiable
# nav_list.push(projects_link) if @nav_dispaly_project_label
#nav_list.push(users_link) if @nav_dispaly_user_label
# nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
nav_list.push(bids_link) if @nav_dispaly_bid_label
nav_list.push(forum_link) if @nav_dispaly_forum_label
nav_list.push(stores_link) if @nav_dispaly_store_all_label
nav_list.push(bids_link) if @nav_dispaly_bid_label && visiable
nav_list.push(forum_link) if @nav_dispaly_forum_label && visiable
nav_list.push(stores_link) if @nav_dispaly_store_all_label && visiable
content_li = ''
nav_list.collect do |nav_item|

View File

@ -52,7 +52,7 @@ module CoursesHelper
end
def course_poll_count
Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}").count
Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id} and polls_status in (2,3)").count
end
def course_feedback_count
@ -632,48 +632,73 @@ module CoursesHelper
#获取课程动态
def get_course_activity courses, activities
@course_ids=activities.keys()
@bid_ids = []
days = Setting.activity_days_default.to_i
date_to ||= Date.today + 1
date_from = date_to - days-1.years
#原来课程动态计算当期时间前(一年+一月)的动态
# date_to ||= Date.today + 1
# #date_from = date_to - days-1.years
date_from = @course.created_at.to_date-days
#file_count
Attachment.where(container_id: @course_ids, container_type: Course).where("created_on>?", date_from).each do |attachment|
if attachment.is_public? || User.current.member_of_course?(@course) || User.current.admin?
activities[attachment.container_id]+=1
else
activities[attachment.container_id]
end
end
#message_count
#Board.where(course_id: @course_ids).each do |board|
# activities[board.course_id]+=board.messages.where("updated_on>?", date_from).count
#end
#message_count
Board.where(course_id: @course_ids).each do |board|
# activities[board.course_id]+=1
activities[board.course_id]+=board.messages.where("updated_on>?", date_from).count
countmessage = 0
# 课程人员退出课程后,之前在讨论区回帖不计入课程动态统计
board.messages.where("updated_on>?", date_from).each do |message|
if message.author.member_of_course?(@course)
countmessage+=1
end
end
activities[board.course_id]+=countmessage
end
#news
News.where(course_id: @course_ids).where("created_on>?",date_from).each do |news|
if news.author.member_of_course?(@course)
activities[news.course_id]+=1
end
#feedbackc_count
JournalsForMessage.where(jour_id: @course_ids, jour_type: Course).each do |jourformess|
activities[jourformess.jour_id]+=1
end
#homework_count
#HomeworkForCourse.where(course_id: @course_ids).each do |homework|
# @bid_ids<<homework.bid_id
# activities[homework.bid_id]+=Bid.where(id: @bid_ids).where("created_on>?",date_from).count
#feedback_count 留言目前有问题留待下一步处理
#JournalsForMessage.where(jour_id: @course_ids, jour_type: Course).each do |jourformess|
# activities[jourformess.jour_id]+=1
#end
#homework_count
HomeworkForCourse.where(course_id: @course_ids).each do |homework|
countbid=0
# @bid_ids<<homework.bid_id
Bid.where(id: homework.bid_id).where("created_on>?",date_from).each do |bid|
countbid+=1
end
activities[homework.course_id]+=countbid
end
#@bid_ids.each do |bid_id|
# activities[] +=Bid.where(id: bid_id ).where("created_on>?",date_from).count
#end
#poll_count
#Poll.where(polls_group_id: @course_ids, polls_type: Course, polls_status: 2||3).where("published_at>?",date_from).each do |poll|
# activities[poll.polls_group_id]+=1
#end
#end
# 动态数 + 1 ( 某某创建了该课程 )
# activities.each_pair { |key, value| activities[key] = value + 1 }
activities.each_pair { |key, value| activities[key] = value + 1 }
return activities
end
@ -759,7 +784,7 @@ module CoursesHelper
def visable_attachemnts_incourse course
result = []
course.attachments.each do |attachment|
if attachment.is_public? || User.current.member_of_course?(course)
if attachment.is_public? || User.current.member_of_course?(course) || User.current.admin?
result << attachment
end
end

View File

@ -44,7 +44,11 @@ module MembersHelper
# add by nwb
# 课程可添加的成员列表
def render_principals_for_new_course_members(course)
if params[:q] && params[:q] != ""
scope = Principal.active.sorted.not_member_of_course(course).like(params[:q])
else
scope = []
end
principals = paginateHelper scope,10
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')

View File

@ -49,6 +49,7 @@ class JournalsForMessage < ActiveRecord::Base
acts_as_activity_provider :type => 'course_journals_for_messages',
:author_key => :user_id,
:permission => :view_course_journals_for_messages,
:timestamp => "#{self.table_name}.updated_on",
:find_options => {:include => :course }

View File

@ -6,4 +6,23 @@ class Poll < ActiveRecord::Base
has_many :poll_questions, :dependent => :destroy,:order => "#{PollQuestion.table_name}.question_number"
has_many :poll_users, :dependent => :destroy
has_many :users, :through => :poll_users #该文件被哪些用户提交答案过
# 添加课程的poll动态
# has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
# after_create :act_as_activity
# acts_as_event :title => Proc.new {|o| "#{l(:label_my_message)} ##{o.id}: #{o.name}" },
# :description => :description,
# :author => :author,
# :url => Proc.new {|o| {:controller => 'poll', :action => 'show', :id => o.id}}
# acts_as_activity_provider :type => 'polls',
# :permission => :view_course_polls,
#:find_options => {:include => [:course, :author]},
#:timestamp => "#{self.table_name}.published_at",
# :author_key => :author_id
# def act_as_activity
# self.acts << Activity.new(:user_id => self.user_id)
# end
end

View File

@ -434,7 +434,7 @@ class CoursesService
many_times = course.homeworks.index(bid) + 1
name = bid.name
homework_count = bid.homeworks.count #已提交的作业数量
student_questions_count = bid.commit.nil? ? 0 : bid.commit
student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count
description = bid.description
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
state = bid.comment_status
@ -454,7 +454,7 @@ class CoursesService
many_times = course.homeworks.index(bid) + 1
name = bid.name
homework_count = bid.homeworks.count #已提交的作业数量
student_questions_count = bid.commit.nil? ? 0 : bid.commit
student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count
description = bid.description
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
state = bid.comment_status

View File

@ -1,7 +1,6 @@
<% if @statue == 1%>
alert('启动成功');
$("#<%= @bid.id %>_start_anonymous_comment").remove();
$("#<%= @bid.id %>_anonymous_comment").append('<%= link_to "关闭匿评", alert_anonymous_comment_bid_path(@bid), remote: true, id:"#{@bid.id}_stop_anonymous_comment" %>');
$("#<%= @bid.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_bid_path(@bid), remote: true, id:"#{@bid.id}_stop_anonymous_comment",:class => "fr mr10 work_edit")%>');
<% elsif @statue == 2 %>
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
<% elsif @statue == 3%>

View File

@ -1,2 +1,2 @@
alert('关闭成功');
$("#<%= @bid.id %>_anonymous_comment").html('<a href="javascript:" style="background:#8e8e8e;">匿评结束</a>');
$("#<%= @bid.id %>_stop_anonymous_comment").replaceWith('<a class="fr pr_join_span mr10 span_wping_background" title="匿评结束">匿评结束</a>');

View File

@ -1,6 +1,6 @@
<% @members.each do |member| %>
<li >
<%= link_to_user_header member.principal,false,:class => "w150 c_orange fl" %>
<%= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %>
<span class="w150 fl">
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),

View File

@ -15,7 +15,7 @@
</div>
<div class="cl"></div>
<div class="for_img_thumbnails">
<% curse_attachments.sort.reverse.each do |file| %>
<% curse_attachments.each do |file| %>
<% if file.is_public? || User.current.member_of_course?(course) %>
<div class="re_con_box">
<div class="">

View File

@ -26,7 +26,10 @@
<tr>
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %>
<span class="font_description2">
最后回复:<%=link_to_user topic.last_reply.try(:author) %>
<% author = topic.last_reply.try(:author)%>
<% if author%>
最后回复:<%=link_to_user author %>
<% end%>
</span>
<br />
</span></td>

View File

@ -11,8 +11,10 @@
<ul style="padding:0 0; margin:0 0;display:inline;">
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;" class="loggedas_li">
<%=link_to_user(User.current)%>
<% hidden_non_project = Setting.find_by_name("hidden_non_project")
visiable = hidden_non_project && hidden_non_project.value == "0"%>
<ul class="sub_menu">
<% if @show_course == 1 %>
<% if @show_course == 1 && !visiable %>
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
<% hasCourse=false %>
<% User.current.courses.each do |course| %>

View File

@ -53,7 +53,7 @@
<div class="sidebar-forums">
<div class="forums-line">
<div class="forums-title"><%= @forum.name %></div>
<div class="forums-description"><%= @forum.description %></div>
<div class="forums-description"><%= @forum.description.html_safe %></div>
</div>
<!--informations-->
<div class="formus-first-title" >创建人信息</div>

View File

@ -32,8 +32,10 @@
padding-left: 5px !important;
padding-right: 5px !important;
line-height: 1.9;
float: left;
}
.span_wping a:hover{ background-color:#03a1b3;}
.span_wping_background{background: #CCC !important;}
</style>
</head>
<body class="<%= h body_css_classes %>">

View File

@ -84,7 +84,7 @@
<div class="sidebar-forums">
<div class="forums-line">
<div class="forums-title"><%= @forum.name %></div>
<div class="forums-description"><%= @forum.description %></div>
<div class="forums-description"><%= @forum.description.html_safe %></div>
</div>
<!--informations-->
<div class="formus-first-title" >创建人信息</div>

View File

@ -145,6 +145,7 @@
<%= f.text_area 'user_introduction', :rows => 3,
:cols => 65,
:placeholder => "#{l(:label_my_brief_introduction)}",
:maxlength => 200,
:style => "resize: none;",
:class => 'noline'%>
</td>

View File

@ -64,7 +64,7 @@
<%=h @memo.subject %>
</div>
<div class="memo-content" id="memo-content_div">
<%= textAreailizable(@memo,:content) %>
<%= @memo.content.html_safe %>
<p>
<% if @memo.attachments.any?%>
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>

View File

@ -25,7 +25,7 @@
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :method => :post}) do |f| %>
<div class="invi_search">
<input hidden="hidden" value="true" name="flag">
<input id="principal_search" class="invi_search_input fl" type="text" placeholder="请输入用户名称来搜索好友">
<input id="principal_search" class="invi_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',:flag => true) }')" %>
<div class="cl"></div>

View File

@ -1,4 +1,6 @@
<h3><%= l(:label_settings) %></h3>
<h3 style="float: left;"><%=l(:label_settings)%></h3>
<%= link_to @text,settings_hidden_non_project_path,:id => "hidden_non_project",:style => "float: right;margin-right: 60px;margin-top: 9px;"%>
<div class="clear"></div>
<%= render_tabs administration_settings_tabs %>

View File

@ -0,0 +1,5 @@
<% if @notifiable.value == "0"%>
$("#hidden_non_project").replaceWith("<%= escape_javascript(link_to '显示非项目信息',settings_hidden_non_project_path,:id => 'hidden_non_project',:style => 'float: right;margin-right: 60px;margin-top: 9px;', :remote => true)%>");
<% else%>
$("#hidden_non_project").replaceWith("<%= escape_javascript(link_to '隐藏非项目信息',settings_hidden_non_project_path,:id => 'hidden_non_project',:style => 'float: right;margin-right: 60px;margin-top: 9px;', :remote => true)%>");
<% end%>

View File

@ -1,6 +1,9 @@
<%hidden_non_project = Setting.find_by_name("hidden_non_project")
visiable = hidden_non_project && hidden_non_project.value == "0"%>
<% unless visiable%>
<div class="linkother" style="margin-left: 30%; float: left">
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
</div>
<% end%>

View File

@ -213,6 +213,10 @@ en:
button_unfollow: Unfollow
button_follow: Follow
button_browse: Browse
button_create: Create
label_preview: Preview
button_update: Update
button_copy: Copy
#
@ -367,9 +371,9 @@ en:
label_log_active_record_time_percent: "AR响应时间百分比"
views:
pagination:
first: "&laquo; 首页"
last: "末页 &raquo;"
previous: "&laquo; 上一页"
next: "下一页 &raquo;"
first: "&laquo; First"
last: "Last &raquo;"
previous: "&laquo; Previous"
next: "Next &raquo;"
truncate: "..."

View File

@ -218,7 +218,10 @@ zh:
button_watch: 跟踪
button_unwatch: 取消跟踪
button_browse: 浏览
button_create: 提交
label_preview: 预览
button_update: 更新
button_copy: 复制
#
# Trustie上传头像模块

View File

@ -126,7 +126,7 @@ en:
field_logo_size: Logo Size
field_start_page: Start page
field_subproject: Subproject
field_hours: Hours
field_activity: Activity
field_spent_on: Date
field_is_filter: Used as a filter
@ -401,7 +401,7 @@ en:
other: "%{count} projects"
label_project_all: All Projects
label_project_latest: Latest projects
label_issue_new: New issue
label_issue_plural: Issues Tracking
label_issue_view_all: View all issues
label_issues_by: "Issues by %{value}"
@ -524,9 +524,8 @@ en:
label_permissions: Permissions
label_current_status: Current status
label_new_statuses_allowed: New statuses allowed
label_all: all
label_any: any
label_none: none
label_nobody: nobody
label_next: Next
label_previous: Previous
@ -550,42 +549,8 @@ en:
label_comment_add: Add a comment
label_comment_added: Comment added
label_comment_delete: Delete comments
label_query: Custom query
label_query_plural: Custom queries
label_query_new: New query
label_my_queries: My custom queries
label_filter_add: Add filter
label_filter_plural: Query condition
label_equals: is
label_not_equals: is not
label_in_less_than: in less than
label_in_more_than: in more than
label_in_the_next_days: in the next
label_in_the_past_days: in the past
label_in_users: 'in the user '
label_greater_or_equal: '>='
label_less_or_equal: '<='
label_between: between
label_in: in
label_today: today
label_all_time: all time
label_yesterday: yesterday
label_this_week: this week
label_last_week: last week
label_last_n_weeks: "last %{count} weeks"
label_last_n_days: "last %{count} days"
label_this_month: this month
label_last_month: last month
label_this_year: this year
label_date_range: Date range
label_less_than_ago: less than days ago
label_more_than_ago: more than days ago
label_ago: days ago
label_contains: contains
label_not_contains: doesn't contain
label_any_issues_in_project: any issues in project
label_any_issues_not_in_project: any issues not in project
label_no_issues_in_project: no issues in project
label_day_plural: days
label_repository: Repository
#add by tan
@ -626,7 +591,7 @@ en:
label_index_by_title: Index by title
label_index_by_date: Index by date
label_current_version: Current version
label_preview: Preview
label_feed_plural: Feeds
label_changes_details: Details of all changes
@ -819,10 +784,9 @@ en:
button_reset: Reset
button_rename: Rename
button_copy: Copy
button_copy_and_follow: Copy and follow
button_annotate: Annotate
button_update: Update
button_configure: Configure
button_quote: Quote
button_duplicate: Duplicate
@ -1199,8 +1163,7 @@ en:
label_issue_query_condition: Query condition
label_homework_source: Task
label_issue_query: Query
label_issue_cancel_query: Cancel query
field_reward_type: The type of reward
label_bid_publish: published
label_bid_project: projects
@ -1521,7 +1484,7 @@ en:
label_borad_project: Project-borad
label_borad_course: Course-borad
label_project_notice: release the notice

View File

@ -73,7 +73,7 @@ en:
#
# 项目托管平台
#
# 项目成员
# 项目成员列表
#
label_member_list: Members
@ -139,10 +139,57 @@ en:
label_issues_sum: 'Total'
lable_issues_undo: 'Unresolved'
label_successful_create: Successfully created
label_query: Custom query
label_issue_new: New issue
# 自定义查询
label_query_plural: Custom queries
label_query_new: New query
label_my_queries: My custom queries
label_filter_plural: Query condition
label_filter_add: Add filter
label_contains: contains
label_not_contains: doesn't contain
label_any: any
label_none: none
label_all: all
label_equals: is
label_not_equals: is not
label_in_less_than: in less than
label_in_more_than: in more than
label_in_the_next_days: in the next
label_in_the_past_days: in the past
label_in_users: 'in the user '
label_greater_or_equal: '>='
label_less_or_equal: '<='
label_between: between
label_in: in
label_today: today
label_all_time: all time
label_yesterday: yesterday
label_this_week: this week
label_last_week: last week
label_last_n_weeks: "last %{count} weeks"
label_last_n_days: "last %{count} days"
label_this_month: this month
label_last_month: last month
label_this_year: this year
label_date_range: Date range
label_less_than_ago: less than days ago
label_more_than_ago: more than days ago
label_ago: days ago
label_contains: contains
label_not_contains: doesn't contain
label_any_issues_in_project: any issues in project
label_any_issues_not_in_project: any issues not in project
label_no_issues_in_project: no issues in project
#
label_issue_query: Query
label_issue_cancel_query: Cancel query
# 问题优先级
default_priority_low: Low
@ -150,7 +197,7 @@ en:
default_priority_high: High
default_priority_urgent: Urgent
default_priority_immediate: Immediate
field_hours: Hours
#
# 项目托管平台
@ -205,7 +252,7 @@ en:
label_input_email: Please input email address
label_invite_trustie_user: "Invite Trustie registered users"
label_invite_trustie_user_tips: "Type to find users"
label_invite_trustie_user_tips: "Type nickname to find users"
label_user_role_null: User and Role can not be blank
label_invite_project: "invites you to join the project"
label_invite_success: Successful invitation
@ -228,7 +275,7 @@ en:
field_is_public: Public
field_hidden_repo: code protected
button_create: Create
#

View File

@ -75,7 +75,7 @@ zh:
#
# 项目托管平台
#
# 项目成员
# 项目成员列表
#
label_member_list: 成员列表
@ -139,22 +139,116 @@ zh:
label_file_count: "个文件已上传"
text_are_you_sure_all: 您确定要删除所有文件吗
#
# 项目托管平台
#
# 问题跟踪
#
label_successful_create: 创建成功
label_issues_sum: '问题总数'
lable_issues_undo: '未解决:'
label_issue_new: 新建问题
label_query: 自定义查询
#
# 自定义查询
label_query_plural: 自定义查询
label_query_new: 新建查询
label_filter_plural: 查询条件
label_filter_add: 增加过滤器
# 自定义查询> 过滤器类别
field_status: 状态
field_fixed_version: 目标版本
field_assigned_to_role: 角色的成员
field_category: 类别
field_created_on: 创建于
field_updated_on: 更新于
field_closed_on: 已关闭
field_start_date: 开始日期
field_due_date: 计划完成日期
field_estimated_hours: 预期时间
field_assigned_to: 指派给
field_priority: 优先级
field_done_ratio: "% 完成"
field_is_private: 私有
field_watcher: 跟踪者
label_relates_to: 关联到
label_duplicates: 重复
label_duplicated_by: 与其重复
label_blocks: 阻挡
label_blocked_by: 被阻挡
label_precedes: 优先于
label_follows: 跟随于
label_copied_to: 复制到
label_copied_from: 复制于
# 自定义查询> 过滤器属性
label_contains: 包含
label_not_contains: 不包含
label_none:
label_any: 全部
label_all: 全部
label_equals: 等于
label_not_equals: 不等于
label_open_issues: 打开
label_closed_issues: 已关闭
label_greater_or_equal: '>='
label_less_or_equal: '<='
label_between: 介于
label_in_less_than: 剩余天数小于
label_in_more_than: 剩余天数大于
label_in_the_next_days: 之后
label_in_the_past_days: 之前
label_in: 剩余天数
label_today: 今天
label_all_time: 全部时间
label_yesterday: 昨天
label_this_week: 本周
label_last_week: 上周
label_last_n_weeks: 上 %{count} 周前
label_last_n_days: "最后 %{count} 天"
label_this_month: 本月
label_last_month: 上月
label_this_year: 今年
label_date_range: 日期范围
label_less_than_ago: 之前天数少于
label_more_than_ago: 之前天数大于
label_ago: 之前第
label_any_issues_in_project: 项目内任意问题
label_any_issues_not_in_project: 项目外任意问题
label_no_issues_in_project: 项目内无相关问题
label_issue_query: 查询
label_issue_cancel_query: 取消查询
# 新建问题
field_tracker: 跟踪
field_subject: 主题
field_quote: 描述
label_change_properties: 修改属性
# 属性同上自定义属性
default_priority_low:
default_priority_normal: 普通
default_priority_high:
default_priority_urgent: 紧急
default_priority_immediate: 立刻
field_hours: 小时
label_issue_watchers: 跟踪者
label_search_for_watchers: 通过查找方式添加跟踪者
#问题更新
#顶和踩
label_issue_praise: 好问题,顶!
label_issue_tread: 烂问题,踩!
label_issue_praise_over: 我刚才顶过了~
label_issue_tread_over: 我刚才踩过了~
label_issue_not_praise_over: 不能顶自己~
label_issue_not_treed_over: 不能踩自己~
label_issues_score_not_enough: 积分不够,不能踩别人~
#
@ -231,7 +325,7 @@ zh:
text_project_identifier_info: "小写字母a-z、数字、破折号-和下划线_可以使用。<br />一旦保存,标识无法修改。"
field_is_public: 公开
field_hidden_repo: 隐藏代码库
button_create: 提交
#

View File

@ -95,8 +95,7 @@ zh:
field_author: 作者
field_created_on: 创建于
field_updated_on: 更新于
field_field_format: 格式
field_is_for_all: 用于所有项目
field_possible_values: 可能的值
@ -104,22 +103,19 @@ zh:
field_min_length: 最小长度
field_max_length: 最大长度
field_value:
field_category: 类别
field_title: 标题
field_web_title: 浏览器标题
field_project: 项目
field_issue: 问题
field_status: 状态
field_notes: 说明
field_is_closed: 已关闭的问题
field_is_default: 默认值
field_tracker: 跟踪
field_subject: 主题
field_quote: 描述
field_due_date: 计划完成日期
field_assigned_to: 指派给
field_priority: 优先级
field_fixed_version: 目标版本
field_user: 用户
field_principal: 用户
field_role: 角色
@ -145,8 +141,8 @@ zh:
field_attr_lastname: 姓氏属性
field_attr_mail: 邮件属性
field_onthefly: 即时用户生成
field_start_date: 开始日期
field_done_ratio: "% 完成"
field_auth_source: 认证模式
field_hide_mail: 隐藏我的邮件地址
field_comments: 注释
@ -154,7 +150,7 @@ zh:
field_logo_size: logo大小
field_start_page: 起始页
field_subproject: 子项目
field_hours: 小时
field_activity: 活动
field_spent_on: 日期
field_is_filter: 作为过滤条件
@ -162,7 +158,7 @@ zh:
field_delay: 延期
field_assignable: 问题可指派给此角色
field_redirect_existing_links: 重定向到现有链接
field_estimated_hours: 预期时间
field_column_names:
field_time_entries: 工时
field_time_zone: 时区
@ -171,13 +167,13 @@ zh:
field_comments_sorting: 显示注释
field_parent_title: 上级页面
field_editable: 可编辑
field_watcher: 跟踪者
field_content: 内容
field_group_by: 根据此条件分组
field_sharing: 共享
field_parent_issue: 父任务
field_member_of_group: 用户组的成员
field_assigned_to_role: 角色的成员
field_text: 文本字段
field_visible: 可见的
@ -386,7 +382,7 @@ zh:
label_project_all: 所有的项目
label_project_latest: 最近的项目
label_issue: 问题
label_issue_new: 新建问题
label_issue_plural: 问题跟踪
label_issue_view_all: 查看所有问题
label_issues_by: "按 %{value} 分组显示问题"
@ -588,9 +584,9 @@ zh:
label_export_to: 导出
label_read: 读取...
label_public_projects: 公开的项目
label_open_issues: 打开
label_open_issues_plural: 打开
label_closed_issues: 已关闭
label_closed_issues_plural: 已关闭
label_x_open_issues_abbr_on_total:
zero: 0 打开 / %{total}
@ -608,8 +604,7 @@ zh:
label_permissions: 权限
label_current_status: 当前状态
label_new_statuses_allowed: 允许的新状态
label_all: 全部
label_none:
label_nobody: 无人
label_next: 下一页
label_previous: 上一页
@ -633,34 +628,10 @@ zh:
label_comment_add: 添加评论
label_comment_added: 评论已添加
label_comment_delete: 删除评论
label_query: 自定义查询
label_query_plural: 自定义查询
label_query_new: 新建查询
label_filter_add: 增加过滤器
label_filter_plural: 查询条件
label_equals: 等于
label_not_equals: 不等于
label_in_less_than: 剩余天数小于
label_in_more_than: 剩余天数大于
label_greater_or_equal: '>='
label_less_or_equal: '<='
label_in: 剩余天数
label_today: 今天
label_all_time: 全部时间
label_yesterday: 昨天
label_this_week: 本周
label_last_week: 上周
label_last_n_days: "最后 %{count} 天"
label_this_month: 本月
label_last_month: 上月
label_this_year: 今年
label_date_range: 日期范围
label_less_than_ago: 之前天数少于
label_more_than_ago: 之前天数大于
label_ago: 之前天数
label_contains: 包含
label_not_contains: 不包含
label_day_plural:
label_repository: 版本库
label_course_repository: 代码库
@ -702,7 +673,7 @@ zh:
label_index_by_title: 按标题索引
label_index_by_date: 按日期索引
label_current_version: 当前版本
label_preview: 预览
label_feed_plural: Feeds
label_changes_details: 所有变更的详情
label_spent_time: 耗时
@ -727,13 +698,7 @@ zh:
label_loading: 载入中...
label_relation_new: 新建关联
label_relation_delete: 删除关联
label_relates_to: 关联到
label_duplicates: 重复
label_duplicated_by: 与其重复
label_blocks: 阻挡
label_blocked_by: 被阻挡
label_precedes: 优先于
label_follows: 跟随于
label_end_to_start: 结束-开始
label_end_to_end: 结束-结束
label_start_to_start: 开始-开始
@ -794,7 +759,7 @@ zh:
#end
label_user_commits: "代码提交"
label_user_newfeedback: "留言" ## huang添加的
label_feedback_success: "留言成功"
label_feedback_fail: "留言失败"
label_user_login: "最后登录"
@ -827,7 +792,7 @@ zh:
label_registration_automatic_activation: 自动激活帐号
label_display_per_page: "每页显示:%{value}"
label_age: 提交时间
label_change_properties: 修改属性
label_general: 一般
label_scm: 管理系统
label_plugins: 插件
@ -841,7 +806,7 @@ zh:
label_planning: 计划
label_incoming_emails: 接收邮件
label_generate_key: 生成一个key
label_issue_watchers: 跟踪者
label_example: 示例
label_display: 显示
label_sort: 排序
@ -910,7 +875,7 @@ zh:
button_copy: 复制
button_copy_and_follow: 复制并转到新问题
button_annotate: 追溯
button_update: 更新
button_configure: 配置
button_quote: 引用
button_duplicate: 副本
@ -1025,7 +990,7 @@ zh:
field_issues_visibility: 问题可见
label_issues_visibility_all: 全部问题
permission_set_own_issues_private: 设置自己的问题为公开或私有
field_is_private: 私有
permission_set_issues_private: 设置问题为公开或私有
label_issues_visibility_public: 全部非私有问题
text_issues_destroy_descendants_confirmation: 此操作同时会删除 %{count} 个子任务。
@ -1045,7 +1010,7 @@ zh:
text_scm_command_not_available: Scm命令不可用。 请检查管理面板的配置。
text_git_repository_note: 库中无内容。(e.g. /gitrepo, c:\gitrepo)
notice_issue_successful_create: 问题 %{id} 已创建。
label_between: 介于
setting_issue_group_assignment: 允许问题被分配给组
label_diff: 查看差别
description_query_sort_criteria_direction: 排序方式
@ -1100,7 +1065,7 @@ zh:
text_issue_conflict_resolution_cancel: 取消我所有的变更并重新刷新显示 %{link} 。
permission_manage_related_issues: 相关问题管理
field_auth_source_ldap_filter: LDAP 过滤器
label_search_for_watchers: 通过查找方式添加跟踪者
notice_account_deleted: 您的账号已被永久删除(账号已无法恢复)。
setting_unsubscribe: 允许用户退订
button_delete_my_account: 删除我的账号
@ -1136,16 +1101,13 @@ zh:
label_attribute_of_assigned_to: 分配给 %{name}
label_attribute_of_fixed_version: 目标版本 %{name}
label_copy_subtasks: 复制子任务
label_copied_to: 复制到
label_copied_from: 复制于
label_any_issues_in_project: 项目内任意问题
label_any_issues_not_in_project: 项目外任意问题
field_private_notes: 私有注解
permission_view_private_notes: 查看私有注解
permission_set_notes_private: 设置为私有注解
label_no_issues_in_project: 项目内无相关问题
label_any: 全部
label_last_n_weeks: 上 %{count} 周前
setting_cross_project_subtasks: 支持跨项目子任务
label_cross_project_descendants: 与子项目共享
label_cross_project_tree: 与项目树共享
@ -1153,8 +1115,7 @@ zh:
label_cross_project_system: 与所有项目共享
button_hide: 隐藏
setting_non_working_week_days: Non-working days
label_in_the_next_days: in the next
label_in_the_past_days: in the past
label_attribute_of_user: User's %{name}
text_turning_multiple_off: If you disable multiple values, multiple values will be
removed in order to preserve only one value per item.
@ -1168,7 +1129,7 @@ zh:
label_gantt_progress_line: 进度线
setting_jsonp_enabled: Enable JSONP support
field_inherit_members: Inherit members
field_closed_on: 已关闭
setting_default_projects_tracker_ids: Default trackers for new projects
label_total_time: 合计
#Customer addedAdded by nie
@ -1401,12 +1362,7 @@ zh:
# modified by bai
label_welcome_leave_message: 您好!系统目前正在公测,有意见和建议请
label_welcome_click_me: 点击我
label_issue_praise: 好问题,顶!
label_issue_tread: 烂问题,踩!
label_issue_praise_over: 我刚才顶过了~
label_issue_tread_over: 我刚才踩过了~
label_issue_not_praise_over: 不能顶自己~
label_issue_not_treed_over: 不能踩自己~
label_issues_score_not_enough: 积分不够,不能踩别人~
#end
@ -1442,8 +1398,7 @@ zh:
label_tags_related: 相关标签
button_project_tags_add: 增加
label_issue_query_condition: 查询条件
label_issue_query: 查询
label_issue_cancel_query: 取消查询
field_reward_type: 奖励类型
label_tags_no: 暂无标签!
label_course_description_no: 该课程未添加描述!
@ -2014,6 +1969,8 @@ zh:
label_recently_updated_courseware: 最近更新了课件
label_no_courses: 您没有参与任何课程,请搜索课程、加入课程,或者创建课程吧!
label_commit_failed: 提交失败
label_recently: 最近被
label_creat: 创建
#api end
label_end_time: 截止时间
@ -2031,4 +1988,6 @@ zh:
modal_valid_unpassing: 该分班已经存在
mail_footer: 点击修改邮件发送设置
label_show_non_project: 显示非项目信息
label_hidden_non_project: 隐藏非项目信息

View File

@ -736,6 +736,7 @@ RedmineApp::Application.routes.draw do
match 'settings', :controller => 'settings', :action => 'index', :via => :get
match 'settings/edit', :via => [:get, :post]
match 'settings/plugin/:id', :to => 'settings#plugin', :via => [:get, :post], :as => 'plugin_settings'
match 'settings/hidden_non_project', :via => [:get, :post]
match 'sys/projects', :via => :get
match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post

View File

@ -266,6 +266,8 @@ repository_domain:
default: repository.trustie.net
please_chose:
default: 请选择
hidden_non_project:
default: 1
plugin_redmine_ckeditor:
serialized: true
default: --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess

View File

@ -1,9 +0,0 @@
class CreateDiscussDemos < ActiveRecord::Migration
def change
create_table :discuss_demos do |t|
t.string :title
t.text :body
t.timestamps
end
end
end

View File

@ -137,6 +137,9 @@ Redmine::AccessControl.map do |map|
map.permission :paret_in_homework,{},:require => :member ,:belong_to_course => true
end
# map.course_module :polls do |map|
# map.permission :view_course_polls, {:polls => [:index,:show]},:require => :member, :belong_to_course => true
# end
map.course_module :boards do |map|
# map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member
@ -484,6 +487,7 @@ Redmine::Activity.map do |activity|
activity.register :course_messages, :default => false, :class_name => 'Message'
activity.register :homeworks, :class_name => 'Bid'
# activity.register :polls, :class_name => 'Poll'
end
Redmine::Search.map do |search|

View File

@ -243,7 +243,7 @@ a:hover.tijiao{ background:#0f99a9;}
.members_left ul li a{ float:left; text-align:center;}
.members_left ul li span{ float:left; text-align:center; color:#484747;}
.w150{ text-align:center; width:150px;}
.w150{ text-align:center; width:150px;min-height: 10px;}
.f_b{ font-weight: bold;}
.members_right label{ margin-left:15px;}
.N_search{ height:20px; border:1px solid #999;}