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

280 lines
14 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>
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>
<%# 登录 %>
2016-03-29 19:04:51 +08:00
<%= render :partial => 'organizations/org_logined_header' %>
2016-03-29 18:25:16 +08:00
</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 %>
2016-03-29 19:04:51 +08:00
<% when 'activity' %>
2016-03-29 18:25:16 +08:00
<%= 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>
2016-03-29 19:04:51 +08:00
<p><span><%= @organization.description %></span></p>
2016-03-29 18:25:16 +08:00
</div>
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 %>
2016-03-29 19:04:51 +08:00
<% when 'HomeworkCommon' %>
2016-03-29 13:43:28 +08:00
<%= 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>
2016-03-29 19:04:51 +08:00
<span class="row-time fr"><%= format_date(message.updated_at) %></span>
2016-03-29 13:43:28 +08:00
<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>