|
|
|
@ -18,18 +18,41 @@
|
|
|
|
|
<%= 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>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<!--add by huang-->
|
|
|
|
|
<body onload="prettyPrint();">
|
|
|
|
|
<div class="orgContainer">
|
|
|
|
|
<div class="orgNav">
|
|
|
|
|
<div class="navOrgLogo fl"><a href="javascript:void(0);"><img src="/images/home_logo.png" width="21" height="19" alt="确实Trustie" class="mt3" /></a></div>
|
|
|
|
|
<div class="navOrgLogo fl"><a href="javascript:void(0);" onclick="show_homepage(<%= @organization.id %>, <%= @organization.home_id.nil? ? 0 : 1 %>);"><img src="/images/home_logo.png" width="21" height="19" alt="Trustie" class="mt3" /></a></div>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="navOrgMenu fl"> <%= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %></li>
|
|
|
|
|
<li class="navOrgMenu fl">
|
|
|
|
|
<a href="javascript:void(0);" onclick="show_homepage(<%= @organization.id %>, <%= @organization.home_id.nil? ? 0 : 1 %>);" class="linkGrey8 f14">首页</a>
|
|
|
|
|
<%#= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %>
|
|
|
|
|
</li>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<li class="navOrgMenu fr"><%=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>
|
|
|
|
|
<li class="navOrgMenu fr" id="orgSwitch" style="cursor:pointer;">
|
|
|
|
|
<span class="orgMenuArrow" id="orgArrow">
|
|
|
|
|
<ul class="org_login_list" style="display:none;">
|
|
|
|
|
<li> <%= link_to "个人主页",user_path(User.current), :class => "linkGrey8" %></li>
|
|
|
|
|
<li><%= link_to "退出",signout_path, :class =>"linkGrey8", :method => 'post', :rel => "nofollow" %></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;"><%=link_to User.current, user_path(User.current), :class => "linkGrey8 f14", :id => "orgUserName" %></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_path(:login=>true) %>" class="linkGrey8 f14">登录</a></li>
|
|
|
|
|
<li class="navOrgMenu fr"><a href="<%= signin_path(:login=>false) %>" class="linkGrey8 f14 mr15">注册</a></li>
|
|
|
|
@ -73,10 +96,12 @@
|
|
|
|
|
<!--<div class="orgName fl mb5 f14">组织id:<%#= @organization.id %></div>-->
|
|
|
|
|
<div class="orgName fl mb5 f14">
|
|
|
|
|
<%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>
|
|
|
|
|
<% if @organization.is_public? %>
|
|
|
|
|
<span class="img_private"><%= l(:label_public)%></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="img_private"><%= l(:label_private)%></span>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<% if @organization.is_public? %>
|
|
|
|
|
<span class="img_private"><%= l(:label_public)%></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="img_private"><%= l(:label_private)%></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -95,10 +120,17 @@
|
|
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="f12 fontGrey3">
|
|
|
|
|
<%= link_to '文章', organization_org_document_comments_path(@organization) %> (
|
|
|
|
|
<%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %>
|
|
|
|
|
) |
|
|
|
|
|
<%= link_to '成员', members_organization_path(@organization.id) %> (<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>)
|
|
|
|
|
<%= link_to '文章', organization_org_document_comments_path(@organization) %>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
(
|
|
|
|
|
<%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %>
|
|
|
|
|
)
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
<%= link_to '成员', members_organization_path(@organization.id) %>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
(<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>)
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepageLeftMenuContainer" id="sub_field_left_lists">
|
|
|
|
@ -152,7 +184,33 @@
|
|
|
|
|
$("#projectMenu").mouseleave(function(){
|
|
|
|
|
$("#topnav_project_menu").hide();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
function show_homepage(id, has_homepage){
|
|
|
|
|
if (has_homepage == 1)
|
|
|
|
|
{
|
|
|
|
|
window.location.href = "/organizations/" + id + "?show_homepage=1";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alert("您还未设置首页!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
$("#orgUser,#orgSwitch").click(function(){
|
|
|
|
|
$(".org_login_list").toggle();
|
|
|
|
|
if($("#orgArrow").attr("class") == "orgMenuArrow"){
|
|
|
|
|
$("#orgArrow").attr("class","orgMenuArrow2");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#orgArrow").attr("class","orgMenuArrow") ;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if($(".org_login_list").children().click){
|
|
|
|
|
$(".org_login_list").css("display","none");
|
|
|
|
|
$("#orgArrow").attr("class","orgMenuArrow");
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|