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

447 lines
22 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' %>
<%= 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">
window.onload = function () {
var oBtnLeft = document.getElementById("goleft");
var oBtnRight = document.getElementById("goright");
var oDiv = document.getElementById("indexmaindiv");
var oDiv1 = document.getElementById("maindiv1");
var oUl = oDiv.getElementsByTagName("ul")[0];
var aLi = oUl.getElementsByTagName("li");
var now = -5 * (aLi[0].offsetWidth + 13);
oUl.style.width = aLi.length * (aLi[0].offsetWidth + 13) + 'px';
oBtnRight.onclick = function () {
var n = Math.floor((aLi.length * (aLi[0].offsetWidth + 13) + oUl.offsetLeft) / aLi[0].offsetWidth);
if (n <= 5) {
move(oUl, 'left', 0);
}
else {
move(oUl, 'left', oUl.offsetLeft + now);
}
}
oBtnLeft.onclick = function () {
var now1 = -Math.floor((aLi.length / 5)) * 5 * (aLi[0].offsetWidth + 13);
if (oUl.offsetLeft >= 0) {
move(oUl, 'left', now1);
}
else {
move(oUl, 'left', oUl.offsetLeft - now);
}
}
var timer = setInterval(oBtnRight.onclick, 5000);
oDiv.onmouseover = function () {
clearInterval(timer);
}
oDiv.onmouseout = function () {
timer = setInterval(oBtnRight.onclick, 5000);
}
};
function getStyle(obj, name) {
if (obj.currentStyle) {
return obj.currentStyle[name];
}
else {
return getComputedStyle(obj, false)[name];
}
}
function move(obj, attr, iTarget) {
clearInterval(obj.timer)
obj.timer = setInterval(function () {
var cur = 0;
if (attr == 'opacity') {
cur = Math.round(parseFloat(getStyle(obj, attr)) * 100);
}
else {
cur = parseInt(getStyle(obj, attr));
}
var speed = (iTarget - cur) / 6;
speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
if (iTarget == cur) {
clearInterval(obj.timer);
}
else if (attr == 'opacity') {
obj.style.filter = 'alpha(opacity:' + (cur + speed) + ')';
obj.style.opacity = (cur + speed) / 100;
}
else {
obj.style[attr] = cur + speed + 'px';
}
}, 30);
}
</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">
<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-28 14:11:40 +08:00
<a href="register.html" class="register fr"></a>
<a href="login.html" class="login fr"></a>
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' %>
<a href="#" class="fl"> 课程动态</a>
<% when 'project' %>
<a href="#" class="fl">项目动态</a>
<% end %>
<% else %>
2016-03-29 13:43:28 +08:00
<% if field.field_type == "Post" && field.hide == 0 %>
2016-03-28 16:51:58 +08:00
<%= link_to field.name, organization_path(@organization), :class => "fl" %>
2016-03-29 13:43:28 +08:00
<% elsif field.field_type == "Resource" && field.hide == 0%>
2016-03-28 16:51:58 +08:00
<%= link_to field.name, organization_path(@organization), :class => "fl" %>
<% 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">
<div class="box-top"><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 %>
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">
<div class="box-top"><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-->
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">
<div class="box-top"><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" %>
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div class="content">
<div class="box-top"><h2 class="box-title">北斗资源下载</h2><p class="box-title-p">resource dwonload</p></div>
<div class="row">
<div class="fl">
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资资源名称资源名称资源资源名称资源名称资源源</a>
<p class="fl"><span >上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资源</a>
<p class="fl"><span>上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资源</a>
<p class="fl"><span>上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
</div>
<div class="fl ml60">
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资源</a>
<p class="fl"><span>上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资源</a>
<p class="fl"><span>上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
<div class="row-ziyuan ">
<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>
<div class="ziyuan-box fl">
<a href="#" class="fl ziyuan-title" ><span></span>资源名称资源名称资源名称资源名称资源</a>
<p class="fl"><span>上传时间2016-01-01</span><span>类型:软件</span><span> 上传者:尹刚</span> <span>下载次数40</span></p>
</div>
<a href="#" class="download-btn fl" >下载</a>
<div class="cl"></div>
</div><!--row-ziyuan end-->
</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>