公共贴吧

This commit is contained in:
huang 2016-12-27 12:12:07 +08:00
parent 735cdb6a46
commit 616e7a2a11
6 changed files with 122 additions and 4 deletions

View File

@ -97,6 +97,8 @@ class ForumsController < ApplicationController
def index
@offset, @limit = api_offset_and_limit({:limit => 10})
@forums = Memo.all
if(params[:reorder_complex])
@type="reorder_complex"
@str=params[:reorder_complex]
@ -122,7 +124,7 @@ class ForumsController < ApplicationController
@forums = @forums_all.offset(@offset).limit(@limit).all
#@forums = Forum.all
respond_to do |format|
format.html # index.html.erb
format.html{render :layout => 'base_new_forum'}
format.js
format.json { render json: @forums }
end

View File

@ -0,0 +1,41 @@
<div class="wenba-rightbar">
<div class="wenba-rightbar-top clearfix">
<h3 class="fl ml10">问吧</h3>
<a href="javascript:void(0);" class="btn-blue btn fr mt5 mr5">新建贴吧</a>
</div>
<div class="wenba-rightbar-li clearfix">
<h4 class="fl wenba-rightbar-title mt5 ml5"><a href="javascript:void(0);">新手讨论吧</a></h4>
<ul class=" fl right-line wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">798</a></li>
<li>回答</li>
</ul>
<ul class=" fl wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">79888</a></li>
<li>帖子</li>
</ul>
</div>
<div class="wenba-rightbar-li clearfix">
<h4 class="fl wenba-rightbar-title mt5 ml5"><a href="javascript:void(0);">新手讨论吧新手讨论吧新手讨论吧</a></h4>
<ul class=" fl right-line wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">798</a></li>
<li>回答</li>
</ul>
<ul class=" fl wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">79888</a></li>
<li>帖子</li>
</ul>
</div>
<div class="wenba-rightbar-li clearfix">
<h4 class="fl wenba-rightbar-title mt5 ml5"><a href="javascript:void(0);">新手讨论吧</a></h4>
<ul class=" fl right-line wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">798</a></li>
<li>回答</li>
</ul>
<ul class=" fl wenba-rightbar-ul" >
<li><a href="javascript:void(0);" class="linkGrey5">79888</a></li>
<li>帖子</li>
</ul>
</div>
<a href="javascript:void(0);" class="wenba-rightbar-more linkBlue2">点击展开更多</a>
</div>

View File

@ -130,7 +130,7 @@
<div class="homepageContentContainer mb10">
<div class="homepageContent">
<div class="postRightContainer">
<div class="forumRightContainer mr10">
<div id="new_forum_div" class="mb5" style="display: none">
<div class="red fl mb10" id="error" style="display: none">error</div>
<%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
@ -173,7 +173,7 @@
<div class="cl"></div>
</div>
<div class="homepageLeft">
dsag
<%= render :partial => "forums/right_bar" %>
</div>
</div>
</div>

View File

@ -0,0 +1,58 @@
<!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 %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= stylesheet_link_tag 'css/common','css/structure','css/public','css/forum' ,:media => 'all'%>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body onload="prettyPrint();">
<div class="navContainer mb10"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div>
<div class="cl"></div>
<div id="Container">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<% if hidden_unproject_infos %>
<%= render :partial => 'layouts/new_feedback' %>
<% end %>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
<!-- 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>
<%= javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application', 'jquery.colorbox-min') %>
</html>

View File

@ -0,0 +1,17 @@
/*问吧新增20161223*/
.wenba-rightbar{ border: 1px solid #ddd;background-color:#fff; width: 238px;}
.wenba-h3-top{ font-size: 14px; color: #666; }
.wenba-rightbar-top{ height: 40px; line-height: 40px; border-bottom:1px solid #ddd; }
.wenba-rightbar-li{ padding:10px 0; border-bottom:1px solid #ddd; color: #666;}
.wenba-rightbar-title{ font-size: 14px; width: 140px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.right-line{ border-right:1px solid #ddd;}
.wenba-rightbar-ul{ width: 45px; text-align: center;}
.wenba-rightbar-more{ padding:10px 0 ; text-align: center; display: block;}
.wenba-tiwenbox{border: 1px solid #ddd;background-color:#fff; width: 718px; padding:15px;}
.wenba-tiwen-con{ width: 100%; }
input.wenba-tiwen-input{ width:705px; height: 30px; line-height: 30px; padding:0 5px;}
textarea.wenba-tiwen-textarea{ padding:5px;width:705px; height: 150px;}
a.wenba-tiwen-tag{background-color: #E4EFF6;border-bottom: 1px solid #B1D3EB; border-right: 1px solid #B1D3EB;-webkit-text-size-adjust: none; color: #3E6D8E; font-size:12px;line-height: 2.4; padding: 5px 10px;text-decoration: none; white-space: nowrap;}
a:hover.wenba-tiwen-tag,a.wenba-tiwen-tag-active{ background: #3b94d6; color: #fff;border-bottom: 1px solid #2e76ab; border-right: 1px solid #2e76ab;}
.wenba-tagbox li{ float: left; margin:0 5px 5px 0;}
.wenba-tagbox h3{ font-weight: normal; color: #333;}

View File

@ -407,7 +407,6 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(/i
/*创建贴吧样式*/
.postContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff;}
.postContainer_right {width:240px; border:1px solid #dddddd; padding:15px; background-color:#ffffff;}
.postBanner {height:30px; width:970px; border-bottom:1px solid #efefef;}
.postSort {width:40px; float:left; margin-top:5px; padding-left:5px;}
a.sortArrowDown {background:url(../images/post_image_list.png) 0px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
@ -432,6 +431,7 @@ a.sortArrowActiveU {background:url(../images/post_image_list.png) -17px -20px no
.postDetailContainer {padding:15px; border:1px solid #dddddd; background-color:#ffffff;}
.postlabel {background-color:#edf1f2; color:#888888; padding:2px 5px; float:left; margin-bottom:5px;}
.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left; margin-bottom:10px;}
.forumRightContainer {width:718px; border:1px solid #dddddd; background-color:#ffffff; float:left; margin-bottom:10px;}
.postDetailBanner {height:30px; width:720px; border-bottom:1px solid #efefef;}
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}