diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 06ea15357..70a0b76b8 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -827,6 +827,6 @@ class FilesController < ApplicationController
end
def upload_files_menu
- p 1
+
end
end
diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index 18eb25675..9f80503d8 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -312,7 +312,7 @@ class OrganizationsController < ApplicationController
def agree_apply_subdomain
@organization = Organization.find(params[:organization_id])
@organization.update_attribute(:domain, params[:org_domain])
- if OrgMessage.where("message_type='AgreeApplySubdomain' and organization_id=#{@organization.id} and content=#{params[:org_domain]}").count == 0
+ if OrgMessage.where("message_type='AgreeApplySubdomain' and organization_id=#{@organization.id} and content=?",params[:org_domain]).count == 0
OrgMessage.create(:user_id => params[:user_id], :organization_id => @organization.id, :message_type => 'AgreeApplySubdomain', :message_id => @organization.id, :sender_id => User.current.id, :viewed => 0, :content => params[:org_domain])
end
end
diff --git a/app/views/courses/_term_select.html.erb b/app/views/courses/_term_select.html.erb
index e295e7c94..0bada4c11 100644
--- a/app/views/courses/_term_select.html.erb
+++ b/app/views/courses/_term_select.html.erb
@@ -12,13 +12,14 @@
+ <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "term_btn fl" %>
-
+
复制学期将为您创建一个新的课程学期,新学期将继承本学期的相关资源,具体您稍后可以选择。
diff --git a/app/views/courses/copy_course.js.erb b/app/views/courses/copy_course.js.erb
index e31e423ba..ca9e3c1f2 100644
--- a/app/views/courses/copy_course.js.erb
+++ b/app/views/courses/copy_course.js.erb
@@ -1,3 +1,6 @@
+if(document.getElementById("popbox02")) {
+ hideModal("#popbox02");
+}
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'copy_course') %>');
showModal('ajax-modal', '730px');
$('#ajax-modal').css('height','530px').css('width','730px');
diff --git a/app/views/files/upload_files_menu.js.erb b/app/views/files/upload_files_menu.js.erb
index 3e44f5644..e083fac85 100644
--- a/app/views/files/upload_files_menu.js.erb
+++ b/app/views/files/upload_files_menu.js.erb
@@ -1,5 +1,5 @@
<% if @project %>
- $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/upload_project_files_on_navbar',:locals => {:container => @project}) %>');
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project,:project_attachment_type => 1}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("

");
diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb
index 58dee20b8..2007aec5a 100644
--- a/app/views/layouts/base_org.html.erb
+++ b/app/views/layouts/base_org.html.erb
@@ -163,7 +163,7 @@
- - Copyright © 2007-2015, All Rights Reserved
+ - Copyright © 2007-2016, All Rights Reserved
- ICP备09019772
diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb
index e415c42f1..4f2a7b662 100644
--- a/app/views/organizations/_org_course_homework.html.erb
+++ b/app/views/organizations/_org_course_homework.html.erb
@@ -148,7 +148,7 @@
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<% projects = activity.student_work_projects.where("is_leader = 1") %>
-
+
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
@@ -173,7 +173,7 @@
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<%=(User.find project.user_id).show_name %>(组长)
-
<%=time_from_now time %> <%=changesets_num project %>提交
+
<%=time_from_now time %>
项目名称:<%=project.name %>
创建者:<%=(User.find project.user_id).show_name %>(组长)
diff --git a/app/views/organizations/agree_apply_subdomain.js.erb b/app/views/organizations/agree_apply_subdomain.js.erb
index df25d018c..314d48e15 100644
--- a/app/views/organizations/agree_apply_subdomain.js.erb
+++ b/app/views/organizations/agree_apply_subdomain.js.erb
@@ -1 +1 @@
-$("#agree_apply_subdomain").text("已同意申请");
\ No newline at end of file
+$("#agree_apply_subdomain_<%= params[:act_id] %>").text("已同意申请");
\ No newline at end of file
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index bcc0a0c4b..2e9058c40 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -140,7 +140,7 @@
$("#add_subfield_form").submit();
}
function apply_subdomain(id, domain){
- var reg = new RegExp("[a-zA-Z0-9_]{1,}");
+ var reg = new RegExp("^[a-zA-Z0-9_]{1,}$");
if (reg.exec(domain)){
$.ajax({
url:"<%= apply_subdomain_organization_path %>",
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index 2e492911a..7c6959935 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -148,7 +148,7 @@
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<% projects = activity.student_work_projects.where("is_leader = 1") %>
-
+
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
@@ -173,7 +173,7 @@
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<%=(User.find project.user_id).show_name %>(组长)
-
<%=time_from_now time %> <%=changesets_num project %>提交
+
<%=time_from_now time %>
项目名称:<%=project.name %>
创建者:<%=(User.find project.user_id).show_name %>(组长)
@@ -300,4 +300,4 @@
+
diff --git a/app/views/users/_show_detail_info.html.erb b/app/views/users/_show_detail_info.html.erb
index ca2bc67db..3849b304c 100644
--- a/app/views/users/_show_detail_info.html.erb
+++ b/app/views/users/_show_detail_info.html.erb
@@ -5,7 +5,7 @@
-
<%= user %>
+
<%= user %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index d2420491c..85e426e92 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -150,7 +150,7 @@
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
-
+
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
@@ -174,7 +174,7 @@
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<%=(User.find project.user_id).show_name %>(组长)
-
<%=time_from_now time %> <%=changesets_num project %>提交
+
<%=time_from_now time %>
项目名称:<%=project.name %>
创建者:<%=(User.find project.user_id).show_name %>(组长)
diff --git a/app/views/users/_user_message_org.html.erb b/app/views/users/_user_message_org.html.erb
index b2801a618..5bf1c8950 100644
--- a/app/views/users/_user_message_org.html.erb
+++ b/app/views/users/_user_message_org.html.erb
@@ -12,24 +12,13 @@
<%= ma.content %>
- <% if ma.status == 0 %>
- <%=link_to "同意", agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :message_id => ma.id ),
- :id => 'agree_apply_subdomain',
- :method => 'post',
- :remote => true,
- :class => "green_btn_cir ml10",
- :style => "color:#fff" %>
- <%=link_to "拒绝", agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id,:message_id => ma.id ),
- :id => 'agree_apply_subdomain',
- :method => 'post',
- :remote => true,
- :class => "green_btn_cir ml10",
- :style => "color:#fff" %>
- <% elsif ma.status == 1 %>
- 已同意
- <% elsif ma.status == 2 %>
- 已拒绝
- <% end %>
+ <%=link_to (ma.organization.domain.nil? || (ma.organization.domain && ma.organization.domain != ma.content)) ? "同意申请":"已同意申请",
+ agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
+ :id => "agree_apply_subdomain_#{ma.id}",
+ :method => 'post',
+ :remote => true,
+ :class => "green_btn_cir ml10",
+ :style => "color:#fff" %>
<%= time_tag(ma.created_at).html_safe %>
@@ -40,7 +29,7 @@
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
- '>管理员<%= ma.status == 1 ? '同意':'拒绝' %>了您的子域名申请:
+ '>管理员同意了您的子域名申请:
<%= ma.content %>
diff --git a/db/schema.rb b/db/schema.rb
index e816d1d6e..2f9378dea 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20160108093752) do
+ActiveRecord::Schema.define(:version => 20160108024752) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -982,8 +982,8 @@ ActiveRecord::Schema.define(:version => 20160108093752) do
t.text "notes"
t.integer "status"
t.integer "reply_id"
- t.datetime "created_on", :null => false
- t.datetime "updated_on", :null => false
+ t.datetime "created_on", :null => false
+ t.datetime "updated_on", :null => false
t.string "m_parent_id"
t.boolean "is_readed"
t.integer "m_reply_count"
@@ -1225,9 +1225,8 @@ ActiveRecord::Schema.define(:version => 20160108093752) do
t.integer "message_id"
t.integer "viewed"
t.string "content"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.integer "status", :default => 0
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "org_projects", :force => true do |t|
@@ -1693,10 +1692,6 @@ ActiveRecord::Schema.define(:version => 20160108093752) do
t.string "extra"
end
- create_table "temp", :id => false, :force => true do |t|
- t.integer "id", :default => 0, :null => false
- end
-
create_table "time_entries", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index dcb1a34f2..51e2ffe67 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -66,16 +66,22 @@ h4{ font-size:14px; color:#3b3b3b;}
.ml15{ margin-left:15px;}
.ml16{ margin-left: 16px;}
.ml20{ margin-left:20px;}
+.ml30{margin-left:30px !important;}
.ml35{margin-left: 35px;}
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
+.ml48{ margin-left:48px;}
+.ml53{margin-left:53px;}
.ml55{ margin-left:55px;}
+.ml58{margin-left:58px;}
.ml30{ margin-left:30px;}
.ml38{ margin-left:38px;}
.ml60{ margin-left:60px;}
.ml160 {margin-left:160px;}
.ml80{ margin-left:80px;}
+.ml85{margin-left:85px;}
.ml90{ margin-left:90px;}
+.ml95{margin-left:95px;}
.ml100{ margin-left:100px;}
.ml110{ margin-left:110px;}
.ml125 { margin-left:125px;}
@@ -161,6 +167,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.h70{ height:70px;}
.h150{ height:150px;}
.p10 {padding-left:10px; padding-right:10px;}
+.mw400 {max-width: 400px;}
/* Font & background Color */
a.b_grey{ background: #F5F5F5;}
@@ -295,6 +302,7 @@ a:hover.bgreen_n_btn{background:#08a384;}
.blue_btn_cir{ background:#3498db; 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;}
.orange_btn_cir{ background:#e67e22; 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;}
.bgreen_btn_cir{ background:#1abc9c; 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;}
+.grey_border{border:1px solid #dddddd !important; }
/* commonpic */
.pic_date{ display:block; background:url(../images/new_project/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;}
.pic_add{ display:block; background:url(../images/new_project/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;}
@@ -427,8 +435,6 @@ a:hover.search_btn{ background: #0fa9bb;}
.searchResourcePopup {border:none; outline:none; background-color:#ffffff; width:184px; height:25px; padding-left:10px; display:inline-block; float:left;}
.searchIconPopup{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) 5px -394px no-repeat; display:inline-block; float:left; cursor: pointer;}
.searchIconPopup:hover {background:url(../images/homepage_icon.png) 5px -420px no-repeat;}
-.searchIcon2{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -273px no-repeat; display:inline-block; float:left; cursor: pointer;}
-.searchIcon2:hover {background:url(../images/homepage_icon2.png) -180px -314px no-repeat;}
.courseSend {width:390px; height:15px; line-height:15px; margin-bottom:10px;display:block;white-space:nowrap;}
.courseSendCheckbox {padding:0px; margin:0px; width:12px; height:12px; margin-right:10px; display:inline-block; margin-top:2px;}
.sendCourseName {font-size:12px; color:#5f6060;display:inline-block}
@@ -497,7 +503,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -14px -37px no-repeat; width:16px; height:16px; display:block;}
-.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:25px; float:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:25px; float:left;}
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSex2 {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -150px no-repeat; float:left;}
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
@@ -665,6 +671,9 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
+/*复制课程弹窗*/
+.copyCoursePopup {width:750px !important; height:auto !important; border:3px solid #269ac9 !important; padding-left:16px !important; padding-right:16px !important; padding-bottom:16px !important; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
+
/*底部*/
#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
@@ -959,12 +968,31 @@ span.at a{color:#269ac9;text-decoration: none;}
.sectionContent li:hover {background-color:#cccccc;}
.sectionContent span {width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:20px; vertical-align:top;}
.orgDirection {width:392px; background-color:#f1f1f1; height:30px; vertical-align:middle; line-height:30px; color:#585858; padding-left:10px;}
-/*新课程、项目资源库*/
-.reCon{ margin:5px; width:710px;}
-.reTop{width:710px; height:40px; background:#eaeaea; padding:5px;}
-.researchBox { width:240px; height:24px; border:1px solid #dddddd; color:#666666; outline:none;}
-.blueBtn{ width:60px; height:26px; color:#FFF; border:none; background-color:#269ac9; cursor:pointer; padding-left:0px; text-align:center;}
-.blueBtn:hover {background-color:#298fbd;}
+.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
+
/*文本描述展开高度*/
.maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;}
+
+/*151228样式更新*/
+.menuSetting {background:url(../images/hwork_icon.png) -5px -132px no-repeat; display:inline-block; width:20px; height:20px;}
+.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
+a.greyBtn{ display:inline-block; background:#f2f3f3; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#888888; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
+a:hover.greyBtn{border:1px solid #888888; }
+a.blueBtn{ display:inline-block; background:#269ac9; padding:0px 5px; height:20px; border:1px solid #269ac9; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
+a.blueBtn:hover {background-color:#298fbd;}
+a.cancelBtn{ display:inline-block; background:#c1c1c1; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
+a.cancelBtn:hover {background:#888888;}
+a.userFollow{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
+a:hover.userFollow{border:1px solid #888888; }
+a.userCancel{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
+a:hover.userCancel{border:1px solid #888888; }
+.pAbsolute {position:absolute; z-index:999;}
+.userAvatarWrap {width:50px; height:50px; position:relative; border:1px solid #cbcbcb; padding: 2px;}
+.userAvatarWrap:hover {border:1px solid #269ac9;}
+.mr27 {margin-right:27px;}
+.userCard {width:208px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px; padding:15px; top:-176px; left:-95px; position:absolute; z-index:999; display:none;}
+.userCard font {display:block; border-width:8px; position:absolute; bottom:-16px; left:110px; border-style:solid dashed dashed dashed; border-color:#FFF transparent transparent transparent; font-size:0; line-height:0;}
+.userCard em {display:block; border-width:8px; position:absolute; bottom:-17px; left:110px; border-style:solid dashed dashed dashed; border-color:#eaeaea transparent transparent transparent; font-size:0; line-height:0;}
+.userCardM {width:201px; height:20px; border:1px solid #dddddd; resize:none;}
+.resourceCopy {padding:0px; margin:0px; width:12px; height:12px; display:inline-block;}
\ No newline at end of file
diff --git a/public/stylesheets/share.css b/public/stylesheets/share.css
index 59b3b63f9..ea45a8b41 100644
--- a/public/stylesheets/share.css
+++ b/public/stylesheets/share.css
@@ -27,5 +27,4 @@ a.greyBtn2 {float:right; text-align:center; font-size:12px; color:#ffffff; backg
.upload_box{ width:430px; margin:15px auto;}
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
-.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
-.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
\ No newline at end of file
+.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
\ No newline at end of file