diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb
index 69d9ef524..4d07c23f8 100644
--- a/app/api/mobile/apis/activities.rb
+++ b/app/api/mobile/apis/activities.rb
@@ -29,7 +29,7 @@ module Mobile
if container_type == "All" || container_type == "Course"
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
user_course_ids = (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
- course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
+ course_types = "('Message','News','HomeworkCommon','Poll','Course')"
end
page = params[:page] ? params[:page] : 0
diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb
index d26779332..bfd559402 100644
--- a/app/api/mobile/apis/courses.rb
+++ b/app/api/mobile/apis/courses.rb
@@ -297,7 +297,7 @@ module Mobile
user = current_user
- course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
+ course_types = "('Message','News','HomeworkCommon','Poll','Course')"
activities = UserActivity.where("(container_type = 'Course' and container_id = #{params[:id]} and act_type in #{course_types})").order('updated_at desc')
page = params[:page] ? params[:page] : 0
diff --git a/app/api/mobile/entities/attachment.rb b/app/api/mobile/entities/attachment.rb
index 028ad633d..8200c04b2 100644
--- a/app/api/mobile/entities/attachment.rb
+++ b/app/api/mobile/entities/attachment.rb
@@ -23,6 +23,8 @@ module Mobile
(number_to_human_size(f.filesize)).gsub("ytes", "").to_s
when :coursename
f.course.nil? ? "" : f.course.name
+ when :course_id
+ f.course.nil? ? 0 : f.course.id
end
end
@@ -38,6 +40,7 @@ module Mobile
attachment_expose :file_dir
attachment_expose :attafile_size
attachment_expose :coursename #所属班级名
+ attachment_expose :course_id #所属班级名
expose :current_user_is_teacher, if: lambda { |instance, options| options[:user] } do |instance, options|
current_user = options[:user]
current_user_is_teacher = false
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 8187055be..731a251f2 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -26,7 +26,13 @@ class AccountController < ApplicationController
if request.get?
@login = params[:login] || true
if User.current.logged?
- redirect_to user_path(User.current)
+ # 判断用户基本资料是否完善,不完善讲强制完善基本资料,完善进入主页
+ user = UserExtensions.where(:user_id => User.current.id).first
+ if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
+ redirect_to my_account_path(:tip => 1)
+ else
+ redirect_to user_path(User.current)
+ end
else
render :layout => 'login'
end
@@ -127,7 +133,7 @@ class AccountController < ApplicationController
session[:auth_source_registration] = nil
self.logged_user = @user
flash[:notice] = l(:notice_account_activated)
- redirect_to my_account_path
+ redirect_to my_account_path(:tip=>1)
end
else
us = UsersService.new
@@ -144,7 +150,7 @@ class AccountController < ApplicationController
if !@user.new_record?
self.logged_user = @user
flash[:notice] = l(:notice_account_activated)
- redirect_to my_account_url
+ redirect_to my_account_url(:tip=>1)
else
redirect_to signin_path
end
@@ -347,9 +353,15 @@ class AccountController < ApplicationController
else
#by young
#redirect_back_or_default my_page_path
- redirect_back_or_default User.current
+ # 基本资料不完善的用户,将强制用户完善基本资料。
+ user = UserExtensions.where(:user_id => User.current.id).first
+ if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
+ redirect_to my_account_path(:tip => 1)
+ else
+ redirect_back_or_default User.current
#redirect_to my_account_url
#redirect_to User.current
+ end
end
end
end
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 3c012fce7..25cc85ae2 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -698,7 +698,7 @@ class AdminController < ApplicationController
apply_school_ids = apply_schools.empty? ? "(-1)" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")"
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
- @schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p",:p=>search)
+ @schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search)
#@schools = School.all
else
#@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id}").select { |course| @user.allowed_to?(:as_teacher,course)}
diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb
index 0e48cd962..66cbf27b8 100644
--- a/app/controllers/at_controller.rb
+++ b/app/controllers/at_controller.rb
@@ -10,7 +10,7 @@ class AtController < ApplicationController
@users = users.uniq { |u| u.id }.delete_if { |u| u.id == User.current.id }.sort{|x,y| to_pinyin(x.show_name) <=> to_pinyin(y.show_name)} if users
#加上all
- if @user && @users.size > 0
+ if User.current.logged? && @users.size > 0
allUser = Struct.new(:id, :name).new
allUser.id = @users.map{|u| u.id}.join(",")
allUser.name = "all"
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 05b93d302..3aefdfd1d 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -114,9 +114,15 @@ class MyController < ApplicationController
applied_message.update_attribute(:viewed, true)
end
+ # 基本资料不完善 @force为false, 完善 @force为true
+ @force = false
+ if params[:tip]
+ @force = true
+ end
+
@user = User.current
- lg=@user.login
+ lg = @user.login
@pref = @user.pref
diskfile = disk_filename('User', @user.id)
diskfile1 = diskfile + 'temp'
@@ -178,7 +184,12 @@ class MyController < ApplicationController
File.delete(diskfile1) if File.exist?(diskfile1)
end
- render :layout=>'new_base_user'
+ # 基本资料不完善,无法使用其他功能,完善着可继续使用
+ if @force
+ render :layout => 'new_base_user_show'
+ else
+ render :layout => 'new_base_user'
+ end
end
# Destroys user's account
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index da66f249b..0c0e0919e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2169,7 +2169,7 @@ module ApplicationHelper
candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
elsif attachment.container.is_a?(OrgSubfield)
org = attachment.container.organization
- candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
+ candown = User.current.member_of_org?(org) || ((attachment.is_public == 1 || attachment.get_status_by_attach(User.current.id) == 2) && org.allow_guest_download == true)
elsif attachment.container.is_a?(OrgDocumentComment)
org = attachment.container.organization
candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
@@ -3436,3 +3436,9 @@ def course_syllabus_option user = User.current
end
type
end
+
+# 获取项目动态更新时间
+def get_forge_act_message(act, type)
+ forge_act = ForgeActivity.where(:forge_act_id => act.id, :forge_act_type => type).first
+ format_time(forge_act.nil? ? act.created_on : forge_act.try(:updated_at))
+end
diff --git a/app/services/projects_service.rb b/app/services/projects_service.rb
index cfd6aeb2c..fc7f25d1f 100644
--- a/app/services/projects_service.rb
+++ b/app/services/projects_service.rb
@@ -334,19 +334,19 @@ class ProjectsService
def send_wechat_project_issue_notice user,project,issue_id,issue_title,priority_id
count = ShieldWechatMessage.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count
if count == 0
- title = "您有新的issue需要解决"
- remark = "点击详情查看issue"
+ title = "您有新的issue需要解决。"
+ remark = "点击详情查看issue。"
case priority_id
- when 1
+ when "1"
priority = "低"
- when 2
+ when "2"
priority = "正常"
- when 3
+ when "3"
priority = "高"
- when 4
+ when "4"
priority = "紧急"
- when 5
+ when "5"
priority = "立刻"
end
diff --git a/app/views/at/show.json.erb b/app/views/at/show.json.erb
index 6e2a244e4..3e49496f9 100644
--- a/app/views/at/show.json.erb
+++ b/app/views/at/show.json.erb
@@ -1,11 +1,11 @@
[
- <% @users && @users.each_with_index do |person,index| %>
- <% if index == 0 %>
- {"id":<%=index%>, "userid": "<%=person.id%>", "name": "所有人", "login": "<%=person.name%>", "searchKey": "<%=person.name%>"}
- <%= index != @users.size-1 ? ',' : '' %>
- <% else %>
- {"id":<%=index%>, "userid": <%=person.id%>, "name": "<%=person.show_name%>", "login": "<%=person.login%>", "searchKey": "<%=person.get_at_show_name%>"}
- <%= index != @users.size-1 ? ',' : '' %>
- <% end %>
- <% end %>
+ <% @users && @users.each_with_index do |person,index| %>
+ <% if index == 0 %>
+ {"id":<%=index%>, "userid": "<%=person.id%>", "name": "所有人", "login": "<%=person.name%>", "searchKey": "<%=person.name%>"}
+ <%= index != @users.size-1 ? ',' : '' %>
+ <% else %>
+ {"id":<%=index%>, "userid": "<%=person.id%>", "name": "<%=person.show_name%>", "login": "<%=person.login%>", "searchKey": "<%=person.get_at_show_name%>"}
+ <%= index != @users.size-1 ? ',' : '' %>
+ <% end %>
+ <% end %>
]
diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb
index 3cc429185..b37c80dad 100644
--- a/app/views/attachments/_activity_attach.html.erb
+++ b/app/views/attachments/_activity_attach.html.erb
@@ -3,7 +3,7 @@
- <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true -%>
+ <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true %>
(
diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb
index 1bbdc0e93..e567435a5 100644
--- a/app/views/files/_org_subfield_list.html.erb
+++ b/app/views/files/_org_subfield_list.html.erb
@@ -11,9 +11,9 @@
<%# 如果有历史版本则提供历史版本下载 %>
<% if file.attachment_histories.count == 0 %>
- <%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'),
- download_named_attachment_path(file.id, file.filename),
- :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
+ <%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'),
+ download_named_attachment_path(file.id, file.filename),
+ :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
<% else %>
<%= link_to truncate(file.filename,length: 35, omission: '...'), attachment_history_download_path(file.id),
:title => file.filename+"\n"+file.description.to_s,
diff --git a/app/views/layouts/_footer_show.html.erb b/app/views/layouts/_footer_show.html.erb
new file mode 100644
index 000000000..bb29956d3
--- /dev/null
+++ b/app/views/layouts/_footer_show.html.erb
@@ -0,0 +1,43 @@
+
\ No newline at end of file
diff --git a/app/views/layouts/_logined_header_show.html.erb b/app/views/layouts/_logined_header_show.html.erb
new file mode 100644
index 000000000..a6721501e
--- /dev/null
+++ b/app/views/layouts/_logined_header_show.html.erb
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+ <%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
+
+
+
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index f98585b77..a107bfe15 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -102,8 +102,10 @@
- <% if User.current.logged?%>
- <%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
+ <% if User.current.logged? && User.current == @user%>
+ <%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id => 'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
+ <% elsif User.current.logged? %>
+
<%=image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx') %>
<% else %>
<% end %>
diff --git a/app/views/layouts/new_base_user_show.html.erb b/app/views/layouts/new_base_user_show.html.erb
new file mode 100644
index 000000000..37354d8d8
--- /dev/null
+++ b/app/views/layouts/new_base_user_show.html.erb
@@ -0,0 +1,335 @@
+
+
+
+
+
<%= h html_title %>
+
+
+ <%= csrf_meta_tag %>
+ <%= favicon %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','syllabus',:media => 'all' %>
+ <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
+ <%= javascript_heads %>
+ <%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
+ <%= heads_for_theme %>
+ <%= call_hook :view_layouts_base_html_head %>
+ <%= yield :header_tags -%>
+
+
+
+
+
+
+
+
+
+ <% is_current_user = User.current.logged? && User.current == @user%>
+ <% if User.current.logged? %>
+ <%= render :partial => 'layouts/logined_header_show' %>
+ <% else%>
+ <%= render :partial => 'layouts/unlogin_header' %>
+ <% end%>
+
+
+
+
+
+
+
+
+
+
+ <% hidden_courses = Setting.find_by_name("hidden_courses") %>
+ <% unvisiable = hidden_courses && hidden_courses.value == "1"%>
+ <% if !unvisiable %>
+
+
+ 课程
+ <% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
+ <% all_count = @user.courses.visible.where("is_delete =?", 0).count%>
+
+
+ <% if !courses.empty? %>
+
+
+
+ <% end %>
+
+
+ <% if is_current_user %>
+
+ 新建课程
+
+
+ 新建班级
+
+
+ 加入班级
+
+ <% if @user == User.current %>
+
+ 我的作业
+
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+
+
+ 项目
+ <% all_count = @user.projects.visible.count%>
+ <% projects = @user.projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
+
+
+ <% if !projects.empty? %>
+
+
+
+ <% end %>
+
+
+ <% if is_current_user %>
+
+ 新建项目
+
+
+ 加入项目
+
+
+
+
+ <% end %>
+
+
+
+
+
访问计数 <%= @user.visits.to_i %> (自2016年5月)
+
+
+
+ <%= render :partial => 'layouts/new_feedback' %>
+
+
+<%= render :partial => 'layouts/footer_show' %>
+
+
+
+
+ <%= l(:label_loading) %>
+
+
+
+
+
+
+
头像设置
+
+
+ <%= file_field_tag 'avatar[image]',
+ :id => "upload_user_image",
+ :style => 'display:none;',#added by young
+ :size => "1",
+ :multiple => false,
+ :onchange => 'addInputAvatar(this);',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :file_type => Redmine::Configuration['pic_types'].to_s,
+ :type_support_message => l(:error_pic_type),
+ :upload_path => upload_avatar_path(:format => 'js'),
+ :description_placeholder => nil ,# l(:label_optional_description)
+ :source_type => @user.class.to_s,
+ :source_id => @user.id.to_s
+ } %>
+
+
+
+
+
预览
+ <%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
+
+
96px*96px
+
+ <%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
+
+
48px*48px
+
+
+
取 消
+
确 定
+
+
+
+
+
+
+
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 5c8e13e3f..71694da60 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -1,4 +1,15 @@
-
+ <% if @force %>
+ <% message = AppliedMessage.where(:status => 3, :user_id => User.current.id, :viewed => 0).first %>
+ <% unless message.nil? %>
+
+ <% end %>
+
+ <% end %>
- <%= f.text_field :login,:no_label=>true, :required => true,:style=>"color:grey", :nh_required=>"1",:disabled=>'disabled', :name => "login",:class=>"w210"%>
- <%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%>
-
+ <%= f.text_field :login,:no_label=>true, :required => true,:style => "color:grey", :nh_required => "1",:disabled => 'disabled', :name => "login",:class => "w210"%>
+ <% if @force %>
+ <%= f.text_field :mail,:no_label=>true, :required => true,:nh_required => "1",:class=>"w210",:disabled=>'disabled'%>
+ <% else %>
+ <%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%>
+ <% end %>
@@ -81,7 +95,7 @@
- 平台找到了0 个包含"国防" 的高校
+
<% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
@@ -89,7 +103,7 @@
- 平台找到了0 个包含"国防" 的高校
+
<% elsif User.current.user_extensions.school.nil? %>
@@ -97,7 +111,7 @@
- 平台找到了0 个包含"国防" 的高校
+
<% else %>
@@ -105,7 +119,7 @@
- 平台找到了0 个包含"国防" 的高校
+
<% end %>
@@ -155,7 +169,7 @@
<%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %>
- <%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified],:style=>"height:14px;" %>不要发送对我自己提交的修改的通知
+ <%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified],:style => "height:14px;" %>不要发送对我自己提交的修改的通知
@@ -466,7 +480,7 @@
}else{
$("#search_school_result_list").html('');
str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
- $("#hint").html('如果找不到自己的单位,您可以添加单位 ');
+ $("#hint").html('如果找不到自己的单位,您可以 添加单位 ');
$("#hint").show();
$("#errortip").show();
}
@@ -477,7 +491,6 @@
if($(e.target).attr("id") != 'search_school_result_list' && $(e.target).attr("id") != 'province')
{
$("#search_school_result_list").hide();
- $("#hint").hide();
$("#errortip").hide();
}
});
@@ -516,7 +529,7 @@
}else{
$("#search_school_result_list").html('');
str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
- $("#hint").html('您输入的名称尚不存在,申请添加 ');
+ $("#hint").html('如果找不到自己的单位,您可以 添加单位 ');
$("#hint").show();
$("#errortip").show();
}
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index a2f8a8f29..f1a8da8e4 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -47,52 +47,52 @@
<%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %>
<%= labelled_form_for @organization do |f|%>
- <%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
-
-
-
+ <%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
+
+
+
-
-
- 组织URL:
-
http://
-
- .trustie.net
申请
- <% record = OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first %>
- <% if domain.present? and record.present? and record.content == domain.subname %>
-
(已批准)
- <% elsif record %>
-
(您申请了子域名<%= OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first.content %>,还未批准)
- <% end %>
-
-
-
-
-
- 显示模式 :
- />
- 简洁模式
- />
- 门户模式
-
- 公开 :
- class="ml3" />
-
- 下载支持 :
- name="organization[allow_guest_download]" <%= @organization.allow_guest_download ? 'checked': ''%> class="ml3" />
- 允许游客下载
- <%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %>
-
-
-
-
-
-
- 保存
+
+
+ 组织URL:
+
http://
+
+ .trustie.net
申请
+ <% record = OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first %>
+ <% if domain.present? and record.present? and record.content == domain.subname %>
+
(已批准)
+ <% elsif record %>
+
(您申请了子域名<%= OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first.content %>,还未批准)
+ <% end %>
+
+
+
+
+
+ 显示模式 :
+ />
+ 简洁模式
+ />
+ 门户模式
+
+ 公开 :
+ class="ml3" />
+
+ 下载支持 :
+ name="organization[allow_guest_download]" <%= @organization.allow_guest_download ? 'checked': ''%> class="ml3" />
+ 允许游客下载
+ <%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %>
+
+
+
+
+
+
+ 保存
<% end %>
diff --git a/app/views/quality_analysis/_edit.html.erb b/app/views/quality_analysis/_edit.html.erb
index f508ee5de..b9a2c6efa 100644
--- a/app/views/quality_analysis/_edit.html.erb
+++ b/app/views/quality_analysis/_edit.html.erb
@@ -12,7 +12,7 @@
- <%= select_tag :language, options_for_select(["java","python","ruby","c++","c#","c"], "#{@quality_analysis.language}"), :id => 'branch', :class => "analysis-option-box" %>
+ <%= select_tag :language, options_for_select(["java","python","c#"], "#{@quality_analysis.language}"), :id => 'branch', :class => "analysis-option-box" %>
diff --git a/app/views/quality_analysis/_result_list.html.erb b/app/views/quality_analysis/_result_list.html.erb
index 5b4e4f5a0..0c2bc9497 100644
--- a/app/views/quality_analysis/_result_list.html.erb
+++ b/app/views/quality_analysis/_result_list.html.erb
@@ -14,7 +14,7 @@
-<% if @quality_analyses.count >0 %>
+<% if @quality_analyses && @quality_analyses.count >0 %>
<% @quality_analyses.each do |qa| %>
- <%= select_tag :language, options_for_select(["java","python","ruby","c++","c#","c"]), :id => 'branch', :class => "analysis-option-box" %>
+ <%= select_tag :language, options_for_select(["java","python","c#"]), :id => 'branch', :class => "analysis-option-box" %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index 0a5c18a9b..afc45efde 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -29,7 +29,7 @@
发帖时间:<%= format_time(activity.created_on) %>
- 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %>
+ 更新时间:<%= get_forge_act_message(activity, activity.class.to_s) %>
<% if activity.parent_id.nil? %>
diff --git a/app/views/users/_user_message_applied.html.erb b/app/views/users/_user_message_applied.html.erb
index 414b13cf7..89084d30b 100644
--- a/app/views/users/_user_message_applied.html.erb
+++ b/app/views/users/_user_message_applied.html.erb
@@ -1,11 +1,12 @@
<% if ma.class == AppliedMessage %>
-
+
<% if ma.applied_type == "ApplyAddSchools" %>
<% if ma.status == 0 %>
- <%= link_to image_tag(url_to_avatar(ma.user), :width => "30", :height => "30"), user_path(ma.user), :target => '_blank' %>
+ <% applied_user = User.find(ma.applied_user_id) %>
+ <%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
<% else %>
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
<% end %>
@@ -19,6 +20,7 @@
<%= time_tag(ma.created_at).html_safe %>
+
<% elsif ma && ma.applied_type == "AppliedProject" %>
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
diff --git a/config/menu.yml b/config/menu.yml
index 52272e8a0..8cc920707 100644
--- a/config/menu.yml
+++ b/config/menu.yml
@@ -8,7 +8,7 @@ button:
sub_button:
-
type: "view"
- name: "我的课程"
+ name: "我的班级"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
-
type: "view"
diff --git a/config/menu.yml.production b/config/menu.yml.production
index c1431172e..55318e811 100644
--- a/config/menu.yml.production
+++ b/config/menu.yml.production
@@ -8,7 +8,7 @@ button:
sub_button:
-
type: "view"
- name: "我的课程"
+ name: "我的班级"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
-
type: "view"
diff --git a/config/menu.yml.test b/config/menu.yml.test
index dc4aacbe5..45e23aaf3 100644
--- a/config/menu.yml.test
+++ b/config/menu.yml.test
@@ -8,7 +8,7 @@ button:
sub_button:
-
type: "view"
- name: "我的课程"
+ name: "我的班级"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
-
type: "view"
diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html
index 548641748..506dcc724 100644
--- a/public/assets/wechat/activities.html
+++ b/public/assets/wechat/activities.html
@@ -163,41 +163,41 @@
-
-
-
-
-
-
-
-
{{act.author.real_name}}
-
-
-
-
{{act.latest_update}}
-
-
【班级留言】{{act.subject|safeHtml}}
-
-
-
-
-
来源: {{act.course_project_name}}
-
-
赞
-
{{act.praise_count}}
-
{{act.praise_count}}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html
index 6c1c35860..349c3bd75 100644
--- a/public/assets/wechat/class.html
+++ b/public/assets/wechat/class.html
@@ -164,41 +164,41 @@
-
-
-
-
-
-
-
-
{{act.author.real_name}}
-
-
-
-
{{act.latest_update}}
-
-
【班级留言】{{act.subject|safeHtml}}
-
-
-
-
-
-
-
赞
-
{{act.praise_count}}
-
{{act.praise_count}}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/javascripts/wechat/controllers/myresource.js b/public/javascripts/wechat/controllers/myresource.js
index 3c5e46a75..84ae3a73f 100644
--- a/public/javascripts/wechat/controllers/myresource.js
+++ b/public/javascripts/wechat/controllers/myresource.js
@@ -37,8 +37,9 @@ app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$l
vm.myresource_sendIndex = index;
rms.save('myresource_sendIndex',index);
- $location.path("/send_class_list").search({id: r.id});
- }
+// $location.path("/send_class_list").search({id: r.id});
+ $location.path("/send_class_list").search({id: r.id,course_id: r.course_id});
+ };
vm.loadResourceData = function (index,page){
if(index == 1){
diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css
index f704a3f0d..fbce13354 100644
--- a/public/stylesheets/css/common.css
+++ b/public/stylesheets/css/common.css
@@ -4,7 +4,7 @@
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#eaebec;}
div,img,tr,td,table{ border:0;}
-table,tr,td{border:0;cellspacing:0; cellpadding:0;}
+table,tr,td{border:0;}
ol,ul,li{ list-style-type:none}
blockquote {
border:1px solid #d4d4d4;
diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css
index 95891d365..1c7563a58 100644
--- a/public/stylesheets/css/project.css
+++ b/public/stylesheets/css/project.css
@@ -372,7 +372,7 @@ tr.entry td.filename_no_report { width: 40%; }
tr.entry td.size { text-align: right; font-size: 90%; }
tr.entry td.revision, tr.entry td.author { text-align: center; }
tr.entry td.age { text-align: right; }
-tr.entry.file td.filename a { margin-center: 16px; }
+tr.entry.file td.filename a { }
tr.entry.file td.filename_no_report a { margin-left: 16px; }
tr span.expander {background-image: url(/images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css
index c9a4059e0..1d2c106e2 100644
--- a/public/stylesheets/css/structure.css
+++ b/public/stylesheets/css/structure.css
@@ -1,5 +1,3 @@
-/*将header.css文件和public.css,new_user.css中的内容统一*/
-
@charset "utf-8";
/* CSS Document */
@@ -34,7 +32,7 @@ a:hover.search_btn{ background: #0fa9bb;}
a.parent {background: url(/images/arrowList.png) -30px 3px no-repeat; width:95px; padding-right:50px;}
a.parent:hover {background: url(/images/arrowList.png) -30px -14px no-repeat; width:95px; padding-right:50px; color:#fe7d68;}
a.linkToOrange:hover {color:#fe7d68;}
-#userInfo ul li {positon: relative;}
+#userInfo ul li {position: relative;}
#userInfo ul li ul {display:none;}
#userInfo ul li:hover ul {display:block; position:absolute;}
#userInfo ul li:hover ul li ul {display:none;}
@@ -383,7 +381,7 @@ ul.subNavArrow:hover li ul {display:block;}
.currentDd{color:#0781b4;}
.currentDt{background-color:#fff;}
.navContent{display: none;border-bottom:solid 1px #e5e3da; }
-.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333}
+.navContent li a{display:block;width:240px;height:28px;text-align:center;font-size:12px;line-height:28px;color:#333}
.navContent li a:hover{color:#fff;background-color:#b3e0ee}
a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;}
a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;line-height:1.4 !important;}