组织新base框架

This commit is contained in:
huang 2016-05-30 14:23:52 +08:00
parent 389172e5b2
commit 46e4f2c143
12 changed files with 100 additions and 45 deletions

View File

@ -91,7 +91,7 @@ class OrganizationsController < ApplicationController
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
@project_acts = get_project_activities_org @organization, project_ids
@course_acts = get_course_activities_org @organization, course_ids
render :layout => 'base_org2'
render :layout => 'base_org_custom'
else
render_403
end

View File

@ -0,0 +1,10 @@
<div class="por_footer_con">
<ul>
<li ><a href="<%= about_us_path %>" target="_blank" class="" >关于我们<span>|</span></a></li>
<li ><a href="<%= agreement_path %>" target="_blank" class="" >服务协议<span>|</span></a></li>
<li ><a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="" >帮助中心<span>|</span></a></li>
<li ><a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="" > 贴吧交流</a></li>
<div class="cl"></div>
</ul>
<p>Copyright 2007~2016, All Rights Reserved 湘ICP备09019772</p>
</div>

View File

@ -9,36 +9,18 @@
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'org2','jquery/jquery-ui-1.9.2' %>
<%#= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'org_custom', 'new_user', 'public','jquery/jquery-ui-1.9.2' %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
<%=render :partial => "math_js" %>
</head>
<!--add by huang-->
<body onload="prettyPrint();">
<!--内容开始-->
<header>
<div class="sn-header">
<div class="sn-row sn-bg-white">
<div class="sn-logo">
<%= render :partial => 'org_avater_swap', :org_logo_attchment => @org_logo_attchment %>
<!--<a href="javascript:void(0);" class="sn-search-button sn-mt28"></a>-->
<!--<input type="text" class="sn-search-input sn-mt28" placeholder="搜索" />-->
<%= render :partial => 'organizations/org_logined_header' %>
</div>
</div>
<!--导航-->
<div class="sn-row sn-bg-blue sn-p-relative">
<%= render :partial => "org_field_menu", :locals => {:subfield_content => @subfield_content} %>
</div>
</div>
<body>
<% update_visiti_count @organization %>
<header id="por_header">
<%= render :partial => 'org_custom_header' %>
</header>
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count @organization %>
<%# over %>
<!--内容开始-->
<div class="sn-content">
<%= render_flash_messages %>
@ -46,10 +28,8 @@
<%= call_hook :view_layouts_base_content %>
</div>
<!--内容结束-->
<footer>
<%= render :partial => "org2_footer" %>
</footer>
<footer class="por_footer">
<%= render :partial => "layouts/org_custom_footer" %></footer>
<!--页面底部-->
<div class="cl"></div>
<%# 弹框 %>
@ -60,7 +40,7 @@
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
<%= javascript_include_tag 'attachments' %>
</body>
</html>
</html>

View File

@ -0,0 +1,67 @@
<div class="por_header_top">
<div class="por_header_con" >
<a href="javascript:void(0);" target="_blank" class="por_logo fl "><img src="images/porlogo.png" alt="logo" width="67" height="61" /></a>
<% if User.current.logged? %>
<div class="navHomepageProfile" id="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon fr mt15" id="homepageProfileMenuIcon">
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :width =>"40", :height => "40", :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
<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><%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%></li>
</ul>
</li>
</ul>
</div>
<% else %>
<ul class="por_login fr">
<li><a href="<%= signin_url_without_domain %>" target="_blank" class=" ">登录</a></li>
<li><a href="<%= register_url_without_domain %>" target="_blank" class=" ">注册</a></li>
</ul>
<% end %>
<div class="por_search fr">
<input type="text" class="pro_input_search fl" value="00000" />
<a href="javascript:void(0);" class="por_search_btn fl"></a>
</div>
</div>
</div>
<div class="cl"></div>
<div class="por_nav" >
<ul >
<li><a href="javascript:void(0);" target="_blank" class="por_index_act ">首页</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">网站头条</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">精品课程</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">热点项目</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">精华帖子</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">最新动态</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">名师风采1</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">学生英雄榜</a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">学生英雄榜 </a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">学生英雄榜 </a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">学生英雄榜 </a></li>
<li><a href="javascript:void(0);" target="_blank" class=" ">学生英雄榜 </a></li>
</ul>
<a href="javascript:void(0);" target="_blank" class=" fr por_edit_index">配置 </a>
<div class="cl"></div>
</div><!--por_nav end-->
<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>

View File

@ -1,6 +1,6 @@
<%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%>
<% if @organization.switch_type && params[:org_subfield_id].nil? %>
<%= render :partial => 'show_type2' %>
<%#= render :partial => 'show_type2' %>
<% else %>
<%= javascript_include_tag "jquery.infinitescroll.js" %>

View File

@ -7,8 +7,6 @@ ol,ul,li{ list-style-type:none}
a:link,a:visited{color:#000;text-decoration:none;}
a:hover,a:active{color:#3b94d6;}
/* 公共 */
.clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;}
.fl{ float:left;}
@ -24,11 +22,11 @@ a:hover,a:active{color:#3b94d6;}
.mr5{ margin-right:5px;}
.mr10{ margin-right:15px;}
.mr15{ margin-right:10px;}
a.c_red{color:#df0600;}
.c_red{color:#df0600;}
/* 门户首页 */
#por_header{ width:100%; height:70px; background-color:#3b94d6; }
.por_header_con{ width:1000px; margin:0 auto;}
#por_header{ width:100%; }
.por_header_top{ width:100%; height:70px; background:#3b94d6; }
.por_header_con{ width:1000px; margin:0 auto; height:70px; }
.por_logo{ margin-top:5px;}
.por_login li{ float:left;}
.por_login li a{ display:block; padding:0 15px; height:70px; line-height:70px;font-size:16px; color:#fff; }
@ -37,15 +35,17 @@ a.c_red{color:#df0600;}
.pro_input_search{ background-color:#daeefc; height:36px; width:355px; border:none; padding:0 5px; color:#3b94d6;}
a.por_search_btn{ display:block;background:#daeefc url(../images/icons_por.png) 0 8px no-repeat; width:25px; height:36px;}
a:hover.por_search_btn{background:#daeefc url(../images/icons_por.png) -35px 8px no-repeat; }
.por_nav{ width:1000px; height:70px; overflow:hidden; margin: 0 auto; position:relative; }
a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:20px;}
.por_nav ul{ border-bottom:7px solid #ccc; height:63px;}
.por_nav ul li{ float:left; }
.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:63px; font-size:18px; color:#333; }
.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6; }
.por_index_act{border-bottom:7px solid #3b94d6; }
#por_container{ width:1000px; margin:10px auto;}
.por_left{ width:685px; margin-right:15px; float:left; }
.por_right{ width:300px; float:left;}
.por_nav{ width:1000px; overflow:hidden; position:relative;height:53px; border-bottom:7px solid #ccc; margin-bottom:10px;}
a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:15px;}
.por_nav ul li{ float:left;}
.por_nav ul li a{ display: block; height:53px; padding:0 20px; line-height:53px; font-size:18px; color:#333;}
.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6;}
.por_icons_hot{ background:url(../images/icons_por.png) 0 -78px no-repeat; height:22px; width:55px; padding-left:3px; color:#fff; font-size:12px; line-height:22px; font-weight:normal;}
.por_h2_index{ font-size:20px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;}
a.por_more_index{ font-size:12px; color:#999; }
@ -115,8 +115,6 @@ a.por_teachers_name{ display:block; width:80px; font-size:18px;overflow:hidden;
.por_footer_con ul li a span{ color:#999; margin:0 15px ;}
.por_footer_con p{ text-align:center; margin-top:20px; color:#777;}
.por_index_position{ position:relative;}
a.por_xiang_index{ position:absolute; color:red; background:#fff; top:40px; left:292px;}