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

419 lines
21 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 %>
<%= stylesheet_link_tag 'org_new_style' %>
<%= javascript_include_tag 'org' %>
<%= 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: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript">
$("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
$("#navHomepageProfile").mouseleave(function(){
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
$("#topnav_login_list").hide();
});
function signout(){
$.post(
'<%= signout_path%>',
{}
);
}
</script>
</head>
<!--add by huang-->
<body onload="prettyPrint();">
<div class="cl"></div>
<div class="container">
<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>
<div class="header">
<div class="header-con">
<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>
<% 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 %>
</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 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">
<h2><%= @organization.name %><br /></h2>
<p class="copy">course activities</p>
<p class="button">
<a class="dimmed" href="#"> More</a>
</p>
</div>
</section>
<section>
<div class="text">
<h2><%= @organization.name %></h2>
<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">
<h2><%= @organization.name %></h2>
<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-->
<div class="cl"></div>
<!--模块-->
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
<div class="box1">
<div class="content">
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2><p class="box-title-p">course activities</p></div>
<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 %>
<% end %>
<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">
<div class="box-top" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p">project activities</p></div>
<!--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 %>
<% when 'Issue' %>
<%= 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-->
</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">
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2><p class="box-title-p">activity zone</p></div>
<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" %>
<% org_attachs = get_attach_org(field.id) %>
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div class="content">
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2><p class="box-title-p">resource dwonload</p></div>
<div class="row">
<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
<!--row-ziyuan end-->
</div>
<div class="cl"></div>
</div><!--row end-->
<div class="cl"></div>
</div><!--box1 end-->
</div>
<% end %>
<% end %>
<% end %>
<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>
</div>
</div><!--container end-->
<!--页面底部-->
<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>