Merge branch 'szzh' into develop

This commit is contained in:
huang 2016-01-08 20:46:06 +08:00
commit 3df542ff6a
16 changed files with 71 additions and 56 deletions

View File

@ -827,6 +827,6 @@ class FilesController < ApplicationController
end
def upload_files_menu
p 1
end
end

View File

@ -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

View File

@ -12,13 +12,14 @@
</div>
<div class="cl"></div>
<div class="mt15 grey_c lh22">
<%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "term_btn fl" %>
<!--<a href="javascript:" class="term_btn fl" onclick="copyTerm();">
复制学期
</a>-->
<div class="disable_btn fl">
<!--<div class="disable_btn fl">
<span style="display: inline-block">复制学期</span>
<span style="display: inline-block">(开发中...)</span>
</div>
</div>-->
复制学期将为您创建一个新的课程学期,新学期将继承本学期的相关资源,具体您稍后可以选择。
</div>
<div class="cl"></div>

View File

@ -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');

View File

@ -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("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");

View File

@ -163,7 +163,7 @@
<div class="cl"></div>
<ul class="copyright mt10">
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Reserved</li>
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2016,&nbsp;All Rights Reserved</li>
<li>ICP备09019772</li>
</ul>
</div>

View File

@ -148,7 +148,7 @@
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<% projects = activity.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3 w80">
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
</div>
<div class="cl"></div>
@ -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 %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%=changesets_num project %>提交</p>
<p><%=time_from_now time %></p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />

View File

@ -1 +1 @@
$("#agree_apply_subdomain").text("已同意申请");
$("#agree_apply_subdomain_<%= params[:act_id] %>").text("已同意申请");

View File

@ -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 %>",

View File

@ -148,7 +148,7 @@
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<% projects = activity.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3 w80">
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
</div>
<div class="cl"></div>
@ -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 %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%=changesets_num project %>提交</p>
<p><%=time_from_now time %></p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
@ -300,4 +300,4 @@
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>
</script>

View File

@ -5,7 +5,7 @@
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />-->
</div>
<div class="fl">
<p class="homepageImageName mb5" style="max-width:88px;"><%= user %></p>
<p class="homepageImageName mb5" style="max-width:88px;font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;"><%= user %></p>
<span class="homepageImageSex"></span>
<div class="cl"></div>
<p class="mb8 c_dark f14">

View File

@ -150,7 +150,7 @@
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3 w80">
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
</div>
<div class="cl"></div>
@ -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 %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%=changesets_num project %>提交</p>
<p><%=time_from_now time %></p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=homework_common.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />

View File

@ -12,24 +12,13 @@
<%= ma.content %>
</li>
<li class="homepageHomeworkContentWarn fl">
<% 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 %>
<a href="javascript:void(0);" class="green_btn_cir ml10">已同意</a>
<% elsif ma.status == 2 %>
<a href="javascript:void(0);" class="green_btn_cir ml10">已拒绝</a>
<% 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" %>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
@ -40,7 +29,7 @@
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a>
</li>
<li class="homepageNewsPubType fl">
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>管理员<%= ma.status == 1 ? '同意':'拒绝' %>了您的子域名申请:</span>
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>管理员同意了您的子域名申请:</span>
</li>
<li class="homepageNewsContent fl">
<%= ma.content %>

View File

@ -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

View File

@ -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;}

View File

@ -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;}
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}