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

257 lines
11 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-30 17:22:23 +08:00
<script>
jQuery(document).ready(function($){
// browser window scroll (in pixels) after which the "back to top" link is shown
var offset = 300,
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
offset_opacity = 1200,
//duration of the top scrolling animation (in ms)
scroll_top_duration = 700,
//grab the "back to top" link
$back_to_top = $('.cd-top');
2016-03-28 14:11:40 +08:00
2016-03-30 17:22:23 +08:00
//hide or show the "back to top" link
$(window).scroll(function(){
( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
if( $(this).scrollTop() > offset_opacity ) {
$back_to_top.addClass('cd-fade-out');
}
});
//smooth scroll to top
$back_to_top.on('click', function(event){
event.preventDefault();
$('body,html').animate({
scrollTop: 0 ,
}, scroll_top_duration
);
});
});
</script>
2016-03-28 14:11:40 +08:00
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-30 17:22:23 +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>
<%# 登录 %>
<%= render :partial => 'organizations/org_logined_header' %>
</div>
<div class="cl"></div>
</div><!--header end-->
2016-03-29 18:25:16 +08:00
2016-03-30 17:22:23 +08:00
<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-->
2016-03-29 18:25:16 +08:00
2016-03-30 17:22:23 +08:00
<div class="banner">
<h2><%= @organization.name %></h2>
<p><span><%= @organization.description %></span></p>
</div>
2016-03-29 18:25:16 +08:00
2016-03-30 17:22:23 +08:00
<div class="cl"></div>
2016-03-28 10:39:09 +08:00
2016-03-30 17:22:23 +08:00
<!--模块-->
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
2016-03-30 19:02:41 +08:00
<% when 'course' %>
2016-03-30 17:22:23 +08:00
<div class="box1 bg-grey">
<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="course-list">
<ul class="clearfix">
2016-03-30 19:17:29 +08:00
<% unless @course_acts_homework.nil? %>
2016-03-30 17:22:23 +08:00
<li >
<% @course_acts_homework.each do |act| %>
<%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id, :course_activity => 0} %>
2016-03-29 13:43:28 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
</li>
2016-03-30 19:17:29 +08:00
<% end %>
<% unless @course_acts_message.nil? %>
2016-03-30 17:22:23 +08:00
<li >
<% @course_acts_message.each do |act| %>
<%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id), :user_activity_id =>act.id} %>
2016-03-29 13:43:28 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
</li>
2016-03-30 19:17:29 +08:00
<% end %>
<% unless @course_acts_news.nil? %>
2016-03-30 17:22:23 +08:00
<li >
<% @course_acts_news.each do |act| %>
<%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id), :user_activity_id =>act.id} %>
2016-03-29 13:43:28 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
</li>
2016-03-30 19:17:29 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
<div class="cl"></div>
</ul>
</div>
</div><!--content end-->
</div><!--box1 end-->
<% when 'project' %>
<div class="box1">
<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>
<div class="row">
2016-03-30 19:17:29 +08:00
<% unless @project_message_acts.nil? %>
2016-03-30 17:22:23 +08:00
<div class="row-l fl">
<!-- text -->
<% @project_message_acts.each do |act| %>
<%= render :partial => 'organizations/org_new_project_message', :locals => {:activity => Message.find(act.org_act_id)} %>
<% end %>
<%= link_to "More", organization_path(@organization, :type => 1), :class => "more-btn mt30 fr", :target => "_blank" %>
2016-03-29 13:43:28 +08:00
<div class="cl"></div>
</div>
2016-03-30 19:17:29 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
<!-- row-l end -->
2016-03-30 19:17:29 +08:00
<% unless @project_issue_acts.nil? %>
2016-03-30 17:22:23 +08:00
<div class="row-r fr">
<% @project_issue_acts.each do |act| %>
<%= render :partial => 'organizations/org_new_project_issues', :locals => {:activity => Issue.find(act.org_act_id)} %>
<% end %>
<%= link_to "More", organization_path(@organization, :type => 1), :class => "more-btn mt30 fr", :target => "_blank" %>
<div class="cl"></div>
</div>
2016-03-30 19:17:29 +08:00
<% end %>
2016-03-30 17:22:23 +08:00
<!-- article-rwrap end -->
2016-03-29 13:43:28 +08:00
</div>
2016-03-30 17:22:23 +08:00
<div class="cl"></div>
</div><!--content end-->
</div><!--box2 end-->
<% end %>
<% else %>
<% if field.field_type == "Post" %> <%# 讨论类型 %>
<% message_ats = get_message_org(@organization.id, field.id) %>
<% ids = field.org_document_comments.map{|o| o.id}.join(",") %>
<div class="box1 bg-grey" 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 %><%= field.id %></h2><p class="box-title-p">discussion zone</p></div>
<div class="row">
<div class="con-left fl">
<% message_ats.each do |act| %>
<%= render :partial => 'organizations/org_new_forum', :locals => {:activity => act, :field => field, :organization => @organization} %>
<% end %>
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn mt30 fr", :target => "_blank" %>
<div class="cl"></div>
</div><!--con-left end-->
<% unless ids.blank? %>
<% message_reply_ats = get_message_reply_org(@organization.id, ids) %>
<div class="con-right fr">
<% message_reply_ats.each do |act| %>
<%= render :partial => 'organizations/org_new_forum_reply', :locals => {:activity => act, :field => field, :organization => @organization} %>
<% end %>
<div class="cl"></div>
</div><!--con-right end--->
2016-03-28 14:11:40 +08:00
2016-03-30 17:22:23 +08:00
<% end %>
</div>
</div><!-content end-->
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<div class="cl"></div>
</div><!--box1 end-->
<% elsif field.field_type == "Resource" %>
<% org_attachs = get_attach_org2(field) %>
<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 %><%= field.id %></h2><p class="box-title-p">resource dwonload</p></div>
<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>
2016-03-30 17:22:23 +08:00
<div class="cl"></div>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
2016-03-29 13:43:28 +08:00
<div class="cl"></div>
</div><!--row end-->
<div class="cl"></div>
</div><!--box1 end-->
2016-03-30 17:22:23 +08:00
</div>
<% end %>
<% end %>
<% end %>
2016-03-29 11:31:58 +08:00
2016-03-28 10:39:09 +08:00
2016-03-30 17:22:23 +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 14:11:40 +08:00
</div>
2016-03-30 17:22:23 +08:00
<!--backtop end-->
<main class="cd-container">
</main>
<a href="#0" class="cd-top">Top</a>
2016-03-28 14:11:40 +08:00
2016-03-30 17:22:23 +08:00
</div><!--container end-->
2016-03-28 14:11:40 +08:00
2016-03-30 17:22:23 +08:00
<!--页面底部-->
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
2016-03-28 10:39:09 +08:00
2016-03-30 17:22:23 +08:00
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
2016-03-28 10:39:09 +08:00
2016-03-30 17:22:23 +08:00
</body>
2016-03-28 10:39:09 +08:00
</html>