diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index f35d47079..46e8e015a 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -369,7 +369,7 @@
function apply_add_school(){
var htmlvalue = "<%= escape_javascript( render :partial => 'my/apply_add_school' )%>";
pop_up_box(htmlvalue,580,20,48);
-
+ $("#schoolname").val($("input[name='province']").val());
}
function add_school(name){
$.ajax({
diff --git a/config/routes.rb b/config/routes.rb
index 2cc2bd906..b07600400 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1074,6 +1074,7 @@ RedmineApp::Application.routes.draw do
get 'admin/approve_applied_schools'
post 'admin/edit_applied_schools'
get 'admin/all_schools'
+ get 'admin/apply_shcool_sort', as: :apply_shcool_sort
delete 'admin/delete_applied_schools'
get 'admin/leave_messages'
From 4d3f4c358a9cda6823da71702870a68f4e9d0db4 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 29 Jul 2016 16:13:25 +0800
Subject: [PATCH 02/26] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/assets/wechat/app.html | 110 ++--
public/assets/wechat/new_class.html | 28 +-
public/assets/wechat/new_project.html | 56 +-
.../wechat/controllers/invite_code.js | 36 +-
.../javascripts/wechat/directives/ellipsis.js | 48 +-
public/stylesheets/weui/weixin.css | 488 +++++++++---------
6 files changed, 383 insertions(+), 383 deletions(-)
diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html
index 606164efe..74af26cfe 100644
--- a/public/assets/wechat/app.html
+++ b/public/assets/wechat/app.html
@@ -1,56 +1,56 @@
-
-
-
-
- 仅供本地调试使用
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 仅供本地调试使用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/assets/wechat/new_class.html b/public/assets/wechat/new_class.html
index 843bed0b2..e4d02be5a 100644
--- a/public/assets/wechat/new_class.html
+++ b/public/assets/wechat/new_class.html
@@ -1,14 +1,14 @@
-
+
diff --git a/public/assets/wechat/new_project.html b/public/assets/wechat/new_project.html
index a59904e14..785de322f 100644
--- a/public/assets/wechat/new_project.html
+++ b/public/assets/wechat/new_project.html
@@ -1,28 +1,28 @@
-
+
diff --git a/public/javascripts/wechat/controllers/invite_code.js b/public/javascripts/wechat/controllers/invite_code.js
index 3908d1b40..ca69e308c 100644
--- a/public/javascripts/wechat/controllers/invite_code.js
+++ b/public/javascripts/wechat/controllers/invite_code.js
@@ -1,18 +1,18 @@
-/**
- * Created by guange on 16/6/22.
- */
-
-
-app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
- var vm = $scope;
-
- vm.course = {};
- var courseid = $routeParams.id;
- $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then(
- function(response){
- console.log(response.data);
- vm.course = response.data.data;
- }
- );
-
-}]);
+/**
+ * Created by guange on 16/6/22.
+ */
+
+
+app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
+ var vm = $scope;
+
+ vm.course = {};
+ var courseid = $routeParams.id;
+ $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then(
+ function(response){
+ console.log(response.data);
+ vm.course = response.data.data;
+ }
+ );
+
+}]);
diff --git a/public/javascripts/wechat/directives/ellipsis.js b/public/javascripts/wechat/directives/ellipsis.js
index a5d5d9845..dd826d6a3 100644
--- a/public/javascripts/wechat/directives/ellipsis.js
+++ b/public/javascripts/wechat/directives/ellipsis.js
@@ -1,25 +1,25 @@
-/**
- * Created by Tim on 7/22/16.
- */
-app.directive('ellipsisShow',["$timeout",function(timer){
- return{
- restrict: 'A',
- scope: {},
- link: function(scope, element){
- timer(function() {
- var textSplit = element.text().split(" ");
- var newContent = [];
- element.text("");
- for (var i = 0; i < textSplit.length; i++) {
- newContent = newContent + " " + textSplit[i];
- element.text(newContent);
- if(element[0].scrollHeight >= 100){
- newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "...";
- element.text(newContent);
- break;
- }
- }
- });
- }
- }
+/**
+ * Created by Tim on 7/22/16.
+ */
+app.directive('ellipsisShow',["$timeout",function(timer){
+ return{
+ restrict: 'A',
+ scope: {},
+ link: function(scope, element){
+ timer(function() {
+ var textSplit = element.text().split(" ");
+ var newContent = [];
+ element.text("");
+ for (var i = 0; i < textSplit.length; i++) {
+ newContent = newContent + " " + textSplit[i];
+ element.text(newContent);
+ if(element[0].scrollHeight >= 100){
+ newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "...";
+ element.text(newContent);
+ break;
+ }
+ }
+ });
+ }
+ }
}]);
\ No newline at end of file
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 58b4a244e..987141088 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -1,245 +1,245 @@
-@charset "utf-8";
-/* CSS Document */
-
-/*基本样式*/
-body,table,input,textarea,select,button { font-family: "微软雅黑","宋体","Helvetica Neue", Helvetica, Arial, sans-serif;}
-body, ul, h1,h2,h3,h4,h5,p,pre,input {padding:0px; margin:0px;}
-body{background-color: #efeff4;}
-ul li {list-style:none;}
-img {max-width:100%;}
-blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin: 5px 0.4em 5px 1.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%;}
-.text-control {word-break:normal; word-wrap:break-word;}
-.f12 {font-size:12px;}
-.f13 {font-size:13px;}
-.f14 {font-size:14px;}
-.f15 {font-size:15px;}
-.f16 {font-size:16px;}
-.fb {font-weight:bold;}
-.mt2 {margin-top:2px;}
-.mt3 {margin-top:3px;}
-.mt4 {margin-top:4px;}
-.mt5 {margin-top:5px;}
-.mt10 {margin-top:10px;}
-.mt11 {margin-top:11px;}
-.mt12 {margin-top:12px;}
-.mt15 {margin-top:15px;}
-.mt30 {margin-top:30px;}
-.mt70 {margin-top:70px;}
-.mb5 {margin-bottom:5px;}
-.mb10 {margin-bottom:10px;}
-.mb15 {margin-bottom:15px;}
-.mb20 {margin-bottom:20px;}
-.mb50 {margin-bottom:50px;}
-.ml5 {margin-left:5px;}
-.ml10 {margin-left:10px;}
-.ml40 {margin-left:40px;}
-.mr5 {margin-right:5px;}
-.mr10 {margin-right:10px;}
-.ml15 {margin-left:15px;}
-.ml35 {margin-left:35px;}
-.mr15 {margin-right:15px;}
-.mr20 {margin-right:20px;}
-.ml25 {margin-left:25px;}
-.mr25 {margin-right:25px;}
-.ml55 {margin-left:55px;}
-.mr55 {margin-right:55px;}
-.c-red {color:#e81a1a;}
-.c-blue {color:#269ac9;}
-.c-grey {color:#9a9a9a !important;}
-.c-grey2 {color:#707070;}
-.c-grey3 {color:#555555;}
-.c-grey4 {color:#888888;}
-.c-grey5 {color:#aaaaaa;}
-.c-grey6 {color:#777777;}
-.c-blue {color:#3b94d6;}
-.c-white {color:#ffffff;}
-.c-black {color:#333}
-a {color:#707070;}
-a.c-grey {color:#707070;}
-a.c-grey2 {color:#9a9a9a;}
-a.c-grey3 {color:#353535;}
-a.c-green {color:#0bb20c;}
-a:link,a:visited{text-decoration:none;}
-a:hover,a:active{cursor:pointer;}
-a.link-blue {color:#269ac9;}
-a.link-blue2 {color:#3b94d6;}
-a.underline {text-decoration:underline;}
-.border-radius {border-radius:5px;}
-.w36 {width:36px;}
-.max-width-60 {max-width:60px;}
-.max-width-130 {max-width:130px;}
-.hidden {overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
-.inline-block {display:inline-block;}
-.dis {display:block;}
-.undis {display:none;}
-.text-nowrap {white-space:nowrap;}
-.v-top {vertical-align:top;}
-.tac {text-align:center;}
-.block-center {margin-left:auto; margin-right:auto; display:block;}
-
-/*背景色*/
-.bg-grey {background-color:#c1c1c1 !important;}
-.bg-blue {background-color:#3b94d6;}
-
-/*按钮样式*/
-.btn1 {width:100%; height:40px; line-height:40px; vertical-align:middle; text-align:center; color:#fff; display:block; border-radius:5px;}
-.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;}
-.tab-wrap a {position:relative; display:block; -webkit-box-flex:1; -moz-box-flex:1; -ms-flex:1; flex:1;}
-.tab-wrap a:first-child:after {display:none;}
-.tab-wrap a:after {content:" "; position:absolute; left:0; top:0; width:1px; height:100%; border-left:1px solid #ccc; color:#707070;}
-.weixin-tab {text-align:center; border-bottom:1px solid #ccc;}
-
-/*bottom-tab*/
-.bottom-tab-wrap {position:fixed; width:100%; bottom:0; line-height:38px; display:-webkit-box; display:-moz-box; display:-ms-flexbox; display:-webkit-flex; display:flex; font-size:13px; background-color:#fff;}
-.bottom-tab-wrap a {display:block; -webkit-box-flex:1; -moz-box-flex:1; -ms-flex:1; flex:1; position:relative;}
-.bottom-tab-wrap a:after {content:" "; position:absolute; left:0; top:0; width:1px; height:100%; border-left:1px solid #ccc; color:#707070;}
-
-/*动态样式*/
-.post-container {width:100%;}
-.post-wrapper {width:100%; background-color:#ffffff; margin:10px auto;}
-.post-main {padding:10px 15px; color:#9a9a9a;}
-.post-avatar {width:30px; height:30px;}
-.post-title {font-size:13px; text-align:left;}
-.post-detail-info {font-size:13px; text-align:left; color:#9a9a9a;}
-.fl {float:left;}
-.fr {float:right;}
-.cl {clear:both; overflow:hidden;}
-.post-content {width:100%; font-size:14px; line-height:20px; height:100px; overflow:hidden; word-break:normal; word-wrap:break-word; text-align:justify;}
-.post-all-content a {color:#136ec2;}
-.post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;}
-.post-interactive-column,
-.post-interactive-reply,
-.post-interactive-praise {width:50%; text-align:center; float:left; font-size:13px;}
-.more-wrap {width:100%;}
-.more-events {width:100%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border-top:1px solid #e6e6e6; border-bottom:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
-.border-bottom {border-bottom:1px solid #e6e6e6;}
-.post-reply-wrap {width:100%;}
-.post-reply-wrap:first-child {border-top:1px solid #ccc;}
-.post-input-wrap {width:100%; position:fixed; bottom:0; background-color:#fff;}
-.post-input-wrap2 {width:100%;}
-.post-reply-row {margin:10px 15px; color:#9a9a9a; background-color:#fff; border-bottom:1px solid #f0f0f0;}
-.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;}
-.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;}
-.post-reply-content {font-size:13px; word-break:break-all; word-wrap:break-word; overflow:hidden; text-align:justify;}
-.post-reply-content img {max-width:100%;}
-.post-reply-content a {color:#136ec2;}
-.post-reply-date, .post-reply-trigger {font-size:13px;}
-.post-input-container {position:relative; padding-right:70px;}
-.copy-input-container {position:relative; padding-right:70px;}
-.copy-input {width:100%; height:18px; line-height:18px; padding:5px; vertical-align: middle; font-size:12px; border-radius:3px; position:absolute; left:-999em;}
-.post-reply-input {width:100%; height:18px; max-height:54px; line-height:18px; vertical-align: middle; font-size:13px; border:1px solid #e6e6e6; outline:none; padding:5px; margin:0; border-radius:3px; overflow-y:auto; resize:none; background-color:#f0eff4;}
-.post-reply-submit {position:absolute; font-size:13px; height:30px; line-height:30px; vertical-align:middle; padding:0 8px; color:#fff; background-color:#269ac9; outline:none; border:none; top:0; right:0;}
-.reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
-.praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
-.praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
-.num-block {display:inline-block; vertical-align:top;}
-.post-op-banner {height:20px; line-height:20px; vertical-align:middle;}
-
-/*20160628动态新样式*/
-.post-dynamic-author {width:50%; height:30px; line-height:30px; font-size:14px; color:#5b5b5b; vertical-align:middle;}
-.post-dynamic-time {height:30px; line-height:30px; vertical-align:middle;}
-.post-dynamic-title {font-size:15px;}
-.post-dynamic-from {width:50%; font-size:13px;}
-.post-box-shadow {box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
-.post-reply-author {width:50%; height:20px; line-height:20px; font-size:12px; color:#5d5d5d; vertical-align:middle;}
-.post-reply-time {height:20px; line-height:20px; vertical-align:middle;}
-
-/* loading 弹框*/
-.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
-.loading-box {position:absolute; top:50%; background:rgba(240,240,240, 0.5); width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
-.loading-box img {margin-top: 3px; text-align: center;}
-.loading-box span {display: block; font-size:12px;}
-
-/*帖子锁定样式*/
-.locked_btn_cir {background: url("/images/wechat/locked.png") 0 0 no-repeat; cursor: default;}
-
-/*20150612加入班级样式*/
-.add-class-box {position:fixed; width:80%; max-width:300px; min-width:240px; font-size:15px; color:#444; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; top:50%; left:50%; transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%);}
-.add-class-tip {padding-top:1.2em; padding-bottom:.5em; font-weight:400;}
-.class-number-input {width:80%; max-width:240px; height:28px; border:1px solid #ccc; padding-left:5px; margin:0 auto; display:block;}
-.cancel-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;}
-.submit-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;}
-.slice {width:2%; text-align:center; border-top:1px solid #ccc;}
-.slice-line {width:1px; height:37px; margin:auto; background:#ccc;}
-
-/*20160613邀请码样式*/
-.qr-code-wrap {width:100%; padding:40px 0; background-color:#3b94d6;}
-.qr-code-box {width:225px; background-color:#fff; border-radius:3px; margin:0 auto;}
-.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc;}
-.qr-img-wrap {width:100%; border-bottom:1px dashed #ccc;}
-.qr-code-img {margin:36px auto; display:block;}
-.invitation-code-wrap {text-align:center; font-size:18px; color:#3b3b3b; padding:16px;}
-.share-code-wrap {width:100%; background-color:#efeff4;}
-.share-code-btn, .finish-btn {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; background-color:#ff7239; margin:18px auto 20px auto; border-radius:50px; display:block;}
-.share-code-instruction {max-width:228px; font-size:12px; color:#666; line-height:20px; margin:0 auto;}
-
-/*20160613班级详情*/
-.class-detail-name, .blue-title {width:100%; height:45px; line-height:45px; vertical-align:middle; background-color:#3b94d6; color:#fff; font-size:18px; text-align:center;}
-.blue-title-sub {position:absolute; right:10px;}
-.slice2 {width:2%; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;}
-.slice3 {width:1%; height:38px; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;}
-.slice-line2 {width:1px; height:38px; margin:auto; background:#ccc;}
-.class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
-.class-detail-tab2 {width:32%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
-.class-detail-tab3 {width:48%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
-.class-tab-active {border-bottom:3px solid #3b94d6;}
-.tab-active-arrow {border-width:4px; position:absolute; top:41px; left:50%; transform:translate(-50%,0); border-color:#3b94d6 transparent transparent transparent; border-style:solid dashed dashed dashed;}
-.class-search-wrap {padding:8px 12px; position:relative;}
-.class-search-inner {padding:0 30px; background-color:#fff;}
-.class-search-icon {position:absolute; top:16px; left:16px;}
-.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; position:relative;}
-.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;}
-.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%;}
-.other-from-width {max-width:80%;}
-.course-name-width {width:68%;}
-
-/*20160614班级列表*/
-.course-diff-row {width:100%; height:28px; line-height:28px; vertical-align:middle; background-color:#fff; border-bottom:1px solid #ccc;}
-.course-list-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-top:1px solid #ccc; border-bottom:1px solid #ccc; background-color:#fff;}
-.class-list {width:100%; border-bottom:1px solid #ccc;}
-.class-list li {height:40px; line-height:40px; vertical-align:middle; margin:0 25px; border-left:1px solid #ccc; border-bottom:1px solid #ccc; position:relative;}
-.class-list-name {max-width:75%; display:inline-block;}
-.class-list-dot {position:absolute; top:13px; left:-8px;}
-.border-bottom-none {border-bottom:none !important;}
-.border-top-none {border-top:none !important;}
-.students-amount {height:14px; line-height:14px; vertical-align:middle; padding:2px 5px; background-color:#e6e6e6; border-radius:10px;}
-.new-class-btn {font-size:15px; color:#fff; background-color:#3b94d6; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
-.join-class-btn {font-size:15px; color:#444; background-color:#ccc; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
-.new-class-input {width:60%; color:#555; height:16px; line-height:16px; vertical-align:middle; border:none; outline:none; padding:8px 0;}
-.class-list-setting {position:absolute; top:11px; right:10px;}
-.class-setting-wrap {width:38px; height:38px; position:absolute; top:0; right:0;}
-
-/*20160616登录注册*/
-.login-wrap {padding:0 10px;}
-.input-box-wrap {padding-right:17px;}
-.input-box { -webkit-appearance: none; font-size: 15px;width:100%; height:18px; padding: 10px 0px 10px 5px; line-height:18px; border:1px solid #ccc; border-radius:5px;}
-.login-op-wrap {height:30px; line-height:30px; vertical-align:middle;}
-.login-box{display:inline-block; width:14px; height:14px; line-height:14px; text-align:center; vertical-align:middle; border:1px solid #ccc; background:#fff; border-radius:3px; color:#fff; cursor:pointer;}
-.login-box.checked{background:#63c360; border:1px solid #63c360;}
-.login-box.checked:after{content:url(/images/wechat/checked.png);}
-.forget-psw-wrap {width:60px; margin:0 auto;}
-.forget-psw {position:fixed; bottom:10px;}
-
-/*二级回复*/
-.mult-reply-container{ border:solid 1px #f3ddb3; background:#fffef4; padding:4px;color:#999;}
-.mult-reply-content{ color:#555; font-size:13px;}
-.mult-reply-hide{ text-align:center; display:block; font-size:14px; color:#aaa; border-bottom:1px solid #F3DDB3; padding:8px 0;}
-.mult-reply-arrow{ color:#aaa; margin-right:10px; font-size:14px; font-weight:bold;}
-
-
-/*20160729项目说明*/
-.project-intro {line-height:2;}
+@charset "utf-8";
+/* CSS Document */
+
+/*基本样式*/
+body,table,input,textarea,select,button { font-family: "微软雅黑","宋体","Helvetica Neue", Helvetica, Arial, sans-serif;}
+body, ul, h1,h2,h3,h4,h5,p,pre,input {padding:0px; margin:0px;}
+body{background-color: #efeff4;}
+ul li {list-style:none;}
+img {max-width:100%;}
+blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin: 5px 0.4em 5px 1.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%;}
+.text-control {word-break:normal; word-wrap:break-word;}
+.f12 {font-size:12px;}
+.f13 {font-size:13px;}
+.f14 {font-size:14px;}
+.f15 {font-size:15px;}
+.f16 {font-size:16px;}
+.fb {font-weight:bold;}
+.mt2 {margin-top:2px;}
+.mt3 {margin-top:3px;}
+.mt4 {margin-top:4px;}
+.mt5 {margin-top:5px;}
+.mt10 {margin-top:10px;}
+.mt11 {margin-top:11px;}
+.mt12 {margin-top:12px;}
+.mt15 {margin-top:15px;}
+.mt30 {margin-top:30px;}
+.mt70 {margin-top:70px;}
+.mb5 {margin-bottom:5px;}
+.mb10 {margin-bottom:10px;}
+.mb15 {margin-bottom:15px;}
+.mb20 {margin-bottom:20px;}
+.mb50 {margin-bottom:50px;}
+.ml5 {margin-left:5px;}
+.ml10 {margin-left:10px;}
+.ml40 {margin-left:40px;}
+.mr5 {margin-right:5px;}
+.mr10 {margin-right:10px;}
+.ml15 {margin-left:15px;}
+.ml35 {margin-left:35px;}
+.mr15 {margin-right:15px;}
+.mr20 {margin-right:20px;}
+.ml25 {margin-left:25px;}
+.mr25 {margin-right:25px;}
+.ml55 {margin-left:55px;}
+.mr55 {margin-right:55px;}
+.c-red {color:#e81a1a;}
+.c-blue {color:#269ac9;}
+.c-grey {color:#9a9a9a !important;}
+.c-grey2 {color:#707070;}
+.c-grey3 {color:#555555;}
+.c-grey4 {color:#888888;}
+.c-grey5 {color:#aaaaaa;}
+.c-grey6 {color:#777777;}
+.c-blue {color:#3b94d6;}
+.c-white {color:#ffffff;}
+.c-black {color:#333}
+a {color:#707070;}
+a.c-grey {color:#707070;}
+a.c-grey2 {color:#9a9a9a;}
+a.c-grey3 {color:#353535;}
+a.c-green {color:#0bb20c;}
+a:link,a:visited{text-decoration:none;}
+a:hover,a:active{cursor:pointer;}
+a.link-blue {color:#269ac9;}
+a.link-blue2 {color:#3b94d6;}
+a.underline {text-decoration:underline;}
+.border-radius {border-radius:5px;}
+.w36 {width:36px;}
+.max-width-60 {max-width:60px;}
+.max-width-130 {max-width:130px;}
+.hidden {overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
+.inline-block {display:inline-block;}
+.dis {display:block;}
+.undis {display:none;}
+.text-nowrap {white-space:nowrap;}
+.v-top {vertical-align:top;}
+.tac {text-align:center;}
+.block-center {margin-left:auto; margin-right:auto; display:block;}
+
+/*背景色*/
+.bg-grey {background-color:#c1c1c1 !important;}
+.bg-blue {background-color:#3b94d6;}
+
+/*按钮样式*/
+.btn1 {width:100%; height:40px; line-height:40px; vertical-align:middle; text-align:center; color:#fff; display:block; border-radius:5px;}
+.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;}
+.tab-wrap a {position:relative; display:block; -webkit-box-flex:1; -moz-box-flex:1; -ms-flex:1; flex:1;}
+.tab-wrap a:first-child:after {display:none;}
+.tab-wrap a:after {content:" "; position:absolute; left:0; top:0; width:1px; height:100%; border-left:1px solid #ccc; color:#707070;}
+.weixin-tab {text-align:center; border-bottom:1px solid #ccc;}
+
+/*bottom-tab*/
+.bottom-tab-wrap {position:fixed; width:100%; bottom:0; line-height:38px; display:-webkit-box; display:-moz-box; display:-ms-flexbox; display:-webkit-flex; display:flex; font-size:13px; background-color:#fff;}
+.bottom-tab-wrap a {display:block; -webkit-box-flex:1; -moz-box-flex:1; -ms-flex:1; flex:1; position:relative;}
+.bottom-tab-wrap a:after {content:" "; position:absolute; left:0; top:0; width:1px; height:100%; border-left:1px solid #ccc; color:#707070;}
+
+/*动态样式*/
+.post-container {width:100%;}
+.post-wrapper {width:100%; background-color:#ffffff; margin:10px auto;}
+.post-main {padding:10px 15px; color:#9a9a9a;}
+.post-avatar {width:30px; height:30px;}
+.post-title {font-size:13px; text-align:left;}
+.post-detail-info {font-size:13px; text-align:left; color:#9a9a9a;}
+.fl {float:left;}
+.fr {float:right;}
+.cl {clear:both; overflow:hidden;}
+.post-content {width:100%; font-size:14px; line-height:20px; height:100px; overflow:hidden; word-break:normal; word-wrap:break-word; text-align:justify;}
+.post-all-content a {color:#136ec2;}
+.post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;}
+.post-interactive-column,
+.post-interactive-reply,
+.post-interactive-praise {width:50%; text-align:center; float:left; font-size:13px;}
+.more-wrap {width:100%;}
+.more-events {width:100%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border-top:1px solid #e6e6e6; border-bottom:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
+.border-bottom {border-bottom:1px solid #e6e6e6;}
+.post-reply-wrap {width:100%;}
+.post-reply-wrap:first-child {border-top:1px solid #ccc;}
+.post-input-wrap {width:100%; position:fixed; bottom:0; background-color:#fff;}
+.post-input-wrap2 {width:100%;}
+.post-reply-row {margin:10px 15px; color:#9a9a9a; background-color:#fff; border-bottom:1px solid #f0f0f0;}
+.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;}
+.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;}
+.post-reply-content {font-size:13px; word-break:break-all; word-wrap:break-word; overflow:hidden; text-align:justify;}
+.post-reply-content img {max-width:100%;}
+.post-reply-content a {color:#136ec2;}
+.post-reply-date, .post-reply-trigger {font-size:13px;}
+.post-input-container {position:relative; padding-right:70px;}
+.copy-input-container {position:relative; padding-right:70px;}
+.copy-input {width:100%; height:18px; line-height:18px; padding:5px; vertical-align: middle; font-size:12px; border-radius:3px; position:absolute; left:-999em;}
+.post-reply-input {width:100%; height:18px; max-height:54px; line-height:18px; vertical-align: middle; font-size:13px; border:1px solid #e6e6e6; outline:none; padding:5px; margin:0; border-radius:3px; overflow-y:auto; resize:none; background-color:#f0eff4;}
+.post-reply-submit {position:absolute; font-size:13px; height:30px; line-height:30px; vertical-align:middle; padding:0 8px; color:#fff; background-color:#269ac9; outline:none; border:none; top:0; right:0;}
+.reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
+.praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
+.praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
+.num-block {display:inline-block; vertical-align:top;}
+.post-op-banner {height:20px; line-height:20px; vertical-align:middle;}
+
+/*20160628动态新样式*/
+.post-dynamic-author {width:50%; height:30px; line-height:30px; font-size:14px; color:#5b5b5b; vertical-align:middle;}
+.post-dynamic-time {height:30px; line-height:30px; vertical-align:middle;}
+.post-dynamic-title {font-size:15px;}
+.post-dynamic-from {width:50%; font-size:13px;}
+.post-box-shadow {box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
+.post-reply-author {width:50%; height:20px; line-height:20px; font-size:12px; color:#5d5d5d; vertical-align:middle;}
+.post-reply-time {height:20px; line-height:20px; vertical-align:middle;}
+
+/* loading 弹框*/
+.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
+.loading-box {position:absolute; top:50%; background:rgba(240,240,240, 0.5); width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
+.loading-box img {margin-top: 3px; text-align: center;}
+.loading-box span {display: block; font-size:12px;}
+
+/*帖子锁定样式*/
+.locked_btn_cir {background: url("/images/wechat/locked.png") 0 0 no-repeat; cursor: default;}
+
+/*20150612加入班级样式*/
+.add-class-box {position:fixed; width:80%; max-width:300px; min-width:240px; font-size:15px; color:#444; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; top:50%; left:50%; transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%);}
+.add-class-tip {padding-top:1.2em; padding-bottom:.5em; font-weight:400;}
+.class-number-input {width:80%; max-width:240px; height:28px; border:1px solid #ccc; padding-left:5px; margin:0 auto; display:block;}
+.cancel-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;}
+.submit-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;}
+.slice {width:2%; text-align:center; border-top:1px solid #ccc;}
+.slice-line {width:1px; height:37px; margin:auto; background:#ccc;}
+
+/*20160613邀请码样式*/
+.qr-code-wrap {width:100%; padding:40px 0; background-color:#3b94d6;}
+.qr-code-box {width:225px; background-color:#fff; border-radius:3px; margin:0 auto;}
+.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc;}
+.qr-img-wrap {width:100%; border-bottom:1px dashed #ccc;}
+.qr-code-img {margin:36px auto; display:block;}
+.invitation-code-wrap {text-align:center; font-size:18px; color:#3b3b3b; padding:16px;}
+.share-code-wrap {width:100%; background-color:#efeff4;}
+.share-code-btn, .finish-btn {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; background-color:#ff7239; margin:18px auto 20px auto; border-radius:50px; display:block;}
+.share-code-instruction {max-width:228px; font-size:12px; color:#666; line-height:20px; margin:0 auto;}
+
+/*20160613班级详情*/
+.class-detail-name, .blue-title {width:100%; height:45px; line-height:45px; vertical-align:middle; background-color:#3b94d6; color:#fff; font-size:18px; text-align:center;}
+.blue-title-sub {position:absolute; right:10px;}
+.slice2 {width:2%; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;}
+.slice3 {width:1%; height:38px; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;}
+.slice-line2 {width:1px; height:38px; margin:auto; background:#ccc;}
+.class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
+.class-detail-tab2 {width:32%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
+.class-detail-tab3 {width:48%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
+.class-tab-active {border-bottom:3px solid #3b94d6;}
+.tab-active-arrow {border-width:4px; position:absolute; top:41px; left:50%; transform:translate(-50%,0); border-color:#3b94d6 transparent transparent transparent; border-style:solid dashed dashed dashed;}
+.class-search-wrap {padding:8px 12px; position:relative;}
+.class-search-inner {padding:0 30px; background-color:#fff;}
+.class-search-icon {position:absolute; top:16px; left:16px;}
+.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; position:relative;}
+.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;}
+.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%;}
+.other-from-width {max-width:80%;}
+.course-name-width {width:68%;}
+
+/*20160614班级列表*/
+.course-diff-row {width:100%; height:28px; line-height:28px; vertical-align:middle; background-color:#fff; border-bottom:1px solid #ccc;}
+.course-list-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-top:1px solid #ccc; border-bottom:1px solid #ccc; background-color:#fff;}
+.class-list {width:100%; border-bottom:1px solid #ccc;}
+.class-list li {height:40px; line-height:40px; vertical-align:middle; margin:0 25px; border-left:1px solid #ccc; border-bottom:1px solid #ccc; position:relative;}
+.class-list-name {max-width:75%; display:inline-block;}
+.class-list-dot {position:absolute; top:13px; left:-8px;}
+.border-bottom-none {border-bottom:none !important;}
+.border-top-none {border-top:none !important;}
+.students-amount {height:14px; line-height:14px; vertical-align:middle; padding:2px 5px; background-color:#e6e6e6; border-radius:10px;}
+.new-class-btn {font-size:15px; color:#fff; background-color:#3b94d6; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
+.join-class-btn {font-size:15px; color:#444; background-color:#ccc; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
+.new-class-input {width:60%; color:#555; height:16px; line-height:16px; vertical-align:middle; border:none; outline:none; padding:8px 0;}
+.class-list-setting {position:absolute; top:11px; right:10px;}
+.class-setting-wrap {width:38px; height:38px; position:absolute; top:0; right:0;}
+
+/*20160616登录注册*/
+.login-wrap {padding:0 10px;}
+.input-box-wrap {padding-right:17px;}
+.input-box { -webkit-appearance: none; font-size: 15px;width:100%; height:18px; padding: 10px 0px 10px 5px; line-height:18px; border:1px solid #ccc; border-radius:5px;}
+.login-op-wrap {height:30px; line-height:30px; vertical-align:middle;}
+.login-box{display:inline-block; width:14px; height:14px; line-height:14px; text-align:center; vertical-align:middle; border:1px solid #ccc; background:#fff; border-radius:3px; color:#fff; cursor:pointer;}
+.login-box.checked{background:#63c360; border:1px solid #63c360;}
+.login-box.checked:after{content:url(/images/wechat/checked.png);}
+.forget-psw-wrap {width:60px; margin:0 auto;}
+.forget-psw {position:fixed; bottom:10px;}
+
+/*二级回复*/
+.mult-reply-container{ border:solid 1px #f3ddb3; background:#fffef4; padding:4px;color:#999;}
+.mult-reply-content{ color:#555; font-size:13px;}
+.mult-reply-hide{ text-align:center; display:block; font-size:14px; color:#aaa; border-bottom:1px solid #F3DDB3; padding:8px 0;}
+.mult-reply-arrow{ color:#aaa; margin-right:10px; font-size:14px; font-weight:bold;}
+
+
+/*20160729项目说明*/
+.project-intro {line-height:2;}
.project-intro li {list-style:disc; margin-left:20px;}
\ No newline at end of file
From b3d34d6e0fc0c3361136ec71beff366d3e914aea Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 29 Jul 2016 20:18:26 +0800
Subject: [PATCH 03/26] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=8F=AD=E7=BA=A7?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=85=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/services/courses_service.rb | 2 ++
app/views/admin/_courselist_detail_tr.html.erb | 2 +-
app/views/admin/non_syllabus_courses.html.erb | 2 +-
app/views/admin/syllabuses.html.erb | 4 ++--
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index fd3aa6ebf..48a4a560c 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -397,6 +397,8 @@ class CoursesService
if course
if course_endTime_timeout? course
@state = 2
+ elsif course[:is_delete] == 1
+ @state = 11
else
if current_user.member_of_course?(course) #如果已经是成员
@state = 3
diff --git a/app/views/admin/_courselist_detail_tr.html.erb b/app/views/admin/_courselist_detail_tr.html.erb
index 83b7904ce..6bec90845 100644
--- a/app/views/admin/_courselist_detail_tr.html.erb
+++ b/app/views/admin/_courselist_detail_tr.html.erb
@@ -7,7 +7,7 @@
|
- <%= link_to(course.teacher.show_name.truncate(6, omission: '...'), user_path(course.teacher)) %>
+ <%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
<%= course.class_period %>
diff --git a/app/views/admin/non_syllabus_courses.html.erb b/app/views/admin/non_syllabus_courses.html.erb
index 1be979eeb..c5a2c81ec 100644
--- a/app/views/admin/non_syllabus_courses.html.erb
+++ b/app/views/admin/non_syllabus_courses.html.erb
@@ -72,7 +72,7 @@
|
- <%= link_to(course.teacher.show_name.truncate(6, omission: '...'), user_path(course.teacher)) %>
+ <%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
<%= course.class_period %>
diff --git a/app/views/admin/syllabuses.html.erb b/app/views/admin/syllabuses.html.erb
index 194091abc..5098131da 100644
--- a/app/views/admin/syllabuses.html.erb
+++ b/app/views/admin/syllabuses.html.erb
@@ -52,7 +52,7 @@
|
|
- <%= link_to(syllabus.try(:user).try(:realname).truncate(6, omission: '...'), user_path(syllabus.user)) %>
+ <%= link_to syllabus.user.show_name, user_path(syllabus.user) %>
|
<%= format_date(syllabus.created_at) %>
@@ -70,7 +70,7 @@
<%= render :partial => 'admin/rename_course_name', :locals => {:course => course} %>
|
- <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
+ <%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
<%= format_date(course.created_at) %>
From d0f83aab64c7802dc9f6ccfeaa1299e0b2b1c091 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 29 Jul 2016 20:24:04 +0800
Subject: [PATCH 04/26] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=A7=93=E5=92=8C?=
=?UTF-8?q?=E5=90=8D=E4=B9=8B=E9=97=B4=E7=9A=84=E7=A9=BA=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/user.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/models/user.rb b/app/models/user.rb
index afd45e08b..3d9e59f2e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -42,12 +42,12 @@ class User < Principal
# Different ways of displaying/sorting users
USER_FORMATS = {
:firstname_lastname => {
- :string => '#{firstname} #{lastname}',
+ :string => '#{firstname}#{lastname}',
:order => %w(firstname lastname id),
:setting_order => 1
},
:firstname_lastinitial => {
- :string => '#{firstname} #{lastname.to_s.chars.first}.',
+ :string => '#{firstname}#{lastname.to_s.chars.first}.',
:order => %w(firstname lastname id),
:setting_order => 2
},
@@ -57,7 +57,7 @@ class User < Principal
:setting_order => 3
},
:lastname_firstname => {
- :string => '#{lastname} #{firstname}',
+ :string => '#{lastname}#{firstname}',
:order => %w(lastname firstname id),
:setting_order => 4
},
From 02bee33ad27678aadda12d29438d9e127cefaf98 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 29 Jul 2016 20:33:35 +0800
Subject: [PATCH 05/26] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/_course_base_info.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb
index afd82646a..d2cc0840d 100644
--- a/app/views/layouts/_course_base_info.html.erb
+++ b/app/views/layouts/_course_base_info.html.erb
@@ -61,9 +61,9 @@
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
<% is_ST = get_user_member_roles_course @course, User.current, 10 %>
<% if !is_teacher && (is_TA || is_TE) %>
- <%= link_to '教师身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => 10, :tar_role => (is_TA ? 7 : 9)), :class => "sy_btn_orange mr10 fl" %>
+ <%= link_to '教师身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => 10, :tar_role => (is_TA ? 7 : 9)), :class => "sy_btn_orange mr10 fl", :title => "由学生身份切换至教师身份" %>
<% elsif is_teacher && is_ST %>
- <%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl" %>
+ <%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
<% end %>
<% unless (is_teacher || is_TA || is_TE) %>
From 430a93e4b2f6c19224c2c2f23051bd540c36cd0b Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 29 Jul 2016 20:48:36 +0800
Subject: [PATCH 06/26] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/admin_controller.rb | 2 +-
app/controllers/school_controller.rb | 6 ++++++
app/views/admin/_all_schools.html.erb | 1 -
app/views/admin/applied_schools.html.erb | 10 ++++-----
app/views/admin/has_applied_schools.html.erb | 21 ++++++++-----------
app/views/layouts/base_admin.html.erb | 7 +++++++
.../users/_user_message_applied.html.erb | 10 ++++++++-
config/locales/zh.yml | 2 +-
public/stylesheets/application.css | 3 +++
9 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 1b95ef895..7602b10a5 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -160,7 +160,7 @@ class AdminController < ApplicationController
@sort = ""
if params[:sort] && (params[:order] == 'name')
# courses = School.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) #{params[:sort]}, c.id desc")
- school = School.find_by_sql(" SELECT aas.name FROM apply_add_schools aas where aas.status = '0' GROUP BY CONVERT(name USING gbk) #{params[:sort]}, aas.id desc ")
+ school = School.find_by_sql(" SELECT aas.name FROM apply_add_schools aas where aas.status = '0' ORDER BY CONVERT(aas.name USING gbk) #{params[:sort]}, aas.id asc ")
@order = params[:order]
@sort = params[:sort]
end
diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb
index ec585e2b2..b927b1108 100644
--- a/app/controllers/school_controller.rb
+++ b/app/controllers/school_controller.rb
@@ -187,6 +187,12 @@ class SchoolController < ApplicationController
user_extention= User.current.extensions
user_extention.school_id = school.id
user_extention.save!
+
+ # status=4 向管理员发送信息
+ users = User.where(:admin => 1)
+ users.each do |user|
+ AppliedMessage.create(:user_id => user.id, :status => 4, :viewed => true, :applied_id => school.id, :applied_type => "ApplyAddSchools", :name => school.name )
+ end
else
data[:result] = 3
end
diff --git a/app/views/admin/_all_schools.html.erb b/app/views/admin/_all_schools.html.erb
index af59d7687..d4cf916f5 100644
--- a/app/views/admin/_all_schools.html.erb
+++ b/app/views/admin/_all_schools.html.erb
@@ -1,5 +1,4 @@
<%= stylesheet_link_tag 'css/common','css/popup' %>
-
更改为
diff --git a/app/views/admin/applied_schools.html.erb b/app/views/admin/applied_schools.html.erb
index 32e67914f..507cb7c49 100644
--- a/app/views/admin/applied_schools.html.erb
+++ b/app/views/admin/applied_schools.html.erb
@@ -53,7 +53,7 @@
<%= apply.id %>
|
-
+ |
<%= apply.name %>
|
@@ -65,7 +65,7 @@
|
<%= (apply.province.nil? ? "" : apply.province) + (apply.city.nil? ? "" : apply.city) %>
|
-
+ |
<%= apply.address %>
|
@@ -76,9 +76,9 @@
<%= format_date(apply.created_at) %>
|
- <%= link_to( l(:label_approve), { :controller => 'admin', :action => 'approve_applied_schools', :id => apply.id }) %>
- <%= link_to( l(:button_delete), { :controller => 'admin', :action => 'delete_applied_schools', :id => apply.id, :tip => 'unapplied' },:method => :delete, :confirm => l(:text_are_you_sure)) %>
- <%=link_to '更改', admin_all_schools_path(:school_id =>apply.id), :remote => true %>
+ <%= link_to( l(:label_approve), { :controller => 'admin', :action => 'approve_applied_schools', :id => apply.id }, :class => "application-default-link" ) %>
+ <%= link_to( l(:button_delete), { :controller => 'admin', :action => 'delete_applied_schools', :id => apply.id, :tip => 'unapplied' },:method => :delete, :confirm => l(:text_are_you_sure), :class => "application-default-link") %>
+ <%=link_to '更改', admin_all_schools_path(:school_id =>apply.id), :remote => true, :class => "application-default-link" %>
|
|
diff --git a/app/views/admin/has_applied_schools.html.erb b/app/views/admin/has_applied_schools.html.erb
index 11361dbac..555dce689 100644
--- a/app/views/admin/has_applied_schools.html.erb
+++ b/app/views/admin/has_applied_schools.html.erb
@@ -38,6 +38,9 @@