socialforge/app/views/layouts/base_org_newstyle.html.erb

419 lines
21 KiB
Plaintext
Raw Normal View History

2016-03-28 10:39:09 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
2016-03-28 14:11:40 +08:00
<%= stylesheet_link_tag 'org_new_style' %>
2016-03-29 16:45:14 +08:00
<%= javascript_include_tag 'org' %>
2016-03-28 10:39:09 +08:00
<%= javascript_include_tag 'attachments' %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false,
showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
2016-03-28 14:11:40 +08:00
</script>
<script type="text/javascript">
2016-03-29 18:25:16 +08:00
$("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
$("#navHomepageProfile").mouseleave(function(){
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
$("#topnav_login_list").hide();
});
2016-03-28 14:11:40 +08:00
2016-03-29 18:25:16 +08:00
function signout(){
$.post(
'<%= signout_path%>',
{}
);
2016-03-28 14:11:40 +08:00
}
</script>
2016-03-28 10:39:09 +08:00
</head>
<!--add by huang-->
<body onload="prettyPrint();">
2016-03-28 14:11:40 +08:00
<div class="cl"></div>
<div class="container">
2016-03-29 18:25:16 +08:00
<div class="header">
<div class="header-con">
<a href="index.html" class="fl logo"><img src="/images/org_new_style/logo.jpg" alt=""/></a>
<%# 登录 %>
<% if User.current.logged? %>
<div class="navHomepageProfile" id="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon fr" id="homepageProfileMenuIcon">
<%= link_to "<div class='mt5 mb8 user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe,user_activities_path(User.current.id)%>
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
<ul class="topnav_login_list none" id="topnav_login_list">
<li>
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
</li>
<li>
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
</li>
<li>
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
</li>
</ul>
</li>
</ul>
</div>
<!--<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">-->
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
<%#= link_to User.current, user_url_in_org(User.current.id),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
<%#= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
<!--</li>-->
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
<% else %>
<li class="navOrgMenu fr"><a href="<%= signin_url_without_domain %>" class="login fr"></a></li>
<li class="navOrgMenu fr"><a href="<%= register_url_without_domain %>" class="register fr"></a></li>
<% end %>
<!--<a href="#" class="fr user-img" ><img src="/images/org_new_style/detailimg4.jpg" /></a>-->
</div>
<div class="cl"></div>
</div><!--header end-->
<div class="nav-box">
<div class="nav fl">
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'activity' %>
<%= link_to "首页", organization_path(@organization), :class => "fl navact" %>
<% when 'course' %>
<a href="#course_<%= field.id %>" class="fl"> 课程动态</a>
<% when 'project' %>
<a href="#project_<%= field.id %>" class="fl">项目动态</a>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
<% elsif field.field_type == "Resource" && field.hide == 0%>
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
<% end %>
<% end %>
<% end %>
</div>
</div><!--nav end-->
<div class="banner">
<h2><%= @organization.name %></h2>
<p><br><span>open laboratory of simulation and testing</span></p>
</div>
2016-03-28 14:11:40 +08:00
<div class="header">
<div class="header-con">
2016-03-29 11:31:58 +08:00
<a href="index.html" class="fl"><%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %><img src="/images/org_new_style/logo.jpg" alt=""/></a>
2016-03-29 16:51:50 +08:00
<% if User.current.logged? %>
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), user_url_in_org(User.current.id),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
<%= link_to User.current, user_url_in_org(User.current.id),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
<%= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
</li>
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
<% else %>
<li class="navOrgMenu fr"><a href="<%= signin_url_without_domain %>" class="login fr"></a></li>
<li class="navOrgMenu fr"><a href="<%= register_url_without_domain %>" class="register fr"></a></li>
<% end %>
2016-03-28 10:39:09 +08:00
</div>
2016-03-28 14:11:40 +08:00
<div class="cl"></div>
</div><!--header end-->
<div class="nav-box">
<div class="nav fl">
2016-03-28 16:51:58 +08:00
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'activity' %>
<%= link_to "首页", organization_path(@organization), :class => "fl navact" %>
<% when 'course' %>
2016-03-29 16:45:14 +08:00
<a href="#course_<%= field.id %>" class="fl"> 课程动态</a>
2016-03-28 16:51:58 +08:00
<% when 'project' %>
2016-03-29 16:45:14 +08:00
<a href="#project_<%= field.id %>" class="fl">项目动态</a>
2016-03-28 16:51:58 +08:00
<% end %>
<% else %>
2016-03-29 13:43:28 +08:00
<% if field.field_type == "Post" && field.hide == 0 %>
2016-03-29 16:45:14 +08:00
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
2016-03-29 13:43:28 +08:00
<% elsif field.field_type == "Resource" && field.hide == 0%>
2016-03-29 16:45:14 +08:00
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
2016-03-28 16:51:58 +08:00
<% end %>
<% end %>
<% end %>
2016-03-28 14:11:40 +08:00
</div>
<div class="fr">
<form class="searchbox">
<input type="text" name="search" class="search-input fl" value="search" />
<a href="#" class="search-icon fl"></a>
</form>
</div>
<div class="cl" ></div>
</div><!--nav end-->
<div class="header-content home" >
<div class="parallax-bg" id="slider-wrap">
<div class="slider parallax-bg" id="slider">
<div class="slider-sections sandbox">
<section class="first">
<div class="text">
2016-03-29 11:31:58 +08:00
<h2><%= @organization.name %><br /></h2>
2016-03-28 16:51:58 +08:00
<p class="copy">course activities</p>
2016-03-28 14:11:40 +08:00
<p class="button">
<a class="dimmed" href="#"> More</a>
</p>
</div>
</section>
<section>
<div class="text">
2016-03-29 11:31:58 +08:00
<h2><%= @organization.name %></h2>
2016-03-28 14:11:40 +08:00
<p class="copy">open laboratory of simulation and testing</p>
<p class="button">
<a class="dimmed" href="#">More</a>
</p>
</div>
</section>
<section>
<div class="text">
2016-03-29 11:31:58 +08:00
<h2><%= @organization.name %></h2>
2016-03-28 14:11:40 +08:00
<p class="copy">open laboratory of simulation and testing</p>
<p class="button">
<a class="dimmed" href="#"> More</a>
</p>
</div>
</section>
</div>
</div>
<a class="slider-prev" href="javascript: void(0)">?</a> <a class="slider-next" href="javascript: void(0)">?</a>
</div>
</div><!--header-content end-->
2016-03-28 10:39:09 +08:00
<div class="cl"></div>
2016-03-29 11:31:58 +08:00
<!--模块-->
<% @subfield_content.each do |field| %>
2016-03-29 13:43:28 +08:00
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
<div class="box1">
<div class="content">
2016-03-29 16:45:14 +08:00
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2><p class="box-title-p">course activities</p></div>
2016-03-29 13:43:28 +08:00
<div class="row ">
<div class="row-box1 mr40 fl">
<a href="#" target="_blank" class="row-img"><img src="/images/org_new_style/img1.jpg"></a>
<% @course_acts_homework.each do |act| %>
<% if act.container_type == 'Course' %>
<% case act.org_act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %>
<% when 'News' %>
<%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %>
<% when 'Message'%>
<%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
<% when 'Poll' %>
<%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %>
<% when 'Course'%>
<%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %>
<% end %>
<% end %>
2016-03-29 11:31:58 +08:00
<% end %>
2016-03-29 13:43:28 +08:00
<a href="#" target="_blank" class="btn-more">More</a>
</div><!--row-box1 end-->
<div class="row-box1 mr40 fl">
<a href="#" target="_blank" class="row-img"><img src="/images/org_new_style/img2.jpg"></a>
<% @course_acts_message.each do |act| %>
<% if act.container_type == 'Course' %>
<% case act.org_act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %>
<% when 'News' %>
<%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %>
<% when 'Message'%>
<%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
<% when 'Poll' %>
<%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %>
<% when 'Course'%>
<%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %>
<% end %>
<% end %>
<% end %>
<a href="#" target="_blank" class="btn-more">More</a>
</div><!--row-box1 end-->
<div class="row-box2 fl ">
<div class="row-con2">
<a href="#" target="_blank">
<h3 class="row-title">届卫星导航仿真与测试专题研讨会在...</h3>
<p class="row-txt2">10月15日由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民天产业基地隆重召开由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...</p>
</a>
</div><!--row-con2 end-->
<div class="row-con2">
<a href="#" target="_blank">
<h3 class="row-title">届卫星导航仿真与测试专题研讨会在...</h3>
<p class="row-txt2">10月15日由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民天产业基地隆重召开由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...</p>
</a>
</div><!--row-con2 end-->
<div class="row-con2">
<a href="#" target="_blank">
<h3 class="row-title">届卫星导航仿真与测试专题研讨会在...</h3>
<p class="row-txt2">10月15日由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民天产业基地隆重召开由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...</p>
</a>
</div><!--row-con2 end-->
</div><!--row-box2 end-->
<div class="cl"></div>
</div>
</div><!--content end-->
</div><!--box1 end-->
<% when 'project' %>
<div class="box2">
<div class="content">
2016-03-29 16:45:14 +08:00
<div class="box-top" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p">project activities</p></div>
2016-03-29 13:43:28 +08:00
<!--start-slider2-->
<div class="slider2-bg">
<div class="container">
<div class="row ">
<div class=" slider2-left fl" >
<% @project_acts.each do |act| %>
<% if act.container_type == 'Project' %>
<% case act.org_act_type.to_s %>
2016-03-29 16:45:14 +08:00
<% when 'Issue' %>
2016-03-29 13:43:28 +08:00
<%= render :partial => 'organizations/org_new_project_issues', :locals => {:activity => Issue.find(act.org_act_id)} %>
<% when 'Message' %>
<%= render :partial => 'organizations/org_new_project_message', :locals => {:activity => Message.find(act.org_act_id)} %>
<% when 'ProjectCreateInfo'%>
<%= render :partial => 'organizations/org_new_project_create', :locals => {:activity => act} %>
<% end %>
<% end %>
<% end %>
</div>
<div class=" slider2-right fl " >
<div class="slider2">
<div class="callbacks_container">
<ul class="rslides" id="slider2">
<li>
<img src="/images/org_new_style/slide1.png" class="img-responsive" alt="" />
</li>
<li>
<img src="/images/org_new_style/slide2.png" class="img-responsive" alt="" />
</li>
<li>
<img src="/images/org_new_style/slide1.png" class="img-responsive" alt="" />
</li>
<li>
<img src="/images/org_new_style/slide2.png" class="img-responsive" alt="" />
</li>
</ul>
</div>
</div>
</div>
<div class="cl"></div>
<script src="js/responsiveslides.min.js"></script>
<script>
$(function () {
$("#slider2").responsiveSlides({
auto: true,
nav: true,
speed: 500,
namespace: "callbacks",
pager: true
});
});
</script>
</div>
</div>
</div>
<!--//end-slider2-->
2016-03-28 14:11:40 +08:00
2016-03-29 13:43:28 +08:00
</div><!--content end-->
</div><!--box2 end-->
<% end %>
<% else %>
<% if field.field_type == "Post" %>
<% message_ats = get_message_org(@organization.id, field.id) %>
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div class="content">
2016-03-29 16:45:14 +08:00
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2><p class="box-title-p">activity zone</p></div>
2016-03-29 13:43:28 +08:00
<div class="row">
<% message_ats.each do |message| %>
<div class="row-box3 mr30 fl">
<a href="#" target="_blank" class="row-img2"><img src="/images/org_new_style/pic1.jpg"></a>
<a href="#" target="_blank" class="row-con">
<h3 class="row-title3 fl"><%=link_to message.title %></h3>
<span class="row-time fr"><%= format_time(message.updated_at) %></span>
<div class="cl"></div>
<div class="row-txt"><%= message.content.html_safe %></div>
</a>
<a href="#" target="_blank" class="btn-more">More</a>
</div><!--row-box3 end-->
<% end %>
<div class="cl"></div>
</div>
</div><!--content end-->
</div> <!--box1 end-->
<% elsif field.field_type == "Resource" %>
2016-03-29 16:45:14 +08:00
<% org_attachs = get_attach_org(field.id) %>
2016-03-29 13:43:28 +08:00
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div class="content">
2016-03-29 16:45:14 +08:00
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2><p class="box-title-p">resource dwonload</p></div>
2016-03-29 13:43:28 +08:00
<div class="row">
2016-03-29 16:45:14 +08:00
<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
<!--row-ziyuan end-->
2016-03-29 13:43:28 +08:00
</div>
<div class="cl"></div>
</div><!--row end-->
<div class="cl"></div>
</div><!--box1 end-->
</div>
<% end %>
<% end %>
2016-03-29 11:31:58 +08:00
<% end %>
2016-03-28 10:39:09 +08:00
2016-03-28 14:11:40 +08:00
<div class="footer">
<div class="footer-con">
<ul>
<li><a href="<%= about_us_path %>" target="_blank" class="fl">关于我们</a></li>
<li><a href="<%= agreement_path %>" target="_blank" class="fl"> 服务协议 </a></li>
<li><a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="fl">帮助中心</a></li>
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="fl"> 贴吧交流</a></li>
</ul>
<div class="cl"></div>
<p>Copyright 2007~2016 All Rights Reserved<br>湘ICP备09019772</p>
</div>
2016-03-28 10:39:09 +08:00
</div>
2016-03-28 14:11:40 +08:00
</div><!--container end-->
<!--页面底部-->
2016-03-28 10:39:09 +08:00
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
</body>
</html>