chenlw_dev
cxt 10 years ago
commit f63f38fb82

@ -12,24 +12,28 @@
<div class="cl"></div> <div class="cl"></div>
<ul class="departments"> <ul class="departments">
<li class="fl mr10"> <!--li class="fl mr10">
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a> <strong><%#= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%#= l(:label_hosted_by)%></a>
</li> </li>
<li class="fl"> <li class="fl">
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a> <a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%#= l(:label_sponsor)%></a>
</li> </li-->
<li class="fl mr10"> <li class="fl mr10">
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a> <strong><%= l(:label_partners)%></strong>
</li> </li>
<li class="fl"> <li class="fl mr20">
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a> <a href="http://eecs.pku.edu.cn" class="f_grey" target="_blank"><%#= l(:label_co_organizer_EECS)%><img src="/images/footer_logo/PekingUniversity.png" width="121" height="40" style="display: inline-block;" alt="北京大学" /></a>
</li> </li>
<li class="fl"> <li class="fl mr20">
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a> <a href="http://scse.buaa.edu.cn/" class="f_grey" target="_blank"><%#= l(:label_co_organizer_BHU)%><img src="/images/footer_logo/BeiHang_university.png" width="173" height="40" style="display: inline-block;" alt="北京航空航天大学" /></a>
</li> </li>
<li class="fl"> <li class="fl mr20">
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a> <a href="http://www.iscas.ac.cn/" class="f_grey" target="_blank"><%#= l(:label_co_organizer_CAS)%><img src="/images/footer_logo/ISCAS_logo.png" width="91" height="40" style="display: inline-block;" alt="ISCAS" /></a>
</li>
<li class="fl mr20">
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%#= l(:label_co_organizer_InforS)%><img src="/images/footer_logo/CVICSE.png" width="165" height="40" style="display: inline-block;" alt="中创软件" /></a>
</li> </li>
<li class="fl"><a href="http://www.webxmf.com/" target="_blank"><img src="/images/footer_logo/bee_logo.png" width="167" height="40" style="display: inline-block;" alt="web小蜜蜂" /></a></li>
</ul> </ul>
<div class="cl"></div> <div class="cl"></div>
<ul class="copyright"> <ul class="copyright">

@ -43,16 +43,16 @@
<%#= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %> <%#= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %>
</li> </li>
<% if User.current.logged? %> <% if User.current.logged? %>
<li class="navOrgMenu fr" id="orgSwitch" style="cursor:pointer;"> <li class="navOrgMenu fr" id="orgSwitch" style="cursor:pointer;">
<span class="orgMenuArrow" id="orgArrow"> <span class="orgMenuArrow" id="orgArrow">
<ul class="org_login_list" style="display:none;"> <ul class="org_login_list" style="display:none;">
<li> <%= link_to "个人主页",user_path(User.current), :class => "linkGrey8", :target => "_blank" %></li> <li> <%= link_to "个人主页",user_path(User.current), :class => "menuGrey", :target => "_blank" %></li>
<li><%= link_to "退出",logout_organization_path(@organization), :class =>"linkGrey8", :method => 'post', :rel => "nofollow" %></li> <li><%= link_to "退出",logout_organization_path(@organization), :class =>"menuGrey", :method => 'post', :rel => "nofollow" %></li>
<!--<li><%#= link_to "退出",signout_path, :class =>"linkGrey8", :method => 'post', :rel => "nofollow" %></li>--> <!--<li><%#= link_to "退出",signout_path, :class =>"linkGrey8", :method => 'post', :rel => "nofollow" %></li>-->
</ul> </ul>
</span> </span>
</li> </li>
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;"><a href="javascript:void(0);" class="linkGrey8 f14" id="orgUserName"><%= User.current %></a></li> <li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;"><a href="javascript:void(0);" class="fontGrey2 f14" id="orgUserName"><%= User.current %></a></li>
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>--> <!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
<% else %> <% else %>
<li class="navOrgMenu fr"><a href="<%= signin_path(:login=>true) %>" class="linkGrey8 f14">登录</a></li> <li class="navOrgMenu fr"><a href="<%= signin_path(:login=>true) %>" class="linkGrey8 f14">登录</a></li>
@ -75,141 +75,136 @@
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="homepageContentContainer"> <div class="homepageContentContainer">
<div class="homepageContent"> <div class="homepageContent">
<div class="homepageLeft"> <div class="homepageLeft">
<div class="homepagePortraitContainer"> <div class="homepagePortraitContainer">
<!--<div class="pr_info_logo fl mr10 mb5">--> <!--<div class="pr_info_logo fl mr10 mb5">-->
<!--<%#= image_tag(url_to_avatar(@organization), :width=>"60", :height=>"60", :alt=>"组织logo") %>--> <!--<%#= image_tag(url_to_avatar(@organization), :width=>"60", :height=>"60", :alt=>"组织logo") %>-->
<!--</div>--> <!--</div>-->
<div class="pr_info_logo fl fl mr10 mb5" id="homepage_portrait_image"> <div class="pr_info_logo fl fl mr10 mb5" id="homepage_portrait_image">
<%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %> <%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %>
<% if User.current.logged?%> <% if User.current.logged?%>
<% if User.current.id == @organization.creator_id%> <% if User.current.id == @organization.creator_id%>
<div id="edit_org_file_btn" class="none"> <div id="edit_org_file_btn" class="none">
<div class="homepageEditProfile"> <div class="homepageEditProfile">
<a href="<%= clear_org_avatar_temp_organization_path(@organization) %>" data-remote="true" class="homepageEditProfileIcon"></a> <a href="<%= clear_org_avatar_temp_organization_path(@organization) %>" data-remote="true" class="homepageEditProfileIcon"></a>
</div>
</div> </div>
<% end %> </div>
<% end%> <% end %>
</div> <% end%>
<!--<div class="orgName fl mb5 f14">组织id<%#= @organization.id %></div>--> </div>
<div class="orgName fl mb5 f14"> <!--<div class="orgName fl mb5 f14">组织id<%#= @organization.id %></div>-->
<%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %> <div class="orgName fl mb5 f14">
<% if User.current.logged? %> <%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>
<% if @organization.is_public? %> <% if User.current.logged? %>
<span class="img_private"><%= l(:label_public)%></span> <% if @organization.is_public? %>
<% else %> <span class="img_private"><%= l(:label_public)%></span>
<span class="img_private"><%= l(:label_private)%></span> <% else %>
<% end %> <span class="img_private"><%= l(:label_private)%></span>
<% end %> <% end %>
</div> <% end %>
</div>
<% if User.current.admin_of_org?(@organization) %> <% if User.current.admin_of_org?(@organization) %>
<a href="<%= setting_organization_path(@organization) %>" class="pr_join_a c_white"><span class="pr_setting"></span>配置</a> <a href="<%= setting_organization_path(@organization) %>" class="pr_join_a c_white"><span class="pr_setting"></span>配置</a>
<% end %> <% end %>
<!--<div style="clear:both;">--> <!--<div style="clear:both;">-->
<!--<%#= link_to l(:label_org_name)+"#{@organization.name}", organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>--> <!--<%#= link_to l(:label_org_name)+"#{@organization.name}", organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>-->
<!--<%# if @organization.is_public? %>--> <!--<%# if @organization.is_public? %>-->
<!--<span class="img_private"><%#= l(:label_public)%></span>--> <!--<span class="img_private"><%#= l(:label_public)%></span>-->
<!--<%# else %>--> <!--<%# else %>-->
<!--<span class="img_private"><%#= l(:label_private)%></span>--> <!--<span class="img_private"><%#= l(:label_private)%></span>-->
<!--<%# end %>--> <!--<%# end %>-->
<!--</div>--> <!--</div>-->
<div class="cl"></div> <div class="cl"></div>
<div class="f12 fontGrey3"> <div class="f12 fontGrey3">
<%= link_to '文章', organization_org_document_comments_path(@organization) %>&nbsp; <%= link_to '文章', organization_org_document_comments_path(@organization) %>&nbsp;
<% if User.current.logged? %> <% if User.current.logged? %>
( (
<%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %> <%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %>
) )
<% end %> <% end %>
&nbsp;|&nbsp; &nbsp;|&nbsp;
<%= link_to '成员', members_organization_path(@organization.id) %>&nbsp; <%= link_to '成员', members_organization_path(@organization.id) %>&nbsp;
<% if User.current.logged? %> <% if User.current.logged? %>
<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %> <%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>
<% end %> <% end %>
</div>
</div>
<div class="homepageLeftMenuContainer" id="sub_field_left_lists">
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
</div> </div>
</div> </div>
<div class="homepageRight" style="margin-top:<%= params[:show_homepage].nil? ? '10px':'0px' %>;"> <div class="homepageLeftMenuContainer" id="sub_field_left_lists">
<%= render_flash_messages %> <%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div> </div>
</div> </div>
<div class="homepageRight" style="margin-top:<%= params[:show_homepage].nil? ? '10px':'0px' %>;">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
</div> </div>
</div>
<!--页面底部--> <!--页面底部-->
<div class="cl"></div> <div class="cl"></div>
<div id="Footer"> <div id="Footer">
<div class="footerAboutContainer"> <div class="footerAboutContainer">
<ul class="footerAbout"> <ul class="footerAbout">
<li class="fl"><a href="<%= about_us_path %>" class=" f_grey mw20" target="_blank">关于我们</a>|</li> <li class="fl"><a href="<%= about_us_path %>" class=" f_grey mw20" target="_blank">关于我们</a>|</li>
<li class="fl"><a href="<%= agreement_path %>" class=" f_grey mw20" target="_blank">服务协议</a>|</li> <li class="fl"><a href="<%= agreement_path %>" class=" f_grey mw20" target="_blank">服务协议</a>|</li>
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank">帮助中心</a>|</li> <li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank">帮助中心</a>|</li>
<li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank">贴吧交流</a></li> <li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank">贴吧交流</a></li>
</ul> </ul>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<ul class="copyright mt10"> <ul class="copyright mt10">
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Riserved</li> <li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Riserved</li>
<li>ICP备09019772</li> <li>ICP备09019772</li>
</ul> </ul>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div> <div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;"> <div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span> <span><%= l(:label_loading) %></span>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#courseMenu").mouseenter(function(){ $("#courseMenu").mouseenter(function(){
$("#topnav_course_menu").show(); $("#topnav_course_menu").show();
}); });
$("#courseMenu").mouseleave(function(){ $("#courseMenu").mouseleave(function(){
$("#topnav_course_menu").hide(); $("#topnav_course_menu").hide();
}); });
$("#projectMenu").mouseenter(function(){ $("#projectMenu").mouseenter(function(){
$("#topnav_project_menu").show(); $("#topnav_project_menu").show();
}); });
$("#projectMenu").mouseleave(function(){ $("#projectMenu").mouseleave(function(){
$("#topnav_project_menu").hide(); $("#topnav_project_menu").hide();
}); });
function show_homepage(id, has_homepage){ function show_homepage(id, has_homepage){
if (has_homepage == 1) if (has_homepage == 1)
{ {
window.location.href = "/organizations/" + id + "?show_homepage=1"; window.location.href = "/organizations/" + id + "?show_homepage=1";
} }
else else
{ {
alert("您还未设置首页!"); alert("您还未设置首页!");
} }
} }
$(document).ready(function(){ $(document).ready(function(){
$("#orgUser,#orgSwitch").click(function(){ $("#orgUser,#orgSwitch,#org_login_list").mouseout(function(){
$(".org_login_list").toggle();
if($("#orgArrow").attr("class") == "orgMenuArrow"){
$("#orgArrow").attr("class","orgMenuArrow2");
}
else {
$("#orgArrow").attr("class","orgMenuArrow") ;
}
});
if($(".org_login_list").children().click){
$(".org_login_list").css("display","none"); $(".org_login_list").css("display","none");
$("#orgArrow").attr("class","orgMenuArrow"); $("#orgArrow").attr("class","orgMenuArrow");
}; });
$("#orgUser,#orgSwitch,#org_login_list").mouseover(function(){
$(".org_login_list").css("display","block");
$("#orgArrow").attr("class","orgMenuArrow2");
});
}); });
</script> </script>
</body> </body>

@ -1,18 +0,0 @@
namespace :hjq do
namespace :news do
desc "news order"
task :users => :environment do
a = []
# news = News.where("course_id =?", 122)
course.news.each do |new|
unless new.comments.blank?
latest_comment = new.comments.sort! { |a,b| a.created_on <=> b.created_on}.last
end
a << latest_comment
end
comments = a.map(&:commented_id).detect{|a.b| a.created_on <=> b.created_on}
# comments = a.sort!{|a.b| a.created_on <=> b.created_on}
news = News.where("id in (?)", comments)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -861,7 +861,8 @@ a.postRouteLink:hover {text-decoration:underline;}
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
.footerAbout{ width:365px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; } .footerAbout{ width:365px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; }
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} .departments{ width:855px; margin:5px auto;height:40px;line-height:40px;}
.departments li {height:40px; line-height:40px;}
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} .copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}
a.f_grey {color:#666666;} a.f_grey {color:#666666;}
a.f_grey:hover {color:#000000;} a.f_grey:hover {color:#000000;}

@ -67,7 +67,8 @@ a.linkGrey8:hover {color:#585858;}
.orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px; color:#555555;} .orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px; color:#555555;}
.orgMenuArrow {background:url(../images/nav_icon.png) -10px -165px no-repeat; position:relative; display:inline-block; width:20px; height:30px;} .orgMenuArrow {background:url(../images/nav_icon.png) -10px -165px no-repeat; position:relative; display:inline-block; width:20px; height:30px;}
.orgMenuArrow2 {background:url(../images/nav_icon.png) -10px -132px no-repeat; position:relative; display:inline-block; width:20px; height:30px;} .orgMenuArrow2 {background:url(../images/nav_icon.png) -10px -132px no-repeat; position:relative; display:inline-block; width:20px; height:30px;}
.org_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-53px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 30px;} .org_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-53px;
position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 30px;}
#orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;} #orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;}
.orgListStatus {width:55px; float:left;} .orgListStatus {width:55px; float:left;}
@ -85,4 +86,6 @@ a.linkGrey8:hover {color:#585858;}
.re_con_top span{ color:#999999; font-weight:bold;} .re_con_top span{ color:#999999; font-weight:bold;}
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px;
background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.org_login_list a {color:#269ac9;}

@ -581,7 +581,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;} .homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px;} .homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} .homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.postAttSize {color:#888888; font-size:12px; margin-left: 5px;} .postAttSize {color:#888888; font-size:12px; margin-left: 5px;}

Loading…
Cancel
Save