{{project.name}}
>
{{project.member_count}}人
diff --git a/public/javascripts/wechat/controllers/class.js b/public/javascripts/wechat/controllers/class.js
index 75e1709cc..d28d9a6aa 100644
--- a/public/javascripts/wechat/controllers/class.js
+++ b/public/javascripts/wechat/controllers/class.js
@@ -139,11 +139,19 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
var resetMenu = function(is_teacher){
vm.isTeacher = is_teacher;
if(is_teacher){
- vm.menus = ["课件", "作业", "小测验", "学生管理"];
+ vm.menus = ["课件", "作业", "测验", "成员管理"];
} else {
vm.menus = ['课件', "我的同学"];
}
}
+ vm.onSetting = function(user){
+ rms.save('current_edit_member', user);
+ $location.path("/edit_class_member").search({id: courseid,user_id: user.id});
+ };
+
+
+
+
}]);
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/edit_class.js b/public/javascripts/wechat/controllers/edit_class.js
index 5f377e594..0a09ce1e3 100644
--- a/public/javascripts/wechat/controllers/edit_class.js
+++ b/public/javascripts/wechat/controllers/edit_class.js
@@ -47,7 +47,7 @@ app.controller('EditClassController', ['$scope', '$http', 'auth', 'config', 'ale
token: auth.token()
}).then(function(response){
if(response.data.status!=0){
- vm.alertService_1.showMessage('出错了', response.data.message);
+ vm.alertService_1.showMessage('提示', response.data.message);
} else {
vm.alertService_1.showMessage('提示', '删除班级成功', function(){
vm.syllabus.courses.splice(index, 1);
diff --git a/public/javascripts/wechat/controllers/edit_class_member.js b/public/javascripts/wechat/controllers/edit_class_member.js
new file mode 100644
index 000000000..4de6213d9
--- /dev/null
+++ b/public/javascripts/wechat/controllers/edit_class_member.js
@@ -0,0 +1,71 @@
+
+
+app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms', function($scope, $http, auth, config, alertService, $location,$routeParams, rms){
+ var vm = $scope;
+
+// vm.current_edit_member = rms.get('current_edit_member');
+ vm.current_edit_member = null;
+
+ vm.alertService = alertService.create();
+
+ var course_id = $routeParams.id;
+ var user_id = $routeParams.user_id;
+ if(!vm.current_edit_member){
+ $http.post(config.apiUrl+'courses/get_member_info', {
+ token: auth.token(),
+ id: course_id,
+ user_id:user_id
+ }).then(function(response){
+ if(response.data.status!=0){
+ vm.alertService.showMessage('提示', response.data.message);
+ } else {
+ course_id = response.data.course_id;
+ user_id = response.data.user_id;
+ vm.current_edit_member = response.data.member_info;
+ vm.current_roles_id = vm.current_edit_member.roles_id;
+ }
+ });
+ }
+
+ console.log(vm.current_edit_member);
+
+ vm.cancel = function(){
+ vm.alertService.showMessage('提示', '您确定不对角色进行变更吗?', function(){
+// rms.save("project_master_members",[]);
+// rms.save("project_develop_members",[]);
+// rms.save("project_report_members",[]);
+ window.history.back();
+// $location.path("/project").search({id: project_id});
+ });
+ };
+
+ vm.edit_member_role = function(){
+ if(vm.current_roles_id == vm.current_edit_member.roles_id){
+ vm.alertService.showMessage('提示', "该用户当前已是该角色");
+ return;
+ }
+
+ $http.post(config.apiUrl+'courses/edit_member_role', {
+ token: auth.token(),
+ id: course_id,
+ user_id:vm.current_edit_member.user.id,
+ role_id:vm.current_edit_member.roles_id
+ }).then(function(response){
+ if(response.data.status!=0){
+ vm.alertService.showMessage('提示', response.data.message);
+ } else {
+ vm.alertService.showMessage('提示', '修改角色成功', function(){
+// window.history.back();
+ $location.path("/class").search({id: course_id});
+ });
+ }
+ });
+
+
+ };
+
+ vm.selectRole = function(role_id){
+ vm.current_edit_member.roles_id = role_id;
+ }
+
+}] );
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/edit_project_member.js b/public/javascripts/wechat/controllers/edit_project_member.js
new file mode 100644
index 000000000..b7725c954
--- /dev/null
+++ b/public/javascripts/wechat/controllers/edit_project_member.js
@@ -0,0 +1,80 @@
+
+
+app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms', function($scope, $http, auth, config, alertService, $location,$routeParams, rms){
+ var vm = $scope;
+
+// vm.current_edit_member = rms.get('current_edit_member');
+
+ vm.current_edit_member = null;
+
+ vm.alertService = alertService.create();
+
+ var project_id = $routeParams.id;
+ var user_id = $routeParams.user_id;
+ if(!vm.current_edit_member){
+ $http.post(config.apiUrl+'projects/get_member_info', {
+ token: auth.token(),
+ id: project_id,
+ user_id:user_id
+ }).then(function(response){
+ if(response.data.status!=0){
+ vm.alertService.showMessage('提示', response.data.message);
+ } else {
+ project_id = response.data.project_id;
+ user_id = response.data.user_id;
+ vm.current_edit_member = response.data.member_info;
+ vm.current_roles_id = vm.current_edit_member.roles_id;
+ }
+ });
+ }
+
+ console.log(vm.current_edit_member);
+
+ vm.cancel = function(){
+ vm.alertService.showMessage('提示', '您确定不对角色进行变更吗?', function(){
+// rms.save("project_master_members",[]);
+// rms.save("project_develop_members",[]);
+// rms.save("project_report_members",[]);
+ window.history.back();
+// $location.path("/project").search({id: project_id});
+ });
+ };
+
+ vm.edit_member_role = function(){
+ if(vm.current_roles_id == vm.current_edit_member.roles_id){
+ vm.alertService.showMessage('提示', "该用户当前已是该角色");
+ return;
+ }
+
+ $http.post(config.apiUrl+'projects/edit_member_role', {
+ token: auth.token(),
+ id: project_id,
+ user_id:vm.current_edit_member.user.id,
+ role_id:vm.current_edit_member.roles_id
+ }).then(function(response){
+ if(response.data.status!=0){
+ vm.alertService.showMessage('提示', response.data.message);
+ } else {
+ vm.alertService.showMessage('提示', '修改角色成功', function(){
+ rms.save('project_activities_page',0);
+ rms.save("project_activities",[]);
+ rms.save("project_has_more",false);
+ rms.save("project",null);
+ rms.save("project_master_members",[]);
+ rms.save("project_develop_members",[]);
+ rms.save("project_report_members",[]);
+ rms.save('tab_num',null);
+// window.history.back();
+ $location.path("/project").search({id: project_id});
+ });
+ }
+ });
+
+
+ };
+
+ vm.selectRole = function(role_id){
+ vm.current_edit_member.roles_id = role_id;
+ }
+
+}] );
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/new_project.js b/public/javascripts/wechat/controllers/new_project.js
new file mode 100644
index 000000000..6eb6a1caa
--- /dev/null
+++ b/public/javascripts/wechat/controllers/new_project.js
@@ -0,0 +1,47 @@
+
+
+app.controller('NewProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','rms', function($scope, $http, auth, config, alertService, $location,rms){
+ var vm = $scope;
+
+ vm.alertService = alertService.create();
+
+ vm.project = {
+ name:""
+ };
+
+ vm.addClass = function(){
+ vm.syllabus.courses.push({});
+ };
+
+ vm.deleteClass = function(index){
+ vm.syllabus.courses.splice(index, 1);
+ }
+
+ vm.newProject = function (frm, project) {
+ frm.$setSubmitted();
+ console.log(project);
+
+ if(!frm.$valid){
+ console.log(frm.$error);
+ return;
+ }
+
+ $http.post(config.apiUrl+"projects/create", {
+ token: auth.token(),
+ name: project.name
+ }).then(function(response){
+ if(response.data.status!=0){
+ vm.alertService.showMessage('出错了', response.data.message);
+ } else {
+ vm.alertService.showMessage('提示', '新建项目成功', function(){
+// window.history.back();
+ rms.save('projects',[]);
+ $location.path("/project_list");
+ });
+ }
+ console.log(response.data.data);
+ });
+
+ }
+
+}] );
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/project.js b/public/javascripts/wechat/controllers/project.js
index 569ea3dd3..6c97c9efc 100644
--- a/public/javascripts/wechat/controllers/project.js
+++ b/public/javascripts/wechat/controllers/project.js
@@ -10,10 +10,15 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
vm.project_activities = rms.get("project_activities") || [];
vm.project_has_more = rms.get("project_has_more");
- vm.project = rms.get("project")
+ vm.project = rms.get("project") || null;
- vm.project_members = [];
- vm.project_members_page = 0;
+
+// vm.project_members_page = rms.get('project_members_page') || 0;
+ vm.project_master_members = rms.get("project_master_members") || [];
+ vm.project_develop_members = rms.get("project_develop_members") || [];
+ vm.project_report_members = rms.get("project_report_members") || [];
+
+// vm.project_members_has_more = rms.get("project_members_has_more");
vm.alertService = alertService.create();
@@ -25,17 +30,55 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
data:{token:auth.token(),page:page}
}).then(function successCallback(response) {
console.log(response.data);
- vm.project_activities_page = response.data.page;
- if(response.data.page > 0)
- {
- vm.project_activities = vm.project_activities.concat(response.data.data);
+ if(response.data.status == 0){
+ vm.project_activities_page = response.data.page;
+ if(response.data.page > 0)
+ {
+ vm.project_activities = vm.project_activities.concat(response.data.data);
+ }
+ else{
+ vm.project_activities = response.data.data;
+ vm.project_activities_page = 0;
+ vm.project_has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
+ }
+ }
+ else{
+ vm.alertService.showMessage('提示', response.data.message);
+ }
+
+
+ }, function errorCallback(response) {
+ });
+ }
+
+ vm.getMembers = function(page){
+ $http({
+ method: 'POST',
+ url: apiUrl + "projects/members?id=" + projectid,
+ data:{token:auth.token(),page:page}
+ }).then(function successCallback(response) {
+ console.log(response.data);
+ if(response.data.status == 0){
+// vm.project_members_page = response.data.page;
+// if(response.data.page > 0)
+// {
+// vm.project_members = vm.project_members.concat(response.data.data);
+// }
+// else{
+// vm.project_members = response.data.data;
+// vm.project_members_page = 0;
+// vm.project_members_has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
+// }
+ vm.project_master_members = response.data.master_members;
+ vm.project_develop_members = response.data.develop_members;
+ vm.project_report_members = response.data.report_members;
+
}
else{
- vm.project_activities = response.data.data;
- vm.project_activities_page = 0;
- vm.project_has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
+ vm.alertService.showMessage('提示', response.data.message);
}
+
}, function errorCallback(response) {
});
}
@@ -53,19 +96,14 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
vm.currentTab = index;
vm.searchText = '';
- if(index == 1){
+ if(index == 1 && vm.project_activities.length <= 0 ){
vm.getActivities(0);
}
- else if(index == 2){
- $http.get(config.apiUrl + 'projects/members?token='+auth.token()+'&project_id='+projectid).then(
- function(response) {
- console.log(response.data);
- vm.project_activities = response.data.data;
- }
- )
+ else if(index == 2 && vm.project_master_members.length <= 0){
+ vm.getMembers(0);
}
- rms.save("tab_num",$scope.currentTab);
+ rms.save("tab_num",vm.currentTab);
};
//初始化TAB按钮
@@ -75,7 +113,6 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
} else {
vm.menus = ['项目动态', "我的伙伴"];
}
-
}
if(vm.project){
resetMenu(vm.project.can_setting);
@@ -134,4 +171,19 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
common.decreaseCommonPraise(act);
};
+ vm.onSetting = function(data){
+ rms.save('current_edit_member', data);
+
+ rms.save('project_activities_page',vm.project_activities_page);
+ rms.save("project_activities",vm.project_activities);
+ rms.save("project_has_more",vm.project_has_more);
+
+ rms.save("project",vm.project);
+ rms.save("project_master_members",vm.project_master_members);
+ rms.save("project_develop_members",vm.project_develop_members);
+ rms.save("project_report_members",vm.project_report_members);
+
+ $location.path("/edit_project_member").search({id: projectid,user_id: data.user.id});
+ };
+
}]);
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/project_list.js b/public/javascripts/wechat/controllers/project_list.js
index 4576a81ef..ffa4ef9c0 100644
--- a/public/javascripts/wechat/controllers/project_list.js
+++ b/public/javascripts/wechat/controllers/project_list.js
@@ -6,7 +6,8 @@
app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$location', 'alertService','rms',
function ($scope, config, auth, $http, $location, alertService,rms) {
var vm = $scope;
- vm.projects = rms.get('projects') || [];
+// vm.projects = rms.get('projects') || [];
+ vm.projects = [];
vm.alertService_1 = alertService.create();
vm.alertService_3 = alertService.create();
@@ -26,29 +27,27 @@ app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$
}
vm.goProject = function (project_id) {
+
+ rms.save('project_activities_page',0);
+ rms.save("project_activities",[]);
+ rms.save("project_has_more",false);
+ rms.save("project",null);
+ rms.save('project_members_page',0);
+ rms.save("project_members",[]);
+ rms.save("project_members_has_more",false);
+ rms.save('tab_num',null);
console.log(project_id);
$location.path("/project").search({id: project_id});
- }
+ };
vm.newProject = function () {
- //先判断下权限
- $http.post(config.apiUrl + "projects/auth",{token: auth.token()} ).then(
- function (response) {
- console.log(response.data);
- if (response.data.auth == 0) {
- vm.alertService_1.showMessage('提示', '非教师身份不能创建课程哦~');
- }
- else{
- $location.path("/new_project");
- }
- }
- );
- }
+ $location.path("/new_project");
+ };
vm.joinProject = function () {
vm.alertService_3.showMessage('提示', '请输入6位项目邀请码(不区分大小写)', function(){
- if (vm.alertService_3.invite && vm.alertService_3.invite.length == 5) {
- $http.post(config.apiUrl + "courses/join", {
+ if (vm.alertService_3.invite && vm.alertService_3.invite.length == 6) {
+ $http.post(config.apiUrl + "projects/join", {
token: auth.token(),
invite_code: vm.alertService_3.invite
}).then(function (response) {
@@ -58,7 +57,7 @@ app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$
} else {
vm.alertService_1.showMessage('提示', '加入项目成功');
vm.alertService_3.invite = "";
- loadClassList();
+ loadProjectList();
}
});
} else {
diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js
index 458f45360..a2b57d7e9 100644
--- a/public/javascripts/wechat/others/routes.js
+++ b/public/javascripts/wechat/others/routes.js
@@ -34,11 +34,14 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func
.when('/new_class', makeRoute('new_class.html', 'NewClassController'))
.when('/edit_class', makeRoute('edit_class.html', 'EditClassController'))
.when('/class_list', makeRoute('class_list.html', 'ClassListController'))
+ .when('/edit_class_member', makeRoute('edit_class_member.html', 'EditClassMemberController'))
.when('/myresource', makeRoute('myresource.html', 'MyResourceController'))
.when('/invite_code', {templateUrl: rootPath + 'invite_code.html', controller: 'InviteCodeController'})
.when('/send_class_list', makeRoute('send_class_list.html', 'SendClassListController'))
.when('/project_list', makeRoute('project_list.html', 'ProjectListController'))
.when('/project', makeRoute('project.html', 'ProjectController'))
+ .when('/edit_project_member', makeRoute('edit_project_member.html', 'EditProjectMemberController'))
+ .when('/new_project', makeRoute('new_project.html', 'NewProjectController'))
.otherwise({
redirectTo: '/activites'
});
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 9eb8a670b..bf8ee0bad 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -191,9 +191,9 @@ a.underline {text-decoration:underline;}
.class-detail-search {width:100%; height:33px; color:#999; background-color:#fff; border:none; outline:none;}
.border-top {border-top:1px solid #ccc;}
.class-detail-row {width:100%; line-height:18px; padding:10px 0; border-bottom:1px solid #ccc; background-color:#fff;}
-.class-member-row {width:100%; line-height:18px; padding:5px 0; border-bottom:1px solid #ccc; background-color:#fff;}
+.class-member-row {width:100%; line-height:18px; padding:5px 0; border-bottom:1px solid #ccc; background-color:#fff; position:relative;}
.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;}
-.img-circle {border-radius:50%;}
+.img-circle {border-radius:50% !important;}
.member-banner {height:24px; line-height:24px; text-align:center; vertical-align:middle; background-color:#dfdfdf;}
.resource-width {width:76%;}
.courseware-from-width {max-width:57%;}
From 52475099dcea28595e3a57a9c666ba750ca259c8 Mon Sep 17 00:00:00 2001
From: Tim
Date: Wed, 27 Jul 2016 14:36:46 +0800
Subject: [PATCH 35/66] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E8=AE=BE=E4=B8=BA?=
=?UTF-8?q?=E4=B8=BB=E9=A1=B5=E5=90=8E=EF=BC=8C=E6=96=87=E5=AD=97=E6=95=B4?=
=?UTF-8?q?=E4=B8=AA=E5=AE=B9=E5=99=A8=E5=AE=BD=E5=BA=A6=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=EF=BC=9B=E7=8F=AD=E7=BA=A7=E9=85=8D=E7=BD=AE=E5=9B=BE=E6=A0=87?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95css=E5=86=B2=E7=AA=81=E5=A4=84=E7=90=86?=
=?UTF-8?q?=EF=BC=9B=E5=A4=A7=E7=BA=B2=E6=A0=B7=E5=BC=8F=E5=86=B2=E7=AA=81?=
=?UTF-8?q?=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/blogs/_homepage.html.erb | 3 --
app/views/layouts/_course_base_info.html.erb | 14 ++++----
public/stylesheets/css/common.css | 5 ++-
public/stylesheets/css/courses.css | 2 --
public/stylesheets/css/org.css | 2 --
public/stylesheets/css/public.css | 7 ++--
public/stylesheets/css/structure.css | 5 ++-
public/stylesheets/sy_public.css | 1 -
public/stylesheets/syllabus.css | 38 +++++---------------
9 files changed, 24 insertions(+), 53 deletions(-)
diff --git a/app/views/blogs/_homepage.html.erb b/app/views/blogs/_homepage.html.erb
index a16547836..ea83b9576 100644
--- a/app/views/blogs/_homepage.html.erb
+++ b/app/views/blogs/_homepage.html.erb
@@ -1,6 +1,5 @@
-
<% if activity.author.id == User.current.id%>
<%end%>
-
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id,
:blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey", :style => 'text-align:center;' %>
@@ -45,7 +43,6 @@
-
<% all_comments = []%>
diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb
index 06e24e0c2..761b79297 100644
--- a/app/views/layouts/_course_base_info.html.erb
+++ b/app/views/layouts/_course_base_info.html.erb
@@ -11,15 +11,15 @@
<% if is_teacher %>
-
+
-
-
- <%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %>
- <%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %>
- <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %>
+
+
+ <%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_class_option" %>
+ <%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "sy_class_option" %>
+ <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "sy_class_option" %>
<% if @course.syllabus %>
- <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
+ <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %>
<% end %>
diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css
index b72a8ef56..07e824d40 100644
--- a/public/stylesheets/css/common.css
+++ b/public/stylesheets/css/common.css
@@ -51,6 +51,10 @@ a.btn_message_free{ background:#ff5722; display:block; text-align:center; color
.break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
+/*显隐*/
+.undis {display:none;}
+.dis {display:inline-block;}
+
/* font & color */
h2{ font-size:18px;} /*color:#269ac9;*/
h3{ font-size:14px;}/* color:#e8770d;*/
@@ -520,7 +524,6 @@ a:hover.bgreen_n_btn{background:#08a384;}
.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
.upbtn:hover{color:#64bdd9;cursor: pointer;}
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
-.undis{display:none;}
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css
index ccf161725..a5bb95fa1 100644
--- a/public/stylesheets/css/courses.css
+++ b/public/stylesheets/css/courses.css
@@ -54,8 +54,6 @@ a:hover.UsersApBtn{border:1px solid #888888; }
/* 代码查重弹框 */
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.Blue-btn{ background:#3598db; color:#fff;}
-.fl{ float:left;}
-.fr{ float:right;}
.blue-border-box{ width:500px; padding:20px; margin:0 auto; background:#fff;}
.box-con h4{ font-size:14px; font-weight: bold; width:450px; text-align:center;}
.box-con{ width:450px; margin:0 auto; text-align:center;}
diff --git a/public/stylesheets/css/org.css b/public/stylesheets/css/org.css
index 028254e04..3677c8bd8 100644
--- a/public/stylesheets/css/org.css
+++ b/public/stylesheets/css/org.css
@@ -27,8 +27,6 @@ a.saveBtn:hover {background-color:#297fb8;}
.orgMemContainer {width:268px;}
.orgMemberAdd {float:right;}
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
-.undis {display:none;}
-.dis {display:inline-block;}
a.org_member_btn{ padding:1px 5px; background:#15bccf; color:#fff;}
diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css
index 82e27aa1f..51f9831b4 100644
--- a/public/stylesheets/css/public.css
+++ b/public/stylesheets/css/public.css
@@ -471,8 +471,6 @@ a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-r
a.postRouteLink {font-weight:bold; color:#484848;}
a.postRouteLink:hover {text-decoration:underline;}
-.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;}
-.homepagePostSetting ul li:hover ul {display:block;}
.resourceSendO {width:65px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-48px; top:20px; padding:2px 0px; display:none;}
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
@@ -499,7 +497,6 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
.wlist_select a{background-color: #64bdd9;cursor: default;}
/*博客列表界面样式*/
-a{text-decoration:none}
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
/*.bloglistbox{ min-height:690px;}*/
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
@@ -543,8 +540,6 @@ a:hover.st_img { border:1px solid #1c9ec7; }
.searchCourseImage {width:75px; margin-right:10px;}
.searchContentDes {width:883px;}
.searchTag {font-size:12px; color:#ffffff; background-color:#7ec8e4; height:16px; min-height:16px; max-height:16px; float:left; line-height:16px; padding:0px 3px;}
-.undis {display:none;}
-.dis {display:inline-block;}
.numRed {color:#FF6600;}
.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;}
.pageCell {border:1px solid #dddddd; padding:5px 12px; float:left; margin-left:-1px; position:relative;}
@@ -977,6 +972,8 @@ a:hover.pr_join_a{ background:#298fbd;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
+/*.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}*/
+.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css
index be8bbc65b..5993d824d 100644
--- a/public/stylesheets/css/structure.css
+++ b/public/stylesheets/css/structure.css
@@ -239,9 +239,9 @@ a.postReplyCancel:hover {color:#ffffff;}
.whiteSettingIcon {background:url(/images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
.whiteSettingIcon:hover {background:url(/images/homepage_icon.png) -93px -44px no-repeat;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;}
-a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
+a.postOptionLink:hover {color:#ffffff; background-color:#3b94d6;}
a.postOptionLink2 {color:#616060; display:block; width:35px; padding:0px 15px;}
-a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
+a.postOptionLink2:hover {color:#ffffff; background-color:#3b94d6;}
.homepagePostReplyPortrait {float:left; width:33px;}
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
.homepagePostReplyDes {float:left; width:642px; margin-left:15px;}
@@ -337,7 +337,6 @@ a.projectsLineGrey:hover {color:#ffffff;}
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
a.homepageMenuControl {float:left; width:180px;}
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
-.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
.homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;}
.homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)}
diff --git a/public/stylesheets/sy_public.css b/public/stylesheets/sy_public.css
index 7c79bf6e6..f31737bfc 100644
--- a/public/stylesheets/sy_public.css
+++ b/public/stylesheets/sy_public.css
@@ -140,7 +140,6 @@ a.pages-big{
}
.pages{
width:330px;
-
margin:20px auto 10px;
}
/* 输入框 */
diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css
index 3b856ad67..848f874d1 100644
--- a/public/stylesheets/syllabus.css
+++ b/public/stylesheets/syllabus.css
@@ -1,13 +1,3 @@
-/****标签(和资源库的tag样式一致)***/
-.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}
-.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
-a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
-.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
-.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
-.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
-.re_tag a{ color:#0d90c3;}
-.tag_h{ }
-.tag_h span,.tag_h a{ margin-bottom:5px;}
/*信息*/
.project_info{ background:#fff; padding:10px 8px; width:222px; margin-bottom:10px; border:1px solid #dddddd;}
.pr_info_id{ width:130px; color:#5a5a5a; font-size:14px; margin-top:5px;}
@@ -112,14 +102,11 @@ input.syllabus_input_min{
.syllabus_class_list_more a{ color:#ff7e00;}
.syllabus_class_title{ font-size:14px; color:#333; width:500px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.syllabus_class_w{ width:650px;}
-.dis {display:block;}
-.undis {display:none;}
/*班级列表界面(用的博客列表的样式)*/
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
.bloglistbox{ min-height:690px;}
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
-.category2{ }
.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
.category2 a,.category2 span{ float:left; margin-right:5px;}
.grayTxt{ color:#9093a6;}
@@ -131,7 +118,6 @@ a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no
.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
a:hover.list-title{ color:#269ac9;}
-.c_red{ font-weight:normal; font-size:12px;}
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
.list-file li{ line-height:1.9;}
.list-info span{ margin-left:5px;}
@@ -208,12 +194,6 @@ a:hover.course-title{ color:#269ac9;}
.sy_tab_nomal {
border-bottom:none;
}
-.undis {
- display:none;
-}
-.dis {
- display:block;
-}
/* 课程大纲 */
.icons_tishi{
width: 110px;
@@ -324,22 +304,22 @@ a:hover.sy_teachers_name{
border:1px solid #e5e5e5;
position: relative;
}
-.homepagePostSetting {
+.sy_class_setting {
position:absolute;
width:20px;
height:20px;
right:10px;
top:10px;
}
-.homepagePostSetting ul li:hover ul {
+.sy_class_setting ul li:hover ul {
display:block;
}
-.homepagePostSettingIcon {
- background:url(../images/sy/icons_sy.png) 1px -408px no-repeat;
+.sy_class_setting_icon {
+ background:url(../images/homepage_icon.png) -93px -5px no-repeat;
width:20px;
height:20px;
}
-.homepagePostSettiongText {
+.sy_class_setting_text {
width:75px;
text-align: center;
line-height:2;
@@ -355,16 +335,16 @@ a:hover.sy_teachers_name{
display:none;
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
}
-.homepagePostSettingIcon:hover {
- background:url(../images/sy/icons_sy.png) -28px -408px no-repeat;
+.sy_class_setting_icon:hover {
+ background:url(../images/homepage_icon.png) -93px -44px no-repeat;
}
-a.postOptionLink {
+a.sy_class_option {
color:#616060;
display:block;
width:55px;
padding:0px 10px;
}
-a.postOptionLink:hover {
+a.sy_class_option:hover {
color:#fff;
background-color:#3b94d6;
}
From 4fe60bfc97481e91756c6c1d947faa6615e93b3f Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Wed, 27 Jul 2016 14:56:41 +0800
Subject: [PATCH 36/66] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E8=A7=92=E8=89=B2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/services/courses_service.rb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index f8a8344a4..323a45a50 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -962,7 +962,10 @@ class CoursesService
- elsif params[role_id] ==
+ elsif params[role_id] == 9
+
+ elsif params[role_id] == 10
+
end
From 9d7fa86cb6cf3a26d2979d047a0e820ca1aa8081 Mon Sep 17 00:00:00 2001
From: Tim
Date: Wed, 27 Jul 2016 16:33:27 +0800
Subject: [PATCH 37/66] =?UTF-8?q?syllabus.css=E6=A0=B7=E5=BC=8F=E9=87=8D?=
=?UTF-8?q?=E7=94=A8=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/css/courses.css | 4 ----
public/stylesheets/css/public.css | 20 ++++++++++++++-----
public/stylesheets/sy_public.css | 16 +--------------
public/stylesheets/syllabus.css | 31 ------------------------------
4 files changed, 16 insertions(+), 55 deletions(-)
diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css
index a5bb95fa1..7a1a0dabb 100644
--- a/public/stylesheets/css/courses.css
+++ b/public/stylesheets/css/courses.css
@@ -136,10 +136,6 @@ span.author { font-size: 0.9em; color: #888; }
.ReplyToMessageInputContainer {width: 582px;float: left;}
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
-/*课程列表界面样式*/
-a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
-a:hover.course-title{ color:#269ac9;}
-
/*我的课程*/
.courses_top{ height:27px; border-bottom:3px solid #ebebeb;}
.courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;}
diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css
index 51f9831b4..a16bbce5b 100644
--- a/public/stylesheets/css/public.css
+++ b/public/stylesheets/css/public.css
@@ -514,11 +514,21 @@ a:hover.list-title{ color:#269ac9;}
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
.list-file li{ line-height:1.9;}
.list-info span{ margin-left:5px;}
-.pages a{ display:block; border:1px solid #d1d1d1; color:#000; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
-.pages a:hover{ background-color:#269ac9; color:#fff;}
+.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
+.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
a.pages-big{ width:50px;}
-.pages .active{ background-color:#269ac9; color:#fff;}
+.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
.pages{width:330px; margin:20px auto 10px;}
+ /*20160727大纲新增样式*/
+.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
+.sortTxt{ color:#000;}
+.sortTxt:hover{ color:#28be6c;}
+a.sort_no{ background: url(/images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
+a.list-title{ font-size:14px; font-weight: bold; color:#000; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
+
+/*课程列表界面样式*/
+a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
+a:hover.course-title{ color:#269ac9;}
/*视频播放默认图标*/
.mediaIco{margin: 30px 0 30px 20px;width: 200px;}
@@ -933,10 +943,10 @@ a:hover.member_btn{ background:#329cbd;}
.search_form_course{margin-top:8px;margin-left:8px;}
/*信息*/
-.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;}
+.project_info{ background:#fff; padding:10px 8px; width:224px; margin-bottom:10px;}
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
-.pr_info_logo:hover{ border:1px solid #64bdd9; }
+.pr_info_logo:hover{ border:1px solid #297fb8; }
.pr_info_join{}
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
a.pr_join_a_quit{ color:#fff; display:block; padding:0 2px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
diff --git a/public/stylesheets/sy_public.css b/public/stylesheets/sy_public.css
index f31737bfc..26a229fb7 100644
--- a/public/stylesheets/sy_public.css
+++ b/public/stylesheets/sy_public.css
@@ -98,21 +98,7 @@ a:hover.sy_btn_blue{ background: #2788d0;}
border-bottom:1px solid #ddd;
}
.sy_category span{ float: left;}
-a.sortupbtn{
- background: url(../images/sy/liststyle.png) 0 3px no-repeat;
- width:12px;
- height:17px;
- display:block;
- margin-right:10px;
- cursor:pointer;
-}
-a.sortdownbtn{
- background: url(../images/sy/liststyle.png) 0 -12px no-repeat;
- width:12px;
- height:17px;
- display:block;
- cursor:pointer;
-}
+
/* 翻页 */
.pages a{
display:block;
diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css
index 848f874d1..08cd55e3d 100644
--- a/public/stylesheets/syllabus.css
+++ b/public/stylesheets/syllabus.css
@@ -1,9 +1,3 @@
-/*信息*/
-.project_info{ background:#fff; padding:10px 8px; width:222px; margin-bottom:10px; border:1px solid #dddddd;}
-.pr_info_id{ width:130px; color:#5a5a5a; font-size:14px; margin-top:5px;}
-.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
-.pr_info_logo:hover{ border:1px solid #297fb8; }
-
/*课程大纲*/
input.syllabus_input{
border:none;
@@ -103,31 +97,6 @@ input.syllabus_input_min{
.syllabus_class_title{ font-size:14px; color:#333; width:500px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.syllabus_class_w{ width:650px;}
-/*班级列表界面(用的博客列表的样式)*/
-.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
-.bloglistbox{ min-height:690px;}
-.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
-.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
-.category2 a,.category2 span{ float:left; margin-right:5px;}
-.grayTxt{ color:#9093a6;}
-.sortTxt{ color:#000;}
-.sortTxt:hover{ color:#28be6c;}
-a.sortupbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 3px no-repeat; width:12px; height:17px; display:block; margin-right:10px; cursor:pointer;}
-a.sortdownbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
-a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
-.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
-a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
-a:hover.list-title{ color:#269ac9;}
-.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
-.list-file li{ line-height:1.9;}
-.list-info span{ margin-left:5px;}
-.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
-.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
-a.pages-big{ width:50px;}
-.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
-.pages{width:330px; margin:20px auto 10px;}
-a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
-a:hover.course-title{ color:#269ac9;}
/*新建页面*/
.name_input{ border:1px solid #64bdd9; height:16px; width:310px; background:#fff; margin-bottom:10px; padding:5px;}
From 0dfc887f74125e358fdc6cbf1385a5cfd40b28e6 Mon Sep 17 00:00:00 2001
From: cxt
Date: Wed, 27 Jul 2016 16:43:27 +0800
Subject: [PATCH 38/66] =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=8F=AD=E7=BA=A7?=
=?UTF-8?q?=E4=B8=AD=E8=B5=84=E6=BA=90=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_copy_course.html.erb | 2 +-
...20160727065357_add_column_to_member_role.rb | 16 ++++++++++++++++
db/schema.rb | 18 +++++++++++++++---
3 files changed, 32 insertions(+), 4 deletions(-)
create mode 100644 db/migrate/20160727065357_add_column_to_member_role.rb
diff --git a/app/views/courses/_copy_course.html.erb b/app/views/courses/_copy_course.html.erb
index 55217017b..9f45172bc 100644
--- a/app/views/courses/_copy_course.html.erb
+++ b/app/views/courses/_copy_course.html.erb
@@ -114,7 +114,7 @@
资源
- 复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生可能看不到资源。
+ 复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生将看不到资源。
+
+
+
+
+
+
+
+
+
diff --git a/public/assets/wechat/project_invite_code.html b/public/assets/wechat/project_invite_code.html
new file mode 100644
index 000000000..a17b8fe85
--- /dev/null
+++ b/public/assets/wechat/project_invite_code.html
@@ -0,0 +1,16 @@
+
+
+
+
{{project.name}}
+
+
邀请码:{{project.invite_code}}
+
+
+
+
+
+
1.点击右上角"发送给朋友",邀请朋友加入项目
+ 2.长按二维码,通过“识别图中二维码”功能加入项目
+ 3.通过“加入项目”菜单输入邀请码加入项目(长按邀请码可以复制哦~)
+
+
\ No newline at end of file
diff --git a/public/javascripts/wechat/controllers/myresource.js b/public/javascripts/wechat/controllers/myresource.js
index 4ad5c66a7..b5489c065 100644
--- a/public/javascripts/wechat/controllers/myresource.js
+++ b/public/javascripts/wechat/controllers/myresource.js
@@ -1,6 +1,7 @@
app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$location', 'rms', function($scope, $http, auth, config, $location,rms){
var vm = $scope;
- vm.menus = ['课件', '作业', '测验'];
+// vm.menus = ['课件', '作业', '测验'];
+ vm.menus = ['课件', '作业'];
vm.resources = [];
vm.homeworks = [];
diff --git a/public/javascripts/wechat/controllers/project.js b/public/javascripts/wechat/controllers/project.js
index 6c97c9efc..3acf0bb6f 100644
--- a/public/javascripts/wechat/controllers/project.js
+++ b/public/javascripts/wechat/controllers/project.js
@@ -22,6 +22,14 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut
vm.alertService = alertService.create();
+ //跳入邀请界面
+ vm.invite = function(){
+ vm.alertService.showMessage('提示', "该功能暂未开放,敬请期待!");
+
+
+// $location.path("/project_invite_code").search({id: projectid});
+ };
+
//获取项目动态
vm.getActivities = function(page){
$http({
diff --git a/public/javascripts/wechat/controllers/project_invite_code.js b/public/javascripts/wechat/controllers/project_invite_code.js
new file mode 100644
index 000000000..eb3032650
--- /dev/null
+++ b/public/javascripts/wechat/controllers/project_invite_code.js
@@ -0,0 +1,34 @@
+/**
+ * Created by guange on 16/6/22.
+ */
+
+
+app.controller('ProjectInviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
+ var vm = $scope;
+
+ vm.project = {};
+ var projectid = $routeParams.id;
+ $http.get(config.apiUrl+ 'projects/'+projectid+"?token="+auth.token()).then(
+ function(response){
+ console.log(response.data);
+ vm.project = response.data.data;
+ }
+ );
+
+ vm.share = function(){
+ window.WeixinJSBridge.invoke('sendAppMessage',{
+ 'appid': 'wxf694495398c7d470', // 公众号appID
+ 'type': 'link', // 非必填,music,vido或link,默认为link。
+ 'data_url': '', // 非必填,连接地址,如音乐的mp3数据地址,供内置播放器使用
+ 'img_url': 'http://pnewsapp.tc.qq.com/newsapp_bt/0/9963967/640', // 缩略图地址
+ 'img_height':370, // 缩略图高度
+ 'img_width':550, // 缩略图宽度
+ 'link':'http://view.inews.qq.com/a/WXN2013101101385701', // 链接地址
+ 'desc':'desc', // 描述
+ 'title':'title' // 标题
+ },function(res){
+ //alert(res.err_msg);
+ });
+ }
+
+}]);
diff --git a/public/javascripts/wechat/controllers/send_class_list.js b/public/javascripts/wechat/controllers/send_class_list.js
index eee462ee3..bc81cfc08 100644
--- a/public/javascripts/wechat/controllers/send_class_list.js
+++ b/public/javascripts/wechat/controllers/send_class_list.js
@@ -49,14 +49,20 @@ app.controller('SendClassListController', ['$scope', '$http','$routeParams', 'co
var tip = "";
if (vm.myresource_sendIndex == 1){
tip = "课件已发送到目标班级。";
+ vm.alertService.showMessage('发送成功', tip, function () {
+ rms.save('page',0);
+ rms.save("resources",[]);
+ rms.save("has_more",false);
+ window.history.back();
+ });
}
else if(vm.myresource_sendIndex == 2){
tip = "题目已发送到目标班级的作业列表,但需要您访问Trustie网站设置发布和截止时间,以激活相应作业,谢谢。";
+ vm.alertService.showMessage('发送成功', tip, function () {
+ window.history.back();
+ });
}
- vm.alertService.showMessage('发送成功', tip, function () {
- window.history.back();
- });
} else {
vm.alertService.showMessage('发送出错', response.data.message);
}
diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js
index a2b57d7e9..8596ee706 100644
--- a/public/javascripts/wechat/others/routes.js
+++ b/public/javascripts/wechat/others/routes.js
@@ -42,6 +42,7 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func
.when('/project', makeRoute('project.html', 'ProjectController'))
.when('/edit_project_member', makeRoute('edit_project_member.html', 'EditProjectMemberController'))
.when('/new_project', makeRoute('new_project.html', 'NewProjectController'))
+ .when('/project_invite_code', {templateUrl: rootPath + 'project_invite_code.html', controller: 'ProjectInviteCodeController'})
.otherwise({
redirectTo: '/activites'
});
From 4bbd72ecd23c6f34e55082a9bc86ff16bc61c828 Mon Sep 17 00:00:00 2001
From: Tim
Date: Thu, 28 Jul 2016 14:58:19 +0800
Subject: [PATCH 46/66] =?UTF-8?q?=E5=8F=91=E9=80=81=E7=8F=AD=E7=BA=A7?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=91=E9=80=81=E6=8C=89=E9=92=AE=E5=AE=9A?=
=?UTF-8?q?=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/assets/wechat/send_class_list.html | 2 +-
public/stylesheets/weui/weixin.css | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/public/assets/wechat/send_class_list.html b/public/assets/wechat/send_class_list.html
index 72a52fc3f..b6d250d5d 100644
--- a/public/assets/wechat/send_class_list.html
+++ b/public/assets/wechat/send_class_list.html
@@ -19,6 +19,6 @@
- 发送
+ 发送
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index cc3e3151a..80f51d5d9 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -86,6 +86,8 @@ a.underline {text-decoration:underline;}
.bg-blue:not(.btn-disabled):active {background-color:#2780c2;}
.btn-disabled {background-color:#ccc !important;}
.btn2 {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; margin:18px auto 20px auto; border-radius:50px; display:block;}
+.btn3 {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; border-radius:50px; display:block;}
+.fixed-bottom-btn {position:fixed; bottom:5px; left:50%; transform:translate(-50%,0);}
/*tab*/
.tab-wrap {position:relative; width:100%; line-height:38px; display:-webkit-box; display:-moz-box; display:-ms-flexbox; display:-webkit-flex; display:flex; font-size:13px; background-color:#fff;}
From 6d594cfcbee0d0f054509aaea1ac923214572082 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Thu, 28 Jul 2016 15:11:04 +0800
Subject: [PATCH 47/66] =?UTF-8?q?git=20pull=E5=90=8E=E9=87=8D=E6=96=B0comm?=
=?UTF-8?q?it?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile | 2 +
app/api/mobile/apis/projects.rb | 2 +-
app/controllers/at_controller.rb | 2 +-
app/controllers/issues_controller.rb | 36 ++++++++++---
app/controllers/student_work_controller.rb | 8 +++
app/controllers/syllabuses_controller.rb | 2 +-
app/controllers/wechats_controller.rb | 4 +-
app/helpers/application_helper.rb | 1 -
app/helpers/courses_helper.rb | 14 ++---
app/models/journal.rb | 2 +-
app/views/boards/_course_new.html.erb | 4 +-
app/views/courses/show.html.erb | 2 +-
app/views/issues/_issue_replies.html.erb | 3 +-
app/views/issues/add_journal.js.erb | 22 +-------
app/views/issues/add_reply.js.erb | 6 +--
app/views/issues/delete_journal.js.erb | 4 +-
app/views/layouts/_course_base_info.html.erb | 10 ++--
.../syllabuses/_delete_syllabus.html.erb | 4 +-
config/locales/courses/zh.yml | 2 +-
db/schema.rb | 20 +++++---
lib/wechat/lib/wechat.rb | 1 +
lib/wechat/lib/wechat/ticket/jsapi_base.rb | 4 +-
.../lib/wechat/token/access_token_base.rb | 4 +-
plugins/redmine_ckeditor/.gitmodules | 3 --
public/assets/wechat/blog_detail.html | 39 +++++++-------
public/assets/wechat/course_discussion.html | 47 ++++++++---------
public/assets/wechat/course_notice.html | 38 +++++++-------
public/assets/wechat/homework_detail.html | 39 +++++++-------
public/assets/wechat/issue_detail.html | 46 ++++++++---------
public/assets/wechat/jour_message_detail.html | 49 +++++++++---------
public/assets/wechat/project_discussion.html | 51 +++++++++----------
.../wechat/templates/comment_reply.html | 38 +++++++-------
.../wechat/controllers/activity.js | 2 +-
.../javascripts/wechat/controllers/project.js | 2 +-
public/stylesheets/weui/weixin.css | 12 +++--
35 files changed, 265 insertions(+), 260 deletions(-)
delete mode 100644 plugins/redmine_ckeditor/.gitmodules
diff --git a/Gemfile b/Gemfile
index a94f1b33b..6e8a4dcdf 100644
--- a/Gemfile
+++ b/Gemfile
@@ -49,6 +49,8 @@ gem 'kaminari'
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
+#rails 3.2.22.2 bug
+gem "test-unit", "~>3.0"
### profile
# gem 'oneapm_rpm'
diff --git a/app/api/mobile/apis/projects.rb b/app/api/mobile/apis/projects.rb
index f0bb2cc3c..23bcadde9 100644
--- a/app/api/mobile/apis/projects.rb
+++ b/app/api/mobile/apis/projects.rb
@@ -173,7 +173,7 @@ module Mobile
#
# present :status, status
- {status:-1, message: '该功能暂未开放,敬请期待!' }
+ {status:-1, message: '该功能将在近日开发,敬请期待!' }
end
end
diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb
index 69c33f90e..0e48cd962 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 @users.size > 0
+ if @user && @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/issues_controller.rb b/app/controllers/issues_controller.rb
index 921d7d12b..63ef30b35 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -440,7 +440,7 @@ class IssuesController < ApplicationController
jour.save
update_user_activity(@issue.class,@issue.id)
update_forge_activity(@issue.class,@issue.id)
-
+ @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@user_activity_id = params[:user_activity_id]
if params[:issue_id]
@issue_id = params[:issue_id]
@@ -483,12 +483,21 @@ class IssuesController < ApplicationController
if User.current.logged?
jour = Journal.find(params[:journal_id])
@issue = Issue.find params[:id]
- new_jour = @issue.journals.build(:user_id => User.current.id, :reply_id => params[:journal_id], :notes => params[:content], :parent_id => jour.id)
+ @project = @issue.project
+ @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
+ @priorities = IssuePriority.active
+ new_jour = Journal.new
+ new_jour.user_id = User.current.id
+ new_jour.reply_id = params[:journal_id]
+ new_jour.parent_id = jour.id
+ new_jour.notes = params[:content]
+ new_jour.journalized = @issue
+ new_jour.save_attachments(params[:attachments])
+ # new_jour = @issue.journals.build(:user_id => User.current.id, :reply_id => params[:journal_id], :notes => params[:content], :parent_id => jour.id)
@user_activity_id = params[:user_activity_id]
if new_jour.save
update_user_activity(@issue.class,@issue.id)
update_forge_activity(@issue.class,@issue.id)
-
respond_to do |format|
format.js
end
@@ -496,13 +505,28 @@ class IssuesController < ApplicationController
end
end
- #
+ # 需要刷新详情页面,代码同步一致
+ # 获取project和issue状态是为了刷新页面
+ # 值所以用delete是因为issue和journal在act_as_attachment中是同一个类型
+ # 非动态页面直接刷新,动态页面手动刷新
def delete_journal
@issue = Issue.find(params[:id])
- Journal.destroy(params[:journal_id])
+ begin
+ forge_acts = ForgeMessage.where(:forge_message_type => "Journal", :forge_message_id => params[:journal_id]).first
+ forge_acts.destroy unless forge_acts.nil?
+ at_message = AtMessage.where(:at_message_type => "Journal", :at_message_id => params[:journal_id]).first
+ at_message.destroy unless at_message.nil?
+ Journal.delete(params[:journal_id])
+ rescue Exception => e
+ puts e
+ end
@user_activity_id = params[:user_activity_id]
respond_to do |format|
- format.js
+ if @user_activity_id
+ format.js
+ else
+ format.html{ redirect_to issue_url(@issue)}
+ end
end
end
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 1b93bdeba..e2dd23552 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -381,6 +381,7 @@ class StudentWorkController < ApplicationController
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
@show_all = false
+ # 0表示没有分组的学生,-1表示所有分组的学生
if @group
if @group == "0"
none_group_students = @course.members.select{ |member| member.course_group_id == 0 }
@@ -389,6 +390,13 @@ class StudentWorkController < ApplicationController
else
student_in_group = '(' + none_group_students.map{ |member| member.user_id }.join(',') + ')'
end
+ elsif @group == "-1"
+ all_group_students = @course.members.select{ |member| member.course_group_id }
+ if all_group_students.empty?
+ student_in_group = '(0)'
+ else
+ student_in_group = '(' + all_group_students.map{ |member| member.user_id }.join(',') + ')'
+ end
else
course_group = CourseGroup.find_by_id(@group)
group_students = course_group.users
diff --git a/app/controllers/syllabuses_controller.rb b/app/controllers/syllabuses_controller.rb
index 9c69f5259..e77b19511 100644
--- a/app/controllers/syllabuses_controller.rb
+++ b/app/controllers/syllabuses_controller.rb
@@ -88,7 +88,7 @@ class SyllabusesController < ApplicationController
end
def destroy
- if @syllabus && @syllabus.courses.empty?
+ if @syllabus && @syllabus.courses.not_deleted.empty?
@syllabus.destroy
redirect_to user_courselist_user_path(User.current.id)
end
diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb
index b791a0508..b773ef62e 100644
--- a/app/controllers/wechats_controller.rb
+++ b/app/controllers/wechats_controller.rb
@@ -145,11 +145,11 @@ class WechatsController < ActionController::Base
end
on :click, with: 'PROJECT' do |request, key|
- request.reply.text "此功能正在开发中,很快就会上线,谢谢!"
+ request.reply.text "该功能将在近日开发,敬请期待!"
end
on :click, with: 'JOIN_PROJECT' do |request, key|
- request.reply.text "该功能暂未开放,敬请期待!"
+ request.reply.text "该功能将在近日开发,敬请期待!"
# uw = user_binded?(request[:FromUserName])
# unless uw
# sendBind(request)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7aae73e94..d64d95223 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -33,7 +33,6 @@ module ApplicationHelper
extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
-
# def user_blogs_path(resource,parameters={})
# super
# end
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index 96e0d7683..e1dda3554 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -595,19 +595,19 @@ module CoursesHelper
def get_acts_list_type type
case type
when "homework"
- ">" + l(:label_homework_acts)
+ l(:label_homework_acts)
when "news"
- ">" + l(:label_news_acts)
+ l(:label_news_acts)
when "attachment"
- ">" + l(:label_attachment_acts)
+ l(:label_attachment_acts)
when "message"
- ">" + l(:label_message_acts)
+ l(:label_message_acts)
when "journalsForMessage"
- ">" + l(:label_journalsForMessage_acts)
+ l(:label_journalsForMessage_acts)
when "poll"
- ">" + l(:label_poll_acts)
+ l(:label_poll_acts)
else
- ">" + l(:label_all_cats)
+ l(:label_all_cats)
end
end
diff --git a/app/models/journal.rb b/app/models/journal.rb
index d2cc9e539..f22015f47 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -55,7 +55,7 @@ class Journal < ActiveRecord::Base
before_create :split_private_notes, :add_journals_count
# fq
- after_save :act_as_activity,:be_user_score, :act_as_forge_message, act_as_at_message(:notes, :user_id)
+ after_save :be_user_score, :act_as_forge_message, act_as_at_message(:notes, :user_id)
# end
#after_destroy :down_user_score
#before_save :be_user_score
diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb
index 32cec24d5..90f0d9c7e 100644
--- a/app/views/boards/_course_new.html.erb
+++ b/app/views/boards/_course_new.html.erb
@@ -132,12 +132,12 @@
<%if User.current.member_of_course?(course) %>
- <% if User.current.admin? %>
+ <% if User.current.id == course.tea_id %>
<%= f.check_box :sticky, :value => topic.sticky %>
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
- <% end %>
<%= f.check_box :locked, :value => topic.locked %>
<%= label_tag 'message_locked', l(:label_board_locked) %>
+ <% end %>
<% end %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb
index e7800531b..3e509faa5 100644
--- a/app/views/courses/show.html.erb
+++ b/app/views/courses/show.html.erb
@@ -9,7 +9,7 @@